diff options
-rw-r--r-- | apps/files_sharing/js/dist/additionalScripts.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/js/dist/additionalScripts.js.map | 2 | ||||
-rw-r--r-- | apps/files_sharing/js/dist/files_sharing.js | 2 | ||||
-rw-r--r-- | apps/files_sharing/js/dist/files_sharing.js.map | 2 | ||||
-rw-r--r-- | apps/files_sharing/js/dist/main.js | 24 | ||||
-rw-r--r-- | apps/files_sharing/js/dist/main.js.map | 1 | ||||
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 7 | ||||
-rw-r--r-- | apps/files_sharing/src/index.js | 36 | ||||
-rw-r--r-- | apps/files_sharing/src/share.js | 12 | ||||
-rw-r--r-- | apps/files_sharing/webpack.js | 5 |
10 files changed, 76 insertions, 19 deletions
diff --git a/apps/files_sharing/js/dist/additionalScripts.js b/apps/files_sharing/js/dist/additionalScripts.js index fbffbf83439..6c8e60d09c1 100644 --- a/apps/files_sharing/js/dist/additionalScripts.js +++ b/apps/files_sharing/js/dist/additionalScripts.js @@ -1,4 +1,4 @@ -!function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},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(a.s=174)}({174:function(e,t,a){"use strict";a.r(t);a(175),a(176),a(177),a(65);a.p=OC.linkTo("files_sharing","js/dist/"),a.nc=btoa(OC.requestToken),window.OCA.Sharing=OCA.Sharing},175:function(e,a){_.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={}),OC.Share=_.extend(OC.Share||{},{SHARE_TYPE_USER:0,SHARE_TYPE_GROUP:1,SHARE_TYPE_LINK:3,SHARE_TYPE_EMAIL:4,SHARE_TYPE_REMOTE:6,SHARE_TYPE_CIRCLE:7,SHARE_TYPE_GUEST:8,SHARE_TYPE_REMOTE_GROUP:9,SHARE_TYPE_ROOM:10}),OCA.Sharing.Util={_REMOTE_OWNER_REGEXP:new RegExp("^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$"),attach:function(e){if(OC.Share&&"trashbin"!==e.id&&"files.public"!==e.id){var a=e.fileActions,r=e._createRow;e._createRow=function(e){var t=r.apply(this,arguments),n=OCA.Sharing.Util.getSharePermissions(e);return 0===e.permissions&&(delete a.actions.all.Comment,delete a.actions.all.Details,delete a.actions.all.Goto),t.attr("data-share-permissions",n),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 n=e.elementToFile;e.elementToFile=function(e){var t=n.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 a=parseInt(e.attr("data-expiration"));t.shares=[],t.shares.push({expiration:a})}return t};var i=e._getWebdavProperties;e._getWebdavProperties=function(){var e=i.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={},a=e.propStat[0].properties,r=a[OC.Files.Client.PROPERTY_PERMISSIONS];r&&r.indexOf("S")>=0&&(t.shareOwner=a[OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME],t.shareOwnerId=a[OC.Files.Client.PROPERTY_OWNER_ID]);var n=a[OC.Files.Client.PROPERTY_SHARE_TYPES];return n&&(t.shareTypes=_.chain(n).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),a=t.attr("data-share-types")||"",r=t.attr("data-share-owner");if(a||r){var n=!1,i=!1;_.each(a.split(",")||[],(function(e){(e=parseInt(e,10))===OC.Share.SHARE_TYPE_LINK?n=!0:e===OC.Share.SHARE_TYPE_EMAIL?n=!0:e===OC.Share.SHARE_TYPE_USER?i=!0:e===OC.Share.SHARE_TYPE_GROUP?i=!0:e===OC.Share.SHARE_TYPE_REMOTE?i=!0:e===OC.Share.SHARE_TYPE_CIRCLE?i=!0:e===OC.Share.SHARE_TYPE_ROOM&&(i=!0)})),OCA.Sharing.Util._updateFileActionIcon(t,i,n)}}))})),e.$el.on("changeDirectory",(function(){OCA.Sharing.sharesLoaded=!1})),a.registerAction({name:"Share",displayName:function(e){if(e&&e.$file){var a=parseInt(e.$file.data("share-types"),10),r=e.$file.data("share-owner-id");if(a>=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 a=parseInt(t.$file.data("share-types"),10);return a===OC.Share.SHARE_TYPE_EMAIL||a===OC.Share.SHARE_TYPE_LINK?"icon-public":"icon-shared"},icon:function(e,t){var a=t.$file.data("share-owner-id");if(a)return OC.generateUrl("/avatar/".concat(a,"/32"))},type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(t,a){var r=parseInt(a.$file.data("share-permissions"),10);(isNaN(r)||r>0)&&e.showDetailsView(t,"sharing")},render:function(e,t,r){return 0!=(parseInt(r.$file.data("permissions"),10)&OC.PERMISSION_SHARE)||r.$file.attr("data-share-owner")?a._defaultRenderAction.call(a,e,t,r):null}});var s=new OCA.Sharing.ShareBreadCrumbView;e.registerBreadCrumbDetailView(s)}},_updateFileListDataAttributes:function(e,t,a){if("files"!==e.id)if(_.pluck(a.get("shares"),"share_with_displayname").length){var r=_.mapObject(a.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,a){return console.info("object"),!!(t||a||e.attr("data-share-recipient-data")||e.attr("data-share-owner"))&&(OCA.Sharing.Util._markFileAsShared(e,!0,a),!0)},_markFileAsShared:function(e,a,r){var n,i,s,o,l=e.find('.fileactions .action[data-action="Share"]'),d=e.data("type"),c=l.find(".icon"),h=e.attr("data-share-owner-id"),u=e.attr("data-share-owner"),p=e.attr("data-mounttype"),f="icon-shared";l.removeClass("shared-style"),"dir"===d&&(a||r||h)?(o=void 0!==p&&"shared-root"!==p&&"shared"!==p?OC.MimeType.getIconUrl("dir-"+p):r?OC.MimeType.getIconUrl("dir-public"):OC.MimeType.getIconUrl("dir-shared"),e.find(".filename .thumbnail").css("background-image","url("+o+")"),e.attr("data-icon",o)):"dir"===d&&("true"===e.attr("data-e2eencrypted")?(o=OC.MimeType.getIconUrl("dir-encrypted"),e.attr("data-icon",o)):p&&0===p.indexOf("external")?(o=OC.MimeType.getIconUrl("dir-external"),e.attr("data-icon",o)):(o=OC.MimeType.getIconUrl("dir"),e.removeAttr("data-icon")),e.find(".filename .thumbnail").css("background-image","url("+o+")")),a||h?(i=e.data("share-recipient-data"),l.addClass("shared-style"),s="<span>"+t("core","Shared")+"</span>",h?(n=t("core","Shared by"),s=OCA.Sharing.Util._formatRemoteShare(h,u,n)):i&&(s=OCA.Sharing.Util._formatShareList(i)),l.html(s).prepend(c),(h||i)&&(l.find(".avatar").each((function(){$(this).avatar($(this).data("username"),32)})),l.find("span[title]").tooltip({placement:"top"}))):l.html('<span class="hidden-visually">'+t("core","Shared")+"</span>").prepend(c),r&&(f="icon-public"),c.removeClass("icon-shared icon-public").addClass(f)},_formatRemoteShare:function(e,t,a){var r=OCA.Sharing.Util._REMOTE_OWNER_REGEXP.exec(e);if(!r)return'<span class="avatar" data-username="'+escapeHTML(e)+'" title="'+a+" "+escapeHTML(t)+'"></span><span class="hidden-visually">'+a+" "+escapeHTML(t)+"</span> ";var n=r[1],i=r[3],s=r[4],o=a+" "+n;i&&(o+="@"+i),s&&(i||(i="…"),o+="@"+s);var l='<span class="remoteAddress" title="'+escapeHTML(o)+'">';return l+='<span class="username">'+escapeHTML(n)+"</span>",i&&(l+='<span class="userDomain">@'+escapeHTML(i)+"</span>"),l+="</span> "},_formatShareList:function(e){var a=this;return(e=_.toArray(e)).sort((function(e,t){return e.shareWithDisplayName.localeCompare(t.shareWithDisplayName)})),$.map(e,(function(e){return a._formatRemoteShare(e.shareWith,e.shareWithDisplayName,t("core","Shared with"))}))},markFileAsShared:function(e,a,r){var n,i,s,o,l=e.find('.fileactions .action[data-action="Share"]'),d=e.data("type"),c=l.find(".icon"),h=e.attr("data-share-owner-id"),u=e.attr("data-share-owner"),p=e.attr("data-mounttype"),f="icon-shared";l.removeClass("shared-style"),"dir"===d&&(a||r||h)?(o=void 0!==p&&"shared-root"!==p&&"shared"!==p?OC.MimeType.getIconUrl("dir-"+p):r?OC.MimeType.getIconUrl("dir-public"):OC.MimeType.getIconUrl("dir-shared"),e.find(".filename .thumbnail").css("background-image","url("+o+")"),e.attr("data-icon",o)):"dir"===d&&("true"===e.attr("data-e2eencrypted")?(o=OC.MimeType.getIconUrl("dir-encrypted"),e.attr("data-icon",o)):p&&0===p.indexOf("external")?(o=OC.MimeType.getIconUrl("dir-external"),e.attr("data-icon",o)):(o=OC.MimeType.getIconUrl("dir"),e.removeAttr("data-icon")),e.find(".filename .thumbnail").css("background-image","url("+o+")")),a||h?(i=e.data("share-recipient-data"),l.addClass("shared-style"),s="<span>"+t("core","Shared")+"</span>",h?(n=t("core","Shared by"),s=this._formatRemoteShare(h,u,n)):i&&(s=this._formatShareList(i)),l.html(s).prepend(c),(h||i)&&(l.find(".avatar").each((function(){$(this).avatar($(this).data("username"),32)})),l.find("span[title]").tooltip({placement:"top"}))):l.html('<span class="hidden-visually">'+t("core","Shared")+"</span>").prepend(c),r&&(f="icon-public"),c.removeClass("icon-shared icon-public").addClass(f)},getSharePermissions:function(e){return e.sharePermissions}},OC.Plugins.register("OCA.Files.FileList",OCA.Sharing.Util)},176:function(e,t){ +!function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},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(a.s=174)}({174:function(e,t,a){"use strict";a.r(t);a(175),a(176),a(177),a(65);a.p=OC.linkTo("files_sharing","js/dist/"),a.nc=btoa(OC.requestToken),window.OCA.Sharing=OCA.Sharing},175:function(e,a){_.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={_REMOTE_OWNER_REGEXP:new RegExp("^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$"),attach:function(e){if(OC.Share&&"trashbin"!==e.id&&"files.public"!==e.id){var a=e.fileActions,r=e._createRow;e._createRow=function(e){var t=r.apply(this,arguments),n=OCA.Sharing.Util.getSharePermissions(e);return 0===e.permissions&&(delete a.actions.all.Comment,delete a.actions.all.Details,delete a.actions.all.Goto),t.attr("data-share-permissions",n),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 n=e.elementToFile;e.elementToFile=function(e){var t=n.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 a=parseInt(e.attr("data-expiration"));t.shares=[],t.shares.push({expiration:a})}return t};var i=e._getWebdavProperties;e._getWebdavProperties=function(){var e=i.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={},a=e.propStat[0].properties,r=a[OC.Files.Client.PROPERTY_PERMISSIONS];r&&r.indexOf("S")>=0&&(t.shareOwner=a[OC.Files.Client.PROPERTY_OWNER_DISPLAY_NAME],t.shareOwnerId=a[OC.Files.Client.PROPERTY_OWNER_ID]);var n=a[OC.Files.Client.PROPERTY_SHARE_TYPES];return n&&(t.shareTypes=_.chain(n).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),a=t.attr("data-share-types")||"",r=t.attr("data-share-owner");if(a||r){var n=!1,i=!1;_.each(a.split(",")||[],(function(e){(e=parseInt(e,10))===OC.Share.SHARE_TYPE_LINK?n=!0:e===OC.Share.SHARE_TYPE_EMAIL?n=!0:e===OC.Share.SHARE_TYPE_USER?i=!0:e===OC.Share.SHARE_TYPE_GROUP?i=!0:e===OC.Share.SHARE_TYPE_REMOTE?i=!0:e===OC.Share.SHARE_TYPE_CIRCLE?i=!0:e===OC.Share.SHARE_TYPE_ROOM&&(i=!0)})),OCA.Sharing.Util._updateFileActionIcon(t,i,n)}}))})),e.$el.on("changeDirectory",(function(){OCA.Sharing.sharesLoaded=!1})),a.registerAction({name:"Share",displayName:function(e){if(e&&e.$file){var a=parseInt(e.$file.data("share-types"),10),r=e.$file.data("share-owner-id");if(a>=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 a=parseInt(t.$file.data("share-types"),10);return a===OC.Share.SHARE_TYPE_EMAIL||a===OC.Share.SHARE_TYPE_LINK?"icon-public":"icon-shared"},icon:function(e,t){var a=t.$file.data("share-owner-id");if(a)return OC.generateUrl("/avatar/".concat(a,"/32"))},type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(t,a){var r=parseInt(a.$file.data("share-permissions"),10);(isNaN(r)||r>0)&&e.showDetailsView(t,"sharing")},render:function(e,t,r){return 0!=(parseInt(r.$file.data("permissions"),10)&OC.PERMISSION_SHARE)||r.$file.attr("data-share-owner")?a._defaultRenderAction.call(a,e,t,r):null}});var s=new OCA.Sharing.ShareBreadCrumbView;e.registerBreadCrumbDetailView(s)}},_updateFileListDataAttributes:function(e,t,a){if("files"!==e.id)if(_.pluck(a.get("shares"),"share_with_displayname").length){var r=_.mapObject(a.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,a){return console.info("object"),!!(t||a||e.attr("data-share-recipient-data")||e.attr("data-share-owner"))&&(OCA.Sharing.Util._markFileAsShared(e,!0,a),!0)},_markFileAsShared:function(e,a,r){var n,i,s,o,l=e.find('.fileactions .action[data-action="Share"]'),d=e.data("type"),c=l.find(".icon"),h=e.attr("data-share-owner-id"),u=e.attr("data-share-owner"),p=e.attr("data-mounttype"),f="icon-shared";l.removeClass("shared-style"),"dir"===d&&(a||r||h)?(o=void 0!==p&&"shared-root"!==p&&"shared"!==p?OC.MimeType.getIconUrl("dir-"+p):r?OC.MimeType.getIconUrl("dir-public"):OC.MimeType.getIconUrl("dir-shared"),e.find(".filename .thumbnail").css("background-image","url("+o+")"),e.attr("data-icon",o)):"dir"===d&&("true"===e.attr("data-e2eencrypted")?(o=OC.MimeType.getIconUrl("dir-encrypted"),e.attr("data-icon",o)):p&&0===p.indexOf("external")?(o=OC.MimeType.getIconUrl("dir-external"),e.attr("data-icon",o)):(o=OC.MimeType.getIconUrl("dir"),e.removeAttr("data-icon")),e.find(".filename .thumbnail").css("background-image","url("+o+")")),a||h?(i=e.data("share-recipient-data"),l.addClass("shared-style"),s="<span>"+t("core","Shared")+"</span>",h?(n=t("core","Shared by"),s=OCA.Sharing.Util._formatRemoteShare(h,u,n)):i&&(s=OCA.Sharing.Util._formatShareList(i)),l.html(s).prepend(c),(h||i)&&(l.find(".avatar").each((function(){$(this).avatar($(this).data("username"),32)})),l.find("span[title]").tooltip({placement:"top"}))):l.html('<span class="hidden-visually">'+t("core","Shared")+"</span>").prepend(c),r&&(f="icon-public"),c.removeClass("icon-shared icon-public").addClass(f)},_formatRemoteShare:function(e,t,a){var r=OCA.Sharing.Util._REMOTE_OWNER_REGEXP.exec(e);if(!r)return'<span class="avatar" data-username="'+escapeHTML(e)+'" title="'+a+" "+escapeHTML(t)+'"></span><span class="hidden-visually">'+a+" "+escapeHTML(t)+"</span> ";var n=r[1],i=r[3],s=r[4],o=a+" "+n;i&&(o+="@"+i),s&&(i||(i="…"),o+="@"+s);var l='<span class="remoteAddress" title="'+escapeHTML(o)+'">';return l+='<span class="username">'+escapeHTML(n)+"</span>",i&&(l+='<span class="userDomain">@'+escapeHTML(i)+"</span>"),l+="</span> "},_formatShareList:function(e){var a=this;return(e=_.toArray(e)).sort((function(e,t){return e.shareWithDisplayName.localeCompare(t.shareWithDisplayName)})),$.map(e,(function(e){return a._formatRemoteShare(e.shareWith,e.shareWithDisplayName,t("core","Shared with"))}))},markFileAsShared:function(e,a,r){var n,i,s,o,l=e.find('.fileactions .action[data-action="Share"]'),d=e.data("type"),c=l.find(".icon"),h=e.attr("data-share-owner-id"),u=e.attr("data-share-owner"),p=e.attr("data-mounttype"),f="icon-shared";l.removeClass("shared-style"),"dir"===d&&(a||r||h)?(o=void 0!==p&&"shared-root"!==p&&"shared"!==p?OC.MimeType.getIconUrl("dir-"+p):r?OC.MimeType.getIconUrl("dir-public"):OC.MimeType.getIconUrl("dir-shared"),e.find(".filename .thumbnail").css("background-image","url("+o+")"),e.attr("data-icon",o)):"dir"===d&&("true"===e.attr("data-e2eencrypted")?(o=OC.MimeType.getIconUrl("dir-encrypted"),e.attr("data-icon",o)):p&&0===p.indexOf("external")?(o=OC.MimeType.getIconUrl("dir-external"),e.attr("data-icon",o)):(o=OC.MimeType.getIconUrl("dir"),e.removeAttr("data-icon")),e.find(".filename .thumbnail").css("background-image","url("+o+")")),a||h?(i=e.data("share-recipient-data"),l.addClass("shared-style"),s="<span>"+t("core","Shared")+"</span>",h?(n=t("core","Shared by"),s=this._formatRemoteShare(h,u,n)):i&&(s=this._formatShareList(i)),l.html(s).prepend(c),(h||i)&&(l.find(".avatar").each((function(){$(this).avatar($(this).data("username"),32)})),l.find("span[title]").tooltip({placement:"top"}))):l.html('<span class="hidden-visually">'+t("core","Shared")+"</span>").prepend(c),r&&(f="icon-public"),c.removeClass("icon-shared icon-public").addClass(f)},getSharePermissions:function(e){return e.sharePermissions}},OC.Plugins.register("OCA.Files.FileList",OCA.Sharing.Util)},176: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,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),a=this;t.on("change",(function(){a.render({dirInfo:a._dirInfo})}));var r=t.attributes.path+"/"+t.attributes.name;OCA.Files.Sidebar.file=r,OCA.Files.Sidebar.activeTab="sharing"}});OCA.Sharing.ShareBreadCrumbView=e}()},177:function(e,t,a){var r=a(178);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,a(22).default)("57e7eec1",r,!0,{})},178:function(e,t,a){(e.exports=a(19)(!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",""])},19:function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var a=function(e,t){var a=e[1]||"",r=e[3];if(!r)return a;if(t&&"function"==typeof btoa){var n=(s=r,o=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(l," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot).concat(e," */")}));return[a].concat(i).concat([n]).join("\n")}var s,o,l;return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(a,"}"):a})).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},n=0;n<this.length;n++){var i=this[n][0];null!=i&&(r[i]=!0)}for(var s=0;s<e.length;s++){var o=e[s];null!=o[0]&&r[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="(".concat(o[2],") and (").concat(a,")")),t.push(o))}},t}},22:function(e,t,a){"use strict";function r(e,t){for(var a=[],r={},n=0;n<t.length;n++){var i=t[n],s=i[0],o={id:e+":"+n,css:i[1],media:i[2],sourceMap:i[3]};r[s]?r[s].parts.push(o):a.push(r[s]={id:s,parts:[o]})}return a}a.r(t),a.d(t,"default",(function(){return f}));var n="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!n)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 i={},s=n&&(document.head||document.getElementsByTagName("head")[0]),o=null,l=0,d=!1,c=function(){},h=null,u="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e,t,a,n){d=a,h=n||{};var s=r(e,t);return m(s),function(t){for(var a=[],n=0;n<s.length;n++){var o=s[n];(l=i[o.id]).refs--,a.push(l)}t?m(s=r(e,t)):s=[];for(n=0;n<a.length;n++){var l;if(0===(l=a[n]).refs){for(var d=0;d<l.parts.length;d++)l.parts[d]();delete i[l.id]}}}}function m(e){for(var t=0;t<e.length;t++){var a=e[t],r=i[a.id];if(r){r.refs++;for(var n=0;n<r.parts.length;n++)r.parts[n](a.parts[n]);for(;n<a.parts.length;n++)r.parts.push(C(a.parts[n]));r.parts.length>a.parts.length&&(r.parts.length=a.parts.length)}else{var s=[];for(n=0;n<a.parts.length;n++)s.push(C(a.parts[n]));i[a.id]={id:a.id,refs:1,parts:s}}}}function O(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function C(e){var t,a,r=document.querySelector("style["+u+'~="'+e.id+'"]');if(r){if(d)return c;r.parentNode.removeChild(r)}if(p){var n=l++;r=o||(o=O()),t=v.bind(null,r,n,!1),a=v.bind(null,r,n,!0)}else r=O(),t=E.bind(null,r),a=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 a()}}var _,S=(_=[],function(e,t){return _[e]=t,_.filter(Boolean).join("\n")});function v(e,t,a,r){var n=a?"":r.css;if(e.styleSheet)e.styleSheet.cssText=S(t,n);else{var i=document.createTextNode(n),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function E(e,t){var a=t.css,r=t.media,n=t.sourceMap;if(r&&e.setAttribute("media",r),h.ssrId&&e.setAttribute(u,t.id),n&&(a+="\n/*# sourceURL="+n.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}},65:function(e,a,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,a){OC.dialogs.filepicker(t("files_sharing","Link to a file"),(function(t){OC.Files.getClient().getFileInfo(t).then((function(t,a){e(a.id)})).fail((function(){a(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(){"use strict";var e=OC.Backbone.View.extend({tagName:"span",events:{click:"_onClick"},_dirInfo:void 0,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),a=this;t.on("change",(function(){a.render({dirInfo:a._dirInfo})}));var r=t.attributes.path+"/"+t.attributes.name;OCA.Files.Sidebar.file=r,OCA.Files.Sidebar.activeTab="sharing"}});OCA.Sharing.ShareBreadCrumbView=e}()},177:function(e,t,a){var r=a(178);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,a(22).default)("57e7eec1",r,!0,{})},178:function(e,t,a){(e.exports=a(19)(!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",""])},19:function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var a=function(e,t){var a=e[1]||"",r=e[3];if(!r)return a;if(t&&"function"==typeof btoa){var n=(s=r,o=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(l," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot).concat(e," */")}));return[a].concat(i).concat([n]).join("\n")}var s,o,l;return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(a,"}"):a})).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},n=0;n<this.length;n++){var i=this[n][0];null!=i&&(r[i]=!0)}for(var s=0;s<e.length;s++){var o=e[s];null!=o[0]&&r[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="(".concat(o[2],") and (").concat(a,")")),t.push(o))}},t}},22:function(e,t,a){"use strict";function r(e,t){for(var a=[],r={},n=0;n<t.length;n++){var i=t[n],s=i[0],o={id:e+":"+n,css:i[1],media:i[2],sourceMap:i[3]};r[s]?r[s].parts.push(o):a.push(r[s]={id:s,parts:[o]})}return a}a.r(t),a.d(t,"default",(function(){return f}));var n="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!n)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 i={},s=n&&(document.head||document.getElementsByTagName("head")[0]),o=null,l=0,d=!1,c=function(){},h=null,u="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e,t,a,n){d=a,h=n||{};var s=r(e,t);return m(s),function(t){for(var a=[],n=0;n<s.length;n++){var o=s[n];(l=i[o.id]).refs--,a.push(l)}t?m(s=r(e,t)):s=[];for(n=0;n<a.length;n++){var l;if(0===(l=a[n]).refs){for(var d=0;d<l.parts.length;d++)l.parts[d]();delete i[l.id]}}}}function m(e){for(var t=0;t<e.length;t++){var a=e[t],r=i[a.id];if(r){r.refs++;for(var n=0;n<r.parts.length;n++)r.parts[n](a.parts[n]);for(;n<a.parts.length;n++)r.parts.push(O(a.parts[n]));r.parts.length>a.parts.length&&(r.parts.length=a.parts.length)}else{var s=[];for(n=0;n<a.parts.length;n++)s.push(O(a.parts[n]));i[a.id]={id:a.id,refs:1,parts:s}}}}function C(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function O(e){var t,a,r=document.querySelector("style["+u+'~="'+e.id+'"]');if(r){if(d)return c;r.parentNode.removeChild(r)}if(p){var n=l++;r=o||(o=C()),t=_.bind(null,r,n,!1),a=_.bind(null,r,n,!0)}else r=C(),t=g.bind(null,r),a=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 a()}}var v,S=(v=[],function(e,t){return v[e]=t,v.filter(Boolean).join("\n")});function _(e,t,a,r){var n=a?"":r.css;if(e.styleSheet)e.styleSheet.cssText=S(t,n);else{var i=document.createTextNode(n),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function g(e,t){var a=t.css,r=t.media,n=t.sourceMap;if(r&&e.setAttribute("media",r),h.ssrId&&e.setAttribute(u,t.id),n&&(a+="\n/*# sourceURL="+n.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}},65:function(e,a,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,a){OC.dialogs.filepicker(t("files_sharing","Link to a file"),(function(t){OC.Files.getClient().getFileInfo(t).then((function(t,a){e(a.id)})).fail((function(){a(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=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 0aa21c13eed..45d207f470a 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/additionalScripts.js","webpack:///./apps/files_sharing/src/share.js","webpack:///./apps/files_sharing/src/sharebreadcrumbview.js","webpack:///./apps/files_sharing/src/style/sharebreadcrumb.scss?fbff","webpack:///./apps/files_sharing/src/style/sharebreadcrumb.scss","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/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","OCA","Sharing","_","extend","Files","Client","PROPERTY_SHARE_TYPES","NS_OWNCLOUD","PROPERTY_OWNER_ID","PROPERTY_OWNER_DISPLAY_NAME","Share","SHARE_TYPE_USER","SHARE_TYPE_GROUP","SHARE_TYPE_LINK","SHARE_TYPE_EMAIL","SHARE_TYPE_REMOTE","SHARE_TYPE_CIRCLE","SHARE_TYPE_GUEST","SHARE_TYPE_REMOTE_GROUP","SHARE_TYPE_ROOM","Util","_REMOTE_OWNER_REGEXP","RegExp","attach","fileList","id","fileActions","oldCreateRow","_createRow","fileData","tr","apply","this","arguments","sharePermissions","getSharePermissions","permissions","actions","all","Comment","Details","Goto","attr","shareOwner","shareOwnerId","mountType","PERMISSION_UPDATE","recipientData","isEmpty","JSON","stringify","shareTypes","join","oldElementToFile","elementToFile","$el","fileInfo","undefined","split","expirationTimestamp","parseInt","shares","push","expiration","oldGetWebdavProperties","_getWebdavProperties","props","filesClient","addFileInfoParser","response","data","propStat","properties","permissionsProp","PROPERTY_PERMISSIONS","indexOf","shareTypesProp","chain","filter","xmlvalue","namespaceURI","nodeName","map","textContent","text","on","ev","$files","each","file","$tr","$","hasLink","hasShares","shareType","_updateFileActionIcon","sharesLoaded","registerAction","displayName","context","$file","altText","mime","order","PERMISSION_ALL","iconClass","fileName","icon","generateUrl","type","FileActions","TYPE_INLINE","actionHandler","isNaN","showDetailsView","render","actionSpec","isDefault","PERMISSION_SHARE","_defaultRenderAction","breadCrumbSharingDetailView","ShareBreadCrumbView","registerBreadCrumbDetailView","_updateFileListDataAttributes","shareModel","pluck","length","mapObject","share","shareWith","share_with","shareWithDisplayName","share_with_displayname","removeAttr","hasUserShares","hasLinkShares","console","info","_markFileAsShared","message","recipients","avatars","shareFolderIcon","action","find","ownerId","owner","removeClass","MimeType","getIconUrl","css","addClass","_formatRemoteShare","_formatShareList","html","prepend","avatar","tooltip","placement","parts","exec","escapeHTML","userName","userDomain","server","_parent","toArray","sort","a","b","localeCompare","recipient","markFileAsShared","Plugins","register","BreadCrumbView","Backbone","View","tagName","events","click","_dirInfo","dirInfo","path","hide","isShared","show","delegateEvents","_onClick","e","preventDefault","fileInfoModel","FileInfoModel","self","attributes","Sidebar","activeTab","content","locals","add","default","useSourceMap","list","toString","item","cssMapping","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","concat","sourceURLs","sources","source","sourceRoot","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","listToStyles","parentId","styles","newStyles","part","media","hasDocument","document","DEBUG","Error","stylesInDom","head","getElementsByTagName","singletonElement","singletonCounter","isProduction","noop","options","ssrIdKey","isOldIE","navigator","test","userAgent","toLowerCase","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","createElement","appendChild","obj","update","remove","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild","OCP","Collaboration","registerType","Promise","resolve","reject","dialogs","filepicker","f","getClient","getFileInfo","then","status","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,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,KAQv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AE9Cf,EAAaE,YAAYkB,IAK/B,SAAST,EAAYX,EAAcG,GACjC,IAAI5G,EAAM4G,EAAI5G,IACV2E,EAAQiC,EAAIjC,MACZlB,EAAYmD,EAAInD,UAiBpB,GAfIkB,GACF8B,EAAawB,aAAa,QAAStD,GAEjCY,EAAQ2C,OACVzB,EAAawB,aAAazC,EAAUoB,EAAIzO,IAGtCsL,IAGFzD,GAAO,mBAAqByD,EAAUM,QAAQ,GAAK,MAEnD/D,GAAO,uDAAyDzJ,KAAKoN,SAASC,mBAAmBjK,KAAKC,UAAU6J,MAAgB,OAG9HgD,EAAakB,WACflB,EAAakB,WAAWC,QAAU5H,MAC7B,CACL,KAAOyG,EAAa0B,YAClB1B,EAAaQ,YAAYR,EAAa0B,YAExC1B,EAAaE,YAAY9B,SAASiD,eAAe9H,O,mBC1NrD7J,IAA0BC,GAAGC,OAAO,gBAAiB,YAErDC,KAAoBC,KAAKH,GAAGI,cAE5BC,OAAO2R,IAAIC,cAAcC,aAAa,OAAQ,CAC7C7I,OAAQ,WACP,OAAO,IAAI8I,SAAQ,SAACC,EAASC,GAC5BrS,GAAGsS,QAAQC,WAAWtT,EAAE,gBAAiB,mBAAmB,SAASuT,GACrDxS,GAAGU,MAAM+R,YACjBC,YAAYF,GAAGG,MAAK,SAACC,EAAQ9O,GACnCsO,EAAQtO,EAAS/B,OACf8Q,MAAK,WACPR,EAAO,IAAI1D,MAAM,8BAEhB,EAAO,MAAM,EAAO3O,GAAGsS,QAAQQ,uBAAwB,GAAI,CAAEC,uBAAuB,QAGzFC,WAAY/T,EAAE,gBAAiB,kBAC/BgU,cAAe","file":"additionalScripts.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 = 174);\n","import './share'\nimport './sharebreadcrumbview'\n\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\n\tOC.Share = _.extend(OC.Share || {}, {\t\n\t\tSHARE_TYPE_USER: 0,\t\n\t\tSHARE_TYPE_GROUP: 1,\t\n\t\tSHARE_TYPE_LINK: 3,\t\n\t\tSHARE_TYPE_EMAIL: 4,\t\n\t\tSHARE_TYPE_REMOTE: 6,\t\n\t\tSHARE_TYPE_CIRCLE: 7,\t\n\t\tSHARE_TYPE_GUEST: 8,\t\n\t\tSHARE_TYPE_REMOTE_GROUP: 9,\t\n\t\tSHARE_TYPE_ROOM: 10\n\t})\n\n\t/**\n\t * @namespace\n\t */\n\tOCA.Sharing.Util = {\n\t\n\t\t/**\t\n\t\t * Regular expression for splitting parts of remote share owners:\t\n\t\t * \"user@example.com/path/to/owncloud\"\t\n\t\t * \"user@anotherexample.com@example.com/path/to/owncloud\t\n\t\t */\t\n\t\t_REMOTE_OWNER_REGEXP: new RegExp('^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$'),\n\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, 'sharing')\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\t// register share breadcrumbs component\n\t\t\tvar breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView()\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\tconsole.info('object');\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\tOCA.Sharing.Util._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 * Marks/unmarks a given file as shared by changing its action icon\n\t\t * and folder icon.\n\t\t *\n\t\t * @param $tr file element to mark as shared\n\t\t * @param hasShares whether shares are available\n\t\t * @param hasLink whether link share is available\n\t\t */\n\t\t_markFileAsShared: function($tr, hasShares, hasLink) {\n\t\t\tvar action = $tr.find('.fileactions .action[data-action=\"Share\"]')\n\t\t\tvar type = $tr.data('type')\n\t\t\tvar icon = action.find('.icon')\n\t\t\tvar message, recipients, avatars\n\t\t\tvar ownerId = $tr.attr('data-share-owner-id')\n\t\t\tvar owner = $tr.attr('data-share-owner')\n\t\t\tvar mountType = $tr.attr('data-mounttype')\n\t\t\tvar shareFolderIcon\n\t\t\tvar iconClass = 'icon-shared'\n\t\t\taction.removeClass('shared-style')\n\t\t\t// update folder icon\n\t\t\tif (type === 'dir' && (hasShares || hasLink || ownerId)) {\n\t\t\t\tif (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType)\n\t\t\t\t} else if (hasLink) {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-public')\n\t\t\t\t} else {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-shared')\n\t\t\t\t}\n\t\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\n\t\t\t} else if (type === 'dir') {\n\t\t\t\tvar isEncrypted = $tr.attr('data-e2eencrypted')\n\t\t\t\t// FIXME: duplicate of FileList._createRow logic for external folder,\n\t\t\t\t// need to refactor the icon logic into a single code path eventually\n\t\t\t\tif (isEncrypted === 'true') {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted')\n\t\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\n\t\t\t\t} else if (mountType && mountType.indexOf('external') === 0) {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-external')\n\t\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\n\t\t\t\t} else {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir')\n\t\t\t\t\t// back to default\n\t\t\t\t\t$tr.removeAttr('data-icon')\n\t\t\t\t}\n\t\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\n\t\t\t}\n\t\t\t// update share action text / icon\n\t\t\tif (hasShares || ownerId) {\n\t\t\t\trecipients = $tr.data('share-recipient-data')\n\t\t\t\taction.addClass('shared-style')\n\n\t\t\t\tavatars = '<span>' + t('core', 'Shared') + '</span>'\n\t\t\t\t// even if reshared, only show \"Shared by\"\n\t\t\t\tif (ownerId) {\n\t\t\t\t\tmessage = t('core', 'Shared by')\n\t\t\t\t\tavatars = OCA.Sharing.Util._formatRemoteShare(ownerId, owner, message)\n\t\t\t\t} else if (recipients) {\n\t\t\t\t\tavatars = OCA.Sharing.Util._formatShareList(recipients)\n\t\t\t\t}\n\t\t\t\taction.html(avatars).prepend(icon)\n\n\t\t\t\tif (ownerId || recipients) {\n\t\t\t\t\tvar avatarElement = action.find('.avatar')\n\t\t\t\t\tavatarElement.each(function() {\n\t\t\t\t\t\t$(this).avatar($(this).data('username'), 32)\n\t\t\t\t\t})\n\t\t\t\t\taction.find('span[title]').tooltip({ placement: 'top' })\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taction.html('<span class=\"hidden-visually\">' + t('core', 'Shared') + '</span>').prepend(icon)\n\t\t\t}\n\t\t\tif (hasLink) {\n\t\t\t\ticonClass = 'icon-public'\n\t\t\t}\n\t\t\ticon.removeClass('icon-shared icon-public').addClass(iconClass)\n\t\t},\n\t\t/**\t\n\t\t * Format a remote address\t\n\t\t *\t\n\t\t* @param {String} shareWith userid, full remote share, or whatever\t\n\t\t* @param {String} shareWithDisplayName\t\n\t\t* @param {String} message\t\n\t\t* @returns {String} HTML code to display\t\n\t\t*/\t\n\t\t_formatRemoteShare: function(shareWith, shareWithDisplayName, message) {\t\n\t\t\tvar parts = OCA.Sharing.Util._REMOTE_OWNER_REGEXP.exec(shareWith)\t\n\t\t\tif (!parts) {\t\n\t\t\t\t// display avatar of the user\t\n\t\t\t\tvar avatar = '<span class=\"avatar\" data-username=\"' + escapeHTML(shareWith) + '\" title=\"' + message + ' ' + escapeHTML(shareWithDisplayName) + '\"></span>'\t\n\t\t\t\tvar hidden = '<span class=\"hidden-visually\">' + message + ' ' + escapeHTML(shareWithDisplayName) + '</span> '\t\n\t\t\t\treturn avatar + hidden\t\n\t\t\t}\t\n\n\t\t\tvar userName = parts[1]\t\n\t\t\tvar userDomain = parts[3]\t\n\t\t\tvar server = parts[4]\t\n\t\t\tvar tooltip = message + ' ' + userName\t\n\t\t\tif (userDomain) {\t\n\t\t\t\ttooltip += '@' + userDomain\t\n\t\t\t}\t\n\t\t\tif (server) {\t\n\t\t\t\tif (!userDomain) {\t\n\t\t\t\t\tuserDomain = '…'\t\n\t\t\t\t}\t\n\t\t\t\ttooltip += '@' + server\t\n\t\t\t}\t\n\n\t\t\tvar html = '<span class=\"remoteAddress\" title=\"' + escapeHTML(tooltip) + '\">'\t\n\t\t\thtml += '<span class=\"username\">' + escapeHTML(userName) + '</span>'\t\n\t\t\tif (userDomain) {\t\n\t\t\t\thtml += '<span class=\"userDomain\">@' + escapeHTML(userDomain) + '</span>'\t\n\t\t\t}\t\n\t\t\thtml += '</span> '\t\n\t\t\treturn html\t\n\t\t},\t\n\t\t/**\t\n\t\t * Loop over all recipients in the list and format them using\t\n\t\t * all kind of fancy magic.\t\n\t\t *\t\n\t\t* @param {Object} recipients array of all the recipients\t\n\t\t* @returns {String[]} modified list of recipients\t\n\t\t*/\t\n\t\t_formatShareList: function(recipients) {\t\n\t\t\tvar _parent = this\t\n\t\t\trecipients = _.toArray(recipients)\t\n\t\t\trecipients.sort(function(a, b) {\t\n\t\t\t\treturn a.shareWithDisplayName.localeCompare(b.shareWithDisplayName)\t\n\t\t\t})\t\n\t\t\treturn $.map(recipients, function(recipient) {\t\n\t\t\t\treturn _parent._formatRemoteShare(recipient.shareWith, recipient.shareWithDisplayName, t('core', 'Shared with'))\t\n\t\t\t})\t\n\t\t},\n\t\t\n\t\t/**\t\n\t\t * Marks/unmarks a given file as shared by changing its action icon\t\n\t\t * and folder icon.\t\n\t\t *\t\n\t\t* @param $tr file element to mark as shared\t\n\t\t* @param hasShares whether shares are available\t\n\t\t* @param hasLink whether link share is available\t\n\t\t*/\t\n\t\tmarkFileAsShared: function($tr, hasShares, hasLink) {\t\n\t\t\tvar action = $tr.find('.fileactions .action[data-action=\"Share\"]')\t\n\t\t\tvar type = $tr.data('type')\t\n\t\t\tvar icon = action.find('.icon')\t\n\t\t\tvar message, recipients, avatars\t\n\t\t\tvar ownerId = $tr.attr('data-share-owner-id')\t\n\t\t\tvar owner = $tr.attr('data-share-owner')\t\n\t\t\tvar mountType = $tr.attr('data-mounttype')\t\n\t\t\tvar shareFolderIcon\t\n\t\t\tvar iconClass = 'icon-shared'\t\n\t\t\taction.removeClass('shared-style')\t\n\t\t\t// update folder icon\t\n\t\t\tif (type === 'dir' && (hasShares || hasLink || ownerId)) {\t\n\t\t\t\tif (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType)\t\n\t\t\t\t} else if (hasLink) {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-public')\t\n\t\t\t\t} else {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-shared')\t\n\t\t\t\t}\t\n\t\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\t\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\t\n\t\t\t} else if (type === 'dir') {\t\n\t\t\t\tvar isEncrypted = $tr.attr('data-e2eencrypted')\t\n\t\t\t\t// FIXME: duplicate of FileList._createRow logic for external folder,\t\n\t\t\t\t// need to refactor the icon logic into a single code path eventually\t\n\t\t\t\tif (isEncrypted === 'true') {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted')\t\n\t\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\t\n\t\t\t\t} else if (mountType && mountType.indexOf('external') === 0) {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-external')\t\n\t\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\t\n\t\t\t\t} else {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir')\t\n\t\t\t\t\t// back to default\t\n\t\t\t\t\t$tr.removeAttr('data-icon')\t\n\t\t\t\t}\t\n\t\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\t\n\t\t\t}\t\n\t\t\t// update share action text / icon\t\n\t\t\tif (hasShares || ownerId) {\t\n\t\t\t\trecipients = $tr.data('share-recipient-data')\t\n\t\t\t\taction.addClass('shared-style')\t\n\n\t\t\t\tavatars = '<span>' + t('core', 'Shared') + '</span>'\t\n\t\t\t\t// even if reshared, only show \"Shared by\"\t\n\t\t\t\tif (ownerId) {\t\n\t\t\t\t\tmessage = t('core', 'Shared by')\t\n\t\t\t\t\tavatars = this._formatRemoteShare(ownerId, owner, message)\t\n\t\t\t\t} else if (recipients) {\t\n\t\t\t\t\tavatars = this._formatShareList(recipients)\t\n\t\t\t\t}\t\n\t\t\t\taction.html(avatars).prepend(icon)\t\n\n\t\t\t\tif (ownerId || recipients) {\t\n\t\t\t\t\tvar avatarElement = action.find('.avatar')\t\n\t\t\t\t\tavatarElement.each(function() {\t\n\t\t\t\t\t\t$(this).avatar($(this).data('username'), 32)\t\n\t\t\t\t\t})\t\n\t\t\t\t\taction.find('span[title]').tooltip({ placement: 'top' })\t\n\t\t\t\t}\t\n\t\t\t} else {\t\n\t\t\t\taction.html('<span class=\"hidden-visually\">' + t('core', 'Shared') + '</span>').prepend(icon)\t\n\t\t\t}\t\n\t\t\tif (hasLink) {\t\n\t\t\t\ticonClass = 'icon-public'\t\n\t\t\t}\t\n\t\t\ticon.removeClass('icon-shared icon-public').addClass(iconClass)\t\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 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\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\n\t\t\tvar path = fileInfoModel.attributes.path + '/' + fileInfoModel.attributes.name\n\t\t\tOCA.Files.Sidebar.file = path\n\t\t\tOCA.Files.Sidebar.activeTab = 'sharing'\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!./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","\"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","// 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 +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/additionalScripts.js","webpack:///./apps/files_sharing/src/share.js","webpack:///./apps/files_sharing/src/sharebreadcrumbview.js","webpack:///./apps/files_sharing/src/style/sharebreadcrumb.scss?fbff","webpack:///./apps/files_sharing/src/style/sharebreadcrumb.scss","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/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","OCA","Sharing","_","extend","Files","Client","PROPERTY_SHARE_TYPES","NS_OWNCLOUD","PROPERTY_OWNER_ID","PROPERTY_OWNER_DISPLAY_NAME","Util","_REMOTE_OWNER_REGEXP","RegExp","attach","fileList","Share","id","fileActions","oldCreateRow","_createRow","fileData","tr","apply","this","arguments","sharePermissions","getSharePermissions","permissions","actions","all","Comment","Details","Goto","attr","shareOwner","shareOwnerId","mountType","PERMISSION_UPDATE","recipientData","isEmpty","JSON","stringify","shareTypes","join","oldElementToFile","elementToFile","$el","fileInfo","undefined","split","expirationTimestamp","parseInt","shares","push","expiration","oldGetWebdavProperties","_getWebdavProperties","props","filesClient","addFileInfoParser","response","data","propStat","properties","permissionsProp","PROPERTY_PERMISSIONS","indexOf","shareTypesProp","chain","filter","xmlvalue","namespaceURI","nodeName","map","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","type","FileActions","TYPE_INLINE","actionHandler","isNaN","showDetailsView","render","actionSpec","isDefault","PERMISSION_SHARE","_defaultRenderAction","breadCrumbSharingDetailView","ShareBreadCrumbView","registerBreadCrumbDetailView","_updateFileListDataAttributes","shareModel","pluck","length","mapObject","share","shareWith","share_with","shareWithDisplayName","share_with_displayname","removeAttr","hasUserShares","hasLinkShares","console","info","_markFileAsShared","message","recipients","avatars","shareFolderIcon","action","find","ownerId","owner","removeClass","MimeType","getIconUrl","css","addClass","_formatRemoteShare","_formatShareList","html","prepend","avatar","tooltip","placement","parts","exec","escapeHTML","userName","userDomain","server","_parent","toArray","sort","a","b","localeCompare","recipient","markFileAsShared","Plugins","register","BreadCrumbView","Backbone","View","tagName","events","click","_dirInfo","dirInfo","path","hide","isShared","show","delegateEvents","_onClick","e","preventDefault","fileInfoModel","FileInfoModel","self","attributes","Sidebar","activeTab","content","locals","add","default","useSourceMap","list","toString","item","cssMapping","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","concat","sourceURLs","sources","source","sourceRoot","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","listToStyles","parentId","styles","newStyles","part","media","hasDocument","document","DEBUG","Error","stylesInDom","head","getElementsByTagName","singletonElement","singletonCounter","isProduction","noop","options","ssrIdKey","isOldIE","navigator","test","userAgent","toLowerCase","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","createElement","appendChild","obj","update","remove","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild","OCP","Collaboration","registerType","Promise","resolve","reject","dialogs","filepicker","f","getClient","getFileInfo","then","status","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,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AI,CAAEC,uBAAuB,QAGzFC,WAAY7T,EAAE,gBAAiB,kBAC/B8T,cAAe","file":"additionalScripts.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 = 174);\n","import './share'\nimport './sharebreadcrumbview'\n\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\n\t/**\n\t * @namespace\n\t */\n\tOCA.Sharing.Util = {\n\t\n\t\t/**\t\n\t\t * Regular expression for splitting parts of remote share owners:\t\n\t\t * \"user@example.com/path/to/owncloud\"\t\n\t\t * \"user@anotherexample.com@example.com/path/to/owncloud\t\n\t\t */\t\n\t\t_REMOTE_OWNER_REGEXP: new RegExp('^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$'),\n\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, 'sharing')\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\t// register share breadcrumbs component\n\t\t\tvar breadCrumbSharingDetailView = new OCA.Sharing.ShareBreadCrumbView()\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\tconsole.info('object');\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\tOCA.Sharing.Util._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 * Marks/unmarks a given file as shared by changing its action icon\n\t\t * and folder icon.\n\t\t *\n\t\t * @param $tr file element to mark as shared\n\t\t * @param hasShares whether shares are available\n\t\t * @param hasLink whether link share is available\n\t\t */\n\t\t_markFileAsShared: function($tr, hasShares, hasLink) {\n\t\t\tvar action = $tr.find('.fileactions .action[data-action=\"Share\"]')\n\t\t\tvar type = $tr.data('type')\n\t\t\tvar icon = action.find('.icon')\n\t\t\tvar message, recipients, avatars\n\t\t\tvar ownerId = $tr.attr('data-share-owner-id')\n\t\t\tvar owner = $tr.attr('data-share-owner')\n\t\t\tvar mountType = $tr.attr('data-mounttype')\n\t\t\tvar shareFolderIcon\n\t\t\tvar iconClass = 'icon-shared'\n\t\t\taction.removeClass('shared-style')\n\t\t\t// update folder icon\n\t\t\tif (type === 'dir' && (hasShares || hasLink || ownerId)) {\n\t\t\t\tif (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType)\n\t\t\t\t} else if (hasLink) {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-public')\n\t\t\t\t} else {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-shared')\n\t\t\t\t}\n\t\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\n\t\t\t} else if (type === 'dir') {\n\t\t\t\tvar isEncrypted = $tr.attr('data-e2eencrypted')\n\t\t\t\t// FIXME: duplicate of FileList._createRow logic for external folder,\n\t\t\t\t// need to refactor the icon logic into a single code path eventually\n\t\t\t\tif (isEncrypted === 'true') {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted')\n\t\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\n\t\t\t\t} else if (mountType && mountType.indexOf('external') === 0) {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-external')\n\t\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\n\t\t\t\t} else {\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir')\n\t\t\t\t\t// back to default\n\t\t\t\t\t$tr.removeAttr('data-icon')\n\t\t\t\t}\n\t\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\n\t\t\t}\n\t\t\t// update share action text / icon\n\t\t\tif (hasShares || ownerId) {\n\t\t\t\trecipients = $tr.data('share-recipient-data')\n\t\t\t\taction.addClass('shared-style')\n\n\t\t\t\tavatars = '<span>' + t('core', 'Shared') + '</span>'\n\t\t\t\t// even if reshared, only show \"Shared by\"\n\t\t\t\tif (ownerId) {\n\t\t\t\t\tmessage = t('core', 'Shared by')\n\t\t\t\t\tavatars = OCA.Sharing.Util._formatRemoteShare(ownerId, owner, message)\n\t\t\t\t} else if (recipients) {\n\t\t\t\t\tavatars = OCA.Sharing.Util._formatShareList(recipients)\n\t\t\t\t}\n\t\t\t\taction.html(avatars).prepend(icon)\n\n\t\t\t\tif (ownerId || recipients) {\n\t\t\t\t\tvar avatarElement = action.find('.avatar')\n\t\t\t\t\tavatarElement.each(function() {\n\t\t\t\t\t\t$(this).avatar($(this).data('username'), 32)\n\t\t\t\t\t})\n\t\t\t\t\taction.find('span[title]').tooltip({ placement: 'top' })\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taction.html('<span class=\"hidden-visually\">' + t('core', 'Shared') + '</span>').prepend(icon)\n\t\t\t}\n\t\t\tif (hasLink) {\n\t\t\t\ticonClass = 'icon-public'\n\t\t\t}\n\t\t\ticon.removeClass('icon-shared icon-public').addClass(iconClass)\n\t\t},\n\t\t/**\t\n\t\t * Format a remote address\t\n\t\t *\t\n\t\t* @param {String} shareWith userid, full remote share, or whatever\t\n\t\t* @param {String} shareWithDisplayName\t\n\t\t* @param {String} message\t\n\t\t* @returns {String} HTML code to display\t\n\t\t*/\t\n\t\t_formatRemoteShare: function(shareWith, shareWithDisplayName, message) {\t\n\t\t\tvar parts = OCA.Sharing.Util._REMOTE_OWNER_REGEXP.exec(shareWith)\t\n\t\t\tif (!parts) {\t\n\t\t\t\t// display avatar of the user\t\n\t\t\t\tvar avatar = '<span class=\"avatar\" data-username=\"' + escapeHTML(shareWith) + '\" title=\"' + message + ' ' + escapeHTML(shareWithDisplayName) + '\"></span>'\t\n\t\t\t\tvar hidden = '<span class=\"hidden-visually\">' + message + ' ' + escapeHTML(shareWithDisplayName) + '</span> '\t\n\t\t\t\treturn avatar + hidden\t\n\t\t\t}\t\n\n\t\t\tvar userName = parts[1]\t\n\t\t\tvar userDomain = parts[3]\t\n\t\t\tvar server = parts[4]\t\n\t\t\tvar tooltip = message + ' ' + userName\t\n\t\t\tif (userDomain) {\t\n\t\t\t\ttooltip += '@' + userDomain\t\n\t\t\t}\t\n\t\t\tif (server) {\t\n\t\t\t\tif (!userDomain) {\t\n\t\t\t\t\tuserDomain = '…'\t\n\t\t\t\t}\t\n\t\t\t\ttooltip += '@' + server\t\n\t\t\t}\t\n\n\t\t\tvar html = '<span class=\"remoteAddress\" title=\"' + escapeHTML(tooltip) + '\">'\t\n\t\t\thtml += '<span class=\"username\">' + escapeHTML(userName) + '</span>'\t\n\t\t\tif (userDomain) {\t\n\t\t\t\thtml += '<span class=\"userDomain\">@' + escapeHTML(userDomain) + '</span>'\t\n\t\t\t}\t\n\t\t\thtml += '</span> '\t\n\t\t\treturn html\t\n\t\t},\t\n\t\t/**\t\n\t\t * Loop over all recipients in the list and format them using\t\n\t\t * all kind of fancy magic.\t\n\t\t *\t\n\t\t* @param {Object} recipients array of all the recipients\t\n\t\t* @returns {String[]} modified list of recipients\t\n\t\t*/\t\n\t\t_formatShareList: function(recipients) {\t\n\t\t\tvar _parent = this\t\n\t\t\trecipients = _.toArray(recipients)\t\n\t\t\trecipients.sort(function(a, b) {\t\n\t\t\t\treturn a.shareWithDisplayName.localeCompare(b.shareWithDisplayName)\t\n\t\t\t})\t\n\t\t\treturn $.map(recipients, function(recipient) {\t\n\t\t\t\treturn _parent._formatRemoteShare(recipient.shareWith, recipient.shareWithDisplayName, t('core', 'Shared with'))\t\n\t\t\t})\t\n\t\t},\n\t\t\n\t\t/**\t\n\t\t * Marks/unmarks a given file as shared by changing its action icon\t\n\t\t * and folder icon.\t\n\t\t *\t\n\t\t* @param $tr file element to mark as shared\t\n\t\t* @param hasShares whether shares are available\t\n\t\t* @param hasLink whether link share is available\t\n\t\t*/\t\n\t\tmarkFileAsShared: function($tr, hasShares, hasLink) {\t\n\t\t\tvar action = $tr.find('.fileactions .action[data-action=\"Share\"]')\t\n\t\t\tvar type = $tr.data('type')\t\n\t\t\tvar icon = action.find('.icon')\t\n\t\t\tvar message, recipients, avatars\t\n\t\t\tvar ownerId = $tr.attr('data-share-owner-id')\t\n\t\t\tvar owner = $tr.attr('data-share-owner')\t\n\t\t\tvar mountType = $tr.attr('data-mounttype')\t\n\t\t\tvar shareFolderIcon\t\n\t\t\tvar iconClass = 'icon-shared'\t\n\t\t\taction.removeClass('shared-style')\t\n\t\t\t// update folder icon\t\n\t\t\tif (type === 'dir' && (hasShares || hasLink || ownerId)) {\t\n\t\t\t\tif (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType)\t\n\t\t\t\t} else if (hasLink) {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-public')\t\n\t\t\t\t} else {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-shared')\t\n\t\t\t\t}\t\n\t\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\t\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\t\n\t\t\t} else if (type === 'dir') {\t\n\t\t\t\tvar isEncrypted = $tr.attr('data-e2eencrypted')\t\n\t\t\t\t// FIXME: duplicate of FileList._createRow logic for external folder,\t\n\t\t\t\t// need to refactor the icon logic into a single code path eventually\t\n\t\t\t\tif (isEncrypted === 'true') {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted')\t\n\t\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\t\n\t\t\t\t} else if (mountType && mountType.indexOf('external') === 0) {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-external')\t\n\t\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\t\n\t\t\t\t} else {\t\n\t\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir')\t\n\t\t\t\t\t// back to default\t\n\t\t\t\t\t$tr.removeAttr('data-icon')\t\n\t\t\t\t}\t\n\t\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\t\n\t\t\t}\t\n\t\t\t// update share action text / icon\t\n\t\t\tif (hasShares || ownerId) {\t\n\t\t\t\trecipients = $tr.data('share-recipient-data')\t\n\t\t\t\taction.addClass('shared-style')\t\n\n\t\t\t\tavatars = '<span>' + t('core', 'Shared') + '</span>'\t\n\t\t\t\t// even if reshared, only show \"Shared by\"\t\n\t\t\t\tif (ownerId) {\t\n\t\t\t\t\tmessage = t('core', 'Shared by')\t\n\t\t\t\t\tavatars = this._formatRemoteShare(ownerId, owner, message)\t\n\t\t\t\t} else if (recipients) {\t\n\t\t\t\t\tavatars = this._formatShareList(recipients)\t\n\t\t\t\t}\t\n\t\t\t\taction.html(avatars).prepend(icon)\t\n\n\t\t\t\tif (ownerId || recipients) {\t\n\t\t\t\t\tvar avatarElement = action.find('.avatar')\t\n\t\t\t\t\tavatarElement.each(function() {\t\n\t\t\t\t\t\t$(this).avatar($(this).data('username'), 32)\t\n\t\t\t\t\t})\t\n\t\t\t\t\taction.find('span[title]').tooltip({ placement: 'top' })\t\n\t\t\t\t}\t\n\t\t\t} else {\t\n\t\t\t\taction.html('<span class=\"hidden-visually\">' + t('core', 'Shared') + '</span>').prepend(icon)\t\n\t\t\t}\t\n\t\t\tif (hasLink) {\t\n\t\t\t\ticonClass = 'icon-public'\t\n\t\t\t}\t\n\t\t\ticon.removeClass('icon-shared icon-public').addClass(iconClass)\t\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 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\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\n\t\t\tvar path = fileInfoModel.attributes.path + '/' + fileInfoModel.attributes.name\n\t\t\tOCA.Files.Sidebar.file = path\n\t\t\tOCA.Files.Sidebar.activeTab = 'sharing'\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!./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","\"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","// 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.js b/apps/files_sharing/js/dist/files_sharing.js index fbc11b21811..b8c19e4a840 100644 --- a/apps/files_sharing/js/dist/files_sharing.js +++ b/apps/files_sharing/js/dist/files_sharing.js @@ -1,2 +1,2 @@ -!function(e){var i={};function t(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,t),n.l=!0,n.exports}t.m=e,t.c=i,t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:s})},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,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var n in e)t.d(s,n,function(i){return e[i]}.bind(null,n));return s},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="/js/",t(t.s=179)}({179:function(e,i,t){"use strict";t.r(i);t(180),t(181);t.nc=btoa(OC.requestToken),t.p=OC.linkTo("files_sharing","js/dist/")},180:function(e,i){OCA.Sharing||(OCA.Sharing={}),OCA.Sharing.App={_inFileList:null,_outFileList:null,_overviewFileList:null,initSharingIn:function(e){return this._inFileList?this._inFileList:(this._inFileList=new OCA.Sharing.FileList(e,{id:"shares.self",sharedWithUser:!0,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),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>"),this._inFileList)},initSharingOut:function(e){return this._outFileList?this._outFileList:(this._outFileList=new OCA.Sharing.FileList(e,{id:"shares.others",sharedWithUser:!1,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),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>"),this._outFileList)},initSharingLinks:function(e){return this._linkFileList?this._linkFileList:(this._linkFileList=new OCA.Sharing.FileList(e,{id:"shares.link",linksOnly:!0,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),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>"),this._linkFileList)},initSharingDeleted:function(e){return this._deletedFileList?this._deletedFileList:(this._deletedFileList=new OCA.Sharing.FileList(e,{id:"shares.deleted",showDeleted:!0,sharedWithUser:!0,fileActions:this._restoreShareAction(),config:OCA.Files.App.getFilesConfig(),shown:!0}),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>"),this._deletedFileList)},initShareingOverview:function(e){return this._overviewFileList?this._overviewFileList:(this._overviewFileList=new OCA.Sharing.FileList(e,{id:"shares.overview",config:OCA.Files.App.getFilesConfig(),isOverview:!0,shown:!0}),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>"),this._overviewFileList)},removeSharingIn:function(){this._inFileList&&this._inFileList.$fileList.empty()},removeSharingOut:function(){this._outFileList&&this._outFileList.$fileList.empty()},removeSharingLinks:function(){this._linkFileList&&this._linkFileList.$fileList.empty()},removeSharingDeleted:function(){this._deletedFileList&&this._deletedFileList.$fileList.empty()},removeSharingOverview:function(){this._overviewFileList&&this._overviewFileList.$fileList.empty()},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},_createFileActions:function(){var e=new OCA.Files.FileActions;return e.registerDefaultActions(),e.merge(OCA.Files.fileActions),this._globalActionsInitialized||(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=!0),e.register("dir","Open",OC.PERMISSION_READ,"",(function(e,i){OCA.Files.App.setActiveView("files",{silent:!0}),OCA.Files.App.fileList.changeDirectory(OC.joinPaths(i.$file.attr("data-path"),e),!0,!0)})),e.setDefault("dir","Open"),e},_restoreShareAction:function(){var e=new OCA.Files.FileActions;return e.registerAction({name:"Restore",displayName:"",altText:t("files_sharing","Restore share"),mime:"all",permissions:OC.PERMISSION_ALL,iconClass:"icon-history",type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(e,i){var s=i.$file.data("shareId");$.post(OC.linkToOCS("apps/files_sharing/api/v1/deletedshares",2)+s).success((function(e){i.fileList.remove(i.fileInfoModel.attributes.name)})).fail((function(){OC.Notification.showTemporary(t("files_sharing","Something happened. Unable to restore the share."))}))}}),e},_onActionsUpdated:function(e){_.each([this._inFileList,this._outFileList,this._linkFileList],(function(i){i&&(e.action?i.fileActions.registerAction(e.action):e.defaultAction&&i.fileActions.setDefault(e.defaultAction.mime,e.defaultAction.name))}))},_extendFileList:function(e){e.fileSummary.$el.find(".filesize").remove()}},$(document).ready((function(){$("#app-content-sharingin").on("show",(function(e){OCA.Sharing.App.initSharingIn($(e.target))})),$("#app-content-sharingin").on("hide",(function(){OCA.Sharing.App.removeSharingIn()})),$("#app-content-sharingout").on("show",(function(e){OCA.Sharing.App.initSharingOut($(e.target))})),$("#app-content-sharingout").on("hide",(function(){OCA.Sharing.App.removeSharingOut()})),$("#app-content-sharinglinks").on("show",(function(e){OCA.Sharing.App.initSharingLinks($(e.target))})),$("#app-content-sharinglinks").on("hide",(function(){OCA.Sharing.App.removeSharingLinks()})),$("#app-content-deletedshares").on("show",(function(e){OCA.Sharing.App.initSharingDeleted($(e.target))})),$("#app-content-deletedshares").on("hide",(function(){OCA.Sharing.App.removeSharingDeleted()})),$("#app-content-shareoverview").on("show",(function(e){OCA.Sharing.App.initShareingOverview($(e.target))})),$("#app-content-shareoverview").on("hide",(function(){OCA.Sharing.App.removeSharingOverview()}))}))},181:function(e,i){var s;(s=function(e,i){this.initialize(e,i)}).prototype=_.extend({},OCA.Files.FileList.prototype,{appName:"Shares",_sharedWithUser:!1,_linksOnly:!1,_showDeleted:!1,_clientSideSort:!0,_allowSelection:!1,_isOverview:!1,initialize:function(e,i){OCA.Files.FileList.prototype.initialize.apply(this,arguments),this.initialized||(i&&i.sharedWithUser&&(this._sharedWithUser=!0),i&&i.linksOnly&&(this._linksOnly=!0),i&&i.showDeleted&&(this._showDeleted=!0),i&&i.isOverview&&(this._isOverview=!0))},_renderRow:function(){return OCA.Files.FileList.prototype._renderRow.apply(this,arguments)},_createRow:function(e){var i=OCA.Files.FileList.prototype._createRow.apply(this,arguments);if(i.find(".filesize").remove(),i.find("td.date").before(i.children("td:first")),i.find("td.filename input:checkbox").remove(),i.attr("data-share-id",_.pluck(e.shares,"id").join(",")),this._sharedWithUser){i.attr("data-share-owner",e.shareOwner),i.attr("data-mounttype","shared-root");var s=parseInt(i.attr("data-permissions"))|OC.PERMISSION_DELETE;i.attr("data-permissions",s)}if(this._showDeleted&&(s=e.permissions,i.attr("data-share-permissions",s)),this._linksOnly){var n=0;e.shares&&null!==e.shares[0].expiration&&(n=moment(e.shares[0].expiration).valueOf()),i.attr("data-expiration",n);var r,a,o=Math.round((n-(new Date).getTime())/1e3/60/60/24*5);o>=160&&(o=160),n>0?(r=OC.Util.formatDate(n),a=OC.Util.relativeModifiedDate(n)):(r=t("files_sharing","No expiration date set"),a="",o=160),td=$("<td></td>").attr({class:"date"}),td.append($("<span></span>").attr({class:"modified",title:r,style:"color:rgb("+o+","+o+","+o+")"}).text(a).tooltip({placement:"top"})),i.append(td)}return i},setSharedWithUser:function(e){this._sharedWithUser=!!e},updateEmptyContent:function(){var e=this.getCurrentDirectory();"/"===e?(this.$el.find("#emptycontent").toggleClass("hidden",!this.isEmpty),this.$el.find("#filestable thead th").toggleClass("hidden",this.isEmpty),this._linksOnly||this.$el.find("th.column-expiration").addClass("hidden")):OCA.Files.FileList.prototype.updateEmptyContent.apply(this,arguments)},getDirectoryPermissions:function(){return OC.PERMISSION_READ|OC.PERMISSION_DELETE},updateStorageStatistics:function(){},updateRow:function(e,i,t){return e},reload:function(){this.showMask(),this._reloadCall&&this._reloadCall.abort(),this._setCurrentDir("/",!1);var e=[],i={url:OC.linkToOCS("apps/files_sharing/api/v1",2)+"deletedshares",data:{format:"json",include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}},t={url:OC.linkToOCS("apps/files_sharing/api/v1")+"shares",data:{format:"json",shared_with_me:!1!==this._sharedWithUser,include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}},s={url:OC.linkToOCS("apps/files_sharing/api/v1")+"remote_shares",data:{format:"json",include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}};this._showDeleted?e.push($.ajax(i)):(e.push($.ajax(t)),(!1!==this._sharedWithUser||this._isOverview)&&e.push($.ajax(s)),this._isOverview&&(t.data.shared_with_me=!t.data.shared_with_me,e.push($.ajax(t)))),this._reloadCall=$.when.apply($,e);var n=this.reloadCallback.bind(this);return this._reloadCall.then(n,n)},reloadCallback:function(e,i,s){delete this._reloadCall,this.hideMask(),this.$el.find("#headerSharedWith").text(t("files_sharing",this._sharedWithUser?"Shared by":"Shared with"));var n=[];return e[0]&&e[0].ocs&&(e=e[0]),i&&i[0]&&i[0].ocs&&(i=i[0]),s&&s[0]&&s[0].ocs&&(s=s[0]),e.ocs&&e.ocs.data&&(n=n.concat(this._makeFilesFromShares(e.ocs.data,this._sharedWithUser))),i&&i.ocs&&i.ocs.data&&(n=n.concat(this._makeFilesFromRemoteShares(i.ocs.data))),s&&s.ocs&&s.ocs.data&&(n=n.concat(this._makeFilesFromShares(s.ocs.data,!this._sharedWithUser))),this.setFiles(n),!0},_makeFilesFromRemoteShares:function(e){var i=e;return i=_.chain(i).map((function(e){var i={shareOwner:e.owner+"@"+e.remote.replace(/.*?:\/\//g,""),name:OC.basename(e.mountpoint),mtime:1e3*e.mtime,mimetype:e.mimetype,type:e.type,id:e.file_id,path:OC.dirname(e.mountpoint),permissions:e.permissions,tags:e.tags||[]};return i.shares=[{id:e.id,type:OC.Share.SHARE_TYPE_REMOTE}],i})).value()},_makeFilesFromShares:function(e,i){var t=e;return this._linksOnly&&(t=_.filter(e,(function(e){return e.share_type===OC.Share.SHARE_TYPE_LINK}))),(t=_.chain(t).map((function(e){var t={id:e.file_source,icon:OC.MimeType.getIconUrl(e.mimetype),mimetype:e.mimetype,tags:e.tags||[]};return"folder"===e.item_type?(t.type="dir",t.mimetype="httpd/unix-directory"):t.type="file",t.share={id:e.id,type:e.share_type,target:e.share_with,stime:1e3*e.stime,expiration:e.expiration},i?(t.shareOwner=e.displayname_owner,t.shareOwnerId=e.uid_owner,t.name=OC.basename(e.file_target),t.path=OC.dirname(e.file_target),t.permissions=e.permissions,t.path&&(t.extraData=e.file_target)):(e.share_type!==OC.Share.SHARE_TYPE_LINK&&(t.share.targetDisplayName=e.share_with_displayname,t.share.targetShareWithId=e.share_with),t.name=OC.basename(e.path),t.path=OC.dirname(e.path),t.permissions=OC.PERMISSION_ALL,t.path&&(t.extraData=e.path)),t})).reduce((function(e,i){var t=e[i.id],s=i.share.targetDisplayName,n=i.share.targetShareWithId;return t?(i.share.stime>t.mtime&&(t.mtime=i.share.stime),t.shares.push(i.share)):((t=e[i.id]=i).shares=[i.share],t.recipients={},t.recipientData={},t.shareTypes={},t.recipientsCount=0,t.mtime=i.share.stime),s&&(t.recipientsCount<4&&(t.recipients[s]=!0,t.recipientData[t.recipientsCount]={shareWith:n,shareWithDisplayName:s}),t.recipientsCount++),t.shareTypes[i.share.type]=!0,delete i.share,e}),{}).values().each((function(e){e.mountType="shared",delete e.recipientsCount,i?delete e.shareTypes:e.shareTypes=_.keys(e.shareTypes)})).value()).sort(this._sortComparator)}}),OCA.Sharing.FileList=s}}); +!function(e){var i={};function t(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,t),n.l=!0,n.exports}t.m=e,t.c=i,t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:s})},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,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var n in e)t.d(s,n,function(i){return e[i]}.bind(null,n));return s},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="/js/",t(t.s=340)}({340:function(e,i,t){"use strict";t.r(i);t(341),t(342);t.nc=btoa(OC.requestToken),t.p=OC.linkTo("files_sharing","js/dist/")},341:function(e,i){OCA.Sharing||(OCA.Sharing={}),OCA.Sharing.App={_inFileList:null,_outFileList:null,_overviewFileList:null,initSharingIn:function(e){return this._inFileList?this._inFileList:(this._inFileList=new OCA.Sharing.FileList(e,{id:"shares.self",sharedWithUser:!0,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),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>"),this._inFileList)},initSharingOut:function(e){return this._outFileList?this._outFileList:(this._outFileList=new OCA.Sharing.FileList(e,{id:"shares.others",sharedWithUser:!1,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),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>"),this._outFileList)},initSharingLinks:function(e){return this._linkFileList?this._linkFileList:(this._linkFileList=new OCA.Sharing.FileList(e,{id:"shares.link",linksOnly:!0,fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0}),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>"),this._linkFileList)},initSharingDeleted:function(e){return this._deletedFileList?this._deletedFileList:(this._deletedFileList=new OCA.Sharing.FileList(e,{id:"shares.deleted",showDeleted:!0,sharedWithUser:!0,fileActions:this._restoreShareAction(),config:OCA.Files.App.getFilesConfig(),shown:!0}),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>"),this._deletedFileList)},initShareingOverview:function(e){return this._overviewFileList?this._overviewFileList:(this._overviewFileList=new OCA.Sharing.FileList(e,{id:"shares.overview",config:OCA.Files.App.getFilesConfig(),isOverview:!0,shown:!0}),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>"),this._overviewFileList)},removeSharingIn:function(){this._inFileList&&this._inFileList.$fileList.empty()},removeSharingOut:function(){this._outFileList&&this._outFileList.$fileList.empty()},removeSharingLinks:function(){this._linkFileList&&this._linkFileList.$fileList.empty()},removeSharingDeleted:function(){this._deletedFileList&&this._deletedFileList.$fileList.empty()},removeSharingOverview:function(){this._overviewFileList&&this._overviewFileList.$fileList.empty()},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},_createFileActions:function(){var e=new OCA.Files.FileActions;return e.registerDefaultActions(),e.merge(OCA.Files.fileActions),this._globalActionsInitialized||(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=!0),e.register("dir","Open",OC.PERMISSION_READ,"",(function(e,i){OCA.Files.App.setActiveView("files",{silent:!0}),OCA.Files.App.fileList.changeDirectory(OC.joinPaths(i.$file.attr("data-path"),e),!0,!0)})),e.setDefault("dir","Open"),e},_restoreShareAction:function(){var e=new OCA.Files.FileActions;return e.registerAction({name:"Restore",displayName:"",altText:t("files_sharing","Restore share"),mime:"all",permissions:OC.PERMISSION_ALL,iconClass:"icon-history",type:OCA.Files.FileActions.TYPE_INLINE,actionHandler:function(e,i){var s=i.$file.data("shareId");$.post(OC.linkToOCS("apps/files_sharing/api/v1/deletedshares",2)+s).success((function(e){i.fileList.remove(i.fileInfoModel.attributes.name)})).fail((function(){OC.Notification.showTemporary(t("files_sharing","Something happened. Unable to restore the share."))}))}}),e},_onActionsUpdated:function(e){_.each([this._inFileList,this._outFileList,this._linkFileList],(function(i){i&&(e.action?i.fileActions.registerAction(e.action):e.defaultAction&&i.fileActions.setDefault(e.defaultAction.mime,e.defaultAction.name))}))},_extendFileList:function(e){e.fileSummary.$el.find(".filesize").remove()}},$(document).ready((function(){$("#app-content-sharingin").on("show",(function(e){OCA.Sharing.App.initSharingIn($(e.target))})),$("#app-content-sharingin").on("hide",(function(){OCA.Sharing.App.removeSharingIn()})),$("#app-content-sharingout").on("show",(function(e){OCA.Sharing.App.initSharingOut($(e.target))})),$("#app-content-sharingout").on("hide",(function(){OCA.Sharing.App.removeSharingOut()})),$("#app-content-sharinglinks").on("show",(function(e){OCA.Sharing.App.initSharingLinks($(e.target))})),$("#app-content-sharinglinks").on("hide",(function(){OCA.Sharing.App.removeSharingLinks()})),$("#app-content-deletedshares").on("show",(function(e){OCA.Sharing.App.initSharingDeleted($(e.target))})),$("#app-content-deletedshares").on("hide",(function(){OCA.Sharing.App.removeSharingDeleted()})),$("#app-content-shareoverview").on("show",(function(e){OCA.Sharing.App.initShareingOverview($(e.target))})),$("#app-content-shareoverview").on("hide",(function(){OCA.Sharing.App.removeSharingOverview()}))}))},342:function(e,i){var s;(s=function(e,i){this.initialize(e,i)}).prototype=_.extend({},OCA.Files.FileList.prototype,{appName:"Shares",_sharedWithUser:!1,_linksOnly:!1,_showDeleted:!1,_clientSideSort:!0,_allowSelection:!1,_isOverview:!1,initialize:function(e,i){OCA.Files.FileList.prototype.initialize.apply(this,arguments),this.initialized||(i&&i.sharedWithUser&&(this._sharedWithUser=!0),i&&i.linksOnly&&(this._linksOnly=!0),i&&i.showDeleted&&(this._showDeleted=!0),i&&i.isOverview&&(this._isOverview=!0))},_renderRow:function(){return OCA.Files.FileList.prototype._renderRow.apply(this,arguments)},_createRow:function(e){var i=OCA.Files.FileList.prototype._createRow.apply(this,arguments);if(i.find(".filesize").remove(),i.find("td.date").before(i.children("td:first")),i.find("td.filename input:checkbox").remove(),i.attr("data-share-id",_.pluck(e.shares,"id").join(",")),this._sharedWithUser){i.attr("data-share-owner",e.shareOwner),i.attr("data-mounttype","shared-root");var s=parseInt(i.attr("data-permissions"))|OC.PERMISSION_DELETE;i.attr("data-permissions",s)}if(this._showDeleted&&(s=e.permissions,i.attr("data-share-permissions",s)),this._linksOnly){var n=0;e.shares&&null!==e.shares[0].expiration&&(n=moment(e.shares[0].expiration).valueOf()),i.attr("data-expiration",n);var r,a,o=Math.round((n-(new Date).getTime())/1e3/60/60/24*5);o>=160&&(o=160),n>0?(r=OC.Util.formatDate(n),a=OC.Util.relativeModifiedDate(n)):(r=t("files_sharing","No expiration date set"),a="",o=160),td=$("<td></td>").attr({class:"date"}),td.append($("<span></span>").attr({class:"modified",title:r,style:"color:rgb("+o+","+o+","+o+")"}).text(a).tooltip({placement:"top"})),i.append(td)}return i},setSharedWithUser:function(e){this._sharedWithUser=!!e},updateEmptyContent:function(){var e=this.getCurrentDirectory();"/"===e?(this.$el.find("#emptycontent").toggleClass("hidden",!this.isEmpty),this.$el.find("#filestable thead th").toggleClass("hidden",this.isEmpty),this._linksOnly||this.$el.find("th.column-expiration").addClass("hidden")):OCA.Files.FileList.prototype.updateEmptyContent.apply(this,arguments)},getDirectoryPermissions:function(){return OC.PERMISSION_READ|OC.PERMISSION_DELETE},updateStorageStatistics:function(){},updateRow:function(e,i,t){return e},reload:function(){this.showMask(),this._reloadCall&&this._reloadCall.abort(),this._setCurrentDir("/",!1);var e=[],i={url:OC.linkToOCS("apps/files_sharing/api/v1",2)+"deletedshares",data:{format:"json",include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}},t={url:OC.linkToOCS("apps/files_sharing/api/v1")+"shares",data:{format:"json",shared_with_me:!1!==this._sharedWithUser,include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}},s={url:OC.linkToOCS("apps/files_sharing/api/v1")+"remote_shares",data:{format:"json",include_tags:!0},type:"GET",beforeSend:function(e){e.setRequestHeader("OCS-APIREQUEST","true")}};this._showDeleted?e.push($.ajax(i)):(e.push($.ajax(t)),(!1!==this._sharedWithUser||this._isOverview)&&e.push($.ajax(s)),this._isOverview&&(t.data.shared_with_me=!t.data.shared_with_me,e.push($.ajax(t)))),this._reloadCall=$.when.apply($,e);var n=this.reloadCallback.bind(this);return this._reloadCall.then(n,n)},reloadCallback:function(e,i,s){delete this._reloadCall,this.hideMask(),this.$el.find("#headerSharedWith").text(t("files_sharing",this._sharedWithUser?"Shared by":"Shared with"));var n=[];return e[0]&&e[0].ocs&&(e=e[0]),i&&i[0]&&i[0].ocs&&(i=i[0]),s&&s[0]&&s[0].ocs&&(s=s[0]),e.ocs&&e.ocs.data&&(n=n.concat(this._makeFilesFromShares(e.ocs.data,this._sharedWithUser))),i&&i.ocs&&i.ocs.data&&(n=n.concat(this._makeFilesFromRemoteShares(i.ocs.data))),s&&s.ocs&&s.ocs.data&&(n=n.concat(this._makeFilesFromShares(s.ocs.data,!this._sharedWithUser))),this.setFiles(n),!0},_makeFilesFromRemoteShares:function(e){var i=e;return i=_.chain(i).map((function(e){var i={shareOwner:e.owner+"@"+e.remote.replace(/.*?:\/\//g,""),name:OC.basename(e.mountpoint),mtime:1e3*e.mtime,mimetype:e.mimetype,type:e.type,id:e.file_id,path:OC.dirname(e.mountpoint),permissions:e.permissions,tags:e.tags||[]};return i.shares=[{id:e.id,type:OC.Share.SHARE_TYPE_REMOTE}],i})).value()},_makeFilesFromShares:function(e,i){var t=e;return this._linksOnly&&(t=_.filter(e,(function(e){return e.share_type===OC.Share.SHARE_TYPE_LINK}))),(t=_.chain(t).map((function(e){var t={id:e.file_source,icon:OC.MimeType.getIconUrl(e.mimetype),mimetype:e.mimetype,tags:e.tags||[]};return"folder"===e.item_type?(t.type="dir",t.mimetype="httpd/unix-directory"):t.type="file",t.share={id:e.id,type:e.share_type,target:e.share_with,stime:1e3*e.stime,expiration:e.expiration},i?(t.shareOwner=e.displayname_owner,t.shareOwnerId=e.uid_owner,t.name=OC.basename(e.file_target),t.path=OC.dirname(e.file_target),t.permissions=e.permissions,t.path&&(t.extraData=e.file_target)):(e.share_type!==OC.Share.SHARE_TYPE_LINK&&(t.share.targetDisplayName=e.share_with_displayname,t.share.targetShareWithId=e.share_with),t.name=OC.basename(e.path),t.path=OC.dirname(e.path),t.permissions=OC.PERMISSION_ALL,t.path&&(t.extraData=e.path)),t})).reduce((function(e,i){var t=e[i.id],s=i.share.targetDisplayName,n=i.share.targetShareWithId;return t?(i.share.stime>t.mtime&&(t.mtime=i.share.stime),t.shares.push(i.share)):((t=e[i.id]=i).shares=[i.share],t.recipients={},t.recipientData={},t.shareTypes={},t.recipientsCount=0,t.mtime=i.share.stime),s&&(t.recipientsCount<4&&(t.recipients[s]=!0,t.recipientData[t.recipientsCount]={shareWith:n,shareWithDisplayName:s}),t.recipientsCount++),t.shareTypes[i.share.type]=!0,delete i.share,e}),{}).values().each((function(e){e.mountType="shared",delete e.recipientsCount,i?delete e.shareTypes:e.shareTypes=_.keys(e.shareTypes)})).value()).sort(this._sortComparator)}}),OCA.Sharing.FileList=s}}); //# sourceMappingURL=files_sharing.js.map
\ 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 07e1802b393..4c96b89123b 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,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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,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,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 = 179);\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 +{"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,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,EAA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L,IAEFO,SAEAxI,MAAK,SAASb,GAGdA,EAAKsJ,UAAY,gBACVtJ,EAAKoJ,gBACRjN,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 = 340);\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/dist/main.js b/apps/files_sharing/js/dist/main.js new file mode 100644 index 00000000000..eaff364433d --- /dev/null +++ b/apps/files_sharing/js/dist/main.js @@ -0,0 +1,24 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/js/",r(r.s=343)}({343:function(e,t){ +/** + * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com> + * + * @author John Molakvoæ <skjnldsv@protonmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +Object.assign(OC,{Share:{SHARE_TYPE_USER:0,SHARE_TYPE_GROUP:1,SHARE_TYPE_LINK:3,SHARE_TYPE_EMAIL:4,SHARE_TYPE_REMOTE:6,SHARE_TYPE_CIRCLE:7,SHARE_TYPE_GUEST:8,SHARE_TYPE_REMOTE_GROUP:9,SHARE_TYPE_ROOM:10}})}}); +//# sourceMappingURL=main.js.map
\ No newline at end of file diff --git a/apps/files_sharing/js/dist/main.js.map b/apps/files_sharing/js/dist/main.js.map new file mode 100644 index 00000000000..f381cb011f2 --- /dev/null +++ b/apps/files_sharing/js/dist/main.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_sharing/src/index.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","assign","OC","Share","SHARE_TYPE_USER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AC9I,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,K;;;;;;;;;;;;;;;;;;;;;;AC3DrDrB,OAAOsB,OAAOC,GAAI,CACjBC,MAAO,CACNC,gBAAiB,EACjBC,iBAAkB,EAClBC,gBAAiB,EACjBC,iBAAkB,EAClBC,kBAAmB,EACnBC,kBAAmB,EACnBC,iBAAkB,EAClBC,wBAAyB,EACzBC,gBAAiB","file":"main.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 = 343);\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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// register default shares types\nObject.assign(OC, {\n\tShare: {\n\t\tSHARE_TYPE_USER: 0,\n\t\tSHARE_TYPE_GROUP: 1,\n\t\tSHARE_TYPE_LINK: 3,\n\t\tSHARE_TYPE_EMAIL: 4,\n\t\tSHARE_TYPE_REMOTE: 6,\n\t\tSHARE_TYPE_CIRCLE: 7,\n\t\tSHARE_TYPE_GUEST: 8,\n\t\tSHARE_TYPE_REMOTE_GROUP: 9,\n\t\tSHARE_TYPE_ROOM: 10\n\t}\n})\n"],"sourceRoot":""}
\ No newline at end of file diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 1e1a2ca1c8b..3cb3d87cfb2 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -51,8 +51,10 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\ICloudIdManager; use OCP\IContainer; use OCP\Files\Config\IMountProviderCollection; +use OCP\IContainer; use OCP\IGroup; use OCP\IServerContainer; +use OCP\Util; use Symfony\Component\EventDispatcher\GenericEvent; class Application extends App { @@ -189,6 +191,11 @@ class Application extends App { $this->registerMountProviders($mountProviderCollection); $this->registerEventsScripts($dispatcher); $this->setupSharingMenus(); + + /** + * Always add main sharing script + */ + Util::addScript(self::APP_ID, 'dist/main'); } protected function registerMountProviders(IMountProviderCollection $mountProviderCollection) { diff --git a/apps/files_sharing/src/index.js b/apps/files_sharing/src/index.js new file mode 100644 index 00000000000..cc2e1c6e698 --- /dev/null +++ b/apps/files_sharing/src/index.js @@ -0,0 +1,36 @@ +/** + * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com> + * + * @author John Molakvoæ <skjnldsv@protonmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +// register default shares types +Object.assign(OC, { + Share: { + SHARE_TYPE_USER: 0, + SHARE_TYPE_GROUP: 1, + SHARE_TYPE_LINK: 3, + SHARE_TYPE_EMAIL: 4, + SHARE_TYPE_REMOTE: 6, + SHARE_TYPE_CIRCLE: 7, + SHARE_TYPE_GUEST: 8, + SHARE_TYPE_REMOTE_GROUP: 9, + SHARE_TYPE_ROOM: 10 + } +}) diff --git a/apps/files_sharing/src/share.js b/apps/files_sharing/src/share.js index a59cfda4b12..07c367fddab 100644 --- a/apps/files_sharing/src/share.js +++ b/apps/files_sharing/src/share.js @@ -21,18 +21,6 @@ OCA.Sharing = {} } - OC.Share = _.extend(OC.Share || {}, { - SHARE_TYPE_USER: 0, - SHARE_TYPE_GROUP: 1, - SHARE_TYPE_LINK: 3, - SHARE_TYPE_EMAIL: 4, - SHARE_TYPE_REMOTE: 6, - SHARE_TYPE_CIRCLE: 7, - SHARE_TYPE_GUEST: 8, - SHARE_TYPE_REMOTE_GROUP: 9, - SHARE_TYPE_ROOM: 10 - }) - /** * @namespace */ diff --git a/apps/files_sharing/webpack.js b/apps/files_sharing/webpack.js index 43a34559d41..70759a684df 100644 --- a/apps/files_sharing/webpack.js +++ b/apps/files_sharing/webpack.js @@ -3,9 +3,10 @@ const path = require('path'); module.exports = { entry: { 'additionalScripts': path.join(__dirname, 'src', 'additionalScripts.js'), - 'files_sharing': path.join(__dirname, 'src', 'files_sharing.js'), - 'files_sharing_tab': path.join(__dirname, 'src', 'files_sharing_tab.js'), 'collaboration': path.join(__dirname, 'src', 'collaborationresourceshandler.js'), + 'files_sharing_tab': path.join(__dirname, 'src', 'files_sharing_tab.js'), + 'files_sharing': path.join(__dirname, 'src', 'files_sharing.js'), + 'main': path.join(__dirname, 'src', 'index.js'), }, output: { path: path.resolve(__dirname, './js/dist/'), |