From cb73fe26b818cfdb8fbf07116cd8e970a9cdc708 Mon Sep 17 00:00:00 2001 From: John Molakvoæ Date: Tue, 10 May 2022 17:23:05 +0200 Subject: Compile theming MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- dist/core-main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dist/core-main.js') diff --git a/dist/core-main.js b/dist/core-main.js index 422f7c77dc4..a16747e6af3 100644 --- a/dist/core-main.js +++ b/dist/core-main.js @@ -1,3 +1,3 @@ /*! For license information please see core-main.js.LICENSE.txt */ -!function(){var e,i={6772:function(){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})},97782:function(){if("undefined"==typeof console||void 0===console.log){window.console||(window.console={});for(var e=function(){},t=["log","debug","warn","info","error","assert","time","timeEnd"],n=0;n").join(">").split('"').join(""").split("'").join("'")}(e),t);return n.toastElement.toastify=n,c()(n.toastElement)},showUpdate:function(e){return this.updatableNotification&&this.updatableNotification.hideToast(),this.updatableNotification=(0,g.PV)(e,{timeout:g.Rl}),this.updatableNotification.toastElement.toastify=this.updatableNotification,c()(this.updatableNotification.toastElement)},showTemporary:function(e,t){(t=t||{}).timeout=t.timeout||g.TN;var n=(0,g.PV)(e,t);return n.toastElement.toastify=n,c()(n.toastElement)},isHidden:function(){return!c()("#content").find(".toastify").length}},m=h.default.throttle((function(){A.showTemporary(t("core","Connection to server lost"))}),7e3,{trailing:!1}),v=!1,w={enableDynamicSlideToggle:function(){v=!0},showAppSidebar:function(e){(e||c()("#app-sidebar")).removeClass("disappear").show(),c()("#app-content").trigger(new(c().Event)("appresized"))},hideAppSidebar:function(e){(e||c()("#app-sidebar")).hide().addClass("disappear"),c()("#app-content").trigger(new(c().Event)("appresized"))}};function C(e,t,n){"post"!==e&&"delete"!==e||!Ge.PasswordConfirmation.requiresPasswordConfirmation()?(n=n||{},c().ajax({type:e.toUpperCase(),url:(0,d.generateOcsUrl)("apps/provisioning_api/api/v1/config/apps")+t,data:n.data||{},success:n.success,error:n.error})):Ge.PasswordConfirmation.requirePasswordConfirmation(_.bind(C,this,e,t,n))}function b(e){C("get","",e)}function y(e,t){C("get","/"+e,t)}function k(e,t,n,i){(i=i||{}).data={defaultValue:n},C("get","/"+e+"/"+t,i)}function x(e,t,n,i){(i=i||{}).data={value:n},C("post","/"+e+"/"+t,i)}function E(e,t,n){C("delete","/"+e+"/"+t,n)}var P=window.oc_appconfig||{},B={getValue:function(e,t,n,i){k(e,t,n,{success:i})},setValue:function(e,t,n){x(e,t,n)},getApps:function(e){b({success:e})},getKeys:function(e,t){y(e,{success:t})},deleteKey:function(e,t){E(e,t)}},O=void 0!==window._oc_appswebroots&&window._oc_appswebroots,T=o(72316),j=o.n(T),I=o(87240),D={create:"POST",update:"PROPPATCH",patch:"PROPPATCH",delete:"DELETE",read:"PROPFIND"};function z(e,t){if(h.default.isArray(e))return h.default.map(e,(function(e){return z(e,t)}));var n={href:e.href};return h.default.each(e.propStat,(function(e){if("HTTP/1.1 200 OK"===e.status)for(var i in e.properties){var o=i;i in t&&(o=t[i]),n[o]=e.properties[i]}})),n.id||(n.id=N(n.href)),n}function N(e){var t=e.indexOf("?");t>0&&(e=e.substr(0,t));var n,i=e.split("/");do{n=i[i.length-1],i.pop()}while(!n&&i.length>0);return n}function S(e){return e>=200&&e<=299}function M(e,t,n,i){return e.propPatch(t.url,function(e,t){var n,i={};for(n in e){var o=t[n],a=e[n];o||(console.warn('No matching DAV property for property "'+n),o=n),(h.default.isBoolean(a)||h.default.isNumber(a))&&(a=""+a),i[o]=a}return i}(n.changed,t.davProperties),i).then((function(e){S(e.status)?h.default.isFunction(t.success)&&t.success(n.toJSON()):h.default.isFunction(t.error)&&t.error(e)}))}var U=j().noConflict();Object.assign(U,{davCall:function(e,t){var n=new I.dav.Client({baseUrl:e.url,xmlNamespaces:h.default.extend({"DAV:":"d","http://owncloud.org/ns":"oc"},e.xmlNamespaces||{})});n.resolveUrl=function(){return e.url};var i=h.default.extend({"X-Requested-With":"XMLHttpRequest",requesttoken:OC.requestToken},e.headers);return"PROPFIND"===e.type?function(e,t,n,i){return e.propFind(t.url,h.default.values(t.davProperties)||[],t.depth,i).then((function(e){if(S(e.status)){if(h.default.isFunction(t.success)){var n=h.default.invert(t.davProperties),i=z(e.body,n);t.depth>0&&i.shift(),t.success(i)}}else h.default.isFunction(t.error)&&t.error(e)}))}(n,e,0,i):"PROPPATCH"===e.type?M(n,e,t,i):"MKCOL"===e.type?function(e,t,n,i){return e.request(t.type,t.url,i,null).then((function(o){S(o.status)?M(e,t,n,i):h.default.isFunction(t.error)&&t.error(o)}))}(n,e,t,i):function(e,t,n,i){return i["Content-Type"]="application/json",e.request(t.type,t.url,i,t.data).then((function(e){if(S(e.status)){if(h.default.isFunction(t.success)){if("PUT"===t.type||"POST"===t.type||"MKCOL"===t.type){var i=e.body||n.toJSON(),o=e.xhr.getResponseHeader("Content-Location");return"POST"===t.type&&o&&(i.id=N(o)),void t.success(i)}if(207===e.status){var a=h.default.invert(t.davProperties);t.success(z(e.body,a))}else t.success(e.body)}}else h.default.isFunction(t.error)&&t.error(e)}))}(n,e,t,i)},davSync:function(e){return function(t,n,i){var o={type:D[t]||t},a=n instanceof e.Collection;if("update"===t&&(n.hasInnerCollection?o.type="MKCOL":(n.usePUT||n.collection&&n.collection.usePUT)&&(o.type="PUT")),i.url||(o.url=h.default.result(n,"url")||function(){throw new Error('A "url" property or function must be specified')}()),null!=i.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(o.data=JSON.stringify(i.attrs||n.toJSON(i))),"PROPFIND"!==o.type&&(o.processData=!1),"PROPFIND"===o.type||"PROPPATCH"===o.type){var r=n.davProperties;!r&&n.model&&(r=n.model.prototype.davProperties),r&&(h.default.isFunction(r)?o.davProperties=r.call(n):o.davProperties=r),o.davProperties=h.default.extend(o.davProperties||{},i.davProperties),h.default.isUndefined(i.depth)&&(i.depth=a?1:0)}var s=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,s&&s.call(i.context,e,t,n)};var l=i.xhr=e.davCall(h.default.extend(o,i),n);return n.trigger("request",n,l,i),l}}(U)});var L=U,F=o(76632),R=window._oc_config||{},Q=T.Model.extend({defaults:{fullName:"",lastMessage:"",actions:[],hasOneAction:!1,hasTwoActions:!1,hasManyActions:!1},initialize:function(){0===this.get("actions").length?this.set("hasOneAction",!0):1===this.get("actions").length?(this.set("hasTwoActions",!0),this.set("secondAction",this.get("actions")[0])):this.set("hasManyActions",!0)}}),G=T.Collection.extend({model:Q}),H=T.View.extend({_collection:void 0,_subViews:[],initialize:function(e){this._collection=e.collection},render:function(){var e=this;return e.$el.html(""),e._subViews=[],e._collection.forEach((function(t){var n=new K({model:t});n.render(),e.$el.append(n.$el),n.on("toggle:actionmenu",e._onChildActionMenuToggle,e),e._subViews.push(n)})),e},_onChildActionMenuToggle:function(e){this._subViews.forEach((function(t){t.trigger("parent:toggle:actionmenu",e)}))}}),K=T.View.extend({className:"contact",_template:void 0,_model:void 0,_actionMenuShown:!1,events:{"click .icon-more":"_onToggleActionsMenu"},contactTemplate:o(10944),template:function(e){return this.contactTemplate(e)},initialize:function(e){this._model=e.model,this.on("parent:toggle:actionmenu",this._onOtherActionMenuOpened,this)},render:function(){return this.$el.html(this.template({contact:this._model.toJSON()})),this.delegateEvents(),this.$("div.avatar").imageplaceholder(this._model.get("fullName")),this.$(".top-action").tooltip({placement:"left"}),this.$(".second-action").tooltip({placement:"left"}),this},_onToggleActionsMenu:function(){this._actionMenuShown=!this._actionMenuShown,this._actionMenuShown?this.$(".menu").show():this.$(".menu").hide(),this.trigger("toggle:actionmenu",this.$el)},_onOtherActionMenuOpened:function(e){this.$el.is(e)||(this._actionMenuShown=!1,this.$(".menu").hide())}}),Y=T.View.extend({_loadingTemplate:void 0,_errorTemplate:void 0,_contentTemplate:void 0,_contactsTemplate:void 0,_contacts:void 0,_searchTerm:"",events:{"input #contactsmenu-search":"_onSearch"},templates:{loading:o(95386),error:o(20421),menu:o(66115),list:o(34083)},_onSearch:h.default.debounce((function(e){var t=this.$("#contactsmenu-search").val();t!==this._searchTerm&&(this.trigger("search",this.$("#contactsmenu-search").val()),this._searchTerm=t)}),700),loadingTemplate:function(e){return this.templates.loading(e)},errorTemplate:function(e){return this.templates.error(h.default.extend({couldNotLoadText:t("core","Could not load your contacts")},e))},contentTemplate:function(e){return this.templates.menu(h.default.extend({searchContactsText:t("core","Search contacts …")},e))},contactsTemplate:function(e){return this.templates.list(h.default.extend({noContactsFoundText:t("core","No contacts found"),showAllContactsText:t("core","Show all contacts …"),contactsAppMgmtText:t("core","Install the Contacts app")},e))},initialize:function(e){this.options=e},showLoading:function(e){this.render(),this._contacts=void 0,this.$(".content").html(this.loadingTemplate({loadingText:e}))},showError:function(){this.render(),this._contacts=void 0,this.$(".content").html(this.errorTemplate())},showContacts:function(e,t){this._contacts=e.contacts,this.render({contacts:e.contacts});var n=new H({collection:e.contacts});n.render(),this.$(".content").html(this.contactsTemplate({contacts:e.contacts,searchTerm:t,contactsAppEnabled:e.contactsAppEnabled,contactsAppURL:Ge.generateUrl("/apps/contacts"),canInstallApp:Ge.isUserAdmin(),contactsAppMgmtURL:Ge.generateUrl("/settings/apps/social/contacts")})),this.$("#contactsmenu-contacts").html(n.$el)},render:function(e){var t=this.$("#contactsmenu-search").val();return this.$el.html(this.contentTemplate(e)),this.$("#contactsmenu-search").val(t),this.$("#contactsmenu-search").focus(),this}}),q=function(e){this.initialize(e)};q.prototype={$el:void 0,_$trigger:void 0,_view:void 0,_contactsPromise:void 0,initialize:function(e){this.$el=e.el,this._$trigger=e.trigger,this._view=new Y({el:this.$el}),this._view.on("search",(function(e){this._loadContacts(e)}),this),Ge.registerMenu(this._$trigger,this.$el,function(){this._toggleVisibility(!0)}.bind(this),!0),this.$el.on("beforeHide",function(){this._toggleVisibility(!1)}.bind(this))},_toggleVisibility:function(e){return e?this._loadContacts():(this.$el.html(""),Promise.resolve())},_getContacts:function(e){var t=Ge.generateUrl("/contactsmenu/contacts");return Promise.resolve(c().ajax(t,{method:"POST",data:{filter:e}}))},_loadContacts:function(e){var n=this;return n._contactsPromise||(n._contactsPromise=n._getContacts(e)),h.default.isUndefined(e)||""===e?n._view.showLoading(t("core","Loading your contacts …")):n._view.showLoading(t("core","Looking for {term} …",{term:e})),n._contactsPromise.then((function(t){t.contacts=new G(t.contacts),n._view.showContacts(t,e)}),(function(e){n._view.showError(),console.error("There was an error loading your contacts",e)})).then((function(){delete n._contactsPromise})).catch(console.error.bind(this))}};var W=q,J=document.getElementsByTagName("head")[0].getAttribute("data-user"),V=document.getElementsByTagName("head")[0].getAttribute("data-user-displayname"),Z=void 0!==J&&J;function X(e,t){for(var n=0;n");f.attr("type",r?"password":"text").attr("id",l+"-input").attr("placeholder",a);var p=c()("