summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-25 18:19:42 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-10-01 17:16:09 +0200
commitb9bc2417e7a8dc81feb0abe20359bedaf864f790 (patch)
tree61b47fbf37c1d168da8625224debde9e6a985348 /apps/files_sharing
parent7fb651235128dcbca8a6683b5cdafdf835f46300 (diff)
downloadnextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.tar.gz
nextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.zip
Comply to eslint
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/.eslintrc.js22
-rw-r--r--apps/files_sharing/js/app.js210
-rw-r--r--apps/files_sharing/js/dist/additionalScripts.js4
-rw-r--r--apps/files_sharing/js/dist/additionalScripts.js.map2
-rw-r--r--apps/files_sharing/js/dist/collaboration.js2
-rw-r--r--apps/files_sharing/js/dist/collaboration.js.map2
-rw-r--r--apps/files_sharing/js/dist/files_sharing.4.js8
-rw-r--r--apps/files_sharing/js/dist/files_sharing.4.js.map2
-rw-r--r--apps/files_sharing/js/dist/files_sharing.js.map2
-rw-r--r--apps/files_sharing/js/sharedfilelist.js670
-rw-r--r--apps/files_sharing/src/additionalScripts.js10
-rw-r--r--apps/files_sharing/src/collaborationresources.js26
-rw-r--r--apps/files_sharing/src/collaborationresourceshandler.js22
-rw-r--r--apps/files_sharing/src/files_sharing.js10
-rw-r--r--apps/files_sharing/src/share.js219
-rw-r--r--apps/files_sharing/src/sharebreadcrumbview.js64
-rw-r--r--apps/files_sharing/src/sharetabview.js129
-rw-r--r--apps/files_sharing/src/views/CollaborationView.vue19
18 files changed, 702 insertions, 721 deletions
diff --git a/apps/files_sharing/.eslintrc.js b/apps/files_sharing/.eslintrc.js
deleted file mode 100644
index 214cccecd84..00000000000
--- a/apps/files_sharing/.eslintrc.js
+++ /dev/null
@@ -1,22 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es6: true
- },
- globals: {
- t: true,
- n: true,
- OC: true,
- OCA: true
- },
- extends: 'eslint:recommended',
- parserOptions: {
- sourceType: 'module'
- },
- rules: {
- indent: ['error', 'tab'],
- 'linebreak-style': ['error', 'unix'],
- quotes: ['error', 'single'],
- semi: ['error', 'always']
- }
-};
diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js
index b6ca71e15d1..29cd3385c3a 100644
--- a/apps/files_sharing/js/app.js
+++ b/apps/files_sharing/js/app.js
@@ -12,7 +12,7 @@ if (!OCA.Sharing) {
/**
* @namespace OCA.Sharing
*/
- OCA.Sharing = {};
+ OCA.Sharing = {}
}
/**
* @namespace
@@ -25,7 +25,7 @@ OCA.Sharing.App = {
initSharingIn: function($el) {
if (this._inFileList) {
- return this._inFileList;
+ return this._inFileList
}
this._inFileList = new OCA.Sharing.FileList(
@@ -40,19 +40,19 @@ OCA.Sharing.App = {
// if handling the event with the file list already created.
shown: true
}
- );
+ )
- this._extendFileList(this._inFileList);
- this._inFileList.appName = t('files_sharing', 'Shared with you');
- this._inFileList.$el.find('#emptycontent').html('<div class="icon-shared"></div>' +
- '<h2>' + t('files_sharing', 'Nothing shared with you yet') + '</h2>' +
- '<p>' + t('files_sharing', 'Files and folders others share with you will show up here') + '</p>');
- return this._inFileList;
+ this._extendFileList(this._inFileList)
+ this._inFileList.appName = t('files_sharing', 'Shared with you')
+ this._inFileList.$el.find('#emptycontent').html('<div class="icon-shared"></div>'
+ + '<h2>' + t('files_sharing', 'Nothing shared with you yet') + '</h2>'
+ + '<p>' + t('files_sharing', 'Files and folders others share with you will show up here') + '</p>')
+ return this._inFileList
},
initSharingOut: function($el) {
if (this._outFileList) {
- return this._outFileList;
+ return this._outFileList
}
this._outFileList = new OCA.Sharing.FileList(
$el,
@@ -66,19 +66,19 @@ OCA.Sharing.App = {
// if handling the event with the file list already created.
shown: true
}
- );
+ )
- this._extendFileList(this._outFileList);
- this._outFileList.appName = t('files_sharing', 'Shared with others');
- this._outFileList.$el.find('#emptycontent').html('<div class="icon-shared"></div>' +
- '<h2>' + t('files_sharing', 'Nothing shared yet') + '</h2>' +
- '<p>' + t('files_sharing', 'Files and folders you share will show up here') + '</p>');
- return this._outFileList;
+ this._extendFileList(this._outFileList)
+ this._outFileList.appName = t('files_sharing', 'Shared with others')
+ this._outFileList.$el.find('#emptycontent').html('<div class="icon-shared"></div>'
+ + '<h2>' + t('files_sharing', 'Nothing shared yet') + '</h2>'
+ + '<p>' + t('files_sharing', 'Files and folders you share will show up here') + '</p>')
+ return this._outFileList
},
initSharingLinks: function($el) {
if (this._linkFileList) {
- return this._linkFileList;
+ return this._linkFileList
}
this._linkFileList = new OCA.Sharing.FileList(
$el,
@@ -92,19 +92,19 @@ OCA.Sharing.App = {
// if handling the event with the file list already created.
shown: true
}
- );
+ )
- this._extendFileList(this._linkFileList);
- this._linkFileList.appName = t('files_sharing', 'Shared by link');
- this._linkFileList.$el.find('#emptycontent').html('<div class="icon-public"></div>' +
- '<h2>' + t('files_sharing', 'No shared links') + '</h2>' +
- '<p>' + t('files_sharing', 'Files and folders you share by link will show up here') + '</p>');
- return this._linkFileList;
+ this._extendFileList(this._linkFileList)
+ this._linkFileList.appName = t('files_sharing', 'Shared by link')
+ this._linkFileList.$el.find('#emptycontent').html('<div class="icon-public"></div>'
+ + '<h2>' + t('files_sharing', 'No shared links') + '</h2>'
+ + '<p>' + t('files_sharing', 'Files and folders you share by link will show up here') + '</p>')
+ return this._linkFileList
},
initSharingDeleted: function($el) {
if (this._deletedFileList) {
- return this._deletedFileList;
+ return this._deletedFileList
}
this._deletedFileList = new OCA.Sharing.FileList(
$el,
@@ -119,19 +119,19 @@ OCA.Sharing.App = {
// if handling the event with the file list already created.
shown: true
}
- );
+ )
- this._extendFileList(this._deletedFileList);
- this._deletedFileList.appName = t('files_sharing', 'Deleted shares');
- this._deletedFileList.$el.find('#emptycontent').html('<div class="icon-share"></div>' +
- '<h2>' + t('files_sharing', 'No deleted shares') + '</h2>' +
- '<p>' + t('files_sharing', 'Shares you deleted will show up here') + '</p>');
- return this._deletedFileList;
+ this._extendFileList(this._deletedFileList)
+ this._deletedFileList.appName = t('files_sharing', 'Deleted shares')
+ this._deletedFileList.$el.find('#emptycontent').html('<div class="icon-share"></div>'
+ + '<h2>' + t('files_sharing', 'No deleted shares') + '</h2>'
+ + '<p>' + t('files_sharing', 'Shares you deleted will show up here') + '</p>')
+ return this._deletedFileList
},
initShareingOverview: function($el) {
if (this._overviewFileList) {
- return this._overviewFileList;
+ return this._overviewFileList
}
this._overviewFileList = new OCA.Sharing.FileList(
$el,
@@ -144,43 +144,43 @@ OCA.Sharing.App = {
// if handling the event with the file list already created.
shown: true
}
- );
+ )
- this._extendFileList(this._overviewFileList);
- this._overviewFileList.appName = t('files_sharing', 'Shares');
- this._overviewFileList.$el.find('#emptycontent').html('<div class="icon-share"></div>' +
- '<h2>' + t('files_sharing', 'No shares') + '</h2>' +
- '<p>' + t('files_sharing', 'Shares will show up here') + '</p>');
- return this._overviewFileList;
+ this._extendFileList(this._overviewFileList)
+ this._overviewFileList.appName = t('files_sharing', 'Shares')
+ this._overviewFileList.$el.find('#emptycontent').html('<div class="icon-share"></div>'
+ + '<h2>' + t('files_sharing', 'No shares') + '</h2>'
+ + '<p>' + t('files_sharing', 'Shares will show up here') + '</p>')
+ return this._overviewFileList
},
removeSharingIn: function() {
if (this._inFileList) {
- this._inFileList.$fileList.empty();
+ this._inFileList.$fileList.empty()
}
},
removeSharingOut: function() {
if (this._outFileList) {
- this._outFileList.$fileList.empty();
+ this._outFileList.$fileList.empty()
}
},
removeSharingLinks: function() {
if (this._linkFileList) {
- this._linkFileList.$fileList.empty();
+ this._linkFileList.$fileList.empty()
}
},
removeSharingDeleted: function() {
if (this._deletedFileList) {
- this._deletedFileList.$fileList.empty();
+ this._deletedFileList.$fileList.empty()
}
},
removeSharingOverview: function() {
if (this._overviewFileList) {
- this._overviewFileList.$fileList.empty();
+ this._overviewFileList.$fileList.empty()
}
},
@@ -188,46 +188,46 @@ OCA.Sharing.App = {
* Destroy the app
*/
destroy: function() {
- OCA.Files.fileActions.off('setDefault.app-sharing', this._onActionsUpdated);
- OCA.Files.fileActions.off('registerAction.app-sharing', this._onActionsUpdated);
- this.removeSharingIn();
- this.removeSharingOut();
- this.removeSharingLinks();
- this._inFileList = null;
- this._outFileList = null;
- this._linkFileList = null;
- this._overviewFileList = null;
- delete this._globalActionsInitialized;
+ OCA.Files.fileActions.off('setDefault.app-sharing', this._onActionsUpdated)
+ OCA.Files.fileActions.off('registerAction.app-sharing', this._onActionsUpdated)
+ this.removeSharingIn()
+ this.removeSharingOut()
+ this.removeSharingLinks()
+ this._inFileList = null
+ this._outFileList = null
+ this._linkFileList = null
+ this._overviewFileList = null
+ delete this._globalActionsInitialized
},
_createFileActions: function() {
// inherit file actions from the files app
- var fileActions = new OCA.Files.FileActions();
+ var fileActions = new OCA.Files.FileActions()
// note: not merging the legacy actions because legacy apps are not
// compatible with the sharing overview and need to be adapted first
- fileActions.registerDefaultActions();
- fileActions.merge(OCA.Files.fileActions);
+ fileActions.registerDefaultActions()
+ fileActions.merge(OCA.Files.fileActions)
if (!this._globalActionsInitialized) {
// in case actions are registered later
- this._onActionsUpdated = _.bind(this._onActionsUpdated, this);
- OCA.Files.fileActions.on('setDefault.app-sharing', this._onActionsUpdated);
- OCA.Files.fileActions.on('registerAction.app-sharing', this._onActionsUpdated);
- this._globalActionsInitialized = true;
+ this._onActionsUpdated = _.bind(this._onActionsUpdated, this)
+ OCA.Files.fileActions.on('setDefault.app-sharing', this._onActionsUpdated)
+ OCA.Files.fileActions.on('registerAction.app-sharing', this._onActionsUpdated)
+ this._globalActionsInitialized = true
}
// when the user clicks on a folder, redirect to the corresponding
// folder in the files app instead of opening it directly
- fileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) {
- OCA.Files.App.setActiveView('files', {silent: true});
- OCA.Files.App.fileList.changeDirectory(OC.joinPaths(context.$file.attr('data-path'), filename), true, true);
- });
- fileActions.setDefault('dir', 'Open');
- return fileActions;
+ fileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename, context) {
+ OCA.Files.App.setActiveView('files', { silent: true })
+ OCA.Files.App.fileList.changeDirectory(OC.joinPaths(context.$file.attr('data-path'), filename), true, true)
+ })
+ fileActions.setDefault('dir', 'Open')
+ return fileActions
},
_restoreShareAction: function() {
- var fileActions = new OCA.Files.FileActions();
+ var fileActions = new OCA.Files.FileActions()
fileActions.registerAction({
name: 'Restore',
displayName: '',
@@ -237,70 +237,70 @@ OCA.Sharing.App = {
iconClass: 'icon-history',
type: OCA.Files.FileActions.TYPE_INLINE,
actionHandler: function(fileName, context) {
- var shareId = context.$file.data('shareId');
+ var shareId = context.$file.data('shareId')
$.post(OC.linkToOCS('apps/files_sharing/api/v1/deletedshares', 2) + shareId)
- .success(function(result) {
- context.fileList.remove(context.fileInfoModel.attributes.name);
- }).fail(function() {
- OC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to restore the share.'));
- });
+ .success(function(result) {
+ context.fileList.remove(context.fileInfoModel.attributes.name)
+ }).fail(function() {
+ OC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to restore the share.'))
+ })
}
- });
- return fileActions;
+ })
+ return fileActions
},
_onActionsUpdated: function(ev) {
_.each([this._inFileList, this._outFileList, this._linkFileList], function(list) {
if (!list) {
- return;
+ return
}
if (ev.action) {
- list.fileActions.registerAction(ev.action);
+ list.fileActions.registerAction(ev.action)
} else if (ev.defaultAction) {
list.fileActions.setDefault(
ev.defaultAction.mime,
ev.defaultAction.name
- );
+ )
}
- });
+ })
},
_extendFileList: function(fileList) {
// remove size column from summary
- fileList.fileSummary.$el.find('.filesize').remove();
+ fileList.fileSummary.$el.find('.filesize').remove()
}
-};
+}
$(document).ready(function() {
$('#app-content-sharingin').on('show', function(e) {
- OCA.Sharing.App.initSharingIn($(e.target));
- });
+ OCA.Sharing.App.initSharingIn($(e.target))
+ })
$('#app-content-sharingin').on('hide', function() {
- OCA.Sharing.App.removeSharingIn();
- });
+ OCA.Sharing.App.removeSharingIn()
+ })
$('#app-content-sharingout').on('show', function(e) {
- OCA.Sharing.App.initSharingOut($(e.target));
- });
+ OCA.Sharing.App.initSharingOut($(e.target))
+ })
$('#app-content-sharingout').on('hide', function() {
- OCA.Sharing.App.removeSharingOut();
- });
+ OCA.Sharing.App.removeSharingOut()
+ })
$('#app-content-sharinglinks').on('show', function(e) {
- OCA.Sharing.App.initSharingLinks($(e.target));
- });
+ OCA.Sharing.App.initSharingLinks($(e.target))
+ })
$('#app-content-sharinglinks').on('hide', function() {
- OCA.Sharing.App.removeSharingLinks();
- });
+ OCA.Sharing.App.removeSharingLinks()
+ })
$('#app-content-deletedshares').on('show', function(e) {
- OCA.Sharing.App.initSharingDeleted($(e.target));
- });
+ OCA.Sharing.App.initSharingDeleted($(e.target))
+ })
$('#app-content-deletedshares').on('hide', function() {
- OCA.Sharing.App.removeSharingDeleted();
- });
+ OCA.Sharing.App.removeSharingDeleted()
+ })
$('#app-content-shareoverview').on('show', function(e) {
- OCA.Sharing.App.initShareingOverview($(e.target));
- });
+ OCA.Sharing.App.initShareingOverview($(e.target))
+ })
$('#app-content-shareoverview').on('hide', function() {
- OCA.Sharing.App.removeSharingOverview();
- });
-});
+ OCA.Sharing.App.removeSharingOverview()
+ })
+})
diff --git a/apps/files_sharing/js/dist/additionalScripts.js b/apps/files_sharing/js/dist/additionalScripts.js
index 1f93f3d0954..79143ae714b 100644
--- a/apps/files_sharing/js/dist/additionalScripts.js
+++ b/apps/files_sharing/js/dist/additionalScripts.js
@@ -1,4 +1,4 @@
-!function(e){function t(t){for(var i,a,n=t[0],o=t[1],s=0,h=[];s<n.length;s++)a=n[s],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&h.push(r[a][0]),r[a]=0;for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);for(l&&l(t);h.length;)h.shift()()}var i={},r={0:0,1:0};function a(t){if(i[t])return i[t].exports;var r=i[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],i=r[e];if(0!==i)if(i)t.push(i[2]);else{var n=new Promise((function(t,a){i=r[e]=[t,a]}));t.push(i[2]=n);var o,s=document.createElement("script");s.charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.src=function(e){return a.p+"files_sharing."+e+".js?v="+{3:"12cd6bab17f9a2537bc9",4:"07d5a7a4994f0ef93170"}[e]}(e);var l=new Error;o=function(t){s.onerror=s.onload=null,clearTimeout(h);var i=r[e];if(0!==i){if(i){var a=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+a+": "+n+")",l.name="ChunkLoadError",l.type=a,l.request=n,i[1](l)}r[e]=void 0}};var h=setTimeout((function(){o({type:"timeout",target:s})}),12e4);s.onerror=s.onload=o,document.head.appendChild(s)}return Promise.all(t)},a.m=e,a.c=i,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(i,r,function(t){return e[t]}.bind(null,r));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/js/",a.oe=function(e){throw console.error(e),e};var n=window.webpackJsonpFilesSharing=window.webpackJsonpFilesSharing||[],o=n.push.bind(n);n.push=t,n=n.slice();for(var s=0;s<n.length;s++)t(n[s]);var l=o;a(a.s=3)}([function(e,i,r){r.p=OC.linkTo("files_sharing","js/dist/"),r.nc=btoa(OC.requestToken),window.OCP.Collaboration.registerType("file",{action:function(){return new Promise((function(e,i){OC.dialogs.filepicker(t("files_sharing","Link to a file"),(function(t){OC.Files.getClient().getFileInfo(t).then((function(t,i){e(i.id)})).fail((function(){i()}))}),!1,null,!1,OC.dialogs.FILEPICKER_TYPE_CHOOSE,"",{allowDirectoryChooser:!0})}))},typeString:t("files_sharing","Link to a file"),typeIconClass:"icon-files-dark"})},function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",r=e[3];if(!r)return i;if(t&&"function"==typeof btoa){var a=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),n=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot).concat(e," */")}));return[i].concat(n).concat([a]).join("\n")}var o,s,l;return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(i,"}"):i})).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var n=this[a][0];null!=n&&(r[n]=!0)}for(var o=0;o<e.length;o++){var s=e[o];null!=s[0]&&r[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="(".concat(s[2],") and (").concat(i,")")),t.push(s))}},t}},function(e,t,i){"use strict";var r,a={},n=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}();function s(e,t){for(var i=[],r={},a=0;a<e.length;a++){var n=e[a],o=t.base?n[0]+t.base:n[0],s={css:n[1],media:n[2],sourceMap:n[3]};r[o]?r[o].parts.push(s):i.push(r[o]={id:o,parts:[s]})}return i}function l(e,t){for(var i=0;i<e.length;i++){var r=e[i],n=a[r.id],o=0;if(n){for(n.refs++;o<n.parts.length;o++)n.parts[o](r.parts[o]);for(;o<r.parts.length;o++)n.parts.push(g(r.parts[o],t))}else{for(var s=[];o<r.parts.length;o++)s.push(g(r.parts[o],t));a[r.id]={id:r.id,refs:1,parts:s}}}}function h(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var r=i.nc;r&&(e.attributes.nonce=r)}if(Object.keys(e.attributes).forEach((function(i){t.setAttribute(i,e.attributes[i])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var p,d=(p=[],function(e,t){return p[e]=t,p.filter(Boolean).join("\n")});function c(e,t,i,r){var a=i?"":r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,a);else{var n=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(n,o[t]):e.appendChild(n)}}function u(e,t,i){var r=i.css,a=i.media,n=i.sourceMap;if(a&&e.setAttribute("media",a),n&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,m=0;function g(e,t){var i,r,a;if(t.singleton){var n=m++;i=f||(f=h(t)),r=c.bind(null,i,n,!1),a=c.bind(null,i,n,!0)}else i=h(t),r=u.bind(null,i,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).attributes="object"==typeof t.attributes?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=n());var i=s(e,t);return l(i,t),function(e){for(var r=[],n=0;n<i.length;n++){var o=i[n],h=a[o.id];h&&(h.refs--,r.push(h))}e&&l(s(e,t),t);for(var p=0;p<r.length;p++){var d=r[p];if(0===d.refs){for(var c=0;c<d.parts.length;c++)d.parts[c]();delete a[d.id]}}}}},function(e,t,i){"use strict";i.r(t);i(4),i(5),i(6),i(7),i(9),i(0);i.p=OC.linkTo("files_sharing","js/dist/"),i.nc=btoa(OC.requestToken),window.OCA.Sharing=OCA.Sharing},function(e,i){_.extend(OC.Files.Client,{PROPERTY_SHARE_TYPES:"{"+OC.Files.Client.NS_OWNCLOUD+"}share-types",PROPERTY_OWNER_ID:"{"+OC.Files.Client.NS_OWNCLOUD+"}owner-id",PROPERTY_OWNER_DISPLAY_NAME:"{"+OC.Files.Client.NS_OWNCLOUD+"}owner-display-name"}),OCA.Sharing||(OCA.Sharing={}),OCA.Sharing.Util={attach:function(e){if(OC.Share&&"trashbin"!==e.id&&"files.public"!==e.id){var i=e.fileActions,r=e._createRow;e._createRow=function(e){var t=r.apply(this,arguments),a=OCA.Sharing.Util.getSharePermissions(e);return 0===e.permissions&&(delete i.actions.all.Comment,delete i.actions.all.Details,delete i.actions.all.Goto),t.attr("data-share-permissions",a),e.shareOwner&&(t.attr("data-share-owner",e.shareOwner),t.attr("data-share-owner-id",e.shareOwnerId),"shared-root"===e.mountType&&t.attr("data-permissions",e.permissions|OC.PERMISSION_UPDATE)),e.recipientData&&!_.isEmpty(e.recipientData)&&t.attr("data-share-recipient-data",JSON.stringify(e.recipientData)),e.shareTypes&&t.attr("data-share-types",e.shareTypes.join(",")),t};var a=e.elementToFile;e.elementToFile=function(e){var t=a.apply(this,arguments);if(t.sharePermissions=e.attr("data-share-permissions")||void 0,t.shareOwner=e.attr("data-share-owner")||void 0,t.shareOwnerId=e.attr("data-share-owner-id")||void 0,e.attr("data-share-types")&&(t.shareTypes=e.attr("data-share-types").split(",")),e.attr("data-expiration")){var i=parseInt(e.attr("data-expiration"));t.shares=[],t.shares.push({expiration:i})}return t};var n=e._getWebdavProperties;e._getWebdavProperties=function(){var e=n.apply(this,arguments);return e.push(OC.Files.Client.PROPERTY_OWNER_ID),e.push(OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME),e.push(OC.Files.Client.PROPERTY_SHARE_TYPES),e},e.filesClient.addFileInfoParser((function(e){var t={},i=e.propStat[0].properties,r=i[OC.Files.Client.PROPERTY_PERMISSIONS];r&&r.indexOf("S")>=0&&(t.shareOwner=i[OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME],t.shareOwnerId=i[OC.Files.Client.PROPERTY_OWNER_ID]);var a=i[OC.Files.Client.PROPERTY_SHARE_TYPES];return a&&(t.shareTypes=_.chain(a).filter((function(e){return e.namespaceURI===OC.Files.Client.NS_OWNCLOUD&&"share-type"===e.nodeName.split(":")[1]})).map((function(e){return parseInt(e.textContent||e.text,10)})).value()),t})),e.$el.on("fileActionsReady",(function(e){var t=e.$files;_.each(t,(function(e){var t=$(e),i=t.attr("data-share-types")||"",r=t.attr("data-share-owner");if(i||r){var a=!1,n=!1;_.each(i.split(",")||[],(function(e){(e=parseInt(e,10))===OC.Share.SHARE_TYPE_LINK?a=!0:e===OC.Share.SHARE_TYPE_EMAIL?a=!0:e===OC.Share.SHARE_TYPE_USER?n=!0:e===OC.Share.SHARE_TYPE_GROUP?n=!0:e===OC.Share.SHARE_TYPE_REMOTE?n=!0:e===OC.Share.SHARE_TYPE_CIRCLE?n=!0:e===OC.Share.SHARE_TYPE_ROOM&&(n=!0)})),OCA.Sharing.Util._updateFileActionIcon(t,n,a)}}))})),e.$el.on("changeDirectory",(function(){OCA.Sharing.sharesLoaded=!1})),i.registerAction({name:"Share",displayName:function(e){if(e&&e.$file){var i=parseInt(e.$file.data("share-types"),10),r=e.$file.data("share-owner-id");if(i>=0||r)return t("core","Shared")}return t("core","Share")},altText:t("core","Share"),mime:"all",order:-150,permissions:OC.PERMISSION_ALL,iconClass:function(e,t){var i=parseInt(t.$file.data("share-types"),10);return i===OC.Share.SHARE_TYPE_EMAIL||i===OC.Share.SHARE_TYPE_LINK?"icon-public":"icon-shared"},icon:function(e,t){var i=t.$file.data("share-owner-id");if(i)return OC.generateUrl("/avatar/".concat(i,"/32"))},type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(t,i){var r=parseInt(i.$file.data("share-permissions"),10);(isNaN(r)||r>0)&&e.showDetailsView(t,"shareTabView")},render:function(e,t,r){return 0!=(parseInt(r.$file.data("permissions"),10)&OC.PERMISSION_SHARE)||r.$file.attr("data-share-owner")?i._defaultRenderAction.call(i,e,t,r):null}});var o=new OCA.Sharing.ShareTabView("shareTabView",{order:-20});o.on("sharesChanged",(function(t){var i=t.fileInfoModel,r=e.findFileEl(i.get("name")),a=t.hasLinkShares();t.get("shares").forEach((function(e){e.share_type===OC.Share.SHARE_TYPE_EMAIL&&(a=!0)})),OCA.Sharing.Util._updateFileListDataAttributes(e,r,t),OCA.Sharing.Util._updateFileActionIcon(r,t.hasUserShares(),a)||OC.Share.markFileAsShared(r,!1,!1),i.set({shareTypes:t.getShareTypes(),icon:r.attr("data-icon")})})),e.registerTabView(o);var s=new OCA.Sharing.ShareBreadCrumbView({shareTab:o});e.registerBreadCrumbDetailView(s)}},_updateFileListDataAttributes:function(e,t,i){if("files"!==e.id)if(_.pluck(i.get("shares"),"share_with_displayname").length){var r=_.mapObject(i.get("shares"),(function(e){return{shareWith:e.share_with,shareWithDisplayName:e.share_with_displayname}}));t.attr("data-share-recipient-data",JSON.stringify(r))}else t.removeAttr("data-share-recipient-data")},_updateFileActionIcon:function(e,t,i){return!!(t||i||e.attr("data-share-recipient-data")||e.attr("data-share-owner"))&&(OC.Share.markFileAsShared(e,!0,i),!0)},getSharePermissions:function(e){return e.sharePermissions}},OC.Plugins.register("OCA.Files.FileList",OCA.Sharing.Util)},function(e,i,r){var a;a=OCA.Files.DetailTabView.extend({id:"shareTabView",className:"tab shareTabView",initialize:function(e,t){OCA.Files.DetailTabView.prototype.initialize.call(this,e,t),OC.Plugins.attach("OCA.Sharing.ShareTabView",this)},template:function(e){return'<div><div class="dialogContainer"></div><div id="collaborationResources"></div></div>'},getLabel:function(){return t("files_sharing","Sharing")},getIcon:function(){return"icon-shared"},render:function(){var e=this,t=this;if(this._dialog&&(this._dialog.model.off(),this._dialog.remove(),this._dialog=null),this.model){this.$el.html(this.template()),_.isUndefined(this.model.get("sharePermissions"))&&this.model.set("sharePermissions",OCA.Sharing.Util.getSharePermissions(this.model.attributes));var i={itemType:this.model.isDirectory()?"folder":"file",itemSource:this.model.get("id"),possiblePermissions:this.model.get("sharePermissions")},a=new OC.Share.ShareConfigModel,n=new OC.Share.ShareItemModel(i,{configModel:a,fileInfoModel:this.model});this._dialog=new OC.Share.ShareDialogView({configModel:a,model:n}),this.$el.find(".dialogContainer").append(this._dialog.$el),this._dialog.render(),this._dialog.model.fetch(),this._dialog.model.on("change",(function(){t.trigger("sharesChanged",n)})),Promise.all([r.e(3),r.e(4)]).then(r.bind(null,14)).then((function(t){var i=new t.Vue({el:"#collaborationResources",render:function(e){return e(t.View)},data:{model:e.model.toJSON()}});e.model.on("change",(function(){i.data=e.model.toJSON()}))}))}else this.$el.empty();this.trigger("rendered")}}),OCA.Sharing.ShareTabView=a},function(e,t){
+!function(e){function t(t){for(var i,a,n=t[0],o=t[1],s=0,h=[];s<n.length;s++)a=n[s],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&h.push(r[a][0]),r[a]=0;for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);for(l&&l(t);h.length;)h.shift()()}var i={},r={0:0,1:0};function a(t){if(i[t])return i[t].exports;var r=i[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],i=r[e];if(0!==i)if(i)t.push(i[2]);else{var n=new Promise((function(t,a){i=r[e]=[t,a]}));t.push(i[2]=n);var o,s=document.createElement("script");s.charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.src=function(e){return a.p+"files_sharing."+e+".js?v="+{3:"12cd6bab17f9a2537bc9",4:"4e4a795c94e467758967"}[e]}(e);var l=new Error;o=function(t){s.onerror=s.onload=null,clearTimeout(h);var i=r[e];if(0!==i){if(i){var a=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+a+": "+n+")",l.name="ChunkLoadError",l.type=a,l.request=n,i[1](l)}r[e]=void 0}};var h=setTimeout((function(){o({type:"timeout",target:s})}),12e4);s.onerror=s.onload=o,document.head.appendChild(s)}return Promise.all(t)},a.m=e,a.c=i,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(i,r,function(t){return e[t]}.bind(null,r));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/js/",a.oe=function(e){throw console.error(e),e};var n=window.webpackJsonpFilesSharing=window.webpackJsonpFilesSharing||[],o=n.push.bind(n);n.push=t,n=n.slice();for(var s=0;s<n.length;s++)t(n[s]);var l=o;a(a.s=3)}([function(e,i,r){r.p=OC.linkTo("files_sharing","js/dist/"),r.nc=btoa(OC.requestToken),window.OCP.Collaboration.registerType("file",{action:function(){return new Promise((function(e,i){OC.dialogs.filepicker(t("files_sharing","Link to a file"),(function(t){OC.Files.getClient().getFileInfo(t).then((function(t,i){e(i.id)})).fail((function(){i(new Error("Cannot get fileinfo"))}))}),!1,null,!1,OC.dialogs.FILEPICKER_TYPE_CHOOSE,"",{allowDirectoryChooser:!0})}))},typeString:t("files_sharing","Link to a file"),typeIconClass:"icon-files-dark"})},function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",r=e[3];if(!r)return i;if(t&&"function"==typeof btoa){var a=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),n=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot).concat(e," */")}));return[i].concat(n).concat([a]).join("\n")}var o,s,l;return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(i,"}"):i})).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var n=this[a][0];null!=n&&(r[n]=!0)}for(var o=0;o<e.length;o++){var s=e[o];null!=s[0]&&r[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="(".concat(s[2],") and (").concat(i,")")),t.push(s))}},t}},function(e,t,i){"use strict";function r(e,t){for(var i=[],r={},a=0;a<t.length;a++){var n=t[a],o=n[0],s={id:e+":"+a,css:n[1],media:n[2],sourceMap:n[3]};r[o]?r[o].parts.push(s):i.push(r[o]={id:o,parts:[s]})}return i}i.r(t),i.d(t,"default",(function(){return f}));var a="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!a)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var n={},o=a&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,h=!1,p=function(){},d=null,c="data-vue-ssr-id",u="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e,t,i,a){h=i,d=a||{};var o=r(e,t);return m(o),function(t){for(var i=[],a=0;a<o.length;a++){var s=o[a];(l=n[s.id]).refs--,i.push(l)}t?m(o=r(e,t)):o=[];for(a=0;a<i.length;a++){var l;if(0===(l=i[a]).refs){for(var h=0;h<l.parts.length;h++)l.parts[h]();delete n[l.id]}}}}function m(e){for(var t=0;t<e.length;t++){var i=e[t],r=n[i.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](i.parts[a]);for(;a<i.parts.length;a++)r.parts.push(v(i.parts[a]));r.parts.length>i.parts.length&&(r.parts.length=i.parts.length)}else{var o=[];for(a=0;a<i.parts.length;a++)o.push(v(i.parts[a]));n[i.id]={id:i.id,refs:1,parts:o}}}}function g(){var e=document.createElement("style");return e.type="text/css",o.appendChild(e),e}function v(e){var t,i,r=document.querySelector("style["+c+'~="'+e.id+'"]');if(r){if(h)return p;r.parentNode.removeChild(r)}if(u){var a=l++;r=s||(s=g()),t=O.bind(null,r,a,!1),i=O.bind(null,r,a,!0)}else r=g(),t=C.bind(null,r),i=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else i()}}var b,w=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function O(e,t,i,r){var a=i?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,a);else{var n=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(n,o[t]):e.appendChild(n)}}function C(e,t){var i=t.css,r=t.media,a=t.sourceMap;if(r&&e.setAttribute("media",r),d.ssrId&&e.setAttribute(c,t.id),a&&(i+="\n/*# sourceURL="+a.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}},function(e,t,i){"use strict";i.r(t);i(4),i(5),i(6),i(7),i(9),i(0);i.p=OC.linkTo("files_sharing","js/dist/"),i.nc=btoa(OC.requestToken),window.OCA.Sharing=OCA.Sharing},function(e,i){_.extend(OC.Files.Client,{PROPERTY_SHARE_TYPES:"{"+OC.Files.Client.NS_OWNCLOUD+"}share-types",PROPERTY_OWNER_ID:"{"+OC.Files.Client.NS_OWNCLOUD+"}owner-id",PROPERTY_OWNER_DISPLAY_NAME:"{"+OC.Files.Client.NS_OWNCLOUD+"}owner-display-name"}),OCA.Sharing||(OCA.Sharing={}),OCA.Sharing.Util={attach:function(e){if(OC.Share&&"trashbin"!==e.id&&"files.public"!==e.id){var i=e.fileActions,r=e._createRow;e._createRow=function(e){var t=r.apply(this,arguments),a=OCA.Sharing.Util.getSharePermissions(e);return 0===e.permissions&&(delete i.actions.all.Comment,delete i.actions.all.Details,delete i.actions.all.Goto),t.attr("data-share-permissions",a),e.shareOwner&&(t.attr("data-share-owner",e.shareOwner),t.attr("data-share-owner-id",e.shareOwnerId),"shared-root"===e.mountType&&t.attr("data-permissions",e.permissions|OC.PERMISSION_UPDATE)),e.recipientData&&!_.isEmpty(e.recipientData)&&t.attr("data-share-recipient-data",JSON.stringify(e.recipientData)),e.shareTypes&&t.attr("data-share-types",e.shareTypes.join(",")),t};var a=e.elementToFile;e.elementToFile=function(e){var t=a.apply(this,arguments);if(t.sharePermissions=e.attr("data-share-permissions")||void 0,t.shareOwner=e.attr("data-share-owner")||void 0,t.shareOwnerId=e.attr("data-share-owner-id")||void 0,e.attr("data-share-types")&&(t.shareTypes=e.attr("data-share-types").split(",")),e.attr("data-expiration")){var i=parseInt(e.attr("data-expiration"));t.shares=[],t.shares.push({expiration:i})}return t};var n=e._getWebdavProperties;e._getWebdavProperties=function(){var e=n.apply(this,arguments);return e.push(OC.Files.Client.PROPERTY_OWNER_ID),e.push(OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME),e.push(OC.Files.Client.PROPERTY_SHARE_TYPES),e},e.filesClient.addFileInfoParser((function(e){var t={},i=e.propStat[0].properties,r=i[OC.Files.Client.PROPERTY_PERMISSIONS];r&&r.indexOf("S")>=0&&(t.shareOwner=i[OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME],t.shareOwnerId=i[OC.Files.Client.PROPERTY_OWNER_ID]);var a=i[OC.Files.Client.PROPERTY_SHARE_TYPES];return a&&(t.shareTypes=_.chain(a).filter((function(e){return e.namespaceURI===OC.Files.Client.NS_OWNCLOUD&&"share-type"===e.nodeName.split(":")[1]})).map((function(e){return parseInt(e.textContent||e.text,10)})).value()),t})),e.$el.on("fileActionsReady",(function(e){var t=e.$files;_.each(t,(function(e){var t=$(e),i=t.attr("data-share-types")||"",r=t.attr("data-share-owner");if(i||r){var a=!1,n=!1;_.each(i.split(",")||[],(function(e){(e=parseInt(e,10))===OC.Share.SHARE_TYPE_LINK?a=!0:e===OC.Share.SHARE_TYPE_EMAIL?a=!0:e===OC.Share.SHARE_TYPE_USER?n=!0:e===OC.Share.SHARE_TYPE_GROUP?n=!0:e===OC.Share.SHARE_TYPE_REMOTE?n=!0:e===OC.Share.SHARE_TYPE_CIRCLE?n=!0:e===OC.Share.SHARE_TYPE_ROOM&&(n=!0)})),OCA.Sharing.Util._updateFileActionIcon(t,n,a)}}))})),e.$el.on("changeDirectory",(function(){OCA.Sharing.sharesLoaded=!1})),i.registerAction({name:"Share",displayName:function(e){if(e&&e.$file){var i=parseInt(e.$file.data("share-types"),10),r=e.$file.data("share-owner-id");if(i>=0||r)return t("core","Shared")}return t("core","Share")},altText:t("core","Share"),mime:"all",order:-150,permissions:OC.PERMISSION_ALL,iconClass:function(e,t){var i=parseInt(t.$file.data("share-types"),10);return i===OC.Share.SHARE_TYPE_EMAIL||i===OC.Share.SHARE_TYPE_LINK?"icon-public":"icon-shared"},icon:function(e,t){var i=t.$file.data("share-owner-id");if(i)return OC.generateUrl("/avatar/".concat(i,"/32"))},type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(t,i){var r=parseInt(i.$file.data("share-permissions"),10);(isNaN(r)||r>0)&&e.showDetailsView(t,"shareTabView")},render:function(e,t,r){return 0!=(parseInt(r.$file.data("permissions"),10)&OC.PERMISSION_SHARE)||r.$file.attr("data-share-owner")?i._defaultRenderAction.call(i,e,t,r):null}});var o=new OCA.Sharing.ShareTabView("shareTabView",{order:-20});o.on("sharesChanged",(function(t){var i=t.fileInfoModel,r=e.findFileEl(i.get("name")),a=t.hasLinkShares();t.get("shares").forEach((function(e){e.share_type===OC.Share.SHARE_TYPE_EMAIL&&(a=!0)})),OCA.Sharing.Util._updateFileListDataAttributes(e,r,t),OCA.Sharing.Util._updateFileActionIcon(r,t.hasUserShares(),a)||OC.Share.markFileAsShared(r,!1,!1),i.set({shareTypes:t.getShareTypes(),icon:r.attr("data-icon")})})),e.registerTabView(o);var s=new OCA.Sharing.ShareBreadCrumbView({shareTab:o});e.registerBreadCrumbDetailView(s)}},_updateFileListDataAttributes:function(e,t,i){if("files"!==e.id)if(_.pluck(i.get("shares"),"share_with_displayname").length){var r=_.mapObject(i.get("shares"),(function(e){return{shareWith:e.share_with,shareWithDisplayName:e.share_with_displayname}}));t.attr("data-share-recipient-data",JSON.stringify(r))}else t.removeAttr("data-share-recipient-data")},_updateFileActionIcon:function(e,t,i){return!!(t||i||e.attr("data-share-recipient-data")||e.attr("data-share-owner"))&&(OC.Share.markFileAsShared(e,!0,i),!0)},getSharePermissions:function(e){return e.sharePermissions}},OC.Plugins.register("OCA.Files.FileList",OCA.Sharing.Util)},function(e,i,r){var a;a=OCA.Files.DetailTabView.extend({id:"shareTabView",className:"tab shareTabView",initialize:function(e,t){OCA.Files.DetailTabView.prototype.initialize.call(this,e,t),OC.Plugins.attach("OCA.Sharing.ShareTabView",this)},template:function(e){return'<div><div class="dialogContainer"></div><div id="collaborationResources"></div></div>'},getLabel:function(){return t("files_sharing","Sharing")},getIcon:function(){return"icon-shared"},render:function(){var e=this,t=this;if(this._dialog&&(this._dialog.model.off(),this._dialog.remove(),this._dialog=null),this.model){this.$el.html(this.template()),_.isUndefined(this.model.get("sharePermissions"))&&this.model.set("sharePermissions",OCA.Sharing.Util.getSharePermissions(this.model.attributes));var i={itemType:this.model.isDirectory()?"folder":"file",itemSource:this.model.get("id"),possiblePermissions:this.model.get("sharePermissions")},a=new OC.Share.ShareConfigModel,n=new OC.Share.ShareItemModel(i,{configModel:a,fileInfoModel:this.model});this._dialog=new OC.Share.ShareDialogView({configModel:a,model:n}),this.$el.find(".dialogContainer").append(this._dialog.$el),this._dialog.render(),this._dialog.model.fetch(),this._dialog.model.on("change",(function(){t.trigger("sharesChanged",n)})),Promise.all([r.e(3),r.e(4)]).then(r.bind(null,14)).then((function(t){var i=new t.Vue({el:"#collaborationResources",render:function(e){return e(t.View)},data:{model:e.model.toJSON()}});e.model.on("change",(function(){i.data=e.model.toJSON()}))}))}else this.$el.empty();this.trigger("rendered")}}),OCA.Sharing.ShareTabView=a},function(e,t){
/**
* @copyright 2016 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@@ -20,5 +20,5 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-!function(){"use strict";var e=OC.Backbone.View.extend({tagName:"span",events:{click:"_onClick"},_dirInfo:void 0,_shareTab:void 0,initialize:function(e){this._shareTab=e.shareTab},render:function(e){if(this._dirInfo=e.dirInfo||null,null===this._dirInfo||"/"===this._dirInfo.path&&""===this._dirInfo.name)this.$el.removeClass("shared icon-public icon-shared"),this.$el.hide();else{var t=e.dirInfo&&e.dirInfo.shareTypes&&e.dirInfo.shareTypes.length>0;this.$el.removeClass("shared icon-public icon-shared"),t?(this.$el.addClass("shared"),-1!==e.dirInfo.shareTypes.indexOf(OC.Share.SHARE_TYPE_LINK)?this.$el.addClass("icon-public"):this.$el.addClass("icon-shared")):this.$el.addClass("icon-shared"),this.$el.show(),this.delegateEvents()}return this},_onClick:function(e){e.preventDefault();var t=new OCA.Files.FileInfoModel(this._dirInfo),i=this;t.on("change",(function(){i.render({dirInfo:i._dirInfo})})),this._shareTab.on("sharesChanged",(function(e){for(var t=[],r=e.getSharesWithCurrentItem(),a=0;a<r.length;a++)-1===t.indexOf(r[a].share_type)&&t.push(r[a].share_type);e.hasLinkShares()&&t.push(OC.Share.SHARE_TYPE_LINK),i._dirInfo.shareTypes=t,i.render({dirInfo:i._dirInfo})})),OCA.Files.App.fileList.showDetailsView(t,"shareTabView")}});OCA.Sharing.ShareBreadCrumbView=e}()},function(e,t,i){var r=i(8);"string"==typeof r&&(r=[[e.i,r,""]]);var a={insert:"head",singleton:!1};i(2)(r,a);r.locals&&(e.exports=r.locals)},function(e,t,i){(e.exports=i(1)(!1)).push([e.i,".app-files .shareTabView{min-height:100px}.share-autocomplete-item{display:flex}.share-autocomplete-item.merged{margin-left:32px}.share-autocomplete-item .autocomplete-item-text{margin-left:10px;margin-right:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:32px;vertical-align:middle;flex-grow:1}.share-autocomplete-item .autocomplete-item-text .ui-state-highlight{border:none;margin:0}.share-autocomplete-item.with-description .autocomplete-item-text{line-height:100%}.share-autocomplete-item .autocomplete-item-details{display:block;line-height:130%;font-size:90%;opacity:0.7}.share-autocomplete-item .icon{opacity:.7;margin-right:7px}.share-autocomplete-item .icon.search-globally{width:32px;height:32px;margin-right:0}.shareTabView .oneline{white-space:nowrap;position:relative}.shareTabView .shareWithLoading{padding-left:10px;right:35px;top:3px}.shareTabView .shareWithConfirm{position:absolute;right:2px;top:6px;padding:14px;opacity:0.5}.shareTabView .shareWithField:focus ~ .shareWithConfirm{opacity:1}.shareTabView .linkMore{position:absolute;right:-7px;top:-4px;padding:14px}.shareTabView .popovermenu .linkPassMenu input.error{border-color:var(--color-error) !important}.shareTabView .popovermenu .linkPassMenu input.error[type=\"submit\"]{border-left:none}.shareTabView .popovermenu .linkPassMenu .share-pass-submit{width:auto !important}.shareTabView .popovermenu .linkPassMenu .icon-loading-small{background-color:var(--color-main-background);position:absolute;right:8px;margin:3px;padding:10px;width:32px;height:32px;z-index:10}.shareTabView .popovermenu .datepicker{margin-left:35px}.shareTabView .popovermenu .share-add input.share-note-delete{border:none;background-color:transparent;width:44px !important;padding:0;flex:0 0 44px;margin-left:auto}.shareTabView .popovermenu .share-add input.share-note-delete.hidden{display:none}.shareTabView .popovermenu .share-note-form span.icon-note{position:relative}.shareTabView .popovermenu .share-note-form textarea.share-note{margin:0;width:200px;min-height:70px;resize:none}.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit{position:absolute;width:44px !important;height:44px;bottom:0px;right:10px;margin:0;background-color:transparent;border:none;opacity:.7}.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:hover,.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:focus,.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:active{opacity:1}.shareTabView .popovermenu .share-note-form.share-note-link{margin-bottom:10px}.shareTabView .popovermenu .new-share{border-top:1px solid var(--color-border)}.shareTabView .linkPass .icon-loading-small{margin-right:0px}.shareTabView .icon{background-size:16px 16px}.shareTabView .shareWithList .icon-loading-small:not(.hidden)+span,.shareTabView .linkShareView .icon-loading-small:not(.hidden)+input+label:before{display:none !important}.shareTabView input[type='checkbox']{margin:0 3px 0 8px;vertical-align:middle}.shareTabView input[type='text'].shareWithField,.shareTabView input[type='text'].emailField{width:100%;box-sizing:border-box;padding-right:32px;text-overflow:ellipsis}.shareTabView input[type='text'].linkText .shareTabView input[type='password'].linkPassText,.shareTabView input[type='password'].passwordField{width:180px !important}.shareTabView form{font-size:100%;margin-left:0;margin-right:0}.shareTabView .share-note{border-radius:var(--border-radius);margin-bottom:10px;margin-left:37px}.shareWithList{list-style-type:none;display:flex;flex-direction:column}.shareWithList>li{height:44px;white-space:normal;display:inline-flex;align-items:center;position:relative}.shareWithList>li .avatar{width:32px;height:32px;background-color:var(--color-primary)}.shareWithList .unshare img{vertical-align:text-bottom}.shareWithList .sharingOptionsGroup{margin-left:auto;display:flex;align-items:center;white-space:nowrap}.shareWithList .sharingOptionsGroup>.icon:not(.hidden),.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden){padding:14px;height:44px;width:44px;opacity:.5;display:block;cursor:pointer}.shareWithList .sharingOptionsGroup>.icon:not(.hidden):hover,.shareWithList .sharingOptionsGroup>.icon:not(.hidden):focus,.shareWithList .sharingOptionsGroup>.icon:not(.hidden):active,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):hover,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):focus,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):active{opacity:.7}.shareWithList .sharingOptionsGroup>.share-menu{position:relative;display:block}.shareWithList .username{padding:0 8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ui-autocomplete{max-height:calc(36px * 6.5);overflow-y:auto;overflow-x:hidden;z-index:1550 !important}.notCreatable{padding-left:12px;padding-top:12px;color:var(--color-text-lighter)}.contactsmenu-popover{left:-6px;right:auto;padding:3px 6px;top:100%;margin-top:0}.contactsmenu-popover li.hidden{display:none !important}.contactsmenu-popover:after{left:8px;right:auto}.reshare,#link label,#expiration label{display:inline-flex;align-items:center}.reshare .avatar,#link label .avatar,#expiration label .avatar{margin-right:5px}.resharerInfoView.subView{position:relative}\n",""])},function(e,t,i){var r=i(10);"string"==typeof r&&(r=[[e.i,r,""]]);var a={insert:"head",singleton:!1};i(2)(r,a);r.locals&&(e.exports=r.locals)},function(e,t,i){(e.exports=i(1)(!1)).push([e.i,"div.crumb span.icon-shared,div.crumb span.icon-public{display:inline-block;cursor:pointer;opacity:0.2;margin-right:6px}div.crumb span.icon-shared.shared,div.crumb span.icon-public.shared{opacity:0.7}\n",""])}]);
+!function(){"use strict";var e=OC.Backbone.View.extend({tagName:"span",events:{click:"_onClick"},_dirInfo:void 0,_shareTab:void 0,initialize:function(e){this._shareTab=e.shareTab},render:function(e){if(this._dirInfo=e.dirInfo||null,null===this._dirInfo||"/"===this._dirInfo.path&&""===this._dirInfo.name)this.$el.removeClass("shared icon-public icon-shared"),this.$el.hide();else{var t=e.dirInfo&&e.dirInfo.shareTypes&&e.dirInfo.shareTypes.length>0;this.$el.removeClass("shared icon-public icon-shared"),t?(this.$el.addClass("shared"),-1!==e.dirInfo.shareTypes.indexOf(OC.Share.SHARE_TYPE_LINK)?this.$el.addClass("icon-public"):this.$el.addClass("icon-shared")):this.$el.addClass("icon-shared"),this.$el.show(),this.delegateEvents()}return this},_onClick:function(e){e.preventDefault();var t=new OCA.Files.FileInfoModel(this._dirInfo),i=this;t.on("change",(function(){i.render({dirInfo:i._dirInfo})})),this._shareTab.on("sharesChanged",(function(e){for(var t=[],r=e.getSharesWithCurrentItem(),a=0;a<r.length;a++)-1===t.indexOf(r[a].share_type)&&t.push(r[a].share_type);e.hasLinkShares()&&t.push(OC.Share.SHARE_TYPE_LINK),i._dirInfo.shareTypes=t,i.render({dirInfo:i._dirInfo})})),OCA.Files.App.fileList.showDetailsView(t,"shareTabView")}});OCA.Sharing.ShareBreadCrumbView=e}()},function(e,t,i){var r=i(8);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,i(2).default)("3e5548ea",r,!0,{})},function(e,t,i){(e.exports=i(1)(!1)).push([e.i,".app-files .shareTabView{min-height:100px}.share-autocomplete-item{display:flex}.share-autocomplete-item.merged{margin-left:32px}.share-autocomplete-item .autocomplete-item-text{margin-left:10px;margin-right:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:32px;vertical-align:middle;flex-grow:1}.share-autocomplete-item .autocomplete-item-text .ui-state-highlight{border:none;margin:0}.share-autocomplete-item.with-description .autocomplete-item-text{line-height:100%}.share-autocomplete-item .autocomplete-item-details{display:block;line-height:130%;font-size:90%;opacity:0.7}.share-autocomplete-item .icon{opacity:.7;margin-right:7px}.share-autocomplete-item .icon.search-globally{width:32px;height:32px;margin-right:0}.shareTabView .oneline{white-space:nowrap;position:relative}.shareTabView .shareWithLoading{padding-left:10px;right:35px;top:3px}.shareTabView .shareWithConfirm{position:absolute;right:2px;top:6px;padding:14px;opacity:0.5}.shareTabView .shareWithField:focus ~ .shareWithConfirm{opacity:1}.shareTabView .linkMore{position:absolute;right:-7px;top:-4px;padding:14px}.shareTabView .popovermenu .linkPassMenu input.error{border-color:var(--color-error) !important}.shareTabView .popovermenu .linkPassMenu input.error[type=\"submit\"]{border-left:none}.shareTabView .popovermenu .linkPassMenu .share-pass-submit{width:auto !important}.shareTabView .popovermenu .linkPassMenu .icon-loading-small{background-color:var(--color-main-background);position:absolute;right:8px;margin:3px;padding:10px;width:32px;height:32px;z-index:10}.shareTabView .popovermenu .datepicker{margin-left:35px}.shareTabView .popovermenu .share-add input.share-note-delete{border:none;background-color:transparent;width:44px !important;padding:0;flex:0 0 44px;margin-left:auto}.shareTabView .popovermenu .share-add input.share-note-delete.hidden{display:none}.shareTabView .popovermenu .share-note-form span.icon-note{position:relative}.shareTabView .popovermenu .share-note-form textarea.share-note{margin:0;width:200px;min-height:70px;resize:none}.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit{position:absolute;width:44px !important;height:44px;bottom:0px;right:10px;margin:0;background-color:transparent;border:none;opacity:.7}.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:hover,.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:focus,.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:active{opacity:1}.shareTabView .popovermenu .share-note-form.share-note-link{margin-bottom:10px}.shareTabView .popovermenu .new-share{border-top:1px solid var(--color-border)}.shareTabView .linkPass .icon-loading-small{margin-right:0px}.shareTabView .icon{background-size:16px 16px}.shareTabView .shareWithList .icon-loading-small:not(.hidden)+span,.shareTabView .linkShareView .icon-loading-small:not(.hidden)+input+label:before{display:none !important}.shareTabView input[type='checkbox']{margin:0 3px 0 8px;vertical-align:middle}.shareTabView input[type='text'].shareWithField,.shareTabView input[type='text'].emailField{width:100%;box-sizing:border-box;padding-right:32px;text-overflow:ellipsis}.shareTabView input[type='text'].linkText .shareTabView input[type='password'].linkPassText,.shareTabView input[type='password'].passwordField{width:180px !important}.shareTabView form{font-size:100%;margin-left:0;margin-right:0}.shareTabView .share-note{border-radius:var(--border-radius);margin-bottom:10px;margin-left:37px}.shareWithList{list-style-type:none;display:flex;flex-direction:column}.shareWithList>li{height:44px;white-space:normal;display:inline-flex;align-items:center;position:relative}.shareWithList>li .avatar{width:32px;height:32px;background-color:var(--color-primary)}.shareWithList .unshare img{vertical-align:text-bottom}.shareWithList .sharingOptionsGroup{margin-left:auto;display:flex;align-items:center;white-space:nowrap}.shareWithList .sharingOptionsGroup>.icon:not(.hidden),.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden){padding:14px;height:44px;width:44px;opacity:.5;display:block;cursor:pointer}.shareWithList .sharingOptionsGroup>.icon:not(.hidden):hover,.shareWithList .sharingOptionsGroup>.icon:not(.hidden):focus,.shareWithList .sharingOptionsGroup>.icon:not(.hidden):active,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):hover,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):focus,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):active{opacity:.7}.shareWithList .sharingOptionsGroup>.share-menu{position:relative;display:block}.shareWithList .username{padding:0 8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ui-autocomplete{max-height:calc(36px * 6.5);overflow-y:auto;overflow-x:hidden;z-index:1550 !important}.notCreatable{padding-left:12px;padding-top:12px;color:var(--color-text-lighter)}.contactsmenu-popover{left:-6px;right:auto;padding:3px 6px;top:100%;margin-top:0}.contactsmenu-popover li.hidden{display:none !important}.contactsmenu-popover:after{left:8px;right:auto}.reshare,#link label,#expiration label{display:inline-flex;align-items:center}.reshare .avatar,#link label .avatar,#expiration label .avatar{margin-right:5px}.resharerInfoView.subView{position:relative}\n",""])},function(e,t,i){var r=i(10);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,i(2).default)("57e7eec1",r,!0,{})},function(e,t,i){(e.exports=i(1)(!1)).push([e.i,"div.crumb span.icon-shared,div.crumb span.icon-public{display:inline-block;cursor:pointer;opacity:0.2;margin-right:6px}div.crumb span.icon-shared.shared,div.crumb span.icon-public.shared{opacity:0.7}\n",""])}]);
//# sourceMappingURL=additionalScripts.js.map \ No newline at end of file
diff --git a/apps/files_sharing/js/dist/additionalScripts.js.map b/apps/files_sharing/js/dist/additionalScripts.js.map
index 9db2068bf98..143949c1e3e 100644
--- a/apps/files_sharing/js/dist/additionalScripts.js.map
+++ b/apps/files_sharing/js/dist/additionalScripts.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/collaborationresourceshandler.js","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack:///./apps/files_sharing/src/additionalScripts.js","webpack:///./apps/files_sharing/src/share.js","webpack:///./apps/files_sharing/src/sharetabview.js","webpack:///./apps/files_sharing/src/sharebreadcrumbview.js","webpack:///./apps/files_sharing/src/style/sharetabview.scss?b2d7","webpack:///./apps/files_sharing/src/style/sharetabview.scss","webpack:///./apps/files_sharing/src/style/sharebreadcrumb.scss?0d70","webpack:///./apps/files_sharing/src/style/sharebreadcrumb.scss"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","0","1","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","__webpack_public_path__","OC","linkTo","__webpack_nonce__","btoa","requestToken","OCP","Collaboration","registerType","action","dialogs","filepicker","f","Files","getClient","getFileInfo","then","status","fileInfo","id","fail","FILEPICKER_TYPE_CHOOSE","allowDirectoryChooser","typeString","typeIconClass","useSourceMap","list","toString","this","map","item","content","cssMapping","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","memo","stylesInDom","isOldIE","Boolean","atob","getTarget","styleTarget","querySelector","HTMLIFrameElement","contentDocument","listToStyles","options","styles","newStyles","base","part","css","media","parts","addStylesToDom","domStyle","j","refs","addStyle","insertStyleElement","style","attributes","nonce","keys","forEach","insert","textStore","replaceText","index","replacement","filter","applyToSingletonTag","remove","obj","styleSheet","cssText","cssNode","createTextNode","childNodes","removeChild","insertBefore","applyToTag","firstChild","singleton","singletonCounter","update","styleIndex","parentNode","removeStyleElement","newObj","newList","mayRemove","_domStyle","OCA","Sharing","_","extend","Client","PROPERTY_SHARE_TYPES","NS_OWNCLOUD","PROPERTY_OWNER_ID","PROPERTY_OWNER_DISPLAY_NAME","Util","attach","fileList","Share","fileActions","oldCreateRow","_createRow","fileData","tr","apply","arguments","sharePermissions","getSharePermissions","permissions","actions","Comment","Details","Goto","attr","shareOwner","shareOwnerId","mountType","PERMISSION_UPDATE","recipientData","isEmpty","shareTypes","oldElementToFile","elementToFile","$el","split","expirationTimestamp","parseInt","shares","expiration","oldGetWebdavProperties","_getWebdavProperties","props","filesClient","addFileInfoParser","response","propStat","properties","permissionsProp","PROPERTY_PERMISSIONS","indexOf","shareTypesProp","chain","xmlvalue","namespaceURI","nodeName","textContent","text","on","ev","$files","each","file","$tr","$","hasLink","hasShares","shareType","SHARE_TYPE_LINK","SHARE_TYPE_EMAIL","SHARE_TYPE_USER","SHARE_TYPE_GROUP","SHARE_TYPE_REMOTE","SHARE_TYPE_CIRCLE","SHARE_TYPE_ROOM","_updateFileActionIcon","sharesLoaded","registerAction","displayName","context","$file","altText","mime","order","PERMISSION_ALL","iconClass","fileName","icon","generateUrl","FileActions","TYPE_INLINE","actionHandler","isNaN","showDetailsView","render","actionSpec","isDefault","PERMISSION_SHARE","_defaultRenderAction","shareTab","ShareTabView","shareModel","fileInfoModel","findFileEl","hasLinkShares","share","share_type","_updateFileListDataAttributes","hasUserShares","markFileAsShared","set","getShareTypes","registerTabView","breadCrumbSharingDetailView","ShareBreadCrumbView","registerBreadCrumbDetailView","pluck","mapObject","shareWith","share_with","shareWithDisplayName","share_with_displayname","removeAttr","Plugins","register","DetailTabView","className","initialize","template","params","getLabel","getIcon","self","_dialog","model","off","html","isUndefined","itemType","isDirectory","itemSource","possiblePermissions","configModel","ShareConfigModel","ShareItemModel","ShareDialogView","find","append","fetch","trigger","Resources","vm","Vue","el","h","View","toJSON","empty","BreadCrumbView","Backbone","tagName","events","click","_dirInfo","_shareTab","dirInfo","path","removeClass","hide","isShared","addClass","show","delegateEvents","_onClick","preventDefault","FileInfoModel","getSharesWithCurrentItem","App","locals"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBV,IAAYU,EAAgBV,IACpFI,EAASO,KAAKD,EAAgBV,GAAS,IAExCU,EAAgBV,GAAW,EAE5B,IAAID,KAAYG,EACZI,OAAOC,UAAUC,eAAeC,KAAKP,EAAaH,KACpDa,EAAQb,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCM,EAASC,QACdD,EAASU,OAATV,GAOF,IAAIW,EAAmB,GAKnBL,EAAkB,CACrBM,EAAG,EACHC,EAAG,GAWJ,SAASC,EAAoBnB,GAG5B,GAAGgB,EAAiBhB,GACnB,OAAOgB,EAAiBhB,GAAUo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t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0,\n \t\t1: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"files_sharing.\" + chunkId + \".js?v=\" + {\"3\":\"12cd6bab17f9a2537bc9\",\"4\":\"07d5a7a4994f0ef93170\"}[chunkId] + \"\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonpFilesSharing\"] = window[\"webpackJsonpFilesSharing\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/');\n__webpack_nonce__ = btoa(OC.requestToken);\n\nwindow.OCP.Collaboration.registerType('file', {\n\taction: () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tOC.dialogs.filepicker(t('files_sharing', 'Link to a file'), function (f) {\n\t\t\t\tconst client = OC.Files.getClient();\n\t\t\t\tclient.getFileInfo(f).then((status, fileInfo) => {\n\t\t\t\t\tresolve(fileInfo.id);\n\t\t\t\t}).fail(() => {\n\t\t\t\t\treject();\n\t\t\t\t});\n\t\t\t}, false, null, false, OC.dialogs.FILEPICKER_TYPE_CHOOSE, '', { allowDirectoryChooser: true });\n\t\t});\n\t},\n\ttypeString: t('files_sharing', 'Link to a file'),\n\ttypeIconClass: 'icon-files-dark'\n});\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \"{\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = modules[_i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = \"(\".concat(item[2], \") and (\").concat(mediaQuery, \")\");\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot).concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","\"use strict\";\n\nvar stylesInDom = {};\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nfunction listToStyles(list, options) {\n var styles = [];\n var newStyles = {};\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var css = item[1];\n var media = item[2];\n var sourceMap = item[3];\n var part = {\n css: css,\n media: media,\n sourceMap: sourceMap\n };\n\n if (!newStyles[id]) {\n styles.push(newStyles[id] = {\n id: id,\n parts: [part]\n });\n } else {\n newStyles[id].parts.push(part);\n }\n }\n\n return styles;\n}\n\nfunction addStylesToDom(styles, options) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i];\n var domStyle = stylesInDom[item.id];\n var j = 0;\n\n if (domStyle) {\n domStyle.refs++;\n\n for (; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j]);\n }\n\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j], options));\n }\n } else {\n var parts = [];\n\n for (; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j], options));\n }\n\n stylesInDom[item.id] = {\n id: item.id,\n refs: 1,\n parts: parts\n };\n }\n }\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n\n if (typeof options.attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n options.attributes.nonce = nonce;\n }\n }\n\n Object.keys(options.attributes).forEach(function (key) {\n style.setAttribute(key, options.attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n }\n\n if (sourceMap && btoa) {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n options.attributes = typeof options.attributes === 'object' ? options.attributes : {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n var styles = listToStyles(list, options);\n addStylesToDom(styles, options);\n return function update(newList) {\n var mayRemove = [];\n\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i];\n var domStyle = stylesInDom[item.id];\n\n if (domStyle) {\n domStyle.refs--;\n mayRemove.push(domStyle);\n }\n }\n\n if (newList) {\n var newStyles = listToStyles(newList, options);\n addStylesToDom(newStyles, options);\n }\n\n for (var _i = 0; _i < mayRemove.length; _i++) {\n var _domStyle = mayRemove[_i];\n\n if (_domStyle.refs === 0) {\n for (var j = 0; j < _domStyle.parts.length; j++) {\n _domStyle.parts[j]();\n }\n\n delete stylesInDom[_domStyle.id];\n }\n }\n };\n};","__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/');\n__webpack_nonce__ = btoa(OC.requestToken);\n\nimport './share'\nimport './sharetabview'\nimport './sharebreadcrumbview'\n\nimport './style/sharetabview.scss'\nimport './style/sharebreadcrumb.scss'\n\nimport './collaborationresourceshandler.js'\n\nwindow.OCA.Sharing = OCA.Sharing;\n","/*\n * Copyright (c) 2014\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_SHARE_TYPES:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}share-types',\n\t\tPROPERTY_OWNER_ID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}owner-id',\n\t\tPROPERTY_OWNER_DISPLAY_NAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}owner-display-name'\n\t});\n\n\tif (!OCA.Sharing) {\n\t\tOCA.Sharing = {};\n\t}\n\t/**\n\t * @namespace\n\t */\n\tOCA.Sharing.Util = {\n\t\t/**\n\t\t * Initialize the sharing plugin.\n\t\t *\n\t\t * Registers the \"Share\" file action and adds additional\n\t\t * DOM attributes for the sharing file info.\n\t\t *\n\t\t * @param {OCA.Files.FileList} fileList file list to be extended\n\t\t */\n\t\tattach: function(fileList) {\n\t\t\t// core sharing is disabled/not loaded\n\t\t\tif (!OC.Share) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (fileList.id === 'trashbin' || fileList.id === 'files.public') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar fileActions = fileList.fileActions;\n\t\t\tvar oldCreateRow = fileList._createRow;\n\t\t\tfileList._createRow = function(fileData) {\n\n\t\t\t\tvar tr = oldCreateRow.apply(this, arguments);\n\t\t\t\tvar sharePermissions = OCA.Sharing.Util.getSharePermissions(fileData);\n\t\t\t\t\n\t\t\t\tif (fileData.permissions === 0) {\n\t\t\t\t\t// no permission, disabling sidebar\n\t\t\t\t\tdelete fileActions.actions.all.Comment;\n\t\t\t\t\tdelete fileActions.actions.all.Details;\n\t\t\t\t\tdelete fileActions.actions.all.Goto;\n\t\t\t\t}\n\t\t\t\ttr.attr('data-share-permissions', sharePermissions);\n\t\t\t\tif (fileData.shareOwner) {\n\t\t\t\t\ttr.attr('data-share-owner', fileData.shareOwner);\n\t\t\t\t\ttr.attr('data-share-owner-id', fileData.shareOwnerId);\n\t\t\t\t\t// user should always be able to rename a mount point\n\t\t\t\t\tif (fileData.mountType === 'shared-root') {\n\t\t\t\t\t\ttr.attr('data-permissions', fileData.permissions | OC.PERMISSION_UPDATE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (fileData.recipientData && !_.isEmpty(fileData.recipientData)) {\n\t\t\t\t\ttr.attr('data-share-recipient-data', JSON.stringify(fileData.recipientData));\n\t\t\t\t}\n\t\t\t\tif (fileData.shareTypes) {\n\t\t\t\t\ttr.attr('data-share-types', fileData.shareTypes.join(','));\n\t\t\t\t}\n\t\t\t\treturn tr;\n\t\t\t};\n\n\t\t\tvar oldElementToFile = fileList.elementToFile;\n\t\t\tfileList.elementToFile = function($el) {\n\t\t\t\tvar fileInfo = oldElementToFile.apply(this, arguments);\n\t\t\t\tfileInfo.sharePermissions = $el.attr('data-share-permissions') || undefined;\n\t\t\t\tfileInfo.shareOwner = $el.attr('data-share-owner') || undefined;\n\t\t\t\tfileInfo.shareOwnerId = $el.attr('data-share-owner-id') || undefined;\n\n\t\t\t\tif( $el.attr('data-share-types')){\n\t\t\t\t\tfileInfo.shareTypes = $el.attr('data-share-types').split(',');\n\t\t\t\t}\n\n\t\t\t\tif( $el.attr('data-expiration')){\n\t\t\t\t\tvar expirationTimestamp = parseInt($el.attr('data-expiration'));\n\t\t\t\t\tfileInfo.shares = [];\n\t\t\t\t\tfileInfo.shares.push({expiration: expirationTimestamp});\n\t\t\t\t}\n\n\t\t\t\treturn fileInfo;\n\t\t\t};\n\n\t\t\tvar oldGetWebdavProperties = fileList._getWebdavProperties;\n\t\t\tfileList._getWebdavProperties = function() {\n\t\t\t\tvar props = oldGetWebdavProperties.apply(this, arguments);\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_OWNER_ID);\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME);\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_SHARE_TYPES);\n\t\t\t\treturn props;\n\t\t\t};\n\n\t\t\tfileList.filesClient.addFileInfoParser(function(response) {\n\t\t\t\tvar data = {};\n\t\t\t\tvar props = response.propStat[0].properties;\n\t\t\t\tvar permissionsProp = props[OC.Files.Client.PROPERTY_PERMISSIONS];\n\n\t\t\t\tif (permissionsProp && permissionsProp.indexOf('S') >= 0) {\n\t\t\t\t\tdata.shareOwner = props[OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME];\n\t\t\t\t\tdata.shareOwnerId = props[OC.Files.Client.PROPERTY_OWNER_ID];\n\t\t\t\t}\n\n\t\t\t\tvar shareTypesProp = props[OC.Files.Client.PROPERTY_SHARE_TYPES];\n\t\t\t\tif (shareTypesProp) {\n\t\t\t\t\tdata.shareTypes = _.chain(shareTypesProp).filter(function(xmlvalue) {\n\t\t\t\t\t\treturn (xmlvalue.namespaceURI === OC.Files.Client.NS_OWNCLOUD && xmlvalue.nodeName.split(':')[1] === 'share-type');\n\t\t\t\t\t}).map(function(xmlvalue) {\n\t\t\t\t\t\treturn parseInt(xmlvalue.textContent || xmlvalue.text, 10);\n\t\t\t\t\t}).value();\n\t\t\t\t}\n\n\t\t\t\treturn data;\n\t\t\t});\n\n\t\t\t// use delegate to catch the case with multiple file lists\n\t\t\tfileList.$el.on('fileActionsReady', function(ev){\n\t\t\t\tvar $files = ev.$files;\n\n\t\t\t\t_.each($files, function(file) {\n\t\t\t\t\tvar $tr = $(file);\n\t\t\t\t\tvar shareTypes = $tr.attr('data-share-types') || '';\n\t\t\t\t\tvar shareOwner = $tr.attr('data-share-owner');\n\t\t\t\t\tif (shareTypes || shareOwner) {\n\t\t\t\t\t\tvar hasLink = false;\n\t\t\t\t\t\tvar hasShares = false;\n\t\t\t\t\t\t_.each(shareTypes.split(',') || [], function(shareType) {\n\t\t\t\t\t\t\tshareType = parseInt(shareType, 10);\n\t\t\t\t\t\t\tif (shareType === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\t\thasLink = true;\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\t\t\thasLink = true;\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\t\t\t\thasShares = true;\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\t\t\t\thasShares = true;\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\t\t\t\t\thasShares = true;\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\t\t\t\thasShares = true;\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\t\t\t\t\thasShares = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tOCA.Sharing.Util._updateFileActionIcon($tr, hasShares, hasLink);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\n\t\t\tfileList.$el.on('changeDirectory', function() {\n\t\t\t\tOCA.Sharing.sharesLoaded = false;\n\t\t\t});\n\n\t\t\tfileActions.registerAction({\n\t\t\t\tname: 'Share',\n\t\t\t\tdisplayName: function(context) {\n\t\t\t\t\tif (context && context.$file) {\n\t\t\t\t\t\tvar shareType = parseInt(context.$file.data('share-types'), 10)\n\t\t\t\t\t\tvar shareOwner = context.$file.data('share-owner-id')\n\t\t\t\t\t\tif (shareType >= 0 || shareOwner) {\n\t\t\t\t\t\t\treturn t('core', 'Shared')\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn t('core', 'Share')\n\t\t\t\t},\n\t\t\t\taltText: t('core', 'Share'),\n\t\t\t\tmime: 'all',\n\t\t\t\torder: -150,\n\t\t\t\tpermissions: OC.PERMISSION_ALL,\n\t\t\t\ticonClass: function(fileName, context) {\n\t\t\t\t\tvar shareType = parseInt(context.$file.data('share-types'), 10)\n\t\t\t\t\tif (shareType === OC.Share.SHARE_TYPE_EMAIL\n\t\t\t\t\t\t|| shareType === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\treturn 'icon-public'\n\t\t\t\t\t}\n\t\t\t\t\treturn 'icon-shared'\n\t\t\t\t},\n\t\t\t\ticon: function(fileName, context) {\n\t\t\t\t\tvar shareOwner = context.$file.data('share-owner-id')\n\t\t\t\t\tif (shareOwner) {\n\t\t\t\t\t\treturn OC.generateUrl(`/avatar/${shareOwner}/32`)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\t\t// do not open sidebar if permission is set and equal to 0\n\t\t\t\t\tvar permissions = parseInt(context.$file.data('share-permissions'), 10);\n\t\t\t\t\tif (isNaN(permissions) || permissions > 0) {\n\t\t\t\t\t\tfileList.showDetailsView(fileName, 'shareTabView');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\trender: function(actionSpec, isDefault, context) {\n\t\t\t\t\tvar permissions = parseInt(context.$file.data('permissions'), 10);\n\t\t\t\t\t// if no share permissions but share owner exists, still show the link\n\t\t\t\t\tif ((permissions & OC.PERMISSION_SHARE) !== 0 || context.$file.attr('data-share-owner')) {\n\t\t\t\t\t\treturn fileActions._defaultRenderAction.call(fileActions, actionSpec, isDefault, context);\n\t\t\t\t\t}\n\t\t\t\t\t// don't render anything\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar shareTab = new OCA.Sharing.ShareTabView('shareTabView', {order: -20});\n\t\t\t// detect changes and change the matching list entry\n\t\t\tshareTab.on('sharesChanged', function(shareModel) {\n\t\t\t\tvar fileInfoModel = shareModel.fileInfoModel;\n\t\t\t\tvar $tr = fileList.findFileEl(fileInfoModel.get('name'));\n\n\t\t\t\t// We count email shares as link share\n\t\t\t\tvar hasLinkShares = shareModel.hasLinkShares();\n\t\t\t\tshareModel.get('shares').forEach(function (share) {\n\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\thasLinkShares = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tOCA.Sharing.Util._updateFileListDataAttributes(fileList, $tr, shareModel);\n\t\t\t\tif (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShares)) {\n\t\t\t\t\t// remove icon, if applicable\n\t\t\t\t\tOC.Share.markFileAsShared($tr, false, false);\n\t\t\t\t}\n\n\t\t\t\t// FIXME: this is too convoluted. We need to get rid of the above updates\n\t\t\t\t// and only ever update the model and let the events take care of rerendering\n\t\t\t\tfileInfoModel.set({\n\t\t\t\t\tshareTypes: shareModel.getShareTypes(),\n\t\t\t\t\t// in case markFileAsShared decided to change the icon,\n\t\t\t\t\t// we need to modify the model\n\t\t\t\t\t// (FIXME: yes, this is hacky)\n\t\t\t\t\ticon: $tr.attr('data-icon')\n\t\t\t\t});\n\t\t\t});\n\t\t\tfileList.registerTabView(shareTab);\n\n\t\t\tvar breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView({shareTab: shareTab});\n\t\t\tfileList.registerBreadCrumbDetailView(breadCrumbSharingDetailView);\n\t\t},\n\n\t\t/**\n\t\t * Update file list data attributes\n\t\t */\n\t\t_updateFileListDataAttributes: function(fileList, $tr, shareModel) {\n\t\t\t// files app current cannot show recipients on load, so we don't update the\n\t\t\t// icon when changed for consistency\n\t\t\tif (fileList.id === 'files') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar recipients = _.pluck(shareModel.get('shares'), 'share_with_displayname');\n\t\t\t// note: we only update the data attribute because updateIcon()\n\t\t\tif (recipients.length) {\n\t\t\t\tvar recipientData = _.mapObject(shareModel.get('shares'), function (share) {\n\t\t\t\t\treturn {shareWith: share.share_with, shareWithDisplayName: share.share_with_displayname};\n\t\t\t\t});\n\t\t\t\t$tr.attr('data-share-recipient-data', JSON.stringify(recipientData));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$tr.removeAttr('data-share-recipient-data');\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update the file action share icon for the given file\n\t\t *\n\t\t * @param $tr file element of the file to update\n\t\t * @param {boolean} hasUserShares true if a user share exists\n\t\t * @param {boolean} hasLinkShares true if a link share exists\n\t\t *\n\t\t * @return {boolean} true if the icon was set, false otherwise\n\t\t */\n\t\t_updateFileActionIcon: function($tr, hasUserShares, hasLinkShares) {\n\t\t\t// if the statuses are loaded already, use them for the icon\n\t\t\t// (needed when scrolling to the next page)\n\t\t\tif (hasUserShares || hasLinkShares || $tr.attr('data-share-recipient-data') || $tr.attr('data-share-owner')) {\n\t\t\t\tOC.Share.markFileAsShared($tr, true, hasLinkShares);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * @param {Array} fileData\n\t\t * @returns {String}\n\t\t */\n\t\tgetSharePermissions: function(fileData) {\n\t\t\treturn fileData.sharePermissions;\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.Files.FileList', OCA.Sharing.Util);\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* @global Handlebars */\n\n(function() {\n\tvar TEMPLATE =\n\t\t'<div>' +\n\t\t'<div class=\"dialogContainer\"></div>' +\n\t\t'<div id=\"collaborationResources\"></div>' +\n\t\t'</div>';\n\n\t/**\n\t * @memberof OCA.Sharing\n\t */\n\tvar ShareTabView = OCA.Files.DetailTabView.extend(\n\t\t/** @lends OCA.Sharing.ShareTabView.prototype */ {\n\t\tid: 'shareTabView',\n\t\tclassName: 'tab shareTabView',\n\n\t\tinitialize: function(name, options) {\n\t\t\tOCA.Files.DetailTabView.prototype.initialize.call(this, name, options);\n\t\t\tOC.Plugins.attach('OCA.Sharing.ShareTabView', this);\n\t\t},\n\n\t\ttemplate: function(params) {\n\t\t\treturn \tTEMPLATE;\n\t\t},\n\n\t\tgetLabel: function() {\n\t\t\treturn t('files_sharing', 'Sharing');\n\t\t},\n\n\t\tgetIcon: function() {\n\t\t\treturn 'icon-shared';\n\t\t},\n\n\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\trender: function() {\n\t\t\tvar self = this;\n\t\t\tif (this._dialog) {\n\t\t\t\t// remove/destroy older instance\n\t\t\t\tthis._dialog.model.off();\n\t\t\t\tthis._dialog.remove();\n\t\t\t\tthis._dialog = null;\n\t\t\t}\n\n\t\t\tif (this.model) {\n\t\t\t\tthis.$el.html(this.template());\n\n\t\t\t\tif (_.isUndefined(this.model.get('sharePermissions'))) {\n\t\t\t\t\tthis.model.set('sharePermissions', OCA.Sharing.Util.getSharePermissions(this.model.attributes));\n\t\t\t\t}\n\n\t\t\t\t// TODO: the model should read these directly off the passed fileInfoModel\n\t\t\t\tvar attributes = {\n\t\t\t\t\titemType: this.model.isDirectory() ? 'folder' : 'file',\n\t\t\t\t \titemSource: this.model.get('id'),\n\t\t\t\t\tpossiblePermissions: this.model.get('sharePermissions')\n\t\t\t\t};\n\t\t\t\tvar configModel = new OC.Share.ShareConfigModel();\n\t\t\t\tvar shareModel = new OC.Share.ShareItemModel(attributes, {\n\t\t\t\t\tconfigModel: configModel,\n\t\t\t\t\tfileInfoModel: this.model\n\t\t\t\t});\n\t\t\t\tthis._dialog = new OC.Share.ShareDialogView({\n\t\t\t\t\tconfigModel: configModel,\n\t\t\t\t\tmodel: shareModel\n\t\t\t\t});\n\t\t\t\tthis.$el.find('.dialogContainer').append(this._dialog.$el);\n\t\t\t\tthis._dialog.render();\n\t\t\t\tthis._dialog.model.fetch();\n\t\t\t\tthis._dialog.model.on('change', function() {\n\t\t\t\t\tself.trigger('sharesChanged', shareModel);\n\t\t\t\t});\n\n\t\t\t\timport('./collaborationresources').then((Resources) => {\n\t\t\t\t\tvar vm = new Resources.Vue({\n\t\t\t\t\t\tel: '#collaborationResources',\n\t\t\t\t\t\trender: h => h(Resources.View),\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tmodel: this.model.toJSON()\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t\tthis.model.on('change', () => { vm.data = this.model.toJSON() })\n\n\t\t\t\t})\n\n\t\t\t} else {\n\t\t\t\tthis.$el.empty();\n\t\t\t\t// TODO: render placeholder text?\n\t\t\t}\n\t\t\tthis.trigger('rendered');\n\t\t}\n\t});\n\n\tOCA.Sharing.ShareTabView = ShareTabView;\n})();\n\n","/* global Handlebars, OC */\n\n/**\n * @copyright 2016 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author 2016 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license GNU AGPL version 3 or any later version\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 */\n\n(function() {\n\t'use strict';\n\n\tvar BreadCrumbView = OC.Backbone.View.extend({\n\t\ttagName: 'span',\n\t\tevents: {\n\t\t\tclick: '_onClick'\n\t\t},\n\t\t_dirInfo: undefined,\n\n\t\t/** @type OCA.Sharing.ShareTabView */\n\t\t_shareTab: undefined,\n\n\t\tinitialize: function(options) {\n\t\t\tthis._shareTab = options.shareTab;\n\t\t},\n\n\t\trender: function(data) {\n\t\t\tthis._dirInfo = data.dirInfo || null;\n\n\t\t\tif (this._dirInfo !== null && (this._dirInfo.path !== '/' || this._dirInfo.name !== '')) {\n\t\t\t\tvar isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0;\n\t\t\t\tthis.$el.removeClass('shared icon-public icon-shared');\n\t\t\t\tif (isShared) {\n\t\t\t\t\tthis.$el.addClass('shared');\n\t\t\t\t\tif (data.dirInfo.shareTypes.indexOf(OC.Share.SHARE_TYPE_LINK) !== -1) {\n\t\t\t\t\t\tthis.$el.addClass('icon-public');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.$el.addClass('icon-shared');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.$el.addClass('icon-shared');\n\t\t\t\t}\n\t\t\t\tthis.$el.show();\n\t\t\t\tthis.delegateEvents();\n\t\t\t} else {\n\t\t\t\tthis.$el.removeClass('shared icon-public icon-shared');\n\t\t\t\tthis.$el.hide();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t_onClick: function(e) {\n\t\t\te.preventDefault();\n\n\t\t\tvar fileInfoModel = new OCA.Files.FileInfoModel(this._dirInfo);\n\t\t\tvar self = this;\n\t\t\tfileInfoModel.on('change', function() {\n\t\t\t\tself.render({\n\t\t\t\t\tdirInfo: self._dirInfo\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis._shareTab.on('sharesChanged', function(shareModel) {\n\t\t\t\tvar shareTypes = [];\n\t\t\t\tvar shares = shareModel.getSharesWithCurrentItem();\n\n\t\t\t\tfor(var i = 0; i < shares.length; i++) {\n\t\t\t\t\tif (shareTypes.indexOf(shares[i].share_type) === -1) {\n\t\t\t\t\t\tshareTypes.push(shares[i].share_type);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (shareModel.hasLinkShares()) {\n\t\t\t\t\tshareTypes.push(OC.Share.SHARE_TYPE_LINK);\n\t\t\t\t}\n\n\t\t\t\t// Since the dirInfo isn't updated we need to do this dark hackery\n\t\t\t\tself._dirInfo.shareTypes = shareTypes;\n\n\t\t\t\tself.render({\n\t\t\t\t\tdirInfo: self._dirInfo\n\t\t\t\t});\n\t\t\t});\n\t\t\tOCA.Files.App.fileList.showDetailsView(fileInfoModel, 'shareTabView');\n\t\t}\n\t});\n\n\tOCA.Sharing.ShareBreadCrumbView = BreadCrumbView;\n})();\n","var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharetabview.scss\");\n\nif (typeof content === 'string') {\n content = [[module.id, content, '']];\n}\n\nvar options = {}\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\")(content, options);\n\nif (content.locals) {\n module.exports = content.locals;\n}\n","exports = module.exports = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".app-files .shareTabView{min-height:100px}.share-autocomplete-item{display:flex}.share-autocomplete-item.merged{margin-left:32px}.share-autocomplete-item .autocomplete-item-text{margin-left:10px;margin-right:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:32px;vertical-align:middle;flex-grow:1}.share-autocomplete-item .autocomplete-item-text .ui-state-highlight{border:none;margin:0}.share-autocomplete-item.with-description .autocomplete-item-text{line-height:100%}.share-autocomplete-item .autocomplete-item-details{display:block;line-height:130%;font-size:90%;opacity:0.7}.share-autocomplete-item .icon{opacity:.7;margin-right:7px}.share-autocomplete-item .icon.search-globally{width:32px;height:32px;margin-right:0}.shareTabView .oneline{white-space:nowrap;position:relative}.shareTabView .shareWithLoading{padding-left:10px;right:35px;top:3px}.shareTabView .shareWithConfirm{position:absolute;right:2px;top:6px;padding:14px;opacity:0.5}.shareTabView .shareWithField:focus ~ .shareWithConfirm{opacity:1}.shareTabView .linkMore{position:absolute;right:-7px;top:-4px;padding:14px}.shareTabView .popovermenu .linkPassMenu input.error{border-color:var(--color-error) !important}.shareTabView .popovermenu .linkPassMenu input.error[type=\\\"submit\\\"]{border-left:none}.shareTabView .popovermenu .linkPassMenu .share-pass-submit{width:auto !important}.shareTabView .popovermenu .linkPassMenu .icon-loading-small{background-color:var(--color-main-background);position:absolute;right:8px;margin:3px;padding:10px;width:32px;height:32px;z-index:10}.shareTabView .popovermenu .datepicker{margin-left:35px}.shareTabView .popovermenu .share-add input.share-note-delete{border:none;background-color:transparent;width:44px !important;padding:0;flex:0 0 44px;margin-left:auto}.shareTabView .popovermenu .share-add input.share-note-delete.hidden{display:none}.shareTabView .popovermenu .share-note-form span.icon-note{position:relative}.shareTabView .popovermenu .share-note-form textarea.share-note{margin:0;width:200px;min-height:70px;resize:none}.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit{position:absolute;width:44px !important;height:44px;bottom:0px;right:10px;margin:0;background-color:transparent;border:none;opacity:.7}.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:hover,.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:focus,.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:active{opacity:1}.shareTabView .popovermenu .share-note-form.share-note-link{margin-bottom:10px}.shareTabView .popovermenu .new-share{border-top:1px solid var(--color-border)}.shareTabView .linkPass .icon-loading-small{margin-right:0px}.shareTabView .icon{background-size:16px 16px}.shareTabView .shareWithList .icon-loading-small:not(.hidden)+span,.shareTabView .linkShareView .icon-loading-small:not(.hidden)+input+label:before{display:none !important}.shareTabView input[type='checkbox']{margin:0 3px 0 8px;vertical-align:middle}.shareTabView input[type='text'].shareWithField,.shareTabView input[type='text'].emailField{width:100%;box-sizing:border-box;padding-right:32px;text-overflow:ellipsis}.shareTabView input[type='text'].linkText .shareTabView input[type='password'].linkPassText,.shareTabView input[type='password'].passwordField{width:180px !important}.shareTabView form{font-size:100%;margin-left:0;margin-right:0}.shareTabView .share-note{border-radius:var(--border-radius);margin-bottom:10px;margin-left:37px}.shareWithList{list-style-type:none;display:flex;flex-direction:column}.shareWithList>li{height:44px;white-space:normal;display:inline-flex;align-items:center;position:relative}.shareWithList>li .avatar{width:32px;height:32px;background-color:var(--color-primary)}.shareWithList .unshare img{vertical-align:text-bottom}.shareWithList .sharingOptionsGroup{margin-left:auto;display:flex;align-items:center;white-space:nowrap}.shareWithList .sharingOptionsGroup>.icon:not(.hidden),.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden){padding:14px;height:44px;width:44px;opacity:.5;display:block;cursor:pointer}.shareWithList .sharingOptionsGroup>.icon:not(.hidden):hover,.shareWithList .sharingOptionsGroup>.icon:not(.hidden):focus,.shareWithList .sharingOptionsGroup>.icon:not(.hidden):active,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):hover,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):focus,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):active{opacity:.7}.shareWithList .sharingOptionsGroup>.share-menu{position:relative;display:block}.shareWithList .username{padding:0 8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ui-autocomplete{max-height:calc(36px * 6.5);overflow-y:auto;overflow-x:hidden;z-index:1550 !important}.notCreatable{padding-left:12px;padding-top:12px;color:var(--color-text-lighter)}.contactsmenu-popover{left:-6px;right:auto;padding:3px 6px;top:100%;margin-top:0}.contactsmenu-popover li.hidden{display:none !important}.contactsmenu-popover:after{left:8px;right:auto}.reshare,#link label,#expiration label{display:inline-flex;align-items:center}.reshare .avatar,#link label .avatar,#expiration label .avatar{margin-right:5px}.resharerInfoView.subView{position:relative}\\n\", \"\"]);\n","var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharebreadcrumb.scss\");\n\nif (typeof content === 'string') {\n content = [[module.id, content, '']];\n}\n\nvar options = {}\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\")(content, options);\n\nif (content.locals) {\n module.exports = content.locals;\n}\n","exports = module.exports = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"div.crumb span.icon-shared,div.crumb span.icon-public{display:inline-block;cursor:pointer;opacity:0.2;margin-right:6px}div.crumb span.icon-shared.shared,div.crumb span.icon-public.shared{opacity:0.7}\\n\", \"\"]);\n"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/collaborationresourceshandler.js","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/vue-style-loader/lib/listToStyles.js","webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js","webpack:///./apps/files_sharing/src/additionalScripts.js","webpack:///./apps/files_sharing/src/share.js","webpack:///./apps/files_sharing/src/sharetabview.js","webpack:///./apps/files_sharing/src/sharebreadcrumbview.js","webpack:///./apps/files_sharing/src/style/sharetabview.scss?388d","webpack:///./apps/files_sharing/src/style/sharetabview.scss","webpack:///./apps/files_sharing/src/style/sharebreadcrumb.scss?fbff","webpack:///./apps/files_sharing/src/style/sharebreadcrumb.scss"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","0","1","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","__webpack_public_path__","OC","linkTo","__webpack_nonce__","btoa","requestToken","OCP","Collaboration","registerType","action","dialogs","filepicker","f","Files","getClient","getFileInfo","then","status","fileInfo","id","fail","FILEPICKER_TYPE_CHOOSE","allowDirectoryChooser","typeString","typeIconClass","useSourceMap","list","toString","this","map","item","content","cssMapping","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","listToStyles","parentId","styles","newStyles","part","css","media","parts","hasDocument","DEBUG","stylesInDom","getElementsByTagName","singletonElement","singletonCounter","isProduction","noop","options","ssrIdKey","isOldIE","navigator","test","userAgent","toLowerCase","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","obj","update","remove","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","filter","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","ssrId","firstChild","OCA","Sharing","_","extend","Client","PROPERTY_SHARE_TYPES","NS_OWNCLOUD","PROPERTY_OWNER_ID","PROPERTY_OWNER_DISPLAY_NAME","Util","attach","fileList","Share","fileActions","oldCreateRow","_createRow","fileData","tr","apply","arguments","sharePermissions","getSharePermissions","permissions","actions","Comment","Details","Goto","attr","shareOwner","shareOwnerId","mountType","PERMISSION_UPDATE","recipientData","isEmpty","shareTypes","oldElementToFile","elementToFile","$el","split","expirationTimestamp","parseInt","shares","expiration","oldGetWebdavProperties","_getWebdavProperties","props","filesClient","addFileInfoParser","response","propStat","properties","permissionsProp","PROPERTY_PERMISSIONS","indexOf","shareTypesProp","chain","xmlvalue","namespaceURI","nodeName","textContent","text","on","ev","$files","each","file","$tr","$","hasLink","hasShares","shareType","SHARE_TYPE_LINK","SHARE_TYPE_EMAIL","SHARE_TYPE_USER","SHARE_TYPE_GROUP","SHARE_TYPE_REMOTE","SHARE_TYPE_CIRCLE","SHARE_TYPE_ROOM","_updateFileActionIcon","sharesLoaded","registerAction","displayName","context","$file","altText","mime","order","PERMISSION_ALL","iconClass","fileName","icon","generateUrl","FileActions","TYPE_INLINE","actionHandler","isNaN","showDetailsView","render","actionSpec","isDefault","PERMISSION_SHARE","_defaultRenderAction","shareTab","ShareTabView","shareModel","fileInfoModel","findFileEl","hasLinkShares","forEach","share","share_type","_updateFileListDataAttributes","hasUserShares","markFileAsShared","set","getShareTypes","registerTabView","breadCrumbSharingDetailView","ShareBreadCrumbView","registerBreadCrumbDetailView","pluck","mapObject","shareWith","share_with","shareWithDisplayName","share_with_displayname","removeAttr","Plugins","register","DetailTabView","className","initialize","template","params","getLabel","getIcon","self","_dialog","model","off","html","isUndefined","attributes","itemType","isDirectory","itemSource","possiblePermissions","configModel","ShareConfigModel","ShareItemModel","ShareDialogView","find","append","fetch","trigger","Resources","vm","Vue","el","h","View","toJSON","empty","BreadCrumbView","Backbone","tagName","events","click","_dirInfo","_shareTab","dirInfo","path","removeClass","hide","isShared","addClass","show","delegateEvents","_onClick","preventDefault","FileInfoModel","getSharesWithCurrentItem","App","locals","add","default"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBV,IAAYU,EAAgBV,IACpFI,EAASO,KAAKD,EAAgBV,GAAS,IAExCU,EAAgBV,GAAW,EAE5B,IAAID,KAAYG,EACZI,OAAOC,UAAUC,eAAeC,KAAKP,EAAaH,KACpDa,EAAQb,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCM,EAASC,QACdD,EAASU,OAATV,GAOF,IAAIW,EAAmB,GAKnBL,EAAkB,CACrBM,EAAG,EACHC,EAAG,GAWJ,SAASC,EAAoBnB,GAG5B,GAAGgB,EAAiBhB,GACnB,OAAOgB,EAAiBhB,GAAUoB,QAGnC,IAAIC,EAASL,EAAiBhB,GAAY,CACzCI,EAAGJ,EACHsB,GAAG,EACHF,QAAS,IAUV,OANAP,EAAQb,GAAUU,KAAKW,EAAOD,QAASC,EAAQA,EAAOD,QAASD,GAG/DE,EAAOC,GAAI,EAGJD,EAAOD,QAKfD,EAAoBI,EAAI,SAAuBtB,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EAAQ,GAAqEC,SACtE,WAAYvQ,GAAS,EAAM,K,iBCRlCpG,EAAOD,QAAU,EAAQ,EAAR,EAAmE,IAEtFR,KAAK,CAACS,EAAOjB,EAAI,gwKAAiwK,M,gBCC1xK,IAAIqH,EAAU,EAAQ,IACA,iBAAZA,IAAsBA,EAAU,CAAC,CAACpG,EAAOjB,EAAIqH,EAAS,MAC7DA,EAAQqQ,SAAQzW,EAAOD,QAAUqG,EAAQqQ,SAG/BC,EADH,EAAQ,GAAqEC,SACtE,WAAYvQ,GAAS,EAAM,K,iBCRlCpG,EAAOD,QAAU,EAAQ,EAAR,EAAmE,IAEtFR,KAAK,CAACS,EAAOjB,EAAI,4MAA6M","file":"additionalScripts.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0,\n \t\t1: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"files_sharing.\" + chunkId + \".js?v=\" + {\"3\":\"12cd6bab17f9a2537bc9\",\"4\":\"4e4a795c94e467758967\"}[chunkId] + \"\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonpFilesSharing\"] = window[\"webpackJsonpFilesSharing\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","// eslint-disable-next-line camelcase\n__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n\nwindow.OCP.Collaboration.registerType('file', {\n\taction: () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tOC.dialogs.filepicker(t('files_sharing', 'Link to a file'), function(f) {\n\t\t\t\tconst client = OC.Files.getClient()\n\t\t\t\tclient.getFileInfo(f).then((status, fileInfo) => {\n\t\t\t\t\tresolve(fileInfo.id)\n\t\t\t\t}).fail(() => {\n\t\t\t\t\treject(new Error('Cannot get fileinfo'))\n\t\t\t\t})\n\t\t\t}, false, null, false, OC.dialogs.FILEPICKER_TYPE_CHOOSE, '', { allowDirectoryChooser: true })\n\t\t})\n\t},\n\ttypeString: t('files_sharing', 'Link to a file'),\n\ttypeIconClass: 'icon-files-dark'\n})\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \"{\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = modules[_i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = \"(\".concat(item[2], \") and (\").concat(mediaQuery, \")\");\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot).concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nexport default function addStylesClient (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n","import './share'\nimport './sharetabview'\nimport './sharebreadcrumbview'\n\nimport './style/sharetabview.scss'\nimport './style/sharebreadcrumb.scss'\n\nimport './collaborationresourceshandler.js'\n\n// eslint-disable-next-line camelcase\n__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n\nwindow.OCA.Sharing = OCA.Sharing\n","/* eslint-disable */\n/*\n * Copyright (c) 2014\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_SHARE_TYPES:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}share-types',\n\t\tPROPERTY_OWNER_ID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}owner-id',\n\t\tPROPERTY_OWNER_DISPLAY_NAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}owner-display-name'\n\t})\n\n\tif (!OCA.Sharing) {\n\t\tOCA.Sharing = {}\n\t}\n\t/**\n\t * @namespace\n\t */\n\tOCA.Sharing.Util = {\n\t\t/**\n\t\t * Initialize the sharing plugin.\n\t\t *\n\t\t * Registers the \"Share\" file action and adds additional\n\t\t * DOM attributes for the sharing file info.\n\t\t *\n\t\t * @param {OCA.Files.FileList} fileList file list to be extended\n\t\t */\n\t\tattach: function(fileList) {\n\t\t\t// core sharing is disabled/not loaded\n\t\t\tif (!OC.Share) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (fileList.id === 'trashbin' || fileList.id === 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tvar fileActions = fileList.fileActions\n\t\t\tvar oldCreateRow = fileList._createRow\n\t\t\tfileList._createRow = function(fileData) {\n\n\t\t\t\tvar tr = oldCreateRow.apply(this, arguments)\n\t\t\t\tvar sharePermissions = OCA.Sharing.Util.getSharePermissions(fileData)\n\n\t\t\t\tif (fileData.permissions === 0) {\n\t\t\t\t\t// no permission, disabling sidebar\n\t\t\t\t\tdelete fileActions.actions.all.Comment\n\t\t\t\t\tdelete fileActions.actions.all.Details\n\t\t\t\t\tdelete fileActions.actions.all.Goto\n\t\t\t\t}\n\t\t\t\ttr.attr('data-share-permissions', sharePermissions)\n\t\t\t\tif (fileData.shareOwner) {\n\t\t\t\t\ttr.attr('data-share-owner', fileData.shareOwner)\n\t\t\t\t\ttr.attr('data-share-owner-id', fileData.shareOwnerId)\n\t\t\t\t\t// user should always be able to rename a mount point\n\t\t\t\t\tif (fileData.mountType === 'shared-root') {\n\t\t\t\t\t\ttr.attr('data-permissions', fileData.permissions | OC.PERMISSION_UPDATE)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (fileData.recipientData && !_.isEmpty(fileData.recipientData)) {\n\t\t\t\t\ttr.attr('data-share-recipient-data', JSON.stringify(fileData.recipientData))\n\t\t\t\t}\n\t\t\t\tif (fileData.shareTypes) {\n\t\t\t\t\ttr.attr('data-share-types', fileData.shareTypes.join(','))\n\t\t\t\t}\n\t\t\t\treturn tr\n\t\t\t}\n\n\t\t\tvar oldElementToFile = fileList.elementToFile\n\t\t\tfileList.elementToFile = function($el) {\n\t\t\t\tvar fileInfo = oldElementToFile.apply(this, arguments)\n\t\t\t\tfileInfo.sharePermissions = $el.attr('data-share-permissions') || undefined\n\t\t\t\tfileInfo.shareOwner = $el.attr('data-share-owner') || undefined\n\t\t\t\tfileInfo.shareOwnerId = $el.attr('data-share-owner-id') || undefined\n\n\t\t\t\tif ($el.attr('data-share-types')) {\n\t\t\t\t\tfileInfo.shareTypes = $el.attr('data-share-types').split(',')\n\t\t\t\t}\n\n\t\t\t\tif ($el.attr('data-expiration')) {\n\t\t\t\t\tvar expirationTimestamp = parseInt($el.attr('data-expiration'))\n\t\t\t\t\tfileInfo.shares = []\n\t\t\t\t\tfileInfo.shares.push({ expiration: expirationTimestamp })\n\t\t\t\t}\n\n\t\t\t\treturn fileInfo\n\t\t\t}\n\n\t\t\tvar oldGetWebdavProperties = fileList._getWebdavProperties\n\t\t\tfileList._getWebdavProperties = function() {\n\t\t\t\tvar props = oldGetWebdavProperties.apply(this, arguments)\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_OWNER_ID)\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME)\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_SHARE_TYPES)\n\t\t\t\treturn props\n\t\t\t}\n\n\t\t\tfileList.filesClient.addFileInfoParser(function(response) {\n\t\t\t\tvar data = {}\n\t\t\t\tvar props = response.propStat[0].properties\n\t\t\t\tvar permissionsProp = props[OC.Files.Client.PROPERTY_PERMISSIONS]\n\n\t\t\t\tif (permissionsProp && permissionsProp.indexOf('S') >= 0) {\n\t\t\t\t\tdata.shareOwner = props[OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME]\n\t\t\t\t\tdata.shareOwnerId = props[OC.Files.Client.PROPERTY_OWNER_ID]\n\t\t\t\t}\n\n\t\t\t\tvar shareTypesProp = props[OC.Files.Client.PROPERTY_SHARE_TYPES]\n\t\t\t\tif (shareTypesProp) {\n\t\t\t\t\tdata.shareTypes = _.chain(shareTypesProp).filter(function(xmlvalue) {\n\t\t\t\t\t\treturn (xmlvalue.namespaceURI === OC.Files.Client.NS_OWNCLOUD && xmlvalue.nodeName.split(':')[1] === 'share-type')\n\t\t\t\t\t}).map(function(xmlvalue) {\n\t\t\t\t\t\treturn parseInt(xmlvalue.textContent || xmlvalue.text, 10)\n\t\t\t\t\t}).value()\n\t\t\t\t}\n\n\t\t\t\treturn data\n\t\t\t})\n\n\t\t\t// use delegate to catch the case with multiple file lists\n\t\t\tfileList.$el.on('fileActionsReady', function(ev) {\n\t\t\t\tvar $files = ev.$files\n\n\t\t\t\t_.each($files, function(file) {\n\t\t\t\t\tvar $tr = $(file)\n\t\t\t\t\tvar shareTypes = $tr.attr('data-share-types') || ''\n\t\t\t\t\tvar shareOwner = $tr.attr('data-share-owner')\n\t\t\t\t\tif (shareTypes || shareOwner) {\n\t\t\t\t\t\tvar hasLink = false\n\t\t\t\t\t\tvar hasShares = false\n\t\t\t\t\t\t_.each(shareTypes.split(',') || [], function(shareType) {\n\t\t\t\t\t\t\tshareType = parseInt(shareType, 10)\n\t\t\t\t\t\t\tif (shareType === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\t\thasLink = true\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\t\t\thasLink = true\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\t\t\t\thasShares = true\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\t\t\t\thasShares = true\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\t\t\t\t\thasShares = true\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\t\t\t\thasShares = true\n\t\t\t\t\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\t\t\t\t\thasShares = true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\tOCA.Sharing.Util._updateFileActionIcon($tr, hasShares, hasLink)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\n\t\t\tfileList.$el.on('changeDirectory', function() {\n\t\t\t\tOCA.Sharing.sharesLoaded = false\n\t\t\t})\n\n\t\t\tfileActions.registerAction({\n\t\t\t\tname: 'Share',\n\t\t\t\tdisplayName: function(context) {\n\t\t\t\t\tif (context && context.$file) {\n\t\t\t\t\t\tvar shareType = parseInt(context.$file.data('share-types'), 10)\n\t\t\t\t\t\tvar shareOwner = context.$file.data('share-owner-id')\n\t\t\t\t\t\tif (shareType >= 0 || shareOwner) {\n\t\t\t\t\t\t\treturn t('core', 'Shared')\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn t('core', 'Share')\n\t\t\t\t},\n\t\t\t\taltText: t('core', 'Share'),\n\t\t\t\tmime: 'all',\n\t\t\t\torder: -150,\n\t\t\t\tpermissions: OC.PERMISSION_ALL,\n\t\t\t\ticonClass: function(fileName, context) {\n\t\t\t\t\tvar shareType = parseInt(context.$file.data('share-types'), 10)\n\t\t\t\t\tif (shareType === OC.Share.SHARE_TYPE_EMAIL\n\t\t\t\t\t\t|| shareType === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\treturn 'icon-public'\n\t\t\t\t\t}\n\t\t\t\t\treturn 'icon-shared'\n\t\t\t\t},\n\t\t\t\ticon: function(fileName, context) {\n\t\t\t\t\tvar shareOwner = context.$file.data('share-owner-id')\n\t\t\t\t\tif (shareOwner) {\n\t\t\t\t\t\treturn OC.generateUrl(`/avatar/${shareOwner}/32`)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\t\t// do not open sidebar if permission is set and equal to 0\n\t\t\t\t\tvar permissions = parseInt(context.$file.data('share-permissions'), 10)\n\t\t\t\t\tif (isNaN(permissions) || permissions > 0) {\n\t\t\t\t\t\tfileList.showDetailsView(fileName, 'shareTabView')\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\trender: function(actionSpec, isDefault, context) {\n\t\t\t\t\tvar permissions = parseInt(context.$file.data('permissions'), 10)\n\t\t\t\t\t// if no share permissions but share owner exists, still show the link\n\t\t\t\t\tif ((permissions & OC.PERMISSION_SHARE) !== 0 || context.$file.attr('data-share-owner')) {\n\t\t\t\t\t\treturn fileActions._defaultRenderAction.call(fileActions, actionSpec, isDefault, context)\n\t\t\t\t\t}\n\t\t\t\t\t// don't render anything\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tvar shareTab = new OCA.Sharing.ShareTabView('shareTabView', { order: -20 })\n\t\t\t// detect changes and change the matching list entry\n\t\t\tshareTab.on('sharesChanged', function(shareModel) {\n\t\t\t\tvar fileInfoModel = shareModel.fileInfoModel\n\t\t\t\tvar $tr = fileList.findFileEl(fileInfoModel.get('name'))\n\n\t\t\t\t// We count email shares as link share\n\t\t\t\tvar hasLinkShares = shareModel.hasLinkShares()\n\t\t\t\tshareModel.get('shares').forEach(function(share) {\n\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\thasLinkShares = true\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tOCA.Sharing.Util._updateFileListDataAttributes(fileList, $tr, shareModel)\n\t\t\t\tif (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShares)) {\n\t\t\t\t\t// remove icon, if applicable\n\t\t\t\t\tOC.Share.markFileAsShared($tr, false, false)\n\t\t\t\t}\n\n\t\t\t\t// FIXME: this is too convoluted. We need to get rid of the above updates\n\t\t\t\t// and only ever update the model and let the events take care of rerendering\n\t\t\t\tfileInfoModel.set({\n\t\t\t\t\tshareTypes: shareModel.getShareTypes(),\n\t\t\t\t\t// in case markFileAsShared decided to change the icon,\n\t\t\t\t\t// we need to modify the model\n\t\t\t\t\t// (FIXME: yes, this is hacky)\n\t\t\t\t\ticon: $tr.attr('data-icon')\n\t\t\t\t})\n\t\t\t})\n\t\t\tfileList.registerTabView(shareTab)\n\n\t\t\tvar breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView({ shareTab: shareTab })\n\t\t\tfileList.registerBreadCrumbDetailView(breadCrumbSharingDetailView)\n\t\t},\n\n\t\t/**\n\t\t * Update file list data attributes\n\t\t */\n\t\t_updateFileListDataAttributes: function(fileList, $tr, shareModel) {\n\t\t\t// files app current cannot show recipients on load, so we don't update the\n\t\t\t// icon when changed for consistency\n\t\t\tif (fileList.id === 'files') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tvar recipients = _.pluck(shareModel.get('shares'), 'share_with_displayname')\n\t\t\t// note: we only update the data attribute because updateIcon()\n\t\t\tif (recipients.length) {\n\t\t\t\tvar recipientData = _.mapObject(shareModel.get('shares'), function(share) {\n\t\t\t\t\treturn { shareWith: share.share_with, shareWithDisplayName: share.share_with_displayname }\n\t\t\t\t})\n\t\t\t\t$tr.attr('data-share-recipient-data', JSON.stringify(recipientData))\n\t\t\t} else {\n\t\t\t\t$tr.removeAttr('data-share-recipient-data')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update the file action share icon for the given file\n\t\t *\n\t\t * @param $tr file element of the file to update\n\t\t * @param {boolean} hasUserShares true if a user share exists\n\t\t * @param {boolean} hasLinkShares true if a link share exists\n\t\t *\n\t\t * @returns {boolean} true if the icon was set, false otherwise\n\t\t */\n\t\t_updateFileActionIcon: function($tr, hasUserShares, hasLinkShares) {\n\t\t\t// if the statuses are loaded already, use them for the icon\n\t\t\t// (needed when scrolling to the next page)\n\t\t\tif (hasUserShares || hasLinkShares || $tr.attr('data-share-recipient-data') || $tr.attr('data-share-owner')) {\n\t\t\t\tOC.Share.markFileAsShared($tr, true, hasLinkShares)\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * @param {Array} fileData\n\t\t * @returns {String}\n\t\t */\n\t\tgetSharePermissions: function(fileData) {\n\t\t\treturn fileData.sharePermissions\n\t\t}\n\t}\n})()\n\nOC.Plugins.register('OCA.Files.FileList', OCA.Sharing.Util)\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* @global Handlebars */\n\n(function() {\n\tvar TEMPLATE\n\t\t= '<div>'\n\t\t+ '<div class=\"dialogContainer\"></div>'\n\t\t+ '<div id=\"collaborationResources\"></div>'\n\t\t+ '</div>'\n\n\t/**\n\t * @memberof OCA.Sharing\n\t */\n\tvar ShareTabView = OCA.Files.DetailTabView.extend(\n\t\t/** @lends OCA.Sharing.ShareTabView.prototype */ {\n\t\t\tid: 'shareTabView',\n\t\t\tclassName: 'tab shareTabView',\n\n\t\t\tinitialize: function(name, options) {\n\t\t\t\tOCA.Files.DetailTabView.prototype.initialize.call(this, name, options)\n\t\t\t\tOC.Plugins.attach('OCA.Sharing.ShareTabView', this)\n\t\t\t},\n\n\t\t\ttemplate: function(params) {\n\t\t\t\treturn \tTEMPLATE\n\t\t\t},\n\n\t\t\tgetLabel: function() {\n\t\t\t\treturn t('files_sharing', 'Sharing')\n\t\t\t},\n\n\t\t\tgetIcon: function() {\n\t\t\t\treturn 'icon-shared'\n\t\t\t},\n\n\t\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\t\trender: function() {\n\t\t\t\tvar self = this\n\t\t\t\tif (this._dialog) {\n\t\t\t\t// remove/destroy older instance\n\t\t\t\t\tthis._dialog.model.off()\n\t\t\t\t\tthis._dialog.remove()\n\t\t\t\t\tthis._dialog = null\n\t\t\t\t}\n\n\t\t\t\tif (this.model) {\n\t\t\t\t\tthis.$el.html(this.template())\n\n\t\t\t\t\tif (_.isUndefined(this.model.get('sharePermissions'))) {\n\t\t\t\t\t\tthis.model.set('sharePermissions', OCA.Sharing.Util.getSharePermissions(this.model.attributes))\n\t\t\t\t\t}\n\n\t\t\t\t\t// TODO: the model should read these directly off the passed fileInfoModel\n\t\t\t\t\tvar attributes = {\n\t\t\t\t\t\titemType: this.model.isDirectory() ? 'folder' : 'file',\n\t\t\t\t\t\titemSource: this.model.get('id'),\n\t\t\t\t\t\tpossiblePermissions: this.model.get('sharePermissions')\n\t\t\t\t\t}\n\t\t\t\t\tvar configModel = new OC.Share.ShareConfigModel()\n\t\t\t\t\tvar shareModel = new OC.Share.ShareItemModel(attributes, {\n\t\t\t\t\t\tconfigModel: configModel,\n\t\t\t\t\t\tfileInfoModel: this.model\n\t\t\t\t\t})\n\t\t\t\t\tthis._dialog = new OC.Share.ShareDialogView({\n\t\t\t\t\t\tconfigModel: configModel,\n\t\t\t\t\t\tmodel: shareModel\n\t\t\t\t\t})\n\t\t\t\t\tthis.$el.find('.dialogContainer').append(this._dialog.$el)\n\t\t\t\t\tthis._dialog.render()\n\t\t\t\t\tthis._dialog.model.fetch()\n\t\t\t\t\tthis._dialog.model.on('change', function() {\n\t\t\t\t\t\tself.trigger('sharesChanged', shareModel)\n\t\t\t\t\t})\n\n\t\t\t\timport('./collaborationresources').then((Resources) => {\n\t\t\t\t\tvar vm = new Resources.Vue({\n\t\t\t\t\t\tel: '#collaborationResources',\n\t\t\t\t\t\trender: h => h(Resources.View),\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tmodel: this.model.toJSON()\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.model.on('change', () => { vm.data = this.model.toJSON() })\n\n\t\t\t\t})\n\n\t\t\t\t} else {\n\t\t\t\t\tthis.$el.empty()\n\t\t\t\t// TODO: render placeholder text?\n\t\t\t\t}\n\t\t\t\tthis.trigger('rendered')\n\t\t\t}\n\t\t})\n\n\tOCA.Sharing.ShareTabView = ShareTabView\n})()\n","/**\n * @copyright 2016 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author 2016 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license GNU AGPL version 3 or any later version\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 */\n\n(function() {\n\t'use strict'\n\n\tvar BreadCrumbView = OC.Backbone.View.extend({\n\t\ttagName: 'span',\n\t\tevents: {\n\t\t\tclick: '_onClick'\n\t\t},\n\t\t_dirInfo: undefined,\n\n\t\t/** @type OCA.Sharing.ShareTabView */\n\t\t_shareTab: undefined,\n\n\t\tinitialize: function(options) {\n\t\t\tthis._shareTab = options.shareTab\n\t\t},\n\n\t\trender: function(data) {\n\t\t\tthis._dirInfo = data.dirInfo || null\n\n\t\t\tif (this._dirInfo !== null && (this._dirInfo.path !== '/' || this._dirInfo.name !== '')) {\n\t\t\t\tvar isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0\n\t\t\t\tthis.$el.removeClass('shared icon-public icon-shared')\n\t\t\t\tif (isShared) {\n\t\t\t\t\tthis.$el.addClass('shared')\n\t\t\t\t\tif (data.dirInfo.shareTypes.indexOf(OC.Share.SHARE_TYPE_LINK) !== -1) {\n\t\t\t\t\t\tthis.$el.addClass('icon-public')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.$el.addClass('icon-shared')\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.$el.addClass('icon-shared')\n\t\t\t\t}\n\t\t\t\tthis.$el.show()\n\t\t\t\tthis.delegateEvents()\n\t\t\t} else {\n\t\t\t\tthis.$el.removeClass('shared icon-public icon-shared')\n\t\t\t\tthis.$el.hide()\n\t\t\t}\n\n\t\t\treturn this\n\t\t},\n\t\t_onClick: function(e) {\n\t\t\te.preventDefault()\n\n\t\t\tvar fileInfoModel = new OCA.Files.FileInfoModel(this._dirInfo)\n\t\t\tvar self = this\n\t\t\tfileInfoModel.on('change', function() {\n\t\t\t\tself.render({\n\t\t\t\t\tdirInfo: self._dirInfo\n\t\t\t\t})\n\t\t\t})\n\t\t\tthis._shareTab.on('sharesChanged', function(shareModel) {\n\t\t\t\tvar shareTypes = []\n\t\t\t\tvar shares = shareModel.getSharesWithCurrentItem()\n\n\t\t\t\tfor (var i = 0; i < shares.length; i++) {\n\t\t\t\t\tif (shareTypes.indexOf(shares[i].share_type) === -1) {\n\t\t\t\t\t\tshareTypes.push(shares[i].share_type)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (shareModel.hasLinkShares()) {\n\t\t\t\t\tshareTypes.push(OC.Share.SHARE_TYPE_LINK)\n\t\t\t\t}\n\n\t\t\t\t// Since the dirInfo isn't updated we need to do this dark hackery\n\t\t\t\tself._dirInfo.shareTypes = shareTypes\n\n\t\t\t\tself.render({\n\t\t\t\t\tdirInfo: self._dirInfo\n\t\t\t\t})\n\t\t\t})\n\t\t\tOCA.Files.App.fileList.showDetailsView(fileInfoModel, 'shareTabView')\n\t\t}\n\t})\n\n\tOCA.Sharing.ShareBreadCrumbView = BreadCrumbView\n})()\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharetabview.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"3e5548ea\", content, true, {});","exports = module.exports = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".app-files .shareTabView{min-height:100px}.share-autocomplete-item{display:flex}.share-autocomplete-item.merged{margin-left:32px}.share-autocomplete-item .autocomplete-item-text{margin-left:10px;margin-right:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:32px;vertical-align:middle;flex-grow:1}.share-autocomplete-item .autocomplete-item-text .ui-state-highlight{border:none;margin:0}.share-autocomplete-item.with-description .autocomplete-item-text{line-height:100%}.share-autocomplete-item .autocomplete-item-details{display:block;line-height:130%;font-size:90%;opacity:0.7}.share-autocomplete-item .icon{opacity:.7;margin-right:7px}.share-autocomplete-item .icon.search-globally{width:32px;height:32px;margin-right:0}.shareTabView .oneline{white-space:nowrap;position:relative}.shareTabView .shareWithLoading{padding-left:10px;right:35px;top:3px}.shareTabView .shareWithConfirm{position:absolute;right:2px;top:6px;padding:14px;opacity:0.5}.shareTabView .shareWithField:focus ~ .shareWithConfirm{opacity:1}.shareTabView .linkMore{position:absolute;right:-7px;top:-4px;padding:14px}.shareTabView .popovermenu .linkPassMenu input.error{border-color:var(--color-error) !important}.shareTabView .popovermenu .linkPassMenu input.error[type=\\\"submit\\\"]{border-left:none}.shareTabView .popovermenu .linkPassMenu .share-pass-submit{width:auto !important}.shareTabView .popovermenu .linkPassMenu .icon-loading-small{background-color:var(--color-main-background);position:absolute;right:8px;margin:3px;padding:10px;width:32px;height:32px;z-index:10}.shareTabView .popovermenu .datepicker{margin-left:35px}.shareTabView .popovermenu .share-add input.share-note-delete{border:none;background-color:transparent;width:44px !important;padding:0;flex:0 0 44px;margin-left:auto}.shareTabView .popovermenu .share-add input.share-note-delete.hidden{display:none}.shareTabView .popovermenu .share-note-form span.icon-note{position:relative}.shareTabView .popovermenu .share-note-form textarea.share-note{margin:0;width:200px;min-height:70px;resize:none}.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit{position:absolute;width:44px !important;height:44px;bottom:0px;right:10px;margin:0;background-color:transparent;border:none;opacity:.7}.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:hover,.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:focus,.shareTabView .popovermenu .share-note-form textarea.share-note+input.share-note-submit:active{opacity:1}.shareTabView .popovermenu .share-note-form.share-note-link{margin-bottom:10px}.shareTabView .popovermenu .new-share{border-top:1px solid var(--color-border)}.shareTabView .linkPass .icon-loading-small{margin-right:0px}.shareTabView .icon{background-size:16px 16px}.shareTabView .shareWithList .icon-loading-small:not(.hidden)+span,.shareTabView .linkShareView .icon-loading-small:not(.hidden)+input+label:before{display:none !important}.shareTabView input[type='checkbox']{margin:0 3px 0 8px;vertical-align:middle}.shareTabView input[type='text'].shareWithField,.shareTabView input[type='text'].emailField{width:100%;box-sizing:border-box;padding-right:32px;text-overflow:ellipsis}.shareTabView input[type='text'].linkText .shareTabView input[type='password'].linkPassText,.shareTabView input[type='password'].passwordField{width:180px !important}.shareTabView form{font-size:100%;margin-left:0;margin-right:0}.shareTabView .share-note{border-radius:var(--border-radius);margin-bottom:10px;margin-left:37px}.shareWithList{list-style-type:none;display:flex;flex-direction:column}.shareWithList>li{height:44px;white-space:normal;display:inline-flex;align-items:center;position:relative}.shareWithList>li .avatar{width:32px;height:32px;background-color:var(--color-primary)}.shareWithList .unshare img{vertical-align:text-bottom}.shareWithList .sharingOptionsGroup{margin-left:auto;display:flex;align-items:center;white-space:nowrap}.shareWithList .sharingOptionsGroup>.icon:not(.hidden),.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden){padding:14px;height:44px;width:44px;opacity:.5;display:block;cursor:pointer}.shareWithList .sharingOptionsGroup>.icon:not(.hidden):hover,.shareWithList .sharingOptionsGroup>.icon:not(.hidden):focus,.shareWithList .sharingOptionsGroup>.icon:not(.hidden):active,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):hover,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):focus,.shareWithList .sharingOptionsGroup .share-menu>.icon:not(.hidden):active{opacity:.7}.shareWithList .sharingOptionsGroup>.share-menu{position:relative;display:block}.shareWithList .username{padding:0 8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ui-autocomplete{max-height:calc(36px * 6.5);overflow-y:auto;overflow-x:hidden;z-index:1550 !important}.notCreatable{padding-left:12px;padding-top:12px;color:var(--color-text-lighter)}.contactsmenu-popover{left:-6px;right:auto;padding:3px 6px;top:100%;margin-top:0}.contactsmenu-popover li.hidden{display:none !important}.contactsmenu-popover:after{left:8px;right:auto}.reshare,#link label,#expiration label{display:inline-flex;align-items:center}.reshare .avatar,#link label .avatar,#expiration label .avatar{margin-right:5px}.resharerInfoView.subView{position:relative}\\n\", \"\"]);\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharebreadcrumb.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"57e7eec1\", content, true, {});","exports = module.exports = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"div.crumb span.icon-shared,div.crumb span.icon-public{display:inline-block;cursor:pointer;opacity:0.2;margin-right:6px}div.crumb span.icon-shared.shared,div.crumb span.icon-public.shared{opacity:0.7}\\n\", \"\"]);\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/apps/files_sharing/js/dist/collaboration.js b/apps/files_sharing/js/dist/collaboration.js
index 22509085e98..5dd0e126a1f 100644
--- a/apps/files_sharing/js/dist/collaboration.js
+++ b/apps/files_sharing/js/dist/collaboration.js
@@ -1,2 +1,2 @@
-!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/js/",t(t.s=0)}([function(e,n,r){r.p=OC.linkTo("files_sharing","js/dist/"),r.nc=btoa(OC.requestToken),window.OCP.Collaboration.registerType("file",{action:function(){return new Promise((function(e,n){OC.dialogs.filepicker(t("files_sharing","Link to a file"),(function(t){OC.Files.getClient().getFileInfo(t).then((function(n,t){e(t.id)})).fail((function(){n()}))}),!1,null,!1,OC.dialogs.FILEPICKER_TYPE_CHOOSE,"",{allowDirectoryChooser:!0})}))},typeString:t("files_sharing","Link to a file"),typeIconClass:"icon-files-dark"})}]);
+!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/js/",t(t.s=0)}([function(e,n,r){r.p=OC.linkTo("files_sharing","js/dist/"),r.nc=btoa(OC.requestToken),window.OCP.Collaboration.registerType("file",{action:function(){return new Promise((function(e,n){OC.dialogs.filepicker(t("files_sharing","Link to a file"),(function(t){OC.Files.getClient().getFileInfo(t).then((function(n,t){e(t.id)})).fail((function(){n(new Error("Cannot get fileinfo"))}))}),!1,null,!1,OC.dialogs.FILEPICKER_TYPE_CHOOSE,"",{allowDirectoryChooser:!0})}))},typeString:t("files_sharing","Link to a file"),typeIconClass:"icon-files-dark"})}]);
//# sourceMappingURL=collaboration.js.map \ No newline at end of file
diff --git a/apps/files_sharing/js/dist/collaboration.js.map b/apps/files_sharing/js/dist/collaboration.js.map
index 0b92d9f393d..ddca7ef4959 100644
--- a/apps/files_sharing/js/dist/collaboration.js.map
+++ b/apps/files_sharing/js/dist/collaboration.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/collaborationresourceshandler.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_public_path__","OC","linkTo","__webpack_nonce__","btoa","requestToken","window","OCP","Collaboration","registerType","action","Promise","resolve","reject","dialogs","filepicker","f","Files","getClient","getFileInfo","then","status","fileInfo","id","fail","FILEPICKER_TYPE_CHOOSE","allowDirectoryChooser","typeString","typeIconClass"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,K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C,OAAO,gBAAiB,YACrDC,KAAoBC,KAAKH,GAAGI,cAE5BC,OAAOC,IAAIC,cAAcC,aAAa,OAAQ,CAC7CC,OAAQ,WACP,OAAO,IAAIC,SAAQ,SAACC,EAASC,GAC5BZ,GAAGa,QAAQC,WAAW7B,EAAE,gBAAiB,mBAAmB,SAAU8B,GACtDf,GAAGgB,MAAMC,YACjBC,YAAYH,GAAGI,MAAK,SAACC,EAAQC,GACnCV,EAAQU,EAASC,OACfC,MAAK,WACPX,UAEC,EAAO,MAAM,EAAOZ,GAAGa,QAAQW,uBAAwB,GAAI,CAAEC,uBAAuB,QAGzFC,WAAYzC,EAAE,gBAAiB,kBAC/B0C,cAAe","file":"collaboration.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/');\n__webpack_nonce__ = btoa(OC.requestToken);\n\nwindow.OCP.Collaboration.registerType('file', {\n\taction: () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tOC.dialogs.filepicker(t('files_sharing', 'Link to a file'), function (f) {\n\t\t\t\tconst client = OC.Files.getClient();\n\t\t\t\tclient.getFileInfo(f).then((status, fileInfo) => {\n\t\t\t\t\tresolve(fileInfo.id);\n\t\t\t\t}).fail(() => {\n\t\t\t\t\treject();\n\t\t\t\t});\n\t\t\t}, false, null, false, OC.dialogs.FILEPICKER_TYPE_CHOOSE, '', { allowDirectoryChooser: true });\n\t\t});\n\t},\n\ttypeString: t('files_sharing', 'Link to a file'),\n\ttypeIconClass: 'icon-files-dark'\n});\n"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/collaborationresourceshandler.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_public_path__","OC","linkTo","__webpack_nonce__","btoa","requestToken","window","OCP","Collaboration","registerType","action","Promise","resolve","reject","dialogs","filepicker","f","Files","getClient","getFileInfo","then","status","fileInfo","id","fail","Error","FILEPICKER_TYPE_CHOOSE","allowDirectoryChooser","typeString","typeIconClass"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,OAIjBlC,EAAoBA,EAAoBmC,EAAI,G,kBCjFrDC,IAA0BC,GAAGC,OAAO,gBAAiB,YAErDC,KAAoBC,KAAKH,GAAGI,cAE5BC,OAAOC,IAAIC,cAAcC,aAAa,OAAQ,CAC7CC,OAAQ,WACP,OAAO,IAAIC,SAAQ,SAACC,EAASC,GAC5BZ,GAAGa,QAAQC,WAAW7B,EAAE,gBAAiB,mBAAmB,SAAS8B,GACrDf,GAAGgB,MAAMC,YACjBC,YAAYH,GAAGI,MAAK,SAACC,EAAQC,GACnCV,EAAQU,EAASC,OACfC,MAAK,WACPX,EAAO,IAAIY,MAAM,8BAEhB,EAAO,MAAM,EAAOxB,GAAGa,QAAQY,uBAAwB,GAAI,CAAEC,uBAAuB,QAGzFC,WAAY1C,EAAE,gBAAiB,kBAC/B2C,cAAe","file":"collaboration.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","// eslint-disable-next-line camelcase\n__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n\nwindow.OCP.Collaboration.registerType('file', {\n\taction: () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tOC.dialogs.filepicker(t('files_sharing', 'Link to a file'), function(f) {\n\t\t\t\tconst client = OC.Files.getClient()\n\t\t\t\tclient.getFileInfo(f).then((status, fileInfo) => {\n\t\t\t\t\tresolve(fileInfo.id)\n\t\t\t\t}).fail(() => {\n\t\t\t\t\treject(new Error('Cannot get fileinfo'))\n\t\t\t\t})\n\t\t\t}, false, null, false, OC.dialogs.FILEPICKER_TYPE_CHOOSE, '', { allowDirectoryChooser: true })\n\t\t})\n\t},\n\ttypeString: t('files_sharing', 'Link to a file'),\n\ttypeIconClass: 'icon-files-dark'\n})\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/apps/files_sharing/js/dist/files_sharing.4.js b/apps/files_sharing/js/dist/files_sharing.4.js
index 8ac4caf8c2b..7929a7a5951 100644
--- a/apps/files_sharing/js/dist/files_sharing.4.js
+++ b/apps/files_sharing/js/dist/files_sharing.4.js
@@ -1,5 +1,5 @@
-(window.webpackJsonpFilesSharing=window.webpackJsonpFilesSharing||[]).push([[4],{14:function(e,o,i){"use strict";i.r(o);var n=i(16),l=i(18),r=i(28),u=i(31),s=i.n(u),a={name:"CollaborationView",computed:{fileId:function(){return this.$root.model&&this.$root.model.id?""+this.$root.model.id:null},filename:function(){return this.$root.model&&this.$root.model.name?""+this.$root.model.name:""}},components:{CollectionList:i(32).a}},d=i(56),c=Object(d.a)(a,(function(){var t=this.$createElement,e=this._self._c||t;return this.fileId?e("collection-list",{attrs:{type:"file",id:this.fileId,name:this.filename}}):this._e()}),[],!1,null,null,null).exports;i.d(o,"Vue",(function(){return n.default})),i.d(o,"View",(function(){return c})),
-/*
+(window.webpackJsonpFilesSharing=window.webpackJsonpFilesSharing||[]).push([[4],{14:function(e,o,i){"use strict";i.r(o);var n=i(16),l=i(18),r=i(28),u=i(31),s=i.n(u),a={name:"CollaborationView",components:{CollectionList:i(32).a},computed:{fileId:function(){return this.$root.model&&this.$root.model.id?""+this.$root.model.id:null},filename:function(){return this.$root.model&&this.$root.model.name?""+this.$root.model.name:""}}},d=i(56),c=Object(d.a)(a,(function(){var t=this.$createElement,e=this._self._c||t;return this.fileId?e("CollectionList",{attrs:{id:this.fileId,type:"file",name:this.filename}}):this._e()}),[],!1,null,null,null).exports;i.d(o,"Vue",(function(){return n.default})),i.d(o,"View",(function(){return c})),
+/**
* @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
@@ -20,5 +20,5 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-n.default.prototype.t=t,n.default.component("PopoverMenu",r.PopoverMenu),n.default.directive("ClickOutside",s.a),r.Tooltip.options.defaultHtml=!1,n.default.directive("Tooltip",r.Tooltip),n.default.use(l.a)}}]);
-//# sourceMappingURL=files_sharing.4.js.map?v=07d5a7a4994f0ef93170 \ No newline at end of file
+n.default.prototype.t=t,r.Tooltip.options.defaultHtml=!1,n.default.component("PopoverMenu",r.PopoverMenu),n.default.directive("ClickOutside",s.a),n.default.directive("Tooltip",r.Tooltip),n.default.use(l.a)}}]);
+//# sourceMappingURL=files_sharing.4.js.map?v=4e4a795c94e467758967 \ No newline at end of file
diff --git a/apps/files_sharing/js/dist/files_sharing.4.js.map b/apps/files_sharing/js/dist/files_sharing.4.js.map
index 8e2fb489873..7ebc04b8ccc 100644
--- a/apps/files_sharing/js/dist/files_sharing.4.js.map
+++ b/apps/files_sharing/js/dist/files_sharing.4.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///./apps/files_sharing/src/views/CollaborationView.vue?e137","webpack:///apps/files_sharing/src/views/CollaborationView.vue","webpack:///./apps/files_sharing/src/views/CollaborationView.vue","webpack:///./apps/files_sharing/src/views/CollaborationView.vue?8a36","webpack:///./apps/files_sharing/src/collaborationresources.js"],"names":["_h","this","$createElement","_c","_self","attrs","fileId","filename","_e","Vue","prototype","t","component","PopoverMenu","directive","ClickOutside","Tooltip","options","defaultHtml","use","Vuex"],"mappings":"qKAA6M,EC6B7M,CACA,yBACA,UACA,OADA,WAEA,6CACA,uBAEA,MAEA,SAPA,WAQA,+CACA,yBAEA,KAGA,YACA,e,MAAA,I,QC5Be,EAXC,YACd,GCRW,WAAa,IAAiBA,EAATC,KAAgBC,eAAmBC,EAAnCF,KAA0CG,MAAMD,IAAIH,EAAG,OAAvDC,KAAyE,OAAEE,EAAG,kBAAkB,CAACE,MAAM,CAAC,KAAO,OAAO,GAAtHJ,KAA+HK,OAAO,KAAtIL,KAAiJM,YAAjJN,KAAiKO,OAC7K,IDUpB,EACA,KACA,KACA,M,QEdF;;;;;;;;;;;;;;;;;;;;;;AA2BAC,UAAIC,UAAUC,EAAIA,EAClBF,UAAIG,UAAU,cAAeC,eAC7BJ,UAAIK,UAAU,eAAgBC,KAC9BC,UAAQC,QAAQC,aAAc,EAC9BT,UAAIK,UAAU,UAAWE,WACzBP,UAAIU,IAAIC","file":"files_sharing.4.js?v=07d5a7a4994f0ef93170","sourcesContent":["import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaborationView.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaborationView.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\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 -->\n\n<template>\n\t<collection-list v-if=\"fileId\" type=\"file\" :id=\"fileId\" :name=\"filename\"></collection-list>\n</template>\n\n<script>\nimport { CollectionList } from 'nextcloud-vue-collections'\n\nexport default {\n\tname: 'CollaborationView',\n\tcomputed: {\n\t\tfileId() {\n\t\t\tif (this.$root.model && this.$root.model.id) {\n\t\t\t\treturn '' + this.$root.model.id;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tfilename() {\n\t\t\tif (this.$root.model && this.$root.model.name) {\n\t\t\t\treturn '' + this.$root.model.name;\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\t},\n\tcomponents: {\n\t\tCollectionList\n\t}\n}\n</script>\n","import { render, staticRenderFns } from \"./CollaborationView.vue?vue&type=template&id=6c151fb8&\"\nimport script from \"./CollaborationView.vue?vue&type=script&lang=js&\"\nexport * from \"./CollaborationView.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.fileId)?_c('collection-list',{attrs:{\"type\":\"file\",\"id\":_vm.fileId,\"name\":_vm.filename}}):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\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 */\n\nimport Vue from 'vue';\nimport Vuex from 'vuex';\nimport { Tooltip, PopoverMenu } from 'nextcloud-vue';\nimport ClickOutside from 'vue-click-outside';\n\nVue.prototype.t = t;\nVue.component('PopoverMenu', PopoverMenu);\nVue.directive('ClickOutside', ClickOutside);\nTooltip.options.defaultHtml = false\nVue.directive('Tooltip', Tooltip);\nVue.use(Vuex);\n\nimport View from './views/CollaborationView';\n\nexport {\n\tVue,\n\tView\n};\n"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///./apps/files_sharing/src/views/CollaborationView.vue?b5b5","webpack:///apps/files_sharing/src/views/CollaborationView.vue","webpack:///./apps/files_sharing/src/views/CollaborationView.vue","webpack:///./apps/files_sharing/src/views/CollaborationView.vue?a30c","webpack:///./apps/files_sharing/src/collaborationresources.js"],"names":["_h","this","$createElement","_c","_self","attrs","fileId","filename","_e","Vue","prototype","t","Tooltip","options","defaultHtml","component","PopoverMenu","directive","ClickOutside","use","Vuex"],"mappings":"qKAA6M,ECgC7M,CACA,yBACA,YACA,e,MAAA,GAEA,UACA,OADA,WAEA,6CACA,uBAEA,MAEA,SAPA,WAQA,+CACA,yBAEA,M,QC9Be,EAXC,YACd,GCRW,WAAa,IAAiBA,EAATC,KAAgBC,eAAmBC,EAAnCF,KAA0CG,MAAMD,IAAIH,EAAG,OAAvDC,KAAyE,OAAEE,EAAG,iBAAiB,CAACE,MAAM,CAAC,GAAvGJ,KAAgHK,OAAO,KAAO,OAAO,KAArIL,KAAgJM,YAAhJN,KAAgKO,OAC5K,IDUpB,EACA,KACA,KACA,M,QEdF;;;;;;;;;;;;;;;;;;;;;;AA6BAC,UAAIC,UAAUC,EAAIA,EAClBC,UAAQC,QAAQC,aAAc,EAG9BL,UAAIM,UAAU,cAAeC,eAC7BP,UAAIQ,UAAU,eAAgBC,KAC9BT,UAAIQ,UAAU,UAAWL,WACzBH,UAAIU,IAAIC","file":"files_sharing.4.js?v=4e4a795c94e467758967","sourcesContent":["import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaborationView.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaborationView.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\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 -->\n\n<template>\n\t<CollectionList v-if=\"fileId\"\n\t\t:id=\"fileId\"\n\t\ttype=\"file\"\n\t\t:name=\"filename\" />\n</template>\n\n<script>\nimport { CollectionList } from 'nextcloud-vue-collections'\n\nexport default {\n\tname: 'CollaborationView',\n\tcomponents: {\n\t\tCollectionList\n\t},\n\tcomputed: {\n\t\tfileId() {\n\t\t\tif (this.$root.model && this.$root.model.id) {\n\t\t\t\treturn '' + this.$root.model.id\n\t\t\t}\n\t\t\treturn null\n\t\t},\n\t\tfilename() {\n\t\t\tif (this.$root.model && this.$root.model.name) {\n\t\t\t\treturn '' + this.$root.model.name\n\t\t\t}\n\t\t\treturn ''\n\t\t}\n\t}\n}\n</script>\n","import { render, staticRenderFns } from \"./CollaborationView.vue?vue&type=template&id=d18c734c&\"\nimport script from \"./CollaborationView.vue?vue&type=script&lang=js&\"\nexport * from \"./CollaborationView.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.fileId)?_c('CollectionList',{attrs:{\"id\":_vm.fileId,\"type\":\"file\",\"name\":_vm.filename}}):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\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 */\n\nimport Vue from 'vue'\nimport Vuex from 'vuex'\nimport { Tooltip, PopoverMenu } from 'nextcloud-vue'\nimport ClickOutside from 'vue-click-outside'\n\nimport View from './views/CollaborationView'\n\nVue.prototype.t = t\nTooltip.options.defaultHtml = false\n\n// eslint-disable-next-line vue/match-component-file-name\nVue.component('PopoverMenu', PopoverMenu)\nVue.directive('ClickOutside', ClickOutside)\nVue.directive('Tooltip', Tooltip)\nVue.use(Vuex)\n\nexport {\n\tVue,\n\tView\n}\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/apps/files_sharing/js/dist/files_sharing.js.map b/apps/files_sharing/js/dist/files_sharing.js.map
index 8e33e4111a6..1cb98bff5e4 100644
--- a/apps/files_sharing/js/dist/files_sharing.js.map
+++ b/apps/files_sharing/js/dist/files_sharing.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/files_sharing.js","webpack:///./apps/files_sharing/js/app.js","webpack:///./apps/files_sharing/js/sharedfilelist.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_nonce__","btoa","OC","requestToken","__webpack_public_path__","linkTo","OCA","Sharing","App","_inFileList","_outFileList","_overviewFileList","initSharingIn","$el","this","FileList","id","sharedWithUser","fileActions","_createFileActions","config","Files","getFilesConfig","shown","_extendFileList","appName","find","html","initSharingOut","initSharingLinks","_linkFileList","linksOnly","initSharingDeleted","_deletedFileList","showDeleted","_restoreShareAction","initShareingOverview","isOverview","removeSharingIn","$fileList","empty","removeSharingOut","removeSharingLinks","removeSharingDeleted","removeSharingOverview","destroy","off","_onActionsUpdated","_globalActionsInitialized","FileActions","registerDefaultActions","merge","_","on","register","PERMISSION_READ","filename","context","setActiveView","silent","fileList","changeDirectory","joinPaths","$file","attr","setDefault","registerAction","displayName","altText","mime","permissions","PERMISSION_ALL","iconClass","type","TYPE_INLINE","actionHandler","fileName","shareId","data","$","post","linkToOCS","success","result","remove","fileInfoModel","attributes","fail","Notification","showTemporary","ev","each","list","action","defaultAction","fileSummary","document","ready","e","target","options","initialize","extend","_sharedWithUser","_linksOnly","_showDeleted","_clientSideSort","_allowSelection","_isOverview","apply","arguments","initialized","_renderRow","_createRow","fileData","$tr","before","children","pluck","shares","join","shareOwner","permission","parseInt","PERMISSION_DELETE","expirationTimestamp","expiration","moment","valueOf","formatted","text","modifiedColor","Math","round","Date","getTime","Util","formatDate","relativeModifiedDate","td","append","tooltip","placement","setSharedWithUser","state","updateEmptyContent","dir","getCurrentDirectory","toggleClass","isEmpty","addClass","getDirectoryPermissions","updateStorageStatistics","updateRow","fileInfo","reload","showMask","_reloadCall","abort","_setCurrentDir","promises","deletedShares","url","format","include_tags","beforeSend","xhr","setRequestHeader","shared_with_me","remoteShares","push","ajax","when","callBack","reloadCallback","then","additionalShares","hideMask","files","ocs","concat","_makeFilesFromShares","_makeFilesFromRemoteShares","setFiles","chain","map","share","file","owner","remote","replace","basename","mountpoint","mtime","mimetype","file_id","path","dirname","tags","Share","SHARE_TYPE_REMOTE","filter","share_type","SHARE_TYPE_LINK","file_source","icon","MimeType","getIconUrl","item_type","share_with","stime","displayname_owner","shareOwnerId","uid_owner","file_target","extraData","targetDisplayName","share_with_displayname","targetShareWithId","reduce","memo","recipient","recipientId","recipients","recipientData","shareTypes","recipientsCount","values","mountType","keys","sort","_sortComparator"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAA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GAAGqE,eAClBoH,EAAKS,OACRT,EAAK4B,UAAY7B,EAAMU,OAGlBT,KAOPgC,QAAO,SAASC,EAAMjC,GACtB,IAAI7G,EAAO8I,EAAKjC,EAAK3K,IACjB6M,EAAYlC,EAAKD,MAAM8B,kBACvBM,EAAcnC,EAAKD,MAAMgC,kBAuC7B,OAtCK5I,GAeA6G,EAAKD,MAAMwB,MAAQpI,EAAKmH,QAC3BnH,EAAKmH,MAAQN,EAAKD,MAAMwB,OAEzBpI,EAAKyC,OAAOmD,KAAKiB,EAAKD,UAjBtB5G,EAAO8I,EAAKjC,EAAK3K,IAAM2K,GAClBpE,OAAS,CAACoE,EAAKD,OAGpB5G,EAAKiJ,WAAa,GAClBjJ,EAAKkJ,cAAgB,GAErBlJ,EAAKmJ,WAAa,GAElBnJ,EAAKoJ,gBAAkB,EACvBpJ,EAAKmH,MAAQN,EAAKD,MAAMwB,OAUrBW,IAEC/I,EAAKoJ,gBAAkB,IAG1BpJ,EAAKiJ,WAAWF,IAAa,EAC7B/I,EAAKkJ,cAAclJ,EAAKoJ,iBAAmB,CAC1C,UAAaJ,EACb,qBAAwBD,IAG1B/I,EAAKoJ,mBAGNpJ,EAAKmJ,WAAWtC,EAAKD,MAAMjH,OAAQ,SAE5BkH,EAAKD,MACLkC,IACL,IAEFO,SAEAxI,MAAK,SAASb,GAGdA,EAAKsJ,UAAY,gBACVtJ,EAAKoJ,gBACRjN,SAEI6D,EAAKmJ,WAEZnJ,EAAKmJ,WAAa7K,EAAEiL,KAAKvJ,EAAKmJ,eAI/BhP,SAGWqP,KAAKxN,KAAKyN,oBA0CzBjO,IAAIC,QAAQQ,SAAWA","file":"files_sharing.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n","__webpack_nonce__ = btoa(OC.requestToken);\n__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/');\n\nimport '../js/app';\nimport '../js/sharedfilelist';\n","/*\n * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\nif (!OCA.Sharing) {\n\t/**\n\t * @namespace OCA.Sharing\n\t */\n\tOCA.Sharing = {};\n}\n/**\n * @namespace\n */\nOCA.Sharing.App = {\n\n\t_inFileList: null,\n\t_outFileList: null,\n\t_overviewFileList: null,\n\n\tinitSharingIn: function($el) {\n\t\tif (this._inFileList) {\n\t\t\treturn this._inFileList;\n\t\t}\n\n\t\tthis._inFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.self',\n\t\t\t\tsharedWithUser: true,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t);\n\n\t\tthis._extendFileList(this._inFileList);\n\t\tthis._inFileList.appName = t('files_sharing', 'Shared with you');\n\t\tthis._inFileList.$el.find('#emptycontent').html('<div class=\"icon-shared\"></div>' +\n\t\t\t'<h2>' + t('files_sharing', 'Nothing shared with you yet') + '</h2>' +\n\t\t\t'<p>' + t('files_sharing', 'Files and folders others share with you will show up here') + '</p>');\n\t\treturn this._inFileList;\n\t},\n\n\tinitSharingOut: function($el) {\n\t\tif (this._outFileList) {\n\t\t\treturn this._outFileList;\n\t\t}\n\t\tthis._outFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.others',\n\t\t\t\tsharedWithUser: false,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t);\n\n\t\tthis._extendFileList(this._outFileList);\n\t\tthis._outFileList.appName = t('files_sharing', 'Shared with others');\n\t\tthis._outFileList.$el.find('#emptycontent').html('<div class=\"icon-shared\"></div>' +\n\t\t\t'<h2>' + t('files_sharing', 'Nothing shared yet') + '</h2>' +\n\t\t\t'<p>' + t('files_sharing', 'Files and folders you share will show up here') + '</p>');\n\t\treturn this._outFileList;\n\t},\n\n\tinitSharingLinks: function($el) {\n\t\tif (this._linkFileList) {\n\t\t\treturn this._linkFileList;\n\t\t}\n\t\tthis._linkFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.link',\n\t\t\t\tlinksOnly: true,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t);\n\n\t\tthis._extendFileList(this._linkFileList);\n\t\tthis._linkFileList.appName = t('files_sharing', 'Shared by link');\n\t\tthis._linkFileList.$el.find('#emptycontent').html('<div class=\"icon-public\"></div>' +\n\t\t\t'<h2>' + t('files_sharing', 'No shared links') + '</h2>' +\n\t\t\t'<p>' + t('files_sharing', 'Files and folders you share by link will show up here') + '</p>');\n\t\treturn this._linkFileList;\n\t},\n\n\tinitSharingDeleted: function($el) {\n\t\tif (this._deletedFileList) {\n\t\t\treturn this._deletedFileList;\n\t\t}\n\t\tthis._deletedFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.deleted',\n\t\t\t\tshowDeleted: true,\n\t\t\t\tsharedWithUser: true,\n\t\t\t\tfileActions: this._restoreShareAction(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t);\n\n\t\tthis._extendFileList(this._deletedFileList);\n\t\tthis._deletedFileList.appName = t('files_sharing', 'Deleted shares');\n\t\tthis._deletedFileList.$el.find('#emptycontent').html('<div class=\"icon-share\"></div>' +\n\t\t\t'<h2>' + t('files_sharing', 'No deleted shares') + '</h2>' +\n\t\t\t'<p>' + t('files_sharing', 'Shares you deleted will show up here') + '</p>');\n\t\treturn this._deletedFileList;\n\t},\n\n\tinitShareingOverview: function($el) {\n\t\tif (this._overviewFileList) {\n\t\t\treturn this._overviewFileList;\n\t\t}\n\t\tthis._overviewFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.overview',\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\tisOverview: true,\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t);\n\n\t\tthis._extendFileList(this._overviewFileList);\n\t\tthis._overviewFileList.appName = t('files_sharing', 'Shares');\n\t\tthis._overviewFileList.$el.find('#emptycontent').html('<div class=\"icon-share\"></div>' +\n\t\t\t'<h2>' + t('files_sharing', 'No shares') + '</h2>' +\n\t\t\t'<p>' + t('files_sharing', 'Shares will show up here') + '</p>');\n\t\treturn this._overviewFileList;\n\t},\n\n\tremoveSharingIn: function() {\n\t\tif (this._inFileList) {\n\t\t\tthis._inFileList.$fileList.empty();\n\t\t}\n\t},\n\n\tremoveSharingOut: function() {\n\t\tif (this._outFileList) {\n\t\t\tthis._outFileList.$fileList.empty();\n\t\t}\n\t},\n\n\tremoveSharingLinks: function() {\n\t\tif (this._linkFileList) {\n\t\t\tthis._linkFileList.$fileList.empty();\n\t\t}\n\t},\n\n\tremoveSharingDeleted: function() {\n\t\tif (this._deletedFileList) {\n\t\t\tthis._deletedFileList.$fileList.empty();\n\t\t}\n\t},\n\n\tremoveSharingOverview: function() {\n\t\tif (this._overviewFileList) {\n\t\t\tthis._overviewFileList.$fileList.empty();\n\t\t}\n\t},\n\n\t/**\n\t * Destroy the app\n\t */\n\tdestroy: function() {\n\t\tOCA.Files.fileActions.off('setDefault.app-sharing', this._onActionsUpdated);\n\t\tOCA.Files.fileActions.off('registerAction.app-sharing', this._onActionsUpdated);\n\t\tthis.removeSharingIn();\n\t\tthis.removeSharingOut();\n\t\tthis.removeSharingLinks();\n\t\tthis._inFileList = null;\n\t\tthis._outFileList = null;\n\t\tthis._linkFileList = null;\n\t\tthis._overviewFileList = null;\n\t\tdelete this._globalActionsInitialized;\n\t},\n\n\t_createFileActions: function() {\n\t\t// inherit file actions from the files app\n\t\tvar fileActions = new OCA.Files.FileActions();\n\t\t// note: not merging the legacy actions because legacy apps are not\n\t\t// compatible with the sharing overview and need to be adapted first\n\t\tfileActions.registerDefaultActions();\n\t\tfileActions.merge(OCA.Files.fileActions);\n\n\t\tif (!this._globalActionsInitialized) {\n\t\t\t// in case actions are registered later\n\t\t\tthis._onActionsUpdated = _.bind(this._onActionsUpdated, this);\n\t\t\tOCA.Files.fileActions.on('setDefault.app-sharing', this._onActionsUpdated);\n\t\t\tOCA.Files.fileActions.on('registerAction.app-sharing', this._onActionsUpdated);\n\t\t\tthis._globalActionsInitialized = true;\n\t\t}\n\n\t\t// when the user clicks on a folder, redirect to the corresponding\n\t\t// folder in the files app instead of opening it directly\n\t\tfileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) {\n\t\t\tOCA.Files.App.setActiveView('files', {silent: true});\n\t\t\tOCA.Files.App.fileList.changeDirectory(OC.joinPaths(context.$file.attr('data-path'), filename), true, true);\n\t\t});\n\t\tfileActions.setDefault('dir', 'Open');\n\t\treturn fileActions;\n\t},\n\n\t_restoreShareAction: function() {\n\t\tvar fileActions = new OCA.Files.FileActions();\n\t\tfileActions.registerAction({\n\t\t\tname: 'Restore',\n\t\t\tdisplayName: '',\n\t\t\taltText: t('files_sharing', 'Restore share'),\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_ALL,\n\t\t\ticonClass: 'icon-history',\n\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\tvar shareId = context.$file.data('shareId');\n\t\t\t\t$.post(OC.linkToOCS('apps/files_sharing/api/v1/deletedshares', 2) + shareId)\n\t\t\t\t.success(function(result) {\n\t\t\t\t\tcontext.fileList.remove(context.fileInfoModel.attributes.name);\n\t\t\t\t}).fail(function() {\n\t\t\t\t\tOC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to restore the share.'));\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\treturn fileActions;\n\t},\n\n\t_onActionsUpdated: function(ev) {\n\t\t_.each([this._inFileList, this._outFileList, this._linkFileList], function(list) {\n\t\t\tif (!list) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (ev.action) {\n\t\t\t\tlist.fileActions.registerAction(ev.action);\n\t\t\t} else if (ev.defaultAction) {\n\t\t\t\tlist.fileActions.setDefault(\n\t\t\t\t\tev.defaultAction.mime,\n\t\t\t\t\tev.defaultAction.name\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t},\n\n\t_extendFileList: function(fileList) {\n\t\t// remove size column from summary\n\t\tfileList.fileSummary.$el.find('.filesize').remove();\n\t}\n};\n\n$(document).ready(function() {\n\t$('#app-content-sharingin').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingIn($(e.target));\n\t});\n\t$('#app-content-sharingin').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingIn();\n\t});\n\t$('#app-content-sharingout').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingOut($(e.target));\n\t});\n\t$('#app-content-sharingout').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingOut();\n\t});\n\t$('#app-content-sharinglinks').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingLinks($(e.target));\n\t});\n\t$('#app-content-sharinglinks').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingLinks();\n\t});\n\t$('#app-content-deletedshares').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingDeleted($(e.target));\n\t});\n\t$('#app-content-deletedshares').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingDeleted();\n\t});\n\t$('#app-content-shareoverview').on('show', function(e) {\n\t\tOCA.Sharing.App.initShareingOverview($(e.target));\n\t});\n\t$('#app-content-shareoverview').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingOverview();\n\t});\n});\n","/*\n * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n(function() {\n\n\t/**\n\t * @class OCA.Sharing.FileList\n\t * @augments OCA.Files.FileList\n\t *\n\t * @classdesc Sharing file list.\n\t * Contains both \"shared with others\" and \"shared with you\" modes.\n\t *\n\t * @param $el container element with existing markup for the #controls\n\t * and a table\n\t * @param [options] map of options, see other parameters\n\t * @param {boolean} [options.sharedWithUser] true to return files shared with\n\t * the current user, false to return files that the user shared with others.\n\t * Defaults to false.\n\t * @param {boolean} [options.linksOnly] true to return only link shares\n\t */\n\tvar FileList = function($el, options) {\n\t\tthis.initialize($el, options);\n\t};\n\tFileList.prototype = _.extend({}, OCA.Files.FileList.prototype,\n\t\t/** @lends OCA.Sharing.FileList.prototype */ {\n\t\tappName: 'Shares',\n\n\t\t/**\n\t\t * Whether the list shows the files shared with the user (true) or\n\t\t * the files that the user shared with others (false).\n\t\t */\n\t\t_sharedWithUser: false,\n\t\t_linksOnly: false,\n\t\t_showDeleted: false,\n\t\t_clientSideSort: true,\n\t\t_allowSelection: false,\n\t\t_isOverview: false,\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tinitialize: function($el, options) {\n\t\t\tOCA.Files.FileList.prototype.initialize.apply(this, arguments);\n\t\t\tif (this.initialized) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// TODO: consolidate both options\n\t\t\tif (options && options.sharedWithUser) {\n\t\t\t\tthis._sharedWithUser = true;\n\t\t\t}\n\t\t\tif (options && options.linksOnly) {\n\t\t\t\tthis._linksOnly = true;\n\t\t\t}\n\t\t\tif (options && options.showDeleted) {\n\t\t\t\tthis._showDeleted = true;\n\t\t\t}\n\t\t\tif (options && options.isOverview) {\n\t\t\t\tthis._isOverview = true;\n\t\t\t}\n\t\t},\n\n\t\t_renderRow: function() {\n\t\t\t// HACK: needed to call the overridden _renderRow\n\t\t\t// this is because at the time this class is created\n\t\t\t// the overriding hasn't been done yet...\n\t\t\treturn OCA.Files.FileList.prototype._renderRow.apply(this, arguments);\n\t\t},\n\n\t\t_createRow: function(fileData) {\n\t\t\t// TODO: hook earlier and render the whole row here\n\t\t\tvar $tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments);\n\t\t\t$tr.find('.filesize').remove();\n\t\t\t$tr.find('td.date').before($tr.children('td:first'));\n\t\t\t$tr.find('td.filename input:checkbox').remove();\n\t\t\t$tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(','));\n\t\t\tif (this._sharedWithUser) {\n\t\t\t\t$tr.attr('data-share-owner', fileData.shareOwner);\n\t\t\t\t$tr.attr('data-mounttype', 'shared-root');\n\t\t\t\tvar permission = parseInt($tr.attr('data-permissions')) | OC.PERMISSION_DELETE;\n\t\t\t\t$tr.attr('data-permissions', permission);\n\t\t\t}\n\t\t\tif (this._showDeleted) {\n\t\t\t\tvar permission = fileData.permissions;\n\t\t\t\t$tr.attr('data-share-permissions', permission);\n\t\t\t}\n\n\t\t\t// add row with expiration date for link only shares - influenced by _createRow of filelist\n\t\t\tif (this._linksOnly) {\n\t\t\t\tvar expirationTimestamp = 0;\n\t\t\t\tif(fileData.shares && fileData.shares[0].expiration !== null) {\n\t\t\t\t\texpirationTimestamp = moment(fileData.shares[0].expiration).valueOf();\n\t\t\t\t}\n\t\t\t\t$tr.attr('data-expiration', expirationTimestamp);\n\n\t\t\t\t// date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours)\n\t\t\t\t// difference in days multiplied by 5 - brightest shade for expiry dates in more than 32 days (160/5)\n\t\t\t\tvar modifiedColor = Math.round((expirationTimestamp - (new Date()).getTime()) / 1000 / 60 / 60 / 24 * 5);\n\t\t\t\t// ensure that the brightest color is still readable\n\t\t\t\tif (modifiedColor >= 160) {\n\t\t\t\t\tmodifiedColor = 160;\n\t\t\t\t}\n\n\t\t\t\tvar formatted;\n\t\t\t\tvar text;\n\t\t\t\tif (expirationTimestamp > 0) {\n\t\t\t\t\tformatted = OC.Util.formatDate(expirationTimestamp);\n\t\t\t\t\ttext = OC.Util.relativeModifiedDate(expirationTimestamp);\n\t\t\t\t} else {\n\t\t\t\t\tformatted = t('files_sharing', 'No expiration date set');\n\t\t\t\t\ttext = '';\n\t\t\t\t\tmodifiedColor = 160;\n\t\t\t\t}\n\t\t\t\ttd = $('<td></td>').attr({\"class\": \"date\"});\n\t\t\t\ttd.append($('<span></span>').attr({\n\t\t\t\t\t\t\"class\": \"modified\",\n\t\t\t\t\t\t\"title\": formatted,\n\t\t\t\t\t\t\"style\": 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'\n\t\t\t\t\t}).text(text)\n\t\t\t\t\t\t.tooltip({placement: 'top'})\n\t\t\t\t);\n\n\t\t\t\t$tr.append(td);\n\t\t\t}\n\t\t\treturn $tr;\n\t\t},\n\n\t\t/**\n\t\t * Set whether the list should contain outgoing shares\n\t\t * or incoming shares.\n\t\t *\n\t\t * @param state true for incoming shares, false otherwise\n\t\t */\n\t\tsetSharedWithUser: function(state) {\n\t\t\tthis._sharedWithUser = !!state;\n\t\t},\n\n\t\tupdateEmptyContent: function() {\n\t\t\tvar dir = this.getCurrentDirectory();\n\t\t\tif (dir === '/') {\n\t\t\t\t// root has special permissions\n\t\t\t\tthis.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty);\n\t\t\t\tthis.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty);\n\n\t\t\t\t// hide expiration date header for non link only shares\n\t\t\t\tif (!this._linksOnly) {\n\t\t\t\t\tthis.$el.find('th.column-expiration').addClass('hidden');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tOCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments);\n\t\t\t}\n\t\t},\n\n\t\tgetDirectoryPermissions: function() {\n\t\t\treturn OC.PERMISSION_READ | OC.PERMISSION_DELETE;\n\t\t},\n\n\t\tupdateStorageStatistics: function() {\n\t\t\t// no op because it doesn't have\n\t\t\t// storage info like free space / used space\n\t\t},\n\n\t\tupdateRow: function($tr, fileInfo, options) {\n\t\t\t// no-op, suppress re-rendering\n\t\t\treturn $tr;\n\t\t},\n\n\t\treload: function() {\n\t\t\tthis.showMask();\n\t\t\tif (this._reloadCall) {\n\t\t\t\tthis._reloadCall.abort();\n\t\t\t}\n\n\t\t\t// there is only root\n\t\t\tthis._setCurrentDir('/', false);\n\n\t\t\tvar promises = [];\n\n\t\t\tvar deletedShares = {\n\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'deletedshares',\n\t\t\t\t/* jshint camelcase: false */\n\t\t\t\tdata: {\n\t\t\t\t\tformat: 'json',\n\t\t\t\t\tinclude_tags: true\n\t\t\t\t},\n\t\t\t\ttype: 'GET',\n\t\t\t\tbeforeSend: function (xhr) {\n\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true');\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tvar shares = {\n\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares',\n\t\t\t\t/* jshint camelcase: false */\n\t\t\t\tdata: {\n\t\t\t\t\tformat: 'json',\n\t\t\t\t\tshared_with_me: this._sharedWithUser !== false,\n\t\t\t\t\tinclude_tags: true\n\t\t\t\t},\n\t\t\t\ttype: 'GET',\n\t\t\t\tbeforeSend: function (xhr) {\n\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true');\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tvar remoteShares = {\n\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1') + 'remote_shares',\n\t\t\t\t/* jshint camelcase: false */\n\t\t\t\tdata: {\n\t\t\t\t\tformat: 'json',\n\t\t\t\t\tinclude_tags: true\n\t\t\t\t},\n\t\t\t\ttype: 'GET',\n\t\t\t\tbeforeSend: function (xhr) {\n\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true');\n\t\t\t\t},\n\t\t\t};\n\n\t\t\t// Add the proper ajax requests to the list and run them\n\t\t\t// and make sure we have 2 promises\n\t\t\tif (this._showDeleted) {\n\t\t\t\tpromises.push($.ajax(deletedShares));\n\t\t\t} else {\n\t\t\t\tpromises.push($.ajax(shares));\n\n\t\t\t\tif (this._sharedWithUser !== false || this._isOverview) {\n\t\t\t\t\tpromises.push($.ajax(remoteShares));\n\t\t\t\t}\n\t\t\t\tif (this._isOverview) {\n\t\t\t\t\tshares.data.shared_with_me = !shares.data.shared_with_me;\n\t\t\t\t\tpromises.push($.ajax(shares));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._reloadCall = $.when.apply($, promises);\n\t\t\tvar callBack = this.reloadCallback.bind(this);\n\t\t\treturn this._reloadCall.then(callBack, callBack);\n\t\t},\n\n\t\treloadCallback: function(shares, remoteShares, additionalShares) {\n\t\t\tdelete this._reloadCall;\n\t\t\tthis.hideMask();\n\n\t\t\tthis.$el.find('#headerSharedWith').text(\n\t\t\t\tt('files_sharing', this._sharedWithUser ? 'Shared by' : 'Shared with')\n\t\t\t);\n\n\t\t\tvar files = [];\n\n\t\t\t// make sure to use the same format\n\t\t\tif (shares[0] && shares[0].ocs) {\n\t\t\t\tshares = shares[0];\n\t\t\t}\n\t\t\tif (remoteShares && remoteShares[0] && remoteShares[0].ocs) {\n\t\t\t\tremoteShares = remoteShares[0];\n\t\t\t}\n\t\t\tif (additionalShares && additionalShares[0] && additionalShares[0].ocs) {\n\t\t\t\tadditionalShares = additionalShares[0];\n\t\t\t}\n\n\t\t\tif (shares.ocs && shares.ocs.data) {\n\t\t\t\tfiles = files.concat(this._makeFilesFromShares(shares.ocs.data, this._sharedWithUser));\n\t\t\t}\n\n\t\t\tif (remoteShares && remoteShares.ocs && remoteShares.ocs.data) {\n\t\t\t\tfiles = files.concat(this._makeFilesFromRemoteShares(remoteShares.ocs.data));\n\t\t\t}\n\n\t\t\tif (additionalShares && additionalShares.ocs && additionalShares.ocs.data) {\n\t\t\t\tfiles = files.concat(this._makeFilesFromShares(additionalShares.ocs.data, !this._sharedWithUser));\n\t\t\t}\n\n\n\t\t\tthis.setFiles(files);\n\t\t\treturn true;\n\t\t},\n\n\t\t_makeFilesFromRemoteShares: function(data) {\n\t\t\tvar files = data;\n\n\t\t\tfiles = _.chain(files)\n\t\t\t\t// convert share data to file data\n\t\t\t\t.map(function(share) {\n\t\t\t\t\tvar file = {\n\t\t\t\t\t\tshareOwner: share.owner + '@' + share.remote.replace(/.*?:\\/\\//g, \"\"),\n\t\t\t\t\t\tname: OC.basename(share.mountpoint),\n\t\t\t\t\t\tmtime: share.mtime * 1000,\n\t\t\t\t\t\tmimetype: share.mimetype,\n\t\t\t\t\t\ttype: share.type,\n\t\t\t\t\t\tid: share.file_id,\n\t\t\t\t\t\tpath: OC.dirname(share.mountpoint),\n\t\t\t\t\t\tpermissions: share.permissions,\n\t\t\t\t\t\ttags: share.tags || []\n\t\t\t\t\t};\n\n\t\t\t\t\tfile.shares = [{\n\t\t\t\t\t\tid: share.id,\n\t\t\t\t\t\ttype: OC.Share.SHARE_TYPE_REMOTE\n\t\t\t\t\t}];\n\t\t\t\t\treturn file;\n\t\t\t\t})\n\t\t\t\t.value();\n\t\t\treturn files;\n\t\t},\n\n\t\t/**\n\t\t * Converts the OCS API share response data to a file info\n\t\t * list\n\t\t * @param {Array} data OCS API share array\n\t\t * @param {bool} sharedWithUser\n\t\t * @return {Array.<OCA.Sharing.SharedFileInfo>} array of shared file info\n\t\t */\n\t\t_makeFilesFromShares: function(data, sharedWithUser) {\n\t\t\t/* jshint camelcase: false */\n\t\t\tvar files = data;\n\n\t\t\tif (this._linksOnly) {\n\t\t\t\tfiles = _.filter(data, function(share) {\n\t\t\t\t\treturn share.share_type === OC.Share.SHARE_TYPE_LINK;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// OCS API uses non-camelcased names\n\t\t\tfiles = _.chain(files)\n\t\t\t\t// convert share data to file data\n\t\t\t\t.map(function(share) {\n\t\t\t\t\t// TODO: use OC.Files.FileInfo\n\t\t\t\t\tvar file = {\n\t\t\t\t\t\tid: share.file_source,\n\t\t\t\t\t\ticon: OC.MimeType.getIconUrl(share.mimetype),\n\t\t\t\t\t\tmimetype: share.mimetype,\n\t\t\t\t\t\ttags: share.tags || []\n\t\t\t\t\t};\n\t\t\t\t\tif (share.item_type === 'folder') {\n\t\t\t\t\t\tfile.type = 'dir';\n\t\t\t\t\t\tfile.mimetype = 'httpd/unix-directory';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfile.type = 'file';\n\t\t\t\t\t}\n\t\t\t\t\tfile.share = {\n\t\t\t\t\t\tid: share.id,\n\t\t\t\t\t\ttype: share.share_type,\n\t\t\t\t\t\ttarget: share.share_with,\n\t\t\t\t\t\tstime: share.stime * 1000,\n\t\t\t\t\t\texpiration: share.expiration,\n\t\t\t\t\t};\n\t\t\t\t\tif (sharedWithUser) {\n\t\t\t\t\t\tfile.shareOwner = share.displayname_owner;\n\t\t\t\t\t\tfile.shareOwnerId = share.uid_owner;\n\t\t\t\t\t\tfile.name = OC.basename(share.file_target);\n\t\t\t\t\t\tfile.path = OC.dirname(share.file_target);\n\t\t\t\t\t\tfile.permissions = share.permissions;\n\t\t\t\t\t\tif (file.path) {\n\t\t\t\t\t\t\tfile.extraData = share.file_target;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (share.share_type !== OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\tfile.share.targetDisplayName = share.share_with_displayname;\n\t\t\t\t\t\t\tfile.share.targetShareWithId = share.share_with;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfile.name = OC.basename(share.path);\n\t\t\t\t\t\tfile.path = OC.dirname(share.path);\n\t\t\t\t\t\tfile.permissions = OC.PERMISSION_ALL;\n\t\t\t\t\t\tif (file.path) {\n\t\t\t\t\t\t\tfile.extraData = share.path;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn file;\n\t\t\t\t})\n\t\t\t\t// Group all files and have a \"shares\" array with\n\t\t\t\t// the share info for each file.\n\t\t\t\t//\n\t\t\t\t// This uses a hash memo to cumulate share information\n\t\t\t\t// inside the same file object (by file id).\n\t\t\t\t.reduce(function(memo, file) {\n\t\t\t\t\tvar data = memo[file.id];\n\t\t\t\t\tvar recipient = file.share.targetDisplayName;\n\t\t\t\t\tvar recipientId = file.share.targetShareWithId;\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\tdata = memo[file.id] = file;\n\t\t\t\t\t\tdata.shares = [file.share];\n\t\t\t\t\t\t// using a hash to make them unique,\n\t\t\t\t\t\t// this is only a list to be displayed\n\t\t\t\t\t\tdata.recipients = {};\n\t\t\t\t\t\tdata.recipientData = {};\n\t\t\t\t\t\t// share types\n\t\t\t\t\t\tdata.shareTypes = {};\n\t\t\t\t\t\t// counter is cheaper than calling _.keys().length\n\t\t\t\t\t\tdata.recipientsCount = 0;\n\t\t\t\t\t\tdata.mtime = file.share.stime;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// always take the most recent stime\n\t\t\t\t\t\tif (file.share.stime > data.mtime) {\n\t\t\t\t\t\t\tdata.mtime = file.share.stime;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdata.shares.push(file.share);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (recipient) {\n\t\t\t\t\t\t// limit counterparts for output\n\t\t\t\t\t\tif (data.recipientsCount < 4) {\n\t\t\t\t\t\t\t// only store the first ones, they will be the only ones\n\t\t\t\t\t\t\t// displayed\n\t\t\t\t\t\t\tdata.recipients[recipient] = true;\n\t\t\t\t\t\t\tdata.recipientData[data.recipientsCount] = {\n\t\t\t\t\t\t\t\t'shareWith': recipientId,\n\t\t\t\t\t\t\t\t'shareWithDisplayName': recipient\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdata.recipientsCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tdata.shareTypes[file.share.type] = true;\n\n\t\t\t\t\tdelete file.share;\n\t\t\t\t\treturn memo;\n\t\t\t\t}, {})\n\t\t\t\t// Retrieve only the values of the returned hash\n\t\t\t\t.values()\n\t\t\t\t// Clean up\n\t\t\t\t.each(function(data) {\n\t\t\t\t\t// convert the recipients map to a flat\n\t\t\t\t\t// array of sorted names\n\t\t\t\t\tdata.mountType = 'shared';\n\t\t\t\t\tdelete data.recipientsCount;\n\t\t\t\t\tif (sharedWithUser) {\n\t\t\t\t\t\t// only for outgoing shares\n\t\t\t\t\t\tdelete data.shareTypes;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdata.shareTypes = _.keys(data.shareTypes);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t// Finish the chain by getting the result\n\t\t\t\t.value();\n\n\t\t\t// Sort by expected sort comparator\n\t\t\treturn files.sort(this._sortComparator);\n\t\t},\n\t});\n\n\t/**\n\t * Share info attributes.\n\t *\n\t * @typedef {Object} OCA.Sharing.ShareInfo\n\t *\n\t * @property {int} id share ID\n\t * @property {int} type share type\n\t * @property {String} target share target, either user name or group name\n\t * @property {int} stime share timestamp in milliseconds\n\t * @property {String} [targetDisplayName] display name of the recipient\n\t * (only when shared with others)\n\t * @property {String} [targetShareWithId] id of the recipient\n\t *\n\t */\n\n\t/**\n\t * Recipient attributes\n\t *\n\t * @typedef {Object} OCA.Sharing.RecipientInfo\n\t * @property {String} shareWith the id of the recipient\n\t * @property {String} shareWithDisplayName the display name of the recipient\n\t */\n\n\t/**\n\t * Shared file info attributes.\n\t *\n\t * @typedef {OCA.Files.FileInfo} OCA.Sharing.SharedFileInfo\n\t *\n\t * @property {Array.<OCA.Sharing.ShareInfo>} shares array of shares for\n\t * this file\n\t * @property {int} mtime most recent share time (if multiple shares)\n\t * @property {String} shareOwner name of the share owner\n\t * @property {Array.<String>} recipients name of the first 4 recipients\n\t * (this is mostly for display purposes)\n\t * @property {Object.<OCA.Sharing.RecipientInfo>} recipientData (as object for easier\n\t * passing to HTML data attributes with jQuery)\n\t */\n\n\tOCA.Sharing.FileList = FileList;\n})();\n"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/files_sharing.js","webpack:///./apps/files_sharing/js/app.js","webpack:///./apps/files_sharing/js/sharedfilelist.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_nonce__","btoa","OC","requestToken","__webpack_public_path__","linkTo","OCA","Sharing","App","_inFileList","_outFileList","_overviewFileList","initSharingIn","$el","this","FileList","id","sharedWithUser","fileActions","_createFileActions","config","Files","getFilesConfig","shown","_extendFileList","appName","find","html","initSharingOut","initSharingLinks","_linkFileList","linksOnly","initSharingDeleted","_deletedFileList","showDeleted","_restoreShareAction","initShareingOverview","isOverview","removeSharingIn","$fileList","empty","removeSharingOut","removeSharingLinks","removeSharingDeleted","removeSharingOverview","destroy","off","_onActionsUpdated","_globalActionsInitialized","FileActions","registerDefaultActions","merge","_","on","register","PERMISSION_READ","filename","context","setActiveView","silent","fileList","changeDirectory","joinPaths","$file","attr","setDefault","registerAction","displayName","altText","mime","permissions","PERMISSION_ALL","iconClass","type","TYPE_INLINE","actionHandler","fileName","shareId","data","$","post","linkToOCS","success","result","remove","fileInfoModel","attributes","fail","Notification","showTemporary","ev","each","list","action","defaultAction","fileSummary","document","ready","e","target","options","initialize","extend","_sharedWithUser","_linksOnly","_showDeleted","_clientSideSort","_allowSelection","_isOverview","apply","arguments","initialized","_renderRow","_createRow","fileData","$tr","before","children","pluck","shares","join","shareOwner","permission","parseInt","PERMISSION_DELETE","expirationTimestamp","expiration","moment","valueOf","formatted","text","modifiedColor","Math","round","Date","getTime","Util","formatDate","relativeModifiedDate","td","append","tooltip","placement","setSharedWithUser","state","updateEmptyContent","dir","getCurrentDirectory","toggleClass","isEmpty","addClass","getDirectoryPermissions","updateStorageStatistics","updateRow","fileInfo","reload","showMask","_reloadCall","abort","_setCurrentDir","promises","deletedShares","url","format","include_tags","beforeSend","xhr","setRequestHeader","shared_with_me","remoteShares","push","ajax","when","callBack","reloadCallback","then","additionalShares","hideMask","files","ocs","concat","_makeFilesFromShares","_makeFilesFromRemoteShares","setFiles","chain","map","share","file","owner","remote","replace","basename","mountpoint","mtime","mimetype","file_id","path","dirname","tags","Share","SHARE_TYPE_REMOTE","filter","share_type","SHARE_TYPE_LINK","file_source","icon","MimeType","getIconUrl","item_type","share_with","stime","displayname_owner","shareOwnerId","uid_owner","file_target","extraData","targetDisplayName","share_with_displayname","targetShareWithId","reduce","memo","recipient","recipientId","recipients","recipientData","shareTypes","recipientsCount","values","mountType","keys","sort","_sortComparator"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SAEI6D,EAAKmJ,WAEZnJ,EAAKmJ,WAAa7K,EAAEiL,KAAKvJ,EAAKmJ,eAI/BhP,SAGWqP,KAAKxN,KAAKyN,oBA0C1BjO,IAAIC,QAAQQ,SAAWA","file":"files_sharing.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n","import '../js/app'\nimport '../js/sharedfilelist'\n\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n// eslint-disable-next-line camelcase\n__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')\n","/*\n * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\nif (!OCA.Sharing) {\n\t/**\n\t * @namespace OCA.Sharing\n\t */\n\tOCA.Sharing = {}\n}\n/**\n * @namespace\n */\nOCA.Sharing.App = {\n\n\t_inFileList: null,\n\t_outFileList: null,\n\t_overviewFileList: null,\n\n\tinitSharingIn: function($el) {\n\t\tif (this._inFileList) {\n\t\t\treturn this._inFileList\n\t\t}\n\n\t\tthis._inFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.self',\n\t\t\t\tsharedWithUser: true,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._inFileList)\n\t\tthis._inFileList.appName = t('files_sharing', 'Shared with you')\n\t\tthis._inFileList.$el.find('#emptycontent').html('<div class=\"icon-shared\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'Nothing shared with you yet') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Files and folders others share with you will show up here') + '</p>')\n\t\treturn this._inFileList\n\t},\n\n\tinitSharingOut: function($el) {\n\t\tif (this._outFileList) {\n\t\t\treturn this._outFileList\n\t\t}\n\t\tthis._outFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.others',\n\t\t\t\tsharedWithUser: false,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._outFileList)\n\t\tthis._outFileList.appName = t('files_sharing', 'Shared with others')\n\t\tthis._outFileList.$el.find('#emptycontent').html('<div class=\"icon-shared\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'Nothing shared yet') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Files and folders you share will show up here') + '</p>')\n\t\treturn this._outFileList\n\t},\n\n\tinitSharingLinks: function($el) {\n\t\tif (this._linkFileList) {\n\t\t\treturn this._linkFileList\n\t\t}\n\t\tthis._linkFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.link',\n\t\t\t\tlinksOnly: true,\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._linkFileList)\n\t\tthis._linkFileList.appName = t('files_sharing', 'Shared by link')\n\t\tthis._linkFileList.$el.find('#emptycontent').html('<div class=\"icon-public\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No shared links') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Files and folders you share by link will show up here') + '</p>')\n\t\treturn this._linkFileList\n\t},\n\n\tinitSharingDeleted: function($el) {\n\t\tif (this._deletedFileList) {\n\t\t\treturn this._deletedFileList\n\t\t}\n\t\tthis._deletedFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.deleted',\n\t\t\t\tshowDeleted: true,\n\t\t\t\tsharedWithUser: true,\n\t\t\t\tfileActions: this._restoreShareAction(),\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._deletedFileList)\n\t\tthis._deletedFileList.appName = t('files_sharing', 'Deleted shares')\n\t\tthis._deletedFileList.$el.find('#emptycontent').html('<div class=\"icon-share\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No deleted shares') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Shares you deleted will show up here') + '</p>')\n\t\treturn this._deletedFileList\n\t},\n\n\tinitShareingOverview: function($el) {\n\t\tif (this._overviewFileList) {\n\t\t\treturn this._overviewFileList\n\t\t}\n\t\tthis._overviewFileList = new OCA.Sharing.FileList(\n\t\t\t$el,\n\t\t\t{\n\t\t\t\tid: 'shares.overview',\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\tisOverview: true,\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t)\n\n\t\tthis._extendFileList(this._overviewFileList)\n\t\tthis._overviewFileList.appName = t('files_sharing', 'Shares')\n\t\tthis._overviewFileList.$el.find('#emptycontent').html('<div class=\"icon-share\"></div>'\n\t\t\t+ '<h2>' + t('files_sharing', 'No shares') + '</h2>'\n\t\t\t+ '<p>' + t('files_sharing', 'Shares will show up here') + '</p>')\n\t\treturn this._overviewFileList\n\t},\n\n\tremoveSharingIn: function() {\n\t\tif (this._inFileList) {\n\t\t\tthis._inFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingOut: function() {\n\t\tif (this._outFileList) {\n\t\t\tthis._outFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingLinks: function() {\n\t\tif (this._linkFileList) {\n\t\t\tthis._linkFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingDeleted: function() {\n\t\tif (this._deletedFileList) {\n\t\t\tthis._deletedFileList.$fileList.empty()\n\t\t}\n\t},\n\n\tremoveSharingOverview: function() {\n\t\tif (this._overviewFileList) {\n\t\t\tthis._overviewFileList.$fileList.empty()\n\t\t}\n\t},\n\n\t/**\n\t * Destroy the app\n\t */\n\tdestroy: function() {\n\t\tOCA.Files.fileActions.off('setDefault.app-sharing', this._onActionsUpdated)\n\t\tOCA.Files.fileActions.off('registerAction.app-sharing', this._onActionsUpdated)\n\t\tthis.removeSharingIn()\n\t\tthis.removeSharingOut()\n\t\tthis.removeSharingLinks()\n\t\tthis._inFileList = null\n\t\tthis._outFileList = null\n\t\tthis._linkFileList = null\n\t\tthis._overviewFileList = null\n\t\tdelete this._globalActionsInitialized\n\t},\n\n\t_createFileActions: function() {\n\t\t// inherit file actions from the files app\n\t\tvar fileActions = new OCA.Files.FileActions()\n\t\t// note: not merging the legacy actions because legacy apps are not\n\t\t// compatible with the sharing overview and need to be adapted first\n\t\tfileActions.registerDefaultActions()\n\t\tfileActions.merge(OCA.Files.fileActions)\n\n\t\tif (!this._globalActionsInitialized) {\n\t\t\t// in case actions are registered later\n\t\t\tthis._onActionsUpdated = _.bind(this._onActionsUpdated, this)\n\t\t\tOCA.Files.fileActions.on('setDefault.app-sharing', this._onActionsUpdated)\n\t\t\tOCA.Files.fileActions.on('registerAction.app-sharing', this._onActionsUpdated)\n\t\t\tthis._globalActionsInitialized = true\n\t\t}\n\n\t\t// when the user clicks on a folder, redirect to the corresponding\n\t\t// folder in the files app instead of opening it directly\n\t\tfileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename, context) {\n\t\t\tOCA.Files.App.setActiveView('files', { silent: true })\n\t\t\tOCA.Files.App.fileList.changeDirectory(OC.joinPaths(context.$file.attr('data-path'), filename), true, true)\n\t\t})\n\t\tfileActions.setDefault('dir', 'Open')\n\t\treturn fileActions\n\t},\n\n\t_restoreShareAction: function() {\n\t\tvar fileActions = new OCA.Files.FileActions()\n\t\tfileActions.registerAction({\n\t\t\tname: 'Restore',\n\t\t\tdisplayName: '',\n\t\t\taltText: t('files_sharing', 'Restore share'),\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_ALL,\n\t\t\ticonClass: 'icon-history',\n\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\tactionHandler: function(fileName, context) {\n\t\t\t\tvar shareId = context.$file.data('shareId')\n\t\t\t\t$.post(OC.linkToOCS('apps/files_sharing/api/v1/deletedshares', 2) + shareId)\n\t\t\t\t\t.success(function(result) {\n\t\t\t\t\t\tcontext.fileList.remove(context.fileInfoModel.attributes.name)\n\t\t\t\t\t}).fail(function() {\n\t\t\t\t\t\tOC.Notification.showTemporary(t('files_sharing', 'Something happened. Unable to restore the share.'))\n\t\t\t\t\t})\n\t\t\t}\n\t\t})\n\t\treturn fileActions\n\t},\n\n\t_onActionsUpdated: function(ev) {\n\t\t_.each([this._inFileList, this._outFileList, this._linkFileList], function(list) {\n\t\t\tif (!list) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (ev.action) {\n\t\t\t\tlist.fileActions.registerAction(ev.action)\n\t\t\t} else if (ev.defaultAction) {\n\t\t\t\tlist.fileActions.setDefault(\n\t\t\t\t\tev.defaultAction.mime,\n\t\t\t\t\tev.defaultAction.name\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t},\n\n\t_extendFileList: function(fileList) {\n\t\t// remove size column from summary\n\t\tfileList.fileSummary.$el.find('.filesize').remove()\n\t}\n}\n\n$(document).ready(function() {\n\t$('#app-content-sharingin').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingIn($(e.target))\n\t})\n\t$('#app-content-sharingin').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingIn()\n\t})\n\t$('#app-content-sharingout').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingOut($(e.target))\n\t})\n\t$('#app-content-sharingout').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingOut()\n\t})\n\t$('#app-content-sharinglinks').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingLinks($(e.target))\n\t})\n\t$('#app-content-sharinglinks').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingLinks()\n\t})\n\t$('#app-content-deletedshares').on('show', function(e) {\n\t\tOCA.Sharing.App.initSharingDeleted($(e.target))\n\t})\n\t$('#app-content-deletedshares').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingDeleted()\n\t})\n\t$('#app-content-shareoverview').on('show', function(e) {\n\t\tOCA.Sharing.App.initShareingOverview($(e.target))\n\t})\n\t$('#app-content-shareoverview').on('hide', function() {\n\t\tOCA.Sharing.App.removeSharingOverview()\n\t})\n})\n","/* eslint-disable */\n/*\n * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n(function() {\n\n\t/**\n\t * @class OCA.Sharing.FileList\n\t * @augments OCA.Files.FileList\n\t *\n\t * @classdesc Sharing file list.\n\t * Contains both \"shared with others\" and \"shared with you\" modes.\n\t *\n\t * @param $el container element with existing markup for the #controls\n\t * and a table\n\t * @param [options] map of options, see other parameters\n\t * @param {boolean} [options.sharedWithUser] true to return files shared with\n\t * the current user, false to return files that the user shared with others.\n\t * Defaults to false.\n\t * @param {boolean} [options.linksOnly] true to return only link shares\n\t */\n\tvar FileList = function($el, options) {\n\t\tthis.initialize($el, options)\n\t}\n\tFileList.prototype = _.extend({}, OCA.Files.FileList.prototype,\n\t\t/** @lends OCA.Sharing.FileList.prototype */ {\n\t\t\tappName: 'Shares',\n\n\t\t\t/**\n\t\t * Whether the list shows the files shared with the user (true) or\n\t\t * the files that the user shared with others (false).\n\t\t */\n\t\t\t_sharedWithUser: false,\n\t\t\t_linksOnly: false,\n\t\t\t_showDeleted: false,\n\t\t\t_clientSideSort: true,\n\t\t\t_allowSelection: false,\n\t\t\t_isOverview: false,\n\n\t\t\t/**\n\t\t * @private\n\t\t */\n\t\t\tinitialize: function($el, options) {\n\t\t\t\tOCA.Files.FileList.prototype.initialize.apply(this, arguments)\n\t\t\t\tif (this.initialized) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// TODO: consolidate both options\n\t\t\t\tif (options && options.sharedWithUser) {\n\t\t\t\t\tthis._sharedWithUser = true\n\t\t\t\t}\n\t\t\t\tif (options && options.linksOnly) {\n\t\t\t\t\tthis._linksOnly = true\n\t\t\t\t}\n\t\t\t\tif (options && options.showDeleted) {\n\t\t\t\t\tthis._showDeleted = true\n\t\t\t\t}\n\t\t\t\tif (options && options.isOverview) {\n\t\t\t\t\tthis._isOverview = true\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_renderRow: function() {\n\t\t\t// HACK: needed to call the overridden _renderRow\n\t\t\t// this is because at the time this class is created\n\t\t\t// the overriding hasn't been done yet...\n\t\t\t\treturn OCA.Files.FileList.prototype._renderRow.apply(this, arguments)\n\t\t\t},\n\n\t\t\t_createRow: function(fileData) {\n\t\t\t// TODO: hook earlier and render the whole row here\n\t\t\t\tvar $tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments)\n\t\t\t\t$tr.find('.filesize').remove()\n\t\t\t\t$tr.find('td.date').before($tr.children('td:first'))\n\t\t\t\t$tr.find('td.filename input:checkbox').remove()\n\t\t\t\t$tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(','))\n\t\t\t\tif (this._sharedWithUser) {\n\t\t\t\t\t$tr.attr('data-share-owner', fileData.shareOwner)\n\t\t\t\t\t$tr.attr('data-mounttype', 'shared-root')\n\t\t\t\t\tvar permission = parseInt($tr.attr('data-permissions')) | OC.PERMISSION_DELETE\n\t\t\t\t\t$tr.attr('data-permissions', permission)\n\t\t\t\t}\n\t\t\t\tif (this._showDeleted) {\n\t\t\t\t\tvar permission = fileData.permissions\n\t\t\t\t\t$tr.attr('data-share-permissions', permission)\n\t\t\t\t}\n\n\t\t\t\t// add row with expiration date for link only shares - influenced by _createRow of filelist\n\t\t\t\tif (this._linksOnly) {\n\t\t\t\t\tvar expirationTimestamp = 0\n\t\t\t\t\tif (fileData.shares && fileData.shares[0].expiration !== null) {\n\t\t\t\t\t\texpirationTimestamp = moment(fileData.shares[0].expiration).valueOf()\n\t\t\t\t\t}\n\t\t\t\t\t$tr.attr('data-expiration', expirationTimestamp)\n\n\t\t\t\t\t// date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours)\n\t\t\t\t\t// difference in days multiplied by 5 - brightest shade for expiry dates in more than 32 days (160/5)\n\t\t\t\t\tvar modifiedColor = Math.round((expirationTimestamp - (new Date()).getTime()) / 1000 / 60 / 60 / 24 * 5)\n\t\t\t\t\t// ensure that the brightest color is still readable\n\t\t\t\t\tif (modifiedColor >= 160) {\n\t\t\t\t\t\tmodifiedColor = 160\n\t\t\t\t\t}\n\n\t\t\t\t\tvar formatted\n\t\t\t\t\tvar text\n\t\t\t\t\tif (expirationTimestamp > 0) {\n\t\t\t\t\t\tformatted = OC.Util.formatDate(expirationTimestamp)\n\t\t\t\t\t\ttext = OC.Util.relativeModifiedDate(expirationTimestamp)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tformatted = t('files_sharing', 'No expiration date set')\n\t\t\t\t\t\ttext = ''\n\t\t\t\t\t\tmodifiedColor = 160\n\t\t\t\t\t}\n\t\t\t\t\ttd = $('<td></td>').attr({ 'class': 'date' })\n\t\t\t\t\ttd.append($('<span></span>').attr({\n\t\t\t\t\t\t'class': 'modified',\n\t\t\t\t\t\t'title': formatted,\n\t\t\t\t\t\t'style': 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'\n\t\t\t\t\t}).text(text)\n\t\t\t\t\t\t.tooltip({ placement: 'top' })\n\t\t\t\t\t)\n\n\t\t\t\t\t$tr.append(td)\n\t\t\t\t}\n\t\t\t\treturn $tr\n\t\t\t},\n\n\t\t\t/**\n\t\t * Set whether the list should contain outgoing shares\n\t\t * or incoming shares.\n\t\t *\n\t\t * @param state true for incoming shares, false otherwise\n\t\t */\n\t\t\tsetSharedWithUser: function(state) {\n\t\t\t\tthis._sharedWithUser = !!state\n\t\t\t},\n\n\t\t\tupdateEmptyContent: function() {\n\t\t\t\tvar dir = this.getCurrentDirectory()\n\t\t\t\tif (dir === '/') {\n\t\t\t\t// root has special permissions\n\t\t\t\t\tthis.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty)\n\t\t\t\t\tthis.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty)\n\n\t\t\t\t\t// hide expiration date header for non link only shares\n\t\t\t\t\tif (!this._linksOnly) {\n\t\t\t\t\t\tthis.$el.find('th.column-expiration').addClass('hidden')\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tOCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments)\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetDirectoryPermissions: function() {\n\t\t\t\treturn OC.PERMISSION_READ | OC.PERMISSION_DELETE\n\t\t\t},\n\n\t\t\tupdateStorageStatistics: function() {\n\t\t\t// no op because it doesn't have\n\t\t\t// storage info like free space / used space\n\t\t\t},\n\n\t\t\tupdateRow: function($tr, fileInfo, options) {\n\t\t\t// no-op, suppress re-rendering\n\t\t\t\treturn $tr\n\t\t\t},\n\n\t\t\treload: function() {\n\t\t\t\tthis.showMask()\n\t\t\t\tif (this._reloadCall) {\n\t\t\t\t\tthis._reloadCall.abort()\n\t\t\t\t}\n\n\t\t\t\t// there is only root\n\t\t\t\tthis._setCurrentDir('/', false)\n\n\t\t\t\tvar promises = []\n\n\t\t\t\tvar deletedShares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'deletedshares',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\tinclude_tags: true\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar shares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\tshared_with_me: this._sharedWithUser !== false,\n\t\t\t\t\t\tinclude_tags: true\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar remoteShares = {\n\t\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1') + 'remote_shares',\n\t\t\t\t\t/* jshint camelcase: false */\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tformat: 'json',\n\t\t\t\t\t\tinclude_tags: true\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\tbeforeSend: function(xhr) {\n\t\t\t\t\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Add the proper ajax requests to the list and run them\n\t\t\t\t// and make sure we have 2 promises\n\t\t\t\tif (this._showDeleted) {\n\t\t\t\t\tpromises.push($.ajax(deletedShares))\n\t\t\t\t} else {\n\t\t\t\t\tpromises.push($.ajax(shares))\n\n\t\t\t\t\tif (this._sharedWithUser !== false || this._isOverview) {\n\t\t\t\t\t\tpromises.push($.ajax(remoteShares))\n\t\t\t\t\t}\n\t\t\t\t\tif (this._isOverview) {\n\t\t\t\t\t\tshares.data.shared_with_me = !shares.data.shared_with_me\n\t\t\t\t\t\tpromises.push($.ajax(shares))\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._reloadCall = $.when.apply($, promises)\n\t\t\t\tvar callBack = this.reloadCallback.bind(this)\n\t\t\t\treturn this._reloadCall.then(callBack, callBack)\n\t\t\t},\n\n\t\t\treloadCallback: function(shares, remoteShares, additionalShares) {\n\t\t\t\tdelete this._reloadCall\n\t\t\t\tthis.hideMask()\n\n\t\t\t\tthis.$el.find('#headerSharedWith').text(\n\t\t\t\t\tt('files_sharing', this._sharedWithUser ? 'Shared by' : 'Shared with')\n\t\t\t\t)\n\n\t\t\t\tvar files = []\n\n\t\t\t\t// make sure to use the same format\n\t\t\t\tif (shares[0] && shares[0].ocs) {\n\t\t\t\t\tshares = shares[0]\n\t\t\t\t}\n\t\t\t\tif (remoteShares && remoteShares[0] && remoteShares[0].ocs) {\n\t\t\t\t\tremoteShares = remoteShares[0]\n\t\t\t\t}\n\t\t\t\tif (additionalShares && additionalShares[0] && additionalShares[0].ocs) {\n\t\t\t\t\tadditionalShares = additionalShares[0]\n\t\t\t\t}\n\n\t\t\t\tif (shares.ocs && shares.ocs.data) {\n\t\t\t\t\tfiles = files.concat(this._makeFilesFromShares(shares.ocs.data, this._sharedWithUser))\n\t\t\t\t}\n\n\t\t\t\tif (remoteShares && remoteShares.ocs && remoteShares.ocs.data) {\n\t\t\t\t\tfiles = files.concat(this._makeFilesFromRemoteShares(remoteShares.ocs.data))\n\t\t\t\t}\n\n\t\t\t\tif (additionalShares && additionalShares.ocs && additionalShares.ocs.data) {\n\t\t\t\t\tfiles = files.concat(this._makeFilesFromShares(additionalShares.ocs.data, !this._sharedWithUser))\n\t\t\t\t}\n\n\t\t\t\tthis.setFiles(files)\n\t\t\t\treturn true\n\t\t\t},\n\n\t\t\t_makeFilesFromRemoteShares: function(data) {\n\t\t\t\tvar files = data\n\n\t\t\t\tfiles = _.chain(files)\n\t\t\t\t// convert share data to file data\n\t\t\t\t\t.map(function(share) {\n\t\t\t\t\t\tvar file = {\n\t\t\t\t\t\t\tshareOwner: share.owner + '@' + share.remote.replace(/.*?:\\/\\//g, ''),\n\t\t\t\t\t\t\tname: OC.basename(share.mountpoint),\n\t\t\t\t\t\t\tmtime: share.mtime * 1000,\n\t\t\t\t\t\t\tmimetype: share.mimetype,\n\t\t\t\t\t\t\ttype: share.type,\n\t\t\t\t\t\t\tid: share.file_id,\n\t\t\t\t\t\t\tpath: OC.dirname(share.mountpoint),\n\t\t\t\t\t\t\tpermissions: share.permissions,\n\t\t\t\t\t\t\ttags: share.tags || []\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfile.shares = [{\n\t\t\t\t\t\t\tid: share.id,\n\t\t\t\t\t\t\ttype: OC.Share.SHARE_TYPE_REMOTE\n\t\t\t\t\t\t}]\n\t\t\t\t\t\treturn file\n\t\t\t\t\t})\n\t\t\t\t\t.value()\n\t\t\t\treturn files\n\t\t\t},\n\n\t\t\t/**\n\t\t * Converts the OCS API share response data to a file info\n\t\t * list\n\t\t * @param {Array} data OCS API share array\n\t\t * @param {bool} sharedWithUser\n\t\t * @returns {Array.<OCA.Sharing.SharedFileInfo>} array of shared file info\n\t\t */\n\t\t\t_makeFilesFromShares: function(data, sharedWithUser) {\n\t\t\t/* jshint camelcase: false */\n\t\t\t\tvar files = data\n\n\t\t\t\tif (this._linksOnly) {\n\t\t\t\t\tfiles = _.filter(data, function(share) {\n\t\t\t\t\t\treturn share.share_type === OC.Share.SHARE_TYPE_LINK\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t// OCS API uses non-camelcased names\n\t\t\t\tfiles = _.chain(files)\n\t\t\t\t// convert share data to file data\n\t\t\t\t\t.map(function(share) {\n\t\t\t\t\t// TODO: use OC.Files.FileInfo\n\t\t\t\t\t\tvar file = {\n\t\t\t\t\t\t\tid: share.file_source,\n\t\t\t\t\t\t\ticon: OC.MimeType.getIconUrl(share.mimetype),\n\t\t\t\t\t\t\tmimetype: share.mimetype,\n\t\t\t\t\t\t\ttags: share.tags || []\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (share.item_type === 'folder') {\n\t\t\t\t\t\t\tfile.type = 'dir'\n\t\t\t\t\t\t\tfile.mimetype = 'httpd/unix-directory'\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfile.type = 'file'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfile.share = {\n\t\t\t\t\t\t\tid: share.id,\n\t\t\t\t\t\t\ttype: share.share_type,\n\t\t\t\t\t\t\ttarget: share.share_with,\n\t\t\t\t\t\t\tstime: share.stime * 1000,\n\t\t\t\t\t\t\texpiration: share.expiration\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (sharedWithUser) {\n\t\t\t\t\t\t\tfile.shareOwner = share.displayname_owner\n\t\t\t\t\t\t\tfile.shareOwnerId = share.uid_owner\n\t\t\t\t\t\t\tfile.name = OC.basename(share.file_target)\n\t\t\t\t\t\t\tfile.path = OC.dirname(share.file_target)\n\t\t\t\t\t\t\tfile.permissions = share.permissions\n\t\t\t\t\t\t\tif (file.path) {\n\t\t\t\t\t\t\t\tfile.extraData = share.file_target\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (share.share_type !== OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\t\tfile.share.targetDisplayName = share.share_with_displayname\n\t\t\t\t\t\t\t\tfile.share.targetShareWithId = share.share_with\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfile.name = OC.basename(share.path)\n\t\t\t\t\t\t\tfile.path = OC.dirname(share.path)\n\t\t\t\t\t\t\tfile.permissions = OC.PERMISSION_ALL\n\t\t\t\t\t\t\tif (file.path) {\n\t\t\t\t\t\t\t\tfile.extraData = share.path\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn file\n\t\t\t\t\t})\n\t\t\t\t// Group all files and have a \"shares\" array with\n\t\t\t\t// the share info for each file.\n\t\t\t\t//\n\t\t\t\t// This uses a hash memo to cumulate share information\n\t\t\t\t// inside the same file object (by file id).\n\t\t\t\t\t.reduce(function(memo, file) {\n\t\t\t\t\t\tvar data = memo[file.id]\n\t\t\t\t\t\tvar recipient = file.share.targetDisplayName\n\t\t\t\t\t\tvar recipientId = file.share.targetShareWithId\n\t\t\t\t\t\tif (!data) {\n\t\t\t\t\t\t\tdata = memo[file.id] = file\n\t\t\t\t\t\t\tdata.shares = [file.share]\n\t\t\t\t\t\t\t// using a hash to make them unique,\n\t\t\t\t\t\t\t// this is only a list to be displayed\n\t\t\t\t\t\t\tdata.recipients = {}\n\t\t\t\t\t\t\tdata.recipientData = {}\n\t\t\t\t\t\t\t// share types\n\t\t\t\t\t\t\tdata.shareTypes = {}\n\t\t\t\t\t\t\t// counter is cheaper than calling _.keys().length\n\t\t\t\t\t\t\tdata.recipientsCount = 0\n\t\t\t\t\t\t\tdata.mtime = file.share.stime\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t// always take the most recent stime\n\t\t\t\t\t\t\tif (file.share.stime > data.mtime) {\n\t\t\t\t\t\t\t\tdata.mtime = file.share.stime\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdata.shares.push(file.share)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (recipient) {\n\t\t\t\t\t\t// limit counterparts for output\n\t\t\t\t\t\t\tif (data.recipientsCount < 4) {\n\t\t\t\t\t\t\t// only store the first ones, they will be the only ones\n\t\t\t\t\t\t\t// displayed\n\t\t\t\t\t\t\t\tdata.recipients[recipient] = true\n\t\t\t\t\t\t\t\tdata.recipientData[data.recipientsCount] = {\n\t\t\t\t\t\t\t\t\t'shareWith': recipientId,\n\t\t\t\t\t\t\t\t\t'shareWithDisplayName': recipient\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdata.recipientsCount++\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata.shareTypes[file.share.type] = true\n\n\t\t\t\t\t\tdelete file.share\n\t\t\t\t\t\treturn memo\n\t\t\t\t\t}, {})\n\t\t\t\t// Retrieve only the values of the returned hash\n\t\t\t\t\t.values()\n\t\t\t\t// Clean up\n\t\t\t\t\t.each(function(data) {\n\t\t\t\t\t// convert the recipients map to a flat\n\t\t\t\t\t// array of sorted names\n\t\t\t\t\t\tdata.mountType = 'shared'\n\t\t\t\t\t\tdelete data.recipientsCount\n\t\t\t\t\t\tif (sharedWithUser) {\n\t\t\t\t\t\t// only for outgoing shares\n\t\t\t\t\t\t\tdelete data.shareTypes\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdata.shareTypes = _.keys(data.shareTypes)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t// Finish the chain by getting the result\n\t\t\t\t\t.value()\n\n\t\t\t\t// Sort by expected sort comparator\n\t\t\t\treturn files.sort(this._sortComparator)\n\t\t\t}\n\t\t})\n\n\t/**\n\t * Share info attributes.\n\t *\n\t * @typedef {Object} OCA.Sharing.ShareInfo\n\t *\n\t * @property {int} id share ID\n\t * @property {int} type share type\n\t * @property {String} target share target, either user name or group name\n\t * @property {int} stime share timestamp in milliseconds\n\t * @property {String} [targetDisplayName] display name of the recipient\n\t * (only when shared with others)\n\t * @property {String} [targetShareWithId] id of the recipient\n\t *\n\t */\n\n\t/**\n\t * Recipient attributes\n\t *\n\t * @typedef {Object} OCA.Sharing.RecipientInfo\n\t * @property {String} shareWith the id of the recipient\n\t * @property {String} shareWithDisplayName the display name of the recipient\n\t */\n\n\t/**\n\t * Shared file info attributes.\n\t *\n\t * @typedef {OCA.Files.FileInfo} OCA.Sharing.SharedFileInfo\n\t *\n\t * @property {Array.<OCA.Sharing.ShareInfo>} shares array of shares for\n\t * this file\n\t * @property {int} mtime most recent share time (if multiple shares)\n\t * @property {String} shareOwner name of the share owner\n\t * @property {Array.<String>} recipients name of the first 4 recipients\n\t * (this is mostly for display purposes)\n\t * @property {Object.<OCA.Sharing.RecipientInfo>} recipientData (as object for easier\n\t * passing to HTML data attributes with jQuery)\n\t */\n\n\tOCA.Sharing.FileList = FileList\n})()\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index 7fa38a58c59..5b198300589 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -1,3 +1,4 @@
+/* eslint-disable */
/*
* Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>
*
@@ -25,428 +26,423 @@
* @param {boolean} [options.linksOnly] true to return only link shares
*/
var FileList = function($el, options) {
- this.initialize($el, options);
- };
+ this.initialize($el, options)
+ }
FileList.prototype = _.extend({}, OCA.Files.FileList.prototype,
/** @lends OCA.Sharing.FileList.prototype */ {
- appName: 'Shares',
+ appName: 'Shares',
- /**
+ /**
* Whether the list shows the files shared with the user (true) or
* the files that the user shared with others (false).
*/
- _sharedWithUser: false,
- _linksOnly: false,
- _showDeleted: false,
- _clientSideSort: true,
- _allowSelection: false,
- _isOverview: false,
-
- /**
+ _sharedWithUser: false,
+ _linksOnly: false,
+ _showDeleted: false,
+ _clientSideSort: true,
+ _allowSelection: false,
+ _isOverview: false,
+
+ /**
* @private
*/
- initialize: function($el, options) {
- OCA.Files.FileList.prototype.initialize.apply(this, arguments);
- if (this.initialized) {
- return;
- }
+ initialize: function($el, options) {
+ OCA.Files.FileList.prototype.initialize.apply(this, arguments)
+ if (this.initialized) {
+ return
+ }
- // TODO: consolidate both options
- if (options && options.sharedWithUser) {
- this._sharedWithUser = true;
- }
- if (options && options.linksOnly) {
- this._linksOnly = true;
- }
- if (options && options.showDeleted) {
- this._showDeleted = true;
- }
- if (options && options.isOverview) {
- this._isOverview = true;
- }
- },
+ // TODO: consolidate both options
+ if (options && options.sharedWithUser) {
+ this._sharedWithUser = true
+ }
+ if (options && options.linksOnly) {
+ this._linksOnly = true
+ }
+ if (options && options.showDeleted) {
+ this._showDeleted = true
+ }
+ if (options && options.isOverview) {
+ this._isOverview = true
+ }
+ },
- _renderRow: function() {
+ _renderRow: function() {
// HACK: needed to call the overridden _renderRow
// this is because at the time this class is created
// the overriding hasn't been done yet...
- return OCA.Files.FileList.prototype._renderRow.apply(this, arguments);
- },
+ return OCA.Files.FileList.prototype._renderRow.apply(this, arguments)
+ },
- _createRow: function(fileData) {
+ _createRow: function(fileData) {
// TODO: hook earlier and render the whole row here
- var $tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments);
- $tr.find('.filesize').remove();
- $tr.find('td.date').before($tr.children('td:first'));
- $tr.find('td.filename input:checkbox').remove();
- $tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(','));
- if (this._sharedWithUser) {
- $tr.attr('data-share-owner', fileData.shareOwner);
- $tr.attr('data-mounttype', 'shared-root');
- var permission = parseInt($tr.attr('data-permissions')) | OC.PERMISSION_DELETE;
- $tr.attr('data-permissions', permission);
- }
- if (this._showDeleted) {
- var permission = fileData.permissions;
- $tr.attr('data-share-permissions', permission);
- }
-
- // add row with expiration date for link only shares - influenced by _createRow of filelist
- if (this._linksOnly) {
- var expirationTimestamp = 0;
- if(fileData.shares && fileData.shares[0].expiration !== null) {
- expirationTimestamp = moment(fileData.shares[0].expiration).valueOf();
+ var $tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments)
+ $tr.find('.filesize').remove()
+ $tr.find('td.date').before($tr.children('td:first'))
+ $tr.find('td.filename input:checkbox').remove()
+ $tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(','))
+ if (this._sharedWithUser) {
+ $tr.attr('data-share-owner', fileData.shareOwner)
+ $tr.attr('data-mounttype', 'shared-root')
+ var permission = parseInt($tr.attr('data-permissions')) | OC.PERMISSION_DELETE
+ $tr.attr('data-permissions', permission)
}
- $tr.attr('data-expiration', expirationTimestamp);
-
- // date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours)
- // difference in days multiplied by 5 - brightest shade for expiry dates in more than 32 days (160/5)
- var modifiedColor = Math.round((expirationTimestamp - (new Date()).getTime()) / 1000 / 60 / 60 / 24 * 5);
- // ensure that the brightest color is still readable
- if (modifiedColor >= 160) {
- modifiedColor = 160;
+ if (this._showDeleted) {
+ var permission = fileData.permissions
+ $tr.attr('data-share-permissions', permission)
}
- var formatted;
- var text;
- if (expirationTimestamp > 0) {
- formatted = OC.Util.formatDate(expirationTimestamp);
- text = OC.Util.relativeModifiedDate(expirationTimestamp);
- } else {
- formatted = t('files_sharing', 'No expiration date set');
- text = '';
- modifiedColor = 160;
- }
- td = $('<td></td>').attr({"class": "date"});
- td.append($('<span></span>').attr({
- "class": "modified",
- "title": formatted,
- "style": 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'
+ // add row with expiration date for link only shares - influenced by _createRow of filelist
+ if (this._linksOnly) {
+ var expirationTimestamp = 0
+ if (fileData.shares && fileData.shares[0].expiration !== null) {
+ expirationTimestamp = moment(fileData.shares[0].expiration).valueOf()
+ }
+ $tr.attr('data-expiration', expirationTimestamp)
+
+ // date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours)
+ // difference in days multiplied by 5 - brightest shade for expiry dates in more than 32 days (160/5)
+ var modifiedColor = Math.round((expirationTimestamp - (new Date()).getTime()) / 1000 / 60 / 60 / 24 * 5)
+ // ensure that the brightest color is still readable
+ if (modifiedColor >= 160) {
+ modifiedColor = 160
+ }
+
+ var formatted
+ var text
+ if (expirationTimestamp > 0) {
+ formatted = OC.Util.formatDate(expirationTimestamp)
+ text = OC.Util.relativeModifiedDate(expirationTimestamp)
+ } else {
+ formatted = t('files_sharing', 'No expiration date set')
+ text = ''
+ modifiedColor = 160
+ }
+ td = $('<td></td>').attr({ 'class': 'date' })
+ td.append($('<span></span>').attr({
+ 'class': 'modified',
+ 'title': formatted,
+ 'style': 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'
}).text(text)
- .tooltip({placement: 'top'})
- );
+ .tooltip({ placement: 'top' })
+ )
- $tr.append(td);
- }
- return $tr;
- },
+ $tr.append(td)
+ }
+ return $tr
+ },
- /**
+ /**
* Set whether the list should contain outgoing shares
* or incoming shares.
*
* @param state true for incoming shares, false otherwise
*/
- setSharedWithUser: function(state) {
- this._sharedWithUser = !!state;
- },
+ setSharedWithUser: function(state) {
+ this._sharedWithUser = !!state
+ },
- updateEmptyContent: function() {
- var dir = this.getCurrentDirectory();
- if (dir === '/') {
+ updateEmptyContent: function() {
+ var dir = this.getCurrentDirectory()
+ if (dir === '/') {
// root has special permissions
- this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty);
- this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty);
+ this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty)
+ this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty)
- // hide expiration date header for non link only shares
- if (!this._linksOnly) {
- this.$el.find('th.column-expiration').addClass('hidden');
+ // hide expiration date header for non link only shares
+ if (!this._linksOnly) {
+ this.$el.find('th.column-expiration').addClass('hidden')
+ }
+ } else {
+ OCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments)
}
- }
- else {
- OCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments);
- }
- },
+ },
- getDirectoryPermissions: function() {
- return OC.PERMISSION_READ | OC.PERMISSION_DELETE;
- },
+ getDirectoryPermissions: function() {
+ return OC.PERMISSION_READ | OC.PERMISSION_DELETE
+ },
- updateStorageStatistics: function() {
+ updateStorageStatistics: function() {
// no op because it doesn't have
// storage info like free space / used space
- },
+ },
- updateRow: function($tr, fileInfo, options) {
+ updateRow: function($tr, fileInfo, options) {
// no-op, suppress re-rendering
- return $tr;
- },
+ return $tr
+ },
- reload: function() {
- this.showMask();
- if (this._reloadCall) {
- this._reloadCall.abort();
- }
+ reload: function() {
+ this.showMask()
+ if (this._reloadCall) {
+ this._reloadCall.abort()
+ }
- // there is only root
- this._setCurrentDir('/', false);
-
- var promises = [];
-
- var deletedShares = {
- url: OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'deletedshares',
- /* jshint camelcase: false */
- data: {
- format: 'json',
- include_tags: true
- },
- type: 'GET',
- beforeSend: function (xhr) {
- xhr.setRequestHeader('OCS-APIREQUEST', 'true');
- },
- };
-
- var shares = {
- url: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares',
- /* jshint camelcase: false */
- data: {
- format: 'json',
- shared_with_me: this._sharedWithUser !== false,
- include_tags: true
- },
- type: 'GET',
- beforeSend: function (xhr) {
- xhr.setRequestHeader('OCS-APIREQUEST', 'true');
- },
- };
-
- var remoteShares = {
- url: OC.linkToOCS('apps/files_sharing/api/v1') + 'remote_shares',
- /* jshint camelcase: false */
- data: {
- format: 'json',
- include_tags: true
- },
- type: 'GET',
- beforeSend: function (xhr) {
- xhr.setRequestHeader('OCS-APIREQUEST', 'true');
- },
- };
-
- // Add the proper ajax requests to the list and run them
- // and make sure we have 2 promises
- if (this._showDeleted) {
- promises.push($.ajax(deletedShares));
- } else {
- promises.push($.ajax(shares));
-
- if (this._sharedWithUser !== false || this._isOverview) {
- promises.push($.ajax(remoteShares));
+ // there is only root
+ this._setCurrentDir('/', false)
+
+ var promises = []
+
+ var deletedShares = {
+ url: OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'deletedshares',
+ /* jshint camelcase: false */
+ data: {
+ format: 'json',
+ include_tags: true
+ },
+ type: 'GET',
+ beforeSend: function(xhr) {
+ xhr.setRequestHeader('OCS-APIREQUEST', 'true')
+ }
}
- if (this._isOverview) {
- shares.data.shared_with_me = !shares.data.shared_with_me;
- promises.push($.ajax(shares));
+
+ var shares = {
+ url: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares',
+ /* jshint camelcase: false */
+ data: {
+ format: 'json',
+ shared_with_me: this._sharedWithUser !== false,
+ include_tags: true
+ },
+ type: 'GET',
+ beforeSend: function(xhr) {
+ xhr.setRequestHeader('OCS-APIREQUEST', 'true')
+ }
+ }
+
+ var remoteShares = {
+ url: OC.linkToOCS('apps/files_sharing/api/v1') + 'remote_shares',
+ /* jshint camelcase: false */
+ data: {
+ format: 'json',
+ include_tags: true
+ },
+ type: 'GET',
+ beforeSend: function(xhr) {
+ xhr.setRequestHeader('OCS-APIREQUEST', 'true')
+ }
}
- }
- this._reloadCall = $.when.apply($, promises);
- var callBack = this.reloadCallback.bind(this);
- return this._reloadCall.then(callBack, callBack);
- },
+ // Add the proper ajax requests to the list and run them
+ // and make sure we have 2 promises
+ if (this._showDeleted) {
+ promises.push($.ajax(deletedShares))
+ } else {
+ promises.push($.ajax(shares))
- reloadCallback: function(shares, remoteShares, additionalShares) {
- delete this._reloadCall;
- this.hideMask();
+ if (this._sharedWithUser !== false || this._isOverview) {
+ promises.push($.ajax(remoteShares))
+ }
+ if (this._isOverview) {
+ shares.data.shared_with_me = !shares.data.shared_with_me
+ promises.push($.ajax(shares))
+ }
+ }
- this.$el.find('#headerSharedWith').text(
- t('files_sharing', this._sharedWithUser ? 'Shared by' : 'Shared with')
- );
+ this._reloadCall = $.when.apply($, promises)
+ var callBack = this.reloadCallback.bind(this)
+ return this._reloadCall.then(callBack, callBack)
+ },
- var files = [];
+ reloadCallback: function(shares, remoteShares, additionalShares) {
+ delete this._reloadCall
+ this.hideMask()
- // make sure to use the same format
- if (shares[0] && shares[0].ocs) {
- shares = shares[0];
- }
- if (remoteShares && remoteShares[0] && remoteShares[0].ocs) {
- remoteShares = remoteShares[0];
- }
- if (additionalShares && additionalShares[0] && additionalShares[0].ocs) {
- additionalShares = additionalShares[0];
- }
+ this.$el.find('#headerSharedWith').text(
+ t('files_sharing', this._sharedWithUser ? 'Shared by' : 'Shared with')
+ )
- if (shares.ocs && shares.ocs.data) {
- files = files.concat(this._makeFilesFromShares(shares.ocs.data, this._sharedWithUser));
- }
+ var files = []
- if (remoteShares && remoteShares.ocs && remoteShares.ocs.data) {
- files = files.concat(this._makeFilesFromRemoteShares(remoteShares.ocs.data));
- }
+ // make sure to use the same format
+ if (shares[0] && shares[0].ocs) {
+ shares = shares[0]
+ }
+ if (remoteShares && remoteShares[0] && remoteShares[0].ocs) {
+ remoteShares = remoteShares[0]
+ }
+ if (additionalShares && additionalShares[0] && additionalShares[0].ocs) {
+ additionalShares = additionalShares[0]
+ }
- if (additionalShares && additionalShares.ocs && additionalShares.ocs.data) {
- files = files.concat(this._makeFilesFromShares(additionalShares.ocs.data, !this._sharedWithUser));
- }
+ if (shares.ocs && shares.ocs.data) {
+ files = files.concat(this._makeFilesFromShares(shares.ocs.data, this._sharedWithUser))
+ }
+
+ if (remoteShares && remoteShares.ocs && remoteShares.ocs.data) {
+ files = files.concat(this._makeFilesFromRemoteShares(remoteShares.ocs.data))
+ }
+ if (additionalShares && additionalShares.ocs && additionalShares.ocs.data) {
+ files = files.concat(this._makeFilesFromShares(additionalShares.ocs.data, !this._sharedWithUser))
+ }
- this.setFiles(files);
- return true;
- },
+ this.setFiles(files)
+ return true
+ },
- _makeFilesFromRemoteShares: function(data) {
- var files = data;
+ _makeFilesFromRemoteShares: function(data) {
+ var files = data
- files = _.chain(files)
+ files = _.chain(files)
// convert share data to file data
- .map(function(share) {
- var file = {
- shareOwner: share.owner + '@' + share.remote.replace(/.*?:\/\//g, ""),
- name: OC.basename(share.mountpoint),
- mtime: share.mtime * 1000,
- mimetype: share.mimetype,
- type: share.type,
- id: share.file_id,
- path: OC.dirname(share.mountpoint),
- permissions: share.permissions,
- tags: share.tags || []
- };
-
- file.shares = [{
- id: share.id,
- type: OC.Share.SHARE_TYPE_REMOTE
- }];
- return file;
- })
- .value();
- return files;
- },
-
- /**
+ .map(function(share) {
+ var file = {
+ shareOwner: share.owner + '@' + share.remote.replace(/.*?:\/\//g, ''),
+ name: OC.basename(share.mountpoint),
+ mtime: share.mtime * 1000,
+ mimetype: share.mimetype,
+ type: share.type,
+ id: share.file_id,
+ path: OC.dirname(share.mountpoint),
+ permissions: share.permissions,
+ tags: share.tags || []
+ }
+
+ file.shares = [{
+ id: share.id,
+ type: OC.Share.SHARE_TYPE_REMOTE
+ }]
+ return file
+ })
+ .value()
+ return files
+ },
+
+ /**
* Converts the OCS API share response data to a file info
* list
* @param {Array} data OCS API share array
* @param {bool} sharedWithUser
- * @return {Array.<OCA.Sharing.SharedFileInfo>} array of shared file info
+ * @returns {Array.<OCA.Sharing.SharedFileInfo>} array of shared file info
*/
- _makeFilesFromShares: function(data, sharedWithUser) {
+ _makeFilesFromShares: function(data, sharedWithUser) {
/* jshint camelcase: false */
- var files = data;
+ var files = data
- if (this._linksOnly) {
- files = _.filter(data, function(share) {
- return share.share_type === OC.Share.SHARE_TYPE_LINK;
- });
- }
+ if (this._linksOnly) {
+ files = _.filter(data, function(share) {
+ return share.share_type === OC.Share.SHARE_TYPE_LINK
+ })
+ }
- // OCS API uses non-camelcased names
- files = _.chain(files)
+ // OCS API uses non-camelcased names
+ files = _.chain(files)
// convert share data to file data
- .map(function(share) {
+ .map(function(share) {
// TODO: use OC.Files.FileInfo
- var file = {
- id: share.file_source,
- icon: OC.MimeType.getIconUrl(share.mimetype),
- mimetype: share.mimetype,
- tags: share.tags || []
- };
- if (share.item_type === 'folder') {
- file.type = 'dir';
- file.mimetype = 'httpd/unix-directory';
- }
- else {
- file.type = 'file';
- }
- file.share = {
- id: share.id,
- type: share.share_type,
- target: share.share_with,
- stime: share.stime * 1000,
- expiration: share.expiration,
- };
- if (sharedWithUser) {
- file.shareOwner = share.displayname_owner;
- file.shareOwnerId = share.uid_owner;
- file.name = OC.basename(share.file_target);
- file.path = OC.dirname(share.file_target);
- file.permissions = share.permissions;
- if (file.path) {
- file.extraData = share.file_target;
+ var file = {
+ id: share.file_source,
+ icon: OC.MimeType.getIconUrl(share.mimetype),
+ mimetype: share.mimetype,
+ tags: share.tags || []
}
- }
- else {
- if (share.share_type !== OC.Share.SHARE_TYPE_LINK) {
- file.share.targetDisplayName = share.share_with_displayname;
- file.share.targetShareWithId = share.share_with;
+ if (share.item_type === 'folder') {
+ file.type = 'dir'
+ file.mimetype = 'httpd/unix-directory'
+ } else {
+ file.type = 'file'
}
- file.name = OC.basename(share.path);
- file.path = OC.dirname(share.path);
- file.permissions = OC.PERMISSION_ALL;
- if (file.path) {
- file.extraData = share.path;
+ file.share = {
+ id: share.id,
+ type: share.share_type,
+ target: share.share_with,
+ stime: share.stime * 1000,
+ expiration: share.expiration
}
- }
- return file;
- })
+ if (sharedWithUser) {
+ file.shareOwner = share.displayname_owner
+ file.shareOwnerId = share.uid_owner
+ file.name = OC.basename(share.file_target)
+ file.path = OC.dirname(share.file_target)
+ file.permissions = share.permissions
+ if (file.path) {
+ file.extraData = share.file_target
+ }
+ } else {
+ if (share.share_type !== OC.Share.SHARE_TYPE_LINK) {
+ file.share.targetDisplayName = share.share_with_displayname
+ file.share.targetShareWithId = share.share_with
+ }
+ file.name = OC.basename(share.path)
+ file.path = OC.dirname(share.path)
+ file.permissions = OC.PERMISSION_ALL
+ if (file.path) {
+ file.extraData = share.path
+ }
+ }
+ return file
+ })
// Group all files and have a "shares" array with
// the share info for each file.
//
// This uses a hash memo to cumulate share information
// inside the same file object (by file id).
- .reduce(function(memo, file) {
- var data = memo[file.id];
- var recipient = file.share.targetDisplayName;
- var recipientId = file.share.targetShareWithId;
- if (!data) {
- data = memo[file.id] = file;
- data.shares = [file.share];
- // using a hash to make them unique,
- // this is only a list to be displayed
- data.recipients = {};
- data.recipientData = {};
- // share types
- data.shareTypes = {};
- // counter is cheaper than calling _.keys().length
- data.recipientsCount = 0;
- data.mtime = file.share.stime;
- }
- else {
+ .reduce(function(memo, file) {
+ var data = memo[file.id]
+ var recipient = file.share.targetDisplayName
+ var recipientId = file.share.targetShareWithId
+ if (!data) {
+ data = memo[file.id] = file
+ data.shares = [file.share]
+ // using a hash to make them unique,
+ // this is only a list to be displayed
+ data.recipients = {}
+ data.recipientData = {}
+ // share types
+ data.shareTypes = {}
+ // counter is cheaper than calling _.keys().length
+ data.recipientsCount = 0
+ data.mtime = file.share.stime
+ } else {
// always take the most recent stime
- if (file.share.stime > data.mtime) {
- data.mtime = file.share.stime;
+ if (file.share.stime > data.mtime) {
+ data.mtime = file.share.stime
+ }
+ data.shares.push(file.share)
}
- data.shares.push(file.share);
- }
- if (recipient) {
+ if (recipient) {
// limit counterparts for output
- if (data.recipientsCount < 4) {
+ if (data.recipientsCount < 4) {
// only store the first ones, they will be the only ones
// displayed
- data.recipients[recipient] = true;
- data.recipientData[data.recipientsCount] = {
- 'shareWith': recipientId,
- 'shareWithDisplayName': recipient
- };
+ data.recipients[recipient] = true
+ data.recipientData[data.recipientsCount] = {
+ 'shareWith': recipientId,
+ 'shareWithDisplayName': recipient
+ }
+ }
+ data.recipientsCount++
}
- data.recipientsCount++;
- }
- data.shareTypes[file.share.type] = true;
+ data.shareTypes[file.share.type] = true
- delete file.share;
- return memo;
- }, {})
+ delete file.share
+ return memo
+ }, {})
// Retrieve only the values of the returned hash
- .values()
+ .values()
// Clean up
- .each(function(data) {
+ .each(function(data) {
// convert the recipients map to a flat
// array of sorted names
- data.mountType = 'shared';
- delete data.recipientsCount;
- if (sharedWithUser) {
+ data.mountType = 'shared'
+ delete data.recipientsCount
+ if (sharedWithUser) {
// only for outgoing shares
- delete data.shareTypes;
- } else {
- data.shareTypes = _.keys(data.shareTypes);
- }
- })
+ delete data.shareTypes
+ } else {
+ data.shareTypes = _.keys(data.shareTypes)
+ }
+ })
// Finish the chain by getting the result
- .value();
+ .value()
- // Sort by expected sort comparator
- return files.sort(this._sortComparator);
- },
- });
+ // Sort by expected sort comparator
+ return files.sort(this._sortComparator)
+ }
+ })
/**
* Share info attributes.
@@ -486,5 +482,5 @@
* passing to HTML data attributes with jQuery)
*/
- OCA.Sharing.FileList = FileList;
-})();
+ OCA.Sharing.FileList = FileList
+})()
diff --git a/apps/files_sharing/src/additionalScripts.js b/apps/files_sharing/src/additionalScripts.js
index b0525a64a12..db65a2d2085 100644
--- a/apps/files_sharing/src/additionalScripts.js
+++ b/apps/files_sharing/src/additionalScripts.js
@@ -1,6 +1,3 @@
-__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/');
-__webpack_nonce__ = btoa(OC.requestToken);
-
import './share'
import './sharetabview'
import './sharebreadcrumbview'
@@ -10,4 +7,9 @@ import './style/sharebreadcrumb.scss'
import './collaborationresourceshandler.js'
-window.OCA.Sharing = OCA.Sharing;
+// eslint-disable-next-line camelcase
+__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')
+// eslint-disable-next-line camelcase
+__webpack_nonce__ = btoa(OC.requestToken)
+
+window.OCA.Sharing = OCA.Sharing
diff --git a/apps/files_sharing/src/collaborationresources.js b/apps/files_sharing/src/collaborationresources.js
index 27f268be852..9c31f21bee5 100644
--- a/apps/files_sharing/src/collaborationresources.js
+++ b/apps/files_sharing/src/collaborationresources.js
@@ -1,4 +1,4 @@
-/*
+/**
* @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
@@ -20,21 +20,23 @@
*
*/
-import Vue from 'vue';
-import Vuex from 'vuex';
-import { Tooltip, PopoverMenu } from 'nextcloud-vue';
-import ClickOutside from 'vue-click-outside';
+import Vue from 'vue'
+import Vuex from 'vuex'
+import { Tooltip, PopoverMenu } from 'nextcloud-vue'
+import ClickOutside from 'vue-click-outside'
-Vue.prototype.t = t;
-Vue.component('PopoverMenu', PopoverMenu);
-Vue.directive('ClickOutside', ClickOutside);
+import View from './views/CollaborationView'
+
+Vue.prototype.t = t
Tooltip.options.defaultHtml = false
-Vue.directive('Tooltip', Tooltip);
-Vue.use(Vuex);
-import View from './views/CollaborationView';
+// eslint-disable-next-line vue/match-component-file-name
+Vue.component('PopoverMenu', PopoverMenu)
+Vue.directive('ClickOutside', ClickOutside)
+Vue.directive('Tooltip', Tooltip)
+Vue.use(Vuex)
export {
Vue,
View
-};
+}
diff --git a/apps/files_sharing/src/collaborationresourceshandler.js b/apps/files_sharing/src/collaborationresourceshandler.js
index 32e9f17ad77..1e1ebe5b541 100644
--- a/apps/files_sharing/src/collaborationresourceshandler.js
+++ b/apps/files_sharing/src/collaborationresourceshandler.js
@@ -1,19 +1,21 @@
-__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/');
-__webpack_nonce__ = btoa(OC.requestToken);
+// eslint-disable-next-line camelcase
+__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')
+// eslint-disable-next-line camelcase
+__webpack_nonce__ = btoa(OC.requestToken)
window.OCP.Collaboration.registerType('file', {
action: () => {
return new Promise((resolve, reject) => {
- OC.dialogs.filepicker(t('files_sharing', 'Link to a file'), function (f) {
- const client = OC.Files.getClient();
+ OC.dialogs.filepicker(t('files_sharing', 'Link to a file'), function(f) {
+ const client = OC.Files.getClient()
client.getFileInfo(f).then((status, fileInfo) => {
- resolve(fileInfo.id);
+ resolve(fileInfo.id)
}).fail(() => {
- reject();
- });
- }, false, null, false, OC.dialogs.FILEPICKER_TYPE_CHOOSE, '', { allowDirectoryChooser: true });
- });
+ reject(new Error('Cannot get fileinfo'))
+ })
+ }, false, null, false, OC.dialogs.FILEPICKER_TYPE_CHOOSE, '', { allowDirectoryChooser: true })
+ })
},
typeString: t('files_sharing', 'Link to a file'),
typeIconClass: 'icon-files-dark'
-});
+})
diff --git a/apps/files_sharing/src/files_sharing.js b/apps/files_sharing/src/files_sharing.js
index 0bf695a72c9..c521bb11414 100644
--- a/apps/files_sharing/src/files_sharing.js
+++ b/apps/files_sharing/src/files_sharing.js
@@ -1,5 +1,7 @@
-__webpack_nonce__ = btoa(OC.requestToken);
-__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/');
+import '../js/app'
+import '../js/sharedfilelist'
-import '../js/app';
-import '../js/sharedfilelist';
+// eslint-disable-next-line camelcase
+__webpack_nonce__ = btoa(OC.requestToken)
+// eslint-disable-next-line camelcase
+__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')
diff --git a/apps/files_sharing/src/share.js b/apps/files_sharing/src/share.js
index 32ca20f3e62..a66f166759f 100644
--- a/apps/files_sharing/src/share.js
+++ b/apps/files_sharing/src/share.js
@@ -1,3 +1,4 @@
+/* eslint-disable */
/*
* Copyright (c) 2014
*
@@ -14,10 +15,10 @@
PROPERTY_SHARE_TYPES: '{' + OC.Files.Client.NS_OWNCLOUD + '}share-types',
PROPERTY_OWNER_ID: '{' + OC.Files.Client.NS_OWNCLOUD + '}owner-id',
PROPERTY_OWNER_DISPLAY_NAME: '{' + OC.Files.Client.NS_OWNCLOUD + '}owner-display-name'
- });
+ })
if (!OCA.Sharing) {
- OCA.Sharing = {};
+ OCA.Sharing = {}
}
/**
* @namespace
@@ -34,131 +35,130 @@
attach: function(fileList) {
// core sharing is disabled/not loaded
if (!OC.Share) {
- return;
+ return
}
if (fileList.id === 'trashbin' || fileList.id === 'files.public') {
- return;
+ return
}
- var fileActions = fileList.fileActions;
- var oldCreateRow = fileList._createRow;
+ var fileActions = fileList.fileActions
+ var oldCreateRow = fileList._createRow
fileList._createRow = function(fileData) {
- var tr = oldCreateRow.apply(this, arguments);
- var sharePermissions = OCA.Sharing.Util.getSharePermissions(fileData);
-
+ var tr = oldCreateRow.apply(this, arguments)
+ var sharePermissions = OCA.Sharing.Util.getSharePermissions(fileData)
+
if (fileData.permissions === 0) {
// no permission, disabling sidebar
- delete fileActions.actions.all.Comment;
- delete fileActions.actions.all.Details;
- delete fileActions.actions.all.Goto;
+ delete fileActions.actions.all.Comment
+ delete fileActions.actions.all.Details
+ delete fileActions.actions.all.Goto
}
- tr.attr('data-share-permissions', sharePermissions);
+ tr.attr('data-share-permissions', sharePermissions)
if (fileData.shareOwner) {
- tr.attr('data-share-owner', fileData.shareOwner);
- tr.attr('data-share-owner-id', fileData.shareOwnerId);
+ tr.attr('data-share-owner', fileData.shareOwner)
+ tr.attr('data-share-owner-id', fileData.shareOwnerId)
// user should always be able to rename a mount point
if (fileData.mountType === 'shared-root') {
- tr.attr('data-permissions', fileData.permissions | OC.PERMISSION_UPDATE);
+ tr.attr('data-permissions', fileData.permissions | OC.PERMISSION_UPDATE)
}
}
if (fileData.recipientData && !_.isEmpty(fileData.recipientData)) {
- tr.attr('data-share-recipient-data', JSON.stringify(fileData.recipientData));
+ tr.attr('data-share-recipient-data', JSON.stringify(fileData.recipientData))
}
if (fileData.shareTypes) {
- tr.attr('data-share-types', fileData.shareTypes.join(','));
+ tr.attr('data-share-types', fileData.shareTypes.join(','))
}
- return tr;
- };
+ return tr
+ }
- var oldElementToFile = fileList.elementToFile;
+ var oldElementToFile = fileList.elementToFile
fileList.elementToFile = function($el) {
- var fileInfo = oldElementToFile.apply(this, arguments);
- fileInfo.sharePermissions = $el.attr('data-share-permissions') || undefined;
- fileInfo.shareOwner = $el.attr('data-share-owner') || undefined;
- fileInfo.shareOwnerId = $el.attr('data-share-owner-id') || undefined;
+ var fileInfo = oldElementToFile.apply(this, arguments)
+ fileInfo.sharePermissions = $el.attr('data-share-permissions') || undefined
+ fileInfo.shareOwner = $el.attr('data-share-owner') || undefined
+ fileInfo.shareOwnerId = $el.attr('data-share-owner-id') || undefined
- if( $el.attr('data-share-types')){
- fileInfo.shareTypes = $el.attr('data-share-types').split(',');
+ if ($el.attr('data-share-types')) {
+ fileInfo.shareTypes = $el.attr('data-share-types').split(',')
}
- if( $el.attr('data-expiration')){
- var expirationTimestamp = parseInt($el.attr('data-expiration'));
- fileInfo.shares = [];
- fileInfo.shares.push({expiration: expirationTimestamp});
+ if ($el.attr('data-expiration')) {
+ var expirationTimestamp = parseInt($el.attr('data-expiration'))
+ fileInfo.shares = []
+ fileInfo.shares.push({ expiration: expirationTimestamp })
}
- return fileInfo;
- };
+ return fileInfo
+ }
- var oldGetWebdavProperties = fileList._getWebdavProperties;
+ var oldGetWebdavProperties = fileList._getWebdavProperties
fileList._getWebdavProperties = function() {
- var props = oldGetWebdavProperties.apply(this, arguments);
- props.push(OC.Files.Client.PROPERTY_OWNER_ID);
- props.push(OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME);
- props.push(OC.Files.Client.PROPERTY_SHARE_TYPES);
- return props;
- };
+ var props = oldGetWebdavProperties.apply(this, arguments)
+ props.push(OC.Files.Client.PROPERTY_OWNER_ID)
+ props.push(OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME)
+ props.push(OC.Files.Client.PROPERTY_SHARE_TYPES)
+ return props
+ }
fileList.filesClient.addFileInfoParser(function(response) {
- var data = {};
- var props = response.propStat[0].properties;
- var permissionsProp = props[OC.Files.Client.PROPERTY_PERMISSIONS];
+ var data = {}
+ var props = response.propStat[0].properties
+ var permissionsProp = props[OC.Files.Client.PROPERTY_PERMISSIONS]
if (permissionsProp && permissionsProp.indexOf('S') >= 0) {
- data.shareOwner = props[OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME];
- data.shareOwnerId = props[OC.Files.Client.PROPERTY_OWNER_ID];
+ data.shareOwner = props[OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME]
+ data.shareOwnerId = props[OC.Files.Client.PROPERTY_OWNER_ID]
}
- var shareTypesProp = props[OC.Files.Client.PROPERTY_SHARE_TYPES];
+ var shareTypesProp = props[OC.Files.Client.PROPERTY_SHARE_TYPES]
if (shareTypesProp) {
data.shareTypes = _.chain(shareTypesProp).filter(function(xmlvalue) {
- return (xmlvalue.namespaceURI === OC.Files.Client.NS_OWNCLOUD && xmlvalue.nodeName.split(':')[1] === 'share-type');
+ return (xmlvalue.namespaceURI === OC.Files.Client.NS_OWNCLOUD && xmlvalue.nodeName.split(':')[1] === 'share-type')
}).map(function(xmlvalue) {
- return parseInt(xmlvalue.textContent || xmlvalue.text, 10);
- }).value();
+ return parseInt(xmlvalue.textContent || xmlvalue.text, 10)
+ }).value()
}
- return data;
- });
+ return data
+ })
// use delegate to catch the case with multiple file lists
- fileList.$el.on('fileActionsReady', function(ev){
- var $files = ev.$files;
+ fileList.$el.on('fileActionsReady', function(ev) {
+ var $files = ev.$files
_.each($files, function(file) {
- var $tr = $(file);
- var shareTypes = $tr.attr('data-share-types') || '';
- var shareOwner = $tr.attr('data-share-owner');
+ var $tr = $(file)
+ var shareTypes = $tr.attr('data-share-types') || ''
+ var shareOwner = $tr.attr('data-share-owner')
if (shareTypes || shareOwner) {
- var hasLink = false;
- var hasShares = false;
+ var hasLink = false
+ var hasShares = false
_.each(shareTypes.split(',') || [], function(shareType) {
- shareType = parseInt(shareType, 10);
+ shareType = parseInt(shareType, 10)
if (shareType === OC.Share.SHARE_TYPE_LINK) {
- hasLink = true;
+ hasLink = true
} else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {
- hasLink = true;
+ hasLink = true
} else if (shareType === OC.Share.SHARE_TYPE_USER) {
- hasShares = true;
+ hasShares = true
} else if (shareType === OC.Share.SHARE_TYPE_GROUP) {
- hasShares = true;
+ hasShares = true
} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {
- hasShares = true;
+ hasShares = true
} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {
- hasShares = true;
+ hasShares = true
} else if (shareType === OC.Share.SHARE_TYPE_ROOM) {
- hasShares = true;
+ hasShares = true
}
- });
- OCA.Sharing.Util._updateFileActionIcon($tr, hasShares, hasLink);
+ })
+ OCA.Sharing.Util._updateFileActionIcon($tr, hasShares, hasLink)
}
- });
- });
-
+ })
+ })
fileList.$el.on('changeDirectory', function() {
- OCA.Sharing.sharesLoaded = false;
- });
+ OCA.Sharing.sharesLoaded = false
+ })
fileActions.registerAction({
name: 'Share',
@@ -193,40 +193,40 @@
type: OCA.Files.FileActions.TYPE_INLINE,
actionHandler: function(fileName, context) {
// do not open sidebar if permission is set and equal to 0
- var permissions = parseInt(context.$file.data('share-permissions'), 10);
+ var permissions = parseInt(context.$file.data('share-permissions'), 10)
if (isNaN(permissions) || permissions > 0) {
- fileList.showDetailsView(fileName, 'shareTabView');
+ fileList.showDetailsView(fileName, 'shareTabView')
}
},
render: function(actionSpec, isDefault, context) {
- var permissions = parseInt(context.$file.data('permissions'), 10);
+ var permissions = parseInt(context.$file.data('permissions'), 10)
// if no share permissions but share owner exists, still show the link
if ((permissions & OC.PERMISSION_SHARE) !== 0 || context.$file.attr('data-share-owner')) {
- return fileActions._defaultRenderAction.call(fileActions, actionSpec, isDefault, context);
+ return fileActions._defaultRenderAction.call(fileActions, actionSpec, isDefault, context)
}
// don't render anything
- return null;
+ return null
}
- });
+ })
- var shareTab = new OCA.Sharing.ShareTabView('shareTabView', {order: -20});
+ var shareTab = new OCA.Sharing.ShareTabView('shareTabView', { order: -20 })
// detect changes and change the matching list entry
shareTab.on('sharesChanged', function(shareModel) {
- var fileInfoModel = shareModel.fileInfoModel;
- var $tr = fileList.findFileEl(fileInfoModel.get('name'));
+ var fileInfoModel = shareModel.fileInfoModel
+ var $tr = fileList.findFileEl(fileInfoModel.get('name'))
// We count email shares as link share
- var hasLinkShares = shareModel.hasLinkShares();
- shareModel.get('shares').forEach(function (share) {
+ var hasLinkShares = shareModel.hasLinkShares()
+ shareModel.get('shares').forEach(function(share) {
if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {
- hasLinkShares = true;
+ hasLinkShares = true
}
- });
+ })
- OCA.Sharing.Util._updateFileListDataAttributes(fileList, $tr, shareModel);
+ OCA.Sharing.Util._updateFileListDataAttributes(fileList, $tr, shareModel)
if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShares)) {
// remove icon, if applicable
- OC.Share.markFileAsShared($tr, false, false);
+ OC.Share.markFileAsShared($tr, false, false)
}
// FIXME: this is too convoluted. We need to get rid of the above updates
@@ -237,12 +237,12 @@
// we need to modify the model
// (FIXME: yes, this is hacky)
icon: $tr.attr('data-icon')
- });
- });
- fileList.registerTabView(shareTab);
+ })
+ })
+ fileList.registerTabView(shareTab)
- var breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView({shareTab: shareTab});
- fileList.registerBreadCrumbDetailView(breadCrumbSharingDetailView);
+ var breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView({ shareTab: shareTab })
+ fileList.registerBreadCrumbDetailView(breadCrumbSharingDetailView)
},
/**
@@ -252,18 +252,17 @@
// files app current cannot show recipients on load, so we don't update the
// icon when changed for consistency
if (fileList.id === 'files') {
- return;
+ return
}
- var recipients = _.pluck(shareModel.get('shares'), 'share_with_displayname');
+ var recipients = _.pluck(shareModel.get('shares'), 'share_with_displayname')
// note: we only update the data attribute because updateIcon()
if (recipients.length) {
- var recipientData = _.mapObject(shareModel.get('shares'), function (share) {
- return {shareWith: share.share_with, shareWithDisplayName: share.share_with_displayname};
- });
- $tr.attr('data-share-recipient-data', JSON.stringify(recipientData));
- }
- else {
- $tr.removeAttr('data-share-recipient-data');
+ var recipientData = _.mapObject(shareModel.get('shares'), function(share) {
+ return { shareWith: share.share_with, shareWithDisplayName: share.share_with_displayname }
+ })
+ $tr.attr('data-share-recipient-data', JSON.stringify(recipientData))
+ } else {
+ $tr.removeAttr('data-share-recipient-data')
}
},
@@ -274,16 +273,16 @@
* @param {boolean} hasUserShares true if a user share exists
* @param {boolean} hasLinkShares true if a link share exists
*
- * @return {boolean} true if the icon was set, false otherwise
+ * @returns {boolean} true if the icon was set, false otherwise
*/
_updateFileActionIcon: function($tr, hasUserShares, hasLinkShares) {
// if the statuses are loaded already, use them for the icon
// (needed when scrolling to the next page)
if (hasUserShares || hasLinkShares || $tr.attr('data-share-recipient-data') || $tr.attr('data-share-owner')) {
- OC.Share.markFileAsShared($tr, true, hasLinkShares);
- return true;
+ OC.Share.markFileAsShared($tr, true, hasLinkShares)
+ return true
}
- return false;
+ return false
},
/**
@@ -291,9 +290,9 @@
* @returns {String}
*/
getSharePermissions: function(fileData) {
- return fileData.sharePermissions;
+ return fileData.sharePermissions
}
- };
-})();
+ }
+})()
-OC.Plugins.register('OCA.Files.FileList', OCA.Sharing.Util);
+OC.Plugins.register('OCA.Files.FileList', OCA.Sharing.Util)
diff --git a/apps/files_sharing/src/sharebreadcrumbview.js b/apps/files_sharing/src/sharebreadcrumbview.js
index 17e3eae0bf5..a90c94b6d7d 100644
--- a/apps/files_sharing/src/sharebreadcrumbview.js
+++ b/apps/files_sharing/src/sharebreadcrumbview.js
@@ -1,5 +1,3 @@
-/* global Handlebars, OC */
-
/**
* @copyright 2016 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@@ -23,7 +21,7 @@
*/
(function() {
- 'use strict';
+ 'use strict'
var BreadCrumbView = OC.Backbone.View.extend({
tagName: 'span',
@@ -36,68 +34,68 @@
_shareTab: undefined,
initialize: function(options) {
- this._shareTab = options.shareTab;
+ this._shareTab = options.shareTab
},
render: function(data) {
- this._dirInfo = data.dirInfo || null;
+ this._dirInfo = data.dirInfo || null
if (this._dirInfo !== null && (this._dirInfo.path !== '/' || this._dirInfo.name !== '')) {
- var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0;
- this.$el.removeClass('shared icon-public icon-shared');
+ var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0
+ this.$el.removeClass('shared icon-public icon-shared')
if (isShared) {
- this.$el.addClass('shared');
+ this.$el.addClass('shared')
if (data.dirInfo.shareTypes.indexOf(OC.Share.SHARE_TYPE_LINK) !== -1) {
- this.$el.addClass('icon-public');
+ this.$el.addClass('icon-public')
} else {
- this.$el.addClass('icon-shared');
+ this.$el.addClass('icon-shared')
}
} else {
- this.$el.addClass('icon-shared');
+ this.$el.addClass('icon-shared')
}
- this.$el.show();
- this.delegateEvents();
+ this.$el.show()
+ this.delegateEvents()
} else {
- this.$el.removeClass('shared icon-public icon-shared');
- this.$el.hide();
+ this.$el.removeClass('shared icon-public icon-shared')
+ this.$el.hide()
}
- return this;
+ return this
},
_onClick: function(e) {
- e.preventDefault();
+ e.preventDefault()
- var fileInfoModel = new OCA.Files.FileInfoModel(this._dirInfo);
- var self = this;
+ var fileInfoModel = new OCA.Files.FileInfoModel(this._dirInfo)
+ var self = this
fileInfoModel.on('change', function() {
self.render({
dirInfo: self._dirInfo
- });
- });
+ })
+ })
this._shareTab.on('sharesChanged', function(shareModel) {
- var shareTypes = [];
- var shares = shareModel.getSharesWithCurrentItem();
+ var shareTypes = []
+ var shares = shareModel.getSharesWithCurrentItem()
- for(var i = 0; i < shares.length; i++) {
+ for (var i = 0; i < shares.length; i++) {
if (shareTypes.indexOf(shares[i].share_type) === -1) {
- shareTypes.push(shares[i].share_type);
+ shareTypes.push(shares[i].share_type)
}
}
if (shareModel.hasLinkShares()) {
- shareTypes.push(OC.Share.SHARE_TYPE_LINK);
+ shareTypes.push(OC.Share.SHARE_TYPE_LINK)
}
// Since the dirInfo isn't updated we need to do this dark hackery
- self._dirInfo.shareTypes = shareTypes;
+ self._dirInfo.shareTypes = shareTypes
self.render({
dirInfo: self._dirInfo
- });
- });
- OCA.Files.App.fileList.showDetailsView(fileInfoModel, 'shareTabView');
+ })
+ })
+ OCA.Files.App.fileList.showDetailsView(fileInfoModel, 'shareTabView')
}
- });
+ })
- OCA.Sharing.ShareBreadCrumbView = BreadCrumbView;
-})();
+ OCA.Sharing.ShareBreadCrumbView = BreadCrumbView
+})()
diff --git a/apps/files_sharing/src/sharetabview.js b/apps/files_sharing/src/sharetabview.js
index 44c863fbe9e..da0708b85a6 100644
--- a/apps/files_sharing/src/sharetabview.js
+++ b/apps/files_sharing/src/sharetabview.js
@@ -11,77 +11,77 @@
/* @global Handlebars */
(function() {
- var TEMPLATE =
- '<div>' +
- '<div class="dialogContainer"></div>' +
- '<div id="collaborationResources"></div>' +
- '</div>';
+ var TEMPLATE
+ = '<div>'
+ + '<div class="dialogContainer"></div>'
+ + '<div id="collaborationResources"></div>'
+ + '</div>'
/**
* @memberof OCA.Sharing
*/
var ShareTabView = OCA.Files.DetailTabView.extend(
/** @lends OCA.Sharing.ShareTabView.prototype */ {
- id: 'shareTabView',
- className: 'tab shareTabView',
+ id: 'shareTabView',
+ className: 'tab shareTabView',
- initialize: function(name, options) {
- OCA.Files.DetailTabView.prototype.initialize.call(this, name, options);
- OC.Plugins.attach('OCA.Sharing.ShareTabView', this);
- },
+ initialize: function(name, options) {
+ OCA.Files.DetailTabView.prototype.initialize.call(this, name, options)
+ OC.Plugins.attach('OCA.Sharing.ShareTabView', this)
+ },
- template: function(params) {
- return TEMPLATE;
- },
+ template: function(params) {
+ return TEMPLATE
+ },
- getLabel: function() {
- return t('files_sharing', 'Sharing');
- },
+ getLabel: function() {
+ return t('files_sharing', 'Sharing')
+ },
- getIcon: function() {
- return 'icon-shared';
- },
+ getIcon: function() {
+ return 'icon-shared'
+ },
- /**
+ /**
* Renders this details view
*/
- render: function() {
- var self = this;
- if (this._dialog) {
+ render: function() {
+ var self = this
+ if (this._dialog) {
// remove/destroy older instance
- this._dialog.model.off();
- this._dialog.remove();
- this._dialog = null;
- }
-
- if (this.model) {
- this.$el.html(this.template());
-
- if (_.isUndefined(this.model.get('sharePermissions'))) {
- this.model.set('sharePermissions', OCA.Sharing.Util.getSharePermissions(this.model.attributes));
+ this._dialog.model.off()
+ this._dialog.remove()
+ this._dialog = null
}
- // TODO: the model should read these directly off the passed fileInfoModel
- var attributes = {
- itemType: this.model.isDirectory() ? 'folder' : 'file',
- itemSource: this.model.get('id'),
- possiblePermissions: this.model.get('sharePermissions')
- };
- var configModel = new OC.Share.ShareConfigModel();
- var shareModel = new OC.Share.ShareItemModel(attributes, {
- configModel: configModel,
- fileInfoModel: this.model
- });
- this._dialog = new OC.Share.ShareDialogView({
- configModel: configModel,
- model: shareModel
- });
- this.$el.find('.dialogContainer').append(this._dialog.$el);
- this._dialog.render();
- this._dialog.model.fetch();
- this._dialog.model.on('change', function() {
- self.trigger('sharesChanged', shareModel);
- });
+ if (this.model) {
+ this.$el.html(this.template())
+
+ if (_.isUndefined(this.model.get('sharePermissions'))) {
+ this.model.set('sharePermissions', OCA.Sharing.Util.getSharePermissions(this.model.attributes))
+ }
+
+ // TODO: the model should read these directly off the passed fileInfoModel
+ var attributes = {
+ itemType: this.model.isDirectory() ? 'folder' : 'file',
+ itemSource: this.model.get('id'),
+ possiblePermissions: this.model.get('sharePermissions')
+ }
+ var configModel = new OC.Share.ShareConfigModel()
+ var shareModel = new OC.Share.ShareItemModel(attributes, {
+ configModel: configModel,
+ fileInfoModel: this.model
+ })
+ this._dialog = new OC.Share.ShareDialogView({
+ configModel: configModel,
+ model: shareModel
+ })
+ this.$el.find('.dialogContainer').append(this._dialog.$el)
+ this._dialog.render()
+ this._dialog.model.fetch()
+ this._dialog.model.on('change', function() {
+ self.trigger('sharesChanged', shareModel)
+ })
import('./collaborationresources').then((Resources) => {
var vm = new Resources.Vue({
@@ -89,20 +89,19 @@
render: h => h(Resources.View),
data: {
model: this.model.toJSON()
- },
- });
+ }
+ })
this.model.on('change', () => { vm.data = this.model.toJSON() })
})
- } else {
- this.$el.empty();
+ } else {
+ this.$el.empty()
// TODO: render placeholder text?
+ }
+ this.trigger('rendered')
}
- this.trigger('rendered');
- }
- });
-
- OCA.Sharing.ShareTabView = ShareTabView;
-})();
+ })
+ OCA.Sharing.ShareTabView = ShareTabView
+})()
diff --git a/apps/files_sharing/src/views/CollaborationView.vue b/apps/files_sharing/src/views/CollaborationView.vue
index 0307488b5a9..5cfcd299cce 100644
--- a/apps/files_sharing/src/views/CollaborationView.vue
+++ b/apps/files_sharing/src/views/CollaborationView.vue
@@ -21,7 +21,10 @@
-->
<template>
- <collection-list v-if="fileId" type="file" :id="fileId" :name="filename"></collection-list>
+ <CollectionList v-if="fileId"
+ :id="fileId"
+ type="file"
+ :name="filename" />
</template>
<script>
@@ -29,22 +32,22 @@ import { CollectionList } from 'nextcloud-vue-collections'
export default {
name: 'CollaborationView',
+ components: {
+ CollectionList
+ },
computed: {
fileId() {
if (this.$root.model && this.$root.model.id) {
- return '' + this.$root.model.id;
+ return '' + this.$root.model.id
}
- return null;
+ return null
},
filename() {
if (this.$root.model && this.$root.model.name) {
- return '' + this.$root.model.name;
+ return '' + this.$root.model.name
}
- return '';
+ return ''
}
- },
- components: {
- CollectionList
}
}
</script>