box-ui-elements 22.1.0-beta.61 → 22.1.0-beta.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/devin_lifeguard.yaml +54 -0
  2. package/es/features/content-explorer/content-explorer/ContentExplorer.js +11 -4
  3. package/es/features/content-explorer/content-explorer/ContentExplorer.js.flow +8 -1
  4. package/es/features/content-explorer/content-explorer/ContentExplorer.js.map +1 -1
  5. package/es/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js +2 -1
  6. package/es/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js.flow +2 -1
  7. package/es/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js.map +1 -1
  8. package/es/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js +3 -0
  9. package/es/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js.flow +3 -0
  10. package/es/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js.map +1 -1
  11. package/es/features/content-explorer/content-explorer-modal/ContentExplorerModal.js.flow +2 -0
  12. package/es/features/content-explorer/content-explorer-modal/ContentExplorerModal.js.map +1 -1
  13. package/es/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js +5 -1
  14. package/es/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js.flow +4 -0
  15. package/es/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js.map +1 -1
  16. package/package.json +1 -1
  17. package/src/features/content-explorer/content-explorer/ContentExplorer.js +8 -1
  18. package/src/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js +2 -1
  19. package/src/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js +3 -0
  20. package/src/features/content-explorer/content-explorer/__tests__/ContentExplorer.test.js +27 -0
  21. package/src/features/content-explorer/content-explorer/__tests__/ContentExplorerBreadcrumbs.test.js +23 -15
  22. package/src/features/content-explorer/content-explorer/__tests__/ContentExplorerHeaderActions.test.js +8 -8
  23. package/src/features/content-explorer/content-explorer-modal/ContentExplorerModal.js +2 -0
  24. package/src/features/content-explorer/content-explorer-modal/__tests__/ContentExplorerModal.test.js +15 -7
  25. package/src/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js +4 -0
  26. package/src/features/content-explorer/content-explorer-modal-container/__tests__/ContentExplorerModalContainer.test.js +7 -1
