box-ui-elements 23.4.0-beta.27 → 23.4.0-beta.29

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 (56) hide show
  1. package/dist/explorer.js +1 -1
  2. package/dist/preview.js +1 -1
  3. package/dist/sidebar.js +1 -1
  4. package/es/elements/content-explorer/ContentExplorer.js +13 -2
  5. package/es/elements/content-explorer/ContentExplorer.js.map +1 -1
  6. package/es/elements/content-sidebar/AddTaskButton.js +18 -4
  7. package/es/elements/content-sidebar/AddTaskButton.js.flow +18 -1
  8. package/es/elements/content-sidebar/AddTaskButton.js.map +1 -1
  9. package/es/src/elements/content-explorer/ContentExplorer.d.ts +8 -0
  10. package/i18n/bn-IN.js +1 -1
  11. package/i18n/bn-IN.properties +2 -0
  12. package/i18n/da-DK.properties +2 -0
  13. package/i18n/de-DE.js +1 -1
  14. package/i18n/de-DE.properties +2 -0
  15. package/i18n/en-AU.properties +2 -0
  16. package/i18n/en-CA.properties +2 -0
  17. package/i18n/en-GB.properties +2 -0
  18. package/i18n/en-x-pseudo.js +1017 -1019
  19. package/i18n/en-x-pseudo.properties +1018 -1020
  20. package/i18n/es-419.js +1 -1
  21. package/i18n/es-419.properties +2 -0
  22. package/i18n/es-ES.js +1 -1
  23. package/i18n/es-ES.properties +2 -0
  24. package/i18n/fi-FI.js +1 -1
  25. package/i18n/fi-FI.properties +2 -0
  26. package/i18n/fr-CA.js +1 -1
  27. package/i18n/fr-CA.properties +2 -0
  28. package/i18n/fr-FR.js +1 -1
  29. package/i18n/fr-FR.properties +2 -0
  30. package/i18n/hi-IN.js +1 -1
  31. package/i18n/hi-IN.properties +2 -0
  32. package/i18n/it-IT.js +1 -1
  33. package/i18n/it-IT.properties +2 -0
  34. package/i18n/ja-JP.js +1 -1
  35. package/i18n/ja-JP.properties +2 -0
  36. package/i18n/ko-KR.js +1 -1
  37. package/i18n/ko-KR.properties +2 -0
  38. package/i18n/nb-NO.properties +2 -0
  39. package/i18n/nl-NL.properties +2 -0
  40. package/i18n/pl-PL.js +1 -1
  41. package/i18n/pl-PL.properties +2 -0
  42. package/i18n/pt-BR.js +1 -1
  43. package/i18n/pt-BR.properties +2 -0
  44. package/i18n/ru-RU.js +1 -1
  45. package/i18n/ru-RU.properties +2 -0
  46. package/i18n/sv-SE.properties +2 -0
  47. package/i18n/tr-TR.js +1 -1
  48. package/i18n/tr-TR.properties +2 -0
  49. package/i18n/zh-CN.js +1 -1
  50. package/i18n/zh-CN.properties +2 -0
  51. package/i18n/zh-TW.js +1 -1
  52. package/i18n/zh-TW.properties +2 -0
  53. package/package.json +1 -1
  54. package/src/elements/content-explorer/ContentExplorer.tsx +12 -2
  55. package/src/elements/content-sidebar/AddTaskButton.js +18 -1
  56. package/src/elements/content-sidebar/__tests__/AddTaskButton.test.js +118 -35
package/i18n/es-419.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Solo acceso directo",
907
907
  "boxui.shareMenu.viewAndDownload": "Visualización y descarga",
908
908
  "boxui.shareMenu.viewOnly": "Solo visualización",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Metadatos",
910
910
  "boxui.timeInput.emptyTimeError": "Campo obligatorio. Introduzca una hora con el formato HH:MM A.",
911
911
  "boxui.timeInput.invalidTimeError": "Formato de hora no válido. Introduzca una hora con el formato HH:MM A.",
912
912
  "boxui.unifiedShare.collabAccess": "acceso de colaborador",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Solo acceso directo
