box-content-preview 3.129.0 → 3.131.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 +7 -7
- package/dist/lib/i18n/da-DK.js +14 -14
- package/dist/lib/i18n/de-DE.js +14 -14
- package/dist/lib/i18n/en-AU.js +1 -1
- package/dist/lib/i18n/en-CA.js +1 -1
- package/dist/lib/i18n/en-GB.js +1 -1
- package/dist/lib/i18n/es-419.js +14 -14
- package/dist/lib/i18n/es-ES.js +14 -14
- package/dist/lib/i18n/fi-FI.js +15 -15
- package/dist/lib/i18n/fr-CA.js +13 -13
- package/dist/lib/i18n/fr-FR.js +13 -13
- package/dist/lib/i18n/hi-IN.js +7 -7
- package/dist/lib/i18n/it-IT.js +15 -15
- package/dist/lib/i18n/ja-JP.js +4 -4
- package/dist/lib/i18n/ko-KR.js +15 -15
- package/dist/lib/i18n/nb-NO.js +15 -15
- package/dist/lib/i18n/nl-NL.js +14 -14
- package/dist/lib/i18n/pl-PL.js +15 -15
- package/dist/lib/i18n/pt-BR.js +15 -15
- package/dist/lib/i18n/ru-RU.js +15 -15
- package/dist/lib/i18n/sv-SE.js +13 -13
- package/dist/lib/i18n/tr-TR.js +15 -15
- package/dist/lib/i18n/zh-CN.js +15 -15
- package/dist/lib/i18n/zh-TW.js +15 -15
- package/dist/lib/index.css +6 -5
- package/dist/lib/index.js +461 -151
- package/package.json +1 -1
package/dist/lib/index.js
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { Archive as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_Archive__, FileAiPrompt as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileAiPrompt__, FileAiSession as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileAiSession__, FileAudio as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileAudio__, FileBookmark as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileBookmark__, FileBoxNote as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileBoxNote__, FileCanvas as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileCanvas__, FileCode as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileCode__, FileDefault as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileDefault__, FileDocs as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileDocs__, FileDwg as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileDwg__, FileExcel as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileExcel__, FileIllustrator as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileIllustrator__, FileImage as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileImage__, FileIndesign as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileIndesign__, FileKeynote as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileKeynote__, FileMarkdown as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileMarkdown__, FileNumbers as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileNumbers__, FilePages as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FilePages__, FilePdf as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FilePdf__, FilePhotoshop as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FilePhotoshop__, FilePowerpoint as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FilePowerpoint__, FilePresentation as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FilePresentation__, FileSheets as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileSheets__, FileSlides as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileSlides__, FileSpreadsheet as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileSpreadsheet__, FileText as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileText__, FileThreeD as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileThreeD__, FileVariable as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileVariable__, FileVector as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileVector__, FileVideo as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileVideo__, FileWord as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileWord__, FileXbd as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileXbd__, FileXdw as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileXdw__, FileZip as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FileZip__, FolderArchive as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FolderArchive__, FolderExternal as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FolderExternal__, FolderPersonal as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FolderPersonal__, FolderShared as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FolderShared__, FolderVariable as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Content_3c90b2ee_FolderVariable__ } from "@box/blueprint-web-assets/icons/Content";
|
|
24
24
|
import { AgentCustomExtract as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Logo_bf2ae2e9_AgentCustomExtract__, BoxApps as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Logo_bf2ae2e9_BoxApps__, Form as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Logo_bf2ae2e9_Form__, FormSubmission as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Logo_bf2ae2e9_FormSubmission__, RelayAdvanced as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Logo_bf2ae2e9_RelayAdvanced__ } from "@box/blueprint-web-assets/icons/Logo";
|
|
25
|
-
import { decode as __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_utils_keys_d752524f_decode__ } from "box-ui-elements/es/utils/keys";
|
|
26
25
|
import { defineMessages as __WEBPACK_EXTERNAL_MODULE_react_intl_934d3829_defineMessages__, useIntl as __WEBPACK_EXTERNAL_MODULE_react_intl_934d3829_useIntl__ } from "react-intl";
|
|
27
26
|
import { default as __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_elements_common_Internationalize_d2da695e_default__ } from "box-ui-elements/es/elements/common/Internationalize";
|
|
28
27
|
import { default as __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_features_virtualized_table_VirtualizedTable_9bb4c7d0_default__ } from "box-ui-elements/es/features/virtualized-table/VirtualizedTable";
|
|
@@ -36,6 +35,7 @@ import { default as __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_components_brea
|
|
|
36
35
|
import { default as __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_components_plain_button_PlainButton_6ddbae5a_default__ } from "box-ui-elements/es/components/plain-button/PlainButton";
|
|
37
36
|
import { Grid as __WEBPACK_EXTERNAL_MODULE__box_react_virtualized_dist_es_Grid_5f3cce90_Grid__ } from "@box/react-virtualized/dist/es/Grid";
|
|
38
37
|
import * as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__ from "@box/blueprint-web";
|
|
38
|
+
import * as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Fill_15c08185__ from "@box/blueprint-web-assets/icons/Fill";
|
|
39
39
|
import * as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_3b21b01f__ from "@box/blueprint-web-assets/icons/Medium";
|
|
40
40
|
import * as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_MediumFilled_1ed4080c__ from "@box/blueprint-web-assets/icons/MediumFilled";
|
|
41
41
|
import * as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__ from "@box/blueprint-web-assets/tokens/tokens";
|
|
@@ -64,7 +64,6 @@ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Me
|
|
|
64
64
|
import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Nav_d41e959a_default__ } from "@box/blueprint-web-assets/icons/Medium/Nav";
|
|
65
65
|
import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_Search_ef3e4aba_default__ } from "@box/blueprint-web-assets/icons/Medium/Search";
|
|
66
66
|
import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_MediumFilled_Nav_ae6d790f_default__ } from "@box/blueprint-web-assets/icons/MediumFilled/Nav";
|
|
67
|
-
import { Search as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Fill_15c08185_Search__ } from "@box/blueprint-web-assets/icons/Fill";
|
|
68
67
|
import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_MediumFilled_Pause_0cc1f701_default__ } from "@box/blueprint-web-assets/icons/MediumFilled/Pause";
|
|
69
68
|
import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_MediumFilled_Play_ee47c078_default__ } from "@box/blueprint-web-assets/icons/MediumFilled/Play";
|
|
70
69
|
import { PreviewLoading as __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_components_preview_386c8d2b_PreviewLoading__, getIcon as __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_components_preview_386c8d2b_getIcon__ } from "box-ui-elements/es/components/preview";
|
|
@@ -72,6 +71,17 @@ import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Me
|
|
|
72
71
|
import { default as __WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Medium_ChevronRight_619e782c_default__ } from "@box/blueprint-web-assets/icons/Medium/ChevronRight";
|
|
73
72
|
/******/ var __webpack_modules__ = ({
|
|
74
73
|
|
|
74
|
+
/***/ 584
|
|
75
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
76
|
+
|
|
77
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
78
|
+
/* harmony export */ A: () => (/* binding */ FILE_EXTENSION_CATEGORIES),
|
|
79
|
+
/* harmony export */ Z: () => (/* binding */ FILE_CATEGORY_COLORS)
|
|
80
|
+
/* harmony export */ });
|
|
81
|
+
var FILE_EXTENSION_CATEGORIES={audio:[`aac`,`aif`,`aifc`,`aiff`,`amr`,`au`,`flac`,`m3u`,`m4a`,`mid`,`mp3`,`ra`,`wav`,`wma`,`wpl`],boxcanvas:[`boxcanvas`],boxnote:[`boxnote`],code:`as.as3.asm.aspx.bat.c.cc.cmake.cpp.cs.css.cxx.db.diff.erb.groovy.h.haml.hh.htm.html.java.js.json.less.m.make.ml.mm.php.pl.plist.properties.py.rb.rst.sass.scala.scm.script.sh.sml.sql.wabba.yaml`.split(`.`),document:[`dot`,`dotx`,`msg`,`odt`,`rtf`,`wpd`,`xhtml`,`xml`,`xsd`,`xsl`],"docuworks-binder":[`xbd`],"docuworks-file":[`xdw`],dwg:[`dwg`,`dwgzip`],"excel-spreadsheet":[`xls`,`xlsb`,`xlsm`,`xlsx`],"google-docs":[`gdoc`],"google-sheets":[`gsheet`],"google-slides":[`gslide`,`gslides`],illustrator:[`ai`],image:[`bmp`,`cr2`,`crw`,`dng`,`gdraw`,`gif`,`heic`,`heif`,`jpeg`,`jpg`,`nef`,`png`,`ps`,`raf`,`raw`,`svg`,`svs`,`tga`,`tif`,`tiff`,`webp`],indesign:[`idml`,`indd`,`indt`,`inx`],keynote:[`key`],markdown:[`md`,`markdown`],numbers:[`numbers`],pages:[`pages`],pdf:[`pdf`],photoshop:[`psb`,`psd`],"powerpoint-presentation":[`ppt`,`pptm`,`pptx`],presentation:[`odp`,`otp`,`pot`,`potx`],spreadsheet:[`csv`,`ods`,`tsv`,`xlt`,`xltx`],text:[`fdx`,`log`,`txt`,`vi`,`vim`,`vtt`,`webdoc`],threed:[`3ds`,`box3d`,`dae`,`fbx`,`mtl`,`obj`,`ply`,`stl`],vector:[`eps`],video:[`3g2`,`3gp`,`avi`,`flv`,`m2ts`,`m2v`,`m4v`,`mkv`,`mov`,`mp4`,`mpeg`,`mpg`,`mts`,`ogg`,`qt`,`ts`,`wmv`],"word-document":[`doc`,`docm`,`docx`],zip:[`gz`,`rar`,`tgz`,`zip`]},COLOR_TOKENS={red:`var(--bp-watermelon-red-120, var(--watermelon-red-120))`,orange:`var(--bp-orange-130, var(--orange-120))`,green:`var(--bp-green-light-135, var(--green-light-120))`,lightBlue:`var(--bp-light-blue-115, var(--light-blue-110))`,darkBlue:`var(--bp-light-blue-135, var(--light-blue-120))`,purple:`var(--bp-purple-rain-100, var(--purple-rain-100))`,gray:`var(--bp-gray-100, var(--gray-100))`},FILE_CATEGORY_COLORS={audio:COLOR_TOKENS.purple,boxcanvas:COLOR_TOKENS.orange,boxnote:COLOR_TOKENS.gray,code:COLOR_TOKENS.red,document:COLOR_TOKENS.gray,"docuworks-binder":COLOR_TOKENS.gray,"docuworks-file":COLOR_TOKENS.green,dwg:COLOR_TOKENS.lightBlue,"excel-spreadsheet":COLOR_TOKENS.green,"google-docs":COLOR_TOKENS.darkBlue,"google-sheets":COLOR_TOKENS.green,"google-slides":COLOR_TOKENS.orange,illustrator:COLOR_TOKENS.orange,image:COLOR_TOKENS.green,indesign:COLOR_TOKENS.gray,keynote:COLOR_TOKENS.lightBlue,markdown:COLOR_TOKENS.gray,numbers:COLOR_TOKENS.green,pages:COLOR_TOKENS.orange,pdf:COLOR_TOKENS.red,photoshop:COLOR_TOKENS.lightBlue,"powerpoint-presentation":COLOR_TOKENS.red,presentation:COLOR_TOKENS.orange,spreadsheet:COLOR_TOKENS.green,text:COLOR_TOKENS.darkBlue,threed:COLOR_TOKENS.orange,vector:COLOR_TOKENS.orange,video:COLOR_TOKENS.lightBlue,"word-document":COLOR_TOKENS.darkBlue,zip:COLOR_TOKENS.gray};
|
|
82
|
+
|
|
83
|
+
/***/ },
|
|
84
|
+
|
|
75
85
|
/***/ 1057
|
|
76
86
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
77
87
|
|
|
@@ -97,22 +107,16 @@ var itemIconTable={ai_session:__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_asset
|
|
|
97
107
|
|
|
98
108
|
/***/ },
|
|
99
109
|
|
|
100
|
-
/***/
|
|
110
|
+
/***/ 76
|
|
101
111
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
102
112
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
;// ./node_modules/@box/item-icon/dist/esm/lib/constants.js
|
|
112
|
-
var FILE_EXTENSION_CATEGORIES={audio:[`aac`,`aif`,`aifc`,`aiff`,`amr`,`au`,`flac`,`m3u`,`m4a`,`mid`,`mp3`,`ra`,`wav`,`wma`,`wpl`],boxcanvas:[`boxcanvas`],boxnote:[`boxnote`],code:`as.as3.asm.aspx.bat.c.cc.cmake.cpp.cs.css.cxx.db.diff.erb.groovy.h.haml.hh.htm.html.java.js.json.less.m.make.ml.mm.php.pl.plist.properties.py.rb.rst.sass.scala.scm.script.sh.sml.sql.wabba.yaml`.split(`.`),document:[`dot`,`dotx`,`msg`,`odt`,`rtf`,`wpd`,`xhtml`,`xml`,`xsd`,`xsl`],"docuworks-binder":[`xbd`],"docuworks-file":[`xdw`],dwg:[`dwg`,`dwgzip`],"excel-spreadsheet":[`xls`,`xlsb`,`xlsm`,`xlsx`],"google-docs":[`gdoc`],"google-sheets":[`gsheet`],"google-slides":[`gslide`,`gslides`],illustrator:[`ai`],image:[`bmp`,`cr2`,`crw`,`dng`,`gdraw`,`gif`,`heic`,`heif`,`jpeg`,`jpg`,`nef`,`png`,`ps`,`raf`,`raw`,`svg`,`svs`,`tga`,`tif`,`tiff`,`webp`],indesign:[`idml`,`indd`,`indt`,`inx`],keynote:[`key`],markdown:[`md`,`markdown`],numbers:[`numbers`],pages:[`pages`],pdf:[`pdf`],photoshop:[`psb`,`psd`],"powerpoint-presentation":[`ppt`,`pptm`,`pptx`],presentation:[`odp`,`otp`,`pot`,`potx`],spreadsheet:[`csv`,`ods`,`tsv`,`xlt`,`xltx`],text:[`fdx`,`log`,`txt`,`vi`,`vim`,`vtt`,`webdoc`],threed:[`3ds`,`box3d`,`dae`,`fbx`,`mtl`,`obj`,`ply`,`stl`],vector:[`eps`],video:[`3g2`,`3gp`,`avi`,`flv`,`m2ts`,`m2v`,`m4v`,`mkv`,`mov`,`mp4`,`mpeg`,`mpg`,`mts`,`ogg`,`qt`,`ts`,`wmv`],"word-document":[`doc`,`docm`,`docx`],zip:[`gz`,`rar`,`tgz`,`zip`]},COLOR_TOKENS={red:`var(--bp-watermelon-red-120, var(--watermelon-red-120))`,orange:`var(--bp-orange-130, var(--orange-120))`,green:`var(--bp-green-light-135, var(--green-light-120))`,lightBlue:`var(--bp-light-blue-115, var(--light-blue-110))`,darkBlue:`var(--bp-light-blue-135, var(--light-blue-120))`,purple:`var(--bp-purple-rain-100, var(--purple-rain-100))`,gray:`var(--bp-gray-100, var(--gray-100))`},FILE_CATEGORY_COLORS={audio:COLOR_TOKENS.purple,boxcanvas:COLOR_TOKENS.orange,boxnote:COLOR_TOKENS.gray,code:COLOR_TOKENS.red,document:COLOR_TOKENS.gray,"docuworks-binder":COLOR_TOKENS.gray,"docuworks-file":COLOR_TOKENS.green,dwg:COLOR_TOKENS.lightBlue,"excel-spreadsheet":COLOR_TOKENS.green,"google-docs":COLOR_TOKENS.darkBlue,"google-sheets":COLOR_TOKENS.green,"google-slides":COLOR_TOKENS.orange,illustrator:COLOR_TOKENS.orange,image:COLOR_TOKENS.green,indesign:COLOR_TOKENS.gray,keynote:COLOR_TOKENS.lightBlue,markdown:COLOR_TOKENS.gray,numbers:COLOR_TOKENS.green,pages:COLOR_TOKENS.orange,pdf:COLOR_TOKENS.red,photoshop:COLOR_TOKENS.lightBlue,"powerpoint-presentation":COLOR_TOKENS.red,presentation:COLOR_TOKENS.orange,spreadsheet:COLOR_TOKENS.green,text:COLOR_TOKENS.darkBlue,threed:COLOR_TOKENS.orange,vector:COLOR_TOKENS.orange,video:COLOR_TOKENS.lightBlue,"word-document":COLOR_TOKENS.darkBlue,zip:COLOR_TOKENS.gray};
|
|
113
|
-
;// ./node_modules/@box/item-icon/dist/esm/lib/utils.js
|
|
114
|
-
/* unused harmony import specifier */ var utils_FILE_CATEGORY_COLORS;
|
|
115
|
-
var getFileCategoryByExtension=(extension=``)=>{let iconTypes={};return Object.entries(FILE_EXTENSION_CATEGORIES).forEach(([iconType,typeExtensions])=>{typeExtensions.forEach(typeExtension=>{iconTypes[typeExtension]=iconType})}),iconTypes[extension]||`default`},getColorByExtension=fileCategory=>fileCategory?utils_FILE_CATEGORY_COLORS[fileCategory]:void 0;
|
|
113
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
114
|
+
/* harmony export */ N: () => (/* binding */ getFileCategoryByExtension)
|
|
115
|
+
/* harmony export */ });
|
|
116
|
+
/* unused harmony export getColorByExtension */
|
|
117
|
+
/* unused harmony import specifier */ var FILE_CATEGORY_COLORS;
|
|
118
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(584);
|
|
119
|
+
var getFileCategoryByExtension=(extension=``)=>{let iconTypes={};return Object.entries(_constants_js__WEBPACK_IMPORTED_MODULE_0__/* .FILE_EXTENSION_CATEGORIES */ .A).forEach(([iconType,typeExtensions])=>{typeExtensions.forEach(typeExtension=>{iconTypes[typeExtension]=iconType})}),iconTypes[extension]||`default`},getColorByExtension=fileCategory=>fileCategory?FILE_CATEGORY_COLORS[fileCategory]:void 0;
|
|
116
120
|
|
|
117
121
|
/***/ },
|
|
118
122
|
|
|
@@ -152,7 +156,7 @@ function BlueprintProviders({
|
|
|
152
156
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
153
157
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
154
158
|
/* harmony export */ });
|
|
155
|
-
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
159
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4903);
|
|
156
160
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
157
161
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
158
162
|
function _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); }
|
|
@@ -754,7 +758,7 @@ const STATUS_SUCCESS = 'success';
|
|
|
754
758
|
const STATUS_VIEWABLE = 'viewable';
|
|
755
759
|
|
|
756
760
|
// X-Rep-Hints for Representations API
|
|
757
|
-
const X_REP_HINT_BASE = '[3d][pdf][text][mp3][json]';
|
|
761
|
+
const X_REP_HINT_BASE = '[3d][ocr_pdf][pdf][text][mp3][json]';
|
|
758
762
|
const X_REP_HINT_DOC_THUMBNAIL = '[jpg?dimensions=1024x1024&paged=false]';
|
|
759
763
|
const X_REP_HINT_IMAGE = '[jpg?dimensions=2048x2048,png?dimensions=2048x2048]';
|
|
760
764
|
const X_REP_HINT_VIDEO_DASH = '[dash,mp4][filmstrip]';
|
|
@@ -1253,67 +1257,55 @@ function translate(key) {
|
|
|
1253
1257
|
|
|
1254
1258
|
/***/ },
|
|
1255
1259
|
|
|
1256
|
-
/***/
|
|
1260
|
+
/***/ 4903
|
|
1257
1261
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1258
1262
|
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
var
|
|
1305
|
-
var Uri_default = /*#__PURE__*/__webpack_require__.n(Uri);
|
|
1306
|
-
;// external "box-ui-elements/es/utils/keys"
|
|
1307
|
-
|
|
1308
|
-
// EXTERNAL MODULE: ./src/lib/DownloadReachability.js
|
|
1309
|
-
var DownloadReachability = __webpack_require__(4312);
|
|
1310
|
-
// EXTERNAL MODULE: ./src/lib/Location.js
|
|
1311
|
-
var Location = __webpack_require__(968);
|
|
1312
|
-
// EXTERNAL MODULE: ./src/lib/PreviewError.js
|
|
1313
|
-
var PreviewError = __webpack_require__(8041);
|
|
1314
|
-
// EXTERNAL MODULE: ./src/lib/events.js
|
|
1315
|
-
var events = __webpack_require__(6526);
|
|
1316
|
-
;// ./src/lib/util.js
|
|
1263
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1264
|
+
/* harmony export */ Bm: () => (/* binding */ removeActivationListener),
|
|
1265
|
+
/* harmony export */ G9: () => (/* binding */ openContentInsideIframe),
|
|
1266
|
+
/* harmony export */ GT: () => (/* binding */ getProp),
|
|
1267
|
+
/* harmony export */ Is: () => (/* binding */ findScriptLocation),
|
|
1268
|
+
/* harmony export */ L4: () => (/* binding */ isBoxWebApp),
|
|
1269
|
+
/* harmony export */ Lb: () => (/* binding */ replacePlaceholders),
|
|
1270
|
+
/* harmony export */ NJ: () => (/* binding */ createContentUrl),
|
|
1271
|
+
/* harmony export */ Ne: () => (/* binding */ appendQueryParams),
|
|
1272
|
+
/* harmony export */ OE: () => (/* binding */ isLocalStorageAvailable),
|
|
1273
|
+
/* harmony export */ Ot: () => (/* binding */ pageNumberFromScroll),
|
|
1274
|
+
/* harmony export */ Pw: () => (/* binding */ loadScripts),
|
|
1275
|
+
/* harmony export */ RU: () => (/* binding */ getCurrentTimeMs),
|
|
1276
|
+
/* harmony export */ Te: () => (/* binding */ convertWatermarkPref),
|
|
1277
|
+
/* harmony export */ Uw: () => (/* binding */ openUrlInsideIframe),
|
|
1278
|
+
/* harmony export */ Vl: () => (/* binding */ handleRepresentationBlobFetch),
|
|
1279
|
+
/* harmony export */ Y_: () => (/* binding */ setDimensions),
|
|
1280
|
+
/* harmony export */ Yf: () => (/* binding */ getDistance),
|
|
1281
|
+
/* harmony export */ cd: () => (/* binding */ addActivationListener),
|
|
1282
|
+
/* harmony export */ dJ: () => (/* binding */ getHeaders),
|
|
1283
|
+
/* harmony export */ dt: () => (/* binding */ getPreloadImageRequestPromisesByBatch),
|
|
1284
|
+
/* harmony export */ fX: () => (/* binding */ createStylesheet),
|
|
1285
|
+
/* harmony export */ fZ: () => (/* binding */ CLIENT_VERSION),
|
|
1286
|
+
/* harmony export */ iP: () => (/* binding */ isValidFileId),
|
|
1287
|
+
/* harmony export */ i_: () => (/* binding */ getPreloadImageRequestPromises),
|
|
1288
|
+
/* harmony export */ jN: () => (/* binding */ appendAuthParams),
|
|
1289
|
+
/* harmony export */ je: () => (/* binding */ activationHandler),
|
|
1290
|
+
/* harmony export */ kd: () => (/* binding */ getClosestPageToPinch),
|
|
1291
|
+
/* harmony export */ lM: () => (/* binding */ appendAuthParamsV2),
|
|
1292
|
+
/* harmony export */ mx: () => (/* binding */ insertTemplate),
|
|
1293
|
+
/* harmony export */ my: () => (/* binding */ createAssetUrlCreator),
|
|
1294
|
+
/* harmony export */ nl: () => (/* binding */ createFragment),
|
|
1295
|
+
/* harmony export */ qj: () => (/* binding */ stripAuthFromString),
|
|
1296
|
+
/* harmony export */ t9: () => (/* binding */ getMidpoint),
|
|
1297
|
+
/* harmony export */ tJ: () => (/* binding */ prefetchAssets),
|
|
1298
|
+
/* harmony export */ w4: () => (/* binding */ loadStylesheets),
|
|
1299
|
+
/* harmony export */ wU: () => (/* binding */ decodeKeydown),
|
|
1300
|
+
/* harmony export */ wo: () => (/* binding */ requires360Viewer)
|
|
1301
|
+
/* harmony export */ });
|
|
1302
|
+
/* unused harmony exports clearPromises, createScript, createPrefetch, createPageUrl, fetchPageImage */
|
|
1303
|
+
/* harmony import */ var jsuri__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9890);
|
|
1304
|
+
/* harmony import */ var jsuri__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jsuri__WEBPACK_IMPORTED_MODULE_0__);
|
|
1305
|
+
/* harmony import */ var _DownloadReachability__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4312);
|
|
1306
|
+
/* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(968);
|
|
1307
|
+
/* harmony import */ var _PreviewError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8041);
|
|
1308
|
+
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6526);
|
|
1317
1309
|
/* provided dependency */ var __ = __webpack_require__(441)["Tl"];
|
|
1318
1310
|
function 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; }
|
|
1319
1311
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1325,11 +1317,10 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
1325
1317
|
|
|
1326
1318
|
|
|
1327
1319
|
|
|
1328
|
-
|
|
1329
1320
|
const CLIENT_NAME = "box-content-preview"; // eslint-disable-line no-undef
|
|
1330
1321
|
const CLIENT_NAME_KEY = 'box_client_name';
|
|
1331
1322
|
const CLIENT_VERSION_KEY = 'box_client_version';
|
|
1332
|
-
const CLIENT_VERSION = "3.
|
|
1323
|
+
const CLIENT_VERSION = "3.131.0"; // eslint-disable-line no-undef
|
|
1333
1324
|
const HEADER_CLIENT_NAME = 'X-Box-Client-Name';
|
|
1334
1325
|
const HEADER_CLIENT_VERSION = 'X-Box-Client-Version';
|
|
1335
1326
|
const PROMISE_MAP = {};
|
|
@@ -1527,7 +1518,7 @@ function appendQueryParams(url, queryParams) {
|
|
|
1527
1518
|
if (!queryParams) {
|
|
1528
1519
|
return url;
|
|
1529
1520
|
}
|
|
1530
|
-
const uri = new (
|
|
1521
|
+
const uri = new (jsuri__WEBPACK_IMPORTED_MODULE_0___default())(url);
|
|
1531
1522
|
Object.keys(queryParams).forEach(key => {
|
|
1532
1523
|
const value = queryParams[key];
|
|
1533
1524
|
if (value) {
|
|
@@ -1594,9 +1585,9 @@ function appendAuthParamsV2(url, sharedLink = '', password = '') {
|
|
|
1594
1585
|
* @return {string} Content url
|
|
1595
1586
|
*/
|
|
1596
1587
|
function createContentUrl(template, asset, resolveCacheBuster = false) {
|
|
1597
|
-
if (
|
|
1588
|
+
if (_DownloadReachability__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.isDownloadHostBlocked()) {
|
|
1598
1589
|
// eslint-disable-next-line
|
|
1599
|
-
template =
|
|
1590
|
+
template = _DownloadReachability__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.replaceDownloadHostWithDefault(template);
|
|
1600
1591
|
}
|
|
1601
1592
|
const url = template.replace('{+asset_path}', asset || '');
|
|
1602
1593
|
if (!resolveCacheBuster) {
|
|
@@ -1722,14 +1713,51 @@ function loadScripts(urls, disableAMD = false) {
|
|
|
1722
1713
|
}
|
|
1723
1714
|
|
|
1724
1715
|
/**
|
|
1725
|
-
* Function to decode key down events into keys
|
|
1716
|
+
* Function to decode key down events into keys, such as Shift+I, Control+I or Space.
|
|
1717
|
+
* Works for both React synthetic and native events. Only one modifier is kept, in the order
|
|
1718
|
+
* Control, Shift, Meta, and Alt is ignored. Returns an empty string for a modifier on its own.
|
|
1726
1719
|
*
|
|
1727
1720
|
* @public
|
|
1728
1721
|
* @param {KeyboardEvent<Element>} event - Keydown event
|
|
1729
1722
|
* @return {string} Decoded keydown key
|
|
1730
1723
|
*/
|
|
1731
1724
|
function decodeKeydown(event) {
|
|
1732
|
-
|
|
1725
|
+
let modifier = '';
|
|
1726
|
+
|
|
1727
|
+
// keyIdentifier is the older spec still sent by some Safari versions
|
|
1728
|
+
let key = event.key || event.keyIdentifier || '';
|
|
1729
|
+
if (event.ctrlKey) {
|
|
1730
|
+
modifier = 'Control';
|
|
1731
|
+
} else if (event.shiftKey) {
|
|
1732
|
+
modifier = 'Shift';
|
|
1733
|
+
} else if (event.metaKey) {
|
|
1734
|
+
modifier = 'Meta';
|
|
1735
|
+
}
|
|
1736
|
+
if (key === modifier) {
|
|
1737
|
+
key = '';
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
// keyIdentifier reports characters as UTF8 code points, such as U+0041
|
|
1741
|
+
if (key.indexOf('U+') === 0) {
|
|
1742
|
+
key = key === 'U+001B' ? 'Escape' : String.fromCharCode(Number(key.replace('U+', '0x')));
|
|
1743
|
+
}
|
|
1744
|
+
if (!key) {
|
|
1745
|
+
return '';
|
|
1746
|
+
}
|
|
1747
|
+
if (key === ' ') {
|
|
1748
|
+
key = 'Space';
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
// Legacy Edge reports Esc
|
|
1752
|
+
if (key === 'Esc') {
|
|
1753
|
+
key = 'Escape';
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
// keyIdentifier does not prefix arrow keys with Arrow
|
|
1757
|
+
if (key === 'Right' || key === 'Left' || key === 'Down' || key === 'Up') {
|
|
1758
|
+
key = `Arrow${key}`;
|
|
1759
|
+
}
|
|
1760
|
+
return modifier ? `${modifier}+${key}` : key;
|
|
1733
1761
|
}
|
|
1734
1762
|
|
|
1735
1763
|
/**
|
|
@@ -2030,7 +2058,7 @@ function isValidFileId(fileId) {
|
|
|
2030
2058
|
*/
|
|
2031
2059
|
function isBoxWebApp() {
|
|
2032
2060
|
const boxHostnameRegex = /(app|ent)\.(box\.com|boxcn\.net|boxenterprise\.net)/;
|
|
2033
|
-
return boxHostnameRegex.test(
|
|
2061
|
+
return boxHostnameRegex.test(_Location__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.getHostname());
|
|
2034
2062
|
}
|
|
2035
2063
|
|
|
2036
2064
|
/**
|
|
@@ -2077,7 +2105,7 @@ function isLocalStorageAvailable() {
|
|
|
2077
2105
|
function handleRepresentationBlobFetch(response) {
|
|
2078
2106
|
const status = getProp(response, 'status');
|
|
2079
2107
|
if (status === 202) {
|
|
2080
|
-
const error = new
|
|
2108
|
+
const error = new _PreviewError__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(_events__WEBPACK_IMPORTED_MODULE_4__/* .ERROR_CODE */ .bo.DELETED_REPS, __('error_refresh'), {
|
|
2081
2109
|
isRepDeleted: true
|
|
2082
2110
|
});
|
|
2083
2111
|
return Promise.reject(error);
|
|
@@ -3925,8 +3953,8 @@ function useWindowVirtualizer(options) {
|
|
|
3925
3953
|
var blueprint_web_ = __webpack_require__(8912);
|
|
3926
3954
|
// EXTERNAL MODULE: ./node_modules/@box/item-icon/dist/esm/lib/item-icon/item-icon.js + 2 modules
|
|
3927
3955
|
var item_icon = __webpack_require__(1057);
|
|
3928
|
-
// EXTERNAL MODULE: ./node_modules/@box/item-icon/dist/esm/lib/utils.js
|
|
3929
|
-
var utils = __webpack_require__(
|
|
3956
|
+
// EXTERNAL MODULE: ./node_modules/@box/item-icon/dist/esm/lib/utils.js
|
|
3957
|
+
var utils = __webpack_require__(76);
|
|
3930
3958
|
;// ./node_modules/@box/readable-time/dist/esm/lib/constants.js
|
|
3931
3959
|
var ONE_HOUR_MS=36e5,nonUppercaseLocales=[`ru`];
|
|
3932
3960
|
;// ./node_modules/@box/readable-time/dist/esm/lib/utils.js
|
|
@@ -4076,8 +4104,9 @@ function ArchiveTableV2({
|
|
|
4076
4104
|
}, /*#__PURE__*/external_react_["default"].createElement(item_icon/* ItemIcon */.zG, {
|
|
4077
4105
|
ariaHidden: true,
|
|
4078
4106
|
iconType: isFolder ? 'folder-plain' : (0,utils/* getFileCategoryByExtension */.N)(extension)
|
|
4079
|
-
}), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.
|
|
4080
|
-
as: "span"
|
|
4107
|
+
}), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.EllipsizableText, {
|
|
4108
|
+
as: "span",
|
|
4109
|
+
lineClamp: 1
|
|
4081
4110
|
}, item.name))), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Cell, null, item.modified_at ? /*#__PURE__*/external_react_["default"].createElement(ReadableTime, {
|
|
4082
4111
|
alwaysShowTime: true,
|
|
4083
4112
|
textProps: {
|
|
@@ -4096,6 +4125,14 @@ function ArchiveTableV2({
|
|
|
4096
4125
|
}
|
|
4097
4126
|
}))));
|
|
4098
4127
|
}
|
|
4128
|
+
// EXTERNAL MODULE: external "@box/blueprint-web-assets/icons/Medium"
|
|
4129
|
+
var Medium_ = __webpack_require__(9747);
|
|
4130
|
+
// EXTERNAL MODULE: external "@box/blueprint-web-assets/icons/Fill"
|
|
4131
|
+
var Fill_ = __webpack_require__(7693);
|
|
4132
|
+
// EXTERNAL MODULE: external "@box/blueprint-web-assets/tokens/tokens"
|
|
4133
|
+
var tokens_ = __webpack_require__(8380);
|
|
4134
|
+
// EXTERNAL MODULE: ./src/lib/viewers/controls/settings/stopMenuKeyPropagation.ts
|
|
4135
|
+
var stopMenuKeyPropagation = __webpack_require__(9646);
|
|
4099
4136
|
;// ./src/lib/viewers/archive/BreadcrumbsV2.scss
|
|
4100
4137
|
// extracted by mini-css-extract-plugin
|
|
4101
4138
|
|
|
@@ -4105,6 +4142,11 @@ function ArchiveTableV2({
|
|
|
4105
4142
|
|
|
4106
4143
|
|
|
4107
4144
|
|
|
4145
|
+
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
|
|
4149
|
+
|
|
4108
4150
|
function BreadcrumbsV2({
|
|
4109
4151
|
filename,
|
|
4110
4152
|
fullPath,
|
|
@@ -4112,6 +4154,9 @@ function BreadcrumbsV2({
|
|
|
4112
4154
|
resin,
|
|
4113
4155
|
view
|
|
4114
4156
|
}) {
|
|
4157
|
+
const container = external_react_["default"].useContext(BlueprintProviders/* PortalContainerContext */.n);
|
|
4158
|
+
const breadcrumbRef = external_react_["default"].useRef(null);
|
|
4159
|
+
const [isCompact, setIsCompact] = external_react_["default"].useState(false);
|
|
4115
4160
|
const pathNames = fullPath === constants/* ROOT_FOLDER */.Od ? [] : fullPath.split('/').slice(0, -1);
|
|
4116
4161
|
const crumbs = [{
|
|
4117
4162
|
id: constants/* ROOT_FOLDER */.Od,
|
|
@@ -4120,9 +4165,35 @@ function BreadcrumbsV2({
|
|
|
4120
4165
|
id: `${pathNames.slice(0, index + 1).join('/')}/`,
|
|
4121
4166
|
name
|
|
4122
4167
|
}))];
|
|
4168
|
+
let hiddenCrumbs = [];
|
|
4169
|
+
let visibleCrumbs = crumbs;
|
|
4170
|
+
if (isCompact) {
|
|
4171
|
+
hiddenCrumbs = crumbs.slice(0, -1);
|
|
4172
|
+
visibleCrumbs = crumbs.slice(-1);
|
|
4173
|
+
} else if (crumbs.length > 4) {
|
|
4174
|
+
hiddenCrumbs = crumbs.slice(1, -2);
|
|
4175
|
+
visibleCrumbs = [crumbs[0], ...crumbs.slice(-2)];
|
|
4176
|
+
}
|
|
4177
|
+
external_react_["default"].useLayoutEffect(() => {
|
|
4178
|
+
const breadcrumb = breadcrumbRef.current;
|
|
4179
|
+
if (!breadcrumb) {
|
|
4180
|
+
return undefined;
|
|
4181
|
+
}
|
|
4182
|
+
const updateCompactLayout = () => {
|
|
4183
|
+
const {
|
|
4184
|
+
clientWidth
|
|
4185
|
+
} = breadcrumb;
|
|
4186
|
+
setIsCompact(clientWidth > 0 && clientWidth <= parseInt(tokens_.BreakpointMedium, 10));
|
|
4187
|
+
};
|
|
4188
|
+
updateCompactLayout();
|
|
4189
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
4190
|
+
return undefined;
|
|
4191
|
+
}
|
|
4192
|
+
const observer = new ResizeObserver(updateCompactLayout);
|
|
4193
|
+
observer.observe(breadcrumb);
|
|
4194
|
+
return () => observer.disconnect();
|
|
4195
|
+
}, []);
|
|
4123
4196
|
const handlePageLinkClick = path => {
|
|
4124
|
-
// Blueprint crumbs accept no per-item attributes, so the click is logged programmatically
|
|
4125
|
-
// (precedent: MP3Viewer.js recordToolbarAction)
|
|
4126
4197
|
resin?.recordAction({
|
|
4127
4198
|
action: 'programmatic',
|
|
4128
4199
|
component: 'archive',
|
|
@@ -4131,19 +4202,66 @@ function BreadcrumbsV2({
|
|
|
4131
4202
|
});
|
|
4132
4203
|
onClick(path);
|
|
4133
4204
|
};
|
|
4205
|
+
const collapsedCrumbs = hiddenCrumbs.length > 0 && /*#__PURE__*/external_react_["default"].createElement("li", {
|
|
4206
|
+
className: "bp-BreadcrumbsV2-overflow"
|
|
4207
|
+
}, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Root, {
|
|
4208
|
+
modal: false
|
|
4209
|
+
}, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Trigger, {
|
|
4210
|
+
asChild: true
|
|
4211
|
+
}, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.IconButton, {
|
|
4212
|
+
"aria-label": BreadcrumbsV2_('breadcrumb_truncated'),
|
|
4213
|
+
icon: Medium_.Ellipsis,
|
|
4214
|
+
size: "x-small"
|
|
4215
|
+
})), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Content, {
|
|
4216
|
+
align: "start",
|
|
4217
|
+
className: "bp-BreadcrumbsV2-menu",
|
|
4218
|
+
container: container ?? undefined,
|
|
4219
|
+
onEscapeKeyDown: stopMenuKeyPropagation/* stopEscapePropagation */.s,
|
|
4220
|
+
onKeyDown: stopMenuKeyPropagation/* stopKeyPropagation */.a
|
|
4221
|
+
}, hiddenCrumbs.map(crumb => /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Tooltip, {
|
|
4222
|
+
key: crumb.id,
|
|
4223
|
+
content: crumb.name
|
|
4224
|
+
}, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Item, {
|
|
4225
|
+
onSelect: () => handlePageLinkClick(crumb.id)
|
|
4226
|
+
}, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
|
|
4227
|
+
as: "span",
|
|
4228
|
+
className: "bp-BreadcrumbsV2-menuLabel"
|
|
4229
|
+
}, crumb.name)))))), /*#__PURE__*/external_react_["default"].createElement(Fill_.PointerRight, {
|
|
4230
|
+
"aria-hidden": "true",
|
|
4231
|
+
height: tokens_.bpSize030,
|
|
4232
|
+
width: tokens_.bpSize030
|
|
4233
|
+
}));
|
|
4134
4234
|
return /*#__PURE__*/external_react_["default"].createElement("div", {
|
|
4235
|
+
ref: breadcrumbRef,
|
|
4135
4236
|
className: "bp-BreadcrumbsV2",
|
|
4136
4237
|
"data-testid": "bp-archive-breadcrumbs"
|
|
4137
4238
|
}, view === constants/* VIEWS */.Vw.VIEW_SEARCH ? /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
|
|
4138
4239
|
as: "span",
|
|
4139
4240
|
variant: "bodyDefaultBold"
|
|
4140
|
-
}, BreadcrumbsV2_('search_results')) : /*#__PURE__*/external_react_["default"].createElement(
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4241
|
+
}, BreadcrumbsV2_('search_results')) : /*#__PURE__*/external_react_["default"].createElement("nav", {
|
|
4242
|
+
"aria-label": BreadcrumbsV2_('breadcrumb'),
|
|
4243
|
+
className: "bp-BreadcrumbsV2-nav"
|
|
4244
|
+
}, /*#__PURE__*/external_react_["default"].createElement("ol", {
|
|
4245
|
+
className: "bp-BreadcrumbsV2-list"
|
|
4246
|
+
}, isCompact && collapsedCrumbs, visibleCrumbs.map((crumb, index) => /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, {
|
|
4247
|
+
key: crumb.id
|
|
4248
|
+
}, /*#__PURE__*/external_react_["default"].createElement("li", {
|
|
4249
|
+
className: crumb.id === fullPath ? 'bp-BreadcrumbsV2-current' : 'bp-BreadcrumbsV2-ancestor'
|
|
4250
|
+
}, crumb.id === fullPath ? /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Focusable, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.EllipsizableText, {
|
|
4251
|
+
"aria-current": "page",
|
|
4252
|
+
as: "span",
|
|
4253
|
+
lineClamp: 1,
|
|
4254
|
+
variant: "bodyLargeBold"
|
|
4255
|
+
}, crumb.name)) : /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.TextButton, {
|
|
4256
|
+
color: "textOnLightSecondary",
|
|
4257
|
+
ellipsizable: true,
|
|
4258
|
+
onClick: () => handlePageLinkClick(crumb.id),
|
|
4259
|
+
variant: "bodyLarge"
|
|
4260
|
+
}, crumb.name), /*#__PURE__*/external_react_["default"].createElement(Fill_.PointerRight, {
|
|
4261
|
+
"aria-hidden": "true",
|
|
4262
|
+
height: tokens_.bpSize030,
|
|
4263
|
+
width: tokens_.bpSize030
|
|
4264
|
+
}))), !isCompact && index === 0 && collapsedCrumbs)))));
|
|
4147
4265
|
}
|
|
4148
4266
|
;// ./src/lib/viewers/archive/SearchBarV2.scss
|
|
4149
4267
|
// extracted by mini-css-extract-plugin
|
|
@@ -6537,8 +6655,8 @@ var SettingsContext = __webpack_require__(3072);
|
|
|
6537
6655
|
var BlueprintProviders = __webpack_require__(2758);
|
|
6538
6656
|
// EXTERNAL MODULE: ./src/lib/constants.js
|
|
6539
6657
|
var constants = __webpack_require__(9130);
|
|
6540
|
-
// EXTERNAL MODULE: ./src/lib/util.js
|
|
6541
|
-
var util = __webpack_require__(
|
|
6658
|
+
// EXTERNAL MODULE: ./src/lib/util.js
|
|
6659
|
+
var util = __webpack_require__(4903);
|
|
6542
6660
|
;// ./src/lib/viewers/controls/media/MediaSettingsV2.scss
|
|
6543
6661
|
// extracted by mini-css-extract-plugin
|
|
6544
6662
|
|
|
@@ -6726,7 +6844,7 @@ function MediaSettingsV2({
|
|
|
6726
6844
|
buttonType: "icon",
|
|
6727
6845
|
"data-target-id": "MediaSettingsV2-toggle",
|
|
6728
6846
|
label: __('media_settings'),
|
|
6729
|
-
onKeyDown: utils/*
|
|
6847
|
+
onKeyDown: utils/* stopMenuTriggerKeyPropagation */.z9,
|
|
6730
6848
|
size: "large",
|
|
6731
6849
|
variant: "on-dark"
|
|
6732
6850
|
})), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Content, {
|
|
@@ -7151,10 +7269,12 @@ var TabularDigits = __webpack_require__(2459);
|
|
|
7151
7269
|
var videoFps = __webpack_require__(3234);
|
|
7152
7270
|
// EXTERNAL MODULE: ./src/lib/BlueprintProviders.tsx
|
|
7153
7271
|
var BlueprintProviders = __webpack_require__(2758);
|
|
7154
|
-
// EXTERNAL MODULE: ./src/lib/util.js
|
|
7155
|
-
var util = __webpack_require__(
|
|
7272
|
+
// EXTERNAL MODULE: ./src/lib/util.js
|
|
7273
|
+
var util = __webpack_require__(4903);
|
|
7156
7274
|
// EXTERNAL MODULE: ./src/lib/viewers/controls/media/DurationLabels.tsx + 1 modules
|
|
7157
7275
|
var DurationLabels = __webpack_require__(820);
|
|
7276
|
+
// EXTERNAL MODULE: ./src/lib/viewers/controls/media/utils.ts
|
|
7277
|
+
var utils = __webpack_require__(5346);
|
|
7158
7278
|
;// ./src/lib/viewers/controls/media/TimestampControl.scss
|
|
7159
7279
|
// extracted by mini-css-extract-plugin
|
|
7160
7280
|
|
|
@@ -7176,6 +7296,7 @@ var DurationLabels = __webpack_require__(820);
|
|
|
7176
7296
|
|
|
7177
7297
|
|
|
7178
7298
|
|
|
7299
|
+
|
|
7179
7300
|
let TimeFormat = /*#__PURE__*/function (TimeFormat) {
|
|
7180
7301
|
TimeFormat["STANDARD"] = "standard";
|
|
7181
7302
|
TimeFormat["TIMECODE"] = "timecode";
|
|
@@ -7193,14 +7314,6 @@ function formatLabel(time, format, fps) {
|
|
|
7193
7314
|
return (0,DurationLabels/* formatTime */.f)(time);
|
|
7194
7315
|
}
|
|
7195
7316
|
}
|
|
7196
|
-
|
|
7197
|
-
// The viewer maps Space, Enter and the arrow keys to playback, seek and volume shortcuts.
|
|
7198
|
-
const stopMenuTriggerKeyPropagation = event => {
|
|
7199
|
-
const key = (0,util/* decodeKeydown */.wU)(event);
|
|
7200
|
-
if (key === 'Enter' || key === 'Space' || key === 'ArrowDown' || key === 'ArrowUp') {
|
|
7201
|
-
event.stopPropagation();
|
|
7202
|
-
}
|
|
7203
|
-
};
|
|
7204
7317
|
const FORMAT_OPTIONS = [{
|
|
7205
7318
|
label: () => __('media_time_format_standard'),
|
|
7206
7319
|
value: TimeFormat.STANDARD
|
|
@@ -7380,7 +7493,7 @@ function TimestampControl({
|
|
|
7380
7493
|
}),
|
|
7381
7494
|
"data-resin-target": "timeFormat",
|
|
7382
7495
|
"data-testid": "bp-TimestampControl-button",
|
|
7383
|
-
onKeyDown: stopMenuTriggerKeyPropagation,
|
|
7496
|
+
onKeyDown: utils/* stopMenuTriggerKeyPropagation */.z9,
|
|
7384
7497
|
type: "button"
|
|
7385
7498
|
}, renderBlueprintTime(), renderChevron())), /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.DropdownMenu.Content, {
|
|
7386
7499
|
align: "center",
|
|
@@ -7604,8 +7717,8 @@ function IconVolumeMax24(props) {
|
|
|
7604
7717
|
// EXTERNAL MODULE: ./node_modules/lodash/noop.js
|
|
7605
7718
|
var noop = __webpack_require__(3950);
|
|
7606
7719
|
var noop_default = /*#__PURE__*/__webpack_require__.n(noop);
|
|
7607
|
-
// EXTERNAL MODULE: ./src/lib/util.js
|
|
7608
|
-
var util = __webpack_require__(
|
|
7720
|
+
// EXTERNAL MODULE: ./src/lib/util.js
|
|
7721
|
+
var util = __webpack_require__(4903);
|
|
7609
7722
|
;// ./src/lib/viewers/controls/slider/VolumeSliderControl.scss
|
|
7610
7723
|
// extracted by mini-css-extract-plugin
|
|
7611
7724
|
|
|
@@ -8306,10 +8419,11 @@ function useDismissableMarkerSelection(hostSelectedId = null, selectionSeq = nul
|
|
|
8306
8419
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8307
8420
|
/* harmony export */ B9: () => (/* binding */ stopToolbarKeyPropagation),
|
|
8308
8421
|
/* harmony export */ KN: () => (/* binding */ percent),
|
|
8309
|
-
/* harmony export */ My: () => (/* binding */ stopActivationKeyPropagation)
|
|
8422
|
+
/* harmony export */ My: () => (/* binding */ stopActivationKeyPropagation),
|
|
8423
|
+
/* harmony export */ z9: () => (/* binding */ stopMenuTriggerKeyPropagation)
|
|
8310
8424
|
/* harmony export */ });
|
|
8311
8425
|
/* unused harmony export round */
|
|
8312
|
-
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
8426
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4903);
|
|
8313
8427
|
|
|
8314
8428
|
const round = value => {
|
|
8315
8429
|
return +value.toFixed(4);
|
|
@@ -8325,6 +8439,14 @@ const stopActivationKeyPropagation = event => {
|
|
|
8325
8439
|
event.stopPropagation();
|
|
8326
8440
|
}
|
|
8327
8441
|
};
|
|
8442
|
+
const MENU_TRIGGER_KEYS = new Set(['ArrowDown', 'ArrowUp', 'Enter', 'Space']);
|
|
8443
|
+
|
|
8444
|
+
// Menu triggers also open on the vertical arrows, which the viewer maps to volume and comment seeking.
|
|
8445
|
+
const stopMenuTriggerKeyPropagation = event => {
|
|
8446
|
+
if (MENU_TRIGGER_KEYS.has((0,_util__WEBPACK_IMPORTED_MODULE_0__/* .decodeKeydown */ .wU)(event))) {
|
|
8447
|
+
event.stopPropagation();
|
|
8448
|
+
}
|
|
8449
|
+
};
|
|
8328
8450
|
const TOOLBAR_KEYS = new Set(['ArrowLeft', 'ArrowRight', 'End', 'Enter', 'Home', 'Space']);
|
|
8329
8451
|
|
|
8330
8452
|
// Toolbars move focus with the arrow, Home and End keys, which the viewer maps to seeking.
|
|
@@ -8439,8 +8561,8 @@ function SettingsFlyout({
|
|
|
8439
8561
|
}
|
|
8440
8562
|
}, isOpen && children);
|
|
8441
8563
|
}
|
|
8442
|
-
// EXTERNAL MODULE: ./src/lib/util.js
|
|
8443
|
-
var util = __webpack_require__(
|
|
8564
|
+
// EXTERNAL MODULE: ./src/lib/util.js
|
|
8565
|
+
var util = __webpack_require__(4903);
|
|
8444
8566
|
;// ./src/lib/viewers/controls/settings/SettingsList.tsx
|
|
8445
8567
|
const _excluded = ["children", "className", "isActive", "onKeyDown"];
|
|
8446
8568
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
@@ -8999,8 +9121,8 @@ var classnames = __webpack_require__(2485);
|
|
|
8999
9121
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
9000
9122
|
// EXTERNAL MODULE: ./src/lib/viewers/controls/icons/IconCheckMark24.tsx
|
|
9001
9123
|
var IconCheckMark24 = __webpack_require__(6815);
|
|
9002
|
-
// EXTERNAL MODULE: ./src/lib/util.js
|
|
9003
|
-
var util = __webpack_require__(
|
|
9124
|
+
// EXTERNAL MODULE: ./src/lib/util.js
|
|
9125
|
+
var util = __webpack_require__(4903);
|
|
9004
9126
|
;// ./src/lib/viewers/controls/settings/SettingsRadioItem.scss
|
|
9005
9127
|
// extracted by mini-css-extract-plugin
|
|
9006
9128
|
|
|
@@ -9189,8 +9311,8 @@ var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
9189
9311
|
// EXTERNAL MODULE: ./node_modules/lodash/noop.js
|
|
9190
9312
|
var noop = __webpack_require__(3950);
|
|
9191
9313
|
var noop_default = /*#__PURE__*/__webpack_require__.n(noop);
|
|
9192
|
-
// EXTERNAL MODULE: ./src/lib/util.js
|
|
9193
|
-
var util = __webpack_require__(
|
|
9314
|
+
// EXTERNAL MODULE: ./src/lib/util.js
|
|
9315
|
+
var util = __webpack_require__(4903);
|
|
9194
9316
|
;// ./src/lib/viewers/controls/slider/SliderControl.scss
|
|
9195
9317
|
// extracted by mini-css-extract-plugin
|
|
9196
9318
|
|
|
@@ -9759,8 +9881,8 @@ function IconShuttleForward(props) {
|
|
|
9759
9881
|
}));
|
|
9760
9882
|
}
|
|
9761
9883
|
/* harmony default export */ const icons_IconShuttleForward = (IconShuttleForward);
|
|
9762
|
-
// EXTERNAL MODULE: ./src/lib/util.js
|
|
9763
|
-
var util = __webpack_require__(
|
|
9884
|
+
// EXTERNAL MODULE: ./src/lib/util.js
|
|
9885
|
+
var util = __webpack_require__(4903);
|
|
9764
9886
|
;// ./src/lib/viewers/media/waveform/WaveformShuttleIndicator.scss
|
|
9765
9887
|
// extracted by mini-css-extract-plugin
|
|
9766
9888
|
|
|
@@ -13481,7 +13603,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13481
13603
|
/* harmony export */ loadPeaks: () => (/* binding */ loadPeaks),
|
|
13482
13604
|
/* harmony export */ runClientDecode: () => (/* binding */ runClientDecode)
|
|
13483
13605
|
/* harmony export */ });
|
|
13484
|
-
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
13606
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4903);
|
|
13485
13607
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4929);
|
|
13486
13608
|
/* harmony import */ var _createWaveformLoader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4971);
|
|
13487
13609
|
/* harmony import */ var _validateWaveformPayload__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1053);
|
|
@@ -21644,7 +21766,18 @@ var x = (y) => {
|
|
|
21644
21766
|
var x = {}; __webpack_require__.d(x, y); return x
|
|
21645
21767
|
}
|
|
21646
21768
|
var y = (x) => (() => (x))
|
|
21647
|
-
module.exports = x({ ["BlueprintProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.BlueprintProvider), ["
|
|
21769
|
+
module.exports = x({ ["BlueprintProvider"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.BlueprintProvider), ["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), ["EmptyState"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.EmptyState), ["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), ["Link"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.Link), ["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), ["TextButton"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_e1e285a9__.TextButton), ["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) });
|
|
21770
|
+
|
|
21771
|
+
/***/ },
|
|
21772
|
+
|
|
21773
|
+
/***/ 7693
|
|
21774
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
21775
|
+
|
|
21776
|
+
var x = (y) => {
|
|
21777
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
|
21778
|
+
}
|
|
21779
|
+
var y = (x) => (() => (x))
|
|
21780
|
+
module.exports = x({ ["PointerRight"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Fill_15c08185__.PointerRight), ["Search"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_icons_Fill_15c08185__.Search) });
|
|
21648
21781
|
|
|
21649
21782
|
/***/ },
|
|
21650
21783
|
|
|
@@ -21677,7 +21810,7 @@ var x = (y) => {
|
|
|
21677
21810
|
var x = {}; __webpack_require__.d(x, y); return x
|
|
21678
21811
|
}
|
|
21679
21812
|
var y = (x) => (() => (x))
|
|
21680
|
-
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) });
|
|
21813
|
+
module.exports = x({ ["BoxBlue100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.BoxBlue100), ["BreakpointMedium"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.BreakpointMedium), ["GrayWhite"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.GrayWhite), ["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), ["bpBoxBlue100"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpBoxBlue100), ["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), ["bpSize030"]: () => (__WEBPACK_EXTERNAL_MODULE__box_blueprint_web_assets_tokens_tokens_b764a744__.bpSize030) });
|
|
21681
21814
|
|
|
21682
21815
|
/***/ },
|
|
21683
21816
|
|
|
@@ -36760,8 +36893,8 @@ var pickBy = __webpack_require__(1086);
|
|
|
36760
36893
|
var pickBy_default = /*#__PURE__*/__webpack_require__.n(pickBy);
|
|
36761
36894
|
// EXTERNAL MODULE: ./src/lib/DownloadReachability.js
|
|
36762
36895
|
var DownloadReachability = __webpack_require__(4312);
|
|
36763
|
-
// EXTERNAL MODULE: ./src/lib/util.js
|
|
36764
|
-
var util = __webpack_require__(
|
|
36896
|
+
// EXTERNAL MODULE: ./src/lib/util.js
|
|
36897
|
+
var util = __webpack_require__(4903);
|
|
36765
36898
|
// EXTERNAL MODULE: ./src/lib/constants.js
|
|
36766
36899
|
var constants = __webpack_require__(9130);
|
|
36767
36900
|
;// ./src/lib/metadataAPI.js
|
|
@@ -37309,7 +37442,7 @@ var isNpmBuild = __webpack_require__(8080);
|
|
|
37309
37442
|
;// ./src/lib/Logger.js
|
|
37310
37443
|
/* eslint-disable no-undef */
|
|
37311
37444
|
const CLIENT_NAME = "box-content-preview";
|
|
37312
|
-
const CLIENT_VERSION = "3.
|
|
37445
|
+
const CLIENT_VERSION = "3.131.0";
|
|
37313
37446
|
/* eslint-enable no-undef */
|
|
37314
37447
|
|
|
37315
37448
|
class Logger {
|
|
@@ -38101,6 +38234,15 @@ class RepStatus extends (events_default()) {
|
|
|
38101
38234
|
this.representation.temp_status.state = status;
|
|
38102
38235
|
}
|
|
38103
38236
|
this.handleResponse();
|
|
38237
|
+
},
|
|
38238
|
+
// Reject instead of hanging if the info request itself fails (e.g. the representation
|
|
38239
|
+
// endpoint returns a 4xx/5xx), so the viewer can surface an error rather than spin forever.
|
|
38240
|
+
() => {
|
|
38241
|
+
clearTimeout(this.statusTimeout);
|
|
38242
|
+
const error = new PreviewError/* default */.A(lib_events/* ERROR_CODE */.bo.CONVERSION_GENERIC, __('error_refresh'), {
|
|
38243
|
+
representation: this.representation
|
|
38244
|
+
});
|
|
38245
|
+
this.reject(error);
|
|
38104
38246
|
});
|
|
38105
38247
|
}
|
|
38106
38248
|
|
|
@@ -41803,7 +41945,6 @@ function Mode({
|
|
|
41803
41945
|
|
|
41804
41946
|
|
|
41805
41947
|
|
|
41806
|
-
|
|
41807
41948
|
const getColorLabels = () => ({
|
|
41808
41949
|
[AnnotationColor.BOX_BLUE]: ColorPickerControlV2_('drawing_color_blue'),
|
|
41809
41950
|
[AnnotationColor.GREEN_LIGHT]: ColorPickerControlV2_('drawing_color_green'),
|
|
@@ -41813,7 +41954,7 @@ const getColorLabels = () => ({
|
|
|
41813
41954
|
[AnnotationColor.GRIMACE]: ColorPickerControlV2_('drawing_color_purple')
|
|
41814
41955
|
});
|
|
41815
41956
|
function ColorPickerControlV2({
|
|
41816
|
-
activeColor =
|
|
41957
|
+
activeColor = AnnotationColor.BOX_BLUE,
|
|
41817
41958
|
colors,
|
|
41818
41959
|
onColorSelect
|
|
41819
41960
|
}) {
|
|
@@ -55733,7 +55874,7 @@ function TimeControlsV2({
|
|
|
55733
55874
|
onUpdate: onTimeChange,
|
|
55734
55875
|
step: fps ? 1 / fps : 5,
|
|
55735
55876
|
title: TimeControlsV2_('media_time_slider'),
|
|
55736
|
-
track: `linear-gradient(to right, ${
|
|
55877
|
+
track: `linear-gradient(to right, ${tokens_.GrayWhite} calc(${currentPercentage}% - 2.5px), transparent calc(${currentPercentage}% - 2.5px), transparent calc(${currentPercentage}% + 2.5px), ${TRACK_COLOR_BUFFERED} calc(${currentPercentage}% + 2.5px), ${TRACK_COLOR_BUFFERED} ${bufferedPercentage}%, ${TRACK_COLOR_UNPLAYED} ${bufferedPercentage}%, ${TRACK_COLOR_UNPLAYED} 100%)`,
|
|
55737
55878
|
value: currentValue
|
|
55738
55879
|
}), durationValue > 0 && clusters.map(cluster => cluster.isSinglePoint ? /*#__PURE__*/external_react_["default"].createElement(MarkerTick, {
|
|
55739
55880
|
key: cluster.id,
|
|
@@ -59552,8 +59693,8 @@ class DocFindBar extends (events_default()) {
|
|
|
59552
59693
|
}
|
|
59553
59694
|
}
|
|
59554
59695
|
/* harmony default export */ const doc_DocFindBar = (DocFindBar);
|
|
59555
|
-
|
|
59556
|
-
|
|
59696
|
+
// EXTERNAL MODULE: external "@box/blueprint-web-assets/icons/Fill"
|
|
59697
|
+
var Fill_ = __webpack_require__(7693);
|
|
59557
59698
|
;// ./src/lib/viewers/doc/DocFindBarV2.scss
|
|
59558
59699
|
// extracted by mini-css-extract-plugin
|
|
59559
59700
|
|
|
@@ -59623,7 +59764,7 @@ function DocFindBarV2({
|
|
|
59623
59764
|
'bp-DocFindBarV2-field--filled': !!query
|
|
59624
59765
|
}),
|
|
59625
59766
|
variant: "bodyDefault"
|
|
59626
|
-
}, /*#__PURE__*/external_react_["default"].createElement(
|
|
59767
|
+
}, /*#__PURE__*/external_react_["default"].createElement(Fill_.Search, {
|
|
59627
59768
|
"aria-hidden": true,
|
|
59628
59769
|
className: "bp-DocFindBarV2-searchIcon",
|
|
59629
59770
|
color: tokens_.bpIconIconOnLightSecondary
|
|
@@ -60813,7 +60954,7 @@ const GalleryTile = /*#__PURE__*/external_react_["default"].memo(function Galler
|
|
|
60813
60954
|
tabIndex: isFocused ? 0 : -1
|
|
60814
60955
|
}, /*#__PURE__*/external_react_["default"].createElement("span", {
|
|
60815
60956
|
"aria-hidden": "true",
|
|
60816
|
-
className:
|
|
60957
|
+
className: `bp-gallery-tile-badge${isBlueprintEnabled ? ' bp-gallery-tile-badge--blueprint' : ''}`
|
|
60817
60958
|
}, isBlueprintEnabled ? /*#__PURE__*/external_react_["default"].createElement(blueprint_web_.Text, {
|
|
60818
60959
|
as: "span",
|
|
60819
60960
|
color: "textOnDarkDefault",
|
|
@@ -61357,7 +61498,7 @@ function GalleryGrid({
|
|
|
61357
61498
|
"aria-colcount": isAriaGridEnabled ? columnCount : undefined,
|
|
61358
61499
|
"aria-label": GalleryGrid_('page_gallery'),
|
|
61359
61500
|
"aria-rowcount": isAriaGridEnabled ? getRowCount(pageCount, columnCount) : undefined,
|
|
61360
|
-
className:
|
|
61501
|
+
className: `bp-gallery-grid${isBlueprintEnabled ? ' bp-GalleryGridV2' : ''}`,
|
|
61361
61502
|
onFocus: handleGridFocus,
|
|
61362
61503
|
onKeyDown: handleGridKeyDown,
|
|
61363
61504
|
onScroll: handleScroll,
|
|
@@ -63204,6 +63345,7 @@ function DocBaseViewer_toPrimitive(t, r) { if ("object" != typeof t || !t) retur
|
|
|
63204
63345
|
|
|
63205
63346
|
|
|
63206
63347
|
|
|
63348
|
+
|
|
63207
63349
|
|
|
63208
63350
|
|
|
63209
63351
|
const DOC_FIRST_PAGES_ENABLED = 'docFirstPages.enabled';
|
|
@@ -63799,6 +63941,97 @@ class DocBaseViewer extends viewers_BaseViewer {
|
|
|
63799
63941
|
this.initPrint();
|
|
63800
63942
|
super.handleAssetAndRepLoad();
|
|
63801
63943
|
}
|
|
63944
|
+
|
|
63945
|
+
/**
|
|
63946
|
+
* Handles asset/representation load errors. The searchable 'ocr_pdf' rep is generated on demand and
|
|
63947
|
+
* can legitimately fail to load (a conversion error, or a backend that does not support it for the
|
|
63948
|
+
* file). Rather than hard-erroring, fall back once to a renderable rep so the document still opens -
|
|
63949
|
+
* just without the OCR text layer.
|
|
63950
|
+
*
|
|
63951
|
+
* load() resolves a single Promise.all over the static assets, the npm pdf.js chunk import and the
|
|
63952
|
+
* representation status, so only scope the fallback to a genuine 'ocr_pdf' representation failure -
|
|
63953
|
+
* a failed asset/chunk import is unrelated to the rep and must not silently downgrade it. RepStatus
|
|
63954
|
+
* rejections carry the failed representation in details.representation.
|
|
63955
|
+
*
|
|
63956
|
+
* @override
|
|
63957
|
+
* @param {Error} err - Load error
|
|
63958
|
+
* @return {void}
|
|
63959
|
+
*/
|
|
63960
|
+
handleAssetError(err) {
|
|
63961
|
+
const isOcrRepError = (0,util/* getProp */.GT)(err, 'details.representation.representation') === 'ocr_pdf';
|
|
63962
|
+
if (isOcrRepError && this.attemptRepFallback()) {
|
|
63963
|
+
return;
|
|
63964
|
+
}
|
|
63965
|
+
super.handleAssetError(err);
|
|
63966
|
+
}
|
|
63967
|
+
|
|
63968
|
+
/**
|
|
63969
|
+
* Handles content download errors. pdf.js can reject the 'ocr_pdf' content url even after its status
|
|
63970
|
+
* reported success (e.g. the on-demand asset 404s), which lands here rather than in handleAssetError.
|
|
63971
|
+
* Prefer the renderable fallback rep over retrying the same 'ocr_pdf' url; delegate to the base
|
|
63972
|
+
* reachability retry when no fallback applies (e.g. the current rep is not 'ocr_pdf').
|
|
63973
|
+
*
|
|
63974
|
+
* @override
|
|
63975
|
+
* @param {Error} err - Load error
|
|
63976
|
+
* @param {string} downloadURL - Download URL
|
|
63977
|
+
* @return {void}
|
|
63978
|
+
*/
|
|
63979
|
+
handleDownloadError(err, downloadURL) {
|
|
63980
|
+
if (this.attemptRepFallback()) {
|
|
63981
|
+
return;
|
|
63982
|
+
}
|
|
63983
|
+
super.handleDownloadError(err, downloadURL);
|
|
63984
|
+
}
|
|
63985
|
+
|
|
63986
|
+
/**
|
|
63987
|
+
* Switches to a renderable fallback representation when the on-demand 'ocr_pdf' rep fails to load,
|
|
63988
|
+
* at most once per viewer, and kicks off a reload. getRepFallback only returns a representation when
|
|
63989
|
+
* the current rep is 'ocr_pdf', so this is a no-op for any other representation.
|
|
63990
|
+
*
|
|
63991
|
+
* @return {boolean} Whether a fallback representation was applied (and a reload started)
|
|
63992
|
+
*/
|
|
63993
|
+
attemptRepFallback() {
|
|
63994
|
+
if (this.hasAttemptedRepFallback) {
|
|
63995
|
+
return false;
|
|
63996
|
+
}
|
|
63997
|
+
const fallbackRepresentation = this.getRepFallback();
|
|
63998
|
+
if (!fallbackRepresentation) {
|
|
63999
|
+
return false;
|
|
64000
|
+
}
|
|
64001
|
+
this.hasAttemptedRepFallback = true;
|
|
64002
|
+
this.options.representation = fallbackRepresentation;
|
|
64003
|
+
this.load();
|
|
64004
|
+
return true;
|
|
64005
|
+
}
|
|
64006
|
+
|
|
64007
|
+
/**
|
|
64008
|
+
* Picks the representation to fall back to when the on-demand 'ocr_pdf' rep fails to load. Prefers the
|
|
64009
|
+
* optimized 'pdf' rep when it is ready, otherwise the synthesized original so the file still renders.
|
|
64010
|
+
* Returns null when no fallback applies (the current rep is not 'ocr_pdf', or none is available).
|
|
64011
|
+
*
|
|
64012
|
+
* @return {Object|null} The fallback representation, or null
|
|
64013
|
+
*/
|
|
64014
|
+
getRepFallback() {
|
|
64015
|
+
const {
|
|
64016
|
+
file,
|
|
64017
|
+
representation
|
|
64018
|
+
} = this.options;
|
|
64019
|
+
if (!representation || representation.representation !== 'ocr_pdf') {
|
|
64020
|
+
return null;
|
|
64021
|
+
}
|
|
64022
|
+
const pdfRep = getRepresentation(file, 'pdf');
|
|
64023
|
+
if (pdfRep && lib_RepStatus.getStatus(pdfRep) === constants/* STATUS_SUCCESS */.$g) {
|
|
64024
|
+
return pdfRep;
|
|
64025
|
+
}
|
|
64026
|
+
|
|
64027
|
+
// pdf.js can only render the original bytes directly when the file itself is a PDF. For other
|
|
64028
|
+
// document types the original is e.g. a raw .docx, so keep awaiting the on-demand 'pdf' conversion
|
|
64029
|
+
// (unless it has already errored) rather than handing an unrenderable original to pdf.js.
|
|
64030
|
+
if (file.extension === 'pdf') {
|
|
64031
|
+
return getRepresentation(file, constants/* ORIGINAL_REP_NAME */.EP);
|
|
64032
|
+
}
|
|
64033
|
+
return pdfRep && lib_RepStatus.getStatus(pdfRep) !== constants/* STATUS_ERROR */.uD ? pdfRep : null;
|
|
64034
|
+
}
|
|
63802
64035
|
handleFindBarClose() {
|
|
63803
64036
|
if (this.findBarToggleEl && this.findBarToggleEl.focus) {
|
|
63804
64037
|
this.findBarToggleEl.focus();
|
|
@@ -67212,6 +67445,13 @@ const DocLoader_VIEWERS = [{
|
|
|
67212
67445
|
CONSTRUCTOR: doc_AutoCADViewer,
|
|
67213
67446
|
REP: 'pdf',
|
|
67214
67447
|
EXT: ['dwg']
|
|
67448
|
+
},
|
|
67449
|
+
// Prefer the searchable 'ocr_pdf' rep over 'pdf'
|
|
67450
|
+
{
|
|
67451
|
+
NAME: 'Document',
|
|
67452
|
+
CONSTRUCTOR: doc_DocumentViewer,
|
|
67453
|
+
REP: 'ocr_pdf',
|
|
67454
|
+
EXT: DOCUMENT_EXTENSIONS
|
|
67215
67455
|
}, {
|
|
67216
67456
|
NAME: 'Document',
|
|
67217
67457
|
CONSTRUCTOR: doc_DocumentViewer,
|
|
@@ -67269,15 +67509,23 @@ class DocLoader extends viewers_AssetLoader {
|
|
|
67269
67509
|
* @return {Object} The representation to load
|
|
67270
67510
|
*/
|
|
67271
67511
|
determineRepresentation(file, viewer) {
|
|
67272
|
-
let
|
|
67512
|
+
let rep = super.determineRepresentation(file, viewer);
|
|
67513
|
+
let status = lib_RepStatus.getStatus(rep);
|
|
67514
|
+
if (rep.representation === 'ocr_pdf' && status === constants/* STATUS_ERROR */.uD) {
|
|
67515
|
+
rep = getRepresentation(file, 'pdf') || rep;
|
|
67516
|
+
status = lib_RepStatus.getStatus(rep);
|
|
67517
|
+
}
|
|
67273
67518
|
|
|
67274
|
-
//
|
|
67275
|
-
|
|
67276
|
-
|
|
67277
|
-
|
|
67278
|
-
|
|
67519
|
+
// The searchable 'ocr_pdf' rep is generated on demand: requesting its info url is what kicks
|
|
67520
|
+
// off the conversion, and RepStatus polls none/pending until it is ready. Keep it while it is
|
|
67521
|
+
// still converting so that polling can trigger and await the conversion, rather than falling
|
|
67522
|
+
// straight through to the non-searchable original below. Once it has errored, the block above
|
|
67523
|
+
// has already tried 'pdf', so we allow the original fallback as usual.
|
|
67524
|
+
const isOcrPdfConverting = rep.representation === 'ocr_pdf' && status !== constants/* STATUS_ERROR */.uD;
|
|
67525
|
+
if (file.extension === 'pdf' && rep.representation !== constants/* ORIGINAL_REP_NAME */.EP && status !== constants/* STATUS_SUCCESS */.$g && !isOcrPdfConverting) {
|
|
67526
|
+
rep = getRepresentation(file, constants/* ORIGINAL_REP_NAME */.EP) || rep;
|
|
67279
67527
|
}
|
|
67280
|
-
return
|
|
67528
|
+
return rep;
|
|
67281
67529
|
}
|
|
67282
67530
|
}
|
|
67283
67531
|
/* harmony default export */ const doc_DocLoader = (new DocLoader());
|
|
@@ -71154,8 +71402,8 @@ function ErrorIcon({
|
|
|
71154
71402
|
extension: extension
|
|
71155
71403
|
});
|
|
71156
71404
|
}
|
|
71157
|
-
// EXTERNAL MODULE: ./node_modules/@box/item-icon/dist/esm/lib/utils.js
|
|
71158
|
-
var lib_utils = __webpack_require__(
|
|
71405
|
+
// EXTERNAL MODULE: ./node_modules/@box/item-icon/dist/esm/lib/utils.js
|
|
71406
|
+
var lib_utils = __webpack_require__(76);
|
|
71159
71407
|
// EXTERNAL MODULE: ./node_modules/@box/item-icon/dist/esm/lib/item-icon/item-icon.js + 2 modules
|
|
71160
71408
|
var item_icon = __webpack_require__(1057);
|
|
71161
71409
|
;// ./src/lib/viewers/error/PreviewErrorV2.tsx
|
|
@@ -71551,6 +71799,63 @@ class CollectionNavigationRoot {
|
|
|
71551
71799
|
})));
|
|
71552
71800
|
}
|
|
71553
71801
|
}
|
|
71802
|
+
// EXTERNAL MODULE: ./node_modules/@box/item-icon/dist/esm/lib/constants.js
|
|
71803
|
+
var lib_constants = __webpack_require__(584);
|
|
71804
|
+
;// ./src/lib/LoadingIconV2.scss
|
|
71805
|
+
// extracted by mini-css-extract-plugin
|
|
71806
|
+
|
|
71807
|
+
;// ./src/lib/LoadingIconV2.tsx
|
|
71808
|
+
/* provided dependency */ var LoadingIconV2_ = __webpack_require__(441)["Tl"];
|
|
71809
|
+
function LoadingIconV2_defineProperty(e, r, t) { return (r = LoadingIconV2_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
71810
|
+
function LoadingIconV2_toPropertyKey(t) { var i = LoadingIconV2_toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
71811
|
+
function LoadingIconV2_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); }
|
|
71812
|
+
|
|
71813
|
+
|
|
71814
|
+
|
|
71815
|
+
|
|
71816
|
+
|
|
71817
|
+
|
|
71818
|
+
const isFileCategory = category => Object.prototype.hasOwnProperty.call(lib_constants/* FILE_CATEGORY_COLORS */.Z, category);
|
|
71819
|
+
const LoadingIconV2 = ({
|
|
71820
|
+
extension
|
|
71821
|
+
}) => {
|
|
71822
|
+
const category = (0,lib_utils/* getFileCategoryByExtension */.N)(extension?.toLowerCase());
|
|
71823
|
+
const ringColor = isFileCategory(category) ? lib_constants/* FILE_CATEGORY_COLORS */.Z[category] : tokens_.bpBoxBlue100;
|
|
71824
|
+
// Video files are displayed on a dark background
|
|
71825
|
+
const theme = category === 'video' ? 'dark' : 'light';
|
|
71826
|
+
return /*#__PURE__*/external_react_["default"].createElement("div", {
|
|
71827
|
+
"aria-label": LoadingIconV2_('loading_preview'),
|
|
71828
|
+
className: classnames_default()('bp-LoadingIconV2', `bp-LoadingIconV2--${theme}`),
|
|
71829
|
+
role: "progressbar"
|
|
71830
|
+
}, /*#__PURE__*/external_react_["default"].createElement("div", {
|
|
71831
|
+
className: "bp-LoadingIconV2-ring",
|
|
71832
|
+
style: {
|
|
71833
|
+
'--bp-loading-icon-ring-color': ringColor
|
|
71834
|
+
}
|
|
71835
|
+
}), /*#__PURE__*/external_react_["default"].createElement("div", {
|
|
71836
|
+
className: "bp-LoadingIconV2-content"
|
|
71837
|
+
}, /*#__PURE__*/external_react_["default"].createElement(item_icon/* ItemIcon */.zG, {
|
|
71838
|
+
ariaHidden: true,
|
|
71839
|
+
className: "bp-LoadingIconV2-icon",
|
|
71840
|
+
iconType: category
|
|
71841
|
+
})));
|
|
71842
|
+
};
|
|
71843
|
+
class LoadingIconV2Root {
|
|
71844
|
+
constructor({
|
|
71845
|
+
containerEl
|
|
71846
|
+
}) {
|
|
71847
|
+
LoadingIconV2_defineProperty(this, "root", void 0);
|
|
71848
|
+
this.root = (0,client_.createRoot)(containerEl);
|
|
71849
|
+
}
|
|
71850
|
+
destroy() {
|
|
71851
|
+
this.root.unmount();
|
|
71852
|
+
}
|
|
71853
|
+
render(extension) {
|
|
71854
|
+
this.root.render(/*#__PURE__*/external_react_["default"].createElement(LoadingIconV2, {
|
|
71855
|
+
extension: extension
|
|
71856
|
+
}));
|
|
71857
|
+
}
|
|
71858
|
+
}
|
|
71554
71859
|
;// ./src/lib/PreviewUI.js
|
|
71555
71860
|
/* provided dependency */ var PreviewUI_ = __webpack_require__(441)["Tl"];
|
|
71556
71861
|
function PreviewUI_defineProperty(e, r, t) { return (r = PreviewUI_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -71564,6 +71869,7 @@ function PreviewUI_toPrimitive(t, r) { if ("object" != typeof t || !t) return t;
|
|
|
71564
71869
|
|
|
71565
71870
|
|
|
71566
71871
|
|
|
71872
|
+
|
|
71567
71873
|
class PreviewUI {
|
|
71568
71874
|
constructor() {
|
|
71569
71875
|
/** @property {CollectionNavigationRoot} - Blueprint navigation arrows, set only with the supporting UI flag */
|
|
@@ -71580,7 +71886,9 @@ class PreviewUI {
|
|
|
71580
71886
|
PreviewUI_defineProperty(this, "mousemoveHandler", void 0);
|
|
71581
71887
|
/** @property {Function} - Keydown handler */
|
|
71582
71888
|
PreviewUI_defineProperty(this, "keydownHandler", void 0);
|
|
71583
|
-
/** @property {
|
|
71889
|
+
/** @property {boolean} - Whether the Blueprint migration supporting UI flag is on */
|
|
71890
|
+
PreviewUI_defineProperty(this, "isSupportingUiEnabled", void 0);
|
|
71891
|
+
/** @property {LoadingIcon|LoadingIconV2Root} - Loading icon instance */
|
|
71584
71892
|
PreviewUI_defineProperty(this, "loadingIcon", void 0);
|
|
71585
71893
|
/** @property {HTMLElement} - Preview container element which houses the sidebar and content */
|
|
71586
71894
|
PreviewUI_defineProperty(this, "previewContainer", void 0);
|
|
@@ -71653,7 +71961,8 @@ class PreviewUI {
|
|
|
71653
71961
|
this.container = this.container.querySelector(constants/* SELECTOR_BOX_PREVIEW_CONTAINER */.xK);
|
|
71654
71962
|
this.previewContainer = this.container.querySelector(constants/* SELECTOR_BOX_PREVIEW */.Vm);
|
|
71655
71963
|
this.contentContainer = this.container.querySelector(constants/* SELECTOR_BOX_PREVIEW_CONTENT */.bE);
|
|
71656
|
-
|
|
71964
|
+
this.isSupportingUiEnabled = isFeatureEnabled(options.features, constants/* BLUEPRINT_MIGRATION_SUPPORTING_UI */.Ed);
|
|
71965
|
+
if (this.isSupportingUiEnabled) {
|
|
71657
71966
|
this.setupCollectionNavigation();
|
|
71658
71967
|
}
|
|
71659
71968
|
|
|
@@ -71876,7 +72185,8 @@ class PreviewUI {
|
|
|
71876
72185
|
showLoadingIcon(extension) {
|
|
71877
72186
|
const iconEl = this.container.querySelector(constants/* SELECTOR_BOX_PREVIEW_ICON */.VF);
|
|
71878
72187
|
if (iconEl) {
|
|
71879
|
-
|
|
72188
|
+
const LoadingIconClass = this.isSupportingUiEnabled ? LoadingIconV2Root : LoadingIcon;
|
|
72189
|
+
this.loadingIcon = this.loadingIcon || new LoadingIconClass({
|
|
71880
72190
|
containerEl: iconEl
|
|
71881
72191
|
});
|
|
71882
72192
|
this.loadingIcon.render(extension);
|