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.
- package/dist/explorer.js +1 -1
- package/dist/openwith.js +1 -1
- package/dist/picker.js +1 -1
- package/dist/preview.js +1 -1
- package/dist/sharing.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/uploader.js +1 -1
- package/es/constants.js +3 -1
- package/es/constants.js.flow +5 -0
- package/es/constants.js.map +1 -1
- package/es/elements/content-explorer/ContentExplorer.js +3 -2
- package/es/elements/content-explorer/ContentExplorer.js.map +1 -1
- package/es/elements/content-explorer/MetadataQueryAPIHelper.js +3 -11
- package/es/elements/content-explorer/MetadataQueryAPIHelper.js.map +1 -1
- package/es/elements/content-explorer/MetadataQueryBuilder.js +13 -23
- package/es/elements/content-explorer/MetadataQueryBuilder.js.map +1 -1
- package/es/elements/content-explorer/constants.js +0 -1
- package/es/elements/content-explorer/constants.js.map +1 -1
- package/es/elements/content-explorer/utils.js +5 -10
- package/es/elements/content-explorer/utils.js.map +1 -1
- package/es/elements/content-open-with/ContentOpenWith.js +3 -2
- package/es/elements/content-open-with/ContentOpenWith.js.flow +2 -0
- package/es/elements/content-open-with/ContentOpenWith.js.map +1 -1
- package/es/elements/content-picker/ContentPicker.js +3 -2
- package/es/elements/content-picker/ContentPicker.js.flow +2 -0
- package/es/elements/content-picker/ContentPicker.js.map +1 -1
- package/es/elements/content-preview/ContentPreview.js +3 -2
- package/es/elements/content-preview/ContentPreview.js.flow +2 -0
- package/es/elements/content-preview/ContentPreview.js.map +1 -1
- package/es/elements/content-sharing/ContentSharing.js +3 -2
- package/es/elements/content-sharing/ContentSharing.js.flow +2 -1
- package/es/elements/content-sharing/ContentSharing.js.map +1 -1
- package/es/elements/content-sidebar/ContentSidebar.js +3 -2
- package/es/elements/content-sidebar/ContentSidebar.js.flow +7 -1
- package/es/elements/content-sidebar/ContentSidebar.js.map +1 -1
- package/es/elements/content-uploader/ContentUploader.js +3 -2
- package/es/elements/content-uploader/ContentUploader.js.map +1 -1
- package/es/elements/wrappers/ES6Wrapper.js +0 -1
- package/es/elements/wrappers/ES6Wrapper.js.flow +0 -3
- package/es/elements/wrappers/ES6Wrapper.js.map +1 -1
- package/es/src/elements/content-explorer/constants.d.ts +0 -1
- package/es/src/elements/content-explorer/utils.d.ts +1 -2
- package/i18n/bn-IN.js +5 -5
- package/i18n/bn-IN.properties +5 -5
- package/i18n/da-DK.js +5 -5
- package/i18n/da-DK.properties +5 -5
- package/i18n/de-DE.js +6 -6
- package/i18n/de-DE.properties +6 -6
- package/i18n/en-AU.js +1 -1
- package/i18n/en-AU.properties +1 -1
- package/i18n/en-GB.js +1 -1
- package/i18n/en-GB.properties +1 -1
- package/i18n/es-419.js +6 -6
- package/i18n/es-419.properties +6 -6
- package/i18n/es-ES.js +6 -6
- package/i18n/es-ES.properties +6 -6
- package/i18n/fi-FI.js +5 -5
- package/i18n/fi-FI.properties +5 -5
- package/i18n/fr-CA.js +5 -5
- package/i18n/fr-CA.properties +5 -5
- package/i18n/fr-FR.js +5 -5
- package/i18n/fr-FR.properties +5 -5
- package/i18n/hi-IN.js +5 -5
- package/i18n/hi-IN.properties +5 -5
- package/i18n/it-IT.js +5 -5
- package/i18n/it-IT.properties +5 -5
- package/i18n/ko-KR.js +5 -5
- package/i18n/ko-KR.properties +5 -5
- package/i18n/nb-NO.js +5 -5
- package/i18n/nb-NO.properties +5 -5
- package/i18n/nl-NL.js +5 -5
- package/i18n/nl-NL.properties +5 -5
- package/i18n/pl-PL.js +5 -5
- package/i18n/pl-PL.properties +5 -5
- package/i18n/pt-BR.js +5 -5
- package/i18n/pt-BR.properties +5 -5
- package/i18n/ru-RU.js +6 -6
- package/i18n/ru-RU.properties +6 -6
- package/i18n/sv-SE.js +5 -5
- package/i18n/sv-SE.properties +5 -5
- package/i18n/tr-TR.js +6 -6
- package/i18n/tr-TR.properties +6 -6
- package/i18n/zh-CN.js +5 -5
- package/i18n/zh-CN.properties +5 -5
- package/i18n/zh-TW.js +5 -5
- package/i18n/zh-TW.properties +5 -5
- package/package.json +3 -3
- package/src/constants.js +5 -0
- package/src/elements/content-explorer/ContentExplorer.tsx +2 -0
- package/src/elements/content-explorer/MetadataQueryAPIHelper.ts +3 -9
- package/src/elements/content-explorer/MetadataQueryBuilder.ts +14 -26
- package/src/elements/content-explorer/__tests__/MetadataQueryAPIHelper.test.ts +41 -14
- package/src/elements/content-explorer/__tests__/MetadataQueryBuilder.test.ts +13 -0
- package/src/elements/content-explorer/constants.ts +0 -2
- package/src/elements/content-explorer/utils.ts +5 -14
- package/src/elements/content-open-with/ContentOpenWith.js +2 -0
- package/src/elements/content-picker/ContentPicker.js +2 -0
- package/src/elements/content-preview/ContentPreview.js +2 -0
- package/src/elements/content-sharing/ContentSharing.js +2 -1
- package/src/elements/content-sidebar/ContentSidebar.js +7 -1
- package/src/elements/content-uploader/ContentUploader.tsx +2 -0
- 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": "
|
|
295
|
-
"be.metadataUpdateSuccessNotification": "{numSelected,
|
|
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": "
|
|
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": "
|
|
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": "
|
|
491
|
-
"boxui.classification.appliedByBoxAiOnDate": "Box AI
|
|
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": "Зеленый",
|
package/i18n/ru-RU.properties
CHANGED
|
@@ -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 =
|
|
586
|
+
be.metadataUpdateErrorNotification = Не удалось сохранить изменения. Повторите попытку.
|
|
587
587
|
# Text shown in success notification banner
|
|
588
|
-
be.metadataUpdateSuccessNotification = {numSelected,
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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": "
|
|
295
|
-
"be.metadataUpdateSuccessNotification": "{numSelected,
|
|
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": "
|
|
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": "
|
|
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
|
|
491
|
+
"boxui.classification.appliedByBoxAiOnDate": "Box AI på {modifiedAt}",
|
|
492
492
|
"boxui.classification.classification": "Klassificering",
|
|
493
493
|
"boxui.classification.classificationDarkBlue": "Mörkblått",
|
|
494
494
|
"boxui.classification.classificationGreen": "Grön",
|
package/i18n/sv-SE.properties
CHANGED
|
@@ -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 =
|
|
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,
|
|
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 =
|
|
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 =
|
|
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
|
|
980
|
+
boxui.classification.appliedByBoxAiOnDate = Box AI på {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": "
|
|
295
|
-
"be.metadataUpdateSuccessNotification": "{numSelected,
|
|
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": "
|
|
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": "
|
|
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
|
|
491
|
-
"boxui.classification.appliedByBoxAiOnDate": "Box AI
|
|
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",
|
package/i18n/tr-TR.properties
CHANGED
|
@@ -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 =
|
|
586
|
+
be.metadataUpdateErrorNotification = Değişiklikler kaydedilemedi. Lütfen tekrar deneyin.
|
|
587
587
|
# Text shown in success notification banner
|
|
588
|
-
be.metadataUpdateSuccessNotification = {numSelected,
|
|
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 =
|
|
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 =
|
|
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
|
|
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
|
|
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": "
|
|
295
|
-
"be.metadataUpdateSuccessNotification": "{numSelected,
|
|
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": "
|
|
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": "
|
|
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
|
|
491
|
+
"boxui.classification.appliedByBoxAiOnDate": "Box AI 于 {modifiedAt}",
|
|
492
492
|
"boxui.classification.classification": "分类",
|
|
493
493
|
"boxui.classification.classificationDarkBlue": "深蓝色",
|
|
494
494
|
"boxui.classification.classificationGreen": "绿色",
|
package/i18n/zh-CN.properties
CHANGED
|
@@ -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 =
|
|
586
|
+
be.metadataUpdateErrorNotification = 无法保存更改。请重试。
|
|
587
587
|
# Text shown in success notification banner
|
|
588
|
-
be.metadataUpdateSuccessNotification = {numSelected,
|
|
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 =
|
|
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 =
|
|
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
|
|
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": "
|
|
295
|
-
"be.metadataUpdateSuccessNotification": "{numSelected,
|
|
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": "
|
|
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": "
|
|
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
|
|
491
|
+
"boxui.classification.appliedByBoxAiOnDate": "Box AI 已修改於 {modifiedAt}",
|
|
492
492
|
"boxui.classification.classification": "分類",
|
|
493
493
|
"boxui.classification.classificationDarkBlue": "深藍色",
|
|
494
494
|
"boxui.classification.classificationGreen": "綠色",
|
package/i18n/zh-TW.properties
CHANGED
|
@@ -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 =
|
|
586
|
+
be.metadataUpdateErrorNotification = 無法儲存變更。 請再試一次。
|
|
587
587
|
# Text shown in success notification banner
|
|
588
|
-
be.metadataUpdateSuccessNotification = {numSelected,
|
|
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 =
|
|
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 =
|
|
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
|
|
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.
|
|
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/
|
|
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/
|
|
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
|
|
183
|
-
this.templateScope =
|
|
184
|
-
|
|
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 {
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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 (
|
|
158
|
+
if (flattenExtensions.length > 0) {
|
|
171
159
|
const extensionQueryParams = Object.fromEntries(
|
|
172
|
-
|
|
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:
|
|
192
|
+
from: `${templateScope}.${templateKey}`,
|
|
193
193
|
query: 'query',
|
|
194
194
|
query_params: {},
|
|
195
195
|
fields: [
|
|
196
196
|
FIELD_ITEM_NAME,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
|
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
|
|
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).
|
|
283
|
-
expect(result).
|
|
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
|
|
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).
|
|
291
|
-
expect(result).
|
|
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
|
|
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).
|
|
298
|
-
expect(result).
|
|
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
|
|