1812
1812
  boxui.shareMenu.viewAndDownload = Visualización y descarga
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Solo visualización
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Metadatos
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Campo obligatorio. Introduzca una hora con el formato HH:MM A.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/es-ES.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Solo acceso directo",
907
907
  "boxui.shareMenu.viewAndDownload": "Visualización y descarga",
908
908
  "boxui.shareMenu.viewOnly": "Solo visualización",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Metadatos",
910
910
  "boxui.timeInput.emptyTimeError": "Campo obligatorio. Introduzca una hora con el formato HH:MM A.",
911
911
  "boxui.timeInput.invalidTimeError": "Formato de hora no válido. Introduzca una hora con el formato HH:MM A.",
912
912
  "boxui.unifiedShare.collabAccess": "acceso de colaborador",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Solo acceso directo
1812
1812
  boxui.shareMenu.viewAndDownload = Visualización y descarga
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Solo visualización
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Metadatos
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Campo obligatorio. Introduzca una hora con el formato HH:MM A.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/fi-FI.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Vain pikakuvake",
907
907
  "boxui.shareMenu.viewAndDownload": "Luku ja lataus",
908
908
  "boxui.shareMenu.viewOnly": "Vain luku",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Metatiedot",
910
910
  "boxui.timeInput.emptyTimeError": "Pakollinen kenttä. Kirjoita aika muodossa HH:MM A.",
911
911
  "boxui.timeInput.invalidTimeError": "Virheellinen ajan muoto. Kirjoita aika muodossa HH:MM A.",
912
912
  "boxui.unifiedShare.collabAccess": "yhteistyökumppanin käyttöoikeustaso",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Vain pikakuvake
1812
1812
  boxui.shareMenu.viewAndDownload = Luku ja lataus
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Vain luku
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Metatiedot
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Pakollinen kenttä. Kirjoita aika muodossa HH:MM A.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/fr-CA.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Raccourci uniquement",
907
907
  "boxui.shareMenu.viewAndDownload": "Afficher et télécharger",
908
908
  "boxui.shareMenu.viewOnly": "Uniquement pour consultation",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Métadonnées",
910
910
  "boxui.timeInput.emptyTimeError": "Champ obligatoire. Entrez un horaire au format HH h MM.",
911
911
  "boxui.timeInput.invalidTimeError": "Format d'horaire non valide. Entrez un horaire au format HH h MM.",
912
912
  "boxui.unifiedShare.collabAccess": "Accès collaborateur",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Raccourci uniquement
1812
1812
  boxui.shareMenu.viewAndDownload = Afficher et télécharger
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Uniquement pour consultation
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Métadonnées
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Champ obligatoire. Entrez un horaire au format HH h MM.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/fr-FR.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Raccourci uniquement",
907
907
  "boxui.shareMenu.viewAndDownload": "Afficher et télécharger",
908
908
  "boxui.shareMenu.viewOnly": "Uniquement pour consultation",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Métadonnées",
910
910
  "boxui.timeInput.emptyTimeError": "Champ obligatoire. Entrez un horaire au format HH h MM.",
911
911
  "boxui.timeInput.invalidTimeError": "Format d'horaire non valide. Entrez un horaire au format HH h MM.",
912
912
  "boxui.unifiedShare.collabAccess": "Accès collaborateur",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Raccourci uniquement
1812
1812
  boxui.shareMenu.viewAndDownload = Afficher et télécharger
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Uniquement pour consultation
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Métadonnées
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Champ obligatoire. Entrez un horaire au format HH h MM.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/hi-IN.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "केवल शॉर्टकट",
907
907
  "boxui.shareMenu.viewAndDownload": "देखें और डाउनलोड करें",
908
908
  "boxui.shareMenu.viewOnly": "केवल देखें",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "मेटाडेटा",
910
910
  "boxui.timeInput.emptyTimeError": "आवश्यक क्षेत्र. HH:MM A फ़ॉर्मेट में समय दर्ज करें.",
911
911
  "boxui.timeInput.invalidTimeError": "अमान्य समय फ़ॉर्मेट. HH:MM A फ़ॉर्मेट में समय दर्ज करें.",