@@ -0,0 +1,54 @@
1
+ rules:
2
+ - name: localize-messages
3
+ trigger: >-
4
+ when adding user-facing text or aria-label attributes, ensure the
5
+ strings are localized
6
+
7
+ for example: aria-label="Expand" should instead use formatMessage(...)
8
+ solution: >-
9
+ wrap any user-visible string in formatMessage from useIntl so that it can
10
+ be properly localized
11
+
12
+ e.g. aria-label={formatMessage(messages.someLabel)}
13
+ - name: use-intl-hook
14
+ trigger: >-
15
+ when a component imports or uses injectIntl from 'react-intl' instead of
16
+ using useIntl
17
+ solution: >-
18
+ remove injectIntl usage and refactor the component to use useIntl
19
+ directly. for example:
20
+
21
+ import { useIntl } from 'react-intl';
22
+
23
+ const { formatMessage } = useIntl();
24
+ - name: use-blueprint-tokens
25
+ trigger: >-
26
+ when adding or modifying styles, if numeric px values are used, prefer
27
+ blueprint tokens
28
+ solution: |-
29
+ avoid hard-coded px. use blueprint tokens (e.g. $space-2, $space-3) or
30
+ existing scss variables for consistent theming
31
+ - name: testing-literal-strings
32
+ trigger: >-
33
+ when writing tests for localized text, if the code checks against a
34
+ variable reference or message ID, the test won't fail if the translation
35
+ changes.
36
+ solution: >-
37
+ use the literal translated string in the test assertion so that the test
38
+ accurately fails when the copy changes, for example getByRole('button', {
39
+ name: 'Choose' }) instead of referencing a variable or ID.
40
+ - name: match-peer-and-dev-deps
41
+ trigger: >-
42
+ mismatch in version constraints for peerDependencies and devDependencies
43
+ for the same library
44
+ solution: >-
45
+ ensure that the peerDependencies version matches devDependencies version
46
+ to avoid unexpected version conflicts
47
+ - name: avoid-data-testid
48
+ trigger: >-
49
+ when writing tests, if there's a role or accessible label or text
50
+ available, data-testid should be avoided to ensure we test the actual
51
+ accessibility.
52
+ solution: >-
53
+ use queries like getByRole, getByLabelText, or getByText with the actual
54
+ user-facing string or aria-label. Only use test IDs as a last resort.
@@ -1,4 +1,4 @@
1
- const _excluded = ["actionButtonsProps", "additionalColumns", "controlledSelectedItems", "isNoSelectionAllowed", "breadcrumbProps", "cancelButtonProps", "chooseButtonProps", "chooseButtonText", "className", "contentExplorerMode", "customInput", "hasFolderTreeBreadcrumbs", "headerActionsAccessory", "onChooseItems", "onMoveItem", "onCopyItem", "onCancelButtonClick", "onCreateNewFolderButtonClick", "onSelectedClick", "onViewSelectedClick", "showCreateNewFolderButton", "isChooseButtonLoading", "isCopyButtonLoading", "isCreateNewFolderAllowed", "isMoveButtonLoading", "isResponsive", "isSelectAllAllowed", "items", "numItemsPerPage", "numTotalItems", "onLoadMoreItems", "includeSubfoldersProps", "itemIconRenderer", "itemNameLinkRenderer", "itemButtonRenderer", "itemRowHeight", "itemRowRenderer", "listHeaderHeight", "listHeaderRenderer", "listWidth", "listHeight", "searchInputProps", "infoNoticeText"];
1
+ const _excluded = ["actionButtonsProps", "additionalColumns", "controlledSelectedItems", "isNoSelectionAllowed", "breadcrumbIcon", "breadcrumbProps", "cancelButtonProps", "chooseButtonProps", "chooseButtonText", "className", "contentExplorerMode", "customInput", "hasFolderTreeBreadcrumbs", "headerActionsAccessory", "onChooseItems", "onMoveItem", "onCopyItem", "onCancelButtonClick", "onCreateNewFolderButtonClick", "onSelectedClick", "onViewSelectedClick", "showCreateNewFolderButton", "isChooseButtonLoading", "isCopyButtonLoading", "isCreateNewFolderAllowed", "isMoveButtonLoading", "isResponsive", "isSelectAllAllowed", "items", "numItemsPerPage", "numTotalItems", "onLoadMoreItems", "includeSubfoldersProps", "itemIconRenderer", "itemNameLinkRenderer", "itemButtonRenderer", "itemRowHeight", "itemRowRenderer", "listHeaderHeight", "listHeaderRenderer", "listWidth", "listHeight", "searchInputProps", "infoNoticeText", "noItemsRenderer"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
4
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
@@ -332,6 +332,7 @@ class ContentExplorer extends Component {
332
332
  additionalColumns,
333
333
  controlledSelectedItems,
334
334
  isNoSelectionAllowed = false,
335
+ breadcrumbIcon,
335
336
  breadcrumbProps,
336
337
  cancelButtonProps,
337
338
  chooseButtonProps,
@@ -370,7 +371,8 @@ class ContentExplorer extends Component {
370
371
  listWidth,
371
372
  listHeight,
372
373
  searchInputProps,
373
- infoNoticeText
374
+ infoNoticeText,
375
+ noItemsRenderer
374
376
  } = _this$props,
375
377
  rest = _objectWithoutProperties(_this$props, _excluded);
376
378
  const {
@@ -418,6 +420,7 @@ class ContentExplorer extends Component {
418
420
  }, contentExplorerProps), infoNoticeText && /*#__PURE__*/React.createElement(ContentExplorerInfoNotice, {
419
421
  infoNoticeText: infoNoticeText
420
422
  }), /*#__PURE__*/React.createElement(ContentExplorerHeaderActions, {
423
+ breadcrumbIcon: breadcrumbIcon,
421
424
  breadcrumbProps: breadcrumbProps,
422
425
  contentExplorerMode: contentExplorerMode,
423
426
  customInput: customInput,
@@ -451,7 +454,7 @@ class ContentExplorer extends Component {
451
454
  itemNameLinkRenderer: itemNameLinkRenderer,
452
455
  items: items,
453
456
  itemRowRenderer: itemRowRenderer,
454
- noItemsRenderer: this.renderItemListEmptyState,
457
+ noItemsRenderer: noItemsRenderer || this.renderItemListEmptyState,
455
458
  numItemsPerPage: numItemsPerPage,
456
459
  numTotalItems: numTotalItems,
457
460
  onItemClick: this.handleItemClick,
@@ -500,6 +503,8 @@ _defineProperty(ContentExplorer, "propTypes", {
500
503
  controlledSelectedItems: PropTypes.object,
501
504
  /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */
502
505
  isNoSelectionAllowed: PropTypes.bool,
506
+ /** Custom icon for the breadcrumb. Overrides the default icon */
507
+ breadcrumbIcon: PropTypes.element,
503
508
  /** Props for breadcrumbs */
504
509
  breadcrumbProps: PropTypes.object,
505
510
  /** Props for the cancel button */
@@ -629,7 +634,9 @@ _defineProperty(ContentExplorer, "propTypes", {
629
634
  /** Props for the search input */
630
635
  searchInputProps: PropTypes.object,
631
636
  /** Text for the informational notice, defaults to empty string, which makes notice not visible */
632
- infoNoticeText: PropTypes.string
637
+ infoNoticeText: PropTypes.string,
638
+ /** Used to render the no items state. Overrides the default no items state. */
639
+ noItemsRenderer: PropTypes.func
633
640
  });
634
641
  _defineProperty(ContentExplorer, "defaultProps", {
635
642
  actionButtonsProps: {},
@@ -31,6 +31,8 @@ class ContentExplorer extends Component {
31
31
  controlledSelectedItems: PropTypes.object,
32
32
  /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */
33
33
  isNoSelectionAllowed: PropTypes.bool,
34
+ /** Custom icon for the breadcrumb. Overrides the default icon */
35
+ breadcrumbIcon: PropTypes.element,
34
36
  /** Props for breadcrumbs */
35
37
  breadcrumbProps: PropTypes.object,
36
38
  /** Props for the cancel button */
@@ -161,6 +163,8 @@ class ContentExplorer extends Component {
161
163
  searchInputProps: PropTypes.object,
162
164
  /** Text for the informational notice, defaults to empty string, which makes notice not visible */
163
165
  infoNoticeText: PropTypes.string,
166
+ /** Used to render the no items state. Overrides the default no items state. */
167
+ noItemsRenderer: PropTypes.func,
164
168
  };
165
169
 
166
170
  static defaultProps = {
@@ -461,6 +465,7 @@ class ContentExplorer extends Component {
461
465
  additionalColumns,
462
466
  controlledSelectedItems,
463
467
  isNoSelectionAllowed = false,
468
+ breadcrumbIcon,
464
469
  breadcrumbProps,
465
470
  cancelButtonProps,
466
471
  chooseButtonProps,
@@ -500,6 +505,7 @@ class ContentExplorer extends Component {
500
505
  listHeight,
501
506
  searchInputProps,
502
507
  infoNoticeText,
508
+ noItemsRenderer,
503
509
  ...rest
504
510
  } = this.props;
505
511
  const { isInSearchMode, foldersPath, isSelectAllChecked } = this.state;
@@ -558,6 +564,7 @@ class ContentExplorer extends Component {
558
564
  >
559
565
  {infoNoticeText && <ContentExplorerInfoNotice infoNoticeText={infoNoticeText} />}
560
566
  <ContentExplorerHeaderActions
567
+ breadcrumbIcon={breadcrumbIcon}
561
568
  breadcrumbProps={breadcrumbProps}
562
569
  contentExplorerMode={contentExplorerMode}
563
570
  customInput={customInput}
@@ -600,7 +607,7 @@ class ContentExplorer extends Component {
600
607
  itemNameLinkRenderer={itemNameLinkRenderer}
601
608
  items={items}
602
609
  itemRowRenderer={itemRowRenderer}
603
- noItemsRenderer={this.renderItemListEmptyState}
610
+ noItemsRenderer={noItemsRenderer || this.renderItemListEmptyState}
604
611
  numItemsPerPage={numItemsPerPage}
605
612
  numTotalItems={numTotalItems}
606
613
  onItemClick={this.handleItemClick}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentExplorer.js","names":["PropTypes","React","Component","classNames","omit","ContentExplorerHeaderActions","ContentExplorerEmptyState","ContentExplorerActionButtons","ContentExplorerSelectAll","ContentExplorerIncludeSubfolders","ContentExplorerInfoNotice","ItemList","ContentExplorerModePropType","FoldersPathPropType","ItemsPropType","ContentExplorerModes","TYPE_FOLDER","ContentExplorer","constructor","props","_defineProperty","_objectSpread","state","selectedItems","controlledSelectedItems","items","length","every","item","id","isLoading","node","className","limit","nodeOfInterest","counter","parentNode","includes","contentExplorerMode","MULTI_SELECT","event","isInside","domNode","contains","target","shouldDeselectItems","deselectItems","enteredFolder","onEnterFolder","onFoldersPathUpdate","foldersPath","folderIndex","findIndex","folder","newFoldersPath","slice","concat","newState","setState","searchQuery","onSearchSubmit","isInSearchMode","folderBeforeSearch","onExitSearch","index","onSelectItem","onSelectedItemsUpdate","isDisabled","isActionDisabled","stopPropagation","newSelectedItems","toggleSelectedItem","getAllSelectedItems","onChooseItems","type","enterFolder","preventDefault","result","forEach","isLoadingItems","isSelectAllChecked","unselectAll","selectAll","isViewingSearchResults","createElement","isSearch","initialSelectedItems","initialFoldersPath","componentDidMount","document","addEventListener","handleDocumentClick","componentDidUpdate","prevInitialFoldersPath","isSelectAllAllowed","handleFoldersPathUpdated","areAllItemsSelected","componentWillUnmount","removeEventListener","getCurrentFolder","render","_this$props","actionButtonsProps","additionalColumns","isNoSelectionAllowed","breadcrumbProps","cancelButtonProps","chooseButtonProps","chooseButtonText","customInput","hasFolderTreeBreadcrumbs","headerActionsAccessory","onMoveItem","onCopyItem","onCancelButtonClick","onCreateNewFolderButtonClick","onSelectedClick","onViewSelectedClick","showCreateNewFolderButton","isChooseButtonLoading","isCopyButtonLoading","isCreateNewFolderAllowed","isMoveButtonLoading","isResponsive","numItemsPerPage","numTotalItems","onLoadMoreItems","includeSubfoldersProps","itemIconRenderer","itemNameLinkRenderer","itemButtonRenderer","itemRowHeight","itemRowRenderer","listHeaderHeight","listHeaderRenderer","listWidth","listHeight","searchInputProps","infoNoticeText","rest","_objectWithoutProperties","_excluded","allSelectedItems","currentFolder","contentExplorerProps","canIncludeSubfolders","hasSubheader","selectedItemsIds","Object","keys","areActionButtonsDisabled","isFirstSelectedItemDisabled","SELECT_FILE","_extends","onClick","handleContentExplorerClick","ref","onFoldersPathUpdated","handleExitSearch","handleSearchSubmit","handleSelectAllClick","isLabelHidden","headerHeight","headerRenderer","height","noItemsRenderer","renderItemListEmptyState","onItemClick","handleItemClick","onItemDoubleClick","handleItemDoubleClick","onItemNameClick","handleItemNameClick","rowHeight","width","areButtonsDisabled","onCancelClick","onChooseClick","onCopyClick","onMoveClick","object","arrayOf","element","bool","string","isRequired","func","number"],"sources":["../../../../src/features/content-explorer/content-explorer/ContentExplorer.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport classNames from 'classnames';\nimport omit from 'lodash/omit';\n\nimport ContentExplorerHeaderActions from './ContentExplorerHeaderActions';\nimport ContentExplorerEmptyState from './ContentExplorerEmptyState';\nimport ContentExplorerActionButtons from './ContentExplorerActionButtons';\nimport ContentExplorerSelectAll from './ContentExplorerSelectAll';\nimport ContentExplorerIncludeSubfolders from './ContentExplorerIncludeSubfolders';\nimport ContentExplorerInfoNotice from './ContentExplorerInfoNotice';\n\nimport ItemList from '../item-list';\nimport { ContentExplorerModePropType, FoldersPathPropType, ItemsPropType } from '../prop-types';\nimport ContentExplorerModes from '../modes';\n\nimport { TYPE_FOLDER } from '../../../constants';\n\nimport './ContentExplorer.scss';\n\nclass ContentExplorer extends Component {\n static propTypes = {\n /** Props for the action buttons container */\n actionButtonsProps: PropTypes.object,\n /**\n * Extra columns displayed in the folders table after folder name column\n * Each column has to be a Column element\n */\n additionalColumns: PropTypes.arrayOf(PropTypes.element),\n /** Items that will show up as selected */\n controlledSelectedItems: PropTypes.object,\n /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */\n isNoSelectionAllowed: PropTypes.bool,\n /** Props for breadcrumbs */\n breadcrumbProps: PropTypes.object,\n /** Props for the cancel button */\n cancelButtonProps: PropTypes.object,\n /** Props for the choose button */\n chooseButtonProps: PropTypes.object,\n /** Custom text for the choose button */\n chooseButtonText: PropTypes.node,\n /** Adds class name. */\n className: PropTypes.string,\n /** Configures the content explorer based on the user's intended action (ex. select file or move/copy) */\n contentExplorerMode: ContentExplorerModePropType.isRequired,\n /** Props that contains the custom search input. Is rendered in header actions */\n customInput: PropTypes.func,\n /** Whether the user can see the breadcrumbs represented with the folder tree button */\n hasFolderTreeBreadcrumbs: PropTypes.bool,\n /** Any extra items in the header to the right of the search input (and new folder button) */\n headerActionsAccessory: PropTypes.node,\n /** Props for the include subfolders toggle */\n includeSubfoldersProps: PropTypes.object,\n /** Initial path of folders. The last folder in the array is the current folder. */\n initialFoldersPath: FoldersPathPropType.isRequired,\n /** Initial items that will show up as selected */\n initialSelectedItems: PropTypes.object,\n /** Whether to use the responsive version */\n isResponsive: PropTypes.bool,\n /**\n * Called when the current folder changes\n *\n * @param {Object} enteredFolder\n * @param {Array} newFoldersPath\n */\n onEnterFolder: PropTypes.func.isRequired,\n /** Called when the folders path is updated\n *\n * @param {Array} newFoldersPath\n */\n onFoldersPathUpdate: PropTypes.func,\n /** Called whenever the selected items list changes\n *\n * @param {Object} selectedItems\n */\n onSelectedItemsUpdate: PropTypes.func,\n /**\n * Called when an item is selected\n *\n * @param {Object} selectedItem\n * @param {number} selectedItemIndex\n */\n onSelectItem: PropTypes.func,\n /**\n * Called when an item is chosen\n *\n * @param {Object[]} chosenItems\n */\n onChooseItems: PropTypes.func,\n /** Called when selected button is clicked */\n onSelectedClick: PropTypes.func,\n /** Called when the number of items selected text is clicked */\n onViewSelectedClick: PropTypes.func,\n /**\n * Called when a destination folder has been selected for moving an item to\n *\n * @param {Object} destFolder destination folder\n */\n onMoveItem: PropTypes.func,\n /**\n * Called when a destination folder has been selected for copying an item to\n *\n * @param {Object} destFolder destination folder\n */\n onCopyItem: PropTypes.func,\n /** Called when cancel button is clicked */\n onCancelButtonClick: PropTypes.func,\n /** Called when new folder button is clicked */\n onCreateNewFolderButtonClick: PropTypes.func,\n /** Whether the new folder button should be shown */\n showCreateNewFolderButton: PropTypes.bool,\n /** Whether the choose button should be shown with a loading indicator */\n isChooseButtonLoading: PropTypes.bool,\n /** Whether the copy button should be shown with a loading indicator */\n isCopyButtonLoading: PropTypes.bool,\n /** Whether the user has permission to create a new folder */\n isCreateNewFolderAllowed: PropTypes.bool,\n /** Whether the user can see select all checkbox */\n isSelectAllAllowed: PropTypes.bool,\n /** Whether the move button should be shown with a loading indicator */\n isMoveButtonLoading: PropTypes.bool,\n /**\n * Called when a search query is submitted.\n *\n * @param {string} searchQuery\n */\n onSearchSubmit: PropTypes.func.isRequired,\n /**\n * Called when search mode is exited. An updated items list should now be passed in to display the user's file tree.\n *\n * @param {Object} folderBeforeSearch the previous folder object before entering search mode\n */\n onExitSearch: PropTypes.func.isRequired,\n /** List of items to display */\n items: ItemsPropType.isRequired,\n /** Number of items to load per page as the user scrolls */\n numItemsPerPage: PropTypes.number,\n /** Total number of items across all pages */\n numTotalItems: PropTypes.number,\n /** Called to load more items */\n onLoadMoreItems: PropTypes.func,\n /** Used to render item icons in the list. Overrides the default icons. */\n itemIconRenderer: PropTypes.func,\n /** Used to render item name links in the list. Overrides the default links. */\n itemNameLinkRenderer: PropTypes.func,\n /** Used to render item buttons in the list. Overrides the default buttons. */\n itemButtonRenderer: PropTypes.func,\n /** Height of an item row */\n itemRowHeight: PropTypes.number,\n /** Used to render the row element for items on the list. Allows row customizations such as adding tooltips, etc. */\n itemRowRenderer: PropTypes.func,\n /** Height of the item list header, defaults to 0, which makes header not visible */\n listHeaderHeight: PropTypes.number,\n /** Used to render the header row on the item list */\n listHeaderRenderer: PropTypes.func,\n /** Width of the item list */\n listWidth: PropTypes.number.isRequired,\n /** Height of the item list */\n listHeight: PropTypes.number.isRequired,\n /** Props for the search input */\n searchInputProps: PropTypes.object,\n /** Text for the informational notice, defaults to empty string, which makes notice not visible */\n infoNoticeText: PropTypes.string,\n };\n\n static defaultProps = {\n actionButtonsProps: {},\n cancelButtonProps: {},\n chooseButtonProps: {},\n className: '',\n searchInputProps: {},\n };\n\n constructor(props) {\n super(props);\n this.state = {\n selectedItems: props.initialSelectedItems || {},\n foldersPath: props.initialFoldersPath,\n isInSearchMode: false,\n isSelectAllChecked: false,\n };\n }\n\n componentDidMount() {\n document.addEventListener('click', this.handleDocumentClick, true);\n }\n\n componentDidUpdate({ initialFoldersPath: prevInitialFoldersPath }) {\n const { initialFoldersPath, isSelectAllAllowed } = this.props;\n const { isSelectAllChecked } = this.state;\n\n if (prevInitialFoldersPath !== initialFoldersPath) {\n this.handleFoldersPathUpdated(initialFoldersPath);\n }\n if (!this.isLoadingItems() && isSelectAllAllowed) {\n const areAllItemsSelected = this.areAllItemsSelected();\n if (areAllItemsSelected !== isSelectAllChecked) {\n this.setState({ isSelectAllChecked: areAllItemsSelected });\n }\n }\n }\n\n componentWillUnmount() {\n document.removeEventListener('click', this.handleDocumentClick, true);\n }\n\n getAllSelectedItems = () => {\n return { ...this.state.selectedItems, ...this.props.controlledSelectedItems };\n };\n\n areAllItemsSelected = () => {\n const { items } = this.props;\n const { selectedItems } = this.state;\n\n return items.length > 0 && items.every(item => selectedItems[item.id]);\n };\n\n isLoadingItems = () => {\n return this.props?.items?.[0]?.isLoading;\n };\n\n getCurrentFolder() {\n const { foldersPath } = this.state;\n return foldersPath[foldersPath.length - 1];\n }\n\n /**\n * Traverse the hirerachy up to the limit to see if any of the parent has the className\n */\n doAncestersContainClassname = (node, className, limit) => {\n let nodeOfInterest = node;\n let counter = 0;\n while (nodeOfInterest.parentNode && counter < limit) {\n // Done traversing (Document node does not have classnames)\n if (!nodeOfInterest.parentNode.className) {\n break;\n }\n\n if (nodeOfInterest.parentNode.className.includes(className)) {\n return true;\n }\n\n nodeOfInterest = nodeOfInterest.parentNode;\n counter += 1;\n }\n\n return false;\n };\n\n shouldDeselectItems = () => {\n const { contentExplorerMode } = this.props;\n\n return (\n // always deselect when not in multi select mode\n contentExplorerMode !== ContentExplorerModes.MULTI_SELECT\n );\n };\n\n handleDocumentClick = event => {\n const isInside = (this.domNode && this.domNode.contains(event.target)) || this.domNode === event.target;\n\n if (!isInside && this.shouldDeselectItems()) {\n this.deselectItems();\n }\n };\n\n handleContentExplorerClick = () => {\n if (this.shouldDeselectItems()) {\n this.deselectItems();\n }\n };\n\n deselectItems() {\n const { onSelectedItemsUpdate } = this.props;\n this.setState({\n selectedItems: {},\n });\n if (onSelectedItemsUpdate) {\n onSelectedItemsUpdate({});\n }\n }\n\n enterFolder = enteredFolder => {\n const { contentExplorerMode, onEnterFolder, onFoldersPathUpdate } = this.props;\n const { foldersPath } = this.state;\n\n const folderIndex = foldersPath.findIndex(folder => folder.id === enteredFolder.id);\n let newFoldersPath = foldersPath.slice();\n\n if (folderIndex === -1) {\n // Append folder to the path if it's not already in the folders path\n newFoldersPath = newFoldersPath.concat([\n {\n ...enteredFolder,\n },\n ]);\n } else {\n // Otherwise, remove all folders that came after the entered folder\n newFoldersPath = newFoldersPath.slice(0, folderIndex + 1);\n }\n\n const newState = { foldersPath: newFoldersPath };\n if (contentExplorerMode !== ContentExplorerModes.MULTI_SELECT) {\n newState.selectedItems = {};\n }\n\n this.setState(newState);\n if (onFoldersPathUpdate) {\n onFoldersPathUpdate(newFoldersPath);\n }\n\n onEnterFolder(enteredFolder, newFoldersPath);\n };\n\n handleFoldersPathUpdated = newFoldersPath => {\n const { onFoldersPathUpdate } = this.props;\n\n this.setState({\n foldersPath: newFoldersPath,\n });\n if (onFoldersPathUpdate) {\n onFoldersPathUpdate(newFoldersPath);\n }\n };\n\n handleSearchSubmit = searchQuery => {\n const { onSearchSubmit } = this.props;\n\n this.setState({ isInSearchMode: true });\n onSearchSubmit(searchQuery);\n };\n\n handleExitSearch = folderBeforeSearch => {\n const { onExitSearch } = this.props;\n\n this.setState({ isInSearchMode: false });\n onExitSearch(folderBeforeSearch);\n };\n\n handleItemClick = ({ event, index }) => {\n const { contentExplorerMode, items, onSelectItem, onSelectedItemsUpdate } = this.props;\n const item = items[index];\n\n if (item.isDisabled || item.isLoading || item.isActionDisabled) {\n return;\n }\n\n // Prevent the event from bubbling up (so our content explorer click handler doesn't fire)\n event.stopPropagation();\n\n let newSelectedItems = {};\n if (contentExplorerMode === ContentExplorerModes.MULTI_SELECT) {\n newSelectedItems = this.toggleSelectedItem(this.getAllSelectedItems(), item);\n } else {\n newSelectedItems[item.id] = item;\n }\n\n this.setState({ selectedItems: newSelectedItems });\n if (onSelectedItemsUpdate) {\n onSelectedItemsUpdate(newSelectedItems);\n }\n\n if (onSelectItem) {\n onSelectItem(item, index);\n }\n };\n\n handleItemDoubleClick = ({ index }) => {\n const { items, onChooseItems } = this.props;\n const item = items[index];\n\n if (item.isDisabled || item.isLoading) {\n return;\n }\n\n if (item.type === TYPE_FOLDER) {\n this.enterFolder(item);\n } else if (!item.isActionDisabled) {\n onChooseItems([item]);\n }\n };\n\n handleItemNameClick = (event, index) => {\n const { items } = this.props;\n const item = items[index];\n\n if (item.isDisabled || item.isLoading) {\n return;\n }\n\n if (item.type !== TYPE_FOLDER) {\n return;\n }\n\n // Prevent the event from bubbling (so our row click handler doesn't fire)\n event.preventDefault();\n event.stopPropagation();\n\n this.enterFolder(item);\n };\n\n toggleSelectedItem = (selectedItems, item) => {\n const result = { ...selectedItems };\n if (result[item.id]) {\n delete result[item.id];\n } else {\n result[item.id] = item;\n }\n\n return result;\n };\n\n selectAll = () => {\n const { items } = this.props;\n const { selectedItems } = this.state;\n const result = { ...selectedItems };\n items.forEach(item => {\n if (!result[item.id]) {\n result[item.id] = item;\n }\n });\n return result;\n };\n\n unselectAll = () => {\n const { items } = this.props;\n const { selectedItems } = this.state;\n const result = { ...selectedItems };\n items.forEach(item => {\n if (result[item.id]) {\n delete result[item.id];\n }\n });\n return result;\n };\n\n handleSelectAllClick = async () => {\n const { onSelectedItemsUpdate } = this.props;\n if (this.isLoadingItems()) {\n return;\n }\n const { isSelectAllChecked } = this.state;\n const newSelectedItems = isSelectAllChecked ? this.unselectAll() : this.selectAll();\n\n this.setState({ selectedItems: newSelectedItems, isSelectAllChecked: !isSelectAllChecked });\n if (onSelectedItemsUpdate) {\n onSelectedItemsUpdate(newSelectedItems);\n }\n };\n\n renderItemListEmptyState = () => {\n const { foldersPath, isInSearchMode } = this.state;\n const isViewingSearchResults = isInSearchMode && foldersPath.length === 1;\n\n return <ContentExplorerEmptyState isSearch={isViewingSearchResults} />;\n };\n\n render() {\n const {\n actionButtonsProps,\n additionalColumns,\n controlledSelectedItems,\n isNoSelectionAllowed = false,\n breadcrumbProps,\n cancelButtonProps,\n chooseButtonProps,\n chooseButtonText,\n className,\n contentExplorerMode,\n customInput,\n hasFolderTreeBreadcrumbs,\n headerActionsAccessory,\n onChooseItems,\n onMoveItem,\n onCopyItem,\n onCancelButtonClick,\n onCreateNewFolderButtonClick,\n onSelectedClick,\n onViewSelectedClick,\n showCreateNewFolderButton,\n isChooseButtonLoading,\n isCopyButtonLoading,\n isCreateNewFolderAllowed,\n isMoveButtonLoading,\n isResponsive = false,\n isSelectAllAllowed,\n items,\n numItemsPerPage,\n numTotalItems,\n onLoadMoreItems,\n includeSubfoldersProps,\n itemIconRenderer,\n itemNameLinkRenderer,\n itemButtonRenderer,\n itemRowHeight,\n itemRowRenderer,\n listHeaderHeight,\n listHeaderRenderer,\n listWidth,\n listHeight,\n searchInputProps,\n infoNoticeText,\n ...rest\n } = this.props;\n const { isInSearchMode, foldersPath, isSelectAllChecked } = this.state;\n const allSelectedItems = this.getAllSelectedItems();\n\n const isViewingSearchResults = isInSearchMode && foldersPath.length === 1;\n const currentFolder = this.getCurrentFolder();\n const contentExplorerProps = omit(rest, [\n 'initialFoldersPath',\n 'onEnterFolder',\n 'onSelectItem',\n 'onSearchSubmit',\n 'onExitSearch',\n 'initialSelectedItems',\n 'onFoldersPathUpdate',\n 'onSelectedItemsUpdate',\n ]);\n const canIncludeSubfolders = !!includeSubfoldersProps;\n const hasSubheader = canIncludeSubfolders || isSelectAllAllowed;\n\n const selectedItemsIds = Object.keys(allSelectedItems);\n let areActionButtonsDisabled;\n // NOTE: it almost feels like this whole section should be inside the\n // ContentExplorerActionButtons instead. There's a lot of implicit knowledge\n // of what the action buttons are and what they should be doing.\n const isFirstSelectedItemDisabled = allSelectedItems[selectedItemsIds[0]]?.isActionDisabled;\n if (contentExplorerMode === ContentExplorerModes.MULTI_SELECT) {\n // NOTE: only expecting to have 1 (choose) button so as long as something\n // is selected and that item's isActionDisabled is false, we enable the action button\n areActionButtonsDisabled =\n (selectedItemsIds.length === 0 && !isNoSelectionAllowed) ||\n (selectedItemsIds.length === 1 && isFirstSelectedItemDisabled);\n } else if (isViewingSearchResults || contentExplorerMode === ContentExplorerModes.SELECT_FILE) {\n // Buttons are only enabled when an item is selected\n // When viewing search results, there is no \"current folder\"\n // When selecting a file, the file can only selected from the list\n areActionButtonsDisabled = selectedItemsIds.length === 0 || isFirstSelectedItemDisabled;\n } else {\n // Buttons are enabled using the selected item or the current folder if no item is selected\n areActionButtonsDisabled =\n selectedItemsIds.length > 0 ? isFirstSelectedItemDisabled : currentFolder.isActionDisabled;\n }\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events\n <div\n className={classNames('content-explorer', className, {\n 'bdl-ContentExplorer--responsive': isResponsive,\n })}\n data-testid=\"content-explorer\"\n onClick={this.handleContentExplorerClick}\n ref={ref => {\n this.domNode = ref;\n }}\n {...contentExplorerProps}\n >\n {infoNoticeText && <ContentExplorerInfoNotice infoNoticeText={infoNoticeText} />}\n <ContentExplorerHeaderActions\n breadcrumbProps={breadcrumbProps}\n contentExplorerMode={contentExplorerMode}\n customInput={customInput}\n foldersPath={foldersPath}\n hasFolderTreeBreadcrumbs={hasFolderTreeBreadcrumbs}\n isCreateNewFolderAllowed={isCreateNewFolderAllowed}\n onCreateNewFolderButtonClick={onCreateNewFolderButtonClick}\n onFoldersPathUpdated={this.handleFoldersPathUpdated}\n onEnterFolder={this.enterFolder}\n onExitSearch={this.handleExitSearch}\n onSearchSubmit={this.handleSearchSubmit}\n numTotalItems={numTotalItems}\n searchInputProps={searchInputProps}\n showCreateNewFolderButton={showCreateNewFolderButton}\n >\n {headerActionsAccessory}\n </ContentExplorerHeaderActions>\n {hasSubheader && (\n <div className=\"bdl-ContentExplorer-subheader\">\n {canIncludeSubfolders && <ContentExplorerIncludeSubfolders {...includeSubfoldersProps} />}\n {isSelectAllAllowed && (\n <ContentExplorerSelectAll\n handleSelectAllClick={this.handleSelectAllClick}\n isLabelHidden={canIncludeSubfolders}\n isSelectAllChecked={isSelectAllChecked}\n numTotalItems={numTotalItems}\n />\n )}\n </div>\n )}\n <ItemList\n additionalColumns={additionalColumns}\n contentExplorerMode={contentExplorerMode}\n headerHeight={listHeaderHeight}\n headerRenderer={listHeaderRenderer}\n height={listHeight}\n isResponsive={isResponsive}\n itemButtonRenderer={itemButtonRenderer}\n itemIconRenderer={itemIconRenderer}\n itemNameLinkRenderer={itemNameLinkRenderer}\n items={items}\n itemRowRenderer={itemRowRenderer}\n noItemsRenderer={this.renderItemListEmptyState}\n numItemsPerPage={numItemsPerPage}\n numTotalItems={numTotalItems}\n onItemClick={this.handleItemClick}\n onItemDoubleClick={this.handleItemDoubleClick}\n onItemNameClick={this.handleItemNameClick}\n onLoadMoreItems={onLoadMoreItems}\n rowHeight={itemRowHeight}\n selectedItems={allSelectedItems}\n width={listWidth}\n />\n <ContentExplorerActionButtons\n actionButtonsProps={actionButtonsProps}\n areButtonsDisabled={areActionButtonsDisabled}\n cancelButtonProps={cancelButtonProps}\n canIncludeSubfolders={canIncludeSubfolders}\n chooseButtonProps={chooseButtonProps}\n chooseButtonText={chooseButtonText}\n contentExplorerMode={contentExplorerMode}\n currentFolder={currentFolder}\n isChooseButtonLoading={isChooseButtonLoading}\n isCopyButtonLoading={isCopyButtonLoading}\n isMoveButtonLoading={isMoveButtonLoading}\n isResponsive={isResponsive}\n isSelectAllAllowed={isSelectAllAllowed}\n onCancelClick={onCancelButtonClick}\n onChooseClick={onChooseItems}\n onCopyClick={onCopyItem}\n onFoldersPathUpdated={this.handleFoldersPathUpdated}\n onSelectedClick={onSelectedClick}\n onMoveClick={onMoveItem}\n onViewSelectedClick={onViewSelectedClick}\n selectedItems={allSelectedItems}\n isNoSelectionAllowed={isNoSelectionAllowed}\n />\n </div>\n );\n }\n}\n\nexport default ContentExplorer;\n"],"mappings":";;;;;;;;;AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAA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ACA;AACA;EACQ1H,YAAY,EAAE/D,SAAS,CAAC0L,IAAI,CAACD,UAAU;EACvC;EACAhK,KAAK,EAAEX,aAAa,CAAC2K,UAAU;EAC/B;EACA7D,eAAe,EAAE5H,SAAS,CAAC2L,MAAM;EACjC;EACA9D,aAAa,EAAE7H,SAAS,CAAC2L,MAAM;EAC/B;EACA7D,eAAe,EAAE9H,SAAS,CAAC0L,IAAI;EAC/B;EACA1D,gBAAgB,EAAEhI,SAAS,CAAC0L,IAAI;EAChC;EACAzD,oBAAoB,EAAEjI,SAAS,CAAC0L,IAAI;EACpC;EACAxD,kBAAkB,EAAElI,SAAS,CAAC0L,IAAI;EAClC;EACAvD,aAAa,EAAEnI,SAAS,CAAC2L,MAAM;EAC/B;EACAvD,eAAe,EAAEpI,SAAS,CAAC0L,IAAI;EAC/B;EACArD,gBAAgB,EAAErI,SAAS,CAAC2L,MAAM;EAClC;EACArD,kBAAkB,EAAEtI,SAAS,CAAC0L,IAAI;EAClC;EACAnD,SAAS,EAAEvI,SAAS,CAAC2L,MAAM,CAACF,UAAU;EACtC;EACAjD,UAAU,EAAExI,SAAS,CAAC2L,MAAM,CAACF,UAAU;EACvC;EACAhD,gBAAgB,EAAEzI,SAAS,CAACoL,MAAM;EAClC;EACA1C,cAAc,EAAE1I,SAAS,CAACwL;AAC9B,CAAC;AAAApK,eAAA,CA/ICH,eAAe,kBAiJK;EAClBqF,kBAAkB,EAAE,CAAC,CAAC;EACtBI,iBAAiB,EAAE,CAAC,CAAC;EACrBC,iBAAiB,EAAE,CAAC,CAAC;EACrB3E,SAAS,EAAE,EAAE;EACbyG,gBAAgB,EAAE,CAAC;AACvB,CAAC;AAudL,eAAexH,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"ContentExplorer.js","names":["PropTypes","React","Component","classNames","omit","ContentExplorerHeaderActions","ContentExplorerEmptyState","ContentExplorerActionButtons","ContentExplorerSelectAll","ContentExplorerIncludeSubfolders","ContentExplorerInfoNotice","ItemList","ContentExplorerModePropType","FoldersPathPropType","ItemsPropType","ContentExplorerModes","TYPE_FOLDER","ContentExplorer","constructor","props","_defineProperty","_objectSpread","state","selectedItems","controlledSelectedItems","items","length","every","item","id","isLoading","node","className","limit","nodeOfInterest","counter","parentNode","includes","contentExplorerMode","MULTI_SELECT","event","isInside","domNode","contains","target","shouldDeselectItems","deselectItems","enteredFolder","onEnterFolder","onFoldersPathUpdate","foldersPath","folderIndex","findIndex","folder","newFoldersPath","slice","concat","newState","setState","searchQuery","onSearchSubmit","isInSearchMode","folderBeforeSearch","onExitSearch","index","onSelectItem","onSelectedItemsUpdate","isDisabled","isActionDisabled","stopPropagation","newSelectedItems","toggleSelectedItem","getAllSelectedItems","onChooseItems","type","enterFolder","preventDefault","result","forEach","isLoadingItems","isSelectAllChecked","unselectAll","selectAll","isViewingSearchResults","createElement","isSearch","initialSelectedItems","initialFoldersPath","componentDidMount","document","addEventListener","handleDocumentClick","componentDidUpdate","prevInitialFoldersPath","isSelectAllAllowed","handleFoldersPathUpdated","areAllItemsSelected","componentWillUnmount","removeEventListener","getCurrentFolder","render","_this$props","actionButtonsProps","additionalColumns","isNoSelectionAllowed","breadcrumbIcon","breadcrumbProps","cancelButtonProps","chooseButtonProps","chooseButtonText","customInput","hasFolderTreeBreadcrumbs","headerActionsAccessory","onMoveItem","onCopyItem","onCancelButtonClick","onCreateNewFolderButtonClick","onSelectedClick","onViewSelectedClick","showCreateNewFolderButton","isChooseButtonLoading","isCopyButtonLoading","isCreateNewFolderAllowed","isMoveButtonLoading","isResponsive","numItemsPerPage","numTotalItems","onLoadMoreItems","includeSubfoldersProps","itemIconRenderer","itemNameLinkRenderer","itemButtonRenderer","itemRowHeight","itemRowRenderer","listHeaderHeight","listHeaderRenderer","listWidth","listHeight","searchInputProps","infoNoticeText","noItemsRenderer","rest","_objectWithoutProperties","_excluded","allSelectedItems","currentFolder","contentExplorerProps","canIncludeSubfolders","hasSubheader","selectedItemsIds","Object","keys","areActionButtonsDisabled","isFirstSelectedItemDisabled","SELECT_FILE","_extends","onClick","handleContentExplorerClick","ref","onFoldersPathUpdated","handleExitSearch","handleSearchSubmit","handleSelectAllClick","isLabelHidden","headerHeight","headerRenderer","height","renderItemListEmptyState","onItemClick","handleItemClick","onItemDoubleClick","handleItemDoubleClick","onItemNameClick","handleItemNameClick","rowHeight","width","areButtonsDisabled","onCancelClick","onChooseClick","onCopyClick","onMoveClick","object","arrayOf","element","bool","string","isRequired","func","number"],"sources":["../../../../src/features/content-explorer/content-explorer/ContentExplorer.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport classNames from 'classnames';\nimport omit from 'lodash/omit';\n\nimport ContentExplorerHeaderActions from './ContentExplorerHeaderActions';\nimport ContentExplorerEmptyState from './ContentExplorerEmptyState';\nimport ContentExplorerActionButtons from './ContentExplorerActionButtons';\nimport ContentExplorerSelectAll from './ContentExplorerSelectAll';\nimport ContentExplorerIncludeSubfolders from './ContentExplorerIncludeSubfolders';\nimport ContentExplorerInfoNotice from './ContentExplorerInfoNotice';\n\nimport ItemList from '../item-list';\nimport { ContentExplorerModePropType, FoldersPathPropType, ItemsPropType } from '../prop-types';\nimport ContentExplorerModes from '../modes';\n\nimport { TYPE_FOLDER } from '../../../constants';\n\nimport './ContentExplorer.scss';\n\nclass ContentExplorer extends Component {\n static propTypes = {\n /** Props for the action buttons container */\n actionButtonsProps: PropTypes.object,\n /**\n * Extra columns displayed in the folders table after folder name column\n * Each column has to be a Column element\n */\n additionalColumns: PropTypes.arrayOf(PropTypes.element),\n /** Items that will show up as selected */\n controlledSelectedItems: PropTypes.object,\n /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */\n isNoSelectionAllowed: PropTypes.bool,\n /** Custom icon for the breadcrumb. Overrides the default icon */\n breadcrumbIcon: PropTypes.element,\n /** Props for breadcrumbs */\n breadcrumbProps: PropTypes.object,\n /** Props for the cancel button */\n cancelButtonProps: PropTypes.object,\n /** Props for the choose button */\n chooseButtonProps: PropTypes.object,\n /** Custom text for the choose button */\n chooseButtonText: PropTypes.node,\n /** Adds class name. */\n className: PropTypes.string,\n /** Configures the content explorer based on the user's intended action (ex. select file or move/copy) */\n contentExplorerMode: ContentExplorerModePropType.isRequired,\n /** Props that contains the custom search input. Is rendered in header actions */\n customInput: PropTypes.func,\n /** Whether the user can see the breadcrumbs represented with the folder tree button */\n hasFolderTreeBreadcrumbs: PropTypes.bool,\n /** Any extra items in the header to the right of the search input (and new folder button) */\n headerActionsAccessory: PropTypes.node,\n /** Props for the include subfolders toggle */\n includeSubfoldersProps: PropTypes.object,\n /** Initial path of folders. The last folder in the array is the current folder. */\n initialFoldersPath: FoldersPathPropType.isRequired,\n /** Initial items that will show up as selected */\n initialSelectedItems: PropTypes.object,\n /** Whether to use the responsive version */\n isResponsive: PropTypes.bool,\n /**\n * Called when the current folder changes\n *\n * @param {Object} enteredFolder\n * @param {Array} newFoldersPath\n */\n onEnterFolder: PropTypes.func.isRequired,\n /** Called when the folders path is updated\n *\n * @param {Array} newFoldersPath\n */\n onFoldersPathUpdate: PropTypes.func,\n /** Called whenever the selected items list changes\n *\n * @param {Object} selectedItems\n */\n onSelectedItemsUpdate: PropTypes.func,\n /**\n * Called when an item is selected\n *\n * @param {Object} selectedItem\n * @param {number} selectedItemIndex\n */\n onSelectItem: PropTypes.func,\n /**\n * Called when an item is chosen\n *\n * @param {Object[]} chosenItems\n */\n onChooseItems: PropTypes.func,\n /** Called when selected button is clicked */\n onSelectedClick: PropTypes.func,\n /** Called when the number of items selected text is clicked */\n onViewSelectedClick: PropTypes.func,\n /**\n * Called when a destination folder has been selected for moving an item to\n *\n * @param {Object} destFolder destination folder\n */\n onMoveItem: PropTypes.func,\n /**\n * Called when a destination folder has been selected for copying an item to\n *\n * @param {Object} destFolder destination folder\n */\n onCopyItem: PropTypes.func,\n /** Called when cancel button is clicked */\n onCancelButtonClick: PropTypes.func,\n /** Called when new folder button is clicked */\n onCreateNewFolderButtonClick: PropTypes.func,\n /** Whether the new folder button should be shown */\n showCreateNewFolderButton: PropTypes.bool,\n /** Whether the choose button should be shown with a loading indicator */\n isChooseButtonLoading: PropTypes.bool,\n /** Whether the copy button should be shown with a loading indicator */\n isCopyButtonLoading: PropTypes.bool,\n /** Whether the user has permission to create a new folder */\n isCreateNewFolderAllowed: PropTypes.bool,\n /** Whether the user can see select all checkbox */\n isSelectAllAllowed: PropTypes.bool,\n /** Whether the move button should be shown with a loading indicator */\n isMoveButtonLoading: PropTypes.bool,\n /**\n * Called when a search query is submitted.\n *\n * @param {string} searchQuery\n */\n onSearchSubmit: PropTypes.func.isRequired,\n /**\n * Called when search mode is exited. An updated items list should now be passed in to display the user's file tree.\n *\n * @param {Object} folderBeforeSearch the previous folder object before entering search mode\n */\n onExitSearch: PropTypes.func.isRequired,\n /** List of items to display */\n items: ItemsPropType.isRequired,\n /** Number of items to load per page as the user scrolls */\n numItemsPerPage: PropTypes.number,\n /** Total number of items across all pages */\n numTotalItems: PropTypes.number,\n /** Called to load more items */\n onLoadMoreItems: PropTypes.func,\n /** Used to render item icons in the list. Overrides the default icons. */\n itemIconRenderer: PropTypes.func,\n /** Used to render item name links in the list. Overrides the default links. */\n itemNameLinkRenderer: PropTypes.func,\n /** Used to render item buttons in the list. Overrides the default buttons. */\n itemButtonRenderer: PropTypes.func,\n /** Height of an item row */\n itemRowHeight: PropTypes.number,\n /** Used to render the row element for items on the list. Allows row customizations such as adding tooltips, etc. */\n itemRowRenderer: PropTypes.func,\n /** Height of the item list header, defaults to 0, which makes header not visible */\n listHeaderHeight: PropTypes.number,\n /** Used to render the header row on the item list */\n listHeaderRenderer: PropTypes.func,\n /** Width of the item list */\n listWidth: PropTypes.number.isRequired,\n /** Height of the item list */\n listHeight: PropTypes.number.isRequired,\n /** Props for the search input */\n searchInputProps: PropTypes.object,\n /** Text for the informational notice, defaults to empty string, which makes notice not visible */\n infoNoticeText: PropTypes.string,\n /** Used to render the no items state. Overrides the default no items state. */\n noItemsRenderer: PropTypes.func,\n };\n\n static defaultProps = {\n actionButtonsProps: {},\n cancelButtonProps: {},\n chooseButtonProps: {},\n className: '',\n searchInputProps: {},\n };\n\n constructor(props) {\n super(props);\n this.state = {\n selectedItems: props.initialSelectedItems || {},\n foldersPath: props.initialFoldersPath,\n isInSearchMode: false,\n isSelectAllChecked: false,\n };\n }\n\n componentDidMount() {\n document.addEventListener('click', this.handleDocumentClick, true);\n }\n\n componentDidUpdate({ initialFoldersPath: prevInitialFoldersPath }) {\n const { initialFoldersPath, isSelectAllAllowed } = this.props;\n const { isSelectAllChecked } = this.state;\n\n if (prevInitialFoldersPath !== initialFoldersPath) {\n this.handleFoldersPathUpdated(initialFoldersPath);\n }\n if (!this.isLoadingItems() && isSelectAllAllowed) {\n const areAllItemsSelected = this.areAllItemsSelected();\n if (areAllItemsSelected !== isSelectAllChecked) {\n this.setState({ isSelectAllChecked: areAllItemsSelected });\n }\n }\n }\n\n componentWillUnmount() {\n document.removeEventListener('click', this.handleDocumentClick, true);\n }\n\n getAllSelectedItems = () => {\n return { ...this.state.selectedItems, ...this.props.controlledSelectedItems };\n };\n\n areAllItemsSelected = () => {\n const { items } = this.props;\n const { selectedItems } = this.state;\n\n return items.length > 0 && items.every(item => selectedItems[item.id]);\n };\n\n isLoadingItems = () => {\n return this.props?.items?.[0]?.isLoading;\n };\n\n getCurrentFolder() {\n const { foldersPath } = this.state;\n return foldersPath[foldersPath.length - 1];\n }\n\n /**\n * Traverse the hirerachy up to the limit to see if any of the parent has the className\n */\n doAncestersContainClassname = (node, className, limit) => {\n let nodeOfInterest = node;\n let counter = 0;\n while (nodeOfInterest.parentNode && counter < limit) {\n // Done traversing (Document node does not have classnames)\n if (!nodeOfInterest.parentNode.className) {\n break;\n }\n\n if (nodeOfInterest.parentNode.className.includes(className)) {\n return true;\n }\n\n nodeOfInterest = nodeOfInterest.parentNode;\n counter += 1;\n }\n\n return false;\n };\n\n shouldDeselectItems = () => {\n const { contentExplorerMode } = this.props;\n\n return (\n // always deselect when not in multi select mode\n contentExplorerMode !== ContentExplorerModes.MULTI_SELECT\n );\n };\n\n handleDocumentClick = event => {\n const isInside = (this.domNode && this.domNode.contains(event.target)) || this.domNode === event.target;\n\n if (!isInside && this.shouldDeselectItems()) {\n this.deselectItems();\n }\n };\n\n handleContentExplorerClick = () => {\n if (this.shouldDeselectItems()) {\n this.deselectItems();\n }\n };\n\n deselectItems() {\n const { onSelectedItemsUpdate } = this.props;\n this.setState({\n selectedItems: {},\n });\n if (onSelectedItemsUpdate) {\n onSelectedItemsUpdate({});\n }\n }\n\n enterFolder = enteredFolder => {\n const { contentExplorerMode, onEnterFolder, onFoldersPathUpdate } = this.props;\n const { foldersPath } = this.state;\n\n const folderIndex = foldersPath.findIndex(folder => folder.id === enteredFolder.id);\n let newFoldersPath = foldersPath.slice();\n\n if (folderIndex === -1) {\n // Append folder to the path if it's not already in the folders path\n newFoldersPath = newFoldersPath.concat([\n {\n ...enteredFolder,\n },\n ]);\n } else {\n // Otherwise, remove all folders that came after the entered folder\n newFoldersPath = newFoldersPath.slice(0, folderIndex + 1);\n }\n\n const newState = { foldersPath: newFoldersPath };\n if (contentExplorerMode !== ContentExplorerModes.MULTI_SELECT) {\n newState.selectedItems = {};\n }\n\n this.setState(newState);\n if (onFoldersPathUpdate) {\n onFoldersPathUpdate(newFoldersPath);\n }\n\n onEnterFolder(enteredFolder, newFoldersPath);\n };\n\n handleFoldersPathUpdated = newFoldersPath => {\n const { onFoldersPathUpdate } = this.props;\n\n this.setState({\n foldersPath: newFoldersPath,\n });\n if (onFoldersPathUpdate) {\n onFoldersPathUpdate(newFoldersPath);\n }\n };\n\n handleSearchSubmit = searchQuery => {\n const { onSearchSubmit } = this.props;\n\n this.setState({ isInSearchMode: true });\n onSearchSubmit(searchQuery);\n };\n\n handleExitSearch = folderBeforeSearch => {\n const { onExitSearch } = this.props;\n\n this.setState({ isInSearchMode: false });\n onExitSearch(folderBeforeSearch);\n };\n\n handleItemClick = ({ event, index }) => {\n const { contentExplorerMode, items, onSelectItem, onSelectedItemsUpdate } = this.props;\n const item = items[index];\n\n if (item.isDisabled || item.isLoading || item.isActionDisabled) {\n return;\n }\n\n // Prevent the event from bubbling up (so our content explorer click handler doesn't fire)\n event.stopPropagation();\n\n let newSelectedItems = {};\n if (contentExplorerMode === ContentExplorerModes.MULTI_SELECT) {\n newSelectedItems = this.toggleSelectedItem(this.getAllSelectedItems(), item);\n } else {\n newSelectedItems[item.id] = item;\n }\n\n this.setState({ selectedItems: newSelectedItems });\n if (onSelectedItemsUpdate) {\n onSelectedItemsUpdate(newSelectedItems);\n }\n\n if (onSelectItem) {\n onSelectItem(item, index);\n }\n };\n\n handleItemDoubleClick = ({ index }) => {\n const { items, onChooseItems } = this.props;\n const item = items[index];\n\n if (item.isDisabled || item.isLoading) {\n return;\n }\n\n if (item.type === TYPE_FOLDER) {\n this.enterFolder(item);\n } else if (!item.isActionDisabled) {\n onChooseItems([item]);\n }\n };\n\n handleItemNameClick = (event, index) => {\n const { items } = this.props;\n const item = items[index];\n\n if (item.isDisabled || item.isLoading) {\n return;\n }\n\n if (item.type !== TYPE_FOLDER) {\n return;\n }\n\n // Prevent the event from bubbling (so our row click handler doesn't fire)\n event.preventDefault();\n event.stopPropagation();\n\n this.enterFolder(item);\n };\n\n toggleSelectedItem = (selectedItems, item) => {\n const result = { ...selectedItems };\n if (result[item.id]) {\n delete result[item.id];\n } else {\n result[item.id] = item;\n }\n\n return result;\n };\n\n selectAll = () => {\n const { items } = this.props;\n const { selectedItems } = this.state;\n const result = { ...selectedItems };\n items.forEach(item => {\n if (!result[item.id]) {\n result[item.id] = item;\n }\n });\n return result;\n };\n\n unselectAll = () => {\n const { items } = this.props;\n const { selectedItems } = this.state;\n const result = { ...selectedItems };\n items.forEach(item => {\n if (result[item.id]) {\n delete result[item.id];\n }\n });\n return result;\n };\n\n handleSelectAllClick = async () => {\n const { onSelectedItemsUpdate } = this.props;\n if (this.isLoadingItems()) {\n return;\n }\n const { isSelectAllChecked } = this.state;\n const newSelectedItems = isSelectAllChecked ? this.unselectAll() : this.selectAll();\n\n this.setState({ selectedItems: newSelectedItems, isSelectAllChecked: !isSelectAllChecked });\n if (onSelectedItemsUpdate) {\n onSelectedItemsUpdate(newSelectedItems);\n }\n };\n\n renderItemListEmptyState = () => {\n const { foldersPath, isInSearchMode } = this.state;\n const isViewingSearchResults = isInSearchMode && foldersPath.length === 1;\n\n return <ContentExplorerEmptyState isSearch={isViewingSearchResults} />;\n };\n\n render() {\n const {\n actionButtonsProps,\n additionalColumns,\n controlledSelectedItems,\n isNoSelectionAllowed = false,\n breadcrumbIcon,\n breadcrumbProps,\n cancelButtonProps,\n chooseButtonProps,\n chooseButtonText,\n className,\n contentExplorerMode,\n customInput,\n hasFolderTreeBreadcrumbs,\n headerActionsAccessory,\n onChooseItems,\n onMoveItem,\n onCopyItem,\n onCancelButtonClick,\n onCreateNewFolderButtonClick,\n onSelectedClick,\n onViewSelectedClick,\n showCreateNewFolderButton,\n isChooseButtonLoading,\n isCopyButtonLoading,\n isCreateNewFolderAllowed,\n isMoveButtonLoading,\n isResponsive = false,\n isSelectAllAllowed,\n items,\n numItemsPerPage,\n numTotalItems,\n onLoadMoreItems,\n includeSubfoldersProps,\n itemIconRenderer,\n itemNameLinkRenderer,\n itemButtonRenderer,\n itemRowHeight,\n itemRowRenderer,\n listHeaderHeight,\n listHeaderRenderer,\n listWidth,\n listHeight,\n searchInputProps,\n infoNoticeText,\n noItemsRenderer,\n ...rest\n } = this.props;\n const { isInSearchMode, foldersPath, isSelectAllChecked } = this.state;\n const allSelectedItems = this.getAllSelectedItems();\n\n const isViewingSearchResults = isInSearchMode && foldersPath.length === 1;\n const currentFolder = this.getCurrentFolder();\n const contentExplorerProps = omit(rest, [\n 'initialFoldersPath',\n 'onEnterFolder',\n 'onSelectItem',\n 'onSearchSubmit',\n 'onExitSearch',\n 'initialSelectedItems',\n 'onFoldersPathUpdate',\n 'onSelectedItemsUpdate',\n ]);\n const canIncludeSubfolders = !!includeSubfoldersProps;\n const hasSubheader = canIncludeSubfolders || isSelectAllAllowed;\n\n const selectedItemsIds = Object.keys(allSelectedItems);\n let areActionButtonsDisabled;\n // NOTE: it almost feels like this whole section should be inside the\n // ContentExplorerActionButtons instead. There's a lot of implicit knowledge\n // of what the action buttons are and what they should be doing.\n const isFirstSelectedItemDisabled = allSelectedItems[selectedItemsIds[0]]?.isActionDisabled;\n if (contentExplorerMode === ContentExplorerModes.MULTI_SELECT) {\n // NOTE: only expecting to have 1 (choose) button so as long as something\n // is selected and that item's isActionDisabled is false, we enable the action button\n areActionButtonsDisabled =\n (selectedItemsIds.length === 0 && !isNoSelectionAllowed) ||\n (selectedItemsIds.length === 1 && isFirstSelectedItemDisabled);\n } else if (isViewingSearchResults || contentExplorerMode === ContentExplorerModes.SELECT_FILE) {\n // Buttons are only enabled when an item is selected\n // When viewing search results, there is no \"current folder\"\n // When selecting a file, the file can only selected from the list\n areActionButtonsDisabled = selectedItemsIds.length === 0 || isFirstSelectedItemDisabled;\n } else {\n // Buttons are enabled using the selected item or the current folder if no item is selected\n areActionButtonsDisabled =\n selectedItemsIds.length > 0 ? isFirstSelectedItemDisabled : currentFolder.isActionDisabled;\n }\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events\n <div\n className={classNames('content-explorer', className, {\n 'bdl-ContentExplorer--responsive': isResponsive,\n })}\n data-testid=\"content-explorer\"\n onClick={this.handleContentExplorerClick}\n ref={ref => {\n this.domNode = ref;\n }}\n {...contentExplorerProps}\n >\n {infoNoticeText && <ContentExplorerInfoNotice infoNoticeText={infoNoticeText} />}\n <ContentExplorerHeaderActions\n breadcrumbIcon={breadcrumbIcon}\n breadcrumbProps={breadcrumbProps}\n contentExplorerMode={contentExplorerMode}\n customInput={customInput}\n foldersPath={foldersPath}\n hasFolderTreeBreadcrumbs={hasFolderTreeBreadcrumbs}\n isCreateNewFolderAllowed={isCreateNewFolderAllowed}\n onCreateNewFolderButtonClick={onCreateNewFolderButtonClick}\n onFoldersPathUpdated={this.handleFoldersPathUpdated}\n onEnterFolder={this.enterFolder}\n onExitSearch={this.handleExitSearch}\n onSearchSubmit={this.handleSearchSubmit}\n numTotalItems={numTotalItems}\n searchInputProps={searchInputProps}\n showCreateNewFolderButton={showCreateNewFolderButton}\n >\n {headerActionsAccessory}\n </ContentExplorerHeaderActions>\n {hasSubheader && (\n <div className=\"bdl-ContentExplorer-subheader\">\n {canIncludeSubfolders && <ContentExplorerIncludeSubfolders {...includeSubfoldersProps} />}\n {isSelectAllAllowed && (\n <ContentExplorerSelectAll\n handleSelectAllClick={this.handleSelectAllClick}\n isLabelHidden={canIncludeSubfolders}\n isSelectAllChecked={isSelectAllChecked}\n numTotalItems={numTotalItems}\n />\n )}\n </div>\n )}\n <ItemList\n additionalColumns={additionalColumns}\n contentExplorerMode={contentExplorerMode}\n headerHeight={listHeaderHeight}\n headerRenderer={listHeaderRenderer}\n height={listHeight}\n isResponsive={isResponsive}\n itemButtonRenderer={itemButtonRenderer}\n itemIconRenderer={itemIconRenderer}\n itemNameLinkRenderer={itemNameLinkRenderer}\n items={items}\n itemRowRenderer={itemRowRenderer}\n noItemsRenderer={noItemsRenderer || this.renderItemListEmptyState}\n numItemsPerPage={numItemsPerPage}\n numTotalItems={numTotalItems}\n onItemClick={this.handleItemClick}\n onItemDoubleClick={this.handleItemDoubleClick}\n onItemNameClick={this.handleItemNameClick}\n onLoadMoreItems={onLoadMoreItems}\n rowHeight={itemRowHeight}\n selectedItems={allSelectedItems}\n width={listWidth}\n />\n <ContentExplorerActionButtons\n actionButtonsProps={actionButtonsProps}\n areButtonsDisabled={areActionButtonsDisabled}\n cancelButtonProps={cancelButtonProps}\n canIncludeSubfolders={canIncludeSubfolders}\n chooseButtonProps={chooseButtonProps}\n chooseButtonText={chooseButtonText}\n contentExplorerMode={contentExplorerMode}\n currentFolder={currentFolder}\n isChooseButtonLoading={isChooseButtonLoading}\n isCopyButtonLoading={isCopyButtonLoading}\n isMoveButtonLoading={isMoveButtonLoading}\n isResponsive={isResponsive}\n isSelectAllAllowed={isSelectAllAllowed}\n onCancelClick={onCancelButtonClick}\n onChooseClick={onChooseItems}\n onCopyClick={onCopyItem}\n onFoldersPathUpdated={this.handleFoldersPathUpdated}\n onSelectedClick={onSelectedClick}\n onMoveClick={onMoveItem}\n onViewSelectedClick={onViewSelectedClick}\n selectedItems={allSelectedItems}\n isNoSelectionAllowed={isNoSelectionAllowed}\n />\n </div>\n );\n }\n}\n\nexport default ContentExplorer;\n"],"mappings":";;;;;;;;;AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,IAAI,MAAM,aAAa;AAE9B,OAAOC,4BAA4B,MAAM,gCAAgC;AACzE,OAAOC,yBAAyB,MAAM,6BAA6B;AACnE,OAAOC,4BAA4B,MAAM,gCAAgC;AACzE,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,gCAAgC,MAAM,oCAAoC;AACjF,OAAOC,yBAAyB,MAAM,6BAA6B;AAEnE,OAAOC,QAAQ,MAAM,cAAc;AACnC,SAASC,2BAA2B,EAAEC,mBAAmB,EAAEC,aAAa,QAAQ,eAAe;AAC/F,OAAOC,oBAAoB,MAAM,UAAU;AAE3C,SAASC,WAAW,QAAQ,oBAAoB;AAEhD,OAAO,wBAAwB;AAE/B,MAAMC,eAAe,SAASf,SAAS,CAAC;EA6JpCgB,WAAWA,CAACC,KAAK,EAAE;IACf,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,8BAgCK,MAAM;MACxB,OAAAC,aAAA,CAAAA,aAAA,KAAY,IAAI,CAACC,KAAK,CAACC,aAAa,GAAK,IAAI,CAACJ,KAAK,CAACK,uBAAuB;IAC/E,CAAC;IAAAJ,eAAA,8BAEqB,MAAM;MACxB,MAAM;QAAEK;MAAM,CAAC,GAAG,IAAI,CAACN,KAAK;MAC5B,MAAM;QAAEI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CAAC4L,MAAM,CAACF,UAAU;EACvC;EACAhD,gBAAgB,EAAE1I,SAAS,CAACqL,MAAM;EAClC;EACA1C,cAAc,EAAE3I,SAAS,CAACyL,MAAM;EAChC;EACA7C,eAAe,EAAE5I,SAAS,CAAC2L;AAC/B,CAAC;AAAAvK,eAAA,CAnJCH,eAAe,kBAqJK;EAClBqF,kBAAkB,EAAE,CAAC,CAAC;EACtBK,iBAAiB,EAAE,CAAC,CAAC;EACrBC,iBAAiB,EAAE,CAAC,CAAC;EACrB5E,SAAS,EAAE,EAAE;EACb0G,gBAAgB,EAAE,CAAC;AACvB,CAAC;AA0dL,eAAezH,eAAe","ignoreList":[]}
@@ -10,6 +10,7 @@ import PlainButton from '../../../components/plain-button';
10
10
  import { FoldersPathPropType } from '../prop-types';
11
11
  import messages from '../messages';
12
12
  const ContentExplorerBreadcrumbs = ({
13
+ breadcrumbIcon,
13
14
  breadcrumbProps,
14
15
  foldersPath,
15
16
  intl: {
@@ -40,7 +41,7 @@ const ContentExplorerBreadcrumbs = ({
40
41
  "data-testid": "breadcrumb-lnk",
41
42
  onClick: event => onBreadcrumbClick(i, event),
42
43
  title: folder.name
43
- }, i === 0 && /*#__PURE__*/React.createElement(IconAllFiles, null), /*#__PURE__*/React.createElement("span", null, folder.name))))));
44
+ }, i === 0 && (breadcrumbIcon || /*#__PURE__*/React.createElement(IconAllFiles, null)), /*#__PURE__*/React.createElement("span", null, folder.name))))));
44
45
  ContentExplorerBreadcrumbs.propTypes = {
45
46
  breadcrumbProps: PropTypes.object,
46
47
  foldersPath: FoldersPathPropType.isRequired,
@@ -12,6 +12,7 @@ import { FoldersPathPropType } from '../prop-types';
12
12
  import messages from '../messages';
13
13
 
14
14
  const ContentExplorerBreadcrumbs = ({
15
+ breadcrumbIcon,
15
16
  breadcrumbProps,
16
17
  foldersPath,
17
18
  intl: { formatMessage },
@@ -39,7 +40,7 @@ const ContentExplorerBreadcrumbs = ({
39
40
  onClick={event => onBreadcrumbClick(i, event)}
40
41
  title={folder.name}
41
42
  >
42
- {i === 0 && <IconAllFiles />}
43
+ {i === 0 && (breadcrumbIcon || <IconAllFiles />)}
43
44
  <span>{folder.name}</span>
44
45
  </PlainButton>
45
46
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"ContentExplorerBreadcrumbs.js","names":["PropTypes","React","injectIntl","Button","Breadcrumb","IconChevron","IconAllFiles","PlainButton","FoldersPathPropType","messages","ContentExplorerBreadcrumbs","breadcrumbProps","foldersPath","intl","formatMessage","isUpButtonDisabled","onUpButtonClick","onBreadcrumbClick","createElement","className","clickToGoBack","type","onClick","isDisabled","direction","size","color","_extends","label","breadcrumb","map","folder","i","key","id","event","title","name","propTypes","object","isRequired","any","bool","func","ContentExplorerBreadcrumbsBase"],"sources":["../../../../src/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { injectIntl } from 'react-intl';\n\nimport Button from '../../../components/button';\nimport Breadcrumb from '../../../components/breadcrumb';\nimport IconChevron from '../../../icons/general/IconChevron';\nimport IconAllFiles from '../../../icons/general/IconAllFiles';\nimport PlainButton from '../../../components/plain-button';\n\nimport { FoldersPathPropType } from '../prop-types';\nimport messages from '../messages';\n\nconst ContentExplorerBreadcrumbs = ({\n breadcrumbProps,\n foldersPath,\n intl: { formatMessage },\n isUpButtonDisabled = false,\n onUpButtonClick,\n onBreadcrumbClick,\n}) => (\n <div className=\"content-explorer-breadcrumbs-container\">\n <Button\n aria-label={formatMessage(messages.clickToGoBack)}\n className=\"content-explorer-breadcrumbs-up-button\"\n type=\"button\"\n onClick={onUpButtonClick}\n isDisabled={isUpButtonDisabled}\n >\n <IconChevron direction=\"left\" size=\"6px\" color=\"#333\" />\n </Button>\n <Breadcrumb label={formatMessage(messages.breadcrumb)} {...breadcrumbProps}>\n {/* The outer div for each crumb prevents styling conflicts when the crumbs menu is active */}\n {foldersPath.map((folder, i) => (\n <div key={folder.id} className=\"lnk\">\n <PlainButton\n className=\"bdl-ContentExplorerBreadcrumbs-crumbLink\"\n data-testid=\"breadcrumb-lnk\"\n onClick={event => onBreadcrumbClick(i, event)}\n title={folder.name}\n >\n {i === 0 && <IconAllFiles />}\n <span>{folder.name}</span>\n </PlainButton>\n </div>\n ))}\n </Breadcrumb>\n </div>\n);\n\nContentExplorerBreadcrumbs.propTypes = {\n breadcrumbProps: PropTypes.object,\n foldersPath: FoldersPathPropType.isRequired,\n intl: PropTypes.any,\n isUpButtonDisabled: PropTypes.bool,\n onUpButtonClick: PropTypes.func,\n onBreadcrumbClick: PropTypes.func,\n};\n\nexport { ContentExplorerBreadcrumbs as ContentExplorerBreadcrumbsBase };\nexport default injectIntl(ContentExplorerBreadcrumbs);\n"],"mappings":";AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,YAAY;AAEvC,OAAOC,MAAM,MAAM,4BAA4B;AAC/C,OAAOC,UAAU,MAAM,gCAAgC;AACvD,OAAOC,WAAW,MAAM,oCAAoC;AAC5D,OAAOC,YAAY,MAAM,qCAAqC;AAC9D,OAAOC,WAAW,MAAM,kCAAkC;AAE1D,SAASC,mBAAmB,QAAQ,eAAe;AACnD,OAAOC,QAAQ,MAAM,aAAa;AAElC,MAAMC,0BAA0B,GAAGA,CAAC;EAChCC,eAAe;EACfC,WAAW;EACXC,IAAI,EAAE;IAAEC;EAAc,CAAC;EACvBC,kBAAkB,GAAG,KAAK;EAC1BC,eAAe;EACfC;AACJ,CAAC,kBACGhB,KAAA,CAAAiB,aAAA;EAAKC,SAAS,EAAC;AAAwC,gBACnDlB,KAAA,CAAAiB,aAAA,CAACf,MAAM;EACH,cAAYW,aAAa,CAACL,QAAQ,CAACW,aAAa,CAAE;EAClDD,SAAS,EAAC,wCAAwC;EAClDE,IAAI,EAAC,QAAQ;EACbC,OAAO,EAAEN,eAAgB;EACzBO,UAAU,EAAER;AAAmB,gBAE/Bd,KAAA,CAAAiB,aAAA,CAACb,WAAW;EAACmB,SAAS,EAAC,MAAM;EAACC,IAAI,EAAC,KAAK;EAACC,KAAK,EAAC;AAAM,CAAE,CACnD,CAAC,eACTzB,KAAA,CAAAiB,aAAA,CAACd,UAAU,EAAAuB,QAAA;EAACC,KAAK,EAAEd,aAAa,CAACL,QAAQ,CAACoB,UAAU;AAAE,GAAKlB,eAAe,GAErEC,WAAW,CAACkB,GAAG,CAAC,CAACC,MAAM,EAAEC,CAAC,kBACvB/B,KAAA,CAAAiB,aAAA;EAAKe,GAAG,EAAEF,MAAM,CAACG,EAAG;EAACf,SAAS,EAAC;AAAK,gBAChClB,KAAA,CAAAiB,aAAA,CAACX,WAAW;EACRY,SAAS,EAAC,0CAA0C;EACpD,eAAY,gBAAgB;EAC5BG,OAAO,EAAEa,KAAK,IAAIlB,iBAAiB,CAACe,CAAC,EAAEG,KAAK,CAAE;EAC9CC,KAAK,EAAEL,MAAM,CAACM;AAAK,GAElBL,CAAC,KAAK,CAAC,iBAAI/B,KAAA,CAAAiB,aAAA,CAACZ,YAAY,MAAE,CAAC,eAC5BL,KAAA,CAAAiB,aAAA,eAAOa,MAAM,CAACM,IAAW,CAChB,CACZ,CACR,CACO,CACX,CACR;AAED3B,0BAA0B,CAAC4B,SAAS,GAAG;EACnC3B,eAAe,EAAEX,SAAS,CAACuC,MAAM;EACjC3B,WAAW,EAAEJ,mBAAmB,CAACgC,UAAU;EAC3C3B,IAAI,EAAEb,SAAS,CAACyC,GAAG;EACnB1B,kBAAkB,EAAEf,SAAS,CAAC0C,IAAI;EAClC1B,eAAe,EAAEhB,SAAS,CAAC2C,IAAI;EAC/B1B,iBAAiB,EAAEjB,SAAS,CAAC2C;AACjC,CAAC;AAED,SAASjC,0BAA0B,IAAIkC,8BAA8B;AACrE,eAAe1C,UAAU,CAACQ,0BAA0B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ContentExplorerBreadcrumbs.js","names":["PropTypes","React","injectIntl","Button","Breadcrumb","IconChevron","IconAllFiles","PlainButton","FoldersPathPropType","messages","ContentExplorerBreadcrumbs","breadcrumbIcon","breadcrumbProps","foldersPath","intl","formatMessage","isUpButtonDisabled","onUpButtonClick","onBreadcrumbClick","createElement","className","clickToGoBack","type","onClick","isDisabled","direction","size","color","_extends","label","breadcrumb","map","folder","i","key","id","event","title","name","propTypes","object","isRequired","any","bool","func","ContentExplorerBreadcrumbsBase"],"sources":["../../../../src/features/content-explorer/content-explorer/ContentExplorerBreadcrumbs.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { injectIntl } from 'react-intl';\n\nimport Button from '../../../components/button';\nimport Breadcrumb from '../../../components/breadcrumb';\nimport IconChevron from '../../../icons/general/IconChevron';\nimport IconAllFiles from '../../../icons/general/IconAllFiles';\nimport PlainButton from '../../../components/plain-button';\n\nimport { FoldersPathPropType } from '../prop-types';\nimport messages from '../messages';\n\nconst ContentExplorerBreadcrumbs = ({\n breadcrumbIcon,\n breadcrumbProps,\n foldersPath,\n intl: { formatMessage },\n isUpButtonDisabled = false,\n onUpButtonClick,\n onBreadcrumbClick,\n}) => (\n <div className=\"content-explorer-breadcrumbs-container\">\n <Button\n aria-label={formatMessage(messages.clickToGoBack)}\n className=\"content-explorer-breadcrumbs-up-button\"\n type=\"button\"\n onClick={onUpButtonClick}\n isDisabled={isUpButtonDisabled}\n >\n <IconChevron direction=\"left\" size=\"6px\" color=\"#333\" />\n </Button>\n <Breadcrumb label={formatMessage(messages.breadcrumb)} {...breadcrumbProps}>\n {/* The outer div for each crumb prevents styling conflicts when the crumbs menu is active */}\n {foldersPath.map((folder, i) => (\n <div key={folder.id} className=\"lnk\">\n <PlainButton\n className=\"bdl-ContentExplorerBreadcrumbs-crumbLink\"\n data-testid=\"breadcrumb-lnk\"\n onClick={event => onBreadcrumbClick(i, event)}\n title={folder.name}\n >\n {i === 0 && (breadcrumbIcon || <IconAllFiles />)}\n <span>{folder.name}</span>\n </PlainButton>\n </div>\n ))}\n </Breadcrumb>\n </div>\n);\n\nContentExplorerBreadcrumbs.propTypes = {\n breadcrumbProps: PropTypes.object,\n foldersPath: FoldersPathPropType.isRequired,\n intl: PropTypes.any,\n isUpButtonDisabled: PropTypes.bool,\n onUpButtonClick: PropTypes.func,\n onBreadcrumbClick: PropTypes.func,\n};\n\nexport { ContentExplorerBreadcrumbs as ContentExplorerBreadcrumbsBase };\nexport default injectIntl(ContentExplorerBreadcrumbs);\n"],"mappings":";AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,YAAY;AAEvC,OAAOC,MAAM,MAAM,4BAA4B;AAC/C,OAAOC,UAAU,MAAM,gCAAgC;AACvD,OAAOC,WAAW,MAAM,oCAAoC;AAC5D,OAAOC,YAAY,MAAM,qCAAqC;AAC9D,OAAOC,WAAW,MAAM,kCAAkC;AAE1D,SAASC,mBAAmB,QAAQ,eAAe;AACnD,OAAOC,QAAQ,MAAM,aAAa;AAElC,MAAMC,0BAA0B,GAAGA,CAAC;EAChCC,cAAc;EACdC,eAAe;EACfC,WAAW;EACXC,IAAI,EAAE;IAAEC;EAAc,CAAC;EACvBC,kBAAkB,GAAG,KAAK;EAC1BC,eAAe;EACfC;AACJ,CAAC,kBACGjB,KAAA,CAAAkB,aAAA;EAAKC,SAAS,EAAC;AAAwC,gBACnDnB,KAAA,CAAAkB,aAAA,CAAChB,MAAM;EACH,cAAYY,aAAa,CAACN,QAAQ,CAACY,aAAa,CAAE;EAClDD,SAAS,EAAC,wCAAwC;EAClDE,IAAI,EAAC,QAAQ;EACbC,OAAO,EAAEN,eAAgB;EACzBO,UAAU,EAAER;AAAmB,gBAE/Bf,KAAA,CAAAkB,aAAA,CAACd,WAAW;EAACoB,SAAS,EAAC,MAAM;EAACC,IAAI,EAAC,KAAK;EAACC,KAAK,EAAC;AAAM,CAAE,CACnD,CAAC,eACT1B,KAAA,CAAAkB,aAAA,CAACf,UAAU,EAAAwB,QAAA;EAACC,KAAK,EAAEd,aAAa,CAACN,QAAQ,CAACqB,UAAU;AAAE,GAAKlB,eAAe,GAErEC,WAAW,CAACkB,GAAG,CAAC,CAACC,MAAM,EAAEC,CAAC,kBACvBhC,KAAA,CAAAkB,aAAA;EAAKe,GAAG,EAAEF,MAAM,CAACG,EAAG;EAACf,SAAS,EAAC;AAAK,gBAChCnB,KAAA,CAAAkB,aAAA,CAACZ,WAAW;EACRa,SAAS,EAAC,0CAA0C;EACpD,eAAY,gBAAgB;EAC5BG,OAAO,EAAEa,KAAK,IAAIlB,iBAAiB,CAACe,CAAC,EAAEG,KAAK,CAAE;EAC9CC,KAAK,EAAEL,MAAM,CAACM;AAAK,GAElBL,CAAC,KAAK,CAAC,KAAKtB,cAAc,iBAAIV,KAAA,CAAAkB,aAAA,CAACb,YAAY,MAAE,CAAC,CAAC,eAChDL,KAAA,CAAAkB,aAAA,eAAOa,MAAM,CAACM,IAAW,CAChB,CACZ,CACR,CACO,CACX,CACR;AAED5B,0BAA0B,CAAC6B,SAAS,GAAG;EACnC3B,eAAe,EAAEZ,SAAS,CAACwC,MAAM;EACjC3B,WAAW,EAAEL,mBAAmB,CAACiC,UAAU;EAC3C3B,IAAI,EAAEd,SAAS,CAAC0C,GAAG;EACnB1B,kBAAkB,EAAEhB,SAAS,CAAC2C,IAAI;EAClC1B,eAAe,EAAEjB,SAAS,CAAC4C,IAAI;EAC/B1B,iBAAiB,EAAElB,SAAS,CAAC4C;AACjC,CAAC;AAED,SAASlC,0BAA0B,IAAImC,8BAA8B;AACrE,eAAe3C,UAAU,CAACQ,0BAA0B,CAAC","ignoreList":[]}
@@ -124,6 +124,7 @@ class ContentExplorerHeaderActions extends Component {
124
124
  }
125
125
  render() {
126
126
  const {
127
+ breadcrumbIcon,
127
128
  breadcrumbProps,
128
129
  children,
129
130
  contentExplorerMode,
@@ -162,6 +163,7 @@ class ContentExplorerHeaderActions extends Component {
162
163
  numTotalItems: numTotalItems,
163
164
  onBreadcrumbClick: this.handleBreadcrumbClick
164
165
  }) : /*#__PURE__*/React.createElement(ContentExplorerBreadcrumbs, {
166
+ breadcrumbIcon: breadcrumbIcon,
165
167
  breadcrumbProps: breadcrumbProps,
166
168
  foldersPath: foldersPath,
167
169
  isUpButtonDisabled: isBreadcrumbButtonDisabled,
@@ -171,6 +173,7 @@ class ContentExplorerHeaderActions extends Component {
171
173
  }
172
174
  }
173
175
  _defineProperty(ContentExplorerHeaderActions, "propTypes", {
176
+ breadcrumbIcon: PropTypes.element,
174
177
  breadcrumbProps: BreadcrumbPropType,
175
178
  children: PropTypes.node,
176
179
  contentExplorerMode: ContentExplorerModePropType.isRequired,
@@ -16,6 +16,7 @@ const isSearchResultsFolder = folder => folder && folder.id === SEARCH_RESULTS_F
16
16
 
17
17
  class ContentExplorerHeaderActions extends Component {
18
18
  static propTypes = {
19
+ breadcrumbIcon: PropTypes.element,
19
20
  breadcrumbProps: BreadcrumbPropType,
20
21
  children: PropTypes.node,
21
22
  contentExplorerMode: ContentExplorerModePropType.isRequired,
@@ -151,6 +152,7 @@ class ContentExplorerHeaderActions extends Component {
151
152
 
152
153
  render() {
153
154
  const {
155
+ breadcrumbIcon,
154
156
  breadcrumbProps,
155
157
  children,
156
158
  contentExplorerMode,
@@ -200,6 +202,7 @@ class ContentExplorerHeaderActions extends Component {
200
202
  />
201
203
  ) : (
202
204
  <ContentExplorerBreadcrumbs
205
+ breadcrumbIcon={breadcrumbIcon}
203
206
  breadcrumbProps={breadcrumbProps}
204
207
  foldersPath={foldersPath}
205
208
  isUpButtonDisabled={isBreadcrumbButtonDisabled}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentExplorerHeaderActions.js","names":["PropTypes","React","Component","injectIntl","ContentExplorerSearch","ContentExplorerNewFolderButton","ContentExplorerBreadcrumbs","ContentExplorerFolderTreeBreadcrumbs","BreadcrumbPropType","ContentExplorerModePropType","FoldersPathPropType","messages","SEARCH_RESULTS_FOLDER_ID","isSearchResultsFolder","folder","id","ContentExplorerHeaderActions","constructor","props","_defineProperty","folderPathIndex","event","foldersPath","onEnterFolder","clickedFolder","preventDefault","length","submitSearch","lastSubmittedSearchInput","newFolderIndex","isViewingSearchResults","exitSearch","handleBreadcrumbClick","input","setState","searchInput","state","foldersPathBeforeSearch","getCurrentFolder","isInSearchMode","some","onFoldersPathUpdated","onExitSearch","foldersPathLength","folderBeforeSearch","intl","onSearchSubmit","name","formatMessage","searchResults","render","breadcrumbProps","children","contentExplorerMode","customInput","CustomInput","onCreateNewFolderButtonClick","showCreateNewFolderButton","isCreateNewFolderAllowed","hasFolderTreeBreadcrumbs","numTotalItems","searchInputProps","isBreadcrumbButtonDisabled","createElement","className","inputValue","onClearButtonClick","handleClearSearchButtonClick","onInput","handleSearchInput","onSubmit","handleSubmitSearch","onClick","isDisabled","isFolderTreeButtonHidden","onBreadcrumbClick","isUpButtonDisabled","onUpButtonClick","handleBreadcrumbsUpButtonClick","node","isRequired","func","any","bool","number","object","ContentExplorerHeaderActionsBase"],"sources":["../../../../src/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { injectIntl } from 'react-intl';\n\nimport ContentExplorerSearch from './ContentExplorerSearch';\nimport ContentExplorerNewFolderButton from './ContentExplorerNewFolderButton';\nimport ContentExplorerBreadcrumbs from './ContentExplorerBreadcrumbs';\nimport ContentExplorerFolderTreeBreadcrumbs from './ContentExplorerFolderTreeBreadcrumbs';\n\nimport { BreadcrumbPropType, ContentExplorerModePropType, FoldersPathPropType } from '../prop-types';\nimport messages from '../messages';\n\nconst SEARCH_RESULTS_FOLDER_ID = 'search_results_id';\n\nconst isSearchResultsFolder = folder => folder && folder.id === SEARCH_RESULTS_FOLDER_ID;\n\nclass ContentExplorerHeaderActions extends Component {\n static propTypes = {\n breadcrumbProps: BreadcrumbPropType,\n children: PropTypes.node,\n contentExplorerMode: ContentExplorerModePropType.isRequired,\n customInput: PropTypes.func,\n foldersPath: FoldersPathPropType.isRequired,\n intl: PropTypes.any,\n onFoldersPathUpdated: PropTypes.func.isRequired,\n onEnterFolder: PropTypes.func.isRequired,\n onCreateNewFolderButtonClick: PropTypes.func,\n showCreateNewFolderButton: PropTypes.bool,\n isCreateNewFolderAllowed: PropTypes.bool,\n hasFolderTreeBreadcrumbs: PropTypes.bool,\n onSearchSubmit: PropTypes.func.isRequired,\n onExitSearch: PropTypes.func.isRequired,\n numTotalItems: PropTypes.number,\n searchInputProps: PropTypes.object,\n };\n\n static defaultProps = {\n showCreateNewFolderButton: true,\n isCreateNewFolderAllowed: true,\n searchInputProps: {},\n };\n\n constructor(props) {\n super(props);\n this.state = {\n searchInput: '',\n };\n this.foldersPathBeforeSearch = [];\n this.lastSubmittedSearchInput = '';\n }\n\n getCurrentFolder() {\n const { foldersPath } = this.props;\n return foldersPath[foldersPath.length - 1];\n }\n\n isInSearchMode() {\n const { foldersPath } = this.props;\n return foldersPath.some(isSearchResultsFolder);\n }\n\n isViewingSearchResults() {\n return isSearchResultsFolder(this.getCurrentFolder());\n }\n\n handleBreadcrumbClick = (folderPathIndex, event) => {\n const { foldersPath, onEnterFolder } = this.props;\n const clickedFolder = foldersPath[folderPathIndex];\n\n if (event) {\n event.preventDefault();\n }\n\n // Do nothing if the right-most breadcrumb (current folder) is clicked\n if (folderPathIndex === foldersPath.length - 1) {\n return;\n }\n\n // Show the search results for the last submitted input when clicking the \"Search Results\" breadcrumb\n if (isSearchResultsFolder(clickedFolder)) {\n this.submitSearch(this.lastSubmittedSearchInput);\n return;\n }\n\n onEnterFolder(clickedFolder);\n };\n\n handleBreadcrumbsUpButtonClick = () => {\n const { foldersPath } = this.props;\n const newFolderIndex = foldersPath.length - 2;\n\n if (this.isViewingSearchResults()) {\n this.exitSearch();\n } else if (newFolderIndex >= 0) {\n this.handleBreadcrumbClick(newFolderIndex);\n }\n };\n\n handleSearchInput = input => {\n this.setState({\n searchInput: input,\n });\n };\n\n handleClearSearchButtonClick = () => {\n this.exitSearch();\n };\n\n exitSearch() {\n const { onFoldersPathUpdated, onExitSearch } = this.props;\n\n // Clear the search input even if we aren't in search mode\n this.setState({ searchInput: '' });\n\n if (this.isInSearchMode()) {\n const foldersPathLength = this.foldersPathBeforeSearch.length;\n const folderBeforeSearch = foldersPathLength > 0 ? this.foldersPathBeforeSearch[foldersPathLength - 1] : {};\n onFoldersPathUpdated(this.foldersPathBeforeSearch);\n onExitSearch(folderBeforeSearch);\n }\n }\n\n handleSubmitSearch = () => {\n const { searchInput } = this.state;\n\n this.submitSearch(searchInput);\n };\n\n submitSearch(searchInput) {\n const { foldersPath, intl, onFoldersPathUpdated, onSearchSubmit } = this.props;\n\n if (searchInput) {\n // Only save folders path if we aren't already in search mode\n if (!this.isInSearchMode()) {\n this.foldersPathBeforeSearch = foldersPath;\n }\n\n this.lastSubmittedSearchInput = searchInput;\n onFoldersPathUpdated([\n {\n id: SEARCH_RESULTS_FOLDER_ID,\n name: intl.formatMessage(messages.searchResults),\n },\n ]);\n\n onSearchSubmit(searchInput);\n } else {\n this.exitSearch();\n }\n }\n\n render() {\n const {\n breadcrumbProps,\n children,\n contentExplorerMode,\n customInput: CustomInput,\n foldersPath,\n onCreateNewFolderButtonClick,\n showCreateNewFolderButton,\n isCreateNewFolderAllowed,\n hasFolderTreeBreadcrumbs,\n numTotalItems,\n searchInputProps,\n } = this.props;\n const { searchInput } = this.state;\n const isInSearchMode = this.isInSearchMode();\n const isBreadcrumbButtonDisabled = foldersPath.length <= 1 && !isInSearchMode;\n\n return (\n <div className=\"content-explorer-header-actions\">\n <div className=\"content-explorer-search-new-folder-container\">\n {CustomInput ? (\n <CustomInput />\n ) : (\n <ContentExplorerSearch\n inputValue={searchInput}\n onClearButtonClick={this.handleClearSearchButtonClick}\n onInput={this.handleSearchInput}\n onSubmit={this.handleSubmitSearch}\n searchInputProps={searchInputProps}\n />\n )}\n {showCreateNewFolderButton && (\n <ContentExplorerNewFolderButton\n contentExplorerMode={contentExplorerMode}\n onClick={onCreateNewFolderButtonClick}\n isDisabled={!isCreateNewFolderAllowed || isInSearchMode}\n isCreateNewFolderAllowed={isCreateNewFolderAllowed}\n />\n )}\n {children}\n </div>\n {hasFolderTreeBreadcrumbs ? (\n <ContentExplorerFolderTreeBreadcrumbs\n foldersPath={foldersPath}\n isFolderTreeButtonHidden={isBreadcrumbButtonDisabled || this.isViewingSearchResults()}\n numTotalItems={numTotalItems}\n onBreadcrumbClick={this.handleBreadcrumbClick}\n />\n ) : (\n <ContentExplorerBreadcrumbs\n breadcrumbProps={breadcrumbProps}\n foldersPath={foldersPath}\n isUpButtonDisabled={isBreadcrumbButtonDisabled}\n onUpButtonClick={this.handleBreadcrumbsUpButtonClick}\n onBreadcrumbClick={this.handleBreadcrumbClick}\n />\n )}\n </div>\n );\n }\n}\n\nexport { ContentExplorerHeaderActions as ContentExplorerHeaderActionsBase };\nexport default injectIntl(ContentExplorerHeaderActions);\n"],"mappings":";;;AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,UAAU,QAAQ,YAAY;AAEvC,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,8BAA8B,MAAM,kCAAkC;AAC7E,OAAOC,0BAA0B,MAAM,8BAA8B;AACrE,OAAOC,oCAAoC,MAAM,wCAAwC;AAEzF,SAASC,kBAAkB,EAAEC,2BAA2B,EAAEC,mBAAmB,QAAQ,eAAe;AACpG,OAAOC,QAAQ,MAAM,aAAa;AAElC,MAAMC,wBAAwB,GAAG,mBAAmB;AAEpD,MAAMC,qBAAqB,GAAGC,MAAM,IAAIA,MAAM,IAAIA,MAAM,CAACC,EAAE,KAAKH,wBAAwB;AAExF,MAAMI,4BAA4B,SAASd,SAAS,CAAC;EA0BjDe,WAAWA,CAACC,KAAK,EAAE;IACf,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,gCAsBO,CAACC,eAAe,EAAEC,KAAK,KAAK;MAChD,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D,UAAU;EACzCtC,YAAY,EAAE1C,SAAS,CAACiF,IAAI,CAACD,UAAU;EACvCpB,aAAa,EAAE5D,SAAS,CAACoF,MAAM;EAC/BvB,gBAAgB,EAAE7D,SAAS,CAACqF;AAChC,CAAC;AAAAlE,eAAA,CAlBCH,4BAA4B,kBAoBR;EAClByC,yBAAyB,EAAE,IAAI;EAC/BC,wBAAwB,EAAE,IAAI;EAC9BG,gBAAgB,EAAE,CAAC;AACvB,CAAC;AA8KL,SAAS7C,4BAA4B,IAAIsE,gCAAgC;AACzE,eAAenF,UAAU,CAACa,4BAA4B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ContentExplorerHeaderActions.js","names":["PropTypes","React","Component","injectIntl","ContentExplorerSearch","ContentExplorerNewFolderButton","ContentExplorerBreadcrumbs","ContentExplorerFolderTreeBreadcrumbs","BreadcrumbPropType","ContentExplorerModePropType","FoldersPathPropType","messages","SEARCH_RESULTS_FOLDER_ID","isSearchResultsFolder","folder","id","ContentExplorerHeaderActions","constructor","props","_defineProperty","folderPathIndex","event","foldersPath","onEnterFolder","clickedFolder","preventDefault","length","submitSearch","lastSubmittedSearchInput","newFolderIndex","isViewingSearchResults","exitSearch","handleBreadcrumbClick","input","setState","searchInput","state","foldersPathBeforeSearch","getCurrentFolder","isInSearchMode","some","onFoldersPathUpdated","onExitSearch","foldersPathLength","folderBeforeSearch","intl","onSearchSubmit","name","formatMessage","searchResults","render","breadcrumbIcon","breadcrumbProps","children","contentExplorerMode","customInput","CustomInput","onCreateNewFolderButtonClick","showCreateNewFolderButton","isCreateNewFolderAllowed","hasFolderTreeBreadcrumbs","numTotalItems","searchInputProps","isBreadcrumbButtonDisabled","createElement","className","inputValue","onClearButtonClick","handleClearSearchButtonClick","onInput","handleSearchInput","onSubmit","handleSubmitSearch","onClick","isDisabled","isFolderTreeButtonHidden","onBreadcrumbClick","isUpButtonDisabled","onUpButtonClick","handleBreadcrumbsUpButtonClick","element","node","isRequired","func","any","bool","number","object","ContentExplorerHeaderActionsBase"],"sources":["../../../../src/features/content-explorer/content-explorer/ContentExplorerHeaderActions.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport { injectIntl } from 'react-intl';\n\nimport ContentExplorerSearch from './ContentExplorerSearch';\nimport ContentExplorerNewFolderButton from './ContentExplorerNewFolderButton';\nimport ContentExplorerBreadcrumbs from './ContentExplorerBreadcrumbs';\nimport ContentExplorerFolderTreeBreadcrumbs from './ContentExplorerFolderTreeBreadcrumbs';\n\nimport { BreadcrumbPropType, ContentExplorerModePropType, FoldersPathPropType } from '../prop-types';\nimport messages from '../messages';\n\nconst SEARCH_RESULTS_FOLDER_ID = 'search_results_id';\n\nconst isSearchResultsFolder = folder => folder && folder.id === SEARCH_RESULTS_FOLDER_ID;\n\nclass ContentExplorerHeaderActions extends Component {\n static propTypes = {\n breadcrumbIcon: PropTypes.element,\n breadcrumbProps: BreadcrumbPropType,\n children: PropTypes.node,\n contentExplorerMode: ContentExplorerModePropType.isRequired,\n customInput: PropTypes.func,\n foldersPath: FoldersPathPropType.isRequired,\n intl: PropTypes.any,\n onFoldersPathUpdated: PropTypes.func.isRequired,\n onEnterFolder: PropTypes.func.isRequired,\n onCreateNewFolderButtonClick: PropTypes.func,\n showCreateNewFolderButton: PropTypes.bool,\n isCreateNewFolderAllowed: PropTypes.bool,\n hasFolderTreeBreadcrumbs: PropTypes.bool,\n onSearchSubmit: PropTypes.func.isRequired,\n onExitSearch: PropTypes.func.isRequired,\n numTotalItems: PropTypes.number,\n searchInputProps: PropTypes.object,\n };\n\n static defaultProps = {\n showCreateNewFolderButton: true,\n isCreateNewFolderAllowed: true,\n searchInputProps: {},\n };\n\n constructor(props) {\n super(props);\n this.state = {\n searchInput: '',\n };\n this.foldersPathBeforeSearch = [];\n this.lastSubmittedSearchInput = '';\n }\n\n getCurrentFolder() {\n const { foldersPath } = this.props;\n return foldersPath[foldersPath.length - 1];\n }\n\n isInSearchMode() {\n const { foldersPath } = this.props;\n return foldersPath.some(isSearchResultsFolder);\n }\n\n isViewingSearchResults() {\n return isSearchResultsFolder(this.getCurrentFolder());\n }\n\n handleBreadcrumbClick = (folderPathIndex, event) => {\n const { foldersPath, onEnterFolder } = this.props;\n const clickedFolder = foldersPath[folderPathIndex];\n\n if (event) {\n event.preventDefault();\n }\n\n // Do nothing if the right-most breadcrumb (current folder) is clicked\n if (folderPathIndex === foldersPath.length - 1) {\n return;\n }\n\n // Show the search results for the last submitted input when clicking the \"Search Results\" breadcrumb\n if (isSearchResultsFolder(clickedFolder)) {\n this.submitSearch(this.lastSubmittedSearchInput);\n return;\n }\n\n onEnterFolder(clickedFolder);\n };\n\n handleBreadcrumbsUpButtonClick = () => {\n const { foldersPath } = this.props;\n const newFolderIndex = foldersPath.length - 2;\n\n if (this.isViewingSearchResults()) {\n this.exitSearch();\n } else if (newFolderIndex >= 0) {\n this.handleBreadcrumbClick(newFolderIndex);\n }\n };\n\n handleSearchInput = input => {\n this.setState({\n searchInput: input,\n });\n };\n\n handleClearSearchButtonClick = () => {\n this.exitSearch();\n };\n\n exitSearch() {\n const { onFoldersPathUpdated, onExitSearch } = this.props;\n\n // Clear the search input even if we aren't in search mode\n this.setState({ searchInput: '' });\n\n if (this.isInSearchMode()) {\n const foldersPathLength = this.foldersPathBeforeSearch.length;\n const folderBeforeSearch = foldersPathLength > 0 ? this.foldersPathBeforeSearch[foldersPathLength - 1] : {};\n onFoldersPathUpdated(this.foldersPathBeforeSearch);\n onExitSearch(folderBeforeSearch);\n }\n }\n\n handleSubmitSearch = () => {\n const { searchInput } = this.state;\n\n this.submitSearch(searchInput);\n };\n\n submitSearch(searchInput) {\n const { foldersPath, intl, onFoldersPathUpdated, onSearchSubmit } = this.props;\n\n if (searchInput) {\n // Only save folders path if we aren't already in search mode\n if (!this.isInSearchMode()) {\n this.foldersPathBeforeSearch = foldersPath;\n }\n\n this.lastSubmittedSearchInput = searchInput;\n onFoldersPathUpdated([\n {\n id: SEARCH_RESULTS_FOLDER_ID,\n name: intl.formatMessage(messages.searchResults),\n },\n ]);\n\n onSearchSubmit(searchInput);\n } else {\n this.exitSearch();\n }\n }\n\n render() {\n const {\n breadcrumbIcon,\n breadcrumbProps,\n children,\n contentExplorerMode,\n customInput: CustomInput,\n foldersPath,\n onCreateNewFolderButtonClick,\n showCreateNewFolderButton,\n isCreateNewFolderAllowed,\n hasFolderTreeBreadcrumbs,\n numTotalItems,\n searchInputProps,\n } = this.props;\n const { searchInput } = this.state;\n const isInSearchMode = this.isInSearchMode();\n const isBreadcrumbButtonDisabled = foldersPath.length <= 1 && !isInSearchMode;\n\n return (\n <div className=\"content-explorer-header-actions\">\n <div className=\"content-explorer-search-new-folder-container\">\n {CustomInput ? (\n <CustomInput />\n ) : (\n <ContentExplorerSearch\n inputValue={searchInput}\n onClearButtonClick={this.handleClearSearchButtonClick}\n onInput={this.handleSearchInput}\n onSubmit={this.handleSubmitSearch}\n searchInputProps={searchInputProps}\n />\n )}\n {showCreateNewFolderButton && (\n <ContentExplorerNewFolderButton\n contentExplorerMode={contentExplorerMode}\n onClick={onCreateNewFolderButtonClick}\n isDisabled={!isCreateNewFolderAllowed || isInSearchMode}\n isCreateNewFolderAllowed={isCreateNewFolderAllowed}\n />\n )}\n {children}\n </div>\n {hasFolderTreeBreadcrumbs ? (\n <ContentExplorerFolderTreeBreadcrumbs\n foldersPath={foldersPath}\n isFolderTreeButtonHidden={isBreadcrumbButtonDisabled || this.isViewingSearchResults()}\n numTotalItems={numTotalItems}\n onBreadcrumbClick={this.handleBreadcrumbClick}\n />\n ) : (\n <ContentExplorerBreadcrumbs\n breadcrumbIcon={breadcrumbIcon}\n breadcrumbProps={breadcrumbProps}\n foldersPath={foldersPath}\n isUpButtonDisabled={isBreadcrumbButtonDisabled}\n onUpButtonClick={this.handleBreadcrumbsUpButtonClick}\n onBreadcrumbClick={this.handleBreadcrumbClick}\n />\n )}\n </div>\n );\n }\n}\n\nexport { ContentExplorerHeaderActions as ContentExplorerHeaderActionsBase };\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Array<React.ComponentType<Column>>,
15
+ breadcrumbIcon?: React.ComponentType<any>,
15
16
  breadcrumbProps?: BreadcrumbProps,
16
17
  className?: string,
17
18
  controlledSelectedItems?: Object,
@@ -36,6 +37,7 @@ type Props = {
36
37
  shouldNotUsePortal?: boolean,
37
38
  title?: string,
38
39
  infoNoticeText?: string,
40
+ noItemsRenderer?: Function,
39
41
  };
40
42
 
41
43
  const ContentExplorerModal = ({
@@ -1 +1 @@
1
- {"version":3,"file":"ContentExplorerModal.js","names":["React","classNames","Column","ContentExplorer","Modal","ContentExplorerModal","_ref","breadcrumbProps","className","customInput","title","description","isOpen","isResponsive","onRequestClose","onSelectedClick","onSelectItem","shouldNotUsePortal","infoNoticeText","rest","_objectWithoutProperties","_excluded","createElement","_extends","onCancelButtonClick","listWidth","listHeight"],"sources":["../../../../src/features/content-explorer/content-explorer-modal/ContentExplorerModal.js"],"sourcesContent":["/* @flow */\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport Column from '@box/react-virtualized/dist/commonjs/Table/Column';\nimport ContentExplorer from '../content-explorer';\nimport { Modal } from '../../../components/modal';\n\nimport type { BreadcrumbProps } from '../../../components/breadcrumb/Breadcrumb';\n\nimport './ContentExplorerModal.scss';\n\ntype Props = {\n additionalColumns?: Array<React.ComponentType<Column>>,\n breadcrumbProps?: BreadcrumbProps,\n className?: string,\n controlledSelectedItems?: Object,\n customInput?: React.ComponentType<any>,\n description?: string,\n hasFolderTreeBreadcrumbs: boolean,\n includeSubfoldersProps?: Object,\n isNoSelectionAllowed?: boolean,\n isOpen?: boolean,\n isResponsive?: boolean,\n itemButtonRenderer: Function,\n itemRowHeight?: number,\n itemRowRenderer?: Function,\n listHeaderHeight?: number,\n listHeaderRenderer?: Function,\n onFoldersPathUpdate?: Function,\n onRequestClose?: Function,\n onSelectItem?: (item: Object, index: number) => void,\n onSelectedClick?: () => void,\n onSelectedItemsUpdate?: Function,\n onViewSelectedClick?: Function,\n shouldNotUsePortal?: boolean,\n title?: string,\n infoNoticeText?: string,\n};\n\nconst ContentExplorerModal = ({\n breadcrumbProps = {},\n className = '',\n customInput,\n title = '',\n description = '',\n isOpen = false,\n isResponsive = false,\n onRequestClose,\n onSelectedClick,\n onSelectItem,\n shouldNotUsePortal = false,\n infoNoticeText = '',\n ...rest\n}: Props) => (\n <Modal\n title={title}\n className={classNames('content-explorer-modal', className, {\n 'bdl-ContentExplorerModal--responsive': isResponsive,\n })}\n isOpen={isOpen}\n onRequestClose={onRequestClose}\n shouldNotUsePortal={shouldNotUsePortal}\n >\n {description}\n <ContentExplorer\n breadcrumbProps={breadcrumbProps}\n customInput={customInput}\n isResponsive={isResponsive}\n onCancelButtonClick={onRequestClose}\n onSelectedClick={onSelectedClick}\n onSelectItem={onSelectItem}\n listWidth={560}\n listHeight={285}\n infoNoticeText={infoNoticeText}\n {...rest}\n />\n </Modal>\n);\n\nexport default ContentExplorerModal;\n"],"mappings":";;;;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,MAAM,MAAM,mDAAmD;AACtE,OAAOC,eAAe,MAAM,qBAAqB;AACjD,SAASC,KAAK,QAAQ,2BAA2B;AAIjD,OAAO,6BAA6B;AA8BpC,MAAMC,oBAAoB,GAAGC,IAAA;EAAA,IAAC;MAC1BC,eAAe,GAAG,CAAC,CAAC;MACpBC,SAAS,GAAG,EAAE;MACdC,WAAW;MACXC,KAAK,GAAG,EAAE;MACVC,WAAW,GAAG,EAAE;MAChBC,MAAM,GAAG,KAAK;MACdC,YAAY,GAAG,KAAK;MACpBC,cAAc;MACdC,eAAe;MACfC,YAAY;MACZC,kBAAkB,GAAG,KAAK;MAC1BC,cAAc,GAAG;IAEd,CAAC,GAAAZ,IAAA;IADDa,IAAI,GAAAC,wBAAA,CAAAd,IAAA,EAAAe,SAAA;EAAA,oBAEPrB,KAAA,CAAAsB,aAAA,CAAClB,KAAK;IACFM,KAAK,EAAEA,KAAM;IACbF,SAAS,EAAEP,UAAU,CAAC,wBAAwB,EAAEO,SAAS,EAAE;MACvD,sCAAsC,EAAEK;IAC5C,CAAC,CAAE;IACHD,MAAM,EAAEA,MAAO;IACfE,cAAc,EAAEA,cAAe;IAC/BG,kBAAkB,EAAEA;EAAmB,GAEtCN,WAAW,eACZX,KAAA,CAAAsB,aAAA,CAACnB,eAAe,EAAAoB,QAAA;IACZhB,eAAe,EAAEA,eAAgB;IACjCE,WAAW,EAAEA,WAAY;IACzBI,YAAY,EAAEA,YAAa;IAC3BW,mBAAmB,EAAEV,cAAe;IACpCC,eAAe,EAAEA,eAAgB;IACjCC,YAAY,EAAEA,YAAa;IAC3BS,SAAS,EAAE,GAAI;IACfC,UAAU,EAAE,GAAI;IAChBR,cAAc,EAAEA;EAAe,GAC3BC,IAAI,CACX,CACE,CAAC;AAAA,CACX;AAED,eAAed,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"ContentExplorerModal.js","names":["React","classNames","Column","ContentExplorer","Modal","ContentExplorerModal","_ref","breadcrumbProps","className","customInput","title","description","isOpen","isResponsive","onRequestClose","onSelectedClick","onSelectItem","shouldNotUsePortal","infoNoticeText","rest","_objectWithoutProperties","_excluded","createElement","_extends","onCancelButtonClick","listWidth","listHeight"],"sources":["../../../../src/features/content-explorer/content-explorer-modal/ContentExplorerModal.js"],"sourcesContent":["/* @flow */\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport Column from '@box/react-virtualized/dist/commonjs/Table/Column';\nimport ContentExplorer from '../content-explorer';\nimport { Modal } from '../../../components/modal';\n\nimport type { BreadcrumbProps } from '../../../components/breadcrumb/Breadcrumb';\n\nimport './ContentExplorerModal.scss';\n\ntype Props = {\n additionalColumns?: Array<React.ComponentType<Column>>,\n breadcrumbIcon?: React.ComponentType<any>,\n breadcrumbProps?: BreadcrumbProps,\n className?: string,\n controlledSelectedItems?: Object,\n customInput?: React.ComponentType<any>,\n description?: string,\n hasFolderTreeBreadcrumbs: boolean,\n includeSubfoldersProps?: Object,\n isNoSelectionAllowed?: boolean,\n isOpen?: boolean,\n isResponsive?: boolean,\n itemButtonRenderer: Function,\n itemRowHeight?: number,\n itemRowRenderer?: Function,\n listHeaderHeight?: number,\n listHeaderRenderer?: Function,\n onFoldersPathUpdate?: Function,\n onRequestClose?: Function,\n onSelectItem?: (item: Object, index: number) => void,\n onSelectedClick?: () => void,\n onSelectedItemsUpdate?: Function,\n onViewSelectedClick?: Function,\n shouldNotUsePortal?: boolean,\n title?: string,\n infoNoticeText?: string,\n noItemsRenderer?: Function,\n};\n\nconst ContentExplorerModal = ({\n breadcrumbProps = {},\n className = '',\n customInput,\n title = '',\n description = '',\n isOpen = false,\n isResponsive = false,\n onRequestClose,\n onSelectedClick,\n onSelectItem,\n shouldNotUsePortal = false,\n infoNoticeText = '',\n ...rest\n}: Props) => (\n <Modal\n title={title}\n className={classNames('content-explorer-modal', className, {\n 'bdl-ContentExplorerModal--responsive': isResponsive,\n })}\n isOpen={isOpen}\n onRequestClose={onRequestClose}\n shouldNotUsePortal={shouldNotUsePortal}\n >\n {description}\n <ContentExplorer\n breadcrumbProps={breadcrumbProps}\n customInput={customInput}\n isResponsive={isResponsive}\n onCancelButtonClick={onRequestClose}\n onSelectedClick={onSelectedClick}\n onSelectItem={onSelectItem}\n listWidth={560}\n listHeight={285}\n infoNoticeText={infoNoticeText}\n {...rest}\n />\n </Modal>\n);\n\nexport default ContentExplorerModal;\n"],"mappings":";;;;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,MAAM,MAAM,mDAAmD;AACtE,OAAOC,eAAe,MAAM,qBAAqB;AACjD,SAASC,KAAK,QAAQ,2BAA2B;AAIjD,OAAO,6BAA6B;AAgCpC,MAAMC,oBAAoB,GAAGC,IAAA;EAAA,IAAC;MAC1BC,eAAe,GAAG,CAAC,CAAC;MACpBC,SAAS,GAAG,EAAE;MACdC,WAAW;MACXC,KAAK,GAAG,EAAE;MACVC,WAAW,GAAG,EAAE;MAChBC,MAAM,GAAG,KAAK;MACdC,YAAY,GAAG,KAAK;MACpBC,cAAc;MACdC,eAAe;MACfC,YAAY;MACZC,kBAAkB,GAAG,KAAK;MAC1BC,cAAc,GAAG;IAEd,CAAC,GAAAZ,IAAA;IADDa,IAAI,GAAAC,wBAAA,CAAAd,IAAA,EAAAe,SAAA;EAAA,oBAEPrB,KAAA,CAAAsB,aAAA,CAAClB,KAAK;IACFM,KAAK,EAAEA,KAAM;IACbF,SAAS,EAAEP,UAAU,CAAC,wBAAwB,EAAEO,SAAS,EAAE;MACvD,sCAAsC,EAAEK;IAC5C,CAAC,CAAE;IACHD,MAAM,EAAEA,MAAO;IACfE,cAAc,EAAEA,cAAe;IAC/BG,kBAAkB,EAAEA;EAAmB,GAEtCN,WAAW,eACZX,KAAA,CAAAsB,aAAA,CAACnB,eAAe,EAAAoB,QAAA;IACZhB,eAAe,EAAEA,eAAgB;IACjCE,WAAW,EAAEA,WAAY;IACzBI,YAAY,EAAEA,YAAa;IAC3BW,mBAAmB,EAAEV,cAAe;IACpCC,eAAe,EAAEA,eAAgB;IACjCC,YAAY,EAAEA,YAAa;IAC3BS,SAAS,EAAE,GAAI;IACfC,UAAU,EAAE,GAAI;IAChBR,cAAc,EAAEA;EAAe,GAC3BC,IAAI,CACX,CACE,CAAC;AAAA,CACX;AAED,eAAed,oBAAoB","ignoreList":[]}
@@ -110,6 +110,8 @@ _defineProperty(ContentExplorerModalContainer, "propTypes", {
110
110
  additionalColumns: PropTypes.arrayOf(PropTypes.element),
111
111
  /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */
112
112
  isNoSelectionAllowed: PropTypes.bool,
113
+ /** Custom icon for the breadcrumb. Overrides the default icon */
114
+ breadcrumbIcon: PropTypes.element,
113
115
  /** Breadcrumb component options */
114
116
  breadcrumbProps: BreadcrumbPropType,
115
117
  /** Adds class name. */
@@ -247,7 +249,9 @@ _defineProperty(ContentExplorerModalContainer, "propTypes", {
247
249
  /** Custom text for the choose button */
248
250
  chooseButtonText: PropTypes.node,
249
251
  /** Text for the informational notice, defaults to empty string, which makes notice not visible */
250
- infoNoticeText: PropTypes.string
252
+ infoNoticeText: PropTypes.string,
253
+ /** Used to render the no items state. Overrides the default no items state. */
254
+ noItemsRenderer: PropTypes.func
251
255
  });
252
256
  _defineProperty(ContentExplorerModalContainer, "defaultProps", {
253
257
  onCreateFolderSubmit: () => {}
@@ -15,6 +15,8 @@ class ContentExplorerModalContainer extends Component {
15
15
  additionalColumns: PropTypes.arrayOf(PropTypes.element),
16
16
  /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */
17
17
  isNoSelectionAllowed: PropTypes.bool,
18
+ /** Custom icon for the breadcrumb. Overrides the default icon */
19
+ breadcrumbIcon: PropTypes.element,
18
20
  /** Breadcrumb component options */
19
21
  breadcrumbProps: BreadcrumbPropType,
20
22
  /** Adds class name. */
@@ -153,6 +155,8 @@ class ContentExplorerModalContainer extends Component {
153
155
  chooseButtonText: PropTypes.node,
154
156
  /** Text for the informational notice, defaults to empty string, which makes notice not visible */
155
157
  infoNoticeText: PropTypes.string,
158
+ /** Used to render the no items state. Overrides the default no items state. */
159
+ noItemsRenderer: PropTypes.func,
156
160
  };
157
161
 
158
162
  static defaultProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"ContentExplorerModalContainer.js","names":["PropTypes","React","Component","classNames","BreadcrumbPropType","ContentExplorerModePropType","FoldersPathPropType","ItemsPropType","ContentExplorerModal","NewFolderModal","ContentExplorerModalContainer","constructor","props","_defineProperty","enteredFolder","newFoldersPath","onEnterFolder","setState","foldersPath","onNewFolderModalShown","isNewFolderModalOpen","onNewFolderModalClosed","state","initialFoldersPath","componentDidUpdate","prevInitialFoldersPath","render","_this$props","className","modalTitle","modalDescription","onCreateFolderSubmit","onCreateFolderInput","isCreatingFolder","createFolderError","shouldNotUsePortal","infoNoticeText","rest","_objectWithoutProperties","_excluded","currentFolder","length","createElement","_extends","title","description","isOpen","handleEnterFolder","onCreateNewFolderButtonClick","handleCreateNewFolderButtonClick","parentFolderName","name","onRequestClose","handleNewFolderModalClose","additionalColumns","arrayOf","element","isNoSelectionAllowed","bool","breadcrumbProps","string","hasFolderTreeBreadcrumbs","headerActionsAccessory","node","func","isRequired","onSelectedClick","onSelectItem","onViewSelectedClick","isSelectAllAllowed","contentExplorerMode","includeSubfoldersProps","object","initialSelectedItems","controlledSelectedItems","onFoldersPathUpdate","onSelectedItemsUpdate","onChooseItems","onMoveItem","onCopyItem","isCreateNewFolderAllowed","onSearchSubmit","onExitSearch","items","numItemsPerPage","number","numTotalItems","onLoadMoreItems","itemIconRenderer","itemNameLinkRenderer","itemButtonRenderer","itemRowHeight","itemRowRenderer","listHeaderHeight","listHeaderRenderer","showCreateNewFolderButton","searchInputProps","chooseButtonText"],"sources":["../../../../src/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport classNames from 'classnames';\n\nimport { BreadcrumbPropType, ContentExplorerModePropType, FoldersPathPropType, ItemsPropType } from '../prop-types';\nimport ContentExplorerModal from '../content-explorer-modal';\nimport NewFolderModal from '../new-folder-modal';\n\nclass ContentExplorerModalContainer extends Component {\n static propTypes = {\n /**\n * Extra columns displayed in the folders table after folder name column\n * Each column has to be a Column element\n */\n additionalColumns: PropTypes.arrayOf(PropTypes.element),\n /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */\n isNoSelectionAllowed: PropTypes.bool,\n /** Breadcrumb component options */\n breadcrumbProps: BreadcrumbPropType,\n /** Adds class name. */\n className: PropTypes.string,\n /** Whether the user can see the breadcrumbs represented with the folder tree button */\n hasFolderTreeBreadcrumbs: PropTypes.bool,\n /** Any extra items in the header to the right of the search input (and new folder button) */\n headerActionsAccessory: PropTypes.node,\n /** Title shown in the ContentExplorerModal. */\n modalTitle: PropTypes.string,\n /** Description text shown in the ContentExplorerModal. */\n modalDescription: PropTypes.string,\n /** Called when the ContentExplorerModal is closed. */\n onRequestClose: PropTypes.func.isRequired,\n /**\n * Called when the folder creation is submitted.\n *\n * @param {string} folderName\n */\n onCreateFolderSubmit: PropTypes.func,\n /**\n * Called with the latest folder name input.\n *\n * @param {string} folderName\n */\n onCreateFolderInput: PropTypes.func,\n /** Called when the NewFolderModal is shown. */\n onNewFolderModalShown: PropTypes.func,\n /** Called when the NewFolderModal is closed. */\n onNewFolderModalClosed: PropTypes.func,\n /** Called when selected button is clicked */\n onSelectedClick: PropTypes.func,\n /**\n * Called when an item is selected\n *\n * @param {Object} selectedItem\n * @param {number} selectedItemIndex\n */\n onSelectItem: PropTypes.func,\n /** Called when the number of items selected text is clicked */\n onViewSelectedClick: PropTypes.func,\n /** Folder is in the process of being created. */\n isCreatingFolder: PropTypes.bool,\n /** Whether the user can see select all checkbox */\n isSelectAllAllowed: PropTypes.bool,\n /** Message that will be shown when there was an error creating the folder. */\n createFolderError: PropTypes.string,\n /** Configures the content explorer based on the user's intended action (ex. select file or move/copy) */\n contentExplorerMode: ContentExplorerModePropType.isRequired,\n /** Props for the include subfolders toggle */\n includeSubfoldersProps: PropTypes.object,\n /** Initial path of folders. The last folder in the array is the current folder. */\n initialFoldersPath: FoldersPathPropType.isRequired,\n /** Initial items that will show up as selected */\n initialSelectedItems: PropTypes.object,\n /** Items that will show up as selected */\n controlledSelectedItems: PropTypes.object,\n /**\n * Called when the current folder changes\n *\n * @param {Object} enteredFolder\n * @param {Array} newFoldersPath\n */\n onEnterFolder: PropTypes.func.isRequired,\n /** Called when the folders path is updated\n *\n * @param {Array} newFoldersPath\n */\n onFoldersPathUpdate: PropTypes.func,\n /** Called whenever the selected items list changes\n *\n * @param {Object} selectedItems\n */\n onSelectedItemsUpdate: PropTypes.func,\n /**\n * Called when items are chosen.\n *\n * @param {Object[]} chosenItems In non-multi select mode, the chosenItems will be a 1 element array contain the one chosen item\n */\n onChooseItems: PropTypes.func,\n /**\n * Called when a destination folder has been selected for moving an item to\n *\n * @param {Object} destFolder destination folder\n */\n onMoveItem: PropTypes.func,\n /**\n * Called when a destination folder has been selected for copying an item to\n *\n * @param {Object} destFolder destination folder\n */\n onCopyItem: PropTypes.func,\n /** Whether the user has permission to create a new folder */\n isCreateNewFolderAllowed: PropTypes.bool,\n /**\n * Called when a search query is submitted.\n *\n * @param {string} searchQuery\n */\n onSearchSubmit: PropTypes.func.isRequired,\n /**\n * Called when search mode is exited. An updated items list should now be passed in to display the user's file tree.\n *\n * @param {Object} folderBeforeSearch the previous folder object before entering search mode\n */\n onExitSearch: PropTypes.func.isRequired,\n /** List of items to display */\n items: ItemsPropType.isRequired,\n /** Number of items to load per page as the user scrolls */\n numItemsPerPage: PropTypes.number,\n /** Total number of items across all pages */\n numTotalItems: PropTypes.number,\n /** Called to load more items */\n onLoadMoreItems: PropTypes.func,\n /** Used to render item icons in the list. Overrides the default icons. */\n itemIconRenderer: PropTypes.func,\n /** Used to render item name links in the list. Overrides the default links. */\n itemNameLinkRenderer: PropTypes.func,\n /** Used to render item buttons in the list. Overrides the default buttons. */\n itemButtonRenderer: PropTypes.func,\n /** Height of an item row */\n itemRowHeight: PropTypes.number,\n /** Used to render the row element for items on the list */\n itemRowRenderer: PropTypes.func,\n /** Height of the item list header, defaults to 0, which makes header not visible */\n listHeaderHeight: PropTypes.number,\n /** Used to render the header row on the item list */\n listHeaderRenderer: PropTypes.func,\n /** Whether the new folder button should be shown */\n showCreateNewFolderButton: PropTypes.bool,\n /** Whether the modals should be nested in a Portal or in a div */\n shouldNotUsePortal: PropTypes.bool,\n /** Props for the search input */\n searchInputProps: PropTypes.object,\n /** Custom text for the choose button */\n chooseButtonText: PropTypes.node,\n /** Text for the informational notice, defaults to empty string, which makes notice not visible */\n infoNoticeText: PropTypes.string,\n };\n\n static defaultProps = {\n onCreateFolderSubmit: () => {},\n };\n\n constructor(props) {\n super(props);\n this.state = {\n foldersPath: props.initialFoldersPath,\n isNewFolderModalOpen: false,\n };\n }\n\n componentDidUpdate({ initialFoldersPath: prevInitialFoldersPath }) {\n const { initialFoldersPath } = this.props;\n\n if (prevInitialFoldersPath !== initialFoldersPath) {\n // Close the new folder modal when the folders path has changed\n this.setState({\n foldersPath: initialFoldersPath,\n isNewFolderModalOpen: false,\n });\n }\n }\n\n handleEnterFolder = (enteredFolder, newFoldersPath) => {\n const { onEnterFolder } = this.props;\n\n this.setState({ foldersPath: newFoldersPath });\n onEnterFolder(enteredFolder, newFoldersPath);\n };\n\n handleCreateNewFolderButtonClick = () => {\n const { onNewFolderModalShown } = this.props;\n\n this.setState({ isNewFolderModalOpen: true }, () => onNewFolderModalShown && onNewFolderModalShown());\n };\n\n handleNewFolderModalClose = () => {\n const { onNewFolderModalClosed } = this.props;\n\n this.setState({ isNewFolderModalOpen: false }, () => onNewFolderModalClosed && onNewFolderModalClosed());\n };\n\n render() {\n const {\n className,\n modalTitle,\n modalDescription,\n onCreateFolderSubmit,\n onCreateFolderInput,\n isCreatingFolder,\n createFolderError,\n initialFoldersPath,\n shouldNotUsePortal,\n infoNoticeText,\n ...rest\n } = this.props;\n const { foldersPath, isNewFolderModalOpen } = this.state;\n const currentFolder = foldersPath[foldersPath.length - 1];\n\n return (\n <div className={classNames('content-explorer-modal-container', className)}>\n <ContentExplorerModal\n className={isNewFolderModalOpen ? 'hidden' : ''}\n title={modalTitle}\n description={modalDescription}\n initialFoldersPath={initialFoldersPath}\n isOpen\n onEnterFolder={this.handleEnterFolder}\n onCreateNewFolderButtonClick={this.handleCreateNewFolderButtonClick}\n shouldNotUsePortal={shouldNotUsePortal}\n infoNoticeText={infoNoticeText}\n {...rest}\n />\n {isNewFolderModalOpen && (\n <NewFolderModal\n isOpen\n parentFolderName={currentFolder.name}\n onRequestClose={this.handleNewFolderModalClose}\n onCreateFolderSubmit={onCreateFolderSubmit}\n onCreateFolderInput={onCreateFolderInput}\n isCreatingFolder={isCreatingFolder}\n createFolderError={createFolderError}\n shouldNotUsePortal={shouldNotUsePortal}\n />\n )}\n </div>\n );\n }\n}\n\nexport default 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AoB,EAAEzF,SAAS,CAACgE,IAAI;EACpC;EACA0B,kBAAkB,EAAE1F,SAAS,CAACgE,IAAI;EAClC;EACA2B,aAAa,EAAE3F,SAAS,CAACqF,MAAM;EAC/B;EACAO,eAAe,EAAE5F,SAAS,CAACgE,IAAI;EAC/B;EACA6B,gBAAgB,EAAE7F,SAAS,CAACqF,MAAM;EAClC;EACAS,kBAAkB,EAAE9F,SAAS,CAACgE,IAAI;EAClC;EACA+B,yBAAyB,EAAE/F,SAAS,CAAC0D,IAAI;EACzC;EACAvB,kBAAkB,EAAEnC,SAAS,CAAC0D,IAAI;EAClC;EACAsC,gBAAgB,EAAEhG,SAAS,CAACwE,MAAM;EAClC;EACAyB,gBAAgB,EAAEjG,SAAS,CAAC+D,IAAI;EAChC;EACA3B,cAAc,EAAEpC,SAAS,CAAC4D;AAC9B,CAAC;AAAA/C,eAAA,CAnJCH,6BAA6B,kBAqJT;EAClBqB,oBAAoB,EAAEA,CAAA,KAAM,CAAC;AACjC,CAAC;AAyFL,eAAerB,6BAA6B","ignoreList":[]}
1
+ {"version":3,"file":"ContentExplorerModalContainer.js","names":["PropTypes","React","Component","classNames","BreadcrumbPropType","ContentExplorerModePropType","FoldersPathPropType","ItemsPropType","ContentExplorerModal","NewFolderModal","ContentExplorerModalContainer","constructor","props","_defineProperty","enteredFolder","newFoldersPath","onEnterFolder","setState","foldersPath","onNewFolderModalShown","isNewFolderModalOpen","onNewFolderModalClosed","state","initialFoldersPath","componentDidUpdate","prevInitialFoldersPath","render","_this$props","className","modalTitle","modalDescription","onCreateFolderSubmit","onCreateFolderInput","isCreatingFolder","createFolderError","shouldNotUsePortal","infoNoticeText","rest","_objectWithoutProperties","_excluded","currentFolder","length","createElement","_extends","title","description","isOpen","handleEnterFolder","onCreateNewFolderButtonClick","handleCreateNewFolderButtonClick","parentFolderName","name","onRequestClose","handleNewFolderModalClose","additionalColumns","arrayOf","element","isNoSelectionAllowed","bool","breadcrumbIcon","breadcrumbProps","string","hasFolderTreeBreadcrumbs","headerActionsAccessory","node","func","isRequired","onSelectedClick","onSelectItem","onViewSelectedClick","isSelectAllAllowed","contentExplorerMode","includeSubfoldersProps","object","initialSelectedItems","controlledSelectedItems","onFoldersPathUpdate","onSelectedItemsUpdate","onChooseItems","onMoveItem","onCopyItem","isCreateNewFolderAllowed","onSearchSubmit","onExitSearch","items","numItemsPerPage","number","numTotalItems","onLoadMoreItems","itemIconRenderer","itemNameLinkRenderer","itemButtonRenderer","itemRowHeight","itemRowRenderer","listHeaderHeight","listHeaderRenderer","showCreateNewFolderButton","searchInputProps","chooseButtonText","noItemsRenderer"],"sources":["../../../../src/features/content-explorer/content-explorer-modal-container/ContentExplorerModalContainer.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { Component } from 'react';\nimport classNames from 'classnames';\n\nimport { BreadcrumbPropType, ContentExplorerModePropType, FoldersPathPropType, ItemsPropType } from '../prop-types';\nimport ContentExplorerModal from '../content-explorer-modal';\nimport NewFolderModal from '../new-folder-modal';\n\nclass ContentExplorerModalContainer extends Component {\n static propTypes = {\n /**\n * Extra columns displayed in the folders table after folder name column\n * Each column has to be a Column element\n */\n additionalColumns: PropTypes.arrayOf(PropTypes.element),\n /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */\n isNoSelectionAllowed: PropTypes.bool,\n /** Custom icon for the breadcrumb. Overrides the default icon */\n breadcrumbIcon: PropTypes.element,\n /** Breadcrumb component options */\n breadcrumbProps: BreadcrumbPropType,\n /** Adds class name. */\n className: PropTypes.string,\n /** Whether the user can see the breadcrumbs represented with the folder tree button */\n hasFolderTreeBreadcrumbs: PropTypes.bool,\n /** Any extra items in the header to the right of the search input (and new folder button) */\n headerActionsAccessory: PropTypes.node,\n /** Title shown in the ContentExplorerModal. */\n modalTitle: PropTypes.string,\n /** Description text shown in the ContentExplorerModal. */\n modalDescription: PropTypes.string,\n /** Called when the ContentExplorerModal is closed. */\n onRequestClose: PropTypes.func.isRequired,\n /**\n * Called when the folder creation is submitted.\n *\n * @param {string} folderName\n */\n onCreateFolderSubmit: PropTypes.func,\n /**\n * Called with the latest folder name input.\n *\n * @param {string} folderName\n */\n onCreateFolderInput: PropTypes.func,\n /** Called when the NewFolderModal is shown. */\n onNewFolderModalShown: PropTypes.func,\n /** Called when the NewFolderModal is closed. */\n onNewFolderModalClosed: PropTypes.func,\n /** Called when selected button is clicked */\n onSelectedClick: PropTypes.func,\n /**\n * Called when an item is selected\n *\n * @param {Object} selectedItem\n * @param {number} selectedItemIndex\n */\n onSelectItem: PropTypes.func,\n /** Called when the number of items selected text is clicked */\n onViewSelectedClick: PropTypes.func,\n /** Folder is in the process of being created. */\n isCreatingFolder: PropTypes.bool,\n /** Whether the user can see select all checkbox */\n isSelectAllAllowed: PropTypes.bool,\n /** Message that will be shown when there was an error creating the folder. */\n createFolderError: PropTypes.string,\n /** Configures the content explorer based on the user's intended action (ex. select file or move/copy) */\n contentExplorerMode: ContentExplorerModePropType.isRequired,\n /** Props for the include subfolders toggle */\n includeSubfoldersProps: PropTypes.object,\n /** Initial path of folders. The last folder in the array is the current folder. */\n initialFoldersPath: FoldersPathPropType.isRequired,\n /** Initial items that will show up as selected */\n initialSelectedItems: PropTypes.object,\n /** Items that will show up as selected */\n controlledSelectedItems: PropTypes.object,\n /**\n * Called when the current folder changes\n *\n * @param {Object} enteredFolder\n * @param {Array} newFoldersPath\n */\n onEnterFolder: PropTypes.func.isRequired,\n /** Called when the folders path is updated\n *\n * @param {Array} newFoldersPath\n */\n onFoldersPathUpdate: PropTypes.func,\n /** Called whenever the selected items list changes\n *\n * @param {Object} selectedItems\n */\n onSelectedItemsUpdate: PropTypes.func,\n /**\n * Called when items are chosen.\n *\n * @param {Object[]} chosenItems In non-multi select mode, the chosenItems will be a 1 element array contain the one chosen item\n */\n onChooseItems: PropTypes.func,\n /**\n * Called when a destination folder has been selected for moving an item to\n *\n * @param {Object} destFolder destination folder\n */\n onMoveItem: PropTypes.func,\n /**\n * Called when a destination folder has been selected for copying an item to\n *\n * @param {Object} destFolder destination folder\n */\n onCopyItem: PropTypes.func,\n /** Whether the user has permission to create a new folder */\n isCreateNewFolderAllowed: PropTypes.bool,\n /**\n * Called when a search query is submitted.\n *\n * @param {string} searchQuery\n */\n onSearchSubmit: PropTypes.func.isRequired,\n /**\n * Called when search mode is exited. An updated items list should now be passed in to display the user's file tree.\n *\n * @param {Object} folderBeforeSearch the previous folder object before entering search mode\n */\n onExitSearch: PropTypes.func.isRequired,\n /** List of items to display */\n items: ItemsPropType.isRequired,\n /** Number of items to load per page as the user scrolls */\n numItemsPerPage: PropTypes.number,\n /** Total number of items across all pages */\n numTotalItems: PropTypes.number,\n /** Called to load more items */\n onLoadMoreItems: PropTypes.func,\n /** Used to render item icons in the list. Overrides the default icons. */\n itemIconRenderer: PropTypes.func,\n /** Used to render item name links in the list. Overrides the default links. */\n itemNameLinkRenderer: PropTypes.func,\n /** Used to render item buttons in the list. Overrides the default buttons. */\n itemButtonRenderer: PropTypes.func,\n /** Height of an item row */\n itemRowHeight: PropTypes.number,\n /** Used to render the row element for items on the list */\n itemRowRenderer: PropTypes.func,\n /** Height of the item list header, defaults to 0, which makes header not visible */\n listHeaderHeight: PropTypes.number,\n /** Used to render the header row on the item list */\n listHeaderRenderer: PropTypes.func,\n /** Whether the new folder button should be shown */\n showCreateNewFolderButton: PropTypes.bool,\n /** Whether the modals should be nested in a Portal or in a div */\n shouldNotUsePortal: PropTypes.bool,\n /** Props for the search input */\n searchInputProps: PropTypes.object,\n /** Custom text for the choose button */\n chooseButtonText: PropTypes.node,\n /** Text for the informational notice, defaults to empty string, which makes notice not visible */\n infoNoticeText: PropTypes.string,\n /** Used to render the no items state. Overrides the default no items state. */\n noItemsRenderer: PropTypes.func,\n };\n\n static defaultProps = {\n onCreateFolderSubmit: () => {},\n };\n\n constructor(props) {\n super(props);\n this.state = {\n foldersPath: props.initialFoldersPath,\n isNewFolderModalOpen: false,\n };\n }\n\n componentDidUpdate({ initialFoldersPath: prevInitialFoldersPath }) {\n const { initialFoldersPath } = this.props;\n\n if (prevInitialFoldersPath !== initialFoldersPath) {\n // Close the new folder modal when the folders path has changed\n this.setState({\n foldersPath: initialFoldersPath,\n isNewFolderModalOpen: false,\n });\n }\n }\n\n handleEnterFolder = (enteredFolder, newFoldersPath) => {\n const { onEnterFolder } = this.props;\n\n this.setState({ foldersPath: newFoldersPath });\n onEnterFolder(enteredFolder, newFoldersPath);\n };\n\n handleCreateNewFolderButtonClick = () => {\n const { onNewFolderModalShown } = this.props;\n\n this.setState({ isNewFolderModalOpen: true }, () => onNewFolderModalShown && onNewFolderModalShown());\n };\n\n handleNewFolderModalClose = () => {\n const { onNewFolderModalClosed } = this.props;\n\n this.setState({ isNewFolderModalOpen: false }, () => onNewFolderModalClosed && onNewFolderModalClosed());\n };\n\n render() {\n const {\n className,\n modalTitle,\n modalDescription,\n onCreateFolderSubmit,\n onCreateFolderInput,\n isCreatingFolder,\n createFolderError,\n initialFoldersPath,\n shouldNotUsePortal,\n infoNoticeText,\n ...rest\n } = this.props;\n const { foldersPath, isNewFolderModalOpen } = this.state;\n const currentFolder = foldersPath[foldersPath.length - 1];\n\n return (\n <div className={classNames('content-explorer-modal-container', className)}>\n <ContentExplorerModal\n className={isNewFolderModalOpen ? 'hidden' : ''}\n title={modalTitle}\n description={modalDescription}\n initialFoldersPath={initialFoldersPath}\n isOpen\n onEnterFolder={this.handleEnterFolder}\n onCreateNewFolderButtonClick={this.handleCreateNewFolderButtonClick}\n shouldNotUsePortal={shouldNotUsePortal}\n infoNoticeText={infoNoticeText}\n {...rest}\n />\n {isNewFolderModalOpen && (\n <NewFolderModal\n isOpen\n parentFolderName={currentFolder.name}\n onRequestClose={this.handleNewFolderModalClose}\n onCreateFolderSubmit={onCreateFolderSubmit}\n onCreateFolderInput={onCreateFolderInput}\n isCreatingFolder={isCreatingFolder}\n createFolderError={createFolderError}\n shouldNotUsePortal={shouldNotUsePortal}\n />\n )}\n </div>\n );\n }\n}\n\nexport default ContentExplorerModalContain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AACiE,IAAI;EAChC;EACAyB,oBAAoB,EAAE1F,SAAS,CAACiE,IAAI;EACpC;EACA0B,kBAAkB,EAAE3F,SAAS,CAACiE,IAAI;EAClC;EACA2B,aAAa,EAAE5F,SAAS,CAACsF,MAAM;EAC/B;EACAO,eAAe,EAAE7F,SAAS,CAACiE,IAAI;EAC/B;EACA6B,gBAAgB,EAAE9F,SAAS,CAACsF,MAAM;EAClC;EACAS,kBAAkB,EAAE/F,SAAS,CAACiE,IAAI;EAClC;EACA+B,yBAAyB,EAAEhG,SAAS,CAAC0D,IAAI;EACzC;EACAvB,kBAAkB,EAAEnC,SAAS,CAAC0D,IAAI;EAClC;EACAuC,gBAAgB,EAAEjG,SAAS,CAACyE,MAAM;EAClC;EACAyB,gBAAgB,EAAElG,SAAS,CAACgE,IAAI;EAChC;EACA5B,cAAc,EAAEpC,SAAS,CAAC6D,MAAM;EAChC;EACAsC,eAAe,EAAEnG,SAAS,CAACiE;AAC/B,CAAC;AAAApD,eAAA,CAvJCH,6BAA6B,kBAyJT;EAClBqB,oBAAoB,EAAEA,CAAA,KAAM,CAAC;AACjC,CAAC;AAyFL,eAAerB,6BAA6B","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "box-ui-elements",
3
- "version": "22.1.0-beta.61",
3
+ "version": "22.1.0-beta.63",
4
4
  "description": "Box UI Elements",
5
5
  "author": "Box (https://www.box.com/)",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -31,6 +31,8 @@ class ContentExplorer extends Component {
31
31
  controlledSelectedItems: PropTypes.object,
32
32
  /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */
33
33
  isNoSelectionAllowed: PropTypes.bool,
34
+ /** Custom icon for the breadcrumb. Overrides the default icon */
35
+ breadcrumbIcon: PropTypes.element,
34
36
  /** Props for breadcrumbs */
35
37
  breadcrumbProps: PropTypes.object,
36
38
  /** Props for the cancel button */
@@ -161,6 +163,8 @@ class ContentExplorer extends Component {
161
163
  searchInputProps: PropTypes.object,
162
164
  /** Text for the informational notice, defaults to empty string, which makes notice not visible */
163
165
  infoNoticeText: PropTypes.string,
166
+ /** Used to render the no items state. Overrides the default no items state. */
167
+ noItemsRenderer: PropTypes.func,
164
168
  };
165
169
 
166
170
  static defaultProps = {
@@ -461,6 +465,7 @@ class ContentExplorer extends Component {
461
465
  additionalColumns,
462
466
  controlledSelectedItems,
463
467
  isNoSelectionAllowed = false,
468
+ breadcrumbIcon,
464
469
  breadcrumbProps,
465
470
  cancelButtonProps,
466
471
  chooseButtonProps,
@@ -500,6 +505,7 @@ class ContentExplorer extends Component {
500
505
  listHeight,
501
506
  searchInputProps,
502
507
  infoNoticeText,
508
+ noItemsRenderer,
503
509
  ...rest
504
510
  } = this.props;
505
511
  const { isInSearchMode, foldersPath, isSelectAllChecked } = this.state;
@@ -558,6 +564,7 @@ class ContentExplorer extends Component {
558
564
  >
559
565
  {infoNoticeText && <ContentExplorerInfoNotice infoNoticeText={infoNoticeText} />}
560
566
  <ContentExplorerHeaderActions
567
+ breadcrumbIcon={breadcrumbIcon}
561
568
  breadcrumbProps={breadcrumbProps}
562
569
  contentExplorerMode={contentExplorerMode}
563
570
  customInput={customInput}
@@ -600,7 +607,7 @@ class ContentExplorer extends Component {
600
607
  itemNameLinkRenderer={itemNameLinkRenderer}
601
608
  items={items}
602
609
  itemRowRenderer={itemRowRenderer}
603
- noItemsRenderer={this.renderItemListEmptyState}
610
+ noItemsRenderer={noItemsRenderer || this.renderItemListEmptyState}
604
611
  numItemsPerPage={numItemsPerPage}
605
612
  numTotalItems={numTotalItems}
606
613
  onItemClick={this.handleItemClick}
@@ -12,6 +12,7 @@ import { FoldersPathPropType } from '../prop-types';
12
12
  import messages from '../messages';
13
13
 
14
14
  const ContentExplorerBreadcrumbs = ({
15
+ breadcrumbIcon,
15
16
  breadcrumbProps,
16
17
  foldersPath,
17
18
  intl: { formatMessage },
@@ -39,7 +40,7 @@ const ContentExplorerBreadcrumbs = ({
39
40
  onClick={event => onBreadcrumbClick(i, event)}
40
41
  title={folder.name}
41
42
  >
42
- {i === 0 && <IconAllFiles />}
43
+ {i === 0 && (breadcrumbIcon || <IconAllFiles />)}
43
44
  <span>{folder.name}</span>
44
45
  </PlainButton>
45
46
  </div>
@@ -16,6 +16,7 @@ const isSearchResultsFolder = folder => folder && folder.id === SEARCH_RESULTS_F
16
16
 
17
17
  class ContentExplorerHeaderActions extends Component {
18
18
  static propTypes = {
19
+ breadcrumbIcon: PropTypes.element,
19
20
  breadcrumbProps: BreadcrumbPropType,
20
21
  children: PropTypes.node,
21
22
  contentExplorerMode: ContentExplorerModePropType.isRequired,
@@ -151,6 +152,7 @@ class ContentExplorerHeaderActions extends Component {
151
152
 
152
153
  render() {
153
154
  const {
155
+ breadcrumbIcon,
154
156
  breadcrumbProps,
155
157
  children,
156
158
  contentExplorerMode,
@@ -200,6 +202,7 @@ class ContentExplorerHeaderActions extends Component {
200
202
  />
201
203
  ) : (
202
204
  <ContentExplorerBreadcrumbs
205
+ breadcrumbIcon={breadcrumbIcon}
203
206
  breadcrumbProps={breadcrumbProps}
204
207
  foldersPath={foldersPath}
205
208
  isUpButtonDisabled={isBreadcrumbButtonDisabled}
@@ -130,6 +130,12 @@ describe('features/content-explorer/content-explorer/ContentExplorer', () => {
130
130
  expect(wrapper).toMatchSnapshot();
131
131
  });
132
132
 
133
+ test('should pass breadcrumbIcon to ContentExplorerHeaderActions', () => {
134
+ const breadcrumbIcon = <div>Icon</div>;
135
+ const wrapper = renderComponent({ breadcrumbIcon });
136
+ expect(wrapper.find('ContentExplorerHeaderActions').prop('breadcrumbIcon')).toEqual(breadcrumbIcon);
137
+ });
138
+
133
139
  [
134
140
  {
135
141
  contentExplorerMode: ContentExplorerModes.SELECT_FILE,
@@ -579,6 +585,27 @@ describe('features/content-explorer/content-explorer/ContentExplorer', () => {
579
585
  });
580
586
  });
581
587
 
588
+ describe('noItemsRenderer', () => {
589
+ const customEmptyStateClassName = 'custom-empty-state';
590
+
591
+ test('should render custom empty state when specified', () => {
592
+ const wrapper = renderComponent(
593
+ { noItemsRenderer: () => <div className={customEmptyStateClassName} /> },
594
+ true,
595
+ );
596
+
597
+ expect(wrapper.exists(`.${customEmptyStateClassName}`)).toBe(true);
598
+ expect(wrapper.exists('ContentExplorerEmptyState')).toBe(false);
599
+ });
600
+
601
+ test('should render default empty state when not specified', () => {
602
+ const wrapper = renderComponent({}, true);
603
+
604
+ expect(wrapper.exists('ContentExplorerEmptyState')).toBe(true);
605
+ expect(wrapper.exists(`.${customEmptyStateClassName}`)).toBe(false);
606
+ });
607
+ });
608
+
582
609
  describe('handleDocumentClick', () => {
583
610
  test('should deselect when the click did not occur inside the content explorer and not in multi select mode', () => {
584
611
  const item = { id: 'id', name: 'name' };
@@ -13,13 +13,14 @@ describe('features/content-explorer/content-explorer/ContentExplorerBreadcrumbs'
13
13
  sandbox.verifyAndRestore();
14
14
  });
15
15
 
16
+ const foldersPath = [
17
+ { id: '0', name: 'folder1' },
18
+ { id: '1', name: 'folder2' },
19
+ { id: '2', name: 'folder3' },
20
+ ];
21
+
16
22
  describe('render()', () => {
17
23
  test('should render correct breadcrumbs', () => {
18
- const foldersPath = [
19
- { id: '0', name: 'folder1' },
20
- { id: '1', name: 'folder2' },
21
- { id: '2', name: 'folder3' },
22
- ];
23
24
  const wrapper = renderComponent({
24
25
  foldersPath,
25
26
  });
@@ -27,7 +28,6 @@ describe('features/content-explorer/content-explorer/ContentExplorerBreadcrumbs'
27
28
  expect(wrapper.find('.content-explorer-breadcrumbs-container').length).toBe(1);
28
29
  expect(wrapper.find('.content-explorer-breadcrumbs-up-button').length).toBe(1);
29
30
  expect(wrapper.find('Breadcrumb').length).toBe(1);
30
- expect(wrapper.find('IconAllFiles').length).toBe(1);
31
31
 
32
32
  const breadcrumbs = wrapper.find('[data-testid="breadcrumb-lnk"]');
33
33
 
@@ -45,6 +45,22 @@ describe('features/content-explorer/content-explorer/ContentExplorerBreadcrumbs'
45
45
 
46
46
  expect(wrapper.find('.content-explorer-breadcrumbs-up-button').prop('isDisabled')).toBe(true);
47
47
  });
48
+
49
+ test('should render custom breadcrumb icon if specified', () => {
50
+ const wrapper = renderComponent({
51
+ breadcrumbIcon: <div className="test-icon" />,
52
+ foldersPath,
53
+ });
54
+ expect(wrapper.find('.test-icon').length).toBe(1);
55
+ expect(wrapper.find('IconAllFiles').length).toBe(0);
56
+ });
57
+
58
+ test('should render IconAllFiles if breadcrumb icon not specified', () => {
59
+ const wrapper = renderComponent({
60
+ foldersPath,
61
+ });
62
+ expect(wrapper.find('IconAllFiles').length).toBe(1);
63
+ });
48
64
  });
49
65
 
50
66
  describe('onUpButtonClick', () => {
@@ -64,21 +80,13 @@ describe('features/content-explorer/content-explorer/ContentExplorerBreadcrumbs'
64
80
  test('should call onBreadcrumbClick when breadcrumb is clicked', () => {
65
81
  const breadcrumbIndex = 1;
66
82
  const event = {};
67
- const foldersPath = [
68
- { id: '0', name: 'folder1' },
69
- { id: '1', name: 'folder2' },
70
- { id: '2', name: 'folder3' },
71
- ];
72
83
  const onBreadcrumbClickSpy = sandbox.spy();
73
84
  const wrapper = renderComponent({
74
85
  foldersPath,
75
86
  onBreadcrumbClick: onBreadcrumbClickSpy,
76
87
  });
77
88
 
78
- wrapper
79
- .find('[data-testid="breadcrumb-lnk"]')
80
- .at(breadcrumbIndex)
81
- .simulate('click', event);
89
+ wrapper.find('[data-testid="breadcrumb-lnk"]').at(breadcrumbIndex).simulate('click', event);
82
90
 
83
91
  expect(onBreadcrumbClickSpy.calledOnce).toBe(true);
84
92
  expect(onBreadcrumbClickSpy.calledWithExactly(breadcrumbIndex, event)).toBe(true);
@@ -100,6 +100,12 @@ describe('features/content-explorer/content-explorer/ContentExplorerHeaderAction
100
100
  expect(wrapper.instance().props.customInput).toEqual(customInput);
101
101
  expect(wrapper).toMatchSnapshot();
102
102
  });
103
+
104
+ test('should pass breadcrumbIcon to ContentExplorerBreadcrumbs', () => {
105
+ const breadcrumbIcon = <div>Icon</div>;
106
+ const wrapper = renderComponent({ breadcrumbIcon });
107
+ expect(wrapper.find('ContentExplorerBreadcrumbs').prop('breadcrumbIcon')).toEqual(breadcrumbIcon);
108
+ });
103
109
  });
104
110
 
105
111
  describe('onEnterFolder', () => {
@@ -202,10 +208,7 @@ describe('features/content-explorer/content-explorer/ContentExplorerHeaderAction
202
208
  test('should call onExitSearch when clicking the breadcrumbs up button to exit search', () => {
203
209
  const wrapper = renderComponent({ foldersPath, onExitSearch: onExitSearchSpy }, true);
204
210
 
205
- wrapper
206
- .find('.content-explorer-breadcrumbs-up-button')
207
- .hostNodes()
208
- .simulate('click');
211
+ wrapper.find('.content-explorer-breadcrumbs-up-button').hostNodes().simulate('click');
209
212
 
210
213
  expect(onExitSearchSpy.calledOnce).toBe(true);
211
214
  });
@@ -252,10 +255,7 @@ describe('features/content-explorer/content-explorer/ContentExplorerHeaderAction
252
255
 
253
256
  const wrapper = renderComponent({ foldersPath, onFoldersPathUpdated: onFoldersPathUpdatedSpy }, true);
254
257
 
255
- wrapper
256
- .find('.content-explorer-breadcrumbs-up-button')
257
- .hostNodes()
258
- .simulate('click');
258
+ wrapper.find('.content-explorer-breadcrumbs-up-button').hostNodes().simulate('click');
259
259
 
260
260
  expect(onFoldersPathUpdatedSpy.calledOnce).toBe(true);
261
261
  });
@@ -12,6 +12,7 @@ import './ContentExplorerModal.scss';
12
12
 
13
13
  type Props = {
14
14
  additionalColumns?: Array<React.ComponentType<Column>>,
15
+ breadcrumbIcon?: React.ComponentType<any>,
15
16
  breadcrumbProps?: BreadcrumbProps,
16
17
  className?: string,
17
18
  controlledSelectedItems?: Object,
@@ -36,6 +37,7 @@ type Props = {
36
37
  shouldNotUsePortal?: boolean,
37
38
  title?: string,
38
39
  infoNoticeText?: string,
40
+ noItemsRenderer?: Function,
39
41
  };
40
42
 
41
43
  const ContentExplorerModal = ({
@@ -63,18 +63,26 @@ describe('features/content-explorer/content-explorer-modal/ContentExplorerModal'
63
63
  expect(wrapper).toMatchSnapshot();
64
64
  });
65
65
 
66
- test('should pass onSelectedClick and onSelectItem to ContentExplorer', () => {
66
+ test('should pass onSelectedClick, onSelectItem, infoNoticeText, noItemsRenderer and breadcrumbIcon to ContentExplorer', () => {
67
67
  const onSelectedClick = () => {};
68
68
  const onSelectItem = () => {};
69
- const wrapper = renderComponent({ onSelectedClick, onSelectItem });
69
+ const infoNoticeText = 'info notice text';
70
+ const noItemsRenderer = () => <div>No items</div>;
71
+ const breadcrumbIcon = <div>Icon</div>;
72
+
73
+ const wrapper = renderComponent({
74
+ onSelectedClick,
75
+ onSelectItem,
76
+ infoNoticeText,
77
+ noItemsRenderer,
78
+ breadcrumbIcon,
79
+ });
80
+
70
81
  expect(wrapper.find('ContentExplorer').prop('onSelectedClick')).toEqual(onSelectedClick);
71
82
  expect(wrapper.find('ContentExplorer').prop('onSelectItem')).toEqual(onSelectItem);
72
- });
73
-
74
- test('should pass infoNoticeText to ContentExplorer', () => {
75
- const infoNoticeText = 'info notice text';
76
- const wrapper = renderComponent({ infoNoticeText });
77
83
  expect(wrapper.find('ContentExplorer').prop('infoNoticeText')).toEqual(infoNoticeText);
84
+ expect(wrapper.find('ContentExplorer').prop('noItemsRenderer')).toEqual(noItemsRenderer);
85
+ expect(wrapper.find('ContentExplorer').prop('breadcrumbIcon')).toEqual(breadcrumbIcon);
78
86
  });
79
87
  });
80
88
  });
@@ -15,6 +15,8 @@ class ContentExplorerModalContainer extends Component {
15
15
  additionalColumns: PropTypes.arrayOf(PropTypes.element),
16
16
  /** Allow users to choose no selections in MULTI_SELECT mode, defaults to false */
17
17
  isNoSelectionAllowed: PropTypes.bool,
18
+ /** Custom icon for the breadcrumb. Overrides the default icon */
19
+ breadcrumbIcon: PropTypes.element,
18
20
  /** Breadcrumb component options */
19
21
  breadcrumbProps: BreadcrumbPropType,
20
22
  /** Adds class name. */
@@ -153,6 +155,8 @@ class ContentExplorerModalContainer extends Component {
153
155
  chooseButtonText: PropTypes.node,
154
156
  /** Text for the informational notice, defaults to empty string, which makes notice not visible */
155
157
  infoNoticeText: PropTypes.string,
158
+ /** Used to render the no items state. Overrides the default no items state. */
159
+ noItemsRenderer: PropTypes.func,
156
160
  };
157
161
 
158
162
  static defaultProps = {
@@ -66,22 +66,28 @@ describe('features/content-explorer/content-explorer-modal-container/ContentExpl
66
66
  expect(wrapper.find('NewFolderModal').prop('parentFolderName')).toEqual(parentFolderName);
67
67
  });
68
68
 
69
- test('should pass searchInputProps, chooseButtonText, onSelectItem, and onSelectedClick to ContentExplorerModal', () => {
69
+ test('should pass searchInputProps, chooseButtonText, onSelectItem, onSelectedClick, noItemsRenderer and breadcrumbIcon to ContentExplorerModal', () => {
70
70
  const searchInputProps = { placeholder: 'test' };
71
71
  const chooseButtonText = 'test';
72
72
  const onSelectedClick = () => {};
73
73
  const onSelectItem = () => {};
74
+ const noItemsRenderer = () => <div>No items</div>;
75
+ const breadcrumbIcon = <div>Icon</div>;
74
76
  const wrapper = renderComponent({
75
77
  searchInputProps,
76
78
  chooseButtonText,
77
79
  onSelectedClick,
78
80
  onSelectItem,
81
+ noItemsRenderer,
82
+ breadcrumbIcon,
79
83
  });
80
84
 
81
85
  expect(wrapper.find('ContentExplorerModal').prop('searchInputProps')).toEqual(searchInputProps);
82
86
  expect(wrapper.find('ContentExplorerModal').prop('chooseButtonText')).toEqual(chooseButtonText);
83
87
  expect(wrapper.find('ContentExplorerModal').prop('onSelectedClick')).toEqual(onSelectedClick);
84
88
  expect(wrapper.find('ContentExplorerModal').prop('onSelectItem')).toEqual(onSelectItem);
89
+ expect(wrapper.find('ContentExplorerModal').prop('noItemsRenderer')).toEqual(noItemsRenderer);
90
+ expect(wrapper.find('ContentExplorerModal').prop('breadcrumbIcon')).toEqual(breadcrumbIcon);
85
91
  });
86
92
 
87
93
  test('should render ContentExplorerModal and NewFolderModal in Portal by default', () => {