From 9b401f9805b2e2b2e7359baed1b9a21c42c71bca Mon Sep 17 00:00:00 2001 From: silver Date: Thu, 30 Oct 2025 15:58:04 +0100 Subject: [PATCH 1/4] feat: save all editorcomponents before downloading a file Signed-off-by: silver --- src/views/Viewer.vue | 57 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/src/views/Viewer.vue b/src/views/Viewer.vue index f4f691edd..34c084e56 100644 --- a/src/views/Viewer.vue +++ b/src/views/Viewer.vue @@ -76,15 +76,14 @@ @click="showSidebar"> {{ t('viewer', 'Open sidebar') }} - + @click="onDownload"> {{ t('viewer', 'Download') }} - + @@ -1006,12 +1005,7 @@ export default defineComponent({ if (event.key === 's' && event.ctrlKey === true) { event.preventDefault() if (this.canDownload) { - const a = document.createElement('a') - a.href = this.currentFile.source ?? this.currentFile.davPath - a.download = this.currentFile.basename - document.body.appendChild(a) - a.click() - document.body.removeChild(a) + this.onDownload() } } }, @@ -1196,6 +1190,49 @@ export default defineComponent({ this.toggleEditor(true) }, + /** + * Save active Text editors before downloading + */ + async onDownload() { + if (!this.canDownload) { + return + } + + // Check if Text app is available and has active editor components + if (window.OCA?.Text?.editorComponents) { + try { + logger.debug('Text app detected, attempting to save before download') + + const editorComponents = window.OCA.Text.editorComponents + + // Text app uses a Set to store editor components + if (editorComponents instanceof Set) { + for (const component of editorComponents) { + if (component && typeof component.save === 'function') { + logger.debug('Calling save on Text editor component') + await component.save() + } + } + } + } catch (error) { + logger.warn('Failed to save Text editor before download', { error }) + // Continue with download anyway + } + } + + this.performDownload() + }, + + performDownload() { + logger.debug('Performing download', { file: this.currentFile }) + const a = document.createElement('a') + a.href = this.currentFile.source ?? this.currentFile.davPath + a.download = this.currentFile.basename + document.body.appendChild(a) + a.click() + document.body.removeChild(a) + }, + handleTrapElementsChange(element) { this.trapElements.push(element) }, From 46e57600c37fd608dcf41fb5b290d551e099ac00 Mon Sep 17 00:00:00 2001 From: silver Date: Thu, 30 Oct 2025 16:04:19 +0100 Subject: [PATCH 2/4] chore(assets): Recompile assets Signed-off-by: silver --- css/{main-Du8LQ8F1.chunk.css => main-CjshTWO0.chunk.css} | 2 +- css/viewer-main.css | 2 +- ...Dgnh4ycw.chunk.mjs => NcActionButton-DsQ2vxmq.chunk.mjs} | 4 ++-- ...js.license => NcActionButton-DsQ2vxmq.chunk.mjs.license} | 0 ....chunk.mjs.map => NcActionButton-DsQ2vxmq.chunk.mjs.map} | 2 +- ...icense => NcActionButton-DsQ2vxmq.chunk.mjs.map.license} | 0 ...k-BnzzI7OP.chunk.mjs => NcActionLink-BNcoZXRv.chunk.mjs} | 4 ++-- ....mjs.license => NcActionLink-BNcoZXRv.chunk.mjs.license} | 0 ...OP.chunk.mjs.map => NcActionLink-BNcoZXRv.chunk.mjs.map} | 2 +- ....license => NcActionLink-BNcoZXRv.chunk.mjs.map.license} | 0 js/{index-bdUKL-DX.chunk.mjs => index-BA6gCRxJ.chunk.mjs} | 4 ++-- ...X.chunk.mjs.license => index-BA6gCRxJ.chunk.mjs.license} | 0 ...-bdUKL-DX.chunk.mjs.map => index-BA6gCRxJ.chunk.mjs.map} | 2 +- ...mjs.map.license => index-BA6gCRxJ.chunk.mjs.map.license} | 0 ...s-DaBzMef-.chunk.mjs => previewUtils-BV8eohs9.chunk.mjs} | 4 ++-- ....mjs.license => previewUtils-BV8eohs9.chunk.mjs.license} | 0 ...f-.chunk.mjs.map => previewUtils-BV8eohs9.chunk.mjs.map} | 2 +- ....license => previewUtils-BV8eohs9.chunk.mjs.map.license} | 0 js/viewer-init.mjs | 6 +++--- js/viewer-main.mjs | 6 +++--- js/viewer-main.mjs.map | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) rename css/{main-Du8LQ8F1.chunk.css => main-CjshTWO0.chunk.css} (86%) rename js/{NcActionButton-Dgnh4ycw.chunk.mjs => NcActionButton-DsQ2vxmq.chunk.mjs} (94%) rename js/{NcActionButton-Dgnh4ycw.chunk.mjs.license => NcActionButton-DsQ2vxmq.chunk.mjs.license} (100%) rename js/{NcActionButton-Dgnh4ycw.chunk.mjs.map => NcActionButton-DsQ2vxmq.chunk.mjs.map} (99%) rename js/{NcActionButton-Dgnh4ycw.chunk.mjs.map.license => NcActionButton-DsQ2vxmq.chunk.mjs.map.license} (100%) rename js/{NcActionLink-BnzzI7OP.chunk.mjs => NcActionLink-BNcoZXRv.chunk.mjs} (92%) rename js/{NcActionLink-BnzzI7OP.chunk.mjs.license => NcActionLink-BNcoZXRv.chunk.mjs.license} (100%) rename js/{NcActionLink-BnzzI7OP.chunk.mjs.map => NcActionLink-BNcoZXRv.chunk.mjs.map} (98%) rename js/{NcActionLink-BnzzI7OP.chunk.mjs.map.license => NcActionLink-BNcoZXRv.chunk.mjs.map.license} (100%) rename js/{index-bdUKL-DX.chunk.mjs => index-BA6gCRxJ.chunk.mjs} (99%) rename js/{index-bdUKL-DX.chunk.mjs.license => index-BA6gCRxJ.chunk.mjs.license} (100%) rename js/{index-bdUKL-DX.chunk.mjs.map => index-BA6gCRxJ.chunk.mjs.map} (99%) rename js/{index-bdUKL-DX.chunk.mjs.map.license => index-BA6gCRxJ.chunk.mjs.map.license} (100%) rename js/{previewUtils-DaBzMef-.chunk.mjs => previewUtils-BV8eohs9.chunk.mjs} (99%) rename js/{previewUtils-DaBzMef-.chunk.mjs.license => previewUtils-BV8eohs9.chunk.mjs.license} (100%) rename js/{previewUtils-DaBzMef-.chunk.mjs.map => previewUtils-BV8eohs9.chunk.mjs.map} (99%) rename js/{previewUtils-DaBzMef-.chunk.mjs.map.license => previewUtils-BV8eohs9.chunk.mjs.map.license} (100%) diff --git a/css/main-Du8LQ8F1.chunk.css b/css/main-CjshTWO0.chunk.css similarity index 86% rename from css/main-Du8LQ8F1.chunk.css rename to css/main-CjshTWO0.chunk.css index fd969d775..452cf8006 100644 --- a/css/main-Du8LQ8F1.chunk.css +++ b/css/main-CjshTWO0.chunk.css @@ -7,4 +7,4 @@ */._file-picker__file-icon_19mjt_9{width:32px;height:32px;min-width:32px;min-height:32px;background-repeat:no-repeat;background-size:contain;display:flex;justify-content:center}tr.file-picker__row[data-v-15187afc]{height:var(--row-height, 50px)}tr.file-picker__row td[data-v-15187afc]{cursor:pointer;overflow:hidden;text-overflow:ellipsis;border-bottom:none}tr.file-picker__row td.row-checkbox[data-v-15187afc]{padding:0 2px}tr.file-picker__row td[data-v-15187afc]:not(.row-checkbox){padding-inline:14px 0}tr.file-picker__row td.row-size[data-v-15187afc]{text-align:end;padding-inline:0 14px}tr.file-picker__row td.row-name[data-v-15187afc]{padding-inline:2px 0}@keyframes gradient-15187afc{0%{background-position:0% 50%}50%{background-position:100% 50%}to{background-position:0% 50%}}.loading-row .row-checkbox[data-v-15187afc]{text-align:center!important}.loading-row span[data-v-15187afc]{display:inline-block;height:24px;background:linear-gradient(to right,var(--color-background-darker),var(--color-text-maxcontrast),var(--color-background-darker));background-size:600px 100%;border-radius:var(--border-radius);animation:gradient-15187afc 12s ease infinite}.loading-row .row-wrapper[data-v-15187afc]{display:inline-flex;align-items:center}.loading-row .row-checkbox span[data-v-15187afc]{width:24px}.loading-row .row-name span[data-v-15187afc]:last-of-type{margin-inline-start:6px;width:130px}.loading-row .row-size span[data-v-15187afc]{width:80px}.loading-row .row-modified span[data-v-15187afc]{width:90px}/*! * SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later -*/tr.file-picker__row[data-v-cb12dccb]{height:var(--row-height, 50px)}tr.file-picker__row td[data-v-cb12dccb]{cursor:pointer;overflow:hidden;text-overflow:ellipsis;border-bottom:none}tr.file-picker__row td.row-checkbox[data-v-cb12dccb]{padding:0 2px}tr.file-picker__row td[data-v-cb12dccb]:not(.row-checkbox){padding-inline:14px 0}tr.file-picker__row td.row-size[data-v-cb12dccb]{text-align:end;padding-inline:0 14px}tr.file-picker__row td.row-name[data-v-cb12dccb]{padding-inline:2px 0}.file-picker__row--selected[data-v-cb12dccb]{background-color:var(--color-background-dark)}.file-picker__row[data-v-cb12dccb]:hover{background-color:var(--color-background-hover)}.file-picker__name-container[data-v-cb12dccb]{display:flex;justify-content:start;align-items:center;height:100%}.file-picker__file-name[data-v-cb12dccb]{padding-inline-start:6px;min-width:0;overflow:hidden;text-overflow:ellipsis}.file-picker__file-extension[data-v-cb12dccb]{color:var(--color-text-maxcontrast);min-width:fit-content}.file-picker__header-preview[data-v-006fdbd0]{width:22px;height:32px;flex:0 0 auto}.file-picker__files[data-v-006fdbd0]{margin:2px;margin-inline-start:12px;overflow:scroll auto}.file-picker__files table[data-v-006fdbd0]{width:100%;max-height:100%;table-layout:fixed}.file-picker__files th[data-v-006fdbd0]{position:sticky;z-index:1;top:0;background-color:var(--color-main-background);padding:2px}.file-picker__files th .header-wrapper[data-v-006fdbd0]{display:flex}.file-picker__files th.row-checkbox[data-v-006fdbd0]{width:44px}.file-picker__files th.row-name[data-v-006fdbd0]{width:230px}.file-picker__files th.row-size[data-v-006fdbd0]{width:100px}.file-picker__files th.row-modified[data-v-006fdbd0]{width:120px}.file-picker__files th[data-v-006fdbd0]:not(.row-size) .button-vue__wrapper{justify-content:start;flex-direction:row-reverse}.file-picker__files th[data-v-006fdbd0]:not(.row-size) .button-vue{padding-inline:16px 4px}.file-picker__files th.row-size[data-v-006fdbd0] .button-vue__wrapper{justify-content:end}.file-picker__files th[data-v-006fdbd0] .button-vue__wrapper{color:var(--color-text-maxcontrast)}.file-picker__files th[data-v-006fdbd0] .button-vue__wrapper .button-vue__text{font-weight:400}.file-picker__breadcrumbs[data-v-b357227a]{flex-grow:0!important}.file-picker__side[data-v-b42054b8]{display:flex;flex-direction:column;align-items:stretch;gap:.5rem;min-width:200px;padding:2px;margin-block-start:7px;overflow:auto}.file-picker__side[data-v-b42054b8] .button-vue__wrapper{justify-content:start}.file-picker__filter-input[data-v-b42054b8]{margin-block:7px;max-width:260px}@media (max-width: 736px){.file-picker__side[data-v-b42054b8]{flex-direction:row;min-width:unset}}@media (max-width: 512px){.file-picker__side[data-v-b42054b8]{flex-direction:row;min-width:unset}.file-picker__filter-input[data-v-b42054b8]{max-width:unset}}.file-picker__navigation{padding-inline:8px 2px}.file-picker__navigation,.file-picker__navigation *{box-sizing:border-box}.file-picker__navigation .v-select.select{min-width:220px}@media (min-width: 513px) and (max-width: 736px){.file-picker__navigation{gap:11px}}@media (max-width: 512px){.file-picker__navigation{flex-direction:column-reverse!important}}.file-picker__view[data-v-20b719ba]{height:50px;display:flex;justify-content:start;align-items:center}.file-picker__view h3[data-v-20b719ba]{font-weight:700;height:fit-content;margin:0}.file-picker__main[data-v-20b719ba]{box-sizing:border-box;width:100%;display:flex;flex-direction:column;min-height:0;flex:1;padding-inline:2px}.file-picker__main *[data-v-20b719ba]{box-sizing:border-box}[data-v-20b719ba] .file-picker{height:min(80vh,800px)!important}@media (max-width: 512px){[data-v-20b719ba] .file-picker{height:calc(100% - 16px - var(--default-clickable-area))!important}}[data-v-20b719ba] .file-picker__content{display:flex;flex-direction:column;overflow:hidden}#emptycontent[data-v-6a8e09db]{margin:0;padding:10% 5%;background-color:var(--color-main-background)}.viewer.modal-mask[data-v-f18f9085]{transition:width ease .1s,background-color .3s ease}.viewer[data-v-f18f9085] .modal-container,.viewer__content[data-v-f18f9085]{overflow:visible!important;cursor:pointer}.viewer--split[data-v-f18f9085]{display:flex}.viewer--split .viewer__file--active[data-v-f18f9085]{width:50%;left:0;position:relative}.viewer[data-v-f18f9085] .modal-wrapper .modal-container{top:var(--header-height);bottom:var(--header-height);height:auto;background-color:transparent;box-shadow:none}.viewer__content[data-v-f18f9085]{width:100%;height:100%}.viewer__file-wrapper[data-v-f18f9085]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.viewer__file-wrapper--hidden[data-v-f18f9085]{position:absolute;z-index:-1;left:-10000px}.viewer__file[data-v-f18f9085]{transition:height .1s ease,width .1s ease}.viewer.theme--dark[data-v-f18f9085] .button-vue--vue-tertiary:hover{background-color:#ffffff14!important}.viewer.theme--dark[data-v-f18f9085] .button-vue--vue-tertiary:focus,.viewer.theme--dark[data-v-f18f9085] .button-vue--vue-tertiary:focus-visible{background-color:#ffffff14!important;outline:2px solid var(--color-primary-element)!important}.viewer.theme--dark[data-v-f18f9085] .button-vue--vue-tertiary.action-item__menutoggle{background-color:transparent}.viewer.theme--undefined.modal-mask[data-v-f18f9085]{background-color:transparent!important}.viewer.theme--light.modal-mask[data-v-f18f9085]{background-color:#ffffffeb!important}.viewer.theme--light[data-v-f18f9085] .modal-header__name,.viewer.theme--light[data-v-f18f9085] .modal-header .icons-menu button svg{color:#000!important}.viewer.theme--default.modal-mask[data-v-f18f9085]{background-color:var(--color-main-background)!important}.viewer.theme--default[data-v-f18f9085] .modal-header__name,.viewer.theme--default[data-v-f18f9085] .modal-header .icons-menu{color:var(--color-main-text)!important}.viewer.theme--default[data-v-f18f9085] .modal-header__name button svg,.viewer.theme--default[data-v-f18f9085] .modal-header__name a,.viewer.theme--default[data-v-f18f9085] .modal-header .icons-menu button svg,.viewer.theme--default[data-v-f18f9085] .modal-header .icons-menu a{color:var(--color-main-text)!important}.viewer.image--fullscreen[data-v-f18f9085] .modal-header .modal-header__name{opacity:0}.viewer.image--fullscreen[data-v-f18f9085] .modal-header .icons-menu{background-color:#0003}.viewer.image--fullscreen[data-v-f18f9085] .modal-wrapper .modal-container{top:0;bottom:0;height:100%}.component-fade-enter-active,.component-fade-leave-active{transition:opacity .3s ease}.component-fade-enter,.component-fade-leave-to{opacity:0}#viewer.modal-mask--dark .action-item--single.icon-menu-sidebar{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%20version='1.1'%20viewbox='0%200%2016%2016'%3e%3cpath%20d='m2%202c-0.554%200-1%200.446-1%201s0.446%201%201%201h12c0.554%200%201-0.446%201-1s-0.446-1-1-1h-12zm9.717%204.0059c-1.247%200-2.1428%201.0199-2.1428%201.998%200%200.9995%200.0726%201.7127%200.5718%202.4981%200.16%200.207%200.347%200.251%200.5%200.43%200.097%200.357%200.171%200.713%200.071%201.07-0.311%200.109-0.607%200.237-0.9065%200.357-0.364-0.195-0.7863-0.357-1.1503-0.5-0.05-0.2-0.0129-0.347%200.0371-0.535%200.0856-0.089%200.163-0.129%200.2558-0.215%200.2642-0.321%200.2793-0.864%200.2793-1.2496%200-0.5712-0.5135-0.9981-1.0703-0.9981-0.6211%200-1.0723%200.5126-1.0723%200.9981h-0.0136c0%200.4996%200.0353%200.8576%200.2851%201.2496%200.0714%200.107%200.1729%200.126%200.25%200.215%200.0481%200.179%200.0859%200.357%200.0352%200.535-0.4569%200.16-0.8863%200.357-1.2832%200.571-0.2999%200.214-0.1668%200.131-0.3574%200.822-0.0886%200.357%200.928%200.521%201.6562%200.578-0.0357%200.196-0.0857%200.457-0.2285%200.957-0.2285%200.893%203.1074%201.213%204.2834%201.213%201.735%200%204.507-0.325%204.269-1.213-0.371-1.385-0.15-1.221-0.701-1.642-0.778-0.467-1.749-0.834-2.568-1.143-0.107-0.398-0.03-0.692%200.07-1.07%200.168-0.179%200.357-0.259%200.514-0.43%200.492-0.6312%200.556-1.7299%200.556-2.4981%200-1.1323-1.019-1.998-2.14-1.998zm-9.717%200.9941c-0.554%200-1%200.446-1%201s0.446%201%201%201h4.2852c0.0891-0.1855%200.2-0.3648%200.3515-0.5195%200.3721-0.3801%200.9171-0.5988%201.4883-0.6192h0.0098%200.0097c0.1729%200.017%200.3042%200.0597%200.4297%200.1426%200-0.3488%200.0747-0.6853%200.1953-1.0039h-6.7695zm0%205c-0.554%200-1%200.446-1%201s0.446%201%201%201h3.25c-0.0375-0.049-0.0777-0.09-0.1113-0.152-0.1221-0.228-0.1706-0.568-0.1035-0.838l0.0019-0.012%200.0039-0.012c0.0822-0.298%200.0556-0.322%200.1445-0.615%200.0313-0.103%200.1114-0.245%200.1993-0.371h-3.3848z'%20fill='%23fff'/%3e%3c/svg%3e")}#viewer.modal-mask--dark .action-item--single.icon-download{background-image:var(--icon-download-fff)}.ui-autocomplete{z-index:2050!important} +*/tr.file-picker__row[data-v-cb12dccb]{height:var(--row-height, 50px)}tr.file-picker__row td[data-v-cb12dccb]{cursor:pointer;overflow:hidden;text-overflow:ellipsis;border-bottom:none}tr.file-picker__row td.row-checkbox[data-v-cb12dccb]{padding:0 2px}tr.file-picker__row td[data-v-cb12dccb]:not(.row-checkbox){padding-inline:14px 0}tr.file-picker__row td.row-size[data-v-cb12dccb]{text-align:end;padding-inline:0 14px}tr.file-picker__row td.row-name[data-v-cb12dccb]{padding-inline:2px 0}.file-picker__row--selected[data-v-cb12dccb]{background-color:var(--color-background-dark)}.file-picker__row[data-v-cb12dccb]:hover{background-color:var(--color-background-hover)}.file-picker__name-container[data-v-cb12dccb]{display:flex;justify-content:start;align-items:center;height:100%}.file-picker__file-name[data-v-cb12dccb]{padding-inline-start:6px;min-width:0;overflow:hidden;text-overflow:ellipsis}.file-picker__file-extension[data-v-cb12dccb]{color:var(--color-text-maxcontrast);min-width:fit-content}.file-picker__header-preview[data-v-006fdbd0]{width:22px;height:32px;flex:0 0 auto}.file-picker__files[data-v-006fdbd0]{margin:2px;margin-inline-start:12px;overflow:scroll auto}.file-picker__files table[data-v-006fdbd0]{width:100%;max-height:100%;table-layout:fixed}.file-picker__files th[data-v-006fdbd0]{position:sticky;z-index:1;top:0;background-color:var(--color-main-background);padding:2px}.file-picker__files th .header-wrapper[data-v-006fdbd0]{display:flex}.file-picker__files th.row-checkbox[data-v-006fdbd0]{width:44px}.file-picker__files th.row-name[data-v-006fdbd0]{width:230px}.file-picker__files th.row-size[data-v-006fdbd0]{width:100px}.file-picker__files th.row-modified[data-v-006fdbd0]{width:120px}.file-picker__files th[data-v-006fdbd0]:not(.row-size) .button-vue__wrapper{justify-content:start;flex-direction:row-reverse}.file-picker__files th[data-v-006fdbd0]:not(.row-size) .button-vue{padding-inline:16px 4px}.file-picker__files th.row-size[data-v-006fdbd0] .button-vue__wrapper{justify-content:end}.file-picker__files th[data-v-006fdbd0] .button-vue__wrapper{color:var(--color-text-maxcontrast)}.file-picker__files th[data-v-006fdbd0] .button-vue__wrapper .button-vue__text{font-weight:400}.file-picker__breadcrumbs[data-v-b357227a]{flex-grow:0!important}.file-picker__side[data-v-b42054b8]{display:flex;flex-direction:column;align-items:stretch;gap:.5rem;min-width:200px;padding:2px;margin-block-start:7px;overflow:auto}.file-picker__side[data-v-b42054b8] .button-vue__wrapper{justify-content:start}.file-picker__filter-input[data-v-b42054b8]{margin-block:7px;max-width:260px}@media (max-width: 736px){.file-picker__side[data-v-b42054b8]{flex-direction:row;min-width:unset}}@media (max-width: 512px){.file-picker__side[data-v-b42054b8]{flex-direction:row;min-width:unset}.file-picker__filter-input[data-v-b42054b8]{max-width:unset}}.file-picker__navigation{padding-inline:8px 2px}.file-picker__navigation,.file-picker__navigation *{box-sizing:border-box}.file-picker__navigation .v-select.select{min-width:220px}@media (min-width: 513px) and (max-width: 736px){.file-picker__navigation{gap:11px}}@media (max-width: 512px){.file-picker__navigation{flex-direction:column-reverse!important}}.file-picker__view[data-v-20b719ba]{height:50px;display:flex;justify-content:start;align-items:center}.file-picker__view h3[data-v-20b719ba]{font-weight:700;height:fit-content;margin:0}.file-picker__main[data-v-20b719ba]{box-sizing:border-box;width:100%;display:flex;flex-direction:column;min-height:0;flex:1;padding-inline:2px}.file-picker__main *[data-v-20b719ba]{box-sizing:border-box}[data-v-20b719ba] .file-picker{height:min(80vh,800px)!important}@media (max-width: 512px){[data-v-20b719ba] .file-picker{height:calc(100% - 16px - var(--default-clickable-area))!important}}[data-v-20b719ba] .file-picker__content{display:flex;flex-direction:column;overflow:hidden}#emptycontent[data-v-6a8e09db]{margin:0;padding:10% 5%;background-color:var(--color-main-background)}.viewer.modal-mask[data-v-7cf40f43]{transition:width ease .1s,background-color .3s ease}.viewer[data-v-7cf40f43] .modal-container,.viewer__content[data-v-7cf40f43]{overflow:visible!important;cursor:pointer}.viewer--split[data-v-7cf40f43]{display:flex}.viewer--split .viewer__file--active[data-v-7cf40f43]{width:50%;left:0;position:relative}.viewer[data-v-7cf40f43] .modal-wrapper .modal-container{top:var(--header-height);bottom:var(--header-height);height:auto;background-color:transparent;box-shadow:none}.viewer__content[data-v-7cf40f43]{width:100%;height:100%}.viewer__file-wrapper[data-v-7cf40f43]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.viewer__file-wrapper--hidden[data-v-7cf40f43]{position:absolute;z-index:-1;left:-10000px}.viewer__file[data-v-7cf40f43]{transition:height .1s ease,width .1s ease}.viewer.theme--dark[data-v-7cf40f43] .button-vue--vue-tertiary:hover{background-color:#ffffff14!important}.viewer.theme--dark[data-v-7cf40f43] .button-vue--vue-tertiary:focus,.viewer.theme--dark[data-v-7cf40f43] .button-vue--vue-tertiary:focus-visible{background-color:#ffffff14!important;outline:2px solid var(--color-primary-element)!important}.viewer.theme--dark[data-v-7cf40f43] .button-vue--vue-tertiary.action-item__menutoggle{background-color:transparent}.viewer.theme--undefined.modal-mask[data-v-7cf40f43]{background-color:transparent!important}.viewer.theme--light.modal-mask[data-v-7cf40f43]{background-color:#ffffffeb!important}.viewer.theme--light[data-v-7cf40f43] .modal-header__name,.viewer.theme--light[data-v-7cf40f43] .modal-header .icons-menu button svg{color:#000!important}.viewer.theme--default.modal-mask[data-v-7cf40f43]{background-color:var(--color-main-background)!important}.viewer.theme--default[data-v-7cf40f43] .modal-header__name,.viewer.theme--default[data-v-7cf40f43] .modal-header .icons-menu{color:var(--color-main-text)!important}.viewer.theme--default[data-v-7cf40f43] .modal-header__name button svg,.viewer.theme--default[data-v-7cf40f43] .modal-header__name a,.viewer.theme--default[data-v-7cf40f43] .modal-header .icons-menu button svg,.viewer.theme--default[data-v-7cf40f43] .modal-header .icons-menu a{color:var(--color-main-text)!important}.viewer.image--fullscreen[data-v-7cf40f43] .modal-header .modal-header__name{opacity:0}.viewer.image--fullscreen[data-v-7cf40f43] .modal-header .icons-menu{background-color:#0003}.viewer.image--fullscreen[data-v-7cf40f43] .modal-wrapper .modal-container{top:0;bottom:0;height:100%}.component-fade-enter-active,.component-fade-leave-active{transition:opacity .3s ease}.component-fade-enter,.component-fade-leave-to{opacity:0}#viewer.modal-mask--dark .action-item--single.icon-menu-sidebar{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='16'%20width='16'%20version='1.1'%20viewbox='0%200%2016%2016'%3e%3cpath%20d='m2%202c-0.554%200-1%200.446-1%201s0.446%201%201%201h12c0.554%200%201-0.446%201-1s-0.446-1-1-1h-12zm9.717%204.0059c-1.247%200-2.1428%201.0199-2.1428%201.998%200%200.9995%200.0726%201.7127%200.5718%202.4981%200.16%200.207%200.347%200.251%200.5%200.43%200.097%200.357%200.171%200.713%200.071%201.07-0.311%200.109-0.607%200.237-0.9065%200.357-0.364-0.195-0.7863-0.357-1.1503-0.5-0.05-0.2-0.0129-0.347%200.0371-0.535%200.0856-0.089%200.163-0.129%200.2558-0.215%200.2642-0.321%200.2793-0.864%200.2793-1.2496%200-0.5712-0.5135-0.9981-1.0703-0.9981-0.6211%200-1.0723%200.5126-1.0723%200.9981h-0.0136c0%200.4996%200.0353%200.8576%200.2851%201.2496%200.0714%200.107%200.1729%200.126%200.25%200.215%200.0481%200.179%200.0859%200.357%200.0352%200.535-0.4569%200.16-0.8863%200.357-1.2832%200.571-0.2999%200.214-0.1668%200.131-0.3574%200.822-0.0886%200.357%200.928%200.521%201.6562%200.578-0.0357%200.196-0.0857%200.457-0.2285%200.957-0.2285%200.893%203.1074%201.213%204.2834%201.213%201.735%200%204.507-0.325%204.269-1.213-0.371-1.385-0.15-1.221-0.701-1.642-0.778-0.467-1.749-0.834-2.568-1.143-0.107-0.398-0.03-0.692%200.07-1.07%200.168-0.179%200.357-0.259%200.514-0.43%200.492-0.6312%200.556-1.7299%200.556-2.4981%200-1.1323-1.019-1.998-2.14-1.998zm-9.717%200.9941c-0.554%200-1%200.446-1%201s0.446%201%201%201h4.2852c0.0891-0.1855%200.2-0.3648%200.3515-0.5195%200.3721-0.3801%200.9171-0.5988%201.4883-0.6192h0.0098%200.0097c0.1729%200.017%200.3042%200.0597%200.4297%200.1426%200-0.3488%200.0747-0.6853%200.1953-1.0039h-6.7695zm0%205c-0.554%200-1%200.446-1%201s0.446%201%201%201h3.25c-0.0375-0.049-0.0777-0.09-0.1113-0.152-0.1221-0.228-0.1706-0.568-0.1035-0.838l0.0019-0.012%200.0039-0.012c0.0822-0.298%200.0556-0.322%200.1445-0.615%200.0313-0.103%200.1114-0.245%200.1993-0.371h-3.3848z'%20fill='%23fff'/%3e%3c/svg%3e")}#viewer.modal-mask--dark .action-item--single.icon-download{background-image:var(--icon-download-fff)}.ui-autocomplete{z-index:2050!important} diff --git a/css/viewer-main.css b/css/viewer-main.css index e4b7fbbb1..bcaac6c8b 100644 --- a/css/viewer-main.css +++ b/css/viewer-main.css @@ -1,3 +1,3 @@ /* extracted by css-entry-points-plugin */ -@import './main-Du8LQ8F1.chunk.css'; +@import './main-CjshTWO0.chunk.css'; @import './previewUtils-6cpbKhU6.chunk.css'; \ No newline at end of file diff --git a/js/NcActionButton-Dgnh4ycw.chunk.mjs b/js/NcActionButton-DsQ2vxmq.chunk.mjs similarity index 94% rename from js/NcActionButton-Dgnh4ycw.chunk.mjs rename to js/NcActionButton-DsQ2vxmq.chunk.mjs index 9b6955412..266717897 100644 --- a/js/NcActionButton-Dgnh4ycw.chunk.mjs +++ b/js/NcActionButton-DsQ2vxmq.chunk.mjs @@ -1,2 +1,2 @@ -import{n as i,ab as s,bd as a,be as n}from"./previewUtils-DaBzMef-.chunk.mjs";import{A as o}from"./actionText-fFcUPi2g-gjw6zxAU.chunk.mjs";const l={name:"NcActionButton",components:{NcIconSvgWrapper:s},mixins:[o],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{ariaHidden:{type:Boolean,default:null},disabled:{type:Boolean,default:!1},isMenu:{type:Boolean,default:!1},type:{type:String,default:"button",validator:t=>["button","checkbox","radio","reset","submit"].includes(t)},modelValue:{type:[Boolean,String],default:null},value:{type:String,default:null},description:{type:String,default:""}},setup(){return{mdiCheck:n,mdiChevronRight:a}},computed:{isFocusable(){return!this.disabled},isChecked(){return this.type==="radio"&&typeof this.modelValue!="boolean"?this.modelValue===this.value:this.modelValue},nativeType(){return this.type==="submit"||this.type==="reset"?this.type:"button"},buttonAttributes(){const t={};return this.isInSemanticMenu?(t.role="menuitem",this.type==="radio"?(t.role="menuitemradio",t["aria-checked"]=this.isChecked?"true":"false"):(this.type==="checkbox"||this.nativeType==="button"&&this.modelValue!==null)&&(t.role="menuitemcheckbox",t["aria-checked"]=this.modelValue===null?"mixed":this.modelValue?"true":"false")):this.modelValue!==null&&this.nativeType==="button"&&(t["aria-pressed"]=this.modelValue?"true":"false"),t}},methods:{handleClick(t){this.onClick(t),(this.modelValue!==null||this.type!=="button")&&(this.type==="radio"?typeof this.modelValue!="boolean"?this.isChecked||this.$emit("update:modelValue",this.value):this.$emit("update:modelValue",!this.isChecked):this.$emit("update:modelValue",!this.isChecked))}}};var c=function(){var t=this,e=t._self._c;return e("li",{staticClass:"action",class:{"action--disabled":t.disabled},attrs:{role:t.isInSemanticMenu&&"presentation"}},[e("button",t._b({class:["action-button button-vue",{"action-button--active":t.isChecked,focusable:t.isFocusable}],attrs:{"aria-label":t.ariaLabel,disabled:t.disabled,title:t.title,type:t.nativeType},on:{click:t.handleClick}},"button",t.buttonAttributes,!1),[t._t("icon",function(){return[e("span",{staticClass:"action-button__icon",class:[t.isIconUrl?"action-button__icon--url":t.icon],style:{backgroundImage:t.isIconUrl?`url(${t.icon})`:null},attrs:{"aria-hidden":"true"}})]}),e("span",{staticClass:"action-button__longtext-wrapper"},[t.name?e("strong",{staticClass:"action-button__name"},[t._v(" "+t._s(t.name)+" ")]):t._e(),t.isLongText?e("span",{staticClass:"action-button__longtext",domProps:{textContent:t._s(t.text)}}):e("span",{staticClass:"action-button__text"},[t._v(" "+t._s(t.text)+" ")]),t.description?e("span",{staticClass:"action-button__description",domProps:{textContent:t._s(t.description)}}):t._e()]),t.isMenu?e("NcIconSvgWrapper",{staticClass:"action-button__menu-icon",attrs:{directional:"",path:t.mdiChevronRight}}):t.isChecked?e("NcIconSvgWrapper",{staticClass:"action-button__pressed-icon",attrs:{path:t.mdiCheck}}):t.isChecked===!1?e("span",{staticClass:"action-button__pressed-icon material-design-icon"}):t._e(),t._e()],2)])},u=[],r=i(l,c,u,!1,null,"102cfc0a");const h=r.exports;export{h as default}; -//# sourceMappingURL=NcActionButton-Dgnh4ycw.chunk.mjs.map +import{n as i,ab as s,bd as a,be as n}from"./previewUtils-BV8eohs9.chunk.mjs";import{A as o}from"./actionText-fFcUPi2g-gjw6zxAU.chunk.mjs";const l={name:"NcActionButton",components:{NcIconSvgWrapper:s},mixins:[o],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{ariaHidden:{type:Boolean,default:null},disabled:{type:Boolean,default:!1},isMenu:{type:Boolean,default:!1},type:{type:String,default:"button",validator:t=>["button","checkbox","radio","reset","submit"].includes(t)},modelValue:{type:[Boolean,String],default:null},value:{type:String,default:null},description:{type:String,default:""}},setup(){return{mdiCheck:n,mdiChevronRight:a}},computed:{isFocusable(){return!this.disabled},isChecked(){return this.type==="radio"&&typeof this.modelValue!="boolean"?this.modelValue===this.value:this.modelValue},nativeType(){return this.type==="submit"||this.type==="reset"?this.type:"button"},buttonAttributes(){const t={};return this.isInSemanticMenu?(t.role="menuitem",this.type==="radio"?(t.role="menuitemradio",t["aria-checked"]=this.isChecked?"true":"false"):(this.type==="checkbox"||this.nativeType==="button"&&this.modelValue!==null)&&(t.role="menuitemcheckbox",t["aria-checked"]=this.modelValue===null?"mixed":this.modelValue?"true":"false")):this.modelValue!==null&&this.nativeType==="button"&&(t["aria-pressed"]=this.modelValue?"true":"false"),t}},methods:{handleClick(t){this.onClick(t),(this.modelValue!==null||this.type!=="button")&&(this.type==="radio"?typeof this.modelValue!="boolean"?this.isChecked||this.$emit("update:modelValue",this.value):this.$emit("update:modelValue",!this.isChecked):this.$emit("update:modelValue",!this.isChecked))}}};var c=function(){var t=this,e=t._self._c;return e("li",{staticClass:"action",class:{"action--disabled":t.disabled},attrs:{role:t.isInSemanticMenu&&"presentation"}},[e("button",t._b({class:["action-button button-vue",{"action-button--active":t.isChecked,focusable:t.isFocusable}],attrs:{"aria-label":t.ariaLabel,disabled:t.disabled,title:t.title,type:t.nativeType},on:{click:t.handleClick}},"button",t.buttonAttributes,!1),[t._t("icon",function(){return[e("span",{staticClass:"action-button__icon",class:[t.isIconUrl?"action-button__icon--url":t.icon],style:{backgroundImage:t.isIconUrl?`url(${t.icon})`:null},attrs:{"aria-hidden":"true"}})]}),e("span",{staticClass:"action-button__longtext-wrapper"},[t.name?e("strong",{staticClass:"action-button__name"},[t._v(" "+t._s(t.name)+" ")]):t._e(),t.isLongText?e("span",{staticClass:"action-button__longtext",domProps:{textContent:t._s(t.text)}}):e("span",{staticClass:"action-button__text"},[t._v(" "+t._s(t.text)+" ")]),t.description?e("span",{staticClass:"action-button__description",domProps:{textContent:t._s(t.description)}}):t._e()]),t.isMenu?e("NcIconSvgWrapper",{staticClass:"action-button__menu-icon",attrs:{directional:"",path:t.mdiChevronRight}}):t.isChecked?e("NcIconSvgWrapper",{staticClass:"action-button__pressed-icon",attrs:{path:t.mdiCheck}}):t.isChecked===!1?e("span",{staticClass:"action-button__pressed-icon material-design-icon"}):t._e(),t._e()],2)])},u=[],r=i(l,c,u,!1,null,"102cfc0a");const h=r.exports;export{h as default}; +//# sourceMappingURL=NcActionButton-DsQ2vxmq.chunk.mjs.map diff --git a/js/NcActionButton-Dgnh4ycw.chunk.mjs.license b/js/NcActionButton-DsQ2vxmq.chunk.mjs.license similarity index 100% rename from js/NcActionButton-Dgnh4ycw.chunk.mjs.license rename to js/NcActionButton-DsQ2vxmq.chunk.mjs.license diff --git a/js/NcActionButton-Dgnh4ycw.chunk.mjs.map b/js/NcActionButton-DsQ2vxmq.chunk.mjs.map similarity index 99% rename from js/NcActionButton-Dgnh4ycw.chunk.mjs.map rename to js/NcActionButton-DsQ2vxmq.chunk.mjs.map index c05990799..5717d38d8 100644 --- a/js/NcActionButton-Dgnh4ycw.chunk.mjs.map +++ b/js/NcActionButton-DsQ2vxmq.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"NcActionButton-Dgnh4ycw.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcActionButton-CpGK6gSX.mjs"],"sourcesContent":["import '../assets/NcActionButton-D8Lyueq3.css';\nimport { m as mdiChevronRight, a as mdiCheck } from \"./mdi-C1L0jZ1V.mjs\";\nimport { A as ActionTextMixin } from \"./actionText-fFcUPi2g.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-Cb-cPj1R.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nconst _sfc_main = {\n name: \"NcActionButton\",\n components: {\n NcIconSvgWrapper\n },\n mixins: [ActionTextMixin],\n inject: {\n isInSemanticMenu: {\n from: \"NcActions:isSemanticMenu\",\n default: false\n }\n },\n props: {\n /**\n * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n * otherwise root element will inherit incorrect aria-hidden.\n */\n ariaHidden: {\n type: Boolean,\n default: null\n },\n /**\n * disabled state of the action button\n */\n disabled: {\n type: Boolean,\n default: false\n },\n /**\n * If this is a menu, a chevron icon will\n * be added at the end of the line\n */\n isMenu: {\n type: Boolean,\n default: false\n },\n /**\n * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n * This extends the native HTML button type attribute.\n */\n type: {\n type: String,\n default: \"button\",\n validator: (behavior) => [\"button\", \"checkbox\", \"radio\", \"reset\", \"submit\"].includes(behavior)\n },\n /**\n * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n * For checkbox and toggle button behavior - boolean value.\n * For radio button behavior - could be a boolean checked or a string with the value of the button.\n * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n *\n * **This is not availabe for `type='submit'` or `type='reset'`**\n *\n * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n * For `type='radio'` `null` is equal to `false`\n */\n modelValue: {\n type: [Boolean, String],\n default: null\n },\n /**\n * The value used for the `modelValue` when this component is used with radio behavior\n * Similar to the `value` attribute of ``\n */\n value: {\n type: String,\n default: null\n },\n /**\n * Small underlying text content of the entry\n */\n description: {\n type: String,\n default: \"\"\n }\n },\n setup() {\n return {\n mdiCheck,\n mdiChevronRight\n };\n },\n computed: {\n /**\n * determines if the action is focusable\n *\n * @return {boolean} is the action focusable ?\n */\n isFocusable() {\n return !this.disabled;\n },\n /**\n * The current \"checked\" or \"pressed\" state for the model behavior\n */\n isChecked() {\n if (this.type === \"radio\" && typeof this.modelValue !== \"boolean\") {\n return this.modelValue === this.value;\n }\n return this.modelValue;\n },\n /**\n * The native HTML type to set on the button\n */\n nativeType() {\n if (this.type === \"submit\" || this.type === \"reset\") {\n return this.type;\n }\n return \"button\";\n },\n /**\n * HTML attributes to bind to the