Merge pull request #44755 from nextcloud/feat/deprecate-and-replace-jQuery-dialogs

feat: Deprecate and replace legacy jQuery UI dialogs with Vue
pull/44785/head
Ferdinand Thiessen 2 months ago committed by GitHub
commit 28a30a6ea8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -51,15 +51,19 @@ import IconMove from '@mdi/svg/svg/folder-move.svg?raw'
import IconCopy from '@mdi/svg/svg/folder-multiple.svg?raw'
import OC from './index.js'
import { FilePickerType, getFilePickerBuilder } from '@nextcloud/dialogs'
import { DialogBuilder, FilePickerType, getFilePickerBuilder, spawnDialog } from '@nextcloud/dialogs'
import { translate as t } from '@nextcloud/l10n'
import { basename } from 'path'
import { defineAsyncComponent } from 'vue'
/**
* this class to ease the usage of jquery dialogs
*/
const Dialogs = {
// dialog button types
/** @deprecated use `@nextcloud/dialogs` */
YES_NO_BUTTONS: 70,
/** @deprecated use `@nextcloud/dialogs` */
OK_BUTTONS: 71,
/** @deprecated use FilePickerType from `@nextcloud/dialogs` */
@ -73,15 +77,14 @@ const Dialogs = {
/** @deprecated use FilePickerType from `@nextcloud/dialogs` */
FILEPICKER_TYPE_CUSTOM: 5,
// used to name each dialog
dialogsCounter: 0,
/**
* displays alert dialog
* @param {string} text content of dialog
* @param {string} title dialog title
* @param {function} callback which will be triggered when user presses OK
* @param {boolean} [modal] make the dialog modal
*
* @deprecated 30.0.0 Use `@nextcloud/dialogs` instead or build your own with `@nextcloud/vue` NcDialog
*/
alert: function(text, title, callback, modal) {
this.message(
@ -93,12 +96,15 @@ const Dialogs = {
modal
)
},
/**
* displays info dialog
* @param {string} text content of dialog
* @param {string} title dialog title
* @param {function} callback which will be triggered when user presses OK
* @param {boolean} [modal] make the dialog modal
*
* @deprecated 30.0.0 Use `@nextcloud/dialogs` instead or build your own with `@nextcloud/vue` NcDialog
*/
info: function(text, title, callback, modal) {
this.message(text, title, 'info', Dialogs.OK_BUTTON, callback, modal)
@ -111,6 +117,8 @@ const Dialogs = {
* @param {function} callback which will be triggered when user presses OK (true or false would be passed to callback respectively)
* @param {boolean} [modal] make the dialog modal
* @returns {Promise}
*
* @deprecated 30.0.0 Use `@nextcloud/dialogs` instead or build your own with `@nextcloud/vue` NcDialog
*/
confirm: function(text, title, callback, modal) {
return this.message(
@ -130,16 +138,34 @@ const Dialogs = {
* @param {function} callback which will be triggered when user presses OK (true or false would be passed to callback respectively)
* @param {boolean} [modal] make the dialog modal
* @returns {Promise}
*
* @deprecated 30.0.0 Use `@nextcloud/dialogs` instead or build your own with `@nextcloud/vue` NcDialog
*/
confirmDestructive: function(text, title, buttons, callback, modal) {
return this.message(
text,
title,
'none',
buttons,
callback,
modal === undefined ? true : modal
)
confirmDestructive: function(text, title, buttons = Dialogs.OK_BUTTONS, callback = () => {}, modal) {
return (new DialogBuilder())
.setName(title)
.setText(text)
.setButtons(
buttons === Dialogs.OK_BUTTONS
? [
{
label: t('core', 'Yes'),
type: 'error',
callback: () => {
callback.clicked = true
callback(true)
},
}
]
: Dialogs._getLegacyButtons(buttons, callback)
)
.build()
.show()
.then(() => {
if (!callback.clicked) {
callback(false)
}
})
},
/**
* displays confirmation dialog
@ -148,17 +174,35 @@ const Dialogs = {
* @param {function} callback which will be triggered when user presses OK (true or false would be passed to callback respectively)
* @param {boolean} [modal] make the dialog modal
* @returns {Promise}
*
* @deprecated 30.0.0 Use `@nextcloud/dialogs` instead or build your own with `@nextcloud/vue` NcDialog
*/
confirmHtml: function(text, title, callback, modal) {
return this.message(
text,
title,
'notice',
Dialogs.YES_NO_BUTTONS,
callback,
modal,
true
)
return (new DialogBuilder())
.setName(title)
.setText('')
.setButtons([
{
label: t('core', 'No'),
callback: () => {},
},
{
label: t('core', 'Yes'),
type: 'primary',
callback: () => {
callback.clicked = true
callback(true)
},
},
])
.build()
.setHTML(text)
.show()
.then(() => {
if (!callback.clicked) {
callback(false)
}
})
},
/**
* displays prompt dialog
@ -169,69 +213,25 @@ const Dialogs = {
* @param {string} name name of the input field
* @param {boolean} password whether the input should be a password input
* @returns {Promise}
*
* @deprecated Use NcDialog from `@nextcloud/vue` instead
*/
prompt: function(text, title, callback, modal, name, password) {
return $.when(this._getMessageTemplate()).then(function($tmpl) {
var dialogName = 'oc-dialog-' + Dialogs.dialogsCounter + '-content'
var dialogId = '#' + dialogName
var $dlg = $tmpl.octemplate({
dialog_name: dialogName,
title: title,
message: text,
type: 'notice'
})
var input = $('<input/>')
input.attr('type', password ? 'password' : 'text').attr('id', dialogName + '-input').attr('placeholder', name)
var label = $('<label/>').attr('for', dialogName + '-input').text(name + ': ')
$dlg.append(label)
$dlg.append(input)
if (modal === undefined) {
modal = false
}
$('body').append($dlg)
// wrap callback in _.once():
// only call callback once and not twice (button handler and close
// event) but call it for the close event, if ESC or the x is hit
if (callback !== undefined) {
callback = _.once(callback)
}
var buttonlist = [{
text: t('core', 'No'),
click: function() {
if (callback !== undefined) {
// eslint-disable-next-line standard/no-callback-literal
callback(false, input.val())
}
$(dialogId).ocdialog('close')
}
}, {
text: t('core', 'Yes'),
click: function() {
if (callback !== undefined) {
// eslint-disable-next-line standard/no-callback-literal
callback(true, input.val())
}
$(dialogId).ocdialog('close')
return new Promise((resolve) => {
spawnDialog(
defineAsyncComponent(() => import('../components/LegacyDialogPrompt.vue')),
{
text,
name: title,
callback,
inputName: name,
isPassword: !!password
},
defaultButton: true
}]
$(dialogId).ocdialog({
closeOnEscape: true,
modal: modal,
buttons: buttonlist,
close: function() {
// callback is already fired if Yes/No is clicked directly
if (callback !== undefined) {
// eslint-disable-next-line standard/no-callback-literal
callback(false, input.val())
}
}
})
input.focus()
Dialogs.dialogsCounter++
(...args) => {
callback(...args)
resolve()
},
)
})
},
@ -363,105 +363,81 @@ const Dialogs = {
/**
* Displays raw dialog
* You better use a wrapper instead ...
*
* @deprecated 30.0.0 Use `@nextcloud/dialogs` instead or build your own with `@nextcloud/vue` NcDialog
*/
message: function(content, title, dialogType, buttons, callback, modal, allowHtml) {
return $.when(this._getMessageTemplate()).then(function($tmpl) {
var dialogName = 'oc-dialog-' + Dialogs.dialogsCounter + '-content'
var dialogId = '#' + dialogName
var $dlg = $tmpl.octemplate({
dialog_name: dialogName,
title: title,
message: content,
type: dialogType
}, allowHtml ? { escapeFunction: '' } : {})
if (modal === undefined) {
modal = false
message: function(content, title, dialogType, buttons, callback = () => {}, modal, allowHtml) {
const builder = (new DialogBuilder())
.setName(title)
.setText(allowHtml ? '' : content)
.setButtons(Dialogs._getLegacyButtons(buttons, callback))
switch (dialogType) {
case 'alert':
builder.setSeverity('warning')
break
case 'notice':
builder.setSeverity('info')
break
default:
break
}
const dialog = builder.build()
if (allowHtml) {
dialog.setHTML(content)
}
return dialog.show().then(() => {
if(!callback._clicked) {
callback(false)
}
$('body').append($dlg)
var buttonlist = []
switch (buttons) {
})
},
/**
* Helper for legacy API
* @deprecated
*/
_getLegacyButtons(buttons, callback) {
const buttonList = []
switch (typeof buttons === 'object' ? buttons.type : buttons) {
case Dialogs.YES_NO_BUTTONS:
buttonlist = [{
text: t('core', 'No'),
click: function() {
if (callback !== undefined) {
callback(false)
}
$(dialogId).ocdialog('close')
}
},
{
text: t('core', 'Yes'),
click: function() {
if (callback !== undefined) {
callback(true)
}
$(dialogId).ocdialog('close')
buttonList.push({
label: buttons?.cancel ?? t('core', 'No'),
callback: () => {
callback._clicked = true
callback(false)
},
defaultButton: true
}]
})
buttonList.push({
label: buttons?.confirm ?? t('core', 'Yes'),
type: 'primary',
callback: () => {
callback._clicked = true
callback(true)
},
})
break
case Dialogs.OK_BUTTON:
var functionToCall = function() {
$(dialogId).ocdialog('close')
if (callback !== undefined) {
callback()
}
}
buttonlist[0] = {
text: t('core', 'OK'),
click: functionToCall,
defaultButton: true
}
case Dialogs.OK_BUTTONS:
buttonList.push({
label: buttons?.confirm ?? t('core', 'OK'),
type: 'primary',
callback: () => {
callback._clicked = true
callback(true)
},
})
break
default:
if (typeof(buttons) === 'object') {
switch (buttons.type) {
case Dialogs.YES_NO_BUTTONS:
buttonlist = [{
text: buttons.cancel || t('core', 'No'),
click: function() {
if (callback !== undefined) {
callback(false)
}
$(dialogId).ocdialog('close')
}
},
{
text: buttons.confirm || t('core', 'Yes'),
click: function() {
if (callback !== undefined) {
callback(true)
}
$(dialogId).ocdialog('close')
},
defaultButton: true,
classes: buttons.confirmClasses
}]
break
}
}
console.error('Invalid call to OC.dialogs')
break
}
$(dialogId).ocdialog({
closeOnEscape: true,
closeCallback: () => { callback && callback(false) },
modal: modal,
buttons: buttonlist
})
Dialogs.dialogsCounter++
})
.fail(function(status, error) {
// If the method is called while navigating away from
// the page, we still want to deliver the message.
if (status === 0) {
alert(title + ': ' + content)
} else {
alert(t('core', 'Error loading message template: {error}', { error: error }))
}
})
}
return buttonList
},
_fileexistsshown: false,
/**
* Displays file exists dialog
@ -831,22 +807,6 @@ const Dialogs = {
return dialogDeferred.promise()
},
_getMessageTemplate: function() {
var defer = $.Deferred()
if (!this.$messageTemplate) {
var self = this
$.get(OC.filePath('core', 'templates', 'message.html'), function(tmpl) {
self.$messageTemplate = $(tmpl)
defer.resolve(self.$messageTemplate)
})
.fail(function(jqXHR, textStatus, errorThrown) {
defer.reject(jqXHR.status, errorThrown)
})
} else {
defer.resolve(this.$messageTemplate)
}
return defer.promise()
},
_getFileExistsTemplate: function() {
var defer = $.Deferred()
if (!this.$fileexistsTemplate) {

@ -0,0 +1,107 @@
<template>
<NcDialog dialog-classes="legacy-prompt__dialog"
:buttons="buttons"
:name="name"
@update:open="$emit('close', false, inputValue)">
<p class="legacy-prompt__text" v-text="text" />
<NcPasswordField v-if="isPassword"
ref="input"
autocomplete="new-password"
class="legacy-prompt__input"
:label="name"
:name="inputName"
:value.sync="inputValue" />
<NcTextField v-else
ref="input"
class="legacy-prompt__input"
:label="name"
:name="inputName"
:value.sync="inputValue" />
</NcDialog>
</template>
<script lang="ts">
import { translate as t } from '@nextcloud/l10n'
import { defineComponent } from 'vue'
import NcDialog from '@nextcloud/vue/dist/Components/NcDialog.js'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
export default defineComponent({
name: 'LegacyDialogPrompt',
components: {
NcDialog,
NcTextField,
NcPasswordField,
},
props: {
name: {
type: String,
required: true,
},
text: {
type: String,
required: true,
},
isPassword: {
type: Boolean,
required: true,
},
inputName: {
type: String,
default: 'prompt-input',
},
},
emits: ['close'],
data() {
return {
inputValue: '',
}
},
computed: {
buttons() {
return [
{
label: t('core', 'No'),
callback: () => this.$emit('close', false, this.inputValue),
},
{
label: t('core', 'Yes'),
type: 'primary',
callback: () => this.$emit('close', true, this.inputValue),
},
]
},
},
mounted() {
this.$nextTick(() => this.$refs.input?.focus?.())
},
})
</script>
<style scoped lang="scss">
.legacy-prompt {
&__text {
margin-block: 0 .75em;
}
&__input {
margin-block: 0 1em;
}
}
:deep(.legacy-prompt__dialog .dialog__actions) {
min-width: calc(100% - 12px);
justify-content: space-between;
}
</style>

@ -1,3 +0,0 @@
<div id="{dialog_name}" title="{title} ">
<p><span class="ui-icon ui-icon-{type}"></span>{message}</p>
</div>

@ -127,7 +127,7 @@ describe('Settings: Create and delete accounts', function() {
// The "Delete account" action in the actions menu is shown and clicked
cy.get('.action-item__popper .action').contains('Delete account').should('exist').click({ force: true })
// And confirmation dialog accepted
cy.get('.oc-dialog button').contains(`Delete ${testUser.userId}`).click({ force: true })
cy.get('.nc-generic-dialog button').contains(`Delete ${testUser.userId}`).click({ force: true })
// Make sure no confirmation modal is shown
handlePasswordConfirmation(admin.password)

2
dist/1689-1689.js vendored

@ -0,0 +1,2 @@
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[1689],{20440:(t,e,n)=>{n.d(e,{A:()=>i});var a=n(71354),l=n.n(a),o=n(76314),s=n.n(o)()(l());s.push([t.id,".legacy-prompt__text[data-v-6dd2f36f]{margin-block:0 .75em}.legacy-prompt__input[data-v-6dd2f36f]{margin-block:0 1em}[data-v-6dd2f36f] .legacy-prompt__dialog .dialog__actions{min-width:calc(100% - 12px);justify-content:space-between}","",{version:3,sources:["webpack://./core/src/components/LegacyDialogPrompt.vue"],names:[],mappings:"AAEC,sCACC,oBAAA,CAGD,uCACC,kBAAA,CAIF,0DACC,2BAAA,CACA,6BAAA",sourcesContent:["\n.legacy-prompt {\n\t&__text {\n\t\tmargin-block: 0 .75em;\n\t}\n\n\t&__input {\n\t\tmargin-block: 0 1em;\n\t}\n}\n\n:deep(.legacy-prompt__dialog .dialog__actions) {\n\tmin-width: calc(100% - 12px);\n\tjustify-content: space-between;\n}\n"],sourceRoot:""}]);const i=s},21689:(t,e,n)=>{n.r(e),n.d(e,{default:()=>h});var a=n(53334),l=n(85471),o=n(94219),s=n(82182),i=n(16044);const p=(0,l.pM)({name:"LegacyDialogPrompt",components:{NcDialog:o.A,NcTextField:s.A,NcPasswordField:i.A},props:{name:{type:String,required:!0},text:{type:String,required:!0},isPassword:{type:Boolean,required:!0},inputName:{type:String,default:"prompt-input"}},emits:["close"],data:()=>({inputValue:""}),computed:{buttons(){return[{label:(0,a.Tl)("core","No"),callback:()=>this.$emit("close",!1,this.inputValue)},{label:(0,a.Tl)("core","Yes"),type:"primary",callback:()=>this.$emit("close",!0,this.inputValue)}]}},mounted(){this.$nextTick((()=>{var t,e;return null===(t=this.$refs.input)||void 0===t||null===(e=t.focus)||void 0===e?void 0:e.call(t)}))}});var u=n(85072),c=n.n(u),r=n(97825),d=n.n(r),m=n(77659),A=n.n(m),g=n(55056),_=n.n(g),f=n(10540),y=n.n(f),b=n(41113),C=n.n(b),v=n(20440),x={};x.styleTagTransform=C(),x.setAttributes=_(),x.insert=A().bind(null,"head"),x.domAPI=d(),x.insertStyleElement=y(),c()(v.A,x),v.A&&v.A.locals&&v.A.locals;const h=(0,n(14486).A)(p,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcDialog",{attrs:{"dialog-classes":"legacy-prompt__dialog",buttons:t.buttons,name:t.name},on:{"update:open":function(e){return t.$emit("close",!1,t.inputValue)}}},[e("p",{staticClass:"legacy-prompt__text",domProps:{textContent:t._s(t.text)}}),t._v(" "),t.isPassword?e("NcPasswordField",{ref:"input",staticClass:"legacy-prompt__input",attrs:{autocomplete:"new-password",label:t.name,name:t.inputName,value:t.inputValue},on:{"update:value":function(e){t.inputValue=e}}}):e("NcTextField",{ref:"input",staticClass:"legacy-prompt__input",attrs:{label:t.name,name:t.inputName,value:t.inputValue},on:{"update:value":function(e){t.inputValue=e}}})],1)}),[],!1,null,"6dd2f36f",null).exports}}]);
//# sourceMappingURL=1689-1689.js.map?v=0232a38fce31b40e36da

File diff suppressed because one or more lines are too long

4
dist/4997-4997.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
dist/7185-7185.js vendored

File diff suppressed because one or more lines are too long

@ -87,6 +87,28 @@
*
*/
/**
* @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>
*
* @author Ferdinand Thiessen <opensource@fthiessen.de>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>
*
@ -152,3 +174,24 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de>
*
* @author Ferdinand Thiessen <opensource@fthiessen.de>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

File diff suppressed because one or more lines are too long

3
dist/7560-7560.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
dist/8618-8618.js vendored

@ -1,3 +0,0 @@
/*! For license information please see 8618-8618.js.LICENSE.txt */
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[8618],{68618:(e,c,l)=>{l.d(c,{FilePickerVue:()=>n});const n=(0,l(85471).$V)((()=>Promise.all([l.e(4208),l.e(7560)]).then(l.bind(l,26182))))}}]);
//# sourceMappingURL=8618-8618.js.map?v=d30d39583cd1936d2676

3
dist/9891-9891.js vendored

@ -0,0 +1,3 @@
/*! For license information please see 9891-9891.js.LICENSE.txt */
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[9891],{49891:(e,c,l)=>{l.d(c,{FilePickerVue:()=>n});const n=(0,l(85471).$V)((()=>Promise.all([l.e(4208),l.e(7185)]).then(l.bind(l,1431))))}}]);
//# sourceMappingURL=9891-9891.js.map?v=11f7c532881a4e9da7b7

@ -1 +1 @@
{"version":3,"file":"8618-8618.js?v=d30d39583cd1936d2676","mappings":";oIAsBA,MAAMA,GAAI,gBAAE,IAAM","sources":["webpack:///nextcloud/node_modules/@nextcloud/dialogs/dist/chunks/index-RkOaxczZ.mjs"],"sourcesContent":["import { defineAsyncComponent as e } from \"vue\";\n/**\n * @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst i = e(() => import(\"./FilePicker-DBGB1Rec.mjs\"));\nexport {\n i as FilePickerVue\n};\n"],"names":["i"],"sourceRoot":""}
{"version":3,"file":"9891-9891.js?v=11f7c532881a4e9da7b7","mappings":";oIAsBA,MAAMA,GAAI,gBAAE,IAAM","sources":["webpack:///nextcloud/node_modules/@nextcloud/dialogs/dist/chunks/index-CwXnUkoV.mjs"],"sourcesContent":["import { defineAsyncComponent as e } from \"vue\";\n/**\n * @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst i = e(() => import(\"./FilePicker-DM4uLuEW.mjs\"));\nexport {\n i as FilePickerVue\n};\n"],"names":["i"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/core-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,3 +1,3 @@
/*! For license information please see files-search.js.LICENSE.txt */
(()=>{"use strict";var e,t,r,i={66747:(e,t,r)=>{var i=r(61338),o=r(85168),a=r(63814),n=r(53334);const l=(0,r(53529).YK)().setApp("files").detectUser().build();r(18205),document.addEventListener("DOMContentLoaded",(function(){const e=window.OCA;e.UnifiedSearch&&(l.info("Initializing unified search plugin: folder search from files app"),e.UnifiedSearch.registerFilterAction({id:"files",appId:"files",label:(0,n.Tl)("files","In folder"),icon:(0,a.d0)("files","app.svg"),callback:()=>{(0,o.a1)("Pick plain text files").addMimeTypeFilter("httpd/unix-directory").allowDirectories(!0).addButton({label:"Pick",callback:e=>{l.info("Folder picked",{folder:e[0]});const t=e[0];(0,i.Ic)("nextcloud:unified-search:add-filter",{id:"files",payload:t,filterUpdateText:(0,n.Tl)("files","Search in folder: {folder}",{folder:t.basename}),filterParams:{path:t.path}})}}).build().pick()}}))}))},63710:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27%20style=%27fill-opacity:1;fill:%23ffffff%27/%3e%3c/svg%3e"},57273:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27/%3e%3c/svg%3e"}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=i,e=[],a.O=(t,r,i,o)=>{if(!r){var n=1/0;for(s=0;s<e.length;s++){r=e[s][0],i=e[s][1],o=e[s][2];for(var l=!0,d=0;d<r.length;d++)(!1&o||n>=o)&&Object.keys(a.O).every((e=>a.O[e](r[d])))?r.splice(d--,1):(l=!1,o<n&&(n=o));if(l){e.splice(s--,1);var c=i();void 0!==c&&(t=c)}}return t}o=o||0;for(var s=e.length;s>0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[r,i,o]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,r)=>(a.f[r](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{7560:"0790505c8180845d6197",8618:"d30d39583cd1936d2676"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="nextcloud:",a.l=(e,i,o,n)=>{if(t[e])t[e].push(i);else{var l,d;if(void 0!==o)for(var c=document.getElementsByTagName("script"),s=0;s<c.length;s++){var f=c[s];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==r+o){l=f;break}}l||(d=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",r+o),l.src=e),t[e]=[i];var p=(r,i)=>{l.onerror=l.onload=null,clearTimeout(u);var o=t[e];if(delete t[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(i))),r)return r(i)},u=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),d&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=2277,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={2277:0};a.f.j=(t,r)=>{var i=a.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise(((r,o)=>i=e[t]=[r,o]));r.push(i[2]=o);var n=a.p+a.u(t),l=new Error;a.l(n,(r=>{if(a.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",l.name="ChunkLoadError",l.type=o,l.request=n,i[1](l)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,r)=>{var i,o,n=r[0],l=r[1],d=r[2],c=0;if(n.some((t=>0!==e[t]))){for(i in l)a.o(l,i)&&(a.m[i]=l[i]);if(d)var s=d(a)}for(t&&t(r);c<n.length;c++)o=n[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(s)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),a.nc=void 0;var n=a.O(void 0,[4208],(()=>a(66747)));n=a.O(n)})();
//# sourceMappingURL=files-search.js.map?v=36b74aa1cdb507f54579
(()=>{"use strict";var e,t,r,i={66747:(e,t,r)=>{var i=r(61338),o=r(85168),a=r(63814),n=r(53334);const l=(0,r(53529).YK)().setApp("files").detectUser().build();r(18205),document.addEventListener("DOMContentLoaded",(function(){const e=window.OCA;e.UnifiedSearch&&(l.info("Initializing unified search plugin: folder search from files app"),e.UnifiedSearch.registerFilterAction({id:"files",appId:"files",label:(0,n.Tl)("files","In folder"),icon:(0,a.d0)("files","app.svg"),callback:()=>{(0,o.a1)("Pick plain text files").addMimeTypeFilter("httpd/unix-directory").allowDirectories(!0).addButton({label:"Pick",callback:e=>{l.info("Folder picked",{folder:e[0]});const t=e[0];(0,i.Ic)("nextcloud:unified-search:add-filter",{id:"files",payload:t,filterUpdateText:(0,n.Tl)("files","Search in folder: {folder}",{folder:t.basename}),filterParams:{path:t.path}})}}).build().pick()}}))}))},63710:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27%20style=%27fill-opacity:1;fill:%23ffffff%27/%3e%3c/svg%3e"},57273:e=>{e.exports="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20height=%2716%27%20width=%2716%27%3e%3cpath%20d=%27M14%2012.3L12.3%2014%208%209.7%203.7%2014%202%2012.3%206.3%208%202%203.7%203.7%202%208%206.3%2012.3%202%2014%203.7%209.7%208z%27/%3e%3c/svg%3e"}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=i,e=[],a.O=(t,r,i,o)=>{if(!r){var n=1/0;for(s=0;s<e.length;s++){r=e[s][0],i=e[s][1],o=e[s][2];for(var l=!0,d=0;d<r.length;d++)(!1&o||n>=o)&&Object.keys(a.O).every((e=>a.O[e](r[d])))?r.splice(d--,1):(l=!1,o<n&&(n=o));if(l){e.splice(s--,1);var c=i();void 0!==c&&(t=c)}}return t}o=o||0;for(var s=e.length;s>0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[r,i,o]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,r)=>(a.f[r](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{7185:"b79c7c2acc395c431d45",9891:"11f7c532881a4e9da7b7"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="nextcloud:",a.l=(e,i,o,n)=>{if(t[e])t[e].push(i);else{var l,d;if(void 0!==o)for(var c=document.getElementsByTagName("script"),s=0;s<c.length;s++){var f=c[s];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==r+o){l=f;break}}l||(d=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",r+o),l.src=e),t[e]=[i];var p=(r,i)=>{l.onerror=l.onload=null,clearTimeout(u);var o=t[e];if(delete t[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(i))),r)return r(i)},u=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),d&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=2277,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={2277:0};a.f.j=(t,r)=>{var i=a.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise(((r,o)=>i=e[t]=[r,o]));r.push(i[2]=o);var n=a.p+a.u(t),l=new Error;a.l(n,(r=>{if(a.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",l.name="ChunkLoadError",l.type=o,l.request=n,i[1](l)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,r)=>{var i,o,n=r[0],l=r[1],d=r[2],c=0;if(n.some((t=>0!==e[t]))){for(i in l)a.o(l,i)&&(a.m[i]=l[i]);if(d)var s=d(a)}for(t&&t(r);c<n.length;c++)o=n[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(s)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),a.nc=void 0;var n=a.O(void 0,[4208],(()=>a(66747)));n=a.O(n)})();
//# sourceMappingURL=files-search.js.map?v=b92c5b9b18a5d7b52120

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1193
package-lock.json generated

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save