box-ui-elements 16.0.0-beta.8 → 16.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/dist/explorer.css +1 -1
- package/dist/explorer.js +19 -58
- package/dist/openwith.css +1 -1
- package/dist/openwith.js +10 -10
- package/dist/picker.css +1 -1
- package/dist/picker.js +12 -12
- package/dist/preview.css +1 -1
- package/dist/preview.js +17 -56
- package/dist/sharing.css +1 -1
- package/dist/sharing.js +34 -34
- package/dist/sidebar.css +1 -1
- package/dist/sidebar.js +17 -56
- package/dist/uploader.css +1 -1
- package/dist/uploader.js +12 -12
- package/es/api/APIFactory.js +27 -0
- package/es/api/APIFactory.js.flow +26 -0
- package/es/api/APIFactory.js.map +1 -1
- package/es/api/Annotations.js +180 -27
- package/es/api/Annotations.js.flow +150 -14
- package/es/api/Annotations.js.map +1 -1
- package/es/api/Comments.js +2 -2
- package/es/api/Comments.js.flow +5 -4
- package/es/api/Comments.js.map +1 -1
- package/es/api/Feed.js +578 -69
- package/es/api/Feed.js.flow +677 -17
- package/es/api/Feed.js.map +1 -1
- package/es/api/FileCollaborators.js +29 -0
- package/es/api/FileCollaborators.js.flow +30 -0
- package/es/api/FileCollaborators.js.map +1 -1
- package/es/api/ThreadedComments.js +64 -27
- package/es/api/ThreadedComments.js.flow +54 -29
- package/es/api/ThreadedComments.js.map +1 -1
- package/es/api/fixtures.js +381 -0
- package/es/api/fixtures.js.flow +401 -0
- package/es/api/fixtures.js.map +1 -0
- package/es/api/messages.js +4 -0
- package/es/api/messages.js.flow +5 -0
- package/es/api/messages.js.map +1 -1
- package/es/api/utils.js +33 -0
- package/es/api/utils.js.flow +30 -0
- package/es/api/utils.js.map +1 -0
- package/es/common/types/annotations.js.flow +18 -10
- package/es/common/types/feed.js +1 -1
- package/es/common/types/feed.js.flow +40 -4
- package/es/common/types/feed.js.map +1 -1
- package/es/components/accessible-svg/AccessibleSVG.stories.js +20 -0
- package/es/components/accessible-svg/AccessibleSVG.stories.js.map +1 -0
- package/es/components/badge/Badge.stories.js +1 -13
- package/es/components/badge/Badge.stories.js.map +1 -1
- package/es/components/badge/BetaBadge.stories.js +10 -0
- package/es/components/badge/BetaBadge.stories.js.map +1 -0
- package/es/components/badge/TrialBadge.stories.js +10 -0
- package/es/components/badge/TrialBadge.stories.js.map +1 -0
- package/es/components/badge/UpgradeBadge.stories.js +10 -0
- package/es/components/badge/UpgradeBadge.stories.js.map +1 -0
- package/es/components/breadcrumb/Breadcrumb.js +48 -35
- package/es/components/breadcrumb/Breadcrumb.js.flow +68 -42
- package/es/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/es/components/breadcrumb/EllipsisCrumb.js +5 -3
- package/es/components/breadcrumb/EllipsisCrumb.js.flow +10 -6
- package/es/components/breadcrumb/EllipsisCrumb.js.map +1 -1
- package/es/components/count-badge/CountBadge.stories.js +1 -1
- package/es/components/count-badge/CountBadge.stories.js.map +1 -1
- package/es/components/draggable-list/DraggableList.stories.js +119 -5
- package/es/components/draggable-list/DraggableList.stories.js.map +1 -1
- package/es/components/dropdown-menu/DropdownMenu.js +9 -0
- package/es/components/dropdown-menu/DropdownMenu.js.flow +11 -0
- package/es/components/dropdown-menu/DropdownMenu.js.map +1 -1
- package/es/components/dropdown-menu/DropdownMenu.scss +3 -3
- package/es/components/infinite-scroll/InfiniteScroll.js +4 -2
- package/es/components/infinite-scroll/InfiniteScroll.js.map +1 -1
- package/es/components/modal/Modal.scss +5 -1
- package/es/components/search-form/SearchForm.js +1 -1
- package/es/components/search-form/SearchForm.js.flow +1 -1
- package/es/components/search-form/SearchForm.js.map +1 -1
- package/es/components/table/makeSelectable.js +304 -97
- package/es/components/table/makeSelectable.js.flow +299 -98
- package/es/components/table/makeSelectable.js.map +1 -1
- package/es/components/tooltip/Tooltip.js +3 -2
- package/es/components/tooltip/Tooltip.js.map +1 -1
- package/es/constants.js +11 -0
- package/es/constants.js.flow +11 -0
- package/es/constants.js.map +1 -1
- package/es/elements/common/annotator-context/index.js +1 -0
- package/es/elements/common/annotator-context/index.js.flow +4 -0
- package/es/elements/common/annotator-context/index.js.map +1 -1
- package/es/elements/common/annotator-context/types.js +12 -0
- package/es/elements/common/annotator-context/types.js.flow +77 -35
- package/es/elements/common/annotator-context/types.js.map +1 -1
- package/es/elements/common/annotator-context/useAnnotatorEvents.js +205 -0
- package/es/elements/common/annotator-context/useAnnotatorEvents.js.flow +52 -0
- package/es/elements/common/annotator-context/useAnnotatorEvents.js.map +1 -0
- package/es/elements/common/annotator-context/withAnnotations.js +224 -5
- package/es/elements/common/annotator-context/withAnnotations.js.flow +73 -36
- package/es/elements/common/annotator-context/withAnnotations.js.map +1 -1
- package/es/elements/common/annotator-context/withAnnotatorContext.js +12 -4
- package/es/elements/common/annotator-context/withAnnotatorContext.js.flow +29 -9
- package/es/elements/common/annotator-context/withAnnotatorContext.js.map +1 -1
- package/es/elements/common/current-user/index.js +3 -0
- package/es/elements/common/current-user/index.js.flow +8 -0
- package/es/elements/common/current-user/index.js.map +1 -0
- package/es/elements/common/current-user/withCurrentUser.js +139 -0
- package/es/elements/common/current-user/withCurrentUser.js.flow +40 -0
- package/es/elements/common/current-user/withCurrentUser.js.map +1 -0
- package/es/elements/common/flowTypes.js.flow +22 -4
- package/es/elements/common/flowTypes.js.map +1 -1
- package/es/elements/common/interactionTargets.js +2 -0
- package/es/elements/common/interactionTargets.js.flow +2 -0
- package/es/elements/common/interactionTargets.js.map +1 -1
- package/es/elements/common/logger/Logger.js +1 -1
- package/es/elements/common/logger/Logger.js.flow +1 -1
- package/es/elements/common/logger/Logger.js.map +1 -1
- package/es/elements/common/messages.js +4 -0
- package/es/elements/common/messages.js.flow +5 -0
- package/es/elements/common/messages.js.map +1 -1
- package/es/elements/content-explorer/DeleteConfirmationDialog.js +2 -1
- package/es/elements/content-explorer/DeleteConfirmationDialog.js.flow +3 -1
- package/es/elements/content-explorer/DeleteConfirmationDialog.js.map +1 -1
- package/es/elements/content-explorer/DeleteConfirmationDialog.scss +5 -0
- package/es/elements/content-explorer/stories/DeleteConfirmationDialog.stories.js +58 -0
- package/es/elements/content-explorer/stories/DeleteConfirmationDialog.stories.js.flow +60 -0
- package/es/elements/content-explorer/stories/DeleteConfirmationDialog.stories.js.map +1 -0
- package/es/elements/content-sidebar/ActivitySidebar.js +323 -197
- package/es/elements/content-sidebar/ActivitySidebar.js.flow +381 -154
- package/es/elements/content-sidebar/ActivitySidebar.js.map +1 -1
- package/es/elements/content-sidebar/ActivitySidebarFilter.js +52 -0
- package/es/elements/content-sidebar/ActivitySidebarFilter.js.flow +59 -0
- package/es/elements/content-sidebar/ActivitySidebarFilter.js.map +1 -0
- package/es/elements/content-sidebar/ActivitySidebarFilter.scss +4 -0
- package/es/elements/content-sidebar/DetailsSidebar.js +50 -25
- package/es/elements/content-sidebar/DetailsSidebar.js.flow +32 -4
- package/es/elements/content-sidebar/DetailsSidebar.js.map +1 -1
- package/es/elements/content-sidebar/Sidebar.js +4 -1
- package/es/elements/content-sidebar/Sidebar.js.flow +6 -1
- package/es/elements/content-sidebar/Sidebar.js.map +1 -1
- package/es/elements/content-sidebar/SidebarContentInsights.js +45 -0
- package/es/elements/content-sidebar/SidebarContentInsights.js.map +1 -0
- package/es/elements/content-sidebar/SidebarContentInsights.scss +6 -0
- package/es/elements/content-sidebar/SidebarPanels.js +2 -0
- package/es/elements/content-sidebar/SidebarPanels.js.flow +4 -0
- package/es/elements/content-sidebar/SidebarPanels.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActiveState.js +91 -10
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActiveState.js.flow +122 -24
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActiveState.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityFeed.js +27 -15
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityFeed.js.flow +59 -18
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityFeed.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThread.js +101 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThread.js.flow +126 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThread.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThread.scss +17 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplies.js +69 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplies.js.flow +85 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplies.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplies.scss +16 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplyForm.js +62 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplyForm.js.flow +59 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplyForm.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplyForm.scss +22 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/activityFeedUtils.js +2 -2
- package/es/elements/content-sidebar/activity-feed/activity-feed/activityFeedUtils.js.flow +2 -2
- package/es/elements/content-sidebar/activity-feed/activity-feed/activityFeedUtils.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/activity-feed/fixtures.js +55 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/fixtures.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/messages.js +16 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/messages.js.flow +20 -0
- package/es/elements/content-sidebar/activity-feed/activity-feed/messages.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThread.js +121 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThread.js.flow +117 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThread.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThread.scss +7 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadContent.js +75 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadContent.js.flow +105 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadContent.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadContent.scss +5 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadCreate.js +77 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadCreate.js.flow +86 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadCreate.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadCreate.scss +3 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/errors.js +11 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/errors.js.flow +26 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/errors.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/index.js +2 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/index.js.flow +1 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/index.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/messages.js +17 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/messages.js.flow +21 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/messages.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/useAnnotationAPI.js +180 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/useAnnotationAPI.js.flow +203 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/useAnnotationAPI.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/useRepliesAPI.js +124 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/useRepliesAPI.js.flow +121 -0
- package/es/elements/content-sidebar/activity-feed/annotation-thread/useRepliesAPI.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/annotations/AnnotationActivity.js +19 -5
- package/es/elements/content-sidebar/activity-feed/annotations/AnnotationActivity.js.flow +24 -4
- package/es/elements/content-sidebar/activity-feed/annotations/AnnotationActivity.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/annotations/AnnotationActivityMenu.js +25 -4
- package/es/elements/content-sidebar/activity-feed/annotations/AnnotationActivityMenu.js.flow +36 -2
- package/es/elements/content-sidebar/activity-feed/annotations/AnnotationActivityMenu.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/annotations/messages.js +8 -0
- package/es/elements/content-sidebar/activity-feed/annotations/messages.js.flow +10 -0
- package/es/elements/content-sidebar/activity-feed/annotations/messages.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/comment/Comment.js +61 -28
- package/es/elements/content-sidebar/activity-feed/comment/Comment.js.flow +54 -10
- package/es/elements/content-sidebar/activity-feed/comment/Comment.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/comment/messages.js +8 -0
- package/es/elements/content-sidebar/activity-feed/comment/messages.js.flow +10 -0
- package/es/elements/content-sidebar/activity-feed/comment/messages.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/comment-form/CommentForm.js +4 -2
- package/es/elements/content-sidebar/activity-feed/comment-form/CommentForm.js.flow +3 -1
- package/es/elements/content-sidebar/activity-feed/comment-form/CommentForm.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/common/activity-message/ActivityMessage.js +16 -5
- package/es/elements/content-sidebar/activity-feed/common/activity-message/ActivityMessage.js.flow +34 -4
- package/es/elements/content-sidebar/activity-feed/common/activity-message/ActivityMessage.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/common/activity-message/ActivityMessage.scss +40 -3
- package/es/elements/content-sidebar/activity-feed/common/activity-message/CollapsableMessage.js +49 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-message/CollapsableMessage.js.flow +42 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-message/CollapsableMessage.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-message/CollapsableMessageToggle.js +21 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-message/CollapsableMessageToggle.js.flow +24 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-message/CollapsableMessageToggle.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-message/messages.js +12 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-message/messages.js.flow +15 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-message/messages.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/common/activity-status/ActivityStatus.js +24 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-status/ActivityStatus.js.flow +30 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-status/ActivityStatus.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-status/ActivityStatus.scss +6 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-status/index.js +2 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-status/index.js.flow +2 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-status/index.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-status/messages.js +9 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-status/messages.js.flow +13 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-status/messages.js.map +1 -0
- package/es/elements/content-sidebar/activity-feed/common/activity-timestamp/ActivityTimestamp.scss +1 -1
- package/es/elements/content-sidebar/fixtures.js +181 -0
- package/es/elements/content-sidebar/fixtures.js.flow +185 -0
- package/es/elements/content-sidebar/fixtures.js.map +1 -0
- package/es/elements/content-sidebar/flowTypes.js.flow +9 -25
- package/es/elements/content-sidebar/messages.js +8 -0
- package/es/elements/content-sidebar/messages.js.flow +10 -0
- package/es/elements/content-sidebar/messages.js.map +1 -1
- package/es/elements/content-sidebar/withErrorHandling.js.flow +1 -1
- package/es/elements/content-sidebar/withErrorHandling.js.map +1 -1
- package/es/elements/content-sidebar/withSidebarAnnotations.js +215 -30
- package/es/elements/content-sidebar/withSidebarAnnotations.js.flow +162 -11
- package/es/elements/content-sidebar/withSidebarAnnotations.js.map +1 -1
- package/es/elements/content-uploader/OverallUploadsProgressBar.js +10 -8
- package/es/elements/content-uploader/OverallUploadsProgressBar.js.flow +11 -12
- package/es/elements/content-uploader/OverallUploadsProgressBar.js.map +1 -1
- package/es/features/classification/Classification.scss +1 -1
- package/es/features/classification/security-controls/SecurityControlsItem.scss +1 -0
- package/es/features/classification/security-controls/messages.js +8 -0
- package/es/features/classification/security-controls/messages.js.flow +10 -0
- package/es/features/classification/security-controls/messages.js.map +1 -1
- package/es/features/classification/security-controls/utils.js +4 -7
- package/es/features/classification/security-controls/utils.js.flow +8 -12
- package/es/features/classification/security-controls/utils.js.map +1 -1
- package/es/features/content-explorer/content-explorer/ContentExplorer.js +6 -1
- package/es/features/content-explorer/content-explorer/ContentExplorer.js.flow +4 -0
- package/es/features/content-explorer/content-explorer/ContentExplorer.js.map +1 -1
- package/es/features/content-explorer/content-explorer/ContentExplorer.scss +4 -0
- package/es/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js +15 -9
- package/es/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js.flow +14 -11
- package/es/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js.map +1 -1
- package/es/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js +4 -1
- package/es/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js.flow +4 -1
- package/es/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js.map +1 -1
- package/es/features/content-explorer/content-explorer-modal/ContentExplorerModal.js +6 -3
- package/es/features/content-explorer/content-explorer-modal/ContentExplorerModal.js.flow +5 -1
- package/es/features/content-explorer/content-explorer-modal/ContentExplorerModal.js.map +1 -1
- package/es/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js +6 -1
- package/es/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js.flow +5 -1
- package/es/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js.map +1 -1
- package/es/features/content-explorer/prop-types.js +7 -1
- package/es/features/content-explorer/prop-types.js.flow +8 -0
- package/es/features/content-explorer/prop-types.js.map +1 -1
- package/es/features/content-insights/CompactCount.js +24 -0
- package/es/features/content-insights/CompactCount.js.map +1 -0
- package/es/features/content-insights/ContentAnalyticsErrorState.js +35 -0
- package/es/features/content-insights/ContentAnalyticsErrorState.js.map +1 -0
- package/es/features/content-insights/ContentAnalyticsErrorState.scss +17 -0
- package/es/features/content-insights/ContentInsightsSummary.js +42 -0
- package/es/features/content-insights/ContentInsightsSummary.js.map +1 -0
- package/es/features/content-insights/ContentInsightsSummary.scss +12 -0
- package/es/features/content-insights/ContentInsightsSummaryGhostState.js +19 -0
- package/es/features/content-insights/ContentInsightsSummaryGhostState.js.map +1 -0
- package/es/features/content-insights/ContentInsightsSummaryGhostState.scss +9 -0
- package/es/features/content-insights/GraphCardGhostState.js +25 -0
- package/es/features/content-insights/GraphCardGhostState.js.map +1 -0
- package/es/features/content-insights/GraphCardGhostState.scss +18 -0
- package/es/features/content-insights/GraphCardPreviewsSummary.js +30 -0
- package/es/features/content-insights/GraphCardPreviewsSummary.js.map +1 -0
- package/es/features/content-insights/GraphCardPreviewsSummary.scss +10 -0
- package/es/features/content-insights/GraphGhostState.js +21 -0
- package/es/features/content-insights/GraphGhostState.js.map +1 -0
- package/es/features/content-insights/GraphGhostState.scss +11 -0
- package/es/features/content-insights/HeaderWithCount.js +23 -0
- package/es/features/content-insights/HeaderWithCount.js.map +1 -0
- package/es/features/content-insights/HeaderWithCount.scss +10 -0
- package/es/features/content-insights/MetricSummary.js +85 -0
- package/es/features/content-insights/MetricSummary.js.map +1 -0
- package/es/features/content-insights/MetricSummary.scss +14 -0
- package/es/features/content-insights/OpenContentInsightsButton.js +16 -0
- package/es/features/content-insights/OpenContentInsightsButton.js.map +1 -0
- package/es/features/content-insights/TrendPill.js +61 -0
- package/es/features/content-insights/TrendPill.js.map +1 -0
- package/es/features/content-insights/TrendPill.scss +33 -0
- package/es/features/content-insights/_mixins.scss +7 -0
- package/es/features/content-insights/_variables.scss +4 -0
- package/es/features/content-insights/charts/bar/Bar.js +57 -0
- package/es/features/content-insights/charts/bar/Bar.js.map +1 -0
- package/es/features/content-insights/charts/bar/Bar.scss +27 -0
- package/es/features/content-insights/charts/bar/BarChart.js +70 -0
- package/es/features/content-insights/charts/bar/BarChart.js.map +1 -0
- package/es/features/content-insights/charts/bar/BarChart.scss +56 -0
- package/es/features/content-insights/charts/types.js +2 -0
- package/es/{common/types/threadedComments.js.map → features/content-insights/charts/types.js.map} +1 -1
- package/es/features/content-insights/constants.js +54 -0
- package/es/features/content-insights/constants.js.map +1 -0
- package/es/features/content-insights/messages.js +69 -0
- package/es/features/content-insights/messages.js.map +1 -0
- package/es/features/content-insights/numberUtils.js +10 -0
- package/es/features/content-insights/numberUtils.js.map +1 -0
- package/es/features/content-insights/types.js +2 -0
- package/es/features/content-insights/types.js.map +1 -0
- package/es/features/item-details/ItemProperties.scss +1 -1
- package/es/features/shared-link-settings-modal/SharedLinkSettingsModal.js +5 -3
- package/es/features/shared-link-settings-modal/SharedLinkSettingsModal.js.flow +4 -2
- package/es/features/shared-link-settings-modal/SharedLinkSettingsModal.js.map +1 -1
- package/es/features/unified-share-modal/ContactRestrictionNotice.js +34 -8
- package/es/features/unified-share-modal/ContactRestrictionNotice.js.flow +36 -6
- package/es/features/unified-share-modal/ContactRestrictionNotice.js.map +1 -1
- package/es/features/unified-share-modal/EmailForm.js +59 -47
- package/es/features/unified-share-modal/EmailForm.js.flow +31 -13
- package/es/features/unified-share-modal/EmailForm.js.map +1 -1
- package/es/features/unified-share-modal/UnifiedShareForm.js +112 -103
- package/es/features/unified-share-modal/UnifiedShareForm.js.flow +25 -8
- package/es/features/unified-share-modal/UnifiedShareForm.js.map +1 -1
- package/es/features/unified-share-modal/UnifiedShareModal.js +1 -0
- package/es/features/unified-share-modal/UnifiedShareModal.js.flow +1 -0
- package/es/features/unified-share-modal/UnifiedShareModal.js.map +1 -1
- package/es/features/unified-share-modal/flowTypes.js.flow +4 -2
- package/es/features/unified-share-modal/flowTypes.js.map +1 -1
- package/es/features/unified-share-modal/messages.js +12 -8
- package/es/features/unified-share-modal/messages.js.flow +14 -8
- package/es/features/unified-share-modal/messages.js.map +1 -1
- package/es/features/unified-share-modal/utils/hasRestrictedContacts.js +9 -4
- package/es/features/unified-share-modal/utils/hasRestrictedContacts.js.flow +10 -3
- package/es/features/unified-share-modal/utils/hasRestrictedContacts.js.map +1 -1
- package/es/features/unified-share-modal/utils/isRestrictedContact.js +15 -0
- package/es/features/unified-share-modal/utils/isRestrictedContact.js.flow +21 -0
- package/es/features/unified-share-modal/utils/isRestrictedContact.js.map +1 -0
- package/es/icon/fill/Alert16.js +3 -2
- package/es/icon/fill/Alert16.js.flow +3 -2
- package/es/icon/fill/Alert16.js.map +1 -1
- package/es/icon/fill/AlertBadge16.js +31 -0
- package/es/icon/fill/AlertBadge16.js.flow +29 -0
- package/es/icon/fill/AlertBadge16.js.map +1 -0
- package/es/icon/fill/AlertBadge16.stories.js +13 -0
- package/es/icon/fill/AlertBadge16.stories.js.map +1 -0
- package/es/icon/fill/Info16.js +2 -2
- package/es/icon/fill/Info16.js.flow +1 -1
- package/es/icon/fill/Info16.js.map +1 -1
- package/es/icon/fill/InfoBadge16.js +30 -0
- package/es/icon/fill/InfoBadge16.js.flow +28 -0
- package/es/icon/fill/InfoBadge16.js.map +1 -0
- package/es/icon/fill/InfoBadge16.stories.js +13 -0
- package/es/icon/fill/InfoBadge16.stories.js.map +1 -0
- package/es/icon/fill/UserSettings16.js +38 -0
- package/es/icon/fill/UserSettings16.js.flow +38 -0
- package/es/icon/fill/UserSettings16.js.map +1 -0
- package/es/icon/fill/UserSettings16.stories.js +13 -0
- package/es/icon/fill/UserSettings16.stories.js.map +1 -0
- package/es/icon/line/AlertBubble16.js +31 -0
- package/es/icon/line/AlertBubble16.js.flow +29 -0
- package/es/icon/line/AlertBubble16.js.map +1 -0
- package/es/icon/line/AlertBubble16.stories.js +13 -0
- package/es/icon/line/AlertBubble16.stories.js.map +1 -0
- package/es/icon/line/AvatarXBadge16.js +45 -0
- package/es/icon/line/AvatarXBadge16.js.flow +39 -0
- package/es/icon/line/AvatarXBadge16.js.map +1 -0
- package/es/icon/line/AvatarXBadge16.stories.js +13 -0
- package/es/icon/line/AvatarXBadge16.stories.js.map +1 -0
- package/es/icon/line/CoEdit16.js +32 -0
- package/es/icon/line/CoEdit16.js.flow +30 -0
- package/es/icon/line/CoEdit16.js.map +1 -0
- package/es/icon/line/CoEdit16.stories.js +13 -0
- package/es/icon/line/CoEdit16.stories.js.map +1 -0
- package/es/icon/line/Collaborations16.js +32 -0
- package/es/icon/line/Collaborations16.js.flow +30 -0
- package/es/icon/line/Collaborations16.js.map +1 -0
- package/es/icon/line/Collaborations16.stories.js +13 -0
- package/es/icon/line/Collaborations16.stories.js.map +1 -0
- package/es/icon/line/CommentBubble16.js +35 -0
- package/es/icon/line/CommentBubble16.js.flow +34 -0
- package/es/icon/line/CommentBubble16.js.map +1 -0
- package/es/icon/line/CommentBubble16.stories.js +13 -0
- package/es/icon/line/CommentBubble16.stories.js.map +1 -0
- package/es/src/components/accessible-svg/AccessibleSVG.stories.d.ts +7 -0
- package/es/src/components/badge/Badge.stories.d.ts +0 -3
- package/es/src/components/badge/BetaBadge.stories.d.ts +6 -0
- package/es/src/components/badge/TrialBadge.stories.d.ts +6 -0
- package/es/src/components/badge/UpgradeBadge.stories.d.ts +6 -0
- package/es/src/components/draggable-list/DraggableList.stories.d.ts +3 -3
- package/es/src/components/infinite-scroll/InfiniteScroll.d.ts +1 -1
- package/es/src/components/tooltip/Tooltip.d.ts +2 -0
- package/es/src/elements/common/annotator-context/__tests__/useAnnotatorEvents.test.d.ts +1 -0
- package/es/src/elements/common/annotator-context/index.d.ts +1 -0
- package/es/src/elements/common/annotator-context/types.d.ts +28 -6
- package/es/src/elements/common/annotator-context/useAnnotatorEvents.d.ts +52 -0
- package/es/src/elements/common/annotator-context/withAnnotations.d.ts +11 -2
- package/es/src/elements/common/annotator-context/withAnnotatorContext.d.ts +6 -2
- package/es/src/elements/common/current-user/__tests__/withCurrentUser.test.d.ts +1 -0
- package/es/src/elements/common/current-user/index.d.ts +2 -0
- package/es/src/elements/common/current-user/withCurrentUser.d.ts +20 -0
- package/es/src/elements/content-sidebar/SidebarContentInsights.d.ts +15 -0
- package/es/src/elements/content-sidebar/__tests__/SidebarContentInsights.test.d.ts +1 -0
- package/es/src/elements/content-sidebar/activity-feed/activity-feed/fixtures.d.ts +55 -0
- package/es/src/features/content-insights/CompactCount.d.ts +15 -0
- package/es/src/features/content-insights/ContentAnalyticsErrorState.d.ts +7 -0
- package/es/src/features/content-insights/ContentInsightsSummary.d.ts +12 -0
- package/es/src/features/content-insights/ContentInsightsSummaryGhostState.d.ts +3 -0
- package/es/src/features/content-insights/GraphCardGhostState.d.ts +3 -0
- package/es/src/features/content-insights/GraphCardPreviewsSummary.d.ts +16 -0
- package/es/src/features/content-insights/GraphGhostState.d.ts +3 -0
- package/es/src/features/content-insights/HeaderWithCount.d.ts +7 -0
- package/es/src/features/content-insights/MetricSummary.d.ts +18 -0
- package/es/src/features/content-insights/OpenContentInsightsButton.d.ts +5 -0
- package/es/src/features/content-insights/TrendPill.d.ts +15 -0
- package/es/src/features/content-insights/__tests__/CompactCount.test.d.ts +1 -0
- package/es/src/features/content-insights/__tests__/ContentAnalyticsErrorState.test.d.ts +1 -0
- package/es/src/features/content-insights/__tests__/ContentInsightsSummary.test.d.ts +1 -0
- package/es/src/features/content-insights/__tests__/GraphCardPreviewsSummary.test.d.ts +1 -0
- package/es/src/features/content-insights/__tests__/HeaderWithCount.test.d.ts +1 -0
- package/es/src/features/content-insights/__tests__/MetricSummary.test.d.ts +1 -0
- package/es/src/features/content-insights/charts/bar/Bar.d.ts +11 -0
- package/es/src/features/content-insights/charts/bar/BarChart.d.ts +19 -0
- package/es/src/features/content-insights/charts/bar/__tests__/Bar.test.d.ts +1 -0
- package/es/src/features/content-insights/charts/bar/__tests__/BarChart.test.d.ts +1 -0
- package/es/src/features/content-insights/charts/types.d.ts +2 -0
- package/es/src/features/content-insights/constants.d.ts +27 -0
- package/es/src/features/content-insights/messages.d.ts +83 -0
- package/es/src/features/content-insights/numberUtils.d.ts +3 -0
- package/es/src/features/content-insights/types.d.ts +24 -0
- package/es/src/icon/fill/AlertBadge16.d.ts +13 -0
- package/es/src/icon/fill/AlertBadge16.stories.d.ts +9 -0
- package/es/src/icon/fill/InfoBadge16.d.ts +13 -0
- package/es/src/icon/fill/InfoBadge16.stories.d.ts +9 -0
- package/es/src/icon/fill/UserSettings16.d.ts +13 -0
- package/es/src/icon/fill/UserSettings16.stories.d.ts +9 -0
- package/es/src/icon/line/AlertBubble16.d.ts +13 -0
- package/es/src/icon/line/AlertBubble16.stories.d.ts +9 -0
- package/es/src/icon/line/AvatarXBadge16.d.ts +13 -0
- package/es/src/icon/line/AvatarXBadge16.stories.d.ts +9 -0
- package/es/src/icon/line/CoEdit16.d.ts +13 -0
- package/es/src/icon/line/CoEdit16.stories.d.ts +9 -0
- package/es/src/icon/line/Collaborations16.d.ts +13 -0
- package/es/src/icon/line/Collaborations16.stories.d.ts +9 -0
- package/es/src/icon/line/CommentBubble16.d.ts +13 -0
- package/es/src/icon/line/CommentBubble16.stories.d.ts +9 -0
- package/es/src/styles/variables.d.ts +3 -1
- package/es/styles/constants/_layout.scss +1 -1
- package/es/styles/constants/_media-queries.scss +2 -0
- package/es/styles/variables.js +6 -2
- package/es/styles/variables.js.flow +4 -2
- package/es/styles/variables.js.map +1 -1
- package/es/utils/error.js +5 -1
- package/es/utils/error.js.flow +5 -1
- package/es/utils/error.js.map +1 -1
- package/es/utils/fields.js +8 -3
- package/es/utils/fields.js.flow +21 -3
- package/es/utils/fields.js.map +1 -1
- package/es/utils/sorter.js.flow +2 -2
- package/es/utils/sorter.js.map +1 -1
- package/i18n/bn-IN.js +45 -7
- package/i18n/bn-IN.properties +83 -7
- package/i18n/da-DK.js +45 -7
- package/i18n/da-DK.properties +83 -7
- package/i18n/de-DE.js +45 -7
- package/i18n/de-DE.properties +83 -7
- package/i18n/en-AU.js +45 -7
- package/i18n/en-AU.properties +83 -7
- package/i18n/en-CA.js +45 -7
- package/i18n/en-CA.properties +83 -7
- package/i18n/en-GB.js +45 -7
- package/i18n/en-GB.properties +83 -7
- package/i18n/en-US.js +45 -7
- package/i18n/en-US.properties +83 -7
- package/i18n/en-x-pseudo.js +891 -854
- package/i18n/en-x-pseudo.properties +941 -843
- package/i18n/es-419.js +45 -7
- package/i18n/es-419.properties +83 -7
- package/i18n/es-ES.js +45 -7
- package/i18n/es-ES.properties +83 -7
- package/i18n/fi-FI.js +45 -7
- package/i18n/fi-FI.properties +83 -7
- package/i18n/fr-CA.js +45 -7
- package/i18n/fr-CA.properties +83 -7
- package/i18n/fr-FR.js +45 -7
- package/i18n/fr-FR.properties +83 -7
- package/i18n/hi-IN.js +45 -7
- package/i18n/hi-IN.properties +83 -7
- package/i18n/it-IT.js +45 -7
- package/i18n/it-IT.properties +83 -7
- package/i18n/ja-JP.js +47 -9
- package/i18n/ja-JP.properties +85 -9
- package/i18n/ko-KR.js +45 -7
- package/i18n/ko-KR.properties +83 -7
- package/i18n/nb-NO.js +45 -7
- package/i18n/nb-NO.properties +83 -7
- package/i18n/nl-NL.js +45 -7
- package/i18n/nl-NL.properties +83 -7
- package/i18n/pl-PL.js +45 -7
- package/i18n/pl-PL.properties +83 -7
- package/i18n/pt-BR.js +45 -7
- package/i18n/pt-BR.properties +83 -7
- package/i18n/ru-RU.js +45 -7
- package/i18n/ru-RU.properties +83 -7
- package/i18n/sv-SE.js +45 -7
- package/i18n/sv-SE.properties +83 -7
- package/i18n/tr-TR.js +45 -7
- package/i18n/tr-TR.properties +83 -7
- package/i18n/zh-CN.js +45 -7
- package/i18n/zh-CN.properties +83 -7
- package/i18n/zh-TW.js +45 -7
- package/i18n/zh-TW.properties +83 -7
- package/package.json +7 -8
- package/src/__mocks__/react-intl.js +4 -0
- package/src/api/APIFactory.js +26 -0
- package/src/api/Annotations.js +150 -14
- package/src/api/Comments.js +5 -4
- package/src/api/Feed.js +677 -17
- package/src/api/FileCollaborators.js +30 -0
- package/src/api/ThreadedComments.js +54 -29
- package/src/api/__tests__/Annotations.test.js +217 -11
- package/src/api/__tests__/Feed.test.js +699 -86
- package/src/api/__tests__/FileCollaborators.test.js +41 -0
- package/src/api/__tests__/ThreadedComments.test.js +47 -10
- package/src/api/__tests__/utils.test.js +11 -0
- package/src/api/fixtures.js +401 -0
- package/src/api/messages.js +5 -0
- package/src/api/utils.js +30 -0
- package/src/common/types/annotations.js +18 -10
- package/src/common/types/feed.js +40 -4
- package/src/components/accessible-svg/AccessibleSVG.stories.tsx +18 -0
- package/src/components/badge/Badge.stories.md +1 -7
- package/src/components/badge/Badge.stories.tsx +1 -10
- package/src/components/badge/BetaBadge.stories.tsx +9 -0
- package/src/components/badge/TrialBadge.stories.tsx +9 -0
- package/src/components/badge/UpgradeBadge.stories.tsx +9 -0
- package/src/components/breadcrumb/Breadcrumb.js +68 -42
- package/src/components/breadcrumb/EllipsisCrumb.js +10 -6
- package/src/components/count-badge/CountBadge.stories.tsx +1 -1
- package/src/components/draggable-list/DraggableList.stories.tsx +72 -5
- package/src/components/dropdown-menu/DropdownMenu.js +11 -0
- package/src/components/dropdown-menu/DropdownMenu.scss +3 -3
- package/src/components/dropdown-menu/__tests__/DropdownMenu.test.js +38 -0
- package/src/components/grid-view/__tests__/__snapshots__/GridViewSlider.test.js.snap +1 -0
- package/src/components/infinite-scroll/InfiniteScroll.md +1 -1
- package/src/components/infinite-scroll/InfiniteScroll.tsx +5 -2
- package/src/components/infinite-scroll/__tests__/InfiniteScroll.test.tsx +115 -127
- package/src/components/modal/Modal.scss +5 -1
- package/src/components/search-form/SearchForm.js +1 -1
- package/src/components/search-form/__tests__/SearchForm.test.js +25 -6
- package/src/components/sidebar-toggle-button/__tests__/__snapshots__/SidebarToggleButton.test.js.snap +4 -0
- package/src/components/table/__tests__/makeSelectable.test.js +654 -144
- package/src/components/table/makeSelectable.js +299 -98
- package/src/components/time/__tests__/ReadableTime.test.js +0 -1
- package/src/components/tooltip/Tooltip.tsx +5 -2
- package/src/components/tooltip/__tests__/Tooltip.test.tsx +10 -0
- package/src/components/tooltip/__tests__/__snapshots__/Tooltip.test.tsx.snap +1 -1
- package/src/constants.js +11 -0
- package/src/elements/common/annotator-context/__tests__/useAnnotatorEvents.test.tsx +509 -0
- package/src/elements/common/annotator-context/__tests__/withAnnotations.test.tsx +275 -12
- package/src/elements/common/annotator-context/__tests__/withAnnotatorContext.test.tsx +18 -6
- package/src/elements/common/annotator-context/index.js.flow +4 -0
- package/src/elements/common/annotator-context/index.ts +1 -0
- package/src/elements/common/annotator-context/types.js.flow +77 -35
- package/src/elements/common/annotator-context/types.ts +28 -6
- package/src/elements/common/annotator-context/useAnnotatorEvents.js.flow +52 -0
- package/src/elements/common/annotator-context/useAnnotatorEvents.ts +190 -0
- package/src/elements/common/annotator-context/withAnnotations.js.flow +73 -36
- package/src/elements/common/annotator-context/withAnnotations.tsx +170 -7
- package/src/elements/common/annotator-context/withAnnotatorContext.js.flow +29 -9
- package/src/elements/common/annotator-context/withAnnotatorContext.tsx +28 -5
- package/src/elements/common/current-user/__tests__/withCurrentUser.test.tsx +108 -0
- package/src/elements/common/current-user/index.js.flow +8 -0
- package/src/elements/common/current-user/index.ts +2 -0
- package/src/elements/common/current-user/withCurrentUser.js.flow +40 -0
- package/src/elements/common/current-user/withCurrentUser.tsx +139 -0
- package/src/elements/common/flowTypes.js +22 -4
- package/src/elements/common/interactionTargets.js +2 -0
- package/src/elements/common/logger/Logger.js +1 -1
- package/src/elements/common/messages.js +5 -0
- package/src/elements/content-explorer/DeleteConfirmationDialog.js +3 -1
- package/src/elements/content-explorer/DeleteConfirmationDialog.scss +5 -0
- package/src/elements/content-explorer/stories/DeleteConfirmationDialog.stories.js +60 -0
- package/src/elements/content-explorer/stories/DeleteConfirmationDialog.stories.md +1 -0
- package/src/elements/content-sidebar/ActivitySidebar.js +381 -154
- package/src/elements/content-sidebar/ActivitySidebarFilter.js +59 -0
- package/src/elements/content-sidebar/ActivitySidebarFilter.scss +4 -0
- package/src/elements/content-sidebar/DetailsSidebar.js +32 -4
- package/src/elements/content-sidebar/Sidebar.js +6 -1
- package/src/elements/content-sidebar/SidebarContentInsights.scss +6 -0
- package/src/elements/content-sidebar/SidebarContentInsights.tsx +57 -0
- package/src/elements/content-sidebar/SidebarPanels.js +4 -0
- package/src/elements/content-sidebar/__tests__/ActivitySidebar.test.js +533 -243
- package/src/elements/content-sidebar/__tests__/ActivitySidebarFilter.test.js +54 -0
- package/src/elements/content-sidebar/__tests__/DetailsSidebar.test.js +45 -0
- package/src/elements/content-sidebar/__tests__/Sidebar.test.js +1 -1
- package/src/elements/content-sidebar/__tests__/SidebarContentInsights.test.tsx +56 -0
- package/src/elements/content-sidebar/__tests__/SidebarPanels.test.js +4 -3
- package/src/elements/content-sidebar/__tests__/__snapshots__/ActivitySidebar.test.js.snap +29 -15
- package/src/elements/content-sidebar/__tests__/__snapshots__/SidebarFileProperties.test.js.snap +1 -0
- package/src/elements/content-sidebar/__tests__/withSidebarAnnotations.test.js +325 -32
- package/src/elements/content-sidebar/activity-feed/activity-feed/ActiveState.js +122 -24
- package/src/elements/content-sidebar/activity-feed/activity-feed/ActivityFeed.js +59 -18
- package/src/elements/content-sidebar/activity-feed/activity-feed/ActivityThread.js +126 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/ActivityThread.scss +17 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplies.js +85 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplies.scss +16 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplyForm.js +59 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/ActivityThreadReplyForm.scss +22 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/__tests__/ActiveState.test.js +19 -5
- package/src/elements/content-sidebar/activity-feed/activity-feed/__tests__/ActivityFeed.test.js +22 -16
- package/src/elements/content-sidebar/activity-feed/activity-feed/__tests__/ActivityThread.test.js +80 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/__tests__/ActivityThreadReplies.test.js +24 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/__tests__/ActivityThreadRepliesForm.test.js +47 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/__tests__/__snapshots__/ActiveState.test.js.snap +74 -43
- package/src/elements/content-sidebar/activity-feed/activity-feed/__tests__/activityFeedUtils.test.js +8 -8
- package/src/elements/content-sidebar/activity-feed/activity-feed/activityFeedUtils.js +2 -2
- package/src/elements/content-sidebar/activity-feed/activity-feed/fixtures.ts +56 -0
- package/src/elements/content-sidebar/activity-feed/activity-feed/messages.js +20 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThread.js +117 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThread.scss +7 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadContent.js +105 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadContent.scss +5 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadCreate.js +86 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/AnnotationThreadCreate.scss +3 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/__tests__/AnnotationThread.test.js +28 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/__tests__/AnnotationThreadContent.test.js +89 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/__tests__/AnnotationThreadCreate.test.js +103 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/__tests__/useAnnotationAPI.test.js +202 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/__tests__/useRepliesAPI.test.js +99 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/errors.js +26 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/index.js +1 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/messages.js +21 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/useAnnotationAPI.js +203 -0
- package/src/elements/content-sidebar/activity-feed/annotation-thread/useRepliesAPI.js +121 -0
- package/src/elements/content-sidebar/activity-feed/annotations/AnnotationActivity.js +24 -4
- package/src/elements/content-sidebar/activity-feed/annotations/AnnotationActivityMenu.js +36 -2
- package/src/elements/content-sidebar/activity-feed/annotations/__tests__/AnnotationActivity.test.js +14 -10
- package/src/elements/content-sidebar/activity-feed/annotations/__tests__/AnnotationActivityMenu.test.js +35 -1
- package/src/elements/content-sidebar/activity-feed/annotations/messages.js +10 -0
- package/src/elements/content-sidebar/activity-feed/comment/Comment.js +54 -10
- package/src/elements/content-sidebar/activity-feed/comment/__tests__/Comment.test.js +152 -7
- package/src/elements/content-sidebar/activity-feed/comment/__tests__/__snapshots__/Comment.test.js.snap +12 -7
- package/src/elements/content-sidebar/activity-feed/comment/messages.js +10 -0
- package/src/elements/content-sidebar/activity-feed/comment-form/CommentForm.js +3 -1
- package/src/elements/content-sidebar/activity-feed/comment-form/__tests__/CommentForm.test.js +11 -0
- package/src/elements/content-sidebar/activity-feed/common/activity-message/ActivityMessage.js +34 -4
- package/src/elements/content-sidebar/activity-feed/common/activity-message/ActivityMessage.scss +40 -3
- package/src/elements/content-sidebar/activity-feed/common/activity-message/CollapsableMessage.js +42 -0
- package/src/elements/content-sidebar/activity-feed/common/activity-message/CollapsableMessageToggle.js +24 -0
- package/src/elements/content-sidebar/activity-feed/common/activity-message/__tests__/ActivityMessage.test.js +48 -1
- package/src/elements/content-sidebar/activity-feed/common/activity-message/messages.js +15 -0
- package/src/elements/content-sidebar/activity-feed/common/activity-status/ActivityStatus.js +30 -0
- package/src/elements/content-sidebar/activity-feed/common/activity-status/ActivityStatus.scss +6 -0
- package/src/elements/content-sidebar/activity-feed/common/activity-status/__tests__/ActivityStatus.test.js +19 -0
- package/src/elements/content-sidebar/activity-feed/common/activity-status/index.js +2 -0
- package/src/elements/content-sidebar/activity-feed/common/activity-status/messages.js +13 -0
- package/src/elements/content-sidebar/activity-feed/common/activity-timestamp/ActivityTimestamp.scss +1 -1
- package/src/elements/content-sidebar/activity-feed/task-new/__tests__/Task.test.js +4 -3
- package/src/elements/content-sidebar/activity-feed/task-new/__tests__/__snapshots__/Task.test.js.snap +1 -2
- package/src/elements/content-sidebar/fixtures.js +185 -0
- package/src/elements/content-sidebar/flowTypes.js +9 -25
- package/src/elements/content-sidebar/messages.js +10 -0
- package/src/elements/content-sidebar/withErrorHandling.js +1 -1
- package/src/elements/content-sidebar/withSidebarAnnotations.js +162 -11
- package/src/elements/content-uploader/OverallUploadsProgressBar.js +11 -12
- package/src/features/classification/Classification.scss +1 -1
- package/src/features/classification/security-controls/SecurityControlsItem.scss +1 -0
- package/src/features/classification/security-controls/__tests__/__snapshots__/utils.test.js.snap +18 -16
- package/src/features/classification/security-controls/__tests__/utils.test.js +13 -5
- package/src/features/classification/security-controls/messages.js +10 -0
- package/src/features/classification/security-controls/utils.js +8 -12
- package/src/features/collapsible-sidebar/__tests__/__snapshots__/CollapsibleSidebarLogo.test.js.snap +2 -0
- package/src/features/content-explorer/content-explorer/ContentExplorer.js +4 -0
- package/src/features/content-explorer/content-explorer/ContentExplorer.scss +4 -0
- package/src/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js +14 -11
- package/src/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js +4 -1
- package/src/features/content-explorer/content-explorer/__tests__/ContentExplorerBreadcrumbs.test.js +2 -2
- package/src/features/content-explorer/content-explorer-modal/ContentExplorerModal.js +5 -1
- package/src/features/content-explorer/content-explorer-modal/__tests__/__snapshots__/ContentExplorerModal.test.js.snap +1 -0
- package/src/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js +5 -1
- package/src/features/content-explorer/prop-types.js +8 -0
- package/src/features/content-insights/CompactCount.tsx +23 -0
- package/src/features/content-insights/ContentAnalyticsErrorState.scss +17 -0
- package/src/features/content-insights/ContentAnalyticsErrorState.tsx +44 -0
- package/src/features/content-insights/ContentInsightsSummary.scss +12 -0
- package/src/features/content-insights/ContentInsightsSummary.tsx +45 -0
- package/src/features/content-insights/ContentInsightsSummaryGhostState.scss +9 -0
- package/src/features/content-insights/ContentInsightsSummaryGhostState.tsx +18 -0
- package/src/features/content-insights/GraphCardGhostState.scss +18 -0
- package/src/features/content-insights/GraphCardGhostState.tsx +18 -0
- package/src/features/content-insights/GraphCardPreviewsSummary.scss +10 -0
- package/src/features/content-insights/GraphCardPreviewsSummary.tsx +40 -0
- package/src/features/content-insights/GraphGhostState.scss +11 -0
- package/src/features/content-insights/GraphGhostState.tsx +17 -0
- package/src/features/content-insights/HeaderWithCount.scss +10 -0
- package/src/features/content-insights/HeaderWithCount.tsx +24 -0
- package/src/features/content-insights/MetricSummary.scss +14 -0
- package/src/features/content-insights/MetricSummary.tsx +65 -0
- package/src/features/content-insights/OpenContentInsightsButton.tsx +20 -0
- package/src/features/content-insights/TrendPill.scss +33 -0
- package/src/features/content-insights/TrendPill.tsx +70 -0
- package/src/features/content-insights/__tests__/CompactCount.test.tsx +57 -0
- package/src/features/content-insights/__tests__/ContentAnalyticsErrorState.test.tsx +33 -0
- package/src/features/content-insights/__tests__/ContentInsightsSummary.test.tsx +81 -0
- package/src/features/content-insights/__tests__/GraphCardPreviewsSummary.test.tsx +35 -0
- package/src/features/content-insights/__tests__/HeaderWithCount.test.tsx +26 -0
- package/src/features/content-insights/__tests__/MetricSummary.test.tsx +88 -0
- package/src/features/content-insights/_mixins.scss +7 -0
- package/src/features/content-insights/_variables.scss +4 -0
- package/src/features/content-insights/charts/bar/Bar.scss +27 -0
- package/src/features/content-insights/charts/bar/Bar.tsx +48 -0
- package/src/features/content-insights/charts/bar/BarChart.scss +56 -0
- package/src/features/content-insights/charts/bar/BarChart.tsx +78 -0
- package/src/features/content-insights/charts/bar/__tests__/Bar.test.tsx +74 -0
- package/src/features/content-insights/charts/bar/__tests__/BarChart.test.tsx +110 -0
- package/src/features/content-insights/charts/types.ts +3 -0
- package/src/features/content-insights/constants.ts +60 -0
- package/src/features/content-insights/messages.ts +90 -0
- package/src/features/content-insights/numberUtils.ts +9 -0
- package/src/features/content-insights/types.ts +33 -0
- package/src/features/item-details/ItemProperties.scss +1 -1
- package/src/features/shared-link-settings-modal/SharedLinkSettingsModal.js +4 -2
- package/src/features/shared-link-settings-modal/__tests__/SharedLinkSettingsModal.test.js +22 -3
- package/src/features/shared-link-settings-modal/__tests__/__snapshots__/SharedLinkSettingsModal.test.js.snap +2 -1
- package/src/features/unified-share-modal/ContactRestrictionNotice.js +36 -6
- package/src/features/unified-share-modal/EmailForm.js +31 -13
- package/src/features/unified-share-modal/UnifiedShareForm.js +25 -8
- package/src/features/unified-share-modal/UnifiedShareModal.js +1 -0
- package/src/features/unified-share-modal/__tests__/ContactRestrictionNotice.test.js +55 -6
- package/src/features/unified-share-modal/__tests__/EmailForm.test.js +131 -24
- package/src/features/unified-share-modal/__tests__/UnifiedShareForm.test.js +89 -35
- package/src/features/unified-share-modal/__tests__/__snapshots__/UnifiedShareForm.test.js.snap +16 -0
- package/src/features/unified-share-modal/__tests__/__snapshots__/UnifiedShareModal.test.js.snap +17 -0
- package/src/features/unified-share-modal/flowTypes.js +4 -2
- package/src/features/unified-share-modal/messages.js +14 -8
- package/src/features/unified-share-modal/utils/__tests__/hasRestrictedContacts.test.js +24 -10
- package/src/features/unified-share-modal/utils/__tests__/isRestrictedContact.test.js +33 -0
- package/src/features/unified-share-modal/utils/hasRestrictedContacts.js +10 -3
- package/src/features/unified-share-modal/utils/isRestrictedContact.js +21 -0
- package/src/features/virtualized-table/__tests__/__snapshots__/VirtualizedTable.test.js.snap +1 -0
- package/src/icon/fill/Alert16.js.flow +3 -2
- package/src/icon/fill/Alert16.tsx +3 -2
- package/src/icon/fill/AlertBadge16.js.flow +29 -0
- package/src/icon/fill/AlertBadge16.stories.tsx +13 -0
- package/src/icon/fill/AlertBadge16.tsx +27 -0
- package/src/icon/fill/Info16.js.flow +1 -1
- package/src/icon/fill/Info16.tsx +1 -1
- package/src/icon/fill/InfoBadge16.js.flow +28 -0
- package/src/icon/fill/InfoBadge16.stories.tsx +13 -0
- package/src/icon/fill/InfoBadge16.tsx +26 -0
- package/src/icon/fill/UserSettings16.js.flow +38 -0
- package/src/icon/fill/UserSettings16.stories.tsx +13 -0
- package/src/icon/fill/UserSettings16.tsx +36 -0
- package/src/icon/line/AlertBubble16.js.flow +29 -0
- package/src/icon/line/AlertBubble16.stories.tsx +13 -0
- package/src/icon/line/AlertBubble16.tsx +27 -0
- package/src/icon/line/AvatarXBadge16.js.flow +39 -0
- package/src/icon/line/AvatarXBadge16.stories.tsx +13 -0
- package/src/icon/line/AvatarXBadge16.tsx +37 -0
- package/src/icon/line/CoEdit16.js.flow +30 -0
- package/src/icon/line/CoEdit16.stories.tsx +13 -0
- package/src/icon/line/CoEdit16.tsx +28 -0
- package/src/icon/line/Collaborations16.js.flow +30 -0
- package/src/icon/line/Collaborations16.stories.tsx +13 -0
- package/src/icon/line/Collaborations16.tsx +28 -0
- package/src/icon/line/CommentBubble16.js.flow +34 -0
- package/src/icon/line/CommentBubble16.stories.tsx +13 -0
- package/src/icon/line/CommentBubble16.tsx +32 -0
- package/src/styles/constants/_layout.scss +1 -1
- package/src/styles/constants/_media-queries.scss +2 -0
- package/src/styles/variables.js +4 -2
- package/src/styles/variables.json +4 -2
- package/src/styles/variables.ts +3 -1
- package/src/utils/__tests__/fields.test.js +23 -4
- package/src/utils/__tests__/sorter.test.js +3 -3
- package/src/utils/error.js +5 -1
- package/src/utils/fields.js +21 -3
- package/src/utils/sorter.js +2 -2
- package/es/common/types/threadedComments.js +0 -2
- package/es/common/types/threadedComments.js.flow +0 -9
- package/src/common/types/threadedComments.js +0 -9
package/es/api/Feed.js
CHANGED
|
@@ -6,22 +6,10 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
6
6
|
|
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
8
|
|
|
9
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
10
|
-
|
|
11
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
12
|
-
|
|
13
|
-
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
14
|
-
|
|
15
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
16
|
-
|
|
17
9
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
18
10
|
|
|
19
11
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
20
12
|
|
|
21
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
-
|
|
23
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
24
|
-
|
|
25
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26
14
|
|
|
27
15
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -42,8 +30,24 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
42
30
|
|
|
43
31
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
44
32
|
|
|
33
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
34
|
+
|
|
35
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
36
|
+
|
|
37
|
+
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
38
|
+
|
|
39
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
40
|
+
|
|
41
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
42
|
+
|
|
43
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
44
|
+
|
|
45
45
|
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; }
|
|
46
46
|
|
|
47
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
48
|
+
|
|
49
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
50
|
+
|
|
47
51
|
/**
|
|
48
52
|
*
|
|
49
53
|
* @file Helper for activity feed API's
|
|
@@ -51,22 +55,46 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
51
55
|
*/
|
|
52
56
|
import uniqueId from 'lodash/uniqueId';
|
|
53
57
|
import noop from 'lodash/noop';
|
|
54
|
-
import { getBadItemError, getBadUserError, isUserCorrectableError } from '../utils/error';
|
|
58
|
+
import { getBadItemError, getBadUserError, getMissingItemTextOrStatus, isUserCorrectableError } from '../utils/error';
|
|
55
59
|
import commonMessages from '../elements/common/messages';
|
|
56
60
|
import messages from './messages';
|
|
57
61
|
import { sortFeedItems } from '../utils/sorter';
|
|
62
|
+
import { FEED_FILE_VERSIONS_FIELDS_TO_FETCH } from '../utils/fields';
|
|
58
63
|
import Base from './Base';
|
|
59
64
|
import AnnotationsAPI from './Annotations';
|
|
60
65
|
import CommentsAPI from './Comments';
|
|
66
|
+
import ThreadedCommentsAPI from './ThreadedComments';
|
|
61
67
|
import VersionsAPI from './Versions';
|
|
62
68
|
import TasksNewAPI from './tasks/TasksNew';
|
|
63
69
|
import GroupsAPI from './Groups';
|
|
64
70
|
import TaskCollaboratorsAPI from './tasks/TaskCollaborators';
|
|
65
71
|
import TaskLinksAPI from './tasks/TaskLinks';
|
|
66
72
|
import AppActivityAPI from './AppActivity';
|
|
67
|
-
import { ERROR_CODE_CREATE_TASK, ERROR_CODE_UPDATE_TASK, ERROR_CODE_GROUP_EXCEEDS_LIMIT, HTTP_STATUS_CODE_CONFLICT, IS_ERROR_DISPLAYED, TASK_NEW_APPROVED, TASK_NEW_COMPLETED, TASK_NEW_REJECTED, TASK_NEW_NOT_STARTED, TYPED_ID_FEED_PREFIX, TASK_MAX_GROUP_ASSIGNEES } from '../constants';
|
|
73
|
+
import { ERROR_CODE_CREATE_TASK, ERROR_CODE_UPDATE_TASK, ERROR_CODE_GROUP_EXCEEDS_LIMIT, FEED_ITEM_TYPE_ANNOTATION, FEED_ITEM_TYPE_COMMENT, FEED_ITEM_TYPE_TASK, HTTP_STATUS_CODE_CONFLICT, IS_ERROR_DISPLAYED, TASK_NEW_APPROVED, TASK_NEW_COMPLETED, TASK_NEW_REJECTED, TASK_NEW_NOT_STARTED, TYPED_ID_FEED_PREFIX, TASK_MAX_GROUP_ASSIGNEES } from '../constants';
|
|
68
74
|
var TASK_NEW_INITIAL_STATUS = TASK_NEW_NOT_STARTED;
|
|
69
|
-
|
|
75
|
+
|
|
76
|
+
var getItemWithFilteredReplies = function getItemWithFilteredReplies(item, replyId) {
|
|
77
|
+
var _item$replies = item.replies,
|
|
78
|
+
replies = _item$replies === void 0 ? [] : _item$replies,
|
|
79
|
+
rest = _objectWithoutProperties(item, ["replies"]);
|
|
80
|
+
|
|
81
|
+
return _objectSpread({
|
|
82
|
+
replies: replies.filter(function (_ref) {
|
|
83
|
+
var id = _ref.id;
|
|
84
|
+
return id !== replyId;
|
|
85
|
+
})
|
|
86
|
+
}, rest);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var getItemWithPendingReply = function getItemWithPendingReply(item, reply) {
|
|
90
|
+
var _item$replies2 = item.replies,
|
|
91
|
+
replies = _item$replies2 === void 0 ? [] : _item$replies2,
|
|
92
|
+
rest = _objectWithoutProperties(item, ["replies"]);
|
|
93
|
+
|
|
94
|
+
return _objectSpread({
|
|
95
|
+
replies: [].concat(_toConsumableArray(replies), [reply])
|
|
96
|
+
}, rest);
|
|
97
|
+
};
|
|
70
98
|
|
|
71
99
|
var Feed =
|
|
72
100
|
/*#__PURE__*/
|
|
@@ -101,6 +129,10 @@ function (_Base) {
|
|
|
101
129
|
* @property {TaskLinksAPI}
|
|
102
130
|
*/
|
|
103
131
|
|
|
132
|
+
/**
|
|
133
|
+
* @property {ThreadedCommentsAPI}
|
|
134
|
+
*/
|
|
135
|
+
|
|
104
136
|
/**
|
|
105
137
|
* @property {BoxItem}
|
|
106
138
|
*/
|
|
@@ -115,21 +147,33 @@ function (_Base) {
|
|
|
115
147
|
|
|
116
148
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(Feed).call(this, options));
|
|
117
149
|
|
|
118
|
-
_defineProperty(_assertThisInitialized(_this), "updateAnnotation", function (file, annotationId, text, permissions, successCallback, errorCallback) {
|
|
150
|
+
_defineProperty(_assertThisInitialized(_this), "updateAnnotation", function (file, annotationId, text, status, permissions, successCallback, errorCallback) {
|
|
119
151
|
if (!file.id) {
|
|
120
152
|
throw getBadItemError();
|
|
121
153
|
}
|
|
122
154
|
|
|
155
|
+
if (!text && !status) {
|
|
156
|
+
throw getMissingItemTextOrStatus();
|
|
157
|
+
}
|
|
158
|
+
|
|
123
159
|
_this.annotationsAPI = new AnnotationsAPI(_this.options);
|
|
124
160
|
_this.file = file;
|
|
125
161
|
_this.errorCallback = errorCallback;
|
|
162
|
+
var feedItemChanges = {};
|
|
126
163
|
|
|
127
|
-
|
|
128
|
-
message
|
|
164
|
+
if (text) {
|
|
165
|
+
feedItemChanges.message = text;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (status) {
|
|
169
|
+
feedItemChanges.status = status;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
_this.updateFeedItem(_objectSpread({}, feedItemChanges, {
|
|
129
173
|
isPending: true
|
|
130
|
-
}, annotationId);
|
|
174
|
+
}), annotationId);
|
|
131
175
|
|
|
132
|
-
_this.annotationsAPI.updateAnnotation(_this.file.id, annotationId, permissions,
|
|
176
|
+
_this.annotationsAPI.updateAnnotation(_this.file.id, annotationId, permissions, feedItemChanges, function (annotation) {
|
|
133
177
|
_this.updateFeedItem(_objectSpread({}, annotation, {
|
|
134
178
|
isPending: false
|
|
135
179
|
}), annotationId);
|
|
@@ -148,6 +192,18 @@ function (_Base) {
|
|
|
148
192
|
_this.feedErrorCallback(true, e, code);
|
|
149
193
|
});
|
|
150
194
|
|
|
195
|
+
_defineProperty(_assertThisInitialized(_this), "updateReplyErrorCallback", function (error, code, id, parentId) {
|
|
196
|
+
_this.updateReplyItem(_this.createFeedError(messages.commentUpdateErrorMessage), parentId, id);
|
|
197
|
+
|
|
198
|
+
_this.feedErrorCallback(true, error, code);
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
_defineProperty(_assertThisInitialized(_this), "fetchRepliesErrorCallback", function (error, code, id) {
|
|
202
|
+
_this.updateFeedItem(_this.createFeedError(messages.repliesFetchErrorMessage), id);
|
|
203
|
+
|
|
204
|
+
_this.feedErrorCallback(true, error, code);
|
|
205
|
+
});
|
|
206
|
+
|
|
151
207
|
_defineProperty(_assertThisInitialized(_this), "deleteAnnotation", function (file, annotationId, permissions, successCallBack, errorCallback) {
|
|
152
208
|
_this.annotationsAPI = new AnnotationsAPI(_this.options);
|
|
153
209
|
|
|
@@ -244,7 +300,7 @@ function (_Base) {
|
|
|
244
300
|
_defineProperty(_assertThisInitialized(_this), "updateTaskNew",
|
|
245
301
|
/*#__PURE__*/
|
|
246
302
|
function () {
|
|
247
|
-
var
|
|
303
|
+
var _ref2 = _asyncToGenerator(
|
|
248
304
|
/*#__PURE__*/
|
|
249
305
|
regeneratorRuntime.mark(function _callee(file, task) {
|
|
250
306
|
var successCallback,
|
|
@@ -378,7 +434,7 @@ function (_Base) {
|
|
|
378
434
|
}));
|
|
379
435
|
|
|
380
436
|
return function (_x6, _x7) {
|
|
381
|
-
return
|
|
437
|
+
return _ref2.apply(this, arguments);
|
|
382
438
|
};
|
|
383
439
|
}());
|
|
384
440
|
|
|
@@ -407,12 +463,68 @@ function (_Base) {
|
|
|
407
463
|
});
|
|
408
464
|
});
|
|
409
465
|
|
|
466
|
+
_defineProperty(_assertThisInitialized(_this), "deleteThreadedComment", function (file, commentId, permissions, successCallback, errorCallback) {
|
|
467
|
+
if (!file.id) {
|
|
468
|
+
throw getBadItemError();
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
_this.file = file;
|
|
472
|
+
_this.errorCallback = errorCallback;
|
|
473
|
+
|
|
474
|
+
_this.updateFeedItem({
|
|
475
|
+
isPending: true
|
|
476
|
+
}, commentId);
|
|
477
|
+
|
|
478
|
+
_this.threadedCommentsAPI = new ThreadedCommentsAPI(_this.options);
|
|
479
|
+
|
|
480
|
+
_this.threadedCommentsAPI.deleteComment({
|
|
481
|
+
fileId: file.id,
|
|
482
|
+
commentId: commentId,
|
|
483
|
+
permissions: permissions,
|
|
484
|
+
successCallback: _this.deleteFeedItem.bind(_assertThisInitialized(_this), commentId, successCallback),
|
|
485
|
+
errorCallback: function errorCallback(e, code) {
|
|
486
|
+
_this.deleteCommentErrorCallback(e, code, commentId);
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
_defineProperty(_assertThisInitialized(_this), "deleteReply", function (file, id, parentId, permissions, successCallback, errorCallback) {
|
|
492
|
+
if (!file.id) {
|
|
493
|
+
throw getBadItemError();
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
_this.file = file;
|
|
497
|
+
_this.errorCallback = errorCallback;
|
|
498
|
+
|
|
499
|
+
_this.updateReplyItem({
|
|
500
|
+
isPending: true
|
|
501
|
+
}, parentId, id);
|
|
502
|
+
|
|
503
|
+
_this.threadedCommentsAPI = new ThreadedCommentsAPI(_this.options);
|
|
504
|
+
|
|
505
|
+
_this.threadedCommentsAPI.deleteComment({
|
|
506
|
+
fileId: file.id,
|
|
507
|
+
commentId: id,
|
|
508
|
+
permissions: permissions,
|
|
509
|
+
successCallback: _this.deleteReplyItem.bind(_assertThisInitialized(_this), id, parentId, successCallback),
|
|
510
|
+
errorCallback: function errorCallback(e, code) {
|
|
511
|
+
_this.deleteReplyErrorCallback(e, code, id, parentId);
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
});
|
|
515
|
+
|
|
410
516
|
_defineProperty(_assertThisInitialized(_this), "deleteCommentErrorCallback", function (e, code, commentId) {
|
|
411
517
|
_this.updateFeedItem(_this.createFeedError(messages.commentDeleteErrorMessage), commentId);
|
|
412
518
|
|
|
413
519
|
_this.feedErrorCallback(true, e, code);
|
|
414
520
|
});
|
|
415
521
|
|
|
522
|
+
_defineProperty(_assertThisInitialized(_this), "deleteReplyErrorCallback", function (error, code, id, parentId) {
|
|
523
|
+
_this.updateReplyItem(_this.createFeedError(messages.commentDeleteErrorMessage), parentId, id);
|
|
524
|
+
|
|
525
|
+
_this.feedErrorCallback(true, error, code);
|
|
526
|
+
});
|
|
527
|
+
|
|
416
528
|
_defineProperty(_assertThisInitialized(_this), "createTaskNew", function (file, currentUser, message, assignees, taskType, dueAt, completionRule, _successCallback3, errorCallback) {
|
|
417
529
|
if (!file.id) {
|
|
418
530
|
throw getBadItemError();
|
|
@@ -442,7 +554,7 @@ function (_Base) {
|
|
|
442
554
|
due_at: dueAtString,
|
|
443
555
|
id: uuid,
|
|
444
556
|
description: message,
|
|
445
|
-
type:
|
|
557
|
+
type: FEED_ITEM_TYPE_TASK,
|
|
446
558
|
assigned_to: {
|
|
447
559
|
entries: assignees.map(function (assignee) {
|
|
448
560
|
return {
|
|
@@ -602,6 +714,35 @@ function (_Base) {
|
|
|
602
714
|
}
|
|
603
715
|
});
|
|
604
716
|
|
|
717
|
+
_defineProperty(_assertThisInitialized(_this), "deleteReplyItem", function (id, parentId) {
|
|
718
|
+
var successCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
|
|
719
|
+
var cachedItems = _this.getCachedItems(_this.file.id) || {
|
|
720
|
+
items: [],
|
|
721
|
+
errors: []
|
|
722
|
+
};
|
|
723
|
+
var feedItems = cachedItems.items.map(function (item) {
|
|
724
|
+
if (item.id !== parentId) {
|
|
725
|
+
return item;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
if (item.type === FEED_ITEM_TYPE_ANNOTATION) {
|
|
729
|
+
return getItemWithFilteredReplies(item, id);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
if (item.type === FEED_ITEM_TYPE_COMMENT) {
|
|
733
|
+
return getItemWithFilteredReplies(item, id);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
return item;
|
|
737
|
+
});
|
|
738
|
+
|
|
739
|
+
_this.setCachedItems(_this.file.id, feedItems);
|
|
740
|
+
|
|
741
|
+
if (!_this.isDestroyed()) {
|
|
742
|
+
successCallback(id, parentId);
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
|
|
605
746
|
_defineProperty(_assertThisInitialized(_this), "feedErrorCallback", function () {
|
|
606
747
|
var hasError = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
607
748
|
var e = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -646,6 +787,45 @@ function (_Base) {
|
|
|
646
787
|
return pendingFeedItem;
|
|
647
788
|
});
|
|
648
789
|
|
|
790
|
+
_defineProperty(_assertThisInitialized(_this), "addPendingReply", function (parentId, currentUser, commentBase) {
|
|
791
|
+
if (!_this.file.id) {
|
|
792
|
+
throw getBadItemError();
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
if (!currentUser) {
|
|
796
|
+
throw getBadUserError();
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
var date = new Date().toISOString();
|
|
800
|
+
|
|
801
|
+
var pendingReply = _objectSpread({
|
|
802
|
+
created_at: date,
|
|
803
|
+
created_by: currentUser,
|
|
804
|
+
modified_at: date,
|
|
805
|
+
isPending: true
|
|
806
|
+
}, commentBase);
|
|
807
|
+
|
|
808
|
+
var cachedItems = _this.getCachedItems(_this.file.id);
|
|
809
|
+
|
|
810
|
+
if (cachedItems) {
|
|
811
|
+
var updatedFeedItems = cachedItems.items.map(function (item) {
|
|
812
|
+
if (item.id === parentId && item.type === FEED_ITEM_TYPE_COMMENT) {
|
|
813
|
+
return getItemWithPendingReply(item, pendingReply);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
if (item.id === parentId && item.type === FEED_ITEM_TYPE_ANNOTATION) {
|
|
817
|
+
return getItemWithPendingReply(item, pendingReply);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
return item;
|
|
821
|
+
});
|
|
822
|
+
|
|
823
|
+
_this.setCachedItems(_this.file.id, updatedFeedItems);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
return pendingReply;
|
|
827
|
+
});
|
|
828
|
+
|
|
649
829
|
_defineProperty(_assertThisInitialized(_this), "createCommentSuccessCallback", function (commentData, id, successCallback) {
|
|
650
830
|
var _commentData$message = commentData.message,
|
|
651
831
|
message = _commentData$message === void 0 ? '' : _commentData$message,
|
|
@@ -671,6 +851,24 @@ function (_Base) {
|
|
|
671
851
|
_this.feedErrorCallback(false, e, code);
|
|
672
852
|
});
|
|
673
853
|
|
|
854
|
+
_defineProperty(_assertThisInitialized(_this), "createReplySuccessCallback", function (commentData, parentId, id, successCallback) {
|
|
855
|
+
_this.updateReplyItem(_objectSpread({}, commentData, {
|
|
856
|
+
isPending: false
|
|
857
|
+
}), parentId, id);
|
|
858
|
+
|
|
859
|
+
if (!_this.isDestroyed()) {
|
|
860
|
+
successCallback(commentData);
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
|
|
864
|
+
_defineProperty(_assertThisInitialized(_this), "createReplyErrorCallback", function (error, code, parentId, id) {
|
|
865
|
+
var errorMessage = error.status === HTTP_STATUS_CODE_CONFLICT ? messages.commentCreateConflictMessage : messages.commentCreateErrorMessage;
|
|
866
|
+
|
|
867
|
+
_this.updateReplyItem(_this.createFeedError(errorMessage), parentId, id);
|
|
868
|
+
|
|
869
|
+
_this.feedErrorCallback(false, error, code);
|
|
870
|
+
});
|
|
871
|
+
|
|
674
872
|
_defineProperty(_assertThisInitialized(_this), "updateFeedItem", function (updates, id) {
|
|
675
873
|
if (!_this.file.id) {
|
|
676
874
|
throw getBadItemError();
|
|
@@ -695,12 +893,52 @@ function (_Base) {
|
|
|
695
893
|
return null;
|
|
696
894
|
});
|
|
697
895
|
|
|
896
|
+
_defineProperty(_assertThisInitialized(_this), "updateReplyItem", function (replyUpdates, parentId, id) {
|
|
897
|
+
if (!_this.file.id) {
|
|
898
|
+
throw getBadItemError();
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
var getItemWithUpdatedReply = function getItemWithUpdatedReply(item, replyId, updates) {
|
|
902
|
+
var updatedItem = _objectSpread({}, item);
|
|
903
|
+
|
|
904
|
+
if (updatedItem.replies) {
|
|
905
|
+
updatedItem.replies = updatedItem.replies.map(function (reply) {
|
|
906
|
+
if (reply.id === replyId) {
|
|
907
|
+
return _objectSpread({}, reply, {}, updates);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
return reply;
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
return updatedItem;
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
var cachedItems = _this.getCachedItems(_this.file.id);
|
|
918
|
+
|
|
919
|
+
if (cachedItems) {
|
|
920
|
+
var updatedFeedItems = cachedItems.items.map(function (item) {
|
|
921
|
+
if (item.id === parentId && item.type === FEED_ITEM_TYPE_COMMENT) {
|
|
922
|
+
return getItemWithUpdatedReply(item, id, replyUpdates);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
if (item.id === parentId && item.type === FEED_ITEM_TYPE_ANNOTATION) {
|
|
926
|
+
return getItemWithUpdatedReply(item, id, replyUpdates);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
return item;
|
|
930
|
+
});
|
|
931
|
+
|
|
932
|
+
_this.setCachedItems(_this.file.id, updatedFeedItems);
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
|
|
698
936
|
_defineProperty(_assertThisInitialized(_this), "createComment", function (file, currentUser, text, hasMention, _successCallback4, errorCallback) {
|
|
699
937
|
var uuid = uniqueId('comment_');
|
|
700
938
|
var commentData = {
|
|
701
939
|
id: uuid,
|
|
702
940
|
tagged_message: text,
|
|
703
|
-
type:
|
|
941
|
+
type: FEED_ITEM_TYPE_COMMENT
|
|
704
942
|
};
|
|
705
943
|
|
|
706
944
|
if (!file.id) {
|
|
@@ -734,7 +972,37 @@ function (_Base) {
|
|
|
734
972
|
}));
|
|
735
973
|
});
|
|
736
974
|
|
|
737
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
975
|
+
_defineProperty(_assertThisInitialized(_this), "createThreadedComment", function (file, currentUser, text, _successCallback5, errorCallback) {
|
|
976
|
+
if (!file.id) {
|
|
977
|
+
throw getBadItemError();
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
var uuid = uniqueId('comment_');
|
|
981
|
+
var commentData = {
|
|
982
|
+
id: uuid,
|
|
983
|
+
tagged_message: text,
|
|
984
|
+
type: FEED_ITEM_TYPE_COMMENT
|
|
985
|
+
};
|
|
986
|
+
_this.file = file;
|
|
987
|
+
_this.errorCallback = errorCallback;
|
|
988
|
+
|
|
989
|
+
_this.addPendingItem(_this.file.id, currentUser, commentData);
|
|
990
|
+
|
|
991
|
+
_this.threadedCommentsAPI = new ThreadedCommentsAPI(_this.options);
|
|
992
|
+
|
|
993
|
+
_this.threadedCommentsAPI.createComment({
|
|
994
|
+
file: file,
|
|
995
|
+
message: text,
|
|
996
|
+
successCallback: function successCallback(comment) {
|
|
997
|
+
_this.createCommentSuccessCallback(comment, uuid, _successCallback5);
|
|
998
|
+
},
|
|
999
|
+
errorCallback: function errorCallback(e, code) {
|
|
1000
|
+
_this.createCommentErrorCallback(e, code, uuid);
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
});
|
|
1004
|
+
|
|
1005
|
+
_defineProperty(_assertThisInitialized(_this), "updateComment", function (file, commentId, text, hasMention, permissions, _successCallback6, errorCallback) {
|
|
738
1006
|
var commentData = {
|
|
739
1007
|
tagged_message: text
|
|
740
1008
|
};
|
|
@@ -774,7 +1042,7 @@ function (_Base) {
|
|
|
774
1042
|
}), commentId);
|
|
775
1043
|
|
|
776
1044
|
if (!_this.isDestroyed()) {
|
|
777
|
-
|
|
1045
|
+
_successCallback6(comment);
|
|
778
1046
|
}
|
|
779
1047
|
},
|
|
780
1048
|
errorCallback: function errorCallback(e, code) {
|
|
@@ -783,6 +1051,91 @@ function (_Base) {
|
|
|
783
1051
|
}));
|
|
784
1052
|
});
|
|
785
1053
|
|
|
1054
|
+
_defineProperty(_assertThisInitialized(_this), "updateThreadedComment", function (file, commentId, text, status, permissions, _successCallback7, errorCallback) {
|
|
1055
|
+
if (!file.id) {
|
|
1056
|
+
throw getBadItemError();
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
if (!text && !status) {
|
|
1060
|
+
throw getMissingItemTextOrStatus();
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
var commentData = {};
|
|
1064
|
+
|
|
1065
|
+
if (text) {
|
|
1066
|
+
commentData.tagged_message = text;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
if (status) {
|
|
1070
|
+
commentData.status = status;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
_this.file = file;
|
|
1074
|
+
_this.errorCallback = errorCallback;
|
|
1075
|
+
|
|
1076
|
+
_this.updateFeedItem(_objectSpread({}, commentData, {
|
|
1077
|
+
isPending: true
|
|
1078
|
+
}), commentId);
|
|
1079
|
+
|
|
1080
|
+
_this.threadedCommentsAPI = new ThreadedCommentsAPI(_this.options);
|
|
1081
|
+
|
|
1082
|
+
_this.threadedCommentsAPI.updateComment({
|
|
1083
|
+
fileId: file.id,
|
|
1084
|
+
commentId: commentId,
|
|
1085
|
+
permissions: permissions,
|
|
1086
|
+
message: text,
|
|
1087
|
+
status: status,
|
|
1088
|
+
successCallback: function successCallback(comment) {
|
|
1089
|
+
_this.updateFeedItem(_objectSpread({}, comment, {
|
|
1090
|
+
isPending: false
|
|
1091
|
+
}), commentId);
|
|
1092
|
+
|
|
1093
|
+
if (!_this.isDestroyed()) {
|
|
1094
|
+
_successCallback7(comment);
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
errorCallback: function errorCallback(e, code) {
|
|
1098
|
+
_this.updateCommentErrorCallback(e, code, commentId);
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
_defineProperty(_assertThisInitialized(_this), "updateReply", function (file, id, parentId, text, permissions, _successCallback8, errorCallback) {
|
|
1104
|
+
if (!file.id) {
|
|
1105
|
+
throw getBadItemError();
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
_this.file = file;
|
|
1109
|
+
_this.errorCallback = errorCallback;
|
|
1110
|
+
|
|
1111
|
+
_this.updateReplyItem({
|
|
1112
|
+
tagged_message: text,
|
|
1113
|
+
isPending: true
|
|
1114
|
+
}, parentId, id);
|
|
1115
|
+
|
|
1116
|
+
_this.threadedCommentsAPI = new ThreadedCommentsAPI(_this.options);
|
|
1117
|
+
|
|
1118
|
+
_this.threadedCommentsAPI.updateComment({
|
|
1119
|
+
fileId: file.id,
|
|
1120
|
+
commentId: id,
|
|
1121
|
+
permissions: permissions,
|
|
1122
|
+
message: text,
|
|
1123
|
+
undefined: undefined,
|
|
1124
|
+
successCallback: function successCallback(comment) {
|
|
1125
|
+
_this.updateReplyItem(_objectSpread({}, comment, {
|
|
1126
|
+
isPending: false
|
|
1127
|
+
}), parentId, id);
|
|
1128
|
+
|
|
1129
|
+
if (!_this.isDestroyed()) {
|
|
1130
|
+
_successCallback8(comment);
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
errorCallback: function errorCallback(error, code) {
|
|
1134
|
+
_this.updateReplyErrorCallback(error, code, id, parentId);
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1137
|
+
});
|
|
1138
|
+
|
|
786
1139
|
_defineProperty(_assertThisInitialized(_this), "deleteAppActivity", function (file, appActivityId, successCallback, errorCallback) {
|
|
787
1140
|
var id = file.id;
|
|
788
1141
|
|
|
@@ -842,7 +1195,7 @@ function (_Base) {
|
|
|
842
1195
|
var newAnnotation = _objectSpread({}, annotation, {
|
|
843
1196
|
created_by: currentUser,
|
|
844
1197
|
id: id,
|
|
845
|
-
type:
|
|
1198
|
+
type: FEED_ITEM_TYPE_ANNOTATION
|
|
846
1199
|
});
|
|
847
1200
|
|
|
848
1201
|
this.addPendingItem(this.file.id, currentUser, newAnnotation);
|
|
@@ -923,15 +1276,17 @@ function (_Base) {
|
|
|
923
1276
|
}(function (file, shouldRefreshCache, successCallback, errorCallback, onError) {
|
|
924
1277
|
var _this2 = this;
|
|
925
1278
|
|
|
926
|
-
var
|
|
927
|
-
|
|
928
|
-
shouldShowAnnotations =
|
|
929
|
-
|
|
930
|
-
shouldShowAppActivity =
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1279
|
+
var _ref3 = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {},
|
|
1280
|
+
_ref3$shouldShowAnnot = _ref3.shouldShowAnnotations,
|
|
1281
|
+
shouldShowAnnotations = _ref3$shouldShowAnnot === void 0 ? false : _ref3$shouldShowAnnot,
|
|
1282
|
+
_ref3$shouldShowAppAc = _ref3.shouldShowAppActivity,
|
|
1283
|
+
shouldShowAppActivity = _ref3$shouldShowAppAc === void 0 ? false : _ref3$shouldShowAppAc,
|
|
1284
|
+
_ref3$shouldShowRepli = _ref3.shouldShowReplies,
|
|
1285
|
+
shouldShowReplies = _ref3$shouldShowRepli === void 0 ? false : _ref3$shouldShowRepli,
|
|
1286
|
+
_ref3$shouldShowTasks = _ref3.shouldShowTasks,
|
|
1287
|
+
shouldShowTasks = _ref3$shouldShowTasks === void 0 ? true : _ref3$shouldShowTasks,
|
|
1288
|
+
_ref3$shouldShowVersi = _ref3.shouldShowVersions,
|
|
1289
|
+
shouldShowVersions = _ref3$shouldShowVersi === void 0 ? true : _ref3$shouldShowVersi;
|
|
935
1290
|
|
|
936
1291
|
var id = file.id,
|
|
937
1292
|
_file$permissions = file.permissions,
|
|
@@ -956,17 +1311,17 @@ function (_Base) {
|
|
|
956
1311
|
this.file = file;
|
|
957
1312
|
this.errors = [];
|
|
958
1313
|
this.errorCallback = onError;
|
|
959
|
-
var annotationsPromise = shouldShowAnnotations ? this.fetchAnnotations(permissions) : Promise.resolve();
|
|
1314
|
+
var annotationsPromise = shouldShowAnnotations ? this.fetchAnnotations(permissions, shouldShowReplies) : Promise.resolve();
|
|
960
1315
|
var versionsPromise = shouldShowVersions ? this.fetchVersions() : Promise.resolve();
|
|
961
1316
|
var currentVersionPromise = shouldShowVersions ? this.fetchCurrentVersion() : Promise.resolve();
|
|
962
|
-
var commentsPromise = this.fetchComments(permissions);
|
|
1317
|
+
var commentsPromise = shouldShowReplies ? this.fetchThreadedComments(permissions) : this.fetchComments(permissions);
|
|
963
1318
|
var tasksPromise = shouldShowTasks ? this.fetchTasksNew() : Promise.resolve();
|
|
964
1319
|
var appActivityPromise = shouldShowAppActivity ? this.fetchAppActivity(permissions) : Promise.resolve();
|
|
965
|
-
Promise.all([versionsPromise, currentVersionPromise, commentsPromise, tasksPromise, appActivityPromise, annotationsPromise]).then(function (
|
|
966
|
-
var
|
|
967
|
-
versions =
|
|
968
|
-
currentVersion =
|
|
969
|
-
feedItems =
|
|
1320
|
+
Promise.all([versionsPromise, currentVersionPromise, commentsPromise, tasksPromise, appActivityPromise, annotationsPromise]).then(function (_ref4) {
|
|
1321
|
+
var _ref5 = _toArray(_ref4),
|
|
1322
|
+
versions = _ref5[0],
|
|
1323
|
+
currentVersion = _ref5[1],
|
|
1324
|
+
feedItems = _ref5.slice(2);
|
|
970
1325
|
|
|
971
1326
|
var versionsWithCurrent = currentVersion ? _this2.versionsAPI.addCurrentVersion(currentVersion, versions, _this2.file) : undefined;
|
|
972
1327
|
var sortedFeedItems = sortFeedItems.apply(void 0, [versionsWithCurrent].concat(_toConsumableArray(feedItems)));
|
|
@@ -984,12 +1339,12 @@ function (_Base) {
|
|
|
984
1339
|
})
|
|
985
1340
|
}, {
|
|
986
1341
|
key: "fetchAnnotations",
|
|
987
|
-
value: function fetchAnnotations(permissions) {
|
|
1342
|
+
value: function fetchAnnotations(permissions, shouldFetchReplies) {
|
|
988
1343
|
var _this3 = this;
|
|
989
1344
|
|
|
990
1345
|
this.annotationsAPI = new AnnotationsAPI(this.options);
|
|
991
1346
|
return new Promise(function (resolve) {
|
|
992
|
-
_this3.annotationsAPI.getAnnotations(_this3.file.id, undefined, permissions, resolve, _this3.fetchFeedItemErrorCallback.bind(_this3, resolve));
|
|
1347
|
+
_this3.annotationsAPI.getAnnotations(_this3.file.id, undefined, permissions, resolve, _this3.fetchFeedItemErrorCallback.bind(_this3, resolve), undefined, undefined, shouldFetchReplies);
|
|
993
1348
|
});
|
|
994
1349
|
}
|
|
995
1350
|
/**
|
|
@@ -1009,6 +1364,84 @@ function (_Base) {
|
|
|
1009
1364
|
_this4.commentsAPI.getComments(_this4.file.id, permissions, resolve, _this4.fetchFeedItemErrorCallback.bind(_this4, resolve));
|
|
1010
1365
|
});
|
|
1011
1366
|
}
|
|
1367
|
+
/**
|
|
1368
|
+
* Fetches the comments with replies for a file
|
|
1369
|
+
*
|
|
1370
|
+
* @param {Object} permissions - the file permissions
|
|
1371
|
+
* @return {Promise} - the file comments
|
|
1372
|
+
*/
|
|
1373
|
+
|
|
1374
|
+
}, {
|
|
1375
|
+
key: "fetchThreadedComments",
|
|
1376
|
+
value: function fetchThreadedComments(permissions) {
|
|
1377
|
+
var _this5 = this;
|
|
1378
|
+
|
|
1379
|
+
this.threadedCommentsAPI = new ThreadedCommentsAPI(this.options);
|
|
1380
|
+
return new Promise(function (resolve) {
|
|
1381
|
+
_this5.threadedCommentsAPI.getComments({
|
|
1382
|
+
errorCallback: _this5.fetchFeedItemErrorCallback.bind(_this5, resolve),
|
|
1383
|
+
fileId: _this5.file.id,
|
|
1384
|
+
permissions: permissions,
|
|
1385
|
+
successCallback: resolve
|
|
1386
|
+
});
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* Fetches replies (comments) of a comment or annotation
|
|
1391
|
+
*
|
|
1392
|
+
* @param {BoxItem} file - The file to which the comment or annotation belongs to
|
|
1393
|
+
* @param {string} commentFeedItemId - ID of the comment or annotation
|
|
1394
|
+
* @param {CommentFeedItemType} commentFeedItemType - Type of the comment or annotation
|
|
1395
|
+
* @param {Function} successCallback
|
|
1396
|
+
* @param {ErrorCallback} errorCallback
|
|
1397
|
+
* @return {void}
|
|
1398
|
+
*/
|
|
1399
|
+
|
|
1400
|
+
}, {
|
|
1401
|
+
key: "fetchReplies",
|
|
1402
|
+
value: function fetchReplies(file, commentFeedItemId, commentFeedItemType, successCallback, errorCallback) {
|
|
1403
|
+
var _this6 = this;
|
|
1404
|
+
|
|
1405
|
+
var id = file.id,
|
|
1406
|
+
permissions = file.permissions;
|
|
1407
|
+
|
|
1408
|
+
if (!id || !permissions) {
|
|
1409
|
+
throw getBadItemError();
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
this.file = file;
|
|
1413
|
+
this.errorCallback = errorCallback;
|
|
1414
|
+
this.updateFeedItem({
|
|
1415
|
+
isRepliesLoading: true
|
|
1416
|
+
}, commentFeedItemId);
|
|
1417
|
+
|
|
1418
|
+
var successCallbackFn = function successCallbackFn(comments) {
|
|
1419
|
+
_this6.updateFeedItem({
|
|
1420
|
+
isRepliesLoading: false,
|
|
1421
|
+
replies: comments.entries
|
|
1422
|
+
}, commentFeedItemId);
|
|
1423
|
+
|
|
1424
|
+
successCallback(comments.entries);
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
var errorCallbackFn = function errorCallbackFn(error, code) {
|
|
1428
|
+
_this6.fetchRepliesErrorCallback(error, code, commentFeedItemId);
|
|
1429
|
+
};
|
|
1430
|
+
|
|
1431
|
+
if (commentFeedItemType === FEED_ITEM_TYPE_ANNOTATION) {
|
|
1432
|
+
this.annotationsAPI = new AnnotationsAPI(this.options);
|
|
1433
|
+
this.annotationsAPI.getAnnotationReplies(file.id, commentFeedItemId, permissions, successCallbackFn, errorCallbackFn);
|
|
1434
|
+
} else if (commentFeedItemType === FEED_ITEM_TYPE_COMMENT) {
|
|
1435
|
+
this.threadedCommentsAPI = new ThreadedCommentsAPI(this.options);
|
|
1436
|
+
this.threadedCommentsAPI.getCommentReplies({
|
|
1437
|
+
fileId: file.id,
|
|
1438
|
+
commentId: commentFeedItemId,
|
|
1439
|
+
permissions: permissions,
|
|
1440
|
+
successCallback: successCallbackFn,
|
|
1441
|
+
errorCallback: errorCallbackFn
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1012
1445
|
/**
|
|
1013
1446
|
* Fetches the versions for a file
|
|
1014
1447
|
*
|
|
@@ -1018,11 +1451,11 @@ function (_Base) {
|
|
|
1018
1451
|
}, {
|
|
1019
1452
|
key: "fetchVersions",
|
|
1020
1453
|
value: function fetchVersions() {
|
|
1021
|
-
var
|
|
1454
|
+
var _this7 = this;
|
|
1022
1455
|
|
|
1023
1456
|
this.versionsAPI = new VersionsAPI(this.options);
|
|
1024
1457
|
return new Promise(function (resolve) {
|
|
1025
|
-
|
|
1458
|
+
_this7.versionsAPI.getVersions(_this7.file.id, resolve, _this7.fetchFeedItemErrorCallback.bind(_this7, resolve), undefined, undefined, FEED_FILE_VERSIONS_FIELDS_TO_FETCH);
|
|
1026
1459
|
});
|
|
1027
1460
|
}
|
|
1028
1461
|
/**
|
|
@@ -1034,14 +1467,14 @@ function (_Base) {
|
|
|
1034
1467
|
}, {
|
|
1035
1468
|
key: "fetchCurrentVersion",
|
|
1036
1469
|
value: function fetchCurrentVersion() {
|
|
1037
|
-
var
|
|
1470
|
+
var _this8 = this;
|
|
1038
1471
|
|
|
1039
1472
|
this.versionsAPI = new VersionsAPI(this.options);
|
|
1040
1473
|
return new Promise(function (resolve) {
|
|
1041
|
-
var
|
|
1042
|
-
file_version =
|
|
1474
|
+
var _this8$file$file_vers = _this8.file.file_version,
|
|
1475
|
+
file_version = _this8$file$file_vers === void 0 ? {} : _this8$file$file_vers;
|
|
1043
1476
|
|
|
1044
|
-
|
|
1477
|
+
_this8.versionsAPI.getVersion(_this8.file.id, file_version.id, resolve, _this8.fetchFeedItemErrorCallback.bind(_this8, resolve));
|
|
1045
1478
|
});
|
|
1046
1479
|
}
|
|
1047
1480
|
/**
|
|
@@ -1053,17 +1486,17 @@ function (_Base) {
|
|
|
1053
1486
|
}, {
|
|
1054
1487
|
key: "fetchTasksNew",
|
|
1055
1488
|
value: function fetchTasksNew() {
|
|
1056
|
-
var
|
|
1489
|
+
var _this9 = this;
|
|
1057
1490
|
|
|
1058
1491
|
this.tasksNewAPI = new TasksNewAPI(this.options);
|
|
1059
1492
|
return new Promise(function (resolve) {
|
|
1060
|
-
|
|
1493
|
+
_this9.tasksNewAPI.getTasksForFile({
|
|
1061
1494
|
file: {
|
|
1062
|
-
id:
|
|
1495
|
+
id: _this9.file.id
|
|
1063
1496
|
},
|
|
1064
1497
|
successCallback: resolve,
|
|
1065
1498
|
errorCallback: function errorCallback(err, code) {
|
|
1066
|
-
return
|
|
1499
|
+
return _this9.fetchFeedItemErrorCallback(resolve, err, code);
|
|
1067
1500
|
}
|
|
1068
1501
|
});
|
|
1069
1502
|
});
|
|
@@ -1111,7 +1544,7 @@ function (_Base) {
|
|
|
1111
1544
|
* @return {Promise<TaskAssignment>}
|
|
1112
1545
|
*/
|
|
1113
1546
|
value: function createTaskCollaboratorsforGroup(file, task, assignee) {
|
|
1114
|
-
var
|
|
1547
|
+
var _this10 = this;
|
|
1115
1548
|
|
|
1116
1549
|
if (!file.id) {
|
|
1117
1550
|
throw getBadItemError();
|
|
@@ -1119,9 +1552,9 @@ function (_Base) {
|
|
|
1119
1552
|
|
|
1120
1553
|
this.file = file;
|
|
1121
1554
|
return new Promise(function (resolve, reject) {
|
|
1122
|
-
var taskCollaboratorsAPI = new TaskCollaboratorsAPI(
|
|
1555
|
+
var taskCollaboratorsAPI = new TaskCollaboratorsAPI(_this10.options);
|
|
1123
1556
|
|
|
1124
|
-
|
|
1557
|
+
_this10.taskCollaboratorsAPI.push(taskCollaboratorsAPI);
|
|
1125
1558
|
|
|
1126
1559
|
taskCollaboratorsAPI.createTaskCollaboratorsforGroup({
|
|
1127
1560
|
file: file,
|
|
@@ -1147,7 +1580,7 @@ function (_Base) {
|
|
|
1147
1580
|
}, {
|
|
1148
1581
|
key: "createTaskCollaborator",
|
|
1149
1582
|
value: function createTaskCollaborator(file, task, assignee) {
|
|
1150
|
-
var
|
|
1583
|
+
var _this11 = this;
|
|
1151
1584
|
|
|
1152
1585
|
if (!file.id) {
|
|
1153
1586
|
throw getBadItemError();
|
|
@@ -1155,9 +1588,9 @@ function (_Base) {
|
|
|
1155
1588
|
|
|
1156
1589
|
this.file = file;
|
|
1157
1590
|
return new Promise(function (resolve, reject) {
|
|
1158
|
-
var taskCollaboratorsAPI = new TaskCollaboratorsAPI(
|
|
1591
|
+
var taskCollaboratorsAPI = new TaskCollaboratorsAPI(_this11.options);
|
|
1159
1592
|
|
|
1160
|
-
|
|
1593
|
+
_this11.taskCollaboratorsAPI.push(taskCollaboratorsAPI);
|
|
1161
1594
|
|
|
1162
1595
|
taskCollaboratorsAPI.createTaskCollaborator({
|
|
1163
1596
|
file: file,
|
|
@@ -1183,7 +1616,7 @@ function (_Base) {
|
|
|
1183
1616
|
}, {
|
|
1184
1617
|
key: "deleteTaskCollaborator",
|
|
1185
1618
|
value: function deleteTaskCollaborator(file, task, assignee) {
|
|
1186
|
-
var
|
|
1619
|
+
var _this12 = this;
|
|
1187
1620
|
|
|
1188
1621
|
if (!file.id) {
|
|
1189
1622
|
throw getBadItemError();
|
|
@@ -1191,9 +1624,9 @@ function (_Base) {
|
|
|
1191
1624
|
|
|
1192
1625
|
this.file.id = file.id;
|
|
1193
1626
|
return new Promise(function (resolve, reject) {
|
|
1194
|
-
var taskCollaboratorsAPI = new TaskCollaboratorsAPI(
|
|
1627
|
+
var taskCollaboratorsAPI = new TaskCollaboratorsAPI(_this12.options);
|
|
1195
1628
|
|
|
1196
|
-
|
|
1629
|
+
_this12.taskCollaboratorsAPI.push(taskCollaboratorsAPI);
|
|
1197
1630
|
|
|
1198
1631
|
taskCollaboratorsAPI.deleteTaskCollaborator({
|
|
1199
1632
|
file: file,
|
|
@@ -1220,7 +1653,7 @@ function (_Base) {
|
|
|
1220
1653
|
}, {
|
|
1221
1654
|
key: "createTaskLink",
|
|
1222
1655
|
value: function createTaskLink(file, task) {
|
|
1223
|
-
var
|
|
1656
|
+
var _this13 = this;
|
|
1224
1657
|
|
|
1225
1658
|
if (!file.id) {
|
|
1226
1659
|
throw getBadItemError();
|
|
@@ -1228,9 +1661,9 @@ function (_Base) {
|
|
|
1228
1661
|
|
|
1229
1662
|
this.file = file;
|
|
1230
1663
|
return new Promise(function (resolve, reject) {
|
|
1231
|
-
var taskLinksAPI = new TaskLinksAPI(
|
|
1664
|
+
var taskLinksAPI = new TaskLinksAPI(_this13.options);
|
|
1232
1665
|
|
|
1233
|
-
|
|
1666
|
+
_this13.taskLinksAPI.push(taskLinksAPI);
|
|
1234
1667
|
|
|
1235
1668
|
taskLinksAPI.createTaskLink({
|
|
1236
1669
|
file: file,
|
|
@@ -1277,6 +1710,77 @@ function (_Base) {
|
|
|
1277
1710
|
* @return {void}
|
|
1278
1711
|
*/
|
|
1279
1712
|
|
|
1713
|
+
}, {
|
|
1714
|
+
key: "createReply",
|
|
1715
|
+
|
|
1716
|
+
/**
|
|
1717
|
+
* Create a reply to annotation or comment, and make a pending item to be replaced once the API is successful.
|
|
1718
|
+
*
|
|
1719
|
+
* @param {BoxItem} file - The file to which the task is assigned
|
|
1720
|
+
* @param {Object} currentUser - the user who performed the action
|
|
1721
|
+
* @param {string} parentId - id of the parent item
|
|
1722
|
+
* @param {CommentFeedItemType} parentType - type of the parent item
|
|
1723
|
+
* @param {string} text - the comment text
|
|
1724
|
+
* @param {Function} successCallback - the success callback
|
|
1725
|
+
* @param {Function} errorCallback - the error callback
|
|
1726
|
+
* @return {void}
|
|
1727
|
+
*/
|
|
1728
|
+
value: function createReply(file, currentUser, parentId, parentType, text, successCallback, errorCallback) {
|
|
1729
|
+
var _this14 = this;
|
|
1730
|
+
|
|
1731
|
+
var id = file.id,
|
|
1732
|
+
permissions = file.permissions;
|
|
1733
|
+
|
|
1734
|
+
if (!id || !permissions) {
|
|
1735
|
+
throw getBadItemError();
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
var uuid = uniqueId('comment_');
|
|
1739
|
+
var commentData = {
|
|
1740
|
+
id: uuid,
|
|
1741
|
+
tagged_message: text,
|
|
1742
|
+
type: FEED_ITEM_TYPE_COMMENT
|
|
1743
|
+
};
|
|
1744
|
+
this.file = file;
|
|
1745
|
+
this.errorCallback = errorCallback;
|
|
1746
|
+
this.addPendingReply(parentId, currentUser, commentData);
|
|
1747
|
+
|
|
1748
|
+
var successCallbackFn = function successCallbackFn(comment) {
|
|
1749
|
+
_this14.createReplySuccessCallback(comment, parentId, uuid, successCallback);
|
|
1750
|
+
};
|
|
1751
|
+
|
|
1752
|
+
var errorCallbackFn = function errorCallbackFn(error, code) {
|
|
1753
|
+
_this14.createReplyErrorCallback(error, code, parentId, uuid);
|
|
1754
|
+
};
|
|
1755
|
+
|
|
1756
|
+
if (parentType === FEED_ITEM_TYPE_ANNOTATION) {
|
|
1757
|
+
this.annotationsAPI = new AnnotationsAPI(this.options);
|
|
1758
|
+
this.annotationsAPI.createAnnotationReply(file.id, parentId, permissions, text, successCallbackFn, errorCallbackFn);
|
|
1759
|
+
} else if (parentType === FEED_ITEM_TYPE_COMMENT) {
|
|
1760
|
+
this.threadedCommentsAPI = new ThreadedCommentsAPI(this.options);
|
|
1761
|
+
this.threadedCommentsAPI.createCommentReply({
|
|
1762
|
+
fileId: file.id,
|
|
1763
|
+
commentId: parentId,
|
|
1764
|
+
permissions: permissions,
|
|
1765
|
+
message: text,
|
|
1766
|
+
successCallback: successCallbackFn,
|
|
1767
|
+
errorCallback: errorCallbackFn
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
/**
|
|
1772
|
+
* Update a comment
|
|
1773
|
+
*
|
|
1774
|
+
* @param {BoxItem} file - The file to which the task is assigned
|
|
1775
|
+
* @param {string} commentId - Comment ID
|
|
1776
|
+
* @param {string} text - the comment text
|
|
1777
|
+
* @param {boolean} hasMention - true if there is an @mention in the text
|
|
1778
|
+
* @param {BoxCommentPermission} permissions - Permissions to attach to the app activity items
|
|
1779
|
+
* @param {Function} successCallback - the success callback
|
|
1780
|
+
* @param {Function} errorCallback - the error callback
|
|
1781
|
+
* @return {void}
|
|
1782
|
+
*/
|
|
1783
|
+
|
|
1280
1784
|
}, {
|
|
1281
1785
|
key: "destroyTaskCollaborators",
|
|
1282
1786
|
value: function destroyTaskCollaborators() {
|
|
@@ -1307,11 +1811,11 @@ function (_Base) {
|
|
|
1307
1811
|
}, {
|
|
1308
1812
|
key: "fetchAppActivity",
|
|
1309
1813
|
value: function fetchAppActivity(permissions) {
|
|
1310
|
-
var
|
|
1814
|
+
var _this15 = this;
|
|
1311
1815
|
|
|
1312
1816
|
this.appActivityAPI = new AppActivityAPI(this.options);
|
|
1313
1817
|
return new Promise(function (resolve) {
|
|
1314
|
-
|
|
1818
|
+
_this15.appActivityAPI.getAppActivity(_this15.file.id, permissions, resolve, _this15.fetchFeedItemErrorCallback.bind(_this15, resolve));
|
|
1315
1819
|
});
|
|
1316
1820
|
}
|
|
1317
1821
|
/**
|
|
@@ -1345,6 +1849,11 @@ function (_Base) {
|
|
|
1345
1849
|
delete this.commentsAPI;
|
|
1346
1850
|
}
|
|
1347
1851
|
|
|
1852
|
+
if (this.threadedCommentsAPI) {
|
|
1853
|
+
this.threadedCommentsAPI.destroy();
|
|
1854
|
+
delete this.threadedCommentsAPI;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1348
1857
|
if (this.versionsAPI) {
|
|
1349
1858
|
this.versionsAPI.destroy();
|
|
1350
1859
|
delete this.versionsAPI;
|