@nocobase/plugin-comments 2.3.0-beta.10 → 2.3.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_comments_client_v2=self.webpackChunk_nocobase_plugin_comments_client_v2||[]).push([["716"],{519:function(e,t,r){r.r(t),r.d(t,{DeleteCommentActionModel:function(){return g},EditCommentActionModel:function(){return P},CommentActionGroupModel:function(){return y},QuoteReplyActionModel:function(){return M},CommentActionModel:function(){return p}});var n,o=r(485),u=r(488);function c(e,t,r){return t=l(t),function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,s()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var p=function(e){function t(){return i(this,t),c(this,t,arguments)}return a(t,e),t}(o.ActionModel),y=function(e){function t(){return i(this,t),c(this,t,arguments)}return a(t,e),t}(o.ActionGroupModel);(n="baseClass")in y?Object.defineProperty(y,n,{value:p,enumerable:!0,configurable:!0,writable:!0}):y[n]=p,y.define({label:(0,u.MZ)("Comment action")});var b=r(626);function v(e,t,r,n,o,u,c){try{var i=e[u](c),l=i.value}catch(e){r(e);return}i.done?t(l):Promise.resolve(l).then(n,o)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}var g=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n,o,c,i;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=h(t),o=e=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,m()?Reflect.construct(t,n||[],h(this).constructor):t.apply(this,n)),c="defaultProps",i={type:"link",title:(0,u.MZ)("Delete")},c in o?Object.defineProperty(o,c,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[c]=i,e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&d(r,e),t=[{key:"getAclActionName",value:function(){return"destroy"}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(p);function O(e,t,r,n,o,u,c){try{var i=e[u](c),l=i.value}catch(e){r(e);return}i.done?t(l):Promise.resolve(l).then(n,o)}g.define({label:(0,u.MZ)("Delete"),toggleable:!0}),g.registerFlow({key:"deleteSettings",title:(0,u.MZ)("Delete settings"),on:"click",steps:{confirm:{use:"confirm",defaultParams:{enable:!0,title:(0,u.MZ)("Delete record"),content:(0,u.MZ)("Are you sure you want to delete it?")}},delete:{handler:function(e){var t;return(t=function(){var t;return function(e,t){var r,n,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(c,"next",{value:l(0)}),i(c,"throw",{value:l(1)}),i(c,"return",{value:l(2)}),"function"==typeof Symbol&&i(c,Symbol.iterator,{value:function(){return this}}),c;function l(i){return function(l){var a=[i,l];if(r)throw TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(u=0)),u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:if(r.trys.push([0,3,,4]),!e.resource||!e.record||!e.collection)return e.message.error(e.t("No resource or record selected for deletion")),[2];return[4,e.resource.destroy(e.record[e.collection.filterTargetKey||"id"])];case 1:return r.sent(),[4,e.resource.refresh()];case 2:return r.sent(),e.message.success(e.t("Record deleted successfully")),[3,4];case 3:return t=r.sent(),e.message.error((0,b.u)(t,e.t("Failed to delete comment"))),[3,4];case 4:return[2]}})},function(){var e=this,r=arguments;return new Promise(function(n,o){var u=t.apply(e,r);function c(e){v(u,n,o,c,i,"next",e)}function i(e){v(u,n,o,c,i,"throw",e)}c(void 0)})})()}}}});function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}var P=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n,o,c,i;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=w(t),o=e=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,j()?Reflect.construct(t,n||[],w(this).constructor):t.apply(this,n)),c="defaultProps",i={type:"link",title:(0,u.MZ)("Edit")},c in o?Object.defineProperty(o,c,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[c]=i,e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&_(r,e),t=[{key:"getAclActionName",value:function(){return"update"}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(p);function k(e,t,r,n,o,u,c){try{var i=e[u](c),l=i.value}catch(e){r(e);return}i.done?t(l):Promise.resolve(l).then(n,o)}P.define({label:(0,u.MZ)("Edit"),toggleable:!0}),P.registerFlow({key:"editCommentSettings",on:"click",steps:{edit:{handler:function(e){var t;return(t=function(){return function(e,t){var r,n,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(c,"next",{value:l(0)}),i(c,"throw",{value:l(1)}),i(c,"return",{value:l(2)}),"function"==typeof Symbol&&i(c,Symbol.iterator,{value:function(){return this}}),c;function l(i){return function(l){var a=[i,l];if(r)throw TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(u=0)),u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(t){return e.setEditing(),[2]})},function(){var e=this,r=arguments;return new Promise(function(n,o){var u=t.apply(e,r);function c(e){O(u,n,o,c,i,"next",e)}function i(e){O(u,n,o,c,i,"throw",e)}c(void 0)})})()}}}});function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}var M=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n,o,c,i;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=S(t),o=e=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,x()?Reflect.construct(t,n||[],S(this).constructor):t.apply(this,n)),c="defaultProps",i={type:"link",title:(0,u.MZ)("Quote reply")},c in o?Object.defineProperty(o,c,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[c]=i,e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&E(r,e),t=[{key:"getAclActionName",value:function(){return"create"}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(p);M.define({label:(0,u.MZ)("Quote reply"),toggleable:!0}),M.registerFlow({key:"quoteReplySettings",on:"click",steps:{quoteReply:{handler:function(e){var t;return(t=function(){var t,r,n,o,u;return function(e,t){var r,n,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(c,"next",{value:l(0)}),i(c,"throw",{value:l(1)}),i(c,"return",{value:l(2)}),"function"==typeof Symbol&&i(c,Symbol.iterator,{value:function(){return this}}),c;function l(i){return function(l){var a=[i,l];if(r)throw TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(u=0)),u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(c){return n=e.model.context.blockModel,o=null!=(t=null==(r=e.record)?void 0:r.content)?t:"",u="".concat(o.split("\n").map(function(e){return"> ".concat(e)}).join("\n")),n.context.setQuoteContent(u),[2]})},function(){var e=this,r=arguments;return new Promise(function(n,o){var u=t.apply(e,r);function c(e){k(u,n,o,c,i,"next",e)}function i(e){k(u,n,o,c,i,"throw",e)}c(void 0)})})()}}}})},626:function(e,t,r){r.d(t,{u:function(){return n}});var n=function(e,t){var r,n,o,u,c,i;return e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"?(null==(u=e.response)||null==(o=u.data)||null==(n=o.errors)||null==(r=n[0])?void 0:r.message)||(null==(i=e.response)||null==(c=i.data)?void 0:c.message)||e.message||t:t}}}]);
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-comments/client-v2",["@nocobase/client-v2","react","antd","@ant-design/icons","@nocobase/flow-engine","@nocobase/utils/client"],t):"object"==typeof exports?exports["@nocobase/plugin-comments/client-v2"]=t(require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):e["@nocobase/plugin-comments/client-v2"]=t(e["@nocobase/client-v2"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"])}(self,function(e,t,n,r,o,i){return function(){"use strict";var c,u,a,l={488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return i}});var r=n(694),o="comments";function i(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ns:[o,"client"]},n))}}function c(e){return(0,r.tExpr)(e,{ns:[o,"client"]})}},375:function(e){e.exports=r},485:function(t){t.exports=e},694:function(e){e.exports=o},768:function(e){e.exports=i},59:function(e){e.exports=n},155:function(e){e.exports=t}},s={};function f(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return l[e](n,n.exports,f),n.exports}f.m=l,f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.f={},f.e=function(e){return Promise.all(Object.keys(f.f).reduce(function(t,n){return f.f[n](e,t),t},[]))},f.u=function(e){return""+e+"."+({638:"4c04629a20ad1d31",716:"0fffbfd9f6f60ddd"})[e]+".js"},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p={},f.l=function(e,t,n,r){if(p[e])return void p[e].push(t);if(void 0!==n)for(var o,i,c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var a=c[u];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-comments/client-v2:"+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,f.nc&&o.setAttribute("nonce",f.nc),o.setAttribute("data-rspack","@nocobase/plugin-comments/client-v2:"+n),o.src=e),p[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},f.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.g.importScripts&&(d=f.g.location+"");var p,d,b=f.g.document;if(!d&&b&&(b.currentScript&&"SCRIPT"===b.currentScript.tagName.toUpperCase()&&(d=b.currentScript.src),!d)){var m=b.getElementsByTagName("script");if(m.length)for(var v=m.length-1;v>-1&&(!d||!/^http(s?):/.test(d));)d=m[v--].src}if(!d)throw Error("Automatic publicPath is not supported in this browser");f.p=d.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c={889:0},f.f.j=function(e,t){var n=f.o(c,e)?c[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=c[e]=[t,r]});t.push(n[2]=r);var o=f.p+f.u(e),i=Error();f.l(o,function(t){if(f.o(c,e)&&(0!==(n=c[e])&&(c[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},u=function(e,t){var n,r,o=t[0],i=t[1],u=t[2],a=0;if(o.some(function(e){return 0!==c[e]})){for(n in i)f.o(i,n)&&(f.m[n]=i[n]);u&&u(f)}for(e&&e(t);a<o.length;a++)r=o[a],f.o(c,r)&&c[r]&&c[r][0](),c[r]=0},(a=self.webpackChunk_nocobase_plugin_comments_client_v2=self.webpackChunk_nocobase_plugin_comments_client_v2||[]).forEach(u.bind(null,0)),a.push=u.bind(null,a.push.bind(a));var g={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-comments/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-comments/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var c=window.location.pathname||"/",u=c.indexOf(i);e=u>=0?c.slice(0,u+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-comments/dist/client-v2/"}f.p=e}(),!function(){f.r(g),f.d(g,{PluginCommentClientV2:function(){return a},default:function(){return l}});var e=f(485),t=f(488);function n(e,t,n,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){n(e);return}u.done?t(a):Promise.resolve(a).then(r,o)}function r(e,t,n){return(r=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return r(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,e)})(e)}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var a=function(e){var r;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function c(){var e,t;if(!(this instanceof c))throw TypeError("Cannot call a class as a function");return e=c,t=arguments,e=o(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,u()?Reflect.construct(e,t||[],o(this).constructor):e.apply(this,t))}return c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),e&&i(c,e),r=[{key:"load",value:function(){var e;return(e=function(){var e,n;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(c,"next",{value:a(0)}),u(c,"throw",{value:a(1)}),u(c,"return",{value:a(2)}),"function"==typeof Symbol&&u(c,Symbol.iterator,{value:function(){return this}}),c;function a(u){return function(a){var l=[u,a];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(r){return this.flowEngine.registerModelLoaders({CommentsBlockModel:{loader:function(){return f.e("638").then(f.bind(f,197))}},CommentItemModel:{loader:function(){return f.e("638").then(f.bind(f,197))}},CommentActionGroupModel:{loader:function(){return f.e("716").then(f.bind(f,519))}},EditCommentActionModel:{loader:function(){return f.e("716").then(f.bind(f,519))}},DeleteCommentActionModel:{loader:function(){return f.e("716").then(f.bind(f,519))}},QuoteReplyActionModel:{loader:function(){return f.e("716").then(f.bind(f,519))}}}),null==(n=this.app.pm.get("@nocobase/plugin-data-source-manager")||this.app.pm.get("data-source-manager"))||null==(e=n.registerCollectionTemplate)||e.call(n,{name:"comment",title:(0,t.MZ)("Comment Collection"),order:22,color:"orange",creatable:!1,collection:{options:{template:"comment"},fields:[{name:"content",type:"text",length:"long",interface:"vditor",deletable:!1,uiSchema:{type:"string",title:(0,t.MZ)("Comment Content"),interface:"vditor","x-component":"MarkdownVditor"}}]},presetFields:{disabled:!0}}),[2]})},function(){var t=this,r=arguments;return new Promise(function(o,i){var c=e.apply(t,r);function u(e){n(c,o,i,u,a,"next",e)}function a(e){n(c,o,i,u,a,"throw",e)}u(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,r),c}(c(e.Plugin)),l=a}(),g}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-comments/client-v2",["@nocobase/client-v2","react","antd","@ant-design/icons","@nocobase/flow-engine","@nocobase/utils/client"],t):"object"==typeof exports?exports["@nocobase/plugin-comments/client-v2"]=t(require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):e["@nocobase/plugin-comments/client-v2"]=t(e["@nocobase/client-v2"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"])}(self,function(e,t,n,r,o,i){return function(){"use strict";var c,u,a,l={488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return i}});var r=n(694),o="comments";function i(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ns:[o,"client"]},n))}}function c(e){return(0,r.tExpr)(e,{ns:[o,"client"]})}},375:function(e){e.exports=r},485:function(t){t.exports=e},694:function(e){e.exports=o},768:function(e){e.exports=i},59:function(e){e.exports=n},155:function(e){e.exports=t}},s={};function f(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return l[e](n,n.exports,f),n.exports}f.m=l,f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.f={},f.e=function(e){return Promise.all(Object.keys(f.f).reduce(function(t,n){return f.f[n](e,t),t},[]))},f.u=function(e){return""+e+"."+({638:"4c04629a20ad1d31",716:"336993dc0f899d20"})[e]+".js"},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p={},f.l=function(e,t,n,r){if(p[e])return void p[e].push(t);if(void 0!==n)for(var o,i,c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var a=c[u];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-comments/client-v2:"+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,f.nc&&o.setAttribute("nonce",f.nc),o.setAttribute("data-rspack","@nocobase/plugin-comments/client-v2:"+n),o.src=e),p[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},f.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.g.importScripts&&(d=f.g.location+"");var p,d,b=f.g.document;if(!d&&b&&(b.currentScript&&"SCRIPT"===b.currentScript.tagName.toUpperCase()&&(d=b.currentScript.src),!d)){var m=b.getElementsByTagName("script");if(m.length)for(var v=m.length-1;v>-1&&(!d||!/^http(s?):/.test(d));)d=m[v--].src}if(!d)throw Error("Automatic publicPath is not supported in this browser");f.p=d.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c={889:0},f.f.j=function(e,t){var n=f.o(c,e)?c[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=c[e]=[t,r]});t.push(n[2]=r);var o=f.p+f.u(e),i=Error();f.l(o,function(t){if(f.o(c,e)&&(0!==(n=c[e])&&(c[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},u=function(e,t){var n,r,o=t[0],i=t[1],u=t[2],a=0;if(o.some(function(e){return 0!==c[e]})){for(n in i)f.o(i,n)&&(f.m[n]=i[n]);u&&u(f)}for(e&&e(t);a<o.length;a++)r=o[a],f.o(c,r)&&c[r]&&c[r][0](),c[r]=0},(a=self.webpackChunk_nocobase_plugin_comments_client_v2=self.webpackChunk_nocobase_plugin_comments_client_v2||[]).forEach(u.bind(null,0)),a.push=u.bind(null,a.push.bind(a));var g={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-comments/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-comments/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var c=window.location.pathname||"/",u=c.indexOf(i);e=u>=0?c.slice(0,u+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-comments/dist/client-v2/"}f.p=e}(),!function(){f.r(g),f.d(g,{PluginCommentClientV2:function(){return a},default:function(){return l}});var e=f(485),t=f(488);function n(e,t,n,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){n(e);return}u.done?t(a):Promise.resolve(a).then(r,o)}function r(e,t,n){return(r=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return r(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,e)})(e)}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var a=function(e){var r;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function c(){var e,t;if(!(this instanceof c))throw TypeError("Cannot call a class as a function");return e=c,t=arguments,e=o(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,u()?Reflect.construct(e,t||[],o(this).constructor):e.apply(this,t))}return c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),e&&i(c,e),r=[{key:"load",value:function(){var e;return(e=function(){var e,n;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(c,"next",{value:a(0)}),u(c,"throw",{value:a(1)}),u(c,"return",{value:a(2)}),"function"==typeof Symbol&&u(c,Symbol.iterator,{value:function(){return this}}),c;function a(u){return function(a){var l=[u,a];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(r){return this.flowEngine.registerModelLoaders({CommentsBlockModel:{loader:function(){return f.e("638").then(f.bind(f,197))}},CommentItemModel:{loader:function(){return f.e("638").then(f.bind(f,197))}},CommentActionGroupModel:{loader:function(){return f.e("716").then(f.bind(f,519))}},EditCommentActionModel:{loader:function(){return f.e("716").then(f.bind(f,519))}},DeleteCommentActionModel:{loader:function(){return f.e("716").then(f.bind(f,519))}},QuoteReplyActionModel:{loader:function(){return f.e("716").then(f.bind(f,519))}}}),null==(n=this.app.pm.get("@nocobase/plugin-data-source-manager")||this.app.pm.get("data-source-manager"))||null==(e=n.registerCollectionTemplate)||e.call(n,{name:"comment",title:(0,t.MZ)("Comment Collection"),order:22,color:"orange",creatable:!1,collection:{options:{template:"comment"},fields:[{name:"content",type:"text",length:"long",interface:"vditor",deletable:!1,uiSchema:{type:"string",title:(0,t.MZ)("Comment Content"),interface:"vditor","x-component":"MarkdownVditor"}}]},presetFields:{disabled:!0}}),[2]})},function(){var t=this,r=arguments;return new Promise(function(o,i){var c=e.apply(t,r);function u(e){n(c,o,i,u,a,"next",e)}function a(e){n(c,o,i,u,a,"throw",e)}u(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,r),c}(c(e.Plugin)),l=a}(),g}()});
@@ -9,7 +9,6 @@
9
9
  import type { ButtonProps } from 'antd/es/button';
10
10
  import { CommentActionModel } from './CommentActionGroupModel';
11
11
  export declare class DeleteCommentActionModel extends CommentActionModel {
12
- static scene: import("@nocobase/client-v2").ActionSceneType;
13
12
  defaultProps: ButtonProps;
14
13
  getAclActionName(): string;
15
14
  }
@@ -9,7 +9,6 @@
9
9
  import type { ButtonProps } from 'antd/es/button';
10
10
  import { CommentActionModel } from './CommentActionGroupModel';
11
11
  export declare class EditCommentActionModel extends CommentActionModel {
12
- static scene: import("@nocobase/client-v2").ActionSceneType;
13
12
  defaultProps: ButtonProps;
14
13
  getAclActionName(): string;
15
14
  }
@@ -9,7 +9,6 @@
9
9
  import type { ButtonProps } from 'antd/es/button';
10
10
  import { CommentActionModel } from './CommentActionGroupModel';
11
11
  export declare class QuoteReplyActionModel extends CommentActionModel {
12
- static scene: import("@nocobase/client-v2").ActionSceneType;
13
12
  defaultProps: ButtonProps;
14
13
  getAclActionName(): string;
15
14
  }
@@ -8,18 +8,18 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.3.0-beta.10",
11
+ "@nocobase/client": "2.3.0-beta.11",
12
12
  "react": "18.2.0",
13
- "@nocobase/flow-engine": "2.3.0-beta.10",
14
- "@nocobase/client-v2": "2.3.0-beta.10",
15
- "@nocobase/plugin-data-source-manager": "2.3.0-beta.10",
16
- "@nocobase/server": "2.3.0-beta.10",
13
+ "@nocobase/flow-engine": "2.3.0-beta.11",
14
+ "@nocobase/client-v2": "2.3.0-beta.11",
15
+ "@nocobase/plugin-data-source-manager": "2.3.0-beta.11",
16
+ "@nocobase/server": "2.3.0-beta.11",
17
17
  "@formily/core": "2.3.7",
18
18
  "@formily/react": "2.3.7",
19
19
  "antd": "5.24.2",
20
20
  "dayjs": "1.11.13",
21
21
  "lodash": "4.18.1",
22
- "@nocobase/utils": "2.3.0-beta.10",
22
+ "@nocobase/utils": "2.3.0-beta.11",
23
23
  "react-i18next": "11.18.6",
24
24
  "@ant-design/icons": "5.6.1",
25
25
  "@formily/reactive-react": "2.3.7"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-comments",
3
- "version": "2.3.0-beta.10",
3
+ "version": "2.3.0-beta.11",
4
4
  "displayName": "Comments",
5
5
  "displayName.zh-CN": "评论",
6
6
  "description": "Provides comment collection template and block to add commenting functionality for any collection.",
@@ -31,5 +31,5 @@
31
31
  "@nocobase/server": "2.x",
32
32
  "@nocobase/test": "2.x"
33
33
  },
34
- "gitHead": "7aa3dce6cf3201752882f7012c72997898015d89"
34
+ "gitHead": "e81c2c69d55f13e4d237c420a51ebad1e9dae515"
35
35
  }
@@ -1,10 +0,0 @@
1
- /**
2
- * This file is part of the NocoBase (R) project.
3
- * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
- * Authors: NocoBase Team.
5
- *
6
- * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
- * For more information, please refer to: https://www.nocobase.com/agreement.
8
- */
9
-
10
- "use strict";(self.webpackChunk_nocobase_plugin_comments_client_v2=self.webpackChunk_nocobase_plugin_comments_client_v2||[]).push([["716"],{519:function(e,t,r){r.r(t),r.d(t,{DeleteCommentActionModel:function(){return O},EditCommentActionModel:function(){return S},CommentActionGroupModel:function(){return y},QuoteReplyActionModel:function(){return C},CommentActionModel:function(){return p}});var n,o=r(485),u=r(488);function c(e,t,r){return t=l(t),function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,s()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var p=function(e){function t(){return i(this,t),c(this,t,arguments)}return a(t,e),t}(o.ActionModel),y=function(e){function t(){return i(this,t),c(this,t,arguments)}return a(t,e),t}(o.ActionGroupModel);(n="baseClass")in y?Object.defineProperty(y,n,{value:p,enumerable:!0,configurable:!0,writable:!0}):y[n]=p,y.define({label:(0,u.MZ)("Comment action")});var b=r(626);function v(e,t,r,n,o,u,c){try{var i=e[u](c),l=i.value}catch(e){r(e);return}i.done?t(l):Promise.resolve(l).then(n,o)}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}var O=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=d(t),h(e=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,g()?Reflect.construct(t,n||[],d(this).constructor):t.apply(this,n)),"defaultProps",{type:"link",title:(0,u.MZ)("Delete")}),e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&m(r,e),t=[{key:"getAclActionName",value:function(){return"destroy"}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(p);function w(e,t,r,n,o,u,c){try{var i=e[u](c),l=i.value}catch(e){r(e);return}i.done?t(l):Promise.resolve(l).then(n,o)}h(O,"scene",o.ActionSceneEnum.record),O.define({label:(0,u.MZ)("Delete"),toggleable:!0}),O.registerFlow({key:"deleteSettings",title:(0,u.MZ)("Delete settings"),on:"click",steps:{confirm:{use:"confirm",defaultParams:{enable:!0,title:(0,u.MZ)("Delete record"),content:(0,u.MZ)("Are you sure you want to delete it?")}},delete:{handler:function(e){var t;return(t=function(){var t;return function(e,t){var r,n,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(c,"next",{value:l(0)}),i(c,"throw",{value:l(1)}),i(c,"return",{value:l(2)}),"function"==typeof Symbol&&i(c,Symbol.iterator,{value:function(){return this}}),c;function l(i){return function(l){var a=[i,l];if(r)throw TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(u=0)),u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:if(r.trys.push([0,3,,4]),!e.resource||!e.record||!e.collection)return e.message.error(e.t("No resource or record selected for deletion")),[2];return[4,e.resource.destroy(e.record[e.collection.filterTargetKey||"id"])];case 1:return r.sent(),[4,e.resource.refresh()];case 2:return r.sent(),e.message.success(e.t("Record deleted successfully")),[3,4];case 3:return t=r.sent(),e.message.error((0,b.u)(t,e.t("Failed to delete comment"))),[3,4];case 4:return[2]}})},function(){var e=this,r=arguments;return new Promise(function(n,o){var u=t.apply(e,r);function c(e){v(u,n,o,c,i,"next",e)}function i(e){v(u,n,o,c,i,"throw",e)}c(void 0)})})()}}}});function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}var S=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=j(t),_(e=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,k()?Reflect.construct(t,n||[],j(this).constructor):t.apply(this,n)),"defaultProps",{type:"link",title:(0,u.MZ)("Edit")}),e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&P(r,e),t=[{key:"getAclActionName",value:function(){return"update"}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(p);function E(e,t,r,n,o,u,c){try{var i=e[u](c),l=i.value}catch(e){r(e);return}i.done?t(l):Promise.resolve(l).then(n,o)}_(S,"scene",o.ActionSceneEnum.record),S.define({label:(0,u.MZ)("Edit"),toggleable:!0}),S.registerFlow({key:"editCommentSettings",on:"click",steps:{edit:{handler:function(e){var t;return(t=function(){return function(e,t){var r,n,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(c,"next",{value:l(0)}),i(c,"throw",{value:l(1)}),i(c,"return",{value:l(2)}),"function"==typeof Symbol&&i(c,Symbol.iterator,{value:function(){return this}}),c;function l(i){return function(l){var a=[i,l];if(r)throw TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(u=0)),u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(t){return e.setEditing(),[2]})},function(){var e=this,r=arguments;return new Promise(function(n,o){var u=t.apply(e,r);function c(e){w(u,n,o,c,i,"next",e)}function i(e){w(u,n,o,c,i,"throw",e)}c(void 0)})})()}}}});function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(R=function(){return!!e})()}var C=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=M(t),x(e=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,R()?Reflect.construct(t,n||[],M(this).constructor):t.apply(this,n)),"defaultProps",{type:"link",title:(0,u.MZ)("Quote reply")}),e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&A(r,e),t=[{key:"getAclActionName",value:function(){return"create"}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(p);x(C,"scene",o.ActionSceneEnum.record),C.define({label:(0,u.MZ)("Quote reply"),toggleable:!0}),C.registerFlow({key:"quoteReplySettings",on:"click",steps:{quoteReply:{handler:function(e){var t;return(t=function(){var t,r,n,o,u;return function(e,t){var r,n,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(c,"next",{value:l(0)}),i(c,"throw",{value:l(1)}),i(c,"return",{value:l(2)}),"function"==typeof Symbol&&i(c,Symbol.iterator,{value:function(){return this}}),c;function l(i){return function(l){var a=[i,l];if(r)throw TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(u=0)),u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(c){return n=e.model.context.blockModel,o=null!=(t=null==(r=e.record)?void 0:r.content)?t:"",u="".concat(o.split("\n").map(function(e){return"> ".concat(e)}).join("\n")),n.context.setQuoteContent(u),[2]})},function(){var e=this,r=arguments;return new Promise(function(n,o){var u=t.apply(e,r);function c(e){E(u,n,o,c,i,"next",e)}function i(e){E(u,n,o,c,i,"throw",e)}c(void 0)})})()}}}})},626:function(e,t,r){r.d(t,{u:function(){return n}});var n=function(e,t){var r,n,o,u,c,i;return e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"?(null==(u=e.response)||null==(o=u.data)||null==(n=o.errors)||null==(r=n[0])?void 0:r.message)||(null==(i=e.response)||null==(c=i.data)?void 0:c.message)||e.message||t:t}}}]);