box-ui-elements 24.0.0-beta.7 → 24.0.0-beta.9

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 (102) hide show
  1. package/dist/explorer.js +1 -1
  2. package/dist/openwith.js +1 -1
  3. package/dist/picker.js +1 -1
  4. package/dist/preview.js +1 -1
  5. package/dist/sharing.js +1 -1
  6. package/dist/sidebar.js +1 -1
  7. package/dist/uploader.js +1 -1
  8. package/es/constants.js +3 -1
  9. package/es/constants.js.flow +5 -0
  10. package/es/constants.js.map +1 -1
  11. package/es/elements/content-explorer/ContentExplorer.js +3 -2
  12. package/es/elements/content-explorer/ContentExplorer.js.map +1 -1
  13. package/es/elements/content-explorer/MetadataQueryAPIHelper.js +3 -11
  14. package/es/elements/content-explorer/MetadataQueryAPIHelper.js.map +1 -1
  15. package/es/elements/content-explorer/MetadataQueryBuilder.js +13 -23
  16. package/es/elements/content-explorer/MetadataQueryBuilder.js.map +1 -1
  17. package/es/elements/content-explorer/constants.js +0 -1
  18. package/es/elements/content-explorer/constants.js.map +1 -1
  19. package/es/elements/content-explorer/utils.js +5 -10
  20. package/es/elements/content-explorer/utils.js.map +1 -1
  21. package/es/elements/content-open-with/ContentOpenWith.js +3 -2
  22. package/es/elements/content-open-with/ContentOpenWith.js.flow +2 -0
  23. package/es/elements/content-open-with/ContentOpenWith.js.map +1 -1
  24. package/es/elements/content-picker/ContentPicker.js +3 -2
  25. package/es/elements/content-picker/ContentPicker.js.flow +2 -0
  26. package/es/elements/content-picker/ContentPicker.js.map +1 -1
  27. package/es/elements/content-preview/ContentPreview.js +3 -2
  28. package/es/elements/content-preview/ContentPreview.js.flow +2 -0
  29. package/es/elements/content-preview/ContentPreview.js.map +1 -1
  30. package/es/elements/content-sharing/ContentSharing.js +3 -2
  31. package/es/elements/content-sharing/ContentSharing.js.flow +2 -1
  32. package/es/elements/content-sharing/ContentSharing.js.map +1 -1
  33. package/es/elements/content-sidebar/ContentSidebar.js +3 -2
  34. package/es/elements/content-sidebar/ContentSidebar.js.flow +7 -1
  35. package/es/elements/content-sidebar/ContentSidebar.js.map +1 -1
  36. package/es/elements/content-uploader/ContentUploader.js +3 -2
  37. package/es/elements/content-uploader/ContentUploader.js.map +1 -1
  38. package/es/elements/wrappers/ES6Wrapper.js +0 -1
  39. package/es/elements/wrappers/ES6Wrapper.js.flow +0 -3
  40. package/es/elements/wrappers/ES6Wrapper.js.map +1 -1
  41. package/es/src/elements/content-explorer/constants.d.ts +0 -1
  42. package/es/src/elements/content-explorer/utils.d.ts +1 -2
  43. package/i18n/bn-IN.js +5 -5
  44. package/i18n/bn-IN.properties +5 -5
  45. package/i18n/da-DK.js +5 -5
  46. package/i18n/da-DK.properties +5 -5
  47. package/i18n/de-DE.js +6 -6
  48. package/i18n/de-DE.properties +6 -6
  49. package/i18n/en-AU.js +1 -1
  50. package/i18n/en-AU.properties +1 -1
  51. package/i18n/en-GB.js +1 -1
  52. package/i18n/en-GB.properties +1 -1
  53. package/i18n/es-419.js +6 -6
  54. package/i18n/es-419.properties +6 -6
  55. package/i18n/es-ES.js +6 -6
  56. package/i18n/es-ES.properties +6 -6
  57. package/i18n/fi-FI.js +5 -5
  58. package/i18n/fi-FI.properties +5 -5
  59. package/i18n/fr-CA.js +5 -5
  60. package/i18n/fr-CA.properties +5 -5
  61. package/i18n/fr-FR.js +5 -5
  62. package/i18n/fr-FR.properties +5 -5
  63. package/i18n/hi-IN.js +5 -5
  64. package/i18n/hi-IN.properties +5 -5
  65. package/i18n/it-IT.js +5 -5
  66. package/i18n/it-IT.properties +5 -5
  67. package/i18n/ko-KR.js +5 -5
  68. package/i18n/ko-KR.properties +5 -5
  69. package/i18n/nb-NO.js +5 -5
  70. package/i18n/nb-NO.properties +5 -5
  71. package/i18n/nl-NL.js +5 -5
  72. package/i18n/nl-NL.properties +5 -5
  73. package/i18n/pl-PL.js +5 -5
  74. package/i18n/pl-PL.properties +5 -5
  75. package/i18n/pt-BR.js +5 -5
  76. package/i18n/pt-BR.properties +5 -5
  77. package/i18n/ru-RU.js +6 -6
  78. package/i18n/ru-RU.properties +6 -6
  79. package/i18n/sv-SE.js +5 -5
  80. package/i18n/sv-SE.properties +5 -5
  81. package/i18n/tr-TR.js +6 -6
  82. package/i18n/tr-TR.properties +6 -6
  83. package/i18n/zh-CN.js +5 -5
  84. package/i18n/zh-CN.properties +5 -5
  85. package/i18n/zh-TW.js +5 -5
  86. package/i18n/zh-TW.properties +5 -5
  87. package/package.json +3 -3
  88. package/src/constants.js +5 -0
  89. package/src/elements/content-explorer/ContentExplorer.tsx +2 -0
  90. package/src/elements/content-explorer/MetadataQueryAPIHelper.ts +3 -9
  91. package/src/elements/content-explorer/MetadataQueryBuilder.ts +14 -26
  92. package/src/elements/content-explorer/__tests__/MetadataQueryAPIHelper.test.ts +41 -14
  93. package/src/elements/content-explorer/__tests__/MetadataQueryBuilder.test.ts +13 -0
  94. package/src/elements/content-explorer/constants.ts +0 -2
  95. package/src/elements/content-explorer/utils.ts +5 -14
  96. package/src/elements/content-open-with/ContentOpenWith.js +2 -0
  97. package/src/elements/content-picker/ContentPicker.js +2 -0
  98. package/src/elements/content-preview/ContentPreview.js +2 -0
  99. package/src/elements/content-sharing/ContentSharing.js +2 -1
  100. package/src/elements/content-sidebar/ContentSidebar.js +7 -1
  101. package/src/elements/content-uploader/ContentUploader.tsx +2 -0
  102. package/src/elements/wrappers/ES6Wrapper.js +0 -3