912
912
  "boxui.unifiedShare.collabAccess": "सहयोगी एक्सेस",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = केवल शॉर्टकट
1812
1812
  boxui.shareMenu.viewAndDownload = देखें और डाउनलोड करें
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = केवल देखें
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = मेटाडेटा
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = आवश्यक क्षेत्र. HH:MM A फ़ॉर्मेट में समय दर्ज करें.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/it-IT.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Solo tasti di scelta rapida",
907
907
  "boxui.shareMenu.viewAndDownload": "Visualizzazione e download",
908
908
  "boxui.shareMenu.viewOnly": "Sola visualizzazione",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Metadati",
910
910
  "boxui.timeInput.emptyTimeError": "Campo obbligatorio. Immetti un orario nel formato HH:MM A.",
911
911
  "boxui.timeInput.invalidTimeError": "Formato ora non valido. Immetti un orario nel formato HH:MM A.",
912
912
  "boxui.unifiedShare.collabAccess": "accesso collaboratore",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Solo tasti di scelta rapida
1812
1812
  boxui.shareMenu.viewAndDownload = Visualizzazione e download
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Sola visualizzazione
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Metadati
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Campo obbligatorio. Immetti un orario nel formato HH:MM A.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/ja-JP.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "ショートカットのみ",
907
907
  "boxui.shareMenu.viewAndDownload": "表示とダウンロード",
908
908
  "boxui.shareMenu.viewOnly": "表示のみ",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "メタデータ",
910
910
  "boxui.timeInput.emptyTimeError": "必須フィールドです。HH:MM AM/PM形式で時間を入力してください。",
911
911
  "boxui.timeInput.invalidTimeError": "時間の形式が無効です。HH:MM AM/PM形式で時間を入力してください。",
912
912
  "boxui.unifiedShare.collabAccess": "コラボレータのアクセス権限",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = ショートカットのみ
1812
1812
  boxui.shareMenu.viewAndDownload = 表示とダウンロード
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = 表示のみ
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = メタデータ
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = 必須フィールドです。HH:MM AM/PM形式で時間を入力してください。
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/ko-KR.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "바로 가기 전용",
907
907
  "boxui.shareMenu.viewAndDownload": "보기 및 다운로드",
908
908
  "boxui.shareMenu.viewOnly": "보기 전용",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "메타데이터",
910
910
  "boxui.timeInput.emptyTimeError": "필수 필드입니다. HH:MM A 형식으로 시간을 입력하십시오.",
911
911
  "boxui.timeInput.invalidTimeError": "올바르지 않은 시간 형식입니다. HH:MM A 형식으로 시간을 입력하십시오.",
912
912
  "boxui.unifiedShare.collabAccess": "공동 작업자 액세스",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = 바로 가기 전용
1812
1812
  boxui.shareMenu.viewAndDownload = 보기 및 다운로드
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = 보기 전용
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = 메타데이터
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = 필수 필드입니다. HH:MM A 형식으로 시간을 입력하십시오.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Bare snarvei
1812
1812
  boxui.shareMenu.viewAndDownload = Vise og laste ned
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Bare vis
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Metadata
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Obligatorisk felt. Oppgi klokkeslettet i formatet TT.MM.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Alleen snelkoppeling
1812
1812
  boxui.shareMenu.viewAndDownload = Bekijken en downloaden
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Alleen bekijken
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Metadata
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Vereist veld. Voer een tijd in de notatie UU:MM in.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/pl-PL.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Tylko skrót",
907
907
  "boxui.shareMenu.viewAndDownload": "Przeglądanie i pobieranie",
908
908
  "boxui.shareMenu.viewOnly": "Tylko przeglądanie",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Metadane",
910
910
  "boxui.timeInput.emptyTimeError": "Pole wymagane. Wprowadź godzinę w formacie GG:MM.",
911
911
  "boxui.timeInput.invalidTimeError": "Nieprawidłowy format godziny. Wprowadź godzinę w formacie GG:MM.",
912
912
  "boxui.unifiedShare.collabAccess": "dostęp dla współpracownika",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Tylko skrót
