diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-05-29 12:14:51 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-05-29 14:57:25 +0200 |
commit | 53dd7c0c208ae55a75e8b5abe815d427c355974c (patch) | |
tree | 3f782e8efe26ccb4e0df79c72ce5dfae638e56ad /apps/comments/js/comments.js.map | |
parent | b52a4feb03df5b81f9d5e294207ec099aad3c07d (diff) | |
download | nextcloud-server-53dd7c0c208ae55a75e8b5abe815d427c355974c.tar.gz nextcloud-server-53dd7c0c208ae55a75e8b5abe815d427c355974c.zip |
Npm build
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/comments/js/comments.js.map')
-rw-r--r-- | apps/comments/js/comments.js.map | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/comments/js/comments.js.map b/apps/comments/js/comments.js.map index eac7c0b3a04..e91bf6f9a1a 100644 --- a/apps/comments/js/comments.js.map +++ b/apps/comments/js/comments.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/comments/src/comments.js","webpack:///./apps/comments/src/app.js","webpack:///./apps/comments/src/templates.js","webpack:///./apps/comments/src/filesplugin.js","webpack:///./apps/comments/src/activitytabviewplugin.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","window","OCA","Comments","template","Handlebars","Templates","container","depth0","helpers","partials","data","helper","alias1","nullContext","alias2","hooks","helperMissing","alias4","escapeExpression","lookupProperty","parent","propertyName","_","extend","OC","Files","Client","PROPERTY_COMMENTS_UNREAD","NS_OWNCLOUD","FilesPlugin","ignoreLists","_formatCommentCount","count","filesplugin","countMessage","iconUrl","imagePath","attach","fileList","self","this","indexOf","id","oldGetWebdavProperties","_getWebdavProperties","props","apply","arguments","push","filesClient","addFileInfoParser","response","commentsUnread","propStat","properties","isUndefined","parseInt","$el","addClass","oldCreateRow","_createRow","fileData","$tr","attr","fileActions","registerAction","displayName","context","$file","unread","mime","order","iconClass","permissions","PERMISSION_READ","type","FileActions","TYPE_INLINE","render","actionSpec","isDefault","unreadComments","$actionLink","$","find","append","actionHandler","fileName","tooltip","Sidebar","setActiveTab","open","oldElementToFile","elementToFile","fileInfo","Plugins","register","ActivityTabViewPlugin","prepareModelForDisplay","model","view","_isLong","$overlay","after","on","_onClickCollapsedComment","ev","$row","target","is","closest","removeClass","message","length","match"],"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,OAA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,SAAS,qBAAsB/F,IAAIC,SAAS2B,c,kBCpHtD5B,IAAIC,SAAS+F,sBAAwB,CASpCC,uBAAuBC,EAAO1C,EAAK2C,GAClC,GAAyB,aAArBD,EAAMtH,IAAI,QAA+C,aAAtBsH,EAAMtH,IAAI,SAIpC,oBAATuH,IACH3C,EAAIC,SAAS,WACTyC,EAAMtH,IAAI,YAAc2D,KAAK6D,QAAQF,EAAMtH,IAAI,aAAa,CAC/D4E,EAAIC,SAAS,aACb,MAAM4C,EAAWnB,EAAE,SAASzB,SAAS,mBACrCD,EAAI2B,KAAK,oBAAoBmB,MAAMD,GACnC7C,EAAI+C,GAAG,QAAShE,KAAKiE,4BAQxBA,yBAAyBC,GACxB,IAAIC,EAAOxB,EAAEuB,EAAGE,QACXD,EAAKE,GAAG,cACZF,EAAOA,EAAKG,QAAQ,aAErBH,EAAKI,YAAY,cAMlBV,QAAQW,GACAA,EAAQC,OAAS,MAAQD,EAAQE,MAAM,QAAU,IAAID,OAAS,GAMxEzF,GAAGuE,QAAQC,SAAS,gCAAiC/F,IAAIC,SAAS+F","file":"comments.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 = 395);\n","/**\n * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport './app'\nimport './templates'\nimport './filesplugin'\nimport './activitytabviewplugin'\n\nwindow.OCA.Comments = OCA.Comments\n","/**\n * Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Vincent Petry <vincent@nextcloud.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(function() {\n\tif (!OCA.Comments) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.Comments = {}\n\t}\n\n})()\n","(function() {\n var template = Handlebars.template, templates = OCA.Comments.Templates = OCA.Comments.Templates || {};\ntemplates['filesplugin'] = template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<a class=\\\"action action-comment permanent\\\" title=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"countMessage\") || (depth0 != null ? lookupProperty(depth0,\"countMessage\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"countMessage\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":50},\"end\":{\"line\":1,\"column\":66}}}) : helper)))\n + \"\\\" href=\\\"#\\\">\\n\t<img class=\\\"svg\\\" src=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"iconUrl\") || (depth0 != null ? lookupProperty(depth0,\"iconUrl\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"iconUrl\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":23},\"end\":{\"line\":2,\"column\":34}}}) : helper)))\n + \"\\\"/>\\n</a>\\n\";\n},\"useData\":true});\n})();","/**\n * Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>\n *\n * @author Joas Schilling <coding@schilljs.com>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Michael Jobst <mjobst+github@tecratech.de>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n * @author Vincent Petry <vincent@nextcloud.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(function() {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_COMMENTS_UNREAD: '{' + OC.Files.Client.NS_OWNCLOUD + '}comments-unread',\n\t})\n\n\tOCA.Comments = _.extend({}, OCA.Comments)\n\tif (!OCA.Comments) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.Comments = {}\n\t}\n\n\t/**\n\t * @namespace\n\t */\n\tOCA.Comments.FilesPlugin = {\n\t\tignoreLists: [\n\t\t\t'trashbin',\n\t\t\t'files.public',\n\t\t],\n\n\t\t_formatCommentCount(count) {\n\t\t\treturn OCA.Comments.Templates.filesplugin({\n\t\t\t\tcount,\n\t\t\t\tcountMessage: n('comments', '%n unread comment', '%n unread comments', count),\n\t\t\t\ticonUrl: OC.imagePath('core', 'actions/comment'),\n\t\t\t})\n\t\t},\n\n\t\tattach(fileList) {\n\t\t\tconst self = this\n\t\t\tif (this.ignoreLists.indexOf(fileList.id) >= 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst oldGetWebdavProperties = fileList._getWebdavProperties\n\t\t\tfileList._getWebdavProperties = function() {\n\t\t\t\tconst props = oldGetWebdavProperties.apply(this, arguments)\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD)\n\t\t\t\treturn props\n\t\t\t}\n\n\t\t\tfileList.filesClient.addFileInfoParser(function(response) {\n\t\t\t\tconst data = {}\n\t\t\t\tconst props = response.propStat[0].properties\n\t\t\t\tconst commentsUnread = props[OC.Files.Client.PROPERTY_COMMENTS_UNREAD]\n\t\t\t\tif (!_.isUndefined(commentsUnread) && commentsUnread !== '') {\n\t\t\t\t\tdata.commentsUnread = parseInt(commentsUnread, 10)\n\t\t\t\t}\n\t\t\t\treturn data\n\t\t\t})\n\n\t\t\tfileList.$el.addClass('has-comments')\n\t\t\tconst oldCreateRow = fileList._createRow\n\t\t\tfileList._createRow = function(fileData) {\n\t\t\t\tconst $tr = oldCreateRow.apply(this, arguments)\n\t\t\t\tif (fileData.commentsUnread) {\n\t\t\t\t\t$tr.attr('data-comments-unread', fileData.commentsUnread)\n\t\t\t\t}\n\t\t\t\treturn $tr\n\t\t\t}\n\n\t\t\t// register \"comment\" action for reading comments\n\t\t\tfileList.fileActions.registerAction({\n\t\t\t\tname: 'Comment',\n\t\t\t\tdisplayName(context) {\n\t\t\t\t\tif (context && context.$file) {\n\t\t\t\t\t\tconst unread = parseInt(context.$file.data('comments-unread'), 10)\n\t\t\t\t\t\tif (unread >= 0) {\n\t\t\t\t\t\t\treturn n('comments', '1 new comment', '{unread} new comments', unread, { unread })\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn t('comments', 'Comment')\n\t\t\t\t},\n\t\t\t\tmime: 'all',\n\t\t\t\torder: -140,\n\t\t\t\ticonClass: 'icon-comment',\n\t\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\t\trender(actionSpec, isDefault, context) {\n\t\t\t\t\tconst $file = context.$file\n\t\t\t\t\tconst unreadComments = $file.data('comments-unread')\n\t\t\t\t\tif (unreadComments) {\n\t\t\t\t\t\tconst $actionLink = $(self._formatCommentCount(unreadComments))\n\t\t\t\t\t\tcontext.$file.find('a.name>span.fileactions').append($actionLink)\n\t\t\t\t\t\treturn $actionLink\n\t\t\t\t\t}\n\t\t\t\t\treturn ''\n\t\t\t\t},\n\t\t\t\tactionHandler(fileName, context) {\n\t\t\t\t\tcontext.$file.find('.action-comment').tooltip('hide')\n\t\t\t\t\t// open sidebar in comments section\n\t\t\t\t\tOCA.Files.Sidebar.setActiveTab('comments')\n\t\t\t\t\tOCA.Files.Sidebar.open('/' + fileName)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\t// add attribute to \"elementToFile\"\n\t\t\tconst oldElementToFile = fileList.elementToFile\n\t\t\tfileList.elementToFile = function($el) {\n\t\t\t\tconst fileInfo = oldElementToFile.apply(this, arguments)\n\t\t\t\tconst commentsUnread = $el.data('comments-unread')\n\t\t\t\tif (commentsUnread) {\n\t\t\t\t\tfileInfo.commentsUnread = commentsUnread\n\t\t\t\t}\n\t\t\t\treturn fileInfo\n\t\t\t}\n\t\t},\n\t}\n\n})()\n\nOC.Plugins.register('OCA.Files.FileList', OCA.Comments.FilesPlugin)\n","/**\n * Copyright (c) 2016\n *\n * @author Joas Schilling <coding@schilljs.com>\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(function() {\n\tOCA.Comments.ActivityTabViewPlugin = {\n\n\t\t/**\n\t\t * Prepare activity for display\n\t\t *\n\t\t * @param {OCA.Activity.ActivityModel} model for this activity\n\t\t * @param {jQuery} $el jQuery handle for this activity\n\t\t * @param {string} view The view that displayes this activity\n\t\t */\n\t\tprepareModelForDisplay(model, $el, view) {\n\t\t\tif (model.get('app') !== 'comments' || model.get('type') !== 'comments') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (view === 'ActivityTabView') {\n\t\t\t\t$el.addClass('comment')\n\t\t\t\tif (model.get('message') && this._isLong(model.get('message'))) {\n\t\t\t\t\t$el.addClass('collapsed')\n\t\t\t\t\tconst $overlay = $('<div>').addClass('message-overlay')\n\t\t\t\t\t$el.find('.activitymessage').after($overlay)\n\t\t\t\t\t$el.on('click', this._onClickCollapsedComment)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/*\n\t\t * Copy of CommentsTabView._onClickComment()\n\t\t */\n\t\t_onClickCollapsedComment(ev) {\n\t\t\tlet $row = $(ev.target)\n\t\t\tif (!$row.is('.comment')) {\n\t\t\t\t$row = $row.closest('.comment')\n\t\t\t}\n\t\t\t$row.removeClass('collapsed')\n\t\t},\n\n\t\t/*\n\t\t * Copy of CommentsTabView._isLong()\n\t\t */\n\t\t_isLong(message) {\n\t\t\treturn message.length > 250 || (message.match(/\\n/g) || []).length > 1\n\t\t},\n\t}\n\n})()\n\nOC.Plugins.register('OCA.Activity.RenderingPlugins', OCA.Comments.ActivityTabViewPlugin)\n"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/comments/src/comments.js","webpack:///./apps/comments/src/app.js","webpack:///./apps/comments/src/templates.js","webpack:///./apps/comments/src/filesplugin.js","webpack:///./apps/comments/src/activitytabviewplugin.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","window","OCA","Comments","template","Handlebars","Templates","container","depth0","helpers","partials","data","helper","alias1","nullContext","alias2","hooks","helperMissing","alias4","escapeExpression","lookupProperty","parent","propertyName","_","extend","OC","Files","Client","PROPERTY_COMMENTS_UNREAD","NS_OWNCLOUD","FilesPlugin","ignoreLists","_formatCommentCount","count","filesplugin","countMessage","iconUrl","imagePath","attach","fileList","self","this","indexOf","id","oldGetWebdavProperties","_getWebdavProperties","props","apply","arguments","push","filesClient","addFileInfoParser","response","commentsUnread","propStat","properties","isUndefined","parseInt","$el","addClass","oldCreateRow","_createRow","fileData","$tr","attr","fileActions","registerAction","displayName","context","$file","unread","mime","order","iconClass","permissions","PERMISSION_READ","type","FileActions","TYPE_INLINE","render","actionSpec","isDefault","unreadComments","$actionLink","$","find","append","actionHandler","fileName","tooltip","Sidebar","setActiveTab","open","oldElementToFile","elementToFile","fileInfo","Plugins","register","ActivityTabViewPlugin","prepareModelForDisplay","model","view","_isLong","$overlay","after","on","_onClickCollapsedComment","ev","$row","target","is","closest","removeClass","message","length","match"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,G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C,EAAOxB,EAAEuB,EAAGE,QACXD,EAAKE,GAAG,cACZF,EAAOA,EAAKG,QAAQ,aAErBH,EAAKI,YAAY,cAMlBV,QAAQW,GACAA,EAAQC,OAAS,MAAQD,EAAQE,MAAM,QAAU,IAAID,OAAS,GAMxEzF,GAAGuE,QAAQC,SAAS,gCAAiC/F,IAAIC,SAAS+F","file":"comments.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 = 437);\n","/**\n * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport './app'\nimport './templates'\nimport './filesplugin'\nimport './activitytabviewplugin'\n\nwindow.OCA.Comments = OCA.Comments\n","/**\n * Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Vincent Petry <vincent@nextcloud.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(function() {\n\tif (!OCA.Comments) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.Comments = {}\n\t}\n\n})()\n","(function() {\n var template = Handlebars.template, templates = OCA.Comments.Templates = OCA.Comments.Templates || {};\ntemplates['filesplugin'] = template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<a class=\\\"action action-comment permanent\\\" title=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"countMessage\") || (depth0 != null ? lookupProperty(depth0,\"countMessage\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"countMessage\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":50},\"end\":{\"line\":1,\"column\":66}}}) : helper)))\n + \"\\\" href=\\\"#\\\">\\n\t<img class=\\\"svg\\\" src=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"iconUrl\") || (depth0 != null ? lookupProperty(depth0,\"iconUrl\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"iconUrl\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":23},\"end\":{\"line\":2,\"column\":34}}}) : helper)))\n + \"\\\"/>\\n</a>\\n\";\n},\"useData\":true});\n})();","/**\n * Copyright (c) 2016 Vincent Petry <pvince81@owncloud.com>\n *\n * @author Joas Schilling <coding@schilljs.com>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Michael Jobst <mjobst+github@tecratech.de>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n * @author Vincent Petry <vincent@nextcloud.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(function() {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_COMMENTS_UNREAD: '{' + OC.Files.Client.NS_OWNCLOUD + '}comments-unread',\n\t})\n\n\tOCA.Comments = _.extend({}, OCA.Comments)\n\tif (!OCA.Comments) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.Comments = {}\n\t}\n\n\t/**\n\t * @namespace\n\t */\n\tOCA.Comments.FilesPlugin = {\n\t\tignoreLists: [\n\t\t\t'trashbin',\n\t\t\t'files.public',\n\t\t],\n\n\t\t_formatCommentCount(count) {\n\t\t\treturn OCA.Comments.Templates.filesplugin({\n\t\t\t\tcount,\n\t\t\t\tcountMessage: n('comments', '%n unread comment', '%n unread comments', count),\n\t\t\t\ticonUrl: OC.imagePath('core', 'actions/comment'),\n\t\t\t})\n\t\t},\n\n\t\tattach(fileList) {\n\t\t\tconst self = this\n\t\t\tif (this.ignoreLists.indexOf(fileList.id) >= 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst oldGetWebdavProperties = fileList._getWebdavProperties\n\t\t\tfileList._getWebdavProperties = function() {\n\t\t\t\tconst props = oldGetWebdavProperties.apply(this, arguments)\n\t\t\t\tprops.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD)\n\t\t\t\treturn props\n\t\t\t}\n\n\t\t\tfileList.filesClient.addFileInfoParser(function(response) {\n\t\t\t\tconst data = {}\n\t\t\t\tconst props = response.propStat[0].properties\n\t\t\t\tconst commentsUnread = props[OC.Files.Client.PROPERTY_COMMENTS_UNREAD]\n\t\t\t\tif (!_.isUndefined(commentsUnread) && commentsUnread !== '') {\n\t\t\t\t\tdata.commentsUnread = parseInt(commentsUnread, 10)\n\t\t\t\t}\n\t\t\t\treturn data\n\t\t\t})\n\n\t\t\tfileList.$el.addClass('has-comments')\n\t\t\tconst oldCreateRow = fileList._createRow\n\t\t\tfileList._createRow = function(fileData) {\n\t\t\t\tconst $tr = oldCreateRow.apply(this, arguments)\n\t\t\t\tif (fileData.commentsUnread) {\n\t\t\t\t\t$tr.attr('data-comments-unread', fileData.commentsUnread)\n\t\t\t\t}\n\t\t\t\treturn $tr\n\t\t\t}\n\n\t\t\t// register \"comment\" action for reading comments\n\t\t\tfileList.fileActions.registerAction({\n\t\t\t\tname: 'Comment',\n\t\t\t\tdisplayName(context) {\n\t\t\t\t\tif (context && context.$file) {\n\t\t\t\t\t\tconst unread = parseInt(context.$file.data('comments-unread'), 10)\n\t\t\t\t\t\tif (unread >= 0) {\n\t\t\t\t\t\t\treturn n('comments', '1 new comment', '{unread} new comments', unread, { unread })\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn t('comments', 'Comment')\n\t\t\t\t},\n\t\t\t\tmime: 'all',\n\t\t\t\torder: -140,\n\t\t\t\ticonClass: 'icon-comment',\n\t\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\t\trender(actionSpec, isDefault, context) {\n\t\t\t\t\tconst $file = context.$file\n\t\t\t\t\tconst unreadComments = $file.data('comments-unread')\n\t\t\t\t\tif (unreadComments) {\n\t\t\t\t\t\tconst $actionLink = $(self._formatCommentCount(unreadComments))\n\t\t\t\t\t\tcontext.$file.find('a.name>span.fileactions').append($actionLink)\n\t\t\t\t\t\treturn $actionLink\n\t\t\t\t\t}\n\t\t\t\t\treturn ''\n\t\t\t\t},\n\t\t\t\tactionHandler(fileName, context) {\n\t\t\t\t\tcontext.$file.find('.action-comment').tooltip('hide')\n\t\t\t\t\t// open sidebar in comments section\n\t\t\t\t\tOCA.Files.Sidebar.setActiveTab('comments')\n\t\t\t\t\tOCA.Files.Sidebar.open('/' + fileName)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\t// add attribute to \"elementToFile\"\n\t\t\tconst oldElementToFile = fileList.elementToFile\n\t\t\tfileList.elementToFile = function($el) {\n\t\t\t\tconst fileInfo = oldElementToFile.apply(this, arguments)\n\t\t\t\tconst commentsUnread = $el.data('comments-unread')\n\t\t\t\tif (commentsUnread) {\n\t\t\t\t\tfileInfo.commentsUnread = commentsUnread\n\t\t\t\t}\n\t\t\t\treturn fileInfo\n\t\t\t}\n\t\t},\n\t}\n\n})()\n\nOC.Plugins.register('OCA.Files.FileList', OCA.Comments.FilesPlugin)\n","/**\n * Copyright (c) 2016\n *\n * @author Joas Schilling <coding@schilljs.com>\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(function() {\n\tOCA.Comments.ActivityTabViewPlugin = {\n\n\t\t/**\n\t\t * Prepare activity for display\n\t\t *\n\t\t * @param {OCA.Activity.ActivityModel} model for this activity\n\t\t * @param {jQuery} $el jQuery handle for this activity\n\t\t * @param {string} view The view that displayes this activity\n\t\t */\n\t\tprepareModelForDisplay(model, $el, view) {\n\t\t\tif (model.get('app') !== 'comments' || model.get('type') !== 'comments') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (view === 'ActivityTabView') {\n\t\t\t\t$el.addClass('comment')\n\t\t\t\tif (model.get('message') && this._isLong(model.get('message'))) {\n\t\t\t\t\t$el.addClass('collapsed')\n\t\t\t\t\tconst $overlay = $('<div>').addClass('message-overlay')\n\t\t\t\t\t$el.find('.activitymessage').after($overlay)\n\t\t\t\t\t$el.on('click', this._onClickCollapsedComment)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/*\n\t\t * Copy of CommentsTabView._onClickComment()\n\t\t */\n\t\t_onClickCollapsedComment(ev) {\n\t\t\tlet $row = $(ev.target)\n\t\t\tif (!$row.is('.comment')) {\n\t\t\t\t$row = $row.closest('.comment')\n\t\t\t}\n\t\t\t$row.removeClass('collapsed')\n\t\t},\n\n\t\t/*\n\t\t * Copy of CommentsTabView._isLong()\n\t\t */\n\t\t_isLong(message) {\n\t\t\treturn message.length > 250 || (message.match(/\\n/g) || []).length > 1\n\t\t},\n\t}\n\n})()\n\nOC.Plugins.register('OCA.Activity.RenderingPlugins', OCA.Comments.ActivityTabViewPlugin)\n"],"sourceRoot":""}
\ No newline at end of file |