package/i18n/ru-RU.js CHANGED
@@ -291,12 +291,12 @@ export default {
291
291
  "be.messageCenter.previewError": "Не удается показать это изображение.",
292
292
  "be.messageCenter.product": "Продукт",
293
293
  "be.messageCenter.title": "Новые возможности",
294
- "be.metadataUpdateErrorNotification": "Unable to save changes. Please try again.",
295
- "be.metadataUpdateSuccessNotification": "{numSelected, plural, =1 {1 document updated} other {# documents updated} } ",
294
+ "be.metadataUpdateErrorNotification": "Не удалось сохранить изменения. Повторите попытку.",
295
+ "be.metadataUpdateSuccessNotification": "{numSelected,plural,=1{1 документ обновлен} other{Обновлено документов: #} few{Обновлено документов: #}} ",
296
296
  "be.modifiedDate": "Изменено: {date}",
297
297
  "be.modifiedDateBy": "Изменено {date} пользователем {name}",
298
298
  "be.moreOptions": "Дополнительные параметры",
299
- "be.multipleValues": "Multiple Values",
299
+ "be.multipleValues": "Несколько значений",
300
300
  "be.nameASC": "Имя: А → Я",
301
301
  "be.nameDESC": "Имя: Я → А",
302
302
  "be.nameDate": "{date} пользователем {name}",
@@ -420,7 +420,7 @@ export default {
420
420
  "be.skillUnknownError": "Произошла ошибка при запуске этого навыка или получении его данных.",
421
421
  "be.sort": "Сортировать",
422
422
  "be.statusSkill": "Статус",
423
- "be.success": "Success",
423
+ "be.success": "Завершено",
424
424
  "be.today": "сегодня",
425
425
  "be.topicsSkill": "Темы",
426
426
  "be.transcriptEdit": "Нажмите на любой раздел для изменения.",
@@ -487,8 +487,8 @@ export default {
487
487
  "boxui.categorySelector.label.more": "Дополнительно",
488
488
  "boxui.checkboxTooltip.iconInfoText": "Информация",
489
489
  "boxui.classification.add": "Добавить",
490
- "boxui.classification.appliedByBoxAi": "ИИ Box",
491
- "boxui.classification.appliedByBoxAiOnDate": "Box AI on {modifiedAt}",
490
+ "boxui.classification.appliedByBoxAi": "Box AI",
491
+ "boxui.classification.appliedByBoxAiOnDate": "Box AI на {modifiedAt}",
492
492
  "boxui.classification.classification": "Классификация",
493
493
  "boxui.classification.classificationDarkBlue": "Темно-синий",
494
494
  "boxui.classification.classificationGreen": "Зеленый",
@@ -583,9 +583,9 @@ be.messageCenter.product = Продукт
583
583
  # Title for the message center modal
584
584
  be.messageCenter.title = Новые возможности
585
585
  # Text shown in error notification banner
586
- be.metadataUpdateErrorNotification = Unable to save changes. Please try again.
586
+ be.metadataUpdateErrorNotification = Не удалось сохранить изменения. Повторите попытку.
587
587
  # Text shown in success notification banner
588
- be.metadataUpdateSuccessNotification = {numSelected, plural, =1 {1 document updated} other {# documents updated} }
588
+ be.metadataUpdateSuccessNotification = {numSelected,plural,=1{1 документ обновлен} other{Обновлено документов: #} few{Обновлено документов: #}}
589
589
  # Text for modified date with modified prefix.
590
590
  be.modifiedDate = Изменено: {date}
591
591
  # Text for modified date with user with modified prefix.
@@ -593,7 +593,7 @@ be.modifiedDateBy = Изменено {date} пользователем {name}
593
593
  # Label for a button that displays more options
594
594
  be.moreOptions = Дополнительные параметры
595
595
  # Display text for field when there are multiple items selected and have different value
596
- be.multipleValues = Multiple Values
596
+ be.multipleValues = Несколько значений
597
597
  # Name ascending option shown in the share access drop down select.
598
598
  be.nameASC = Имя: А → Я
599
599
  # Name descending option shown in the share access drop down select.
@@ -841,7 +841,7 @@ be.sort = Сортировать
841
841
  # Label for status skill card in the preview sidebar
842
842
  be.statusSkill = Статус
843
843
  # Generic success label.
844
- be.success = Success
844
+ be.success = Завершено
845
845
  # Shown instead of todays date.
846
846
  be.today = сегодня
847
847
  # Label for keywords/topics skill section in the preview sidebar
@@ -975,9 +975,9 @@ boxui.checkboxTooltip.iconInfoText = Информация
975
975
  # Button to add classification on an item
976
976
  boxui.classification.add = Добавить
977
977
  # Title of the card that shows the reason why the AI classification was applied when no date is available.
978
- boxui.classification.appliedByBoxAi = ИИ Box
978
+ boxui.classification.appliedByBoxAi = Box AI
979
979
  # Title of the card that shows the reason why the AI classification was applied on a specific date.
980
- boxui.classification.appliedByBoxAiOnDate = Box AI on {modifiedAt}
980
+ boxui.classification.appliedByBoxAiOnDate = Box AI на {modifiedAt}
981
981
  # Header for classification section in sidebar
982
982
  boxui.classification.classification = Классификация
983
983
  # Classification label color name as dark blue
package/i18n/sv-SE.js CHANGED
@@ -291,12 +291,12 @@ export default {
291
291
  "be.messageCenter.previewError": "Vi har tyvärr problem med att visa den här bilden.",
292
292
  "be.messageCenter.product": "Produkt",
293
293
  "be.messageCenter.title": "Nyheter",
294
- "be.metadataUpdateErrorNotification": "Unable to save changes. Please try again.",
295
- "be.metadataUpdateSuccessNotification": "{numSelected, plural, =1 {1 document updated} other {# documents updated} } ",
294
+ "be.metadataUpdateErrorNotification": "Det gick inte att spara ändringar. Försök igen.",
295
+ "be.metadataUpdateSuccessNotification": "{numSelected,plural,=1{1 dokument uppdaterat} other{# dokument uppdaterade}} ",
296
296
  "be.modifiedDate": "Ändrad {date}",
297
297
  "be.modifiedDateBy": "Ändrad {date} av {name}",
298
298
  "be.moreOptions": "Fler alternativ",
299
- "be.multipleValues": "Multiple Values",
299
+ "be.multipleValues": "Flera värden",
300
300
  "be.nameASC": "Namn: A → Ö",
301
301
  "be.nameDESC": "Namn: Ö → A",
302
302
  "be.nameDate": "{date} av {name}",
@@ -420,7 +420,7 @@ export default {
420
420
  "be.skillUnknownError": "Något gick fel när funktionen kördes eller när dess data hämtades.",
421
421
  "be.sort": "Sortera",
422
422
  "be.statusSkill": "Status",
423
- "be.success": "Success",
423
+ "be.success": "Framgång",
424
424
  "be.today": "idag",
425
425
  "be.topicsSkill": "Ämnen",
426
426
  "be.transcriptEdit": "Klicka på det avsnitt du vill redigera.",
@@ -488,7 +488,7 @@ export default {
488
488
  "boxui.checkboxTooltip.iconInfoText": "Info",
489
489
  "boxui.classification.add": "Lägg till",
490
490
  "boxui.classification.appliedByBoxAi": "Box AI",
491
- "boxui.classification.appliedByBoxAiOnDate": "Box AI on {modifiedAt}",
491
+ "boxui.classification.appliedByBoxAiOnDate": "Box AI {modifiedAt}",
492
492
  "boxui.classification.classification": "Klassificering",
493
493
  "boxui.classification.classificationDarkBlue": "Mörkblått",
494
494
  "boxui.classification.classificationGreen": "Grön",
@@ -583,9 +583,9 @@ be.messageCenter.product = Produkt
583
583
  # Title for the message center modal
584
584
  be.messageCenter.title = Nyheter
585
585
  # Text shown in error notification banner
586
- be.metadataUpdateErrorNotification = Unable to save changes. Please try again.
586
+ be.metadataUpdateErrorNotification = Det gick inte att spara ändringar. Försök igen.
587
587
  # Text shown in success notification banner
588
- be.metadataUpdateSuccessNotification = {numSelected, plural, =1 {1 document updated} other {# documents updated} }
588
+ be.metadataUpdateSuccessNotification = {numSelected,plural,=1{1 dokument uppdaterat} other{# dokument uppdaterade}}
589
589
  # Text for modified date with modified prefix.
590
590
  be.modifiedDate = Ändrad {date}
591
591
  # Text for modified date with user with modified prefix.
@@ -593,7 +593,7 @@ be.modifiedDateBy = Ändrad {date} av {name}
593
593
  # Label for a button that displays more options
594
594
  be.moreOptions = Fler alternativ
595
595
  # Display text for field when there are multiple items selected and have different value
596
- be.multipleValues = Multiple Values
596
+ be.multipleValues = Flera värden
597
597
  # Name ascending option shown in the share access drop down select.
598
598
  be.nameASC = Namn: A → Ö
599
599
  # Name descending option shown in the share access drop down select.
@@ -841,7 +841,7 @@ be.sort = Sortera
841
841
  # Label for status skill card in the preview sidebar
842
842
  be.statusSkill = Status
843
843
  # Generic success label.
844
- be.success = Success
844
+ be.success = Framgång
845
845
  # Shown instead of todays date.
846
846
  be.today = idag
847
847
  # Label for keywords/topics skill section in the preview sidebar
@@ -977,7 +977,7 @@ boxui.classification.add = Lägg till
977
977
  # Title of the card that shows the reason why the AI classification was applied when no date is available.
978
978
  boxui.classification.appliedByBoxAi = Box AI
979
979
  # Title of the card that shows the reason why the AI classification was applied on a specific date.
980
- boxui.classification.appliedByBoxAiOnDate = Box AI on {modifiedAt}
980
+ boxui.classification.appliedByBoxAiOnDate = Box AI {modifiedAt}
981
981
  # Header for classification section in sidebar
982
982
  boxui.classification.classification = Klassificering
983
983
  # Classification label color name as dark blue
package/i18n/tr-TR.js CHANGED
@@ -291,12 +291,12 @@ export default {
291
291
  "be.messageCenter.previewError": "Üzgünüz, bu görüntüyü göstermekte sorun yaşıyoruz.",
292
292
  "be.messageCenter.product": "Ürün",
293
293
  "be.messageCenter.title": "Yenilikler",
294
- "be.metadataUpdateErrorNotification": "Unable to save changes. Please try again.",
295
- "be.metadataUpdateSuccessNotification": "{numSelected, plural, =1 {1 document updated} other {# documents updated} } ",
294
+ "be.metadataUpdateErrorNotification": "Değişiklikler kaydedilemedi. Lütfen tekrar deneyin.",
295
+ "be.metadataUpdateSuccessNotification": "{numSelected,plural,=1{1 belge güncellendi} other{# belge güncellendi}} ",
296
296
  "be.modifiedDate": "{date} tarihinde değiştirildi",
297
297
  "be.modifiedDateBy": "{name} tarafından {date} tarihinde değiştirildi",
298
298
  "be.moreOptions": "Daha Fazla Seçenek",
299
- "be.multipleValues": "Multiple Values",
299
+ "be.multipleValues": "Çoklu Değer",
300
300
  "be.nameASC": "Ad: A → Z",
301
301
  "be.nameDESC": "Ad: Z → A",
302
302
  "be.nameDate": "{name} tarafından {date} tarihinde",
@@ -420,7 +420,7 @@ export default {
420
420
  "be.skillUnknownError": "Bu Skill özelliği kullanılırken veya ilgili veriler getirilirken bir hata oluştu.",
421
421
  "be.sort": "Sırala",
422
422
  "be.statusSkill": "Durum",
423
- "be.success": "Success",
423
+ "be.success": "Başarılı",
424
424
  "be.today": "bugün",
425
425
  "be.topicsSkill": "Konular",
426
426
  "be.transcriptEdit": "Düzenlemek için bir bölüme tıklayın.",
@@ -487,8 +487,8 @@ export default {
487
487
  "boxui.categorySelector.label.more": "Daha fazla",
488
488
  "boxui.checkboxTooltip.iconInfoText": "Bilgi",
489
489
  "boxui.classification.add": "Ekle",
490
- "boxui.classification.appliedByBoxAi": "Box IA",
491
- "boxui.classification.appliedByBoxAiOnDate": "Box AI on {modifiedAt}",
490
+ "boxui.classification.appliedByBoxAi": "Box AI",
491
+ "boxui.classification.appliedByBoxAiOnDate": "{modifiedAt} bilgisine ayarlı Box AI",
492
492
  "boxui.classification.classification": "Sınıflandırma",
493
493
  "boxui.classification.classificationDarkBlue": "Koyu Mavi",
494
494
  "boxui.classification.classificationGreen": "Yeşil",
@@ -583,9 +583,9 @@ be.messageCenter.product = Ürün
583
583
  # Title for the message center modal
584
584
  be.messageCenter.title = Yenilikler
585
585
  # Text shown in error notification banner
586
- be.metadataUpdateErrorNotification = Unable to save changes. Please try again.
586
+ be.metadataUpdateErrorNotification = Değişiklikler kaydedilemedi. Lütfen tekrar deneyin.
587
587
  # Text shown in success notification banner
588
- be.metadataUpdateSuccessNotification = {numSelected, plural, =1 {1 document updated} other {# documents updated} }
588
+ be.metadataUpdateSuccessNotification = {numSelected,plural,=1{1 belge güncellendi} other{# belge güncellendi}}
589
589
  # Text for modified date with modified prefix.
590
590
  be.modifiedDate = {date} tarihinde değiştirildi
591
591
  # Text for modified date with user with modified prefix.
@@ -593,7 +593,7 @@ be.modifiedDateBy = {name} tarafından {date} tarihinde değiştirildi
593
593
  # Label for a button that displays more options
594
594
  be.moreOptions = Daha Fazla Seçenek
595
595
  # Display text for field when there are multiple items selected and have different value
596
- be.multipleValues = Multiple Values
596
+ be.multipleValues = Çoklu Değer
597
597
  # Name ascending option shown in the share access drop down select.
598
598
  be.nameASC = Ad: A → Z
599
599
  # Name descending option shown in the share access drop down select.
@@ -841,7 +841,7 @@ be.sort = Sırala
841
841
  # Label for status skill card in the preview sidebar
842
842
  be.statusSkill = Durum
843
843
  # Generic success label.
844
- be.success = Success
844
+ be.success = Başarılı
845
845
  # Shown instead of todays date.
846
846
  be.today = bugün
847
847
  # Label for keywords/topics skill section in the preview sidebar
@@ -975,9 +975,9 @@ boxui.checkboxTooltip.iconInfoText = Bilgi
975
975
  # Button to add classification on an item
976
976
  boxui.classification.add = Ekle
977
977
  # Title of the card that shows the reason why the AI classification was applied when no date is available.
978
- boxui.classification.appliedByBoxAi = Box IA
978
+ boxui.classification.appliedByBoxAi = Box AI
979
979
  # Title of the card that shows the reason why the AI classification was applied on a specific date.
980
- boxui.classification.appliedByBoxAiOnDate = Box AI on {modifiedAt}
980
+ boxui.classification.appliedByBoxAiOnDate = {modifiedAt} bilgisine ayarlı Box AI
981
981
  # Header for classification section in sidebar
982
982
  boxui.classification.classification = Sınıflandırma
983
983
  # Classification label color name as dark blue
package/i18n/zh-CN.js CHANGED
@@ -291,12 +291,12 @@ export default {
291
291
  "be.messageCenter.previewError": "抱歉,无法显示此图像。",
292
292
  "be.messageCenter.product": "产品",
293
293
  "be.messageCenter.title": "新增功能",
294
- "be.metadataUpdateErrorNotification": "Unable to save changes. Please try again.",
295
- "be.metadataUpdateSuccessNotification": "{numSelected, plural, =1 {1 document updated} other {# documents updated} } ",
294
+ "be.metadataUpdateErrorNotification": "无法保存更改。请重试。",
295
+ "be.metadataUpdateSuccessNotification": "{numSelected,plural,other{# 个文档已更新}} ",
296
296
  "be.modifiedDate": "修改日期:{date}",
297
297
  "be.modifiedDateBy": "{name} 于 {date} 修改",
298
298
  "be.moreOptions": "更多选项",
299
- "be.multipleValues": "Multiple Values",
299
+ "be.multipleValues": "多个值",
300
300
  "be.nameASC": "名称:A → Z",
301
301
  "be.nameDESC": "名称:Z → A",
302
302
  "be.nameDate": "{name} 于 {date} 修改",
@@ -420,7 +420,7 @@ export default {
420
420
  "be.skillUnknownError": "运行此技能或获取其数据时出错。",
421
421
  "be.sort": "排序",
422
422
  "be.statusSkill": "状态",
423
- "be.success": "Success",
423
+ "be.success": "成功",
424
424
  "be.today": "今天",
425
425
  "be.topicsSkill": "主题",
426
426
  "be.transcriptEdit": "单击任何部分开始编辑。",
@@ -488,7 +488,7 @@ export default {
488
488
  "boxui.checkboxTooltip.iconInfoText": "信息",
489
489
  "boxui.classification.add": "添加",
490
490
  "boxui.classification.appliedByBoxAi": "Box AI",
491
- "boxui.classification.appliedByBoxAiOnDate": "Box AI on {modifiedAt}",
491
+ "boxui.classification.appliedByBoxAiOnDate": "Box AI {modifiedAt}",
492
492
  "boxui.classification.classification": "分类",
493
493
  "boxui.classification.classificationDarkBlue": "深蓝色",
494
494
  "boxui.classification.classificationGreen": "绿色",
@@ -583,9 +583,9 @@ be.messageCenter.product = 产品
583
583
  # Title for the message center modal
584
584
  be.messageCenter.title = 新增功能
585
585
  # Text shown in error notification banner
586
- be.metadataUpdateErrorNotification = Unable to save changes. Please try again.
586
+ be.metadataUpdateErrorNotification = 无法保存更改。请重试。
587
587
  # Text shown in success notification banner
588
- be.metadataUpdateSuccessNotification = {numSelected, plural, =1 {1 document updated} other {# documents updated} }
588
+ be.metadataUpdateSuccessNotification = {numSelected,plural,other{# 个文档已更新}}
589
589
  # Text for modified date with modified prefix.
590
590
  be.modifiedDate = 修改日期:{date}
591
591
  # Text for modified date with user with modified prefix.
@@ -593,7 +593,7 @@ be.modifiedDateBy = {name} 于 {date} 修改
593
593
  # Label for a button that displays more options
594
594
  be.moreOptions = 更多选项
595
595
  # Display text for field when there are multiple items selected and have different value
596
- be.multipleValues = Multiple Values
596
+ be.multipleValues = 多个值
597
597
  # Name ascending option shown in the share access drop down select.
598
598
  be.nameASC = 名称:A → Z
599
599
  # Name descending option shown in the share access drop down select.
@@ -841,7 +841,7 @@ be.sort = 排序
841
841
  # Label for status skill card in the preview sidebar
842
842
  be.statusSkill = 状态
843
843
  # Generic success label.
844
- be.success = Success
844
+ be.success = 成功
845
845
  # Shown instead of todays date.
846
846
  be.today = 今天
847
847
  # Label for keywords/topics skill section in the preview sidebar
@@ -977,7 +977,7 @@ boxui.classification.add = 添加
977
977
  # Title of the card that shows the reason why the AI classification was applied when no date is available.
978
978
  boxui.classification.appliedByBoxAi = Box AI
979
979
  # Title of the card that shows the reason why the AI classification was applied on a specific date.
980
- boxui.classification.appliedByBoxAiOnDate = Box AI on {modifiedAt}
980
+ boxui.classification.appliedByBoxAiOnDate = Box AI {modifiedAt}
981
981
  # Header for classification section in sidebar
982
982
  boxui.classification.classification = 分类
983
983
  # Classification label color name as dark blue
package/i18n/zh-TW.js CHANGED
@@ -291,12 +291,12 @@ export default {
291
291
  "be.messageCenter.previewError": "很抱歉,顯示此影像時發生問題。",
292
292
  "be.messageCenter.product": "產品",
293
293
  "be.messageCenter.title": "新增內容",
294
- "be.metadataUpdateErrorNotification": "Unable to save changes. Please try again.",
295
- "be.metadataUpdateSuccessNotification": "{numSelected, plural, =1 {1 document updated} other {# documents updated} } ",
294
+ "be.metadataUpdateErrorNotification": "無法儲存變更。 請再試一次。",
295
+ "be.metadataUpdateSuccessNotification": "{numSelected,plural,=1{1 document updated} other{# 個文件已更新}} ",
296
296
  "be.modifiedDate": "於 {date} 修改",
297
297
  "be.modifiedDateBy": "{name} 於 {date} 修改",
298
298
  "be.moreOptions": "更多選項",
299
- "be.multipleValues": "Multiple Values",
299
+ "be.multipleValues": "多個值",
300
300
  "be.nameASC": "名稱:A → Z",
301
301
  "be.nameDESC": "名稱:Z → A",
302
302
  "be.nameDate": "{name} 於 {date}",
@@ -420,7 +420,7 @@ export default {
420
420
  "be.skillUnknownError": "執行這個技能或擷取其資料時發生錯誤。",
421
421
  "be.sort": "排序",
422
422
  "be.statusSkill": "狀態",
423
- "be.success": "Success",
423
+ "be.success": "成功",
424
424
  "be.today": "今天",
425
425
  "be.topicsSkill": "主題",
426
426
  "be.transcriptEdit": "按一下任一區段以編輯。",
@@ -488,7 +488,7 @@ export default {
488
488
  "boxui.checkboxTooltip.iconInfoText": "資訊",
489
489
  "boxui.classification.add": "新增",
490
490
  "boxui.classification.appliedByBoxAi": "Box AI",
491
- "boxui.classification.appliedByBoxAiOnDate": "Box AI on {modifiedAt}",
491
+ "boxui.classification.appliedByBoxAiOnDate": "Box AI 已修改於 {modifiedAt}",
492
492
  "boxui.classification.classification": "分類",
493
493
  "boxui.classification.classificationDarkBlue": "深藍色",
494
494
  "boxui.classification.classificationGreen": "綠色",
@@ -583,9 +583,9 @@ be.messageCenter.product = 產品
583
583
  # Title for the message center modal
584
584
  be.messageCenter.title = 新增內容
585
585
  # Text shown in error notification banner
586
- be.metadataUpdateErrorNotification = Unable to save changes. Please try again.
586
+ be.metadataUpdateErrorNotification = 無法儲存變更。 請再試一次。
587
587
  # Text shown in success notification banner
588
- be.metadataUpdateSuccessNotification = {numSelected, plural, =1 {1 document updated} other {# documents updated} }
588
+ be.metadataUpdateSuccessNotification = {numSelected,plural,=1{1 document updated} other{# 個文件已更新}}
589
589
  # Text for modified date with modified prefix.
590
590
  be.modifiedDate = 於 {date} 修改
591
591
  # Text for modified date with user with modified prefix.
@@ -593,7 +593,7 @@ be.modifiedDateBy = {name} 於 {date} 修改
593
593
  # Label for a button that displays more options
594
594
  be.moreOptions = 更多選項
595
595
  # Display text for field when there are multiple items selected and have different value
596
- be.multipleValues = Multiple Values
596
+ be.multipleValues = 多個值
597
597
  # Name ascending option shown in the share access drop down select.
598
598
  be.nameASC = 名稱:A → Z
599
599
  # Name descending option shown in the share access drop down select.
@@ -841,7 +841,7 @@ be.sort = 排序
841
841
  # Label for status skill card in the preview sidebar
842
842
  be.statusSkill = 狀態
843
843
  # Generic success label.
844
- be.success = Success
844
+ be.success = 成功
845
845
  # Shown instead of todays date.
846
846
  be.today = 今天
847
847
  # Label for keywords/topics skill section in the preview sidebar
@@ -977,7 +977,7 @@ boxui.classification.add = 新增
977
977
  # Title of the card that shows the reason why the AI classification was applied when no date is available.
978
978
  boxui.classification.appliedByBoxAi = Box AI
979
979
  # Title of the card that shows the reason why the AI classification was applied on a specific date.
980
- boxui.classification.appliedByBoxAiOnDate = Box AI on {modifiedAt}
980
+ boxui.classification.appliedByBoxAiOnDate = Box AI 已修改於 {modifiedAt}
981
981
  # Header for classification section in sidebar
982
982
  boxui.classification.classification = 分類
983
983
  # Classification label color name as dark blue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "box-ui-elements",
3
- "version": "24.0.0-beta.7",
3
+ "version": "24.0.0-beta.9",
4
4
  "description": "Box UI Elements",
5
5
  "author": "Box (https://www.box.com/)",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -55,7 +55,7 @@
55
55
  "build:dev:dist": "NODE_ENV=development BABEL_ENV=development LANGUAGE=en-US webpack --config scripts/webpack.config.js --mode development --progress",
56
56
  "build:dev:es": "NODE_ENV=development BABEL_ENV=development yarn build:es --copy-files --source-maps inline --watch --ignore \"**/*.d.ts,**/__tests__/**,**/__mocks__/**\"",
57
57
  "build:es": "babel src --extensions '.js,.tsx,.ts' --out-dir es",
58
- "build:i18n": "node scripts/buildTranslations.js",
58
+ "build:i18n": "node scripts/buildLanguages.js",
59
59
  "build:npm": "npm-run-all clean build:i18n build:prod:npm build:prod:es",
60
60
  "build:prod:analyze": "BUNDLE_ANALYSIS=true npm-run-all setup build:prod:npm",
61
61
  "build:prod:dist": "NODE_ENV=production webpack --config scripts/webpack.config.js --mode production",
@@ -79,7 +79,7 @@
79
79
  "release:hotfix": "DIST=latest HOTFIX=true scripts/release.sh",
80
80
  "release:latest": "DIST=latest BRANCH=master scripts/release.sh",
81
81
  "release:next": "DIST=next BRANCH=next scripts/release.sh",
82
- "release:cdn": "yarn setup; node scripts/buildLocaleBundles.js",
82
+ "release:cdn": "yarn setup; node scripts/buildLocaleAssets.js",
83
83
  "setup": "yarn install --frozen-lockfile; npm-run-all clean build:i18n",
84
84
  "start": "npm-run-all setup start:storybook",
85
85
  "start:npm": "yarn setup; yarn build:dev:es",
package/src/constants.js CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  import Browser from './utils/Browser';
8
8
 
9
+ declare var __VERSION__: string;
10
+
9
11
  /* ------------------------ API ---------------------------- */
10
12
  export const API_PAGE_LIMIT = 1000; // default limit for paginated api calls
11
13
 
@@ -227,6 +229,8 @@ export const DEFAULT_FETCH_END = 1000;
227
229
  export const DEFAULT_VIEW_FILES: 'files' = 'files';
228
230
  export const DEFAULT_VIEW_RECENTS: 'recents' = 'recents';
229
231
  export const DEFAULT_VIEW_METADATA: 'metadata' = 'metadata';
232
+
233
+ /* ---------------------- Client Information ---------------------- */
230
234
  export const CLIENT_NAME_CONTENT_EXPLORER: 'ContentExplorer' = 'ContentExplorer';
231
235
  export const CLIENT_NAME_OPEN_WITH: 'ContentOpenWith' = 'ContentOpenWith';
232
236
  export const CLIENT_NAME_CONTENT_PICKER: 'ContentPicker' = 'ContentPicker';
@@ -236,6 +240,7 @@ export const CLIENT_NAME_CONTENT_SIDEBAR: 'ContentSidebar' = 'ContentSidebar';
236
240
  export const CLIENT_NAME_CONTENT_UPLOADER: 'ContentUploader' = 'ContentUploader';
237
241
  export const CLIENT_NAME_FILE_PICKER: 'FilePicker' = 'FilePicker';
238
242
  export const CLIENT_NAME_FOLDER_PICKER: 'FolderPicker' = 'FolderPicker';
243
+ export const CLIENT_VERSION = __VERSION__;
239
244
 
240
245
  /* ---------------------- Statuses -------------------------- */
241
246
  export const STATUS_PENDING: 'pending' = 'pending';
@@ -64,6 +64,7 @@ import {
64
64
  TYPE_WEBLINK,
65
65
  TYPE_FOLDER,
66
66
  CLIENT_NAME_CONTENT_EXPLORER,
67
+ CLIENT_VERSION,
67
68
  DEFAULT_PAGE_NUMBER,
68
69
  DEFAULT_PAGE_SIZE,
69
70
  DEFAULT_VIEW_FILES,
@@ -292,6 +293,7 @@ class ContentExplorer extends Component<ContentExplorerProps, State> {
292
293
  sharedLinkPassword,
293
294
  token,
294
295
  uploadHost,
296
+ version: CLIENT_VERSION,
295
297
  });
296
298
 
297
299
  this.id = uniqueid('bce_');
@@ -172,17 +172,11 @@ export default class MetadataQueryAPIHelper {
172
172
  };
173
173
 
174
174
  getTemplateSchemaInfo = (data: MetadataQueryResponseData): Promise<MetadataTemplateSchemaResponse | void> => {
175
- const { entries } = data;
176
175
  this.metadataQueryResponseData = data;
177
- if (!entries || entries.length === 0) {
178
- // Don't make metadata API call to get template info
179
- return Promise.resolve();
180
- }
181
176
 
182
- const metadata = getProp(entries, '[0].metadata');
183
- this.templateScope = Object.keys(metadata)[0];
184
- const instance = metadata[this.templateScope];
185
- this.templateKey = Object.keys(instance)[0];
177
+ const [scope, key] = this.metadataQuery.from.split('.');
178
+ this.templateScope = scope;
179
+ this.templateKey = key;
186
180
 
187
181
  return this.api.getMetadataAPI(true).getSchemaByTemplateKey(this.templateKey);
188
182
  };
@@ -1,6 +1,5 @@
1
- import { BoxItemSelection } from '@box/box-item-type-selector';
2
1
  import isNil from 'lodash/isNil';
3
- import { mapFileTypes } from './utils';
2
+ import { getFileExtensions } from './utils';
4
3
 
5
4
  type QueryResult = {
6
5
  queryParams: { [key: string]: number | Date | string };
@@ -134,42 +133,31 @@ export const getMimeTypeFilter = (filterValue: string[], fieldKey: string, argIn
134
133
  };
135
134
  }
136
135
 
137
- // Use mapFileTypes to get the correct extensions and handle special cases
138
- const mappedExtensions = mapFileTypes(filterValue as BoxItemSelection);
139
- if (mappedExtensions.length === 0) {
140
- return {
141
- queryParams: {},
142
- queries: [],
143
- keysGenerated: 0,
144
- };
145
- }
146
-
147
136
  let currentArgIndex = argIndexStart;
148
137
  const queryParams: { [key: string]: number | Date | string } = {};
149
138
  const queries: string[] = [];
150
139
 
151
140
  // Handle specific extensions and folder type
152
- const extensions: string[] = [];
141
+ const extensions: string[][] = [];
153
142
  let hasFolder = false;
154
-
155
- for (const extension of mappedExtensions) {
156
- if (extension === 'folder') {
157
- if (!hasFolder) {
158
- currentArgIndex += 1;
159
- const folderArgKey = generateArgKey('mime_folderType', currentArgIndex);
160
- queryParams[folderArgKey] = 'folder';
161
- queries.push(`(item.type = :${folderArgKey})`);
162
- hasFolder = true;
163
- }
143
+ for (const extension of filterValue) {
144
+ if (extension === 'folderType' && !hasFolder) {
145
+ currentArgIndex += 1;
146
+ const folderArgKey = generateArgKey('mime_folderType', currentArgIndex);
147
+ queryParams[folderArgKey] = 'folder';
148
+ queries.push(`(item.type = :${folderArgKey})`);
149
+ hasFolder = true;
164
150
  } else {
165
- extensions.push(extension);
151
+ extensions.push(getFileExtensions(extension));
166
152
  }
167
153
  }
168
154
 
155
+ // flat the array of arrays
156
+ const flattenExtensions = extensions.flat();
169
157
  // Handle extensions in batch if any exist
170
- if (extensions.length > 0) {
158
+ if (flattenExtensions.length > 0) {
171
159
  const extensionQueryParams = Object.fromEntries(
172
- extensions.map(extension => {
160
+ flattenExtensions.map(extension => {
173
161
  currentArgIndex += 1;
174
162
  return [generateArgKey(fieldKey, currentArgIndex), extension];
175
163
  }),
@@ -189,14 +189,14 @@ describe('elements/content-explorer/MetadataQueryAPIHelper', () => {
189
189
  };
190
190
  const mdQuery = {
191
191
  ancestor_folder_id: '672838458',
192
- from: 'enterprise_1234.templateKey',
192
+ from: `${templateScope}.${templateKey}`,
193
193
  query: 'query',
194
194
  query_params: {},
195
195
  fields: [
196
196
  FIELD_ITEM_NAME,
197
- 'metadata.enterprise_1234.templateKey.type',
198
- 'metadata.enterprise_1234.templateKey.year',
199
- 'metadata.enterprise_1234.templateKey.approved',
197
+ `metadata.${templateScope}.${templateKey}.type`,
198
+ `metadata.${templateScope}.${templateKey}.year`,
199
+ `metadata.${templateScope}.${templateKey}.approved`,
200
200
  ],
201
201
  };
202
202
 
@@ -206,6 +206,10 @@ describe('elements/content-explorer/MetadataQueryAPIHelper', () => {
206
206
  metadataQueryAPIHelper.templateScope = templateScope;
207
207
  metadataQueryAPIHelper.metadataTemplate = template;
208
208
  metadataQueryAPIHelper.metadataQuery = mdQuery;
209
+
210
+ // Reset mocks before each test
211
+ getSchemaByTemplateKeyFunc.mockClear();
212
+ getSchemaByTemplateKeyFunc.mockResolvedValue(templateSchemaResponse);
209
213
  });
210
214
 
211
215
  describe('flattenMetadata()', () => {
@@ -267,7 +271,7 @@ describe('elements/content-explorer/MetadataQueryAPIHelper', () => {
267
271
  });
268
272
 
269
273
  describe('getTemplateSchemaInfo()', () => {
270
- test('should set instance properties and make xhr call to get template info when response has valid entries', async () => {
274
+ test('should set instance properties and make xhr call to get template info', async () => {
271
275
  const result = await metadataQueryAPIHelper.getTemplateSchemaInfo(metadataQueryResponse);
272
276
  expect(getSchemaByTemplateKeyFunc).toHaveBeenCalledWith(templateKey);
273
277
  expect(result).toEqual(templateSchemaResponse);
@@ -276,26 +280,49 @@ describe('elements/content-explorer/MetadataQueryAPIHelper', () => {
276
280
  expect(metadataQueryAPIHelper.templateKey).toEqual(templateKey);
277
281
  });
278
282
 
279
- test('should not make xhr call to get metadata template info when response has zero/invalid entries', async () => {
283
+ test('should make xhr call to get metadata template info even when response has zero entries', async () => {
280
284
  const emptyEntriesResponse = { entries: [], next_marker: nextMarker };
281
285
  const result = await metadataQueryAPIHelper.getTemplateSchemaInfo(emptyEntriesResponse);
282
- expect(getSchemaByTemplateKeyFunc).not.toHaveBeenCalled();
283
- expect(result).toBe(undefined);
286
+ expect(getSchemaByTemplateKeyFunc).toHaveBeenCalledWith(templateKey);
287
+ expect(result).toEqual(templateSchemaResponse);
284
288
  expect(metadataQueryAPIHelper.metadataQueryResponseData).toEqual(emptyEntriesResponse);
289
+ expect(metadataQueryAPIHelper.templateScope).toEqual(templateScope);
290
+ expect(metadataQueryAPIHelper.templateKey).toEqual(templateKey);
285
291
  });
286
292
 
287
- test('should handle response with null entries', async () => {
293
+ test('should make xhr call to get metadata template info even when response has null entries', async () => {
288
294
  const nullEntriesResponse = { entries: null, next_marker: nextMarker };
289
295
  const result = await metadataQueryAPIHelper.getTemplateSchemaInfo(nullEntriesResponse);
290
- expect(getSchemaByTemplateKeyFunc).not.toHaveBeenCalled();
291
- expect(result).toBe(undefined);
296
+ expect(getSchemaByTemplateKeyFunc).toHaveBeenCalledWith(templateKey);
297
+ expect(result).toEqual(templateSchemaResponse);
298
+ expect(metadataQueryAPIHelper.metadataQueryResponseData).toEqual(nullEntriesResponse);
299
+ expect(metadataQueryAPIHelper.templateScope).toEqual(templateScope);
300
+ expect(metadataQueryAPIHelper.templateKey).toEqual(templateKey);
292
301
  });
293
302
 
294
- test('should handle response with undefined entries', async () => {
303
+ test('should make xhr call to get metadata template info even when response has undefined entries', async () => {
295
304
  const undefinedEntriesResponse = { next_marker: nextMarker };
296
305
  const result = await metadataQueryAPIHelper.getTemplateSchemaInfo(undefinedEntriesResponse);
297
- expect(getSchemaByTemplateKeyFunc).not.toHaveBeenCalled();
298
- expect(result).toBe(undefined);
306
+ expect(getSchemaByTemplateKeyFunc).toHaveBeenCalledWith(templateKey);
307
+ expect(result).toEqual(templateSchemaResponse);
308
+ expect(metadataQueryAPIHelper.metadataQueryResponseData).toEqual(undefinedEntriesResponse);
309
+ expect(metadataQueryAPIHelper.templateScope).toEqual(templateScope);
310
+ expect(metadataQueryAPIHelper.templateKey).toEqual(templateKey);
311
+ });
312
+
313
+ test('should extract template scope and key from metadata query from field', async () => {
314
+ // Test with different scope and key in the query
315
+ const differentScope = 'enterprise_99999';
316
+ const differentKey = 'differentTemplate';
317
+ metadataQueryAPIHelper.metadataQuery = {
318
+ ...mdQuery,
319
+ from: `${differentScope}.${differentKey}`,
320
+ };
321
+
322
+ await metadataQueryAPIHelper.getTemplateSchemaInfo(metadataQueryResponse);
323
+ expect(getSchemaByTemplateKeyFunc).toHaveBeenCalledWith(differentKey);
324
+ expect(metadataQueryAPIHelper.templateScope).toEqual(differentScope);
325
+ expect(metadataQueryAPIHelper.templateKey).toEqual(differentKey);
299
326
  });
300
327
  });
301
328