1812
1812
  boxui.shareMenu.viewAndDownload = Przeglądanie i pobieranie
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Tylko przeglądanie
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Metadane
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Pole wymagane. Wprowadź godzinę w formacie GG:MM.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/pt-BR.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Apenas atalho",
907
907
  "boxui.shareMenu.viewAndDownload": "Visualização e download",
908
908
  "boxui.shareMenu.viewOnly": "Apenas visualização",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Metadados",
910
910
  "boxui.timeInput.emptyTimeError": "Campo obrigatório. Informe uma hora no formato HH:MM AM/PM.",
911
911
  "boxui.timeInput.invalidTimeError": "Formato de hora inválido. Informe uma hora no formato HH:MM A.",
912
912
  "boxui.unifiedShare.collabAccess": "acesso de colaborador",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Apenas atalho
1812
1812
  boxui.shareMenu.viewAndDownload = Visualização e download
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Apenas visualização
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Metadados
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Campo obrigatório. Informe uma hora no formato HH:MM AM/PM.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/ru-RU.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Только ярлык",
907
907
  "boxui.shareMenu.viewAndDownload": "Просмотр и скачивание",
908
908
  "boxui.shareMenu.viewOnly": "Только просмотр",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Метаданные",
910
910
  "boxui.timeInput.emptyTimeError": "Обязательное поле. Введите время в 12-часовом формате ЧЧ:ММ.",
911
911
  "boxui.timeInput.invalidTimeError": "Неверный формат времени. Введите время в 12-часовом формате ЧЧ:ММ.",
912
912
  "boxui.unifiedShare.collabAccess": "доступ соавтора",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Только ярлык
1812
1812
  boxui.shareMenu.viewAndDownload = Просмотр и скачивание
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Только просмотр
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Метаданные
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Обязательное поле. Введите время в 12-часовом формате ЧЧ:ММ.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Endast genväg
1812
1812
  boxui.shareMenu.viewAndDownload = Visa och hämta
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Endast visning
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Metadata
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Obligatoriskt fält. Ange en tid i formatet TT:MM.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/tr-TR.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "Yalnızca Kısayol",
907
907
  "boxui.shareMenu.viewAndDownload": "Görüntüleme ve İndirme",
908
908
  "boxui.shareMenu.viewOnly": "Yalnızca Görüntüleme",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "Meta veri",
910
910
  "boxui.timeInput.emptyTimeError": "Gerekli alan. Saati SS.DD biçiminde girin.",
911
911
  "boxui.timeInput.invalidTimeError": "Geçersiz saat biçimi. Saati SS.DD biçiminde girin.",
912
912
  "boxui.unifiedShare.collabAccess": "işbirlikçi erişimi",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = Yalnızca Kısayol
1812
1812
  boxui.shareMenu.viewAndDownload = Görüntüleme ve İndirme
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = Yalnızca Görüntüleme
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = Meta veri
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = Gerekli alan. Saati SS.DD biçiminde girin.
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/zh-CN.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "仅快捷键",
907
907
  "boxui.shareMenu.viewAndDownload": "查看和下载",
908
908
  "boxui.shareMenu.viewOnly": "仅查看",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "元数据",
910
910
  "boxui.timeInput.emptyTimeError": "必填字段。请以“上午小时:分钟”格式输入时间。",
911
911
  "boxui.timeInput.invalidTimeError": "时间格式无效。请以“上午小时:分钟”格式输入时间。",
912
912
  "boxui.unifiedShare.collabAccess": "协作者访问",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = 仅快捷键
