12 |
- "use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[7145],{42987:(e,i,t)=>{t.d(i,{A:()=>s});var n=t(71354),c=t.n(n),a=t(76314),l=t.n(a)()(c());l.push([e.id,".node-picker__wrapper[data-v-0becb48e]:not(:last-of-type) {\n border-bottom: 1px solid var(--color-border);\n}\n.node-picker[data-v-0becb48e] {\n display: flex;\n align-items: center;\n height: 64px;\n}\n.node-picker__icon[data-v-0becb48e], .node-picker__preview[data-v-0becb48e] {\n height: 64px;\n width: 64px;\n margin: 0 var(--secondary-margin);\n display: block;\n flex: 0 0 64px;\n}\n.node-picker__icon[data-v-0becb48e] {\n color: var(--color-text-maxcontrast);\n}\n.node-picker__icon.folder-icon[data-v-0becb48e] {\n color: var(--color-primary-element);\n}\n.node-picker__preview[data-v-0becb48e] {\n overflow: hidden;\n border-radius: calc(var(--border-radius) * 2);\n background-position: center;\n background-size: cover;\n}\n.node-picker__desc[data-v-0becb48e] {\n display: flex;\n flex-direction: column;\n}\n.node-picker__desc span[data-v-0becb48e] {\n white-space: nowrap;\n}[data-v-f0c1b8b3] .modal-container__content {\n display: flex;\n overflow: visible;\n flex-direction: column;\n}\n.conflict-picker[data-v-f0c1b8b3] {\n --margin: 36px;\n --secondary-margin: 18px;\n}\n.conflict-picker__header[data-v-f0c1b8b3] {\n position: sticky;\n z-index: 10;\n top: 0;\n padding: 0 var(--margin);\n padding-bottom: var(--secondary-margin);\n}\n.conflict-picker__form[data-v-f0c1b8b3] {\n position: relative;\n overflow: auto;\n padding: 0 var(--margin);\n margin-top: calc(-1 * var(--secondary-margin));\n}\n.conflict-picker fieldset[data-v-f0c1b8b3] {\n display: grid;\n width: 100%;\n margin-top: calc(var(--secondary-margin) * 1.5);\n padding-bottom: var(--secondary-margin);\n grid-template-columns: 1fr 1fr;\n}\n.conflict-picker fieldset[data-v-f0c1b8b3] legend {\n display: flex;\n align-items: center;\n width: 100%;\n margin-bottom: calc(var(--secondary-margin) / 2);\n}\n.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] {\n position: sticky;\n top: 0;\n margin: 0;\n padding: var(--secondary-margin) 0;\n background-image: linear-gradient(to top, transparent, var(--color-main-background-blur) 10%, var(--color-main-background) 15%);\n}\n.conflict-picker fieldset.conflict-picker__all + fieldset[data-v-f0c1b8b3] {\n margin-top: 0;\n}\n.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] label {\n font-weight: bold;\n}\n.conflict-picker .button-vue--disabled[data-v-f0c1b8b3] {\n cursor: default;\n opacity: 0.5;\n filter: saturate(0.7);\n}\n.conflict-picker[data-v-f0c1b8b3] .dialog__actions {\n width: auto;\n margin-inline: 12px;\n}\n.conflict-picker[data-v-f0c1b8b3] .dialog__actions span.dialog__actions-separator {\n margin-left: auto;\n}\n@media screen and (max-width: 768px) {\n.conflict-picker[data-v-f0c1b8b3] {\n --margin: var(--secondary-margin) !important;\n}\n.conflict-picker__description[data-v-f0c1b8b3] {\n display: none !important;\n}\n.conflict-picker fieldset[data-v-f0c1b8b3] {\n grid-template-columns: 1fr !important;\n}\n.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] {\n position: static;\n}\n}\n@media screen and (max-width: 512px) {\n.conflict-picker[data-v-f0c1b8b3] .dialog__actions {\n flex-wrap: wrap;\n}\n.conflict-picker[data-v-f0c1b8b3] .dialog__actions span.dialog__actions-separator {\n width: 100%;\n}\n}","",{version:3,sources:["webpack://./node_modules/@nextcloud/upload/dist/assets/ConflictPicker-EWePgg5w.css"],names:[],mappings:"AAAA;EACE,4CAA4C;AAC9C;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,YAAY;AACd;AACA;EACE,YAAY;EACZ,WAAW;EACX,iCAAiC;EACjC,cAAc;EACd,cAAc;AAChB;AACA;EACE,oCAAoC;AACtC;AACA;EACE,mCAAmC;AACrC;AACA;EACE,gBAAgB;EAChB,6CAA6C;EAC7C,2BAA2B;EAC3B,sBAAsB;AACxB;AACA;EACE,aAAa;EACb,sBAAsB;AACxB;AACA;EACE,mBAAmB;AACrB,CAAC;EACC,aAAa;EACb,iBAAiB;EACjB,sBAAsB;AACxB;AACA;EACE,cAAc;EACd,wBAAwB;AAC1B;AACA;EACE,gBAAgB;EAChB,WAAW;EACX,MAAM;EACN,wBAAwB;EACxB,uCAAuC;AACzC;AACA;EACE,kBAAkB;EAClB,cAAc;EACd,wBAAwB;EACxB,8CAA8C;AAChD;AACA;EACE,aAAa;EACb,WAAW;EACX,+CAA+C;EAC/C,uCAAuC;EACvC,8BAA8B;AAChC;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,WAAW;EACX,gDAAgD;AAClD;AACA;EACE,gBAAgB;EAChB,MAAM;EACN,SAAS;EACT,kCAAkC;EAClC,+HAA+H;AACjI;AACA;EACE,aAAa;AACf;AACA;EACE,iBAAiB;AACnB;AACA;EACE,eAAe;EACf,YAAY;EACZ,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,mBAAmB;AACrB;AACA;EACE,iBAAiB;AACnB;AACA;AACA;IACI,4CAA4C;AAChD;AACA;IACI,wBAAwB;AAC5B;AACA;IACI,qCAAqC;AACzC;AACA;IACI,gBAAgB;AACpB;AACA;AACA;AACA;IACI,eAAe;AACnB;AACA;IACI,WAAW;AACf;AACA",sourcesContent:[".node-picker__wrapper[data-v-0becb48e]:not(:last-of-type) {\n border-bottom: 1px solid var(--color-border);\n}\n.node-picker[data-v-0becb48e] {\n display: flex;\n align-items: center;\n height: 64px;\n}\n.node-picker__icon[data-v-0becb48e], .node-picker__preview[data-v-0becb48e] {\n height: 64px;\n width: 64px;\n margin: 0 var(--secondary-margin);\n display: block;\n flex: 0 0 64px;\n}\n.node-picker__icon[data-v-0becb48e] {\n color: var(--color-text-maxcontrast);\n}\n.node-picker__icon.folder-icon[data-v-0becb48e] {\n color: var(--color-primary-element);\n}\n.node-picker__preview[data-v-0becb48e] {\n overflow: hidden;\n border-radius: calc(var(--border-radius) * 2);\n background-position: center;\n background-size: cover;\n}\n.node-picker__desc[data-v-0becb48e] {\n display: flex;\n flex-direction: column;\n}\n.node-picker__desc span[data-v-0becb48e] {\n white-space: nowrap;\n}[data-v-f0c1b8b3] .modal-container__content {\n display: flex;\n overflow: visible;\n flex-direction: column;\n}\n.conflict-picker[data-v-f0c1b8b3] {\n --margin: 36px;\n --secondary-margin: 18px;\n}\n.conflict-picker__header[data-v-f0c1b8b3] {\n position: sticky;\n z-index: 10;\n top: 0;\n padding: 0 var(--margin);\n padding-bottom: var(--secondary-margin);\n}\n.conflict-picker__form[data-v-f0c1b8b3] {\n position: relative;\n overflow: auto;\n padding: 0 var(--margin);\n margin-top: calc(-1 * var(--secondary-margin));\n}\n.conflict-picker fieldset[data-v-f0c1b8b3] {\n display: grid;\n width: 100%;\n margin-top: calc(var(--secondary-margin) * 1.5);\n padding-bottom: var(--secondary-margin);\n grid-template-columns: 1fr 1fr;\n}\n.conflict-picker fieldset[data-v-f0c1b8b3] legend {\n display: flex;\n align-items: center;\n width: 100%;\n margin-bottom: calc(var(--secondary-margin) / 2);\n}\n.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] {\n position: sticky;\n top: 0;\n margin: 0;\n padding: var(--secondary-margin) 0;\n background-image: linear-gradient(to top, transparent, var(--color-main-background-blur) 10%, var(--color-main-background) 15%);\n}\n.conflict-picker fieldset.conflict-picker__all + fieldset[data-v-f0c1b8b3] {\n margin-top: 0;\n}\n.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] label {\n font-weight: bold;\n}\n.conflict-picker .button-vue--disabled[data-v-f0c1b8b3] {\n cursor: default;\n opacity: 0.5;\n filter: saturate(0.7);\n}\n.conflict-picker[data-v-f0c1b8b3] .dialog__actions {\n width: auto;\n margin-inline: 12px;\n}\n.conflict-picker[data-v-f0c1b8b3] .dialog__actions span.dialog__actions-separator {\n margin-left: auto;\n}\n@media screen and (max-width: 768px) {\n.conflict-picker[data-v-f0c1b8b3] {\n --margin: var(--secondary-margin) !important;\n}\n.conflict-picker__description[data-v-f0c1b8b3] {\n display: none !important;\n}\n.conflict-picker fieldset[data-v-f0c1b8b3] {\n grid-template-columns: 1fr !important;\n}\n.conflict-picker fieldset.conflict-picker__all[data-v-f0c1b8b3] {\n position: static;\n}\n}\n@media screen and (max-width: 512px) {\n.conflict-picker[data-v-f0c1b8b3] .dialog__actions {\n flex-wrap: wrap;\n}\n.conflict-picker[data-v-f0c1b8b3] .dialog__actions span.dialog__actions-separator {\n width: 100%;\n}\n}"],sourceRoot:""}]);const s=l},39526:(e,i,t)=>{t.r(i),t.d(i,{default:()=>X});var n=t(85072),c=t.n(n),a=t(97825),l=t.n(a),s=t(77659),o=t.n(s),r=t(55056),d=t.n(r),p=t(10540),A=t.n(p),f=t(41113),m=t.n(f),u=t(42987),h={};h.styleTagTransform=m(),h.setAttributes=d(),h.insert=o().bind(null,"head"),h.domAPI=l(),h.insertStyleElement=A(),c()(u.A,h),u.A&&u.A.locals&&u.A.locals;var g=t(85471),b=t(95674),C=t(35810),_=t(93370),v=t(32073),k=t(94219),w=t(18740),y=t(63814),S=t(4604);const x={name:"ArrowRightIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var E=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon arrow-right-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},B=[];const N=(0,_.n)(x,E,B,!1,null,null).exports,z={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var F=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},L=[];const P=(0,_.n)(z,F,L,!1,null,null).exports,I={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var M=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},$=[];const O=(0,_.n)(I,M,$,!1,null,null).exports,U={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var W=function(){var e=this,i=e._self._c;return i("span",e._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"}},[e.title?i("title",[e._v(e._s(e.title))]):e._e()])])])},R=[];const q=(0,_.n)(U,W,R,!1,null,null).exports,D=(0,g.pM)({name:"NodesPicker",components:{FileSvg:O,FolderSvg:q,NcCheckboxRadioSwitch:v.A,NcDateTime:S.A},props:{incoming:{type:[File,Object],required:!0},existing:{type:Object,required:!0},newSelected:{type:Array,required:!0},oldSelected:{type:Array,required:!0}},data:()=>({asyncPreview:null,incomingFile:null}),computed:{isEnoughSelected(){return this.isChecked(this.incoming,this.newSelected)||this.isChecked(this.existing,this.oldSelected)},incomingPreview(){return this.incomingFile?this.previewUrl(this.incomingFile)??this.asyncPreview:null},incomingLastModified(){return this.incomingFile?this.lastModified(this.incomingFile):null},incomingSize(){return this.incomingFile?this.size(this.incomingFile):(0,_.t)("Unknown size")},existingPreview(){return this.previewUrl(this.existing)},existingLastModified(){return this.lastModified(this.existing)}},watch:{incoming:{immediate:!0,async handler(){this.incoming instanceof File?this.incomingFile=this.incoming:this.incoming instanceof FileSystemFileEntry?this.incomingFile=await new Promise(((e,i)=>this.incoming.file(e,i))):this.incomingFile=null}}},methods:{lastModified:e=>(e instanceof File?new Date(e.lastModified):e.mtime)??null,size:e=>e.size?(0,C.v7)(e.size,!0):(0,_.t)("Unknown size"),previewUrl(e){if(e instanceof File)return this.previewImage(e).then((e=>{this.asyncPreview=e})),null;if(e.type===C.pt.Folder)return null;try{const i=e.attributes.previewUrl||(0,y.Jv)("/core/preview?fileId={fileid}",{fileid:e.fileid}),t=new URL(window.location.origin+i);t.searchParams.set("x",64..toString()),t.searchParams.set("y",64..toString()),t.searchParams.set("mimeFallback","true");const n=e.attributes?.etag||"";return t.searchParams.set("v",n.slice(0,6)),t.href}catch(e){return null}},isFolder:e=>(0,_.i)(e)?e.isDirectory:e.type===C.pt.Folder||"httpd/unix-directory"===e.type,isChecked:(e,i)=>i.includes(e),onUpdateIncomingChecked(e){e?this.$emit("update:newSelected",[this.incoming,...this.newSelected]):this.$emit("update:newSelected",this.newSelected.filter((e=>e!==this.incoming)))},onUpdateExistingChecked(e){e?this.$emit("update:oldSelected",[this.existing,...this.oldSelected]):this.$emit("update:oldSelected",this.oldSelected.filter((e=>e!==this.existing)))},previewImage:async e=>new Promise((i=>{if(e instanceof File&&e.type.startsWith("image/")){const t=new FileReader;t.onload=async t=>{const n=t?.target?.result;if(n instanceof ArrayBuffer){const t=new Blob([n],{type:e.type}),c=URL.createObjectURL(t);i(c)}else i(null)},t.readAsArrayBuffer(e)}else i(null)})),t:_.t}});var V=function(){var e=this,i=e._self._c;return e._self._setupProxy,i("fieldset",{staticClass:"node-picker__wrapper",attrs:{"data-cy-conflict-picker-fieldset":e.existing.basename}},[i("legend",[e._v(e._s(e.existing.basename))]),i("NcCheckboxRadioSwitch",{attrs:{checked:e.isChecked(e.incoming,e.newSelected),required:!e.isEnoughSelected,"data-cy-conflict-picker-input-incoming":e.existing.basename},on:{"update:checked":e.onUpdateIncomingChecked}},[i("span",{staticClass:"node-picker node-picker--incoming"},[e.incomingPreview?i("img",{staticClass:"node-picker__preview",attrs:{src:e.incomingPreview,alt:e.t("Preview image"),loading:"lazy"}}):[e.isFolder(e.incoming)?i("FolderSvg",{staticClass:"node-picker__icon",attrs:{size:48}}):i("FileSvg",{staticClass:"node-picker__icon",attrs:{size:48}})],i("span",{staticClass:"node-picker__desc"},[i("span",{staticClass:"node-picker__name"},[e._v(e._s(e.t("New version")))]),e.incomingLastModified?i("NcDateTime",{staticClass:"node-picker__mtime",attrs:{timestamp:e.incomingLastModified,"relative-time":!1,format:{timeStyle:"short",dateStyle:"medium"}}}):i("span",{staticClass:"node-picker__mtime"},[e._v(" "+e._s(e.t("Last modified date unknown"))+" ")]),i("span",{staticClass:"node-picker__size"},[e._v(e._s(e.incomingSize))])],1)],2)]),i("NcCheckboxRadioSwitch",{attrs:{checked:e.isChecked(e.existing,e.oldSelected),required:!e.isEnoughSelected,"data-cy-conflict-picker-input-existing":e.existing.basename},on:{"update:checked":e.onUpdateExistingChecked}},[i("span",{staticClass:"node-picker node-picker--existing"},[e.existingPreview?i("img",{staticClass:"node-picker__preview",attrs:{src:e.existingPreview,alt:e.t("Preview image"),loading:"lazy"}}):[e.isFolder(e.existing)?i("FolderSvg",{staticClass:"node-picker__icon",attrs:{size:48}}):i("FileSvg",{staticClass:"node-picker__icon",attrs:{size:48}})],i("span",{staticClass:"node-picker__desc"},[i("span",{staticClass:"node-picker__name"},[e._v(e._s(e.t("Existing version")))]),e.existingLastModified?i("NcDateTime",{staticClass:"node-picker__mtime",attrs:{timestamp:e.existingLastModified,"relative-time":!1,format:{timeStyle:"short",dateStyle:"medium"}}}):i("span",{staticClass:"node-picker__mtime"},[e._v(" "+e._s(e.t("Last modified date unknown"))+" ")]),i("span",{staticClass:"node-picker__size"},[e._v(e._s(e.size(e.existing)))])],1)],2)])],1)},T=[];const H=(0,_.n)(D,V,T,!1,null,"0becb48e").exports,j=(0,g.pM)({name:"ConflictPicker",components:{ArrowRight:N,Close:P,NcButton:w.A,NcCheckboxRadioSwitch:v.A,NcDialog:k.A,NodesPicker:H},props:{dirname:{type:String,default:""},content:{type:Array,required:!0},conflicts:{type:Array,required:!0},recursiveUpload:{type:Boolean,default:!1}},emits:["cancel","submit"],setup:()=>({blockedTitle:(0,_.t)("You need to select at least one version of each file to continue.")}),data:()=>({files:[],opened:!0,newSelected:[],oldSelected:[]}),computed:{name(){return""!==this?.dirname?.trim?.()?(0,_.a)("{count} file conflict in {dirname}","{count} file conflicts in {dirname}",this.conflicts.length,{count:this.conflicts.length,dirname:this.dirname}):(0,_.a)("{count} file conflict","{count} files conflict",this.conflicts.length,{count:this.conflicts.length})},skipButtonLabel(){return(0,_.a)("Skip this file","Skip {count} files",this.conflicts.length,{count:this.conflicts.length})},selectAllNewBind(){const e=this.isNoneNewSelected||this.isSomeNewSelected?this.t("Select all"):this.t("Unselect all");return{"aria-label":e,checked:this.isAllNewSelected,indeterminate:this.isSomeNewSelected,title:e}},isAllNewSelected(){return this.newSelected.length===this.conflicts.length},isNoneNewSelected(){return 0===this.newSelected.length},isSomeNewSelected(){return!this.isAllNewSelected&&!this.isNoneNewSelected},selectAllOldBind(){const e=this.isNoneOldSelected||this.isSomeOldSelected?this.t("Select all"):this.t("Unselect all");return{"aria-label":e,checked:this.isAllOldSelected,indeterminate:this.isSomeOldSelected,title:e}},isAllOldSelected(){return this.oldSelected.length===this.files.length},isNoneOldSelected(){return 0===this.oldSelected.length},isSomeOldSelected(){return!this.isAllOldSelected&&!this.isNoneOldSelected},isEnoughSelected(){return!(!this.isAllOldSelected&&!this.isAllNewSelected)||this.$refs?.nodesPicker?.every?.((e=>e.isEnoughSelected))}},mounted(){if(this.files=this.conflicts.map((e=>{const i=e instanceof File||(0,_.i)(e)?e.name:e.basename;return this.content.find((e=>e.basename===i))})).filter(Boolean),0===this.conflicts.length||0===this.files.length){const e=new Error("ConflictPicker: files and conflicts must not be empty");throw this.onCancel(e),e}if(this.conflicts.length!==this.files.length){const e=new Error("ConflictPicker: files and conflicts must have the same length. Make sure you filter out non conflicting files from the conflicts array.");throw this.onCancel(e),e}_.l.debug("ConflictPicker initialised",{files:this.files,conflicts:this.conflicts,content:this.content})},methods:{onCancel(e){this.opened=!1,this.$emit("cancel",e)},onSkip(){_.l.debug("Conflict skipped. Ignoring all conflicting files"),this.opened=!1,this.$emit("submit",{selected:[],renamed:[]})},onSubmit(){if(!this.isEnoughSelected)return this.scrollValidityInputIntoView(),this.$refs.form.reportValidity(),void(0,b.Qg)(this.blockedTitle);const e=this.oldSelected.map((e=>e.basename)),i=this.content.map((e=>e.basename)),t=[],n=this.newSelected.filter((i=>{const t=i instanceof File||(0,_.i)(i)?i.name:i.basename;return e.includes(t)}));n.length>0&&n.forEach((e=>{const n=e instanceof File||(0,_.i)(e)?e.name:e.basename,c=(0,C.E6)(n,i);if(e instanceof File||(0,_.i)(e))return Object.defineProperty(e,"name",{value:c}),void t.push(e);e.rename(c),t.push(e)}));const c=this.newSelected.filter((i=>{const t=i instanceof File||(0,_.i)(i)?i.name:i.basename;return!e.includes(t)&&!n.includes(i)}));_.l.debug("Conflict resolved",{selected:c,renamed:t}),this.opened=!1,this.$emit("submit",{selected:c,renamed:t})},scrollValidityInputIntoView(){const e='.checkbox-radio-switch input[type="checkbox"]';Array.from(this.$el.querySelectorAll(e)).forEach((e=>e?.setCustomValidity?.("")));const i=this.$el.querySelector(e+":invalid");i&&(i.setCustomValidity(this.blockedTitle),i.scrollIntoView({behavior:"instant",block:"center"}))},onSelectAllNew(e){e?(_.l.debug("Selected all new files"),this.newSelected=this.conflicts):(_.l.debug("Cleared new selection"),this.newSelected=[])},onSelectAllOld(e){e?(_.l.debug("Selected all existing files"),this.oldSelected=this.files):(_.l.debug("Cleared old selection"),this.oldSelected=[])},t:_.t}});var Y=function(){var e=this,i=e._self._c;return e._self._setupProxy,i("NcDialog",{staticClass:"conflict-picker",attrs:{"can-close":"","data-cy-conflict-picker":"","close-on-click-outside":!1,show:e.opened,name:e.name,size:"large"},on:{closing:e.onCancel},scopedSlots:e._u([{key:"actions",fn:function(){return[i("NcButton",{attrs:{"aria-label":e.t("Cancel"),title:e.t("Cancel the entire operation"),"data-cy-conflict-picker-cancel":"",type:"tertiary"},on:{click:e.onCancel},scopedSlots:e._u([{key:"icon",fn:function(){return[i("Close",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(e.t("Cancel"))+" ")]),i("span",{staticClass:"dialog__actions-separator"}),i("NcButton",{attrs:{"aria-label":e.skipButtonLabel,"data-cy-conflict-picker-skip":""},on:{click:e.onSkip},scopedSlots:e._u([{key:"icon",fn:function(){return[i("Close",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(e.skipButtonLabel)+" ")]),i("NcButton",{class:{"button-vue--disabled":!e.isEnoughSelected},attrs:{"aria-label":e.t("Continue"),title:e.isEnoughSelected?"":e.blockedTitle,"data-cy-conflict-picker-submit":"","native-type":"submit",type:"primary"},on:{click:function(i){return i.stopPropagation(),i.preventDefault(),e.onSubmit.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[i("ArrowRight",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(e.t("Continue"))+" ")])]},proxy:!0}])},[i("div",{staticClass:"conflict-picker__header"},[i("p",{staticClass:"conflict-picker__description",attrs:{id:"conflict-picker-description"}},[e._v(" "+e._s(e.t("Which files do you want to keep?"))),i("br"),e._v(" "+e._s(e.t("If you select both versions, the incoming file will have a number added to its name."))),i("br"),e.recursiveUpload?[e._v(" "+e._s(e.t("When an incoming folder is selected, the content is written into the existing folder and a recursive conflict resolution is performed."))+" ")]:[e._v(" "+e._s(e.t("When an incoming folder is selected, any conflicting files within it will also be overwritten."))+" ")]],2)]),i("form",{ref:"form",staticClass:"conflict-picker__form",attrs:{"aria-labelledby":"conflict-picker-description","data-cy-conflict-picker-form":""},on:{submit:function(i){return i.preventDefault(),i.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[i("fieldset",{staticClass:"conflict-picker__all",attrs:{"data-cy-conflict-picker-fieldset":"all"}},[i("legend",{staticClass:"hidden-visually"},[e._v(" "+e._s(e.t("Select all checkboxes"))+" ")]),i("NcCheckboxRadioSwitch",e._b({attrs:{"data-cy-conflict-picker-input-incoming":"all"},on:{"update:checked":e.onSelectAllNew}},"NcCheckboxRadioSwitch",e.selectAllNewBind,!1),[e._v(" "+e._s(e.t("Select all new files"))+" ")]),i("NcCheckboxRadioSwitch",e._b({attrs:{"data-cy-conflict-picker-input-existing":"all"},on:{"update:checked":e.onSelectAllOld}},"NcCheckboxRadioSwitch",e.selectAllOldBind,!1),[e._v(" "+e._s(e.t("Select all existing files"))+" ")])],1),e._l(e.files,(function(t,n){return i("NodesPicker",{key:t.fileid,ref:"nodesPicker",refInFor:!0,attrs:{incoming:e.conflicts[n],existing:e.files[n],"new-selected":e.newSelected,"old-selected":e.oldSelected},on:{"update:newSelected":function(i){e.newSelected=i},"update:new-selected":function(i){e.newSelected=i},"update:oldSelected":function(i){e.oldSelected=i},"update:old-selected":function(i){e.oldSelected=i}}})}))],2)])},Z=[];const X=(0,_.n)(j,Y,Z,!1,null,"f0c1b8b3").exports}}]);
- //# sourceMappingURL=7145-7145.js.map?v=e43742064b9ac017e9e7
|