box-content-preview 3.126.0 → 3.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/lib/i18n/bn-IN.js +8 -0
- package/dist/lib/i18n/da-DK.js +8 -0
- package/dist/lib/i18n/de-DE.js +8 -0
- package/dist/lib/i18n/en-AU.js +8 -0
- package/dist/lib/i18n/en-CA.js +8 -0
- package/dist/lib/i18n/en-GB.js +8 -0
- package/dist/lib/i18n/en-US.js +8 -0
- package/dist/lib/i18n/en-x-pseudo.js +8 -0
- package/dist/lib/i18n/es-419.js +8 -0
- package/dist/lib/i18n/es-ES.js +8 -0
- package/dist/lib/i18n/fi-FI.js +8 -0
- package/dist/lib/i18n/fr-CA.js +8 -0
- package/dist/lib/i18n/fr-FR.js +8 -0
- package/dist/lib/i18n/hi-IN.js +8 -0
- package/dist/lib/i18n/it-IT.js +8 -0
- package/dist/lib/i18n/ja-JP.js +8 -0
- package/dist/lib/i18n/ko-KR.js +8 -0
- package/dist/lib/i18n/nb-NO.js +8 -0
- package/dist/lib/i18n/nl-NL.js +8 -0
- package/dist/lib/i18n/pl-PL.js +8 -0
- package/dist/lib/i18n/pt-BR.js +8 -0
- package/dist/lib/i18n/ru-RU.js +8 -0
- package/dist/lib/i18n/sv-SE.js +8 -0
- package/dist/lib/i18n/tr-TR.js +8 -0
- package/dist/lib/i18n/zh-CN.js +8 -0
- package/dist/lib/i18n/zh-TW.js +8 -0
- package/dist/lib/index.css +6 -5
- package/dist/lib/index.js +238 -39
- package/package.json +1 -1
package/dist/lib/index.js
CHANGED
|
@@ -1225,7 +1225,7 @@ const DEFAULT_LANGUAGE = 'en-US';
|
|
|
1225
1225
|
const MESSAGE_KEY_PREFIX = 'bcp.';
|
|
1226
1226
|
|
|
1227
1227
|
// Only the npm build defines __BCP_DEFAULT_MESSAGES__; the CDN build bakes strings in per locale.
|
|
1228
|
-
const defaultStrings = (0,_isNpmBuild__WEBPACK_IMPORTED_MODULE_0__/* .isNpmBuild */ .w)() ? {"rotate_left":"Rotate left","zoom_current_scale":"Current zoom level","zoom_in":"Zoom in","zoom_out":"Zoom out","enter_fullscreen":"Enter fullscreen","exit_fullscreen":"Exit fullscreen","controls_more":"More options","controls_find":"Find","controls_rotate_document":"Rotate document","controls_rotate_image":"Rotate image","controls_zoom_scale":"Zoom: {1}","controls_view_as_grid":"View as grid","controls_show_thumbnails":"View thumbnails","controls_hide_thumbnails":"Hide thumbnails","controls_shortcut_ctrl":"Ctrl + {1}","drawing_comment":"Markup","region_comment":"Comment on Region","highlight_text":"Highlight and Comment","exit_annotations":"Exit Annotations","annotation_tools":"Comment and markup","drawing_color":"Drawing color","drawing_color_blue":"Blue","drawing_color_green":"Green","drawing_color_red":"Red","drawing_color_orange":"Orange","drawing_color_yellow":"Yellow","drawing_color_purple":"Purple","previous_page":"Previous page","enter_page_num":"Click to enter page number","next_page":"Next page","download":"Download","print":"Print","print_notification":"Please press the print button to get a printable version of this document.","print_loading":"Preparing to print...","print_ready":"Ready to print.","print_close":"Close print dialog","previous_file":"Previous file","logo":"Logo","next_file":"Next file","loading_preview":"Loading Preview...","download_file":"Download File","text_truncated":"This file has been truncated due to size limits. Please download to view the whole file.","toggle_findbar":"Toggle findbar","toggle_thumbnails":"Toggle thumbnails","gallery_view":"Gallery view","page_gallery":"Page gallery","page_gallery_tile":"Page {1}","has_x_refs":"This preview has references you cannot view. Open the file in its native application.","find_next":"Find next","find_previous":"Find previous","find_close":"Close","find_label":"Search input","find_placeholder":"Find in document","find_match_count":"{1} of {2}","thumbnail_label":"Page thumbnails","file_preview_label":"File preview","comparison_banner_current":"Current version","comparison_banner_previous":"Previous version","comparison_banner_version":"Version {1}","comparison_banner_actions":"More actions","comparison_banner_open_full_preview":"Open Full Preview","comparison_banner_close":"Close","comparison_banner_make_current":"Make Current","comparison_banner_delete":"Delete","error_generic":"This preview didn’t load. Please try to open or download the file to view.","error_unsupported":"This preview didn’t load because the file type is unsupported. Please try to open or download the file to view.","error_account":"This preview didn’t load because your account is unable to preview this file type. Please try to open or download the file to view.","error_permissions":"This preview didn’t load because you don’t have permission. Please ask the file owner to update permissions.","error_refresh":"This preview didn’t load. Please try to open or download the file to view.","error_rate_limit":"This preview didn’t load because your request was rate limited. Please try to open or download the file to view.","error_reupload":"This preview didn’t load. Please try to open or download the file to view.","error_browser_unsupported":"Your browser doesn’t support preview for {1}. Please try to open or download the file to view.","error_document":"This preview didn’t load because the document may be protected. Please try to open or download the file to view.","error_password_protected":"This preview didn’t load because the document is protected. Please try to open or download the file to view.","error_try_again_later":"This preview didn’t load. Please refresh the page or download file to view.","error_bad_file":"This preview didn’t load. Please try to open or download the file to view.","error_not_downloadable":"Something seems to be wrong with this file. Please refresh the page, and if the issue continues, try to upload a new version.","error_flash_not_enabled":"This preview didn’t load because Flash is not enabled on your browser. Please try to enable Flash or download the file to view.","error_internet_explorer_office_online":"This version of Internet Explorer is out of date and the experience may be degraded. Please try switching to a different browser for a better experience.","error_large_file":"File exceeds supported size for preview. Open or download the file to view.","error_too_many_operations":"The file is too complex to display in your browser. Please download it to view.","error_zero_byte_file":"Cannot preview 0 B file. Open or download the file to view.","filename":"Name","last_modified_date":"Modified","size":"Size","search":"Search","search_results":"Search Results","search_placeholder":"Search files and folders","search_clear":"Clear search","breadcrumb":"Breadcrumb","breadcrumb_truncated":"Show hidden folders","media_autoplay":"Autoplay","media_autoplay_disabled":"Disabled","media_autoplay_enabled":"Enabled","media_play_next":"Play next file","media_play_next_disabled":"Disabled","media_play_next_enabled":"Enabled","media_speed":"Speed","media_speed_normal":"Normal","media_quality":"Quality","media_quality_auto":"Auto","media_guides":"Guides","media_guides_off":"Off","media_guides_default":"Default","media_guides_widescreen_hd":"Widescreen HD","media_guides_vertical":"Vertical","media_guides_square":"Square","media_guides_social_portrait":"Social Portrait","media_guides_cinemascope":"Cinemascope","media_guides_univisium":"Univisium","media_guides_cinema_flat":"Cinema Flat","media_guides_scope":"Scope","media_guides_fullscreen":"Fullscreen","media_guides_ultrawide":"Ultrawide","media_volume_slider":"Volume Slider","media_generating_waveform":"Generating waveform","media_loading":"Loading","media_zoom":"Zoom","media_zoom_slider":"Zoom Slider","media_time_slider":"Media Slider","media_comment_marker":"Comment marker","media_range_comment":"Comment","media_range_clear":"Clear","media_shuttle_forward":"Scanning forward at {1}x","media_shuttle_reverse":"Scanning backward at {1}x","media_mute":"Mute","media_unmute":"Unmute","media_play":"Play","media_pause":"Pause","media_skip_forward":"Skip forward","media_skip_backward":"Skip backward","media_settings":"Settings","media_subtitles_cc":"Subtitles/Closed Captions","media_time_format":"Time format","media_time_format_standard":"Standard time","media_time_format_timecode":"Timecode","media_time_format_frames":"Frame numbers","volume":"Volume","of":"of","subtitles":"Subtitles","off":"Off","media_audio":"Audio","track":"Track","media_auto_generated_captions":"Auto-Generated Captions","auto_generated":"Auto-Generated","box3d_animation_clips":"Animation clips","box3d_camera_projection_perspective":"Perspective","box3d_camera_projection_orthographic":"Orthographic","box3d_reset":"Reset","box3d_toggle_animation":"Play/pause animation","box3d_toggle_vr":"Toggle VR display","box3d_render_mode_lit":"Lit","box3d_render_mode_unlit":"Unlit","box3d_render_mode_normals":"Normals","box3d_render_mode_shape":"Shape","box3d_render_mode_uv_overlay":"UV Overlay","box3d_settings":"Settings","box3d_settings_render_label":"Render mode","box3d_settings_grid_label":"Show grid","box3d_settings_wireframes_label":"Show wireframes","box3d_settings_skeletons_label":"Show skeletons","box3d_settings_projection_label":"Camera Projection","box3d_settings_rotate_label":"Rotate Model","box3d_settings_rotate_left":"Rotate left around {1} axis","box3d_settings_rotate_right":"Rotate right around {1} axis","document_label":"Document Viewer","annotation_add_comment_placeholder":"Add a comment here...","annotation_reply_placeholder":"Post a reply...","annotation_done":"Done","annotation_close":"Close","annotation_cancel":"Cancel","annotation_save":"Save","annotation_post":"Post","annotation_delete":"Delete","annotation_delete_confirmation_message":"Delete this annotation?","annotation_profile_alt":"Avatar","annotation_anonymous_user_name":"Some User","annotation_posting_message":"Posting...","annotation_point_toggle":"Point annotation mode","annotation_draw_toggle":"Drawing annotation mode","annotation_highlight_toggle":"Highlight text","annotation_highlight_comment":"Add comment to highlighted text","annotation_who_highlighted":"{1} highlighted","annotation_who_drew":"{1} drew","annotation_draw_save":"Save drawing","annotation_draw_delete":"Delete drawing","annotations_load_error":"Annotations could not be loaded for this file. Please refresh the page to try again.","annotations_create_error":"This annotation could not be created. Please try again.","annotations_delete_error":"This annotation could not be deleted. Please try again.","annotations_authorization_error":"Annotations could not be loaded for this file. You may not have permission to take this action.","notification_button_default_text":"Okay","notification_button_default_label":"Clear Notification","notification_annotation_point_mode":"Click anywhere to add a comment to the document","notification_annotation_draw_mode":"Press down and drag the pointer to draw on the document","notification_degraded_preview":"Your connection to {1} is being blocked. Please reach out to your network admin to adjust firewall settings.","notification_cannot_download":"This file could not be downloaded.","notification_cannot_download_due_to_policy":"The file could not be downloaded due to a security policy.","link_contact_us":"Contact Us","360_videos":"360-degree videos","360_images":"360-degree images","3d_models":"3D models","afrikaans":"Afrikaans","albanian":"Albanian","arabic":"Arabic","armenian":"Armenian","belarusian":"Belarusian","bengali":"Bengali","bosnian":"Bosnian","bulgarian":"Bulgarian","burmese":"Burmese","catalan":"Catalan","central_khmer":"Central Khmer","chinese":"Chinese","croatian":"Croatian","czech":"Czech","danish":"Danish","dutch":"Dutch","english":"English","estonian":"Estonian","filipino":"Filipino","finnish":"Finnish","french":"French","galician":"Galician","ganda":"Ganda","georgian":"Georgian","german":"German","haitian_creole":"Haitian Creole","hebrew":"Hebrew","hindi":"Hindi","hmong":"Hmong","hungarian":"Hungarian","icelandic":"Icelandic","indonesian":"Indonesian","irish":"Irish","italian":"Italian","japanese":"Japanese","kazakh":"Kazakh","korean":"Korean","kurdish":"Kurdish","lao":"Lao","latvian":"Latvian","lithuanian":"Lithuanian","luxembourgish":"Luxembourgish","malay_macrolanguage":"Malay","modern_greek_1453_":"Greek","mongolian":"Mongolian","norwegian":"Norwegian","persian":"Persian","polish":"Polish","portuguese":"Portuguese","romanian":"Romanian","russian":"Russian","serbian":"Serbian","sichuan_yi":"Sichuan Yi","sicilian":"Sicilian","slovak":"Slovak","slovenian":"Slovenian","somali":"Somali","spanish":"Spanish","swahili_macrolanguage":"Swahili","swedish":"Swedish","swiss_german":"Swiss German","tagalog":"Tagalog","telugu":"Telugu","thai":"Thai","tibetan":"Tibetan","turkish":"Turkish","ukrainian":"Ukrainian","uzbek":"Uzbek","vietnamese":"Vietnamese"} : {};
|
|
1228
|
+
const defaultStrings = (0,_isNpmBuild__WEBPACK_IMPORTED_MODULE_0__/* .isNpmBuild */ .w)() ? {"rotate_left":"Rotate left","zoom_current_scale":"Current zoom level","zoom_in":"Zoom in","zoom_out":"Zoom out","enter_fullscreen":"Enter fullscreen","exit_fullscreen":"Exit fullscreen","controls_more":"More options","controls_find":"Find","controls_rotate_document":"Rotate document","controls_rotate_image":"Rotate image","controls_zoom_scale":"Zoom: {1}","controls_view_as_grid":"View as grid","controls_show_thumbnails":"View thumbnails","controls_hide_thumbnails":"Hide thumbnails","controls_shortcut_ctrl":"Ctrl + {1}","drawing_comment":"Markup","region_comment":"Comment on Region","highlight_text":"Highlight and Comment","exit_annotations":"Exit Annotations","annotation_tools":"Comment and markup","drawing_color":"Drawing color","drawing_color_blue":"Blue","drawing_color_green":"Green","drawing_color_red":"Red","drawing_color_orange":"Orange","drawing_color_yellow":"Yellow","drawing_color_purple":"Purple","previous_page":"Previous page","enter_page_num":"Click to enter page number","next_page":"Next page","download":"Download","print":"Print","print_notification":"Please press the print button to get a printable version of this document.","print_loading":"Preparing to print...","print_ready":"Ready to print.","print_close":"Close print dialog","previous_file":"Previous file","logo":"Logo","next_file":"Next file","loading_preview":"Loading Preview...","download_file":"Download File","text_truncated":"This file has been truncated due to size limits. Please download to view the whole file.","notice_info":"Info","toggle_findbar":"Toggle findbar","toggle_thumbnails":"Toggle thumbnails","gallery_view":"Gallery view","page_gallery":"Page gallery","page_gallery_tile":"Page {1}","has_x_refs":"This preview has references you cannot view. Open the file in its native application.","find_next":"Find next","find_previous":"Find previous","find_close":"Close","find_label":"Search input","find_placeholder":"Find in document","find_match_count":"{1} of {2}","thumbnail_label":"Page thumbnails","file_preview_label":"File preview","comparison_banner_current":"Current version","comparison_banner_previous":"Previous version","comparison_banner_version":"Version {1}","comparison_banner_actions":"More actions","comparison_banner_open_full_preview":"Open Full Preview","comparison_banner_close":"Close","comparison_banner_make_current":"Make Current","comparison_banner_delete":"Delete","error_generic":"This preview didn’t load. Please try to open or download the file to view.","error_unsupported":"This preview didn’t load because the file type is unsupported. Please try to open or download the file to view.","error_account":"This preview didn’t load because your account is unable to preview this file type. Please try to open or download the file to view.","error_permissions":"This preview didn’t load because you don’t have permission. Please ask the file owner to update permissions.","error_refresh":"This preview didn’t load. Please try to open or download the file to view.","error_rate_limit":"This preview didn’t load because your request was rate limited. Please try to open or download the file to view.","error_reupload":"This preview didn’t load. Please try to open or download the file to view.","error_browser_unsupported":"Your browser doesn’t support preview for {1}. Please try to open or download the file to view.","error_document":"This preview didn’t load because the document may be protected. Please try to open or download the file to view.","error_password_protected":"This preview didn’t load because the document is protected. Please try to open or download the file to view.","error_try_again_later":"This preview didn’t load. Please refresh the page or download file to view.","error_bad_file":"This preview didn’t load. Please try to open or download the file to view.","error_not_downloadable":"Something seems to be wrong with this file. Please refresh the page, and if the issue continues, try to upload a new version.","error_flash_not_enabled":"This preview didn’t load because Flash is not enabled on your browser. Please try to enable Flash or download the file to view.","error_internet_explorer_office_online":"This version of Internet Explorer is out of date and the experience may be degraded. Please try switching to a different browser for a better experience.","error_large_file":"File exceeds supported size for preview. Open or download the file to view.","error_too_many_operations":"The file is too complex to display in your browser. Please download it to view.","error_zero_byte_file":"Cannot preview 0 B file. Open or download the file to view.","filename":"Name","last_modified_date":"Modified","size":"Size","search":"Search","search_results":"Search Results","search_placeholder":"Search files and folders","search_clear":"Clear search","breadcrumb":"Breadcrumb","breadcrumb_truncated":"Show hidden folders","media_autoplay":"Autoplay","media_autoplay_disabled":"Disabled","media_autoplay_enabled":"Enabled","media_play_next":"Play next file","media_play_next_disabled":"Disabled","media_play_next_enabled":"Enabled","media_speed":"Speed","media_speed_normal":"Normal","media_quality":"Quality","media_quality_auto":"Auto","media_guides":"Guides","media_guides_off":"Off","media_guides_default":"Default","media_guides_widescreen_hd":"Widescreen HD","media_guides_vertical":"Vertical","media_guides_square":"Square","media_guides_social_portrait":"Social Portrait","media_guides_cinemascope":"Cinemascope","media_guides_univisium":"Univisium","media_guides_cinema_flat":"Cinema Flat","media_guides_scope":"Scope","media_guides_fullscreen":"Fullscreen","media_guides_ultrawide":"Ultrawide","media_volume_slider":"Volume Slider","media_generating_waveform":"Generating waveform","media_loading":"Loading","media_zoom":"Zoom","media_zoom_slider":"Zoom Slider","media_time_slider":"Media Slider","media_comment_marker":"Comment marker","media_range_comment":"Comment","media_range_clear":"Clear","media_shuttle_forward":"Scanning forward at {1}x","media_shuttle_reverse":"Scanning backward at {1}x","media_mute":"Mute","media_unmute":"Unmute","media_play":"Play","media_pause":"Pause","media_skip_forward":"Skip forward","media_skip_backward":"Skip backward","media_settings":"Settings","media_subtitles_cc":"Subtitles/Closed Captions","media_time_format":"Time format","media_time_format_standard":"Standard time","media_time_format_timecode":"Timecode","media_time_format_frames":"Frame numbers","volume":"Volume","of":"of","subtitles":"Subtitles","off":"Off","media_audio":"Audio","track":"Track","media_auto_generated_captions":"Auto-Generated Captions","auto_generated":"Auto-Generated","box3d_animation_clips":"Animation clips","box3d_camera_projection_perspective":"Perspective","box3d_camera_projection_orthographic":"Orthographic","box3d_reset":"Reset","box3d_toggle_animation":"Play/pause animation","box3d_toggle_vr":"Toggle VR display","box3d_render_mode_lit":"Lit","box3d_render_mode_unlit":"Unlit","box3d_render_mode_normals":"Normals","box3d_render_mode_shape":"Shape","box3d_render_mode_uv_overlay":"UV Overlay","box3d_settings":"Settings","box3d_settings_render_label":"Render mode","box3d_settings_grid_label":"Show grid","box3d_settings_wireframes_label":"Show wireframes","box3d_settings_skeletons_label":"Show skeletons","box3d_settings_projection_label":"Camera Projection","box3d_settings_rotate_label":"Rotate Model","box3d_settings_rotate_left":"Rotate left around {1} axis","box3d_settings_rotate_right":"Rotate right around {1} axis","document_label":"Document Viewer","annotation_add_comment_placeholder":"Add a comment here...","annotation_reply_placeholder":"Post a reply...","annotation_done":"Done","annotation_close":"Close","annotation_cancel":"Cancel","annotation_save":"Save","annotation_post":"Post","annotation_delete":"Delete","annotation_delete_confirmation_message":"Delete this annotation?","annotation_profile_alt":"Avatar","annotation_anonymous_user_name":"Some User","annotation_posting_message":"Posting...","annotation_point_toggle":"Point annotation mode","annotation_draw_toggle":"Drawing annotation mode","annotation_highlight_toggle":"Highlight text","annotation_highlight_comment":"Add comment to highlighted text","annotation_who_highlighted":"{1} highlighted","annotation_who_drew":"{1} drew","annotation_draw_save":"Save drawing","annotation_draw_delete":"Delete drawing","annotations_load_error":"Annotations could not be loaded for this file. Please refresh the page to try again.","annotations_create_error":"This annotation could not be created. Please try again.","annotations_delete_error":"This annotation could not be deleted. Please try again.","annotations_authorization_error":"Annotations could not be loaded for this file. You may not have permission to take this action.","notification_button_default_text":"Okay","notification_button_default_label":"Clear Notification","notification_annotation_point_mode":"Click anywhere to add a comment to the document","notification_annotation_draw_mode":"Press down and drag the pointer to draw on the document","notification_degraded_preview":"Your connection to {1} is being blocked. Please reach out to your network admin to adjust firewall settings.","notification_cannot_download":"This file could not be downloaded.","notification_cannot_download_due_to_policy":"The file could not be downloaded due to a security policy.","notifications_region_label":"Notifications","notification_icon_error":"Error","notification_icon_info":"Information","notification_icon_success":"Success","notification_icon_warning":"Warning","notification_webgl_context_lost":"WebGL Context Lost","notification_webgl_context_restored":"WebGL Context Restored","link_contact_us":"Contact Us","360_videos":"360-degree videos","360_images":"360-degree images","3d_models":"3D models","afrikaans":"Afrikaans","albanian":"Albanian","arabic":"Arabic","armenian":"Armenian","belarusian":"Belarusian","bengali":"Bengali","bosnian":"Bosnian","bulgarian":"Bulgarian","burmese":"Burmese","catalan":"Catalan","central_khmer":"Central Khmer","chinese":"Chinese","croatian":"Croatian","czech":"Czech","danish":"Danish","dutch":"Dutch","english":"English","estonian":"Estonian","filipino":"Filipino","finnish":"Finnish","french":"French","galician":"Galician","ganda":"Ganda","georgian":"Georgian","german":"German","haitian_creole":"Haitian Creole","hebrew":"Hebrew","hindi":"Hindi","hmong":"Hmong","hungarian":"Hungarian","icelandic":"Icelandic","indonesian":"Indonesian","irish":"Irish","italian":"Italian","japanese":"Japanese","kazakh":"Kazakh","korean":"Korean","kurdish":"Kurdish","lao":"Lao","latvian":"Latvian","lithuanian":"Lithuanian","luxembourgish":"Luxembourgish","malay_macrolanguage":"Malay","modern_greek_1453_":"Greek","mongolian":"Mongolian","norwegian":"Norwegian","persian":"Persian","polish":"Polish","portuguese":"Portuguese","romanian":"Romanian","russian":"Russian","serbian":"Serbian","sichuan_yi":"Sichuan Yi","sicilian":"Sicilian","slovak":"Slovak","slovenian":"Slovenian","somali":"Somali","spanish":"Spanish","swahili_macrolanguage":"Swahili","swedish":"Swedish","swiss_german":"Swiss German","tagalog":"Tagalog","telugu":"Telugu","thai":"Thai","tibetan":"Tibetan","turkish":"Turkish","ukrainian":"Ukrainian","uzbek":"Uzbek","vietnamese":"Vietnamese"} : {};
|
|
1229
1229
|
let language = true ? "en-US" : 0;
|
|
1230
1230
|
let strings = defaultStrings;
|
|
1231
1231
|
function getLanguage() {
|
|
@@ -1328,7 +1328,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
1328
1328
|
const CLIENT_NAME = "box-content-preview"; // eslint-disable-line no-undef
|
|
1329
1329
|
const CLIENT_NAME_KEY = 'box_client_name';
|
|
1330
1330
|
const CLIENT_VERSION_KEY = 'box_client_version';
|
|
1331
|
-
const CLIENT_VERSION = "3.
|
|
1331
|
+
const CLIENT_VERSION = "3.128.0"; // eslint-disable-line no-undef
|
|
1332
1332
|
const HEADER_CLIENT_NAME = 'X-Box-Client-Name';
|
|
1333
1333
|
const HEADER_CLIENT_VERSION = 'X-Box-Client-Version';
|
|
1334
1334
|
const PROMISE_MAP = {};
|
|
@@ -6738,6 +6738,7 @@ function MediaSettingsV2({
|
|
|
6738
6738
|
onKeyDown: handleContentKeyDown,
|
|
6739
6739
|
side: "top"
|
|
6740
6740
|
}, activeSubMenu ? /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item, {
|
|
6741
|
+
className: "bp-MediaSettingsV2-back",
|
|
6741
6742
|
"data-resin-target": "settingsBack",
|
|
6742
6743
|
"data-target-id": "MediaSettingsV2-back",
|
|
6743
6744
|
"data-testid": "bp-media-settings-back",
|
|
@@ -6747,9 +6748,10 @@ function MediaSettingsV2({
|
|
|
6747
6748
|
}
|
|
6748
6749
|
}, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.StartElement, {
|
|
6749
6750
|
icon: Medium_.ChevronLeft
|
|
6750
|
-
}), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.MainContent, {
|
|
6751
|
-
|
|
6752
|
-
|
|
6751
|
+
}), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.MainContent, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
|
|
6752
|
+
as: "span",
|
|
6753
|
+
variant: "bodySmallSemibold"
|
|
6754
|
+
}, activeSubMenu.label))), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Separator, null), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.RadioGroup, {
|
|
6753
6755
|
onValueChange: handleValueChange,
|
|
6754
6756
|
value: activeSubMenu.value
|
|
6755
6757
|
}, activeSubMenu.options.map(({
|
|
@@ -6805,17 +6807,18 @@ function MediaSettingsV2({
|
|
|
6805
6807
|
}
|
|
6806
6808
|
}, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.MainContent, {
|
|
6807
6809
|
label: label
|
|
6808
|
-
}), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.EndElement, {
|
|
6810
|
+
}), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item.EndElement, null, /*#__PURE__*/external_react_["default"].createElement("span", {
|
|
6809
6811
|
className: "bp-MediaSettingsV2-value"
|
|
6810
6812
|
}, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
|
|
6811
6813
|
as: "span",
|
|
6812
|
-
color: "textOnLightSecondary"
|
|
6814
|
+
color: "textOnLightSecondary",
|
|
6815
|
+
variant: "bodySmall"
|
|
6813
6816
|
}, valueLabel), !isDisabled && /*#__PURE__*/external_react_["default"].createElement(Medium_.ChevronRight, {
|
|
6814
6817
|
"aria-hidden": true,
|
|
6815
6818
|
color: tokens_.bpIconIconOnLightSecondary,
|
|
6816
|
-
height: tokens_.
|
|
6817
|
-
width: tokens_.
|
|
6818
|
-
})))))));
|
|
6819
|
+
height: tokens_.Size3,
|
|
6820
|
+
width: tokens_.Size3
|
|
6821
|
+
}))))))));
|
|
6819
6822
|
}
|
|
6820
6823
|
|
|
6821
6824
|
/***/ },
|
|
@@ -7380,6 +7383,7 @@ function TimestampControl({
|
|
|
7380
7383
|
type: "button"
|
|
7381
7384
|
}, renderBlueprintTime(), renderChevron())), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Content, {
|
|
7382
7385
|
align: "center",
|
|
7386
|
+
className: "bp-TimestampControl-menu",
|
|
7383
7387
|
container: portalContainer,
|
|
7384
7388
|
"data-testid": "bp-TimestampControl-flyout",
|
|
7385
7389
|
onKeyDown: handleMenuKeyDown,
|
|
@@ -21639,7 +21643,7 @@ var x = (y) => {
|
|
|
21639
21643
|
var x = {}; __webpack_require__.d(x, y); return x
|
|
21640
21644
|
}
|
|
21641
21645
|
var y = (x) => (() => (x))
|
|
21642
|
-
module.exports = x({ ["BlueprintProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.BlueprintProvider), ["Breadcrumb"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Breadcrumb), ["Cell"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Cell), ["Column"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Column), ["DataTableWrapper"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.DataTableWrapper), ["DropdownMenu"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.DropdownMenu), ["EllipsizableText"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.EllipsizableText), ["Focusable"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Focusable), ["Ghost"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Ghost), ["IconButton"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.IconButton), ["IconToggleButton"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.IconToggleButton), ["LoadingIndicator"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.LoadingIndicator), ["Modal"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Modal), ["Popover"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Popover), ["Row"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Row), ["SearchInput"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.SearchInput), ["Select"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Select), ["SelectMenu"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.SelectMenu), ["Switch"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Switch), ["Table"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Table), ["TableBody"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TableBody), ["TableHeader"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TableHeader), ["Text"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Text), ["Toolbar"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Toolbar), ["Tooltip"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Tooltip), ["TooltipProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TooltipProvider), ["VisuallyHidden"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.VisuallyHidden), ["useNoopTreatment"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.useNoopTreatment) });
|
|
21646
|
+
module.exports = x({ ["BlueprintProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.BlueprintProvider), ["Breadcrumb"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Breadcrumb), ["Button"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Button), ["Cell"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Cell), ["Column"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Column), ["DataTableWrapper"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.DataTableWrapper), ["DropdownMenu"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.DropdownMenu), ["EllipsizableText"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.EllipsizableText), ["Focusable"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Focusable), ["Ghost"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Ghost), ["IconButton"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.IconButton), ["IconToggleButton"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.IconToggleButton), ["InlineNotice"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.InlineNotice), ["LoadingIndicator"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.LoadingIndicator), ["Modal"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Modal), ["Notification"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Notification), ["Popover"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Popover), ["Row"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Row), ["SearchInput"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.SearchInput), ["Select"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Select), ["SelectMenu"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.SelectMenu), ["Switch"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Switch), ["Table"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Table), ["TableBody"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TableBody), ["TableHeader"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TableHeader), ["Text"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Text), ["Toolbar"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Toolbar), ["Tooltip"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Tooltip), ["TooltipProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TooltipProvider), ["VisuallyHidden"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.VisuallyHidden), ["useNoopTreatment"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.useNoopTreatment), ["useNotification"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.useNotification) });
|
|
21643
21647
|
|
|
21644
21648
|
/***/ },
|
|
21645
21649
|
|
|
@@ -21672,7 +21676,7 @@ var x = (y) => {
|
|
|
21672
21676
|
var x = {}; __webpack_require__.d(x, y); return x
|
|
21673
21677
|
}
|
|
21674
21678
|
var y = (x) => (() => (x))
|
|
21675
|
-
module.exports = x({ ["BoxBlue100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.BoxBlue100), ["GreenLight100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.GreenLight100), ["Grimace100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Grimace100), ["Size5"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Size5), ["Size8"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Size8), ["WatermelonRed100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.WatermelonRed100), ["Yellorange100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Yellorange100), ["Yellow100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Yellow100), ["bpIconCtaIconOnDark"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpIconCtaIconOnDark), ["bpIconIconOnDark"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpIconIconOnDark), ["bpIconIconOnLightSecondary"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpIconIconOnLightSecondary), ["bpRadius03"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpRadius03) });
|
|
21679
|
+
module.exports = x({ ["BoxBlue100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.BoxBlue100), ["GreenLight100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.GreenLight100), ["Grimace100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Grimace100), ["Size3"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Size3), ["Size5"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Size5), ["Size8"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Size8), ["WatermelonRed100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.WatermelonRed100), ["Yellorange100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Yellorange100), ["Yellow100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.Yellow100), ["bpIconCtaIconOnDark"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpIconCtaIconOnDark), ["bpIconIconOnDark"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpIconIconOnDark), ["bpIconIconOnLightSecondary"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpIconIconOnLightSecondary), ["bpRadius03"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpRadius03) });
|
|
21676
21680
|
|
|
21677
21681
|
/***/ },
|
|
21678
21682
|
|
|
@@ -37304,7 +37308,7 @@ var isNpmBuild = __webpack_require__(8080);
|
|
|
37304
37308
|
;// ./src/lib/Logger.js
|
|
37305
37309
|
/* eslint-disable no-undef */
|
|
37306
37310
|
const CLIENT_NAME = "box-content-preview";
|
|
37307
|
-
const CLIENT_VERSION = "3.
|
|
37311
|
+
const CLIENT_VERSION = "3.128.0";
|
|
37308
37312
|
/* eslint-enable no-undef */
|
|
37309
37313
|
|
|
37310
37314
|
class Logger {
|
|
@@ -38902,7 +38906,7 @@ class BaseViewer extends (events_default()) {
|
|
|
38902
38906
|
const contentTemplate = (0,util/* getProp */.GT)(this.options, 'representation.content.url_template', '');
|
|
38903
38907
|
const downloadHostToNotify = this.api.reachability.constructor.getDownloadNotificationToShow(contentTemplate);
|
|
38904
38908
|
if (downloadHostToNotify) {
|
|
38905
|
-
this.previewUI.
|
|
38909
|
+
this.previewUI.showNotification((0,util/* replacePlaceholders */.Lb)(BaseViewer_('notification_degraded_preview'), [downloadHostToNotify]), null, true, 'warning');
|
|
38906
38910
|
this.api.reachability.constructor.setDownloadHostNotificationShown(downloadHostToNotify);
|
|
38907
38911
|
this.emitMetric(lib_events/* DOWNLOAD_REACHABILITY_METRICS */.DI.NOTIFICATION_SHOWN, {
|
|
38908
38912
|
host: downloadHostToNotify
|
|
@@ -39401,7 +39405,7 @@ class BaseViewer extends (events_default()) {
|
|
|
39401
39405
|
const error = new PreviewError/* default */.A(lib_events/* ERROR_CODE */.bo.LOAD_ANNOTATIONS, BaseViewer_('annotations_load_error'), {
|
|
39402
39406
|
silent: true
|
|
39403
39407
|
});
|
|
39404
|
-
this.previewUI.
|
|
39408
|
+
this.previewUI.showNotification(error.displayMessage, null, false, 'error');
|
|
39405
39409
|
this.triggerError(error);
|
|
39406
39410
|
return;
|
|
39407
39411
|
}
|
|
@@ -39644,21 +39648,21 @@ class BaseViewer extends (events_default()) {
|
|
|
39644
39648
|
case constants/* ANNOTATOR_EVENT */.GA.modeEnter:
|
|
39645
39649
|
this.disableViewerControls();
|
|
39646
39650
|
if (data.data.mode === ANNOTATION_TYPE_POINT) {
|
|
39647
|
-
this.previewUI.
|
|
39651
|
+
this.previewUI.showNotification(BaseViewer_('notification_annotation_point_mode'));
|
|
39648
39652
|
} else if (data.data.mode === ANNOTATION_TYPE_DRAW) {
|
|
39649
|
-
this.previewUI.
|
|
39653
|
+
this.previewUI.showNotification(BaseViewer_('notification_annotation_draw_mode'));
|
|
39650
39654
|
this.previewUI.replaceHeader(data.data.headerSelector);
|
|
39651
39655
|
}
|
|
39652
39656
|
break;
|
|
39653
39657
|
case constants/* ANNOTATOR_EVENT */.GA.modeExit:
|
|
39654
39658
|
this.enableViewerControls();
|
|
39655
|
-
this.previewUI.
|
|
39659
|
+
this.previewUI.hideNotification();
|
|
39656
39660
|
if (data.data.mode === ANNOTATION_TYPE_DRAW) {
|
|
39657
39661
|
this.previewUI.replaceHeader(data.data.headerSelector);
|
|
39658
39662
|
}
|
|
39659
39663
|
break;
|
|
39660
39664
|
case constants/* ANNOTATOR_EVENT */.GA.error:
|
|
39661
|
-
this.previewUI.
|
|
39665
|
+
this.previewUI.showNotification(data.data, null, false, 'error');
|
|
39662
39666
|
break;
|
|
39663
39667
|
case constants/* ANNOTATOR_EVENT */.GA.fetch:
|
|
39664
39668
|
this.emit('scale', {
|
|
@@ -45447,6 +45451,116 @@ class Notification {
|
|
|
45447
45451
|
}
|
|
45448
45452
|
}
|
|
45449
45453
|
/* harmony default export */ const lib_Notification = (Notification);
|
|
45454
|
+
;// ./src/lib/NotificationsV2.scss
|
|
45455
|
+
// extracted by mini-css-extract-plugin
|
|
45456
|
+
|
|
45457
|
+
;// ./src/lib/NotificationsV2.tsx
|
|
45458
|
+
/* provided dependency */ var NotificationsV2_ = __webpack_require__(441)["Tl"];
|
|
45459
|
+
function NotificationsV2_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
45460
|
+
function NotificationsV2_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? NotificationsV2_ownKeys(Object(t), !0).forEach(function (r) { NotificationsV2_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : NotificationsV2_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
45461
|
+
function NotificationsV2_defineProperty(e, r, t) { return (r = NotificationsV2_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
45462
|
+
function NotificationsV2_toPropertyKey(t) { var i = NotificationsV2_toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
45463
|
+
function NotificationsV2_toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
45464
|
+
|
|
45465
|
+
|
|
45466
|
+
|
|
45467
|
+
|
|
45468
|
+
|
|
45469
|
+
const getTypeIconLabel = variant => {
|
|
45470
|
+
switch (variant) {
|
|
45471
|
+
case 'error':
|
|
45472
|
+
return NotificationsV2_('notification_icon_error');
|
|
45473
|
+
case 'success':
|
|
45474
|
+
return NotificationsV2_('notification_icon_success');
|
|
45475
|
+
case 'warning':
|
|
45476
|
+
return NotificationsV2_('notification_icon_warning');
|
|
45477
|
+
default:
|
|
45478
|
+
return NotificationsV2_('notification_icon_info');
|
|
45479
|
+
}
|
|
45480
|
+
};
|
|
45481
|
+
function NotificationsBridge({
|
|
45482
|
+
onReady
|
|
45483
|
+
}) {
|
|
45484
|
+
const {
|
|
45485
|
+
addNotification,
|
|
45486
|
+
removeAllNotifications
|
|
45487
|
+
} = (0,blueprint_web_.useNotification)();
|
|
45488
|
+
external_react_["default"].useLayoutEffect(() => {
|
|
45489
|
+
onReady({
|
|
45490
|
+
addNotification,
|
|
45491
|
+
removeAllNotifications
|
|
45492
|
+
});
|
|
45493
|
+
}, [addNotification, onReady, removeAllNotifications]);
|
|
45494
|
+
return /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Notification.Viewport, {
|
|
45495
|
+
className: "bp-NotificationsV2-viewport"
|
|
45496
|
+
});
|
|
45497
|
+
}
|
|
45498
|
+
class NotificationsV2Root {
|
|
45499
|
+
constructor(containerEl) {
|
|
45500
|
+
NotificationsV2_defineProperty(this, "api", null);
|
|
45501
|
+
NotificationsV2_defineProperty(this, "hostEl", void 0);
|
|
45502
|
+
NotificationsV2_defineProperty(this, "isDestroyed", false);
|
|
45503
|
+
NotificationsV2_defineProperty(this, "pending", []);
|
|
45504
|
+
NotificationsV2_defineProperty(this, "root", void 0);
|
|
45505
|
+
// createRoot renders asynchronously, so calls made before the provider mounts are replayed once it does.
|
|
45506
|
+
NotificationsV2_defineProperty(this, "handleReady", api => {
|
|
45507
|
+
if (this.isDestroyed) {
|
|
45508
|
+
return;
|
|
45509
|
+
}
|
|
45510
|
+
this.api = api;
|
|
45511
|
+
const {
|
|
45512
|
+
pending
|
|
45513
|
+
} = this;
|
|
45514
|
+
this.pending = [];
|
|
45515
|
+
pending.forEach(call => call(api));
|
|
45516
|
+
});
|
|
45517
|
+
this.hostEl = document.createElement('div');
|
|
45518
|
+
this.hostEl.className = 'bp-NotificationsV2Root';
|
|
45519
|
+
containerEl.appendChild(this.hostEl);
|
|
45520
|
+
this.root = (0,client_.createRoot)(this.hostEl);
|
|
45521
|
+
this.root.render(/*#__PURE__*/external_react_["default"].createElement(BlueprintProviders/* default */.A, {
|
|
45522
|
+
container: this.hostEl
|
|
45523
|
+
}, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Notification.Provider, {
|
|
45524
|
+
label: NotificationsV2_('notifications_region_label')
|
|
45525
|
+
}, /*#__PURE__*/external_react_["default"].createElement(NotificationsBridge, {
|
|
45526
|
+
onReady: this.handleReady
|
|
45527
|
+
}))));
|
|
45528
|
+
}
|
|
45529
|
+
destroy() {
|
|
45530
|
+
this.isDestroyed = true;
|
|
45531
|
+
this.api = null;
|
|
45532
|
+
this.pending = [];
|
|
45533
|
+
this.root.unmount();
|
|
45534
|
+
this.hostEl.remove();
|
|
45535
|
+
}
|
|
45536
|
+
hide() {
|
|
45537
|
+
this.run(api => api.removeAllNotifications());
|
|
45538
|
+
}
|
|
45539
|
+
show(message, buttonText, persist = false, variant = 'info') {
|
|
45540
|
+
this.run(api => api.addNotification(NotificationsV2_objectSpread(NotificationsV2_objectSpread({}, persist && {
|
|
45541
|
+
duration: Infinity
|
|
45542
|
+
}), {}, {
|
|
45543
|
+
children: buttonText ? /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Notification.Button, {
|
|
45544
|
+
ariaLabel: buttonText
|
|
45545
|
+
}, buttonText) : undefined,
|
|
45546
|
+
closeButtonAriaLabel: NotificationsV2_('notification_button_default_label'),
|
|
45547
|
+
sensitivity: 'foreground',
|
|
45548
|
+
styledText: message,
|
|
45549
|
+
typeIconAriaLabel: getTypeIconLabel(variant),
|
|
45550
|
+
variant
|
|
45551
|
+
})));
|
|
45552
|
+
}
|
|
45553
|
+
run(call) {
|
|
45554
|
+
if (this.isDestroyed) {
|
|
45555
|
+
return;
|
|
45556
|
+
}
|
|
45557
|
+
if (this.api) {
|
|
45558
|
+
call(this.api);
|
|
45559
|
+
} else {
|
|
45560
|
+
this.pending.push(call);
|
|
45561
|
+
}
|
|
45562
|
+
}
|
|
45563
|
+
}
|
|
45450
45564
|
;// ./src/lib/viewers/box3d/box3DAssets.js
|
|
45451
45565
|
|
|
45452
45566
|
const STATIC_URI = `third-party/model3d/${constants/* MODEL3D_STATIC_ASSETS_VERSION */.f6}/`;
|
|
@@ -45456,6 +45570,7 @@ const JS = [`${STATIC_URI}boxsdk.min.js`, `${STATIC_URI}three.min.js`, `${STATIC
|
|
|
45456
45570
|
// extracted by mini-css-extract-plugin
|
|
45457
45571
|
|
|
45458
45572
|
;// ./src/lib/viewers/box3d/Box3DViewer.js
|
|
45573
|
+
/* provided dependency */ var Box3DViewer_ = __webpack_require__(441)["Tl"];
|
|
45459
45574
|
function Box3DViewer_defineProperty(e, r, t) { return (r = Box3DViewer_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
45460
45575
|
function Box3DViewer_toPropertyKey(t) { var i = Box3DViewer_toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
45461
45576
|
function Box3DViewer_toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -45468,6 +45583,8 @@ function Box3DViewer_toPrimitive(t, r) { if ("object" != typeof t || !t) return
|
|
|
45468
45583
|
|
|
45469
45584
|
|
|
45470
45585
|
|
|
45586
|
+
|
|
45587
|
+
|
|
45471
45588
|
// Milliseconds to wait for model to load before cancelling Preview
|
|
45472
45589
|
const LOAD_TIMEOUT = 50000;
|
|
45473
45590
|
const CLASS_VR_ENABLED = 'vr-enabled';
|
|
@@ -45484,7 +45601,7 @@ class Box3DViewer extends viewers_BaseViewer {
|
|
|
45484
45601
|
Box3DViewer_defineProperty(this, "renderer", void 0);
|
|
45485
45602
|
/** @property {HTMLElement} - Parent element for nesting the 3D scene and notifications in */
|
|
45486
45603
|
Box3DViewer_defineProperty(this, "wrapperEl", void 0);
|
|
45487
|
-
/** @property {Notification} - Used to notify users of WebGL context issues */
|
|
45604
|
+
/** @property {Notification|NotificationsV2Root} - Used to notify users of WebGL context issues */
|
|
45488
45605
|
Box3DViewer_defineProperty(this, "contextNotification", void 0);
|
|
45489
45606
|
/** @property {boolean} - Used to show the VR button in the controls */
|
|
45490
45607
|
Box3DViewer_defineProperty(this, "showVrButton", false);
|
|
@@ -45514,7 +45631,7 @@ class Box3DViewer extends viewers_BaseViewer {
|
|
|
45514
45631
|
this.renderer = null;
|
|
45515
45632
|
this.wrapperEl = this.createViewer(document.createElement('div'));
|
|
45516
45633
|
this.wrapperEl.className = CSS_CLASS_BOX3D;
|
|
45517
|
-
this.contextNotification = new lib_Notification(this.wrapperEl);
|
|
45634
|
+
this.contextNotification = this.featureEnabled(constants/* BLUEPRINT_MIGRATION_SUPPORTING_UI */.Ed) ? new NotificationsV2Root(this.wrapperEl) : new lib_Notification(this.wrapperEl);
|
|
45518
45635
|
this.loadTimeout = LOAD_TIMEOUT;
|
|
45519
45636
|
}
|
|
45520
45637
|
|
|
@@ -45598,6 +45715,10 @@ class Box3DViewer extends viewers_BaseViewer {
|
|
|
45598
45715
|
super.destroy();
|
|
45599
45716
|
this.detachEventHandlers();
|
|
45600
45717
|
this.destroySubModules();
|
|
45718
|
+
if (this.contextNotification instanceof NotificationsV2Root) {
|
|
45719
|
+
this.contextNotification.destroy();
|
|
45720
|
+
this.contextNotification = null;
|
|
45721
|
+
}
|
|
45601
45722
|
this.destroyed = true;
|
|
45602
45723
|
}
|
|
45603
45724
|
|
|
@@ -45682,7 +45803,7 @@ class Box3DViewer extends viewers_BaseViewer {
|
|
|
45682
45803
|
* @return {void}
|
|
45683
45804
|
*/
|
|
45684
45805
|
handleContextLost() {
|
|
45685
|
-
this.contextNotification.show('
|
|
45806
|
+
this.contextNotification.show(Box3DViewer_('notification_webgl_context_lost'), null, false, 'warning');
|
|
45686
45807
|
this.destroySubModules();
|
|
45687
45808
|
}
|
|
45688
45809
|
|
|
@@ -45693,7 +45814,7 @@ class Box3DViewer extends viewers_BaseViewer {
|
|
|
45693
45814
|
*/
|
|
45694
45815
|
handleContextRestored() {
|
|
45695
45816
|
this.detachEventHandlers();
|
|
45696
|
-
this.contextNotification.show('
|
|
45817
|
+
this.contextNotification.show(Box3DViewer_('notification_webgl_context_restored'), null, false, 'success');
|
|
45697
45818
|
this.previewUI.showLoadingIndicator();
|
|
45698
45819
|
this.postLoad();
|
|
45699
45820
|
}
|
|
@@ -47257,7 +47378,7 @@ class TextBaseViewer extends viewers_BaseViewer {
|
|
|
47257
47378
|
this.zoomOut();
|
|
47258
47379
|
return true;
|
|
47259
47380
|
}
|
|
47260
|
-
return
|
|
47381
|
+
return this.handleFullscreenKey(key);
|
|
47261
47382
|
}
|
|
47262
47383
|
|
|
47263
47384
|
/**
|
|
@@ -47459,6 +47580,52 @@ class PrintModalRoot {
|
|
|
47459
47580
|
}))));
|
|
47460
47581
|
}
|
|
47461
47582
|
}
|
|
47583
|
+
// EXTERNAL MODULE: external "react-dom"
|
|
47584
|
+
var external_react_dom_ = __webpack_require__(7516);
|
|
47585
|
+
;// ./src/lib/viewers/text/TruncatedTextNoticeV2.tsx
|
|
47586
|
+
/* provided dependency */ var TruncatedTextNoticeV2_ = __webpack_require__(441)["Tl"];
|
|
47587
|
+
function TruncatedTextNoticeV2_defineProperty(e, r, t) { return (r = TruncatedTextNoticeV2_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
47588
|
+
function TruncatedTextNoticeV2_toPropertyKey(t) { var i = TruncatedTextNoticeV2_toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
47589
|
+
function TruncatedTextNoticeV2_toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
47590
|
+
|
|
47591
|
+
|
|
47592
|
+
|
|
47593
|
+
|
|
47594
|
+
|
|
47595
|
+
function TruncatedTextNoticeV2({
|
|
47596
|
+
onDownload
|
|
47597
|
+
}) {
|
|
47598
|
+
return /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.InlineNotice, {
|
|
47599
|
+
variant: "info",
|
|
47600
|
+
variantIconAriaLabel: TruncatedTextNoticeV2_('notice_info')
|
|
47601
|
+
}, TruncatedTextNoticeV2_('text_truncated')), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Button, {
|
|
47602
|
+
className: "bp-TruncatedTextNoticeV2-download",
|
|
47603
|
+
"data-resin-target": "downloadTruncatedFile",
|
|
47604
|
+
"data-target-id": "TruncatedTextNotice-download",
|
|
47605
|
+
onClick: onDownload,
|
|
47606
|
+
variant: "primary"
|
|
47607
|
+
}, TruncatedTextNoticeV2_('download_file')));
|
|
47608
|
+
}
|
|
47609
|
+
class TruncatedTextNoticeV2Root {
|
|
47610
|
+
constructor(containerEl, onDownload) {
|
|
47611
|
+
TruncatedTextNoticeV2_defineProperty(this, "hostEl", void 0);
|
|
47612
|
+
TruncatedTextNoticeV2_defineProperty(this, "root", void 0);
|
|
47613
|
+
this.hostEl = document.createElement('div');
|
|
47614
|
+
this.hostEl.className = 'bp-TruncatedTextNoticeV2';
|
|
47615
|
+
this.hostEl.setAttribute('data-resin-feature', 'truncatedText');
|
|
47616
|
+
containerEl.appendChild(this.hostEl);
|
|
47617
|
+
this.root = (0,client_.createRoot)(this.hostEl);
|
|
47618
|
+
(0,external_react_dom_.flushSync)(() => {
|
|
47619
|
+
this.root.render(/*#__PURE__*/external_react_["default"].createElement(BlueprintProviders/* default */.A, null, /*#__PURE__*/external_react_["default"].createElement(TruncatedTextNoticeV2, {
|
|
47620
|
+
onDownload: onDownload
|
|
47621
|
+
})));
|
|
47622
|
+
});
|
|
47623
|
+
}
|
|
47624
|
+
destroy() {
|
|
47625
|
+
this.root.unmount();
|
|
47626
|
+
this.hostEl.remove();
|
|
47627
|
+
}
|
|
47628
|
+
}
|
|
47462
47629
|
;// ./src/lib/icons/print_checkmark.svg
|
|
47463
47630
|
const print_checkmark_namespaceObject = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" focusable=\"false\">\n <path d=\"M4.187 6.48L3.067 7.6l3.6 3.6 8-8-1.12-1.12-6.88 6.88-2.48-2.48zM14.4 8c0 3.52-2.88 6.4-6.4 6.4-3.52 0-6.4-2.88-6.4-6.4 0-3.52 2.88-6.4 6.4-6.4.64 0 1.2.08 1.76.24L11.04.56C10.08.24 9.04 0 8 0 3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8h-1.6z\" fill=\"#22A7F0\" fill-rule=\"evenodd\"/>\n</svg>\n";
|
|
47464
47631
|
;// ./src/lib/viewers/text/printStyles.ts
|
|
@@ -47509,7 +47676,8 @@ const PLAIN_TEXT_PRINT_STYLES = `
|
|
|
47509
47676
|
word-wrap: break-word;
|
|
47510
47677
|
}
|
|
47511
47678
|
|
|
47512
|
-
.bp-text-truncated .bp-btn-download
|
|
47679
|
+
.bp-text-truncated .bp-btn-download,
|
|
47680
|
+
.bp-TruncatedTextNoticeV2-download {
|
|
47513
47681
|
display: none;
|
|
47514
47682
|
}
|
|
47515
47683
|
}
|
|
@@ -47545,6 +47713,7 @@ function PlainTextViewer_toPrimitive(t, r) { if ("object" != typeof t || !t) ret
|
|
|
47545
47713
|
|
|
47546
47714
|
|
|
47547
47715
|
|
|
47716
|
+
|
|
47548
47717
|
// Inline web worker JS
|
|
47549
47718
|
const HIGHLIGHT_WORKER_JS = 'onmessage=function(e){importScripts(e.data.highlightSrc);postMessage(self.hljs.highlightAuto(e.data.text).value)};';
|
|
47550
47719
|
|
|
@@ -47620,6 +47789,10 @@ class PlainTextViewer extends text_TextBaseViewer {
|
|
|
47620
47789
|
downloadBtnEl.removeEventListener('click', this.download.bind(this));
|
|
47621
47790
|
}
|
|
47622
47791
|
}
|
|
47792
|
+
if (this.truncatedNotice) {
|
|
47793
|
+
this.truncatedNotice.destroy();
|
|
47794
|
+
this.truncatedNotice = null;
|
|
47795
|
+
}
|
|
47623
47796
|
if (this.printPopup) {
|
|
47624
47797
|
this.printPopup.destroy();
|
|
47625
47798
|
this.printPopup = null;
|
|
@@ -47887,6 +48060,13 @@ class PlainTextViewer extends text_TextBaseViewer {
|
|
|
47887
48060
|
* @return {void}
|
|
47888
48061
|
*/
|
|
47889
48062
|
showTruncatedDownloadButton() {
|
|
48063
|
+
if (this.featureEnabled(constants/* BLUEPRINT_MIGRATION_SUPPORTING_UI */.Ed)) {
|
|
48064
|
+
if (this.truncatedNotice) {
|
|
48065
|
+
this.truncatedNotice.destroy();
|
|
48066
|
+
}
|
|
48067
|
+
this.truncatedNotice = new TruncatedTextNoticeV2Root(this.textEl, () => this.download());
|
|
48068
|
+
return;
|
|
48069
|
+
}
|
|
47890
48070
|
const truncatedEl = document.createElement('div');
|
|
47891
48071
|
truncatedEl.classList.add('bp-text-truncated');
|
|
47892
48072
|
const truncatedTextEl = document.createElement('p');
|
|
@@ -55677,8 +55857,6 @@ function VideoFullscreenButton({
|
|
|
55677
55857
|
type: "button"
|
|
55678
55858
|
}, isFullscreen ? /*#__PURE__*/external_react_["default"].createElement(icons_IconArrowsMinimizeMedium24, null) : /*#__PURE__*/external_react_["default"].createElement(icons_IconArrowsMaximizeMedium24, null));
|
|
55679
55859
|
}
|
|
55680
|
-
// EXTERNAL MODULE: external "react-dom"
|
|
55681
|
-
var external_react_dom_ = __webpack_require__(7516);
|
|
55682
55860
|
;// ./src/lib/viewers/controls/annotations/AnnotationsPaletteAnchorV2.scss
|
|
55683
55861
|
// extracted by mini-css-extract-plugin
|
|
55684
55862
|
|
|
@@ -66509,7 +66687,7 @@ class DocumentViewer extends doc_DocBaseViewer {
|
|
|
66509
66687
|
} = this.options.file;
|
|
66510
66688
|
const isOfficeOnlineExtension = OFFICE_ONLINE_EXTENSIONS.includes(extension);
|
|
66511
66689
|
if (isOfficeOnlineExtension && lib_Browser.isIE()) {
|
|
66512
|
-
this.options.ui.showNotification(DocumentViewer_('error_internet_explorer_office_online'), null, true);
|
|
66690
|
+
this.options.ui.showNotification(DocumentViewer_('error_internet_explorer_office_online'), null, true, 'warning');
|
|
66513
66691
|
}
|
|
66514
66692
|
}
|
|
66515
66693
|
|
|
@@ -66585,7 +66763,7 @@ class AutoCADViewer extends doc_DocumentViewer {
|
|
|
66585
66763
|
[AutoCADViewer_FIELD_HASXREFS]: hasxrefsValue
|
|
66586
66764
|
}) => {
|
|
66587
66765
|
if (hasxrefsValue) {
|
|
66588
|
-
this.options.ui.showNotification(AutoCADViewer_('has_x_refs'), null, true);
|
|
66766
|
+
this.options.ui.showNotification(AutoCADViewer_('has_x_refs'), null, true, 'warning');
|
|
66589
66767
|
this.emitMetric({
|
|
66590
66768
|
name: lib_events/* MISSING_EXTERNAL_REFS */.w0,
|
|
66591
66769
|
data: extension
|
|
@@ -70119,6 +70297,17 @@ class Model3DViewer extends box3d_Box3DViewer {
|
|
|
70119
70297
|
this.controls.showVrButton();
|
|
70120
70298
|
}
|
|
70121
70299
|
}
|
|
70300
|
+
|
|
70301
|
+
/**
|
|
70302
|
+
* Handles keyboard events
|
|
70303
|
+
*
|
|
70304
|
+
* @param {string} key - Keydown key
|
|
70305
|
+
* @return {boolean} Consumed or not
|
|
70306
|
+
*/
|
|
70307
|
+
onKeydown(key) {
|
|
70308
|
+
// Without React controls the legacy Model3DControls bar renders, which has no fullscreen shortcut
|
|
70309
|
+
return this.getViewerOption('useReactControls') ? this.handleFullscreenKey(key) : false;
|
|
70310
|
+
}
|
|
70122
70311
|
renderUI() {
|
|
70123
70312
|
if (!this.controls || !this.renderer) {
|
|
70124
70313
|
return;
|
|
@@ -71310,6 +71499,7 @@ function PreviewUI_toPrimitive(t, r) { if ("object" != typeof t || !t) return t;
|
|
|
71310
71499
|
|
|
71311
71500
|
|
|
71312
71501
|
|
|
71502
|
+
|
|
71313
71503
|
class PreviewUI {
|
|
71314
71504
|
constructor() {
|
|
71315
71505
|
/** @property {CollectionNavigationRoot} - Blueprint navigation arrows, set only with the supporting UI flag */
|
|
@@ -71349,6 +71539,10 @@ class PreviewUI {
|
|
|
71349
71539
|
this.collectionNavigation.destroy();
|
|
71350
71540
|
this.collectionNavigation = null;
|
|
71351
71541
|
}
|
|
71542
|
+
if (this.notification instanceof NotificationsV2Root) {
|
|
71543
|
+
this.notification.destroy();
|
|
71544
|
+
this.notification = null;
|
|
71545
|
+
}
|
|
71352
71546
|
if (this.container) {
|
|
71353
71547
|
this.container.innerHTML = '';
|
|
71354
71548
|
}
|
|
@@ -71545,10 +71739,14 @@ class PreviewUI {
|
|
|
71545
71739
|
* Setup notification
|
|
71546
71740
|
*
|
|
71547
71741
|
* @public
|
|
71742
|
+
* @param {Object} [features] - Preview feature flags
|
|
71548
71743
|
* @return {void}
|
|
71549
71744
|
*/
|
|
71550
|
-
setupNotification() {
|
|
71551
|
-
this.notification
|
|
71745
|
+
setupNotification(features) {
|
|
71746
|
+
if (this.notification instanceof NotificationsV2Root) {
|
|
71747
|
+
this.notification.destroy();
|
|
71748
|
+
}
|
|
71749
|
+
this.notification = isFeatureEnabled(features, constants/* BLUEPRINT_MIGRATION_SUPPORTING_UI */.Ed) ? new NotificationsV2Root(this.contentContainer) : new lib_Notification(this.contentContainer);
|
|
71552
71750
|
}
|
|
71553
71751
|
|
|
71554
71752
|
/**
|
|
@@ -71556,15 +71754,16 @@ class PreviewUI {
|
|
|
71556
71754
|
*
|
|
71557
71755
|
* @public
|
|
71558
71756
|
* @param {string} message - Notification message
|
|
71559
|
-
* @param {string} [buttonText] - Optional text to show in button
|
|
71757
|
+
* @param {string|null} [buttonText] - Optional text to show in button
|
|
71560
71758
|
* @param {boolean} [persist] - Optional boolean to persist the notification
|
|
71759
|
+
* @param {string} [variant] - Blueprint notification variant: error, info, success, or warning
|
|
71561
71760
|
* @return {void}
|
|
71562
71761
|
*/
|
|
71563
|
-
showNotification(message, buttonText, persist) {
|
|
71762
|
+
showNotification(message, buttonText, persist, variant) {
|
|
71564
71763
|
if (!this.notification) {
|
|
71565
71764
|
return;
|
|
71566
71765
|
}
|
|
71567
|
-
this.notification.show(message, buttonText, persist);
|
|
71766
|
+
this.notification.show(message, buttonText, persist, variant);
|
|
71568
71767
|
}
|
|
71569
71768
|
|
|
71570
71769
|
/**
|
|
@@ -72373,7 +72572,7 @@ class Preview extends (events_default()) {
|
|
|
72373
72572
|
const downloadErrorMsg = Preview_('notification_cannot_download');
|
|
72374
72573
|
const downloadErrorDueToPolicyMsg = Preview_('notification_cannot_download_due_to_policy');
|
|
72375
72574
|
if (!canDownload(this.file, this.options)) {
|
|
72376
|
-
this.ui.showNotification(downloadErrorMsg);
|
|
72575
|
+
this.ui.showNotification(downloadErrorMsg, null, false, 'error');
|
|
72377
72576
|
return;
|
|
72378
72577
|
}
|
|
72379
72578
|
|
|
@@ -72388,7 +72587,7 @@ class Preview extends (events_default()) {
|
|
|
72388
72587
|
if (shouldDownloadWM(this.file, this.options)) {
|
|
72389
72588
|
const contentUrlTemplate = (0,util/* getProp */.GT)(this.viewer.getRepresentation(), 'content.url_template');
|
|
72390
72589
|
if (!contentUrlTemplate) {
|
|
72391
|
-
this.ui.showNotification(downloadErrorMsg);
|
|
72590
|
+
this.ui.showNotification(downloadErrorMsg, null, false, 'error');
|
|
72392
72591
|
return;
|
|
72393
72592
|
}
|
|
72394
72593
|
|
|
@@ -72413,7 +72612,7 @@ class Preview extends (events_default()) {
|
|
|
72413
72612
|
}).catch(error => {
|
|
72414
72613
|
const code = (0,util/* getProp */.GT)(error, 'response.data.code');
|
|
72415
72614
|
const msg = code === constants/* ERROR_CODE_403_FORBIDDEN_BY_POLICY */.yC ? downloadErrorDueToPolicyMsg : downloadErrorMsg;
|
|
72416
|
-
this.ui.showNotification(msg);
|
|
72615
|
+
this.ui.showNotification(msg, null, false, 'error');
|
|
72417
72616
|
});
|
|
72418
72617
|
|
|
72419
72618
|
// Otherwise, get the content download URL of the original file and download
|
|
@@ -72427,7 +72626,7 @@ class Preview extends (events_default()) {
|
|
|
72427
72626
|
}).catch(error => {
|
|
72428
72627
|
const code = (0,util/* getProp */.GT)(error, 'response.data.code');
|
|
72429
72628
|
const msg = code === constants/* ERROR_CODE_403_FORBIDDEN_BY_POLICY */.yC ? downloadErrorDueToPolicyMsg : downloadErrorMsg;
|
|
72430
|
-
this.ui.showNotification(msg);
|
|
72629
|
+
this.ui.showNotification(msg, null, false, 'error');
|
|
72431
72630
|
});
|
|
72432
72631
|
}
|
|
72433
72632
|
this.emitLogEvent(lib_events/* PREVIEW_METRIC */.Yl, {
|
|
@@ -72744,7 +72943,7 @@ class Preview extends (events_default()) {
|
|
|
72744
72943
|
this.container = this.ui.setup(this.options, this.keydownHandler, this.navigateLeft, this.navigateRight, this.throttledMousemoveHandler);
|
|
72745
72944
|
|
|
72746
72945
|
// Set up the notification
|
|
72747
|
-
this.ui.setupNotification();
|
|
72946
|
+
this.ui.setupNotification(this.options.features);
|
|
72748
72947
|
this.updateComparisonBanner();
|
|
72749
72948
|
|
|
72750
72949
|
// Update navigation
|