1812
1812
  boxui.shareMenu.viewAndDownload = 查看和下载
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = 仅查看
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = 元数据
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = 必填字段。请以“上午小时:分钟”格式输入时间。
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/i18n/zh-TW.js CHANGED
@@ -906,7 +906,7 @@ export default {
906
906
  "boxui.shareMenu.shortcutOnly": "僅捷徑",
907
907
  "boxui.shareMenu.viewAndDownload": "檢視與下載",
908
908
  "boxui.shareMenu.viewOnly": "僅檢視",
909
- "boxui.subHeader.metadata": "Metadata",
909
+ "boxui.subHeader.metadata": "中繼資料",
910
910
  "boxui.timeInput.emptyTimeError": "必填欄位。請以「上午 時時:分分」的格式輸入時間。",
911
911
  "boxui.timeInput.invalidTimeError": "無效的時間格式。請以「上午 時時:分分」的格式輸入時間。",
912
912
  "boxui.unifiedShare.collabAccess": "共同作業者存取",
@@ -1812,6 +1812,8 @@ boxui.shareMenu.shortcutOnly = 僅捷徑
1812
1812
  boxui.shareMenu.viewAndDownload = 檢視與下載
1813
1813
  # Description of permissions granted to users who have access to the shared link
1814
1814
  boxui.shareMenu.viewOnly = 僅檢視
1815
+ # Text for metadata button that will open the metadata side panel
1816
+ boxui.subHeader.metadata = 中繼資料
1815
1817
  # Error message for empty time formats. "HH:MM A" should be localized.
1816
1818
  boxui.timeInput.emptyTimeError = 必填欄位。請以「上午 時時:分分」的格式輸入時間。
1817
1819
  # Error message for invalid time formats. "HH:MM A" should be localized.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "box-ui-elements",
3
- "version": "23.4.0-beta.27",
3
+ "version": "23.4.0-beta.29",
4
4
  "description": "Box UI Elements",
5
5
  "author": "Box (https://www.box.com/)",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -6,6 +6,7 @@ import debounce from 'lodash/debounce';
6
6
  import flow from 'lodash/flow';
7
7
  import getProp from 'lodash/get';
8
8
  import noop from 'lodash/noop';
9
+ import throttle from 'lodash/throttle';
9
10
  import uniqueid from 'lodash/uniqueId';
10
11
  import { TooltipProvider } from '@box/blueprint-web';
11
12
  import { AxiosRequestConfig, AxiosResponse } from 'axios';
@@ -1177,7 +1178,7 @@ class ContentExplorer extends Component<ContentExplorerProps, State> {
1177
1178
  * @return {void}
1178
1179
  */
1179
1180
  createFolder = (): void => {
1180
- this.createFolderCallback();
1181
+ this.throttledCreateFolderCallback();
1181
1182
  };
1182
1183
 
1183
1184
  /**
@@ -1243,6 +1244,15 @@ class ContentExplorer extends Component<ContentExplorerProps, State> {
1243
1244
  );
1244
1245
  };
1245
1246
 
1247
+ /**
1248
+ * Throttled version of createFolderCallback to prevent errors from rapid clicking.
1249
+ *
1250
+ * @private
1251
+ * @param {string} [name] - folder name
1252
+ * @return {void}
1253
+ */
1254
+ throttledCreateFolderCallback = throttle(this.createFolderCallback, 500, { trailing: false });
1255
+
1246
1256
  /**
1247
1257
  * Selects the clicked file and then shares it
1248
1258
  *
@@ -1736,7 +1746,7 @@ class ContentExplorer extends Component<ContentExplorerProps, State> {
1736
1746
  {allowCreate && !!this.appElement ? (
1737
1747
  <CreateFolderDialog
1738
1748
  isOpen={isCreateFolderModalOpen}
1739
- onCreate={this.createFolderCallback}
1749
+ onCreate={this.throttledCreateFolderCallback}
1740
1750
  onCancel={this.closeModals}
1741
1751
  isLoading={isLoading}
1742
1752
  errorCode={errorCode}
@@ -8,11 +8,15 @@ import { TASK_TYPE_APPROVAL } from '../../constants';
8
8
  import type { TaskFormProps } from './activity-feed/task-form/TaskForm';
9
9
  import type { TaskType } from '../../common/types/tasks';
10
10
  import type { ElementsXhrError } from '../../common/types/api';
11
+ import type { InternalSidebarNavigation, InternalSidebarNavigationHandler } from '../common/types/SidebarNavigation';
11
12
 
12
13
  type Props = {|
13
14
  history: RouterHistory,
15
+ internalSidebarNavigation?: InternalSidebarNavigation,
16
+ internalSidebarNavigationHandler?: InternalSidebarNavigationHandler,
14
17
  isDisabled: boolean,
15
18
  onTaskModalClose: () => void,
19
+ routerDisabled?: boolean,
16
20
  taskFormProps: TaskFormProps,
17
21
  |};
18
22
 
@@ -40,7 +44,20 @@ class AddTaskButton extends React.Component<Props, State> {
40
44
  2. Preventing the sidebar from closing keeps the task modal open upon edit and resize
41
45
  */
42
46
  handleClickMenuItem = (taskType: TaskType) => {
43
- this.props.history.replace({ state: { open: true } });
47
+ const { history, internalSidebarNavigation, internalSidebarNavigationHandler, routerDisabled } = this.props;
48
+
49
+ if (routerDisabled && internalSidebarNavigationHandler) {
50
+ internalSidebarNavigationHandler(
51
+ {
52
+ ...internalSidebarNavigation,
53
+ open: true,
54
+ },
55
+ true,
56
+ );
57
+ } else {
58
+ history.replace({ state: { open: true } });
59
+ }
60
+
44
61
  this.setState({ isTaskFormOpen: true, taskType });
45
62
  };
46
63
 
@@ -1,21 +1,28 @@
1
1
  import * as React from 'react';
2
- import { mount } from 'enzyme';
2
+ import { render, screen, userEvent } from '../../../test-utils/testing-library';
3
3
  import { AddTaskButtonComponent as AddTaskButton } from '../AddTaskButton';
4
4
 
5
- jest.mock('../../../components/date-picker/DatePicker', () => props => {
6
- // only spread `input` attritutes to the input field
7
- const { name, value = '', className, onChange, placeholder } = props;
8
- const localInputProps = {
9
- name,
10
- value,
11
- className,
12
- onChange,
13
- placeholder,
14
- };
15
- return (
16
- <input type="date" {...localInputProps} {...props.inputProps} /> // eslint-disable-line react/prop-types
17
- );
18
- });
5
+ jest.mock('../AddTaskMenu', () => ({ onMenuItemClick, isDisabled, setAddTaskButtonRef }) => (
6
+ <div data-testid="add-task-menu">
7
+ <button
8
+ type="button"
9
+ onClick={() => onMenuItemClick('GENERAL')}
10
+ disabled={isDisabled}
11
+ ref={setAddTaskButtonRef}
12
+ data-testid="menu-item-general"
13
+ >
14
+ Add General Task
15
+ </button>
16
+ </div>
17
+ ));
18
+
19
+ jest.mock('../TaskModal', () => ({ isTaskFormOpen, onModalClose, taskType }) => (
20
+ <div data-testid="task-modal" data-open={isTaskFormOpen} data-task-type={taskType}>
21
+ <button type="button" onClick={onModalClose} data-testid="modal-close">
22
+ Close Modal
23
+ </button>
24
+ </div>
25
+ ));
19
26
 
20
27
  describe('elements/content-sidebar/AddTaskButton', () => {
21
28
  /*
@@ -23,34 +30,110 @@ describe('elements/content-sidebar/AddTaskButton', () => {
23
30
  2. Preventing the sidebar from closing keeps the task modal open upon edit and resize
24
31
  */
25
32
 
26
- test('should call history.replace state with force open state when task menu items are clicked', () => {
33
+ const defaultProps = {
34
+ history: { replace: jest.fn() },
35
+ isDisabled: false,
36
+ onTaskModalClose: jest.fn(),
37
+ taskFormProps: {
38
+ approvers: [],
39
+ approverSelectorContacts: [],
40
+ completionRule: 'ALL',
41
+ createTask: jest.fn(),
42
+ getApproverWithQuery: jest.fn(),
43
+ getAvatarUrl: jest.fn(),
44
+ id: '',
45
+ message: '',
46
+ },
47
+ };
48
+
49
+ const renderComponent = (props = {}) => {
50
+ return render(<AddTaskButton {...defaultProps} {...props} />);
51
+ };
52
+
53
+ beforeEach(() => {
54
+ jest.clearAllMocks();
55
+ });
56
+
57
+ test('should call history.replace state with force open state when task menu items are clicked', async () => {
27
58
  const historyMock = { replace: jest.fn() };
28
- const wrapper = mount(<AddTaskButton history={historyMock} />);
59
+ const user = userEvent();
29
60
 
30
- const button = wrapper.find('Button');
31
- button.simulate('click');
61
+ renderComponent({ history: historyMock });
32
62
 
33
- const menuItem = wrapper.find('MenuItem').first();
34
- menuItem.simulate('click');
63
+ const menuItem = screen.getByTestId('menu-item-general');
64
+ await user.click(menuItem);
35
65
 
36
66
  expect(historyMock.replace).toHaveBeenCalledWith({ state: { open: true } });
37
67
  });
38
68
 
39
- test('should set state.isTaskFormOpen to false and call onTaskModalClose when task modal is closed', () => {
69
+ test('should set state.isTaskFormOpen to false and call onTaskModalClose when task modal is closed', async () => {
40
70
  const onTaskModalCloseMock = jest.fn();
41
- const mockButtonRef = {
42
- current: {
43
- focus: jest.fn(),
44
- },
45
- };
46
- const wrapper = shallow(<AddTaskButton onTaskModalClose={onTaskModalCloseMock} />);
47
- wrapper.instance().buttonRef = mockButtonRef;
48
- wrapper.setState({ isTaskFormOpen: true });
49
-
50
- wrapper.instance().handleModalClose();
51
-
52
- expect(wrapper.state('isTaskFormOpen')).toBe(false);
53
- expect(mockButtonRef.current.focus).toHaveBeenCalledTimes(1);
71
+ const user = userEvent();
72
+
73
+ renderComponent({ onTaskModalClose: onTaskModalCloseMock });
74
+
75
+ // First click a menu item to open the modal
76
+ const menuItem = screen.getByTestId('menu-item-general');
77
+ await user.click(menuItem);
78
+
79
+ // Verify modal is open
80
+ const modal = screen.getByTestId('task-modal');
81
+ expect(modal).toHaveAttribute('data-open', 'true');
82
+
83
+ // Close the modal
84
+ const closeButton = screen.getByTestId('modal-close');
85
+ await user.click(closeButton);
86
+
87
+ // Verify modal is closed and callback was called
88
+ expect(modal).toHaveAttribute('data-open', 'false');
54
89
  expect(onTaskModalCloseMock).toHaveBeenCalledTimes(1);
55
90
  });
91
+
92
+ describe('when routerDisabled is true', () => {
93
+ test('should use internalSidebarNavigationHandler when task menu items are clicked', async () => {
94
+ const mockNavigationHandler = jest.fn();
95
+ const user = userEvent();
96
+
97
+ renderComponent({
98
+ routerDisabled: true,
99
+ internalSidebarNavigationHandler: mockNavigationHandler,
100
+ });
101
+
102
+ const menuItem = screen.getByTestId('menu-item-general');
103
+ await user.click(menuItem);
104
+
105
+ expect(mockNavigationHandler).toHaveBeenCalledTimes(1);
106
+ expect(mockNavigationHandler).toHaveBeenCalledWith({ open: true }, true);
107
+ });
108
+
109
+ test('should preserve internalSidebarNavigation state when using navigation handler', async () => {
110
+ const mockNavigationHandler = jest.fn();
111
+ const mockInternalSidebarNavigation = {
112
+ sidebar: 'activity',
113
+ activeFeedEntryType: 'comments',
114
+ activeFeedEntryId: '123',
115
+ };
116
+ const user = userEvent();
117
+
118
+ renderComponent({
119
+ routerDisabled: true,
120
+ internalSidebarNavigationHandler: mockNavigationHandler,
121
+ internalSidebarNavigation: mockInternalSidebarNavigation,
122
+ });
123
+
124
+ const menuItem = screen.getByTestId('menu-item-general');
125
+ await user.click(menuItem);
126
+
127
+ expect(mockNavigationHandler).toHaveBeenCalledTimes(1);
128
+ expect(mockNavigationHandler).toHaveBeenCalledWith(
129
+ {
130
+ sidebar: 'activity',
131
+ activeFeedEntryType: 'comments',
132
+ activeFeedEntryId: '123',
133
+ open: true,
134
+ },
135
+ true,
136
+ );
137
+ });
138
+ });
56
139
  });