@nocobase/plugin-notification-manager 2.1.0-beta.38 → 2.1.0-beta.41

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.
Files changed (37) hide show
  1. package/client-v2.d.ts +2 -0
  2. package/client-v2.js +1 -0
  3. package/dist/client-v2/49.56695f2f5a36e028.js +10 -0
  4. package/dist/client-v2/852.119208b49538bcfc.js +10 -0
  5. package/dist/client-v2/components/ContentConfigForm.d.ts +14 -0
  6. package/dist/client-v2/components/MessageConfigForm.d.ts +12 -0
  7. package/dist/client-v2/components/User/UserAddition.d.ts +16 -0
  8. package/dist/client-v2/components/User/UserSelect.d.ts +16 -0
  9. package/dist/client-v2/components/User/index.d.ts +12 -0
  10. package/dist/client-v2/index.d.ts +15 -0
  11. package/dist/client-v2/index.js +10 -0
  12. package/dist/client-v2/locale.d.ts +12 -0
  13. package/dist/client-v2/notification-manager.d.ts +36 -0
  14. package/dist/client-v2/pages/ChannelsPage.d.ts +10 -0
  15. package/dist/client-v2/pages/LogsPage.d.ts +10 -0
  16. package/dist/client-v2/plugin.d.ts +19 -0
  17. package/dist/client-v2/utils/notificationTypeOptions.d.ts +34 -0
  18. package/dist/externalVersion.js +14 -10
  19. package/dist/locale/de-DE.json +1 -0
  20. package/dist/locale/en-US.json +1 -0
  21. package/dist/locale/es-ES.json +1 -0
  22. package/dist/locale/fr-FR.json +1 -0
  23. package/dist/locale/hu-HU.json +1 -0
  24. package/dist/locale/id-ID.json +1 -0
  25. package/dist/locale/it-IT.json +1 -0
  26. package/dist/locale/ja-JP.json +1 -0
  27. package/dist/locale/ko-KR.json +1 -0
  28. package/dist/locale/nl-NL.json +1 -0
  29. package/dist/locale/pt-BR.json +1 -0
  30. package/dist/locale/ru-RU.json +1 -0
  31. package/dist/locale/tr-TR.json +1 -0
  32. package/dist/locale/uk-UA.json +1 -0
  33. package/dist/locale/vi-VN.json +1 -0
  34. package/dist/locale/zh-CN.json +1 -0
  35. package/dist/locale/zh-TW.json +1 -0
  36. package/dist/node_modules/uuid/package.json +1 -1
  37. package/package.json +3 -2
package/client-v2.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/client-v2';
2
+ export { default } from './dist/client-v2';
package/client-v2.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/client-v2/index.js');
@@ -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_notification_manager_client_v2=self.webpackChunk_nocobase_plugin_notification_manager_client_v2||[]).push([["49"],{624:function(e,t,n){n.r(t),n.d(t,{default:function(){return j}});var r=n(375),o=n(485),i=n(694),a=n(625),l=n(59),u=n(773),c=n(155),s=n.n(c),f=n(553),m={name:f.L.channels,migrationRules:["overwrite","schema-only"],filterTargetKey:"name",autoGenId:!1,createdAt:!0,createdBy:!0,updatedAt:!0,updatedBy:!0,fields:[{name:"name",type:"uid",prefix:"s_",primaryKey:!0,interface:"input",uiSchema:{type:"string",title:'{{t("Channel name")}}',"x-component":"Input",required:!0,description:"{{t('Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.')}}"}},{name:"title",type:"string",interface:"input",uiSchema:{type:"string","x-component":"Input",title:'{{t("Channel display name")}}',required:!0}},{name:"options",type:"json",interface:"json",uiSchema:{type:"object","x-component":"ConfigForm"}},{name:"meta",type:"json",interface:"json"},{interface:"input",type:"string",name:"notificationType",uiSchema:{type:"string",title:'{{t("Notification type")}}',"x-component":"Select",enum:"{{notificationTypeOptions}}",required:!0}},{name:"description",type:"text",interface:"textarea",uiSchema:{type:"string","x-component":"Input.TextArea",title:'{{t("Description")}}'}}]},p=n(488),d=n(667),y=n(705);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,l,"next",e)}function l(e){h(i,r,o,a,l,"throw",e)}a(void 0)})}}function v(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}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function O(e){var t,n=(0,p.yr)().t,r=(0,i.useFlowContext)(),m=(0,c.useMemo)(function(){return r.api.resource(f.L.channels)},[r.api]),d=E(l.Form.useForm(),1)[0],y=E((0,c.useState)(!1),2),b=y[0],h=y[1],O=(0,c.useMemo)(function(){return"edit"===e.mode?(0,u.cloneDeep)(e.record||{}):{name:(0,i.randomId)("s_"),notificationType:e.notificationType,options:{}}},[e.mode,e.notificationType,e.record]);(0,c.useEffect)(function(){d.setFieldsValue(O)},[d,O]);var S=e.plugin.channelTypes.get(e.notificationType),j=null==S||null==(t=S.components)?void 0:t.ChannelConfigFormLoader,T=(0,c.useMemo)(function(){return j?(0,c.lazy)(j):null},[j]),A=(0,a.useMemoizedFn)(function(){return g(function(){var t,n,r;return w(this,function(o){switch(o.label){case 0:return[4,d.validateFields()];case 1:t=o.sent(),h(!0),o.label=2;case 2:if(o.trys.push([2,,8,9]),"create"!==e.mode)return[3,4];return[4,m.create({values:t})];case 3:case 5:return o.sent(),e.onSubmitted(),[3,7];case 4:var i,a;if((null==(n=e.record)?void 0:n.name)==null)return[3,6];return i=v({},(0,u.cloneDeep)(e.record),t),a=a={options:v({},e.record.options||{},t.options||{})},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(a)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))}),r=i,[4,m.update({filterByTk:e.record.name,values:r})];case 6:throw Error("Edit mode requires record.name; got ".concat(JSON.stringify(e.record)));case 7:return[3,9];case 8:return h(!1),[7];case 9:return[2]}})})()});return s().createElement(o.DrawerFormLayout,{title:n("create"===e.mode?"Add new":"Edit"),onSubmit:A,submitting:b,submitText:n("Submit"),cancelText:n("Cancel")},s().createElement(l.Form,{form:d,layout:"vertical",initialValues:O},s().createElement(l.Form.Item,{name:"name",label:n("Channel name"),extra:n("Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter."),rules:[{required:!0,message:n("The field value is required")}]},s().createElement(l.Input,{disabled:!0})),s().createElement(l.Form.Item,{name:"title",label:n("Channel display name"),rules:[{required:!0,message:n("The field value is required")}]},s().createElement(l.Input,null)),s().createElement(l.Form.Item,{name:"description",label:n("Description")},s().createElement(l.Input.TextArea,{autoSize:{minRows:2}})),s().createElement(l.Form.Item,{name:"notificationType",hidden:!0},s().createElement(l.Input,null)),T?s().createElement(c.Suspense,{fallback:s().createElement(l.Spin,null)},s().createElement(T,null)):null))}function S(){var e,t,n=(0,p.yr)().t,u=(0,p.kj)(),m=(0,i.useFlowContext)(),y=(0,i.useFlowEngine)(),b=l.theme.useToken().token,h=l.App.useApp(),S=h.modal,j=h.message,T=(0,c.useMemo)(function(){return m.api.resource(f.L.channels)},[m.api]),A=m.app.pm.get(d.A),k=(0,c.useMemo)(function(){var e,t,n,r;return null==(r=y.context.dataSourceManager)||null==(n=r.getDataSource)||null==(t=n.call(r,"main"))||null==(e=t.getCollection)?void 0:e.call(t,f.L.channels)},[y]),C=E((0,c.useState)(1),2),P=C[0],x=C[1],I=E((0,c.useState)(o.DEFAULT_PAGE_SIZE),2),F=I[0],D=I[1],_=E((0,c.useState)([]),2),M=_[0],z=_[1],q=E((0,c.useState)(void 0),2),N=q[0],R=q[1],B=(0,a.useRequest)(function(){return g(function(){return w(this,function(e){switch(e.label){case 0:return[4,T.list(v({page:P,pageSize:F,sort:["createdAt"]},N?{filter:N}:{}))];case 1:var t,n,r,o,i;return[2,{records:o=Array.isArray(r=null==(n=null==(t=e.sent())?void 0:t.data)?void 0:n.data)?r:Array.isArray(null==r?void 0:r.data)?r.data:[],total:(i=(null==n?void 0:n.meta)||(null==r?void 0:r.meta)||{}).count||i.total||o.length}]}})})()},{refreshDeps:[P,F,N]}),L=B.data,G=B.loading,K=B.refresh,U=(0,a.useMemoizedFn)(function(e,t){if(t!==F){D(t),x(1);return}x(e)}),V=(0,c.useMemo)(function(){return A?Array.from(A.channelTypes.getEntities()).map(function(e){return E(e,2)[1]}):[]},[A]),$=(0,a.useMemoizedFn)(function(e){if(!e)return"";var t=V.find(function(t){return t.type===e});return u((null==t?void 0:t.title)||e)}),J=(0,a.useMemoizedFn)(function(e,t,n){m.viewer.drawer({width:"50%",closable:!0,content:function(){return s().createElement(O,{mode:e,notificationType:t,plugin:A,record:n,onSubmitted:function(){return K()}})}})}),Z=(0,a.useMemoizedFn)(function(e){S.confirm({title:n("Delete"),content:n("Are you sure you want to delete it?"),onOk:function(){return g(function(){return w(this,function(t){switch(t.label){case 0:return[4,T.destroy({filterByTk:e})];case 1:return t.sent(),z([]),K(),[2]}})})()}})}),H=(null==(t=m.api)||null==(e=t.auth)?void 0:e.locale)==="zh-CN"?"https://docs-cn.nocobase.com/handbook/notification-manager":"https://docs.nocobase.com/handbook/notification-manager",Q=(0,c.useMemo)(function(){return V.filter(function(e){var t;return(null==(t=e.meta)?void 0:t.creatable)!==!1})},[V]),W=(0,c.useMemo)(function(){return 0===Q.length?{items:[{key:"__empty__",label:s().createElement(l.Empty,{image:l.Empty.PRESENTED_IMAGE_SIMPLE,description:s().createElement(s().Fragment,null,n("No channel enabled yet"),s().createElement("br",null),s().createElement("a",{target:"_blank",href:H,rel:"noreferrer"},n("View documentation")))})}]}:{items:Q.map(function(e){return{key:e.type,label:u(e.title),onClick:function(){return J("create",e.type)}}})}},[Q,u,H,J,n]),X=(0,c.useMemo)(function(){return[{title:n("Channel display name"),dataIndex:"title",ellipsis:!0,render:function(e){return e?u(e):""}},{title:n("Channel name"),dataIndex:"name",ellipsis:!0},{title:n("Description"),dataIndex:"description",ellipsis:!0,render:function(e){return e?u(e):""}},{title:n("Notification type"),dataIndex:"notificationType",render:function(e){return e?s().createElement(l.Tag,null,$(e)):null}},{title:n("Actions"),width:160,render:function(e,t){var r,o;return s().createElement(l.Space,null,(null==(r=t.meta)?void 0:r.editable)===!1?null:s().createElement("a",{onClick:function(){if(t.notificationType){if(!(null==A?void 0:A.channelTypes.get(t.notificationType)))return void j.error(n("Notification type {{type}} is not registered.").replace("{{type}}",t.notificationType));J("edit",t.notificationType,t)}}},n("Edit")),(null==(o=t.meta)?void 0:o.deletable)===!1?null:s().createElement("a",{onClick:function(){return Z(t.name)}},n("Delete")))}}]},[$,u,Z,j,J,A,n]);return s().createElement(l.Card,{variant:"borderless"},s().createElement(l.Flex,{justify:"space-between",style:{marginBottom:b.margin}},s().createElement(o.CollectionFilter,{collection:k,onChange:R,t:u}),s().createElement(l.Space,null,s().createElement(l.Button,{icon:s().createElement(r.ReloadOutlined,null),onClick:function(){return K()}},n("Refresh")),s().createElement(l.Button,{icon:s().createElement(r.DeleteOutlined,null),disabled:!M.length,onClick:function(){return Z(M)}},n("Delete")),s().createElement(l.Dropdown,{menu:W},s().createElement(l.Button,{type:"primary",icon:s().createElement(r.PlusOutlined,null)},n("Add new")," ",s().createElement(r.DownOutlined,null))))),s().createElement(o.Table,{rowKey:"name",loading:G,columns:X,dataSource:(null==L?void 0:L.records)||[],rowSelection:{selectedRowKeys:M,onChange:z},pagination:{current:P,pageSize:F,total:(null==L?void 0:L.total)||0,onChange:U}}))}function j(){var e=(0,i.useFlowContext)(),t=(0,p.kj)(),n=e.app.pm.get(d.A),r=(0,c.useMemo)(function(){var e=(0,y.k)(n,t);return[(0,y.N)(m,e)]},[n,t]);return s().createElement(o.ExtendCollectionsProvider,{collections:r},s().createElement(S,null))}},705:function(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(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}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function a(e,t){return e?Array.from(e.channelTypes.getEntities()).map(function(e){var n=(function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return r(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return{label:t(n.title),value:n.type}}):[]}function l(e,t){return i(o({},e),{fields:e.fields.map(function(e){return(null==e?void 0:e.name)==="notificationType"&&e.uiSchema?i(o({},e),{uiSchema:i(o({},e.uiSchema),{enum:t})}):e})})}n.d(t,{N:function(){return l},k:function(){return a}})}}]);
@@ -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_notification_manager_client_v2=self.webpackChunk_nocobase_plugin_notification_manager_client_v2||[]).push([["852"],{487:function(e,t,n){n.r(t),n.d(t,{default:function(){return O}});var r=n(375),a=n(485),l=n(694),o=n(625),i=n(59),u=n(185),c=n.n(u),s=n(155),p=n.n(s),m=n(553),f={name:m.L.logs,migrationRules:["schema-only"],title:"MessageLogs",fields:[{name:"id",type:"uuid",primaryKey:!0,allowNull:!1,interface:"uuid",uiSchema:{type:"string",title:'{{t("ID")}}',"x-component":"Input","x-read-pretty":!0}},{name:"channelName",type:"string",interface:"input",uiSchema:{type:"string",title:'{{t("Channel name")}}',"x-component":"Input"}},{name:"channelTitle",type:"string",interface:"input",uiSchema:{type:"string","x-component":"Input",title:'{{t("Channel display name")}}'}},{name:"triggerFrom",type:"string",interface:"input",uiSchema:{type:"string","x-component":"Input",title:'{{t("Trigger from")}}'}},{name:"notificationType",type:"string",interface:"input",uiSchema:{type:"string",title:'{{t("Notification type")}}',"x-component":"Select",enum:"{{notificationTypeOptions}}",required:!0}},{name:"status",type:"string",interface:"select",uiSchema:{type:"string","x-component":"Select",enum:[{label:'{{t("Success")}}',value:"success",color:"green"},{label:'{{t("Failure")}}',value:"failure",color:"red"}],title:'{{t("Status")}}'}},{name:"message",type:"json",interface:"json",uiSchema:{"x-component":"Input.JSON",title:'{{t("Message")}}',"x-component-props":{autoSize:{minRows:5}},autoSize:{minRows:5}}},{name:"reason",type:"text",interface:"input",uiSchema:{type:"string","x-component":"Input",title:'{{t("Failed reason")}}'}},{name:"createdAt",type:"date",interface:"createdAt",field:"createdAt",uiSchema:{type:"datetime",title:'{{t("Created at")}}',"x-component":"DatePicker","x-component-props":{},"x-read-pretty":!0}},{name:"updatedAt",type:"date",interface:"updatedAt",field:"updatedAt",uiSchema:{type:"datetime",title:'{{t("Last updated at")}}',"x-component":"DatePicker","x-component-props":{},"x-read-pretty":!0}}]},y=n(488),d=n(667),g=n(705);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n,r,a,l,o){try{var i=e[l](o),u=i.value}catch(e){n(e);return}i.done?t(u):Promise.resolve(u).then(r,a)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var l=[],o=!0,i=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(l.push(n.value),!t||l.length!==t);o=!0);}catch(e){i=!0,r=e}finally{try{o||null==a.return||a.return()}finally{if(i)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var S=["receiver","reason"];function w(e){if(!e)return"";var t=c()(e);return t.isValid()?t.format("YYYY-MM-DD HH:mm:ss"):e}function E(e){var t,n=e.record,r=(0,y.yr)().t,o=(0,y.kj)(),u=(0,l.useFlowContext)().app.pm.get(d.A),c="failure"===n.status,s=n.notificationType?o((null==u||null==(t=u.channelTypes.get(n.notificationType))?void 0:t.title)||n.notificationType):"";return p().createElement(a.DrawerFormLayout,{title:r("Log detail"),footer:p().createElement(p().Fragment,null)},p().createElement(i.Form,{layout:"vertical"},p().createElement(i.Form.Item,{label:r("ID")},p().createElement(i.Input,{value:n.id,disabled:!0})),p().createElement(i.Form.Item,{label:r("Channel name")},p().createElement(i.Typography.Text,null,n.channelName)),p().createElement(i.Form.Item,{label:r("Channel display name")},p().createElement(i.Typography.Text,null,o(n.channelTitle||""))),p().createElement(i.Form.Item,{label:r("Notification type")},n.notificationType?p().createElement(i.Tag,null,s):null),p().createElement(i.Form.Item,{label:r("Trigger from")},p().createElement(i.Typography.Text,null,n.triggerFrom)),p().createElement(i.Form.Item,{label:r("Status")},"success"===n.status?p().createElement(i.Tag,{color:"green"},r("Success")):"failure"===n.status?p().createElement(i.Tag,{color:"red"},r("Failure")):null),p().createElement(i.Form.Item,{label:r("Message")},p().createElement(i.Typography.Text,null,p().createElement("pre",{style:{margin:0,fontFamily:"inherit",whiteSpace:"pre-wrap",wordBreak:"break-word"}},function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e,null,2)}catch(t){return String(e)}}(n.message)))),c?p().createElement(i.Form.Item,{label:r("Failed reason")},p().createElement(i.Typography.Text,null,n.reason)):null,p().createElement(i.Form.Item,{label:r("Created at")},p().createElement(i.Typography.Text,null,w(n.createdAt)))))}function x(){var e=(0,y.yr)().t,t=(0,y.kj)(),n=(0,l.useFlowContext)(),u=(0,l.useFlowEngine)(),c=i.theme.useToken().token,f=(0,s.useMemo)(function(){return n.api.resource(m.L.logs)},[n.api]),g=n.app.pm.get(d.A),h=(0,s.useMemo)(function(){var e,t,n,r;return null==(r=u.context.dataSourceManager)||null==(n=r.getDataSource)||null==(t=n.call(r,"main"))||null==(e=t.getCollection)?void 0:e.call(t,m.L.logs)},[u]),x=v((0,s.useState)(1),2),O=x[0],T=x[1],j=v((0,s.useState)(a.DEFAULT_PAGE_SIZE),2),I=j[0],F=j[1],A=v((0,s.useState)(void 0),2),k=A[0],C=A[1],P=(0,o.useRequest)(function(){var e;return(e=function(){return function(e,t){var n,r,a,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(o,"next",{value:u(0)}),i(o,"throw",{value:u(1)}),i(o,"return",{value:u(2)}),"function"==typeof Symbol&&i(o,Symbol.iterator,{value:function(){return this}}),o;function u(i){return function(u){var c=[i,u];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(l=0)),l;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(a=(a=l.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){l=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){l.label=c[1];break}if(6===c[0]&&l.label<a[1]){l.label=a[1],a=c;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(c);break}a[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,f.list(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}({page:O,pageSize:I,sort:["-createdAt"]},k?{filter:k}:{}))];case 1:var t,n,r,a,l;return[2,{records:a=Array.isArray(r=null==(n=null==(t=e.sent())?void 0:t.data)?void 0:n.data)?r:Array.isArray(null==r?void 0:r.data)?r.data:[],total:(l=(null==n?void 0:n.meta)||(null==r?void 0:r.meta)||{}).count||l.total||a.length}]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var l=e.apply(t,n);function o(e){b(l,r,a,o,i,"next",e)}function i(e){b(l,r,a,o,i,"throw",e)}o(void 0)})})()},{refreshDeps:[O,I,k]}),D=P.data,M=P.loading,_=P.refresh,N=(0,o.useMemoizedFn)(function(e,t){if(t!==I){F(t),T(1);return}T(e)}),L=(0,o.useMemoizedFn)(function(e){n.viewer.drawer({width:"50%",closable:!0,content:function(){return p().createElement(E,{record:e})}})}),z=(0,o.useMemoizedFn)(function(e){if(!e)return"";var n=null==g?void 0:g.channelTypes.get(e);return t((null==n?void 0:n.title)||e)}),R=(0,s.useMemo)(function(){return[{title:e("Created at"),dataIndex:"createdAt",width:180,render:function(e){return w(e)}},{title:e("Trigger from"),dataIndex:"triggerFrom",ellipsis:!0,width:160},{title:e("Channel display name"),dataIndex:"channelTitle",ellipsis:!0,width:200,render:function(e){return e?t(e):""}},{title:e("Notification type"),dataIndex:"notificationType",render:function(e){return e?p().createElement(i.Tag,null,z(e)):null}},{title:e("Status"),dataIndex:"status",width:100,render:function(t){return"success"===t?p().createElement(i.Tag,{color:"green"},e("Success")):"failure"===t?p().createElement(i.Tag,{color:"red"},e("Failure")):null}},{title:e("Failed reason"),dataIndex:"reason",ellipsis:!0,width:200},{title:e("Actions"),width:100,render:function(t,n){return p().createElement(i.Space,null,p().createElement("a",{onClick:function(){return L(n)}},e("View")))}}]},[z,t,L,e]);return p().createElement(i.Card,{variant:"borderless"},p().createElement(i.Flex,{justify:"space-between",style:{marginBottom:c.margin}},p().createElement(a.CollectionFilter,{collection:h,nonfilterableFieldNames:S,onChange:C,t:t}),p().createElement(i.Space,null,p().createElement(i.Button,{icon:p().createElement(r.ReloadOutlined,null),onClick:function(){return _()}},e("Refresh")))),p().createElement(a.Table,{rowKey:"id",loading:M,columns:R,dataSource:(null==D?void 0:D.records)||[],showIndex:!1,pagination:{current:O,pageSize:I,total:(null==D?void 0:D.total)||0,onChange:N}}))}function O(){var e=(0,l.useFlowContext)(),t=(0,y.kj)(),n=e.app.pm.get(d.A),r=(0,s.useMemo)(function(){var e=(0,g.k)(n,t);return[(0,g.N)(f,e)]},[n,t]);return p().createElement(a.ExtendCollectionsProvider,{collections:r},p().createElement(x,null))}},705:function(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(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}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function o(e,t){return e?Array.from(e.channelTypes.getEntities()).map(function(e){var n=(function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],l=!0,o=!1;try{for(r=r.call(e);!(l=(t=r.next()).done)&&(a.push(t.value),2!==a.length);l=!0);}catch(e){o=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(o)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return r(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return{label:t(n.title),value:n.type}}):[]}function i(e,t){return l(a({},e),{fields:e.fields.map(function(e){return(null==e?void 0:e.name)==="notificationType"&&e.uiSchema?l(a({},e),{uiSchema:l(a({},e.uiSchema),{enum:t})}):e})})}n.d(t,{N:function(){return i},k:function(){return o}})}}]);
@@ -0,0 +1,14 @@
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
+ import React from 'react';
10
+ import type { ContentConfigFormProps } from '../notification-manager';
11
+ export declare function ContentConfigForm(props: ContentConfigFormProps & {
12
+ channelType?: string;
13
+ }): React.JSX.Element;
14
+ export default ContentConfigForm;
@@ -0,0 +1,12 @@
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
+ import React from 'react';
10
+ import type { MessageConfigFormProps } from '../notification-manager';
11
+ export declare function MessageConfigForm({ variableOptions }: MessageConfigFormProps): React.JSX.Element;
12
+ export default MessageConfigForm;
@@ -0,0 +1,16 @@
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
+ import React from 'react';
10
+ export type UserAdditionProps = {
11
+ value?: any[];
12
+ onChange?: (next: any[]) => void;
13
+ disabled?: boolean;
14
+ };
15
+ export declare function UserAddition(props: UserAdditionProps): React.JSX.Element;
16
+ export default UserAddition;
@@ -0,0 +1,16 @@
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
+ import React from 'react';
10
+ export type UserSelectProps = {
11
+ value?: any;
12
+ onChange?: (next: any) => void;
13
+ variableOptions?: any;
14
+ };
15
+ export declare function UserSelect(props: UserSelectProps): React.JSX.Element;
16
+ export default UserSelect;
@@ -0,0 +1,12 @@
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
+ export { UserSelect } from './UserSelect';
10
+ export type { UserSelectProps } from './UserSelect';
11
+ export { UserAddition } from './UserAddition';
12
+ export type { UserAdditionProps } from './UserAddition';
@@ -0,0 +1,15 @@
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
+ export { default } from './plugin';
10
+ export { PluginNotificationManagerClientV2 } from './plugin';
11
+ export { default as NotificationManager } from './notification-manager';
12
+ export type { RegisterChannelOptions, LoaderOf, MessageConfigFormProps, ContentConfigFormProps, } from './notification-manager';
13
+ export { MessageConfigForm } from './components/MessageConfigForm';
14
+ export { ContentConfigForm } from './components/ContentConfigForm';
15
+ export { UserSelect, UserAddition } from './components/User';
@@ -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
+ !function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("ahooks"),require("react-i18next"),require("@nocobase/client-v2"),require("dayjs"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):"function"==typeof define&&define.amd?define("@nocobase/plugin-notification-manager/client-v2",["ahooks","react-i18next","@nocobase/client-v2","dayjs","react","antd","@ant-design/icons","@nocobase/flow-engine","@nocobase/utils/client","lodash"],n):"object"==typeof exports?exports["@nocobase/plugin-notification-manager/client-v2"]=n(require("ahooks"),require("react-i18next"),require("@nocobase/client-v2"),require("dayjs"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):e["@nocobase/plugin-notification-manager/client-v2"]=n(e.ahooks,e["react-i18next"],e["@nocobase/client-v2"],e.dayjs,e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"],e.lodash)}(self,function(e,n,t,r,o,i,a,u,c,l){return function(){"use strict";var s,f,p,b={667:function(e,n,t){t.d(n,{$:function(){return y}});var r=t(485),o=t(807);function i(e,n,t,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){t(e);return}u.done?n(c):Promise.resolve(c).then(r,o)}function a(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var a=e.apply(n,t);function u(e){i(a,r,o,u,c,"next",e)}function c(e){i(a,r,o,u,c,"throw",e)}u(void 0)})}}function u(e,n,t){return(u=f()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&l(o,t.prototype),o}).apply(null,arguments)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,n){return(l=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function s(e){var n="function"==typeof Map?new Map:void 0;return(s=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!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return u(e,arguments,c(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l(t,e)})(e)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var l=[u,c];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(t=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=n.call(e,i)}catch(e){l=[6,e],r=0}finally{t=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var b="notification-manager",y=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,n,t,o,i;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return n=r,t=arguments,n=c(n),e=function(e,n){var t;if(n&&("object"==((t=n)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,f()?Reflect.construct(n,t||[],c(this).constructor):n.apply(this,t)),i=void 0,(o="manager")in e?Object.defineProperty(e,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[o]=i,e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&l(r,e),n=[{key:"channelTypes",get:function(){return this.manager.channelTypes}},{key:"registerChannelType",value:function(e){this.manager.registerChannelType(e)}},{key:"beforeLoad",value:function(){return a(function(){return p(this,function(e){return this.manager=new o.A,[2]})}).call(this)}},{key:"load",value:function(){return a(function(){return p(this,function(e){return this.pluginSettingsManager.addMenuItem({key:b,title:this.t("Notification manager"),icon:"NotificationOutlined",aclSnippet:"pm.notification"}),this.pluginSettingsManager.addPageTabItem({menuKey:b,key:"channels",title:this.t("Channels"),aclSnippet:"pm.notification.channels",sort:1,componentLoader:function(){return t.e("49").then(t.bind(t,624))}}),this.pluginSettingsManager.addPageTabItem({menuKey:b,key:"logs",title:this.t("Logs"),aclSnippet:"pm.notification.logs",sort:3,componentLoader:function(){return t.e("852").then(t.bind(t,487))}}),[2]})}).call(this)}}],function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,n),r}(s(r.Plugin));n.A=y},488:function(e,n,t){t.d(n,{kj:function(){return c},yr:function(){return u}});var r=t(694),o=t(953),i="notification-manager",a="@nocobase/plugin-notification-manager";function u(){return(0,o.useTranslation)([i,a,"client","data-source-manager"],{nsMode:"fallback"})}function c(){var e=(0,r.useFlowEngine)();return function(n,t){return e.context.t(n,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){var r;r=t[n],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return e}({ns:[i,a,"client"],nsMode:"fallback"},t))}}},807:function(e,n,t){t.d(n,{A:function(){return o}});var r=t(768),o=function(){var e;function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");e="channelTypes",t=new r.Registry,e in this?Object.defineProperty(this,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):this[e]=t}return e=[{key:"registerChannelType",value:function(e){this.channelTypes.register(e.type,e)}}],function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,e),n}()},553:function(e,n,t){t.d(n,{L:function(){return o}});var r,o=((r={}).templates="templates",r.channels="notificationChannels",r.messages="messages",r.logs="notificationSendLogs",r)},375:function(e){e.exports=a},485:function(e){e.exports=t},694:function(e){e.exports=u},768:function(e){e.exports=c},625:function(n){n.exports=e},59:function(e){e.exports=i},185:function(e){e.exports=r},773:function(e){e.exports=l},155:function(e){e.exports=o},953:function(e){e.exports=n}},y={};function d(e){var n=y[e];if(void 0!==n)return n.exports;var t=y[e]={exports:{}};return b[e](t,t.exports,d),t.exports}d.m=b,d.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(n,{a:n}),n},d.d=function(e,n){for(var t in n)d.o(n,t)&&!d.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(n,t){return d.f[t](e,n),n},[]))},d.u=function(e){return""+e+"."+({49:"56695f2f5a36e028",852:"119208b49538bcfc"})[e]+".js"},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},h={},d.l=function(e,n,t,r){if(h[e])return void h[e].push(n);if(void 0!==t)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var c=a[u];if(c.getAttribute("src")==e||c.getAttribute("data-rspack")=="@nocobase/plugin-notification-manager/client-v2:"+t){o=c;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,d.nc&&o.setAttribute("nonce",d.nc),o.setAttribute("data-rspack","@nocobase/plugin-notification-manager/client-v2:"+t),o.src=e),h[e]=[n];var l=function(n,t){o.onerror=o.onload=null,clearTimeout(s);var r=h[e];if(delete h[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(t)}),n)return n(t)},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)},d.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.g.importScripts&&(v=d.g.location+"");var h,v,m=d.g.document;if(!v&&m&&(m.currentScript&&"SCRIPT"===m.currentScript.tagName.toUpperCase()&&(v=m.currentScript.src),!v)){var g=m.getElementsByTagName("script");if(g.length)for(var w=g.length-1;w>-1&&(!v||!/^http(s?):/.test(v));)v=g[w--].src}if(!v)throw Error("Automatic publicPath is not supported in this browser");d.p=v.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s={889:0},d.f.j=function(e,n){var t=d.o(s,e)?s[e]:void 0;if(0!==t)if(t)n.push(t[2]);else{var r=new Promise(function(n,r){t=s[e]=[n,r]});n.push(t[2]=r);var o=d.p+d.u(e),i=Error();d.l(o,function(n){if(d.o(s,e)&&(0!==(t=s[e])&&(s[e]=void 0),t)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,t[1](i)}},"chunk-"+e,e)}},f=function(e,n){var t,r,o=n[0],i=n[1],a=n[2],u=0;if(o.some(function(e){return 0!==s[e]})){for(t in i)d.o(i,t)&&(d.m[t]=i[t]);a&&a(d)}for(e&&e(n);u<o.length;u++)r=o[u],d.o(s,r)&&s[r]&&s[r][0](),s[r]=0},(p=self.webpackChunk_nocobase_plugin_notification_manager_client_v2=self.webpackChunk_nocobase_plugin_notification_manager_client_v2||[]).forEach(f.bind(null,0)),p.push=f.bind(null,p.push.bind(p));var O={};return!function(){var e="",n="u">typeof document?document.currentScript:null;if(n&&n.src&&(e=n.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var t=window.__webpack_public_path__||"";t&&("/"!==t.charAt(t.length-1)&&(t+="/"),e=t+"static/plugins/@nocobase/plugin-notification-manager/dist/client-v2/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",o=r.indexOf("/v2/");e=o>=0?r.slice(0,o+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-notification-manager/dist/client-v2/"}d.p=e}(),!function(){d.r(O),d.d(O,{UserAddition:function(){return S},PluginNotificationManagerClientV2:function(){return e.$},UserSelect:function(){return v},ContentConfigForm:function(){return y},MessageConfigForm:function(){return b},NotificationManager:function(){return n.A},default:function(){return e.A}});var e=d(667),n=d(807),t=d(485),r=d(694),o=d(625),i=d(59),a=d(155),u=d.n(a),c=d(553),l=d(488);function s(e,n,t,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){t(e);return}u.done?n(c):Promise.resolve(c).then(r,o)}function f(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function a(e){s(i,r,o,a,u,"next",e)}function u(e){s(i,r,o,a,u,"throw",e)}a(void 0)})}}function p(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var l=[u,c];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(t=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=n.call(e,i)}catch(e){l=[6,e],r=0}finally{t=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}function b(n){var s=n.variableOptions,b=(0,l.yr)().t,y=(0,l.kj)(),d=(0,r.useFlowContext)(),h=d.app.pm.get(e.A),v=i.Form.useWatch("channelName"),m=(0,o.useRequest)(function(){return f(function(){var e,n,t;return p(this,function(r){switch(r.label){case 0:if(!v)return[2,null];return[4,d.api.request({url:"/".concat(c.L.channels,":get"),method:"get",params:{filterByTk:v}})];case 1:return[2,null!=(e=null==(t=r.sent())||null==(n=t.data)?void 0:n.data)?e:null]}})})()},{refreshDeps:[v],ready:!!v}).data,g=null==m?void 0:m.notificationType,w=(0,a.useMemo)(function(){var e,n;return g?null==h||null==(n=h.channelTypes.get(g))||null==(e=n.components)?void 0:e.MessageConfigFormLoader:void 0},[h,g]),O=(0,a.useMemo)(function(){return w?(0,a.lazy)(w):null},[w]);return u().createElement(u().Fragment,null,u().createElement(i.Form.Item,{name:"channelName",label:b("Channel"),rules:[{required:!0,message:b("The field value is required")}]},u().createElement(t.RemoteSelect,{request:function(){return f(function(){var e,n,t;return p(this,function(r){switch(r.label){case 0:return[4,d.api.resource(c.L.channels).list()];case 1:return[2,Array.isArray(t=null==(n=r.sent())||null==(e=n.data)?void 0:e.data)?t:[]]}})})()},cacheKey:"@nocobase/plugin-notification-manager:".concat(c.L.channels,":list"),mapOptions:function(e){return{label:y(e.title||e.name),value:e.name}}})),O?u().createElement(a.Suspense,{fallback:u().createElement(i.Spin,null)},u().createElement(O,{variableOptions:s})):null)}function y(n){var t=n.variableOptions,o=n.channelType,c=(0,r.useFlowContext)().app.pm.get(e.A),l=(0,a.useMemo)(function(){var e,n;return o?null==c||null==(n=c.channelTypes.get(o))||null==(e=n.components)?void 0:e.ContentConfigFormLoader:void 0},[c,o]),s=(0,a.useMemo)(function(){return l?(0,a.lazy)(l):null},[l]);return s?u().createElement(a.Suspense,{fallback:u().createElement(i.Spin,null)},u().createElement(s,{variableOptions:t})):null}function h(e,n,t,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){t(e);return}u.done?n(c):Promise.resolve(c).then(r,o)}function v(e){var n=e.value,o=e.onChange,i=(0,r.useFlowContext)();return u().createElement(t.RemoteSelect,{value:n,onChange:o,request:function(){var e;return(e=function(){var e,t,r;return function(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var l=[u,c];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(t=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=n.call(e,i)}catch(e){l=[6,e],r=0}finally{t=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:return[4,i.api.resource("users").list(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){var r;r=t[n],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return e}({},null!=n&&(void 0===n?"undefined":n&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)!="object"?{filter:{id:n}}:{}))];case 1:return[2,Array.isArray(r=null==(t=o.sent())||null==(e=t.data)?void 0:e.data)?r:[]]}})},function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function a(e){h(i,r,o,a,u,"next",e)}function u(e){h(i,r,o,a,u,"throw",e)}a(void 0)})})()},mapOptions:function(e){return{label:e.nickname||String(e.id),value:e.id}}})}var m=d(375);function g(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function w(e,n){if(e){if("string"==typeof e)return g(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,n)}}function S(e){var n,t=e.value,r=void 0===t?[]:t,o=e.onChange,c=e.disabled,s=(0,l.yr)().t,f=function(e){if(Array.isArray(e))return e}(n=(0,a.useState)(!1))||function(e){var n,t,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),2!==o.length);i=!0);}catch(e){a=!0,t=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw t}}return o}}(n)||w(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=f[0],b=f[1],y=(0,a.useCallback)(function(e){null==o||o(((function(e){if(Array.isArray(e))return g(e)})(r)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||w(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])),b(!1)},[o,r]),d=u().createElement(i.Button,{icon:u().createElement(m.PlusOutlined,null),type:"dashed",block:!0,disabled:c},s("Add user"));return c?d:u().createElement(i.Popover,{open:p,onOpenChange:b,content:u().createElement(i.Space,{direction:"vertical",size:"small"},u().createElement(i.Button,{type:"text",onClick:function(){return y("")}},s("Select users")),u().createElement(i.Button,{type:"text",onClick:function(){return y({filter:{}})}},s("Query users")))},d)}}(),O}()});
@@ -0,0 +1,12 @@
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
+ export declare const NAMESPACE = "notification-manager";
10
+ export declare function useNotificationTranslation(): import("react-i18next").UseTranslationResponse<("notification-manager" | "client" | "data-source-manager" | "@nocobase/plugin-notification-manager")[], undefined>;
11
+ export declare function useT(): (key: string, options?: Record<string, any>) => string;
12
+ export declare function tExpr(key: string): string;
@@ -0,0 +1,36 @@
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
+ import type { ComponentType } from 'react';
10
+ export type LoaderOf<P = Record<string, never>> = () => Promise<{
11
+ default: ComponentType<P>;
12
+ }>;
13
+ export type MessageConfigFormProps = {
14
+ variableOptions?: any;
15
+ };
16
+ export type ContentConfigFormProps = {
17
+ variableOptions?: any;
18
+ };
19
+ export type RegisterChannelOptions = {
20
+ title: string;
21
+ type: string;
22
+ components: {
23
+ ChannelConfigFormLoader?: LoaderOf;
24
+ MessageConfigFormLoader?: LoaderOf<MessageConfigFormProps>;
25
+ ContentConfigFormLoader?: LoaderOf<ContentConfigFormProps>;
26
+ };
27
+ meta?: {
28
+ creatable?: boolean;
29
+ editable?: boolean;
30
+ deletable?: boolean;
31
+ };
32
+ };
33
+ export default class NotificationManager {
34
+ channelTypes: any;
35
+ registerChannelType(options: RegisterChannelOptions): void;
36
+ }
@@ -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
+ import React from 'react';
10
+ export default function ChannelsPage(): React.JSX.Element;
@@ -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
+ import React from 'react';
10
+ export default function LogsPage(): React.JSX.Element;
@@ -0,0 +1,19 @@
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
+ import { Plugin } from '@nocobase/client-v2';
10
+ import type { Application } from '@nocobase/client-v2';
11
+ import { type RegisterChannelOptions } from './notification-manager';
12
+ export declare class PluginNotificationManagerClientV2 extends Plugin<Record<string, never>, Application> {
13
+ private manager;
14
+ get channelTypes(): any;
15
+ registerChannelType(options: RegisterChannelOptions): void;
16
+ beforeLoad(): Promise<void>;
17
+ load(): Promise<void>;
18
+ }
19
+ export default PluginNotificationManagerClientV2;
@@ -0,0 +1,34 @@
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
+ import type PluginNotificationManagerClientV2 from '../plugin';
10
+ export type NotificationTypeOption = {
11
+ label: string;
12
+ value: string;
13
+ };
14
+ /**
15
+ * Build the `[{ label, value }]` array of registered channel types.
16
+ *
17
+ * The shared collections declare `notificationType.uiSchema.enum =
18
+ * '{{notificationTypeOptions}}'` — a v1 Formily template. v2's
19
+ * `FilterValueInput` (Select branch) reads the field's `uiSchema.enum`
20
+ * verbatim, so we must replace that template with the actual options
21
+ * BEFORE the collection is registered via `ExtendCollectionsProvider`.
22
+ *
23
+ * Mirrors v1's `useNotificationTypes()` in
24
+ * `src/client/manager/channel/hooks.tsx` minus the v1-only schema fields.
25
+ */
26
+ export declare function getNotificationTypeOptions(plugin: PluginNotificationManagerClientV2 | undefined, compileT: (key: string) => string): NotificationTypeOption[];
27
+ /**
28
+ * Return a deep-enough copy of a collection definition with the
29
+ * `notificationType` field's `uiSchema.enum` replaced by the live
30
+ * options. No-op when the collection has no `notificationType` field.
31
+ */
32
+ export declare function withResolvedNotificationTypeEnum<T extends {
33
+ fields: any[];
34
+ }>(collection: T, options: NotificationTypeOption[]): T;
@@ -10,18 +10,22 @@
10
10
  module.exports = {
11
11
  "react": "18.2.0",
12
12
  "antd": "5.24.2",
13
- "@nocobase/client": "2.1.0-beta.38",
14
- "@nocobase/utils": "2.1.0-beta.38",
15
- "@nocobase/database": "2.1.0-beta.38",
16
- "@nocobase/server": "2.1.0-beta.38",
17
- "@nocobase/cache": "2.1.0-beta.38",
18
- "@nocobase/logger": "2.1.0-beta.38",
13
+ "@nocobase/client": "2.1.0-beta.41",
14
+ "@nocobase/utils": "2.1.0-beta.41",
15
+ "@nocobase/flow-engine": "2.1.0-beta.41",
16
+ "react-i18next": "11.18.6",
17
+ "@nocobase/client-v2": "2.1.0-beta.41",
18
+ "@nocobase/database": "2.1.0-beta.41",
19
+ "@nocobase/server": "2.1.0-beta.41",
20
+ "@nocobase/cache": "2.1.0-beta.41",
21
+ "@nocobase/logger": "2.1.0-beta.41",
19
22
  "@formily/react": "2.3.7",
20
23
  "@formily/core": "2.3.7",
21
- "react-i18next": "11.18.6",
22
- "@formily/shared": "2.3.7",
24
+ "ahooks": "3.7.8",
23
25
  "@ant-design/icons": "5.6.1",
24
- "@nocobase/flow-engine": "2.1.0-beta.38",
26
+ "lodash": "4.18.1",
27
+ "dayjs": "1.11.13",
28
+ "@formily/shared": "2.3.7",
25
29
  "@formily/antd-v5": "1.2.3",
26
- "@nocobase/plugin-workflow": "2.1.0-beta.38"
30
+ "@nocobase/plugin-workflow": "2.1.0-beta.41"
27
31
  };
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Benachrichtigungsverwaltung",
30
30
  "Notification manager": "Benachrichtigungsmanager",
31
31
  "Notification type": "Benachrichtigungstyp",
32
+ "Notification type {{type}} is not registered.": "Benachrichtigungstyp {{type}} ist nicht registriert.",
32
33
  "Query users": "Benutzer abfragen",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Zufällig generiert und kann nicht geändert werden. Unterstützt Buchstaben, Zahlen und Unterstriche, muss mit einem Buchstaben beginnen.",
34
35
  "Reason": "Grund",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Notification Management",
30
30
  "Notification manager": "Notification manager",
31
31
  "Notification type": "Notification type",
32
+ "Notification type {{type}} is not registered.": "Notification type {{type}} is not registered.",
32
33
  "Query users": "Query users",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.",
34
35
  "Reason": "Reason",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Notification Management",
30
30
  "Notification manager": "Notification manager",
31
31
  "Notification type": "Notification type",
32
+ "Notification type {{type}} is not registered.": "El tipo de notificación {{type}} no está registrado.",
32
33
  "Query users": "Query users",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.",
34
35
  "Reason": "Reason",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Notification Management",
30
30
  "Notification manager": "Notification manager",
31
31
  "Notification type": "Notification type",
32
+ "Notification type {{type}} is not registered.": "Le type de notification {{type}} n'est pas enregistré.",
32
33
  "Query users": "Query users",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.",
34
35
  "Reason": "Reason",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Értesítés kezelés",
30
30
  "Notification manager": "Értesítés kezelő",
31
31
  "Notification type": "Értesítés típusa",
32
+ "Notification type {{type}} is not registered.": "A(z) {{type}} értesítési típus nincs regisztrálva.",
32
33
  "Query users": "Felhasználók lekérdezése",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Véletlenszerűen generált és nem módosítható. Betűk, számok és aláhúzások támogatottak, betűvel kell kezdődnie.",
34
35
  "Reason": "Ok",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Manajemen Notifikasi",
30
30
  "Notification manager": "Manajer notifikasi",
31
31
  "Notification type": "Tipe notifikasi",
32
+ "Notification type {{type}} is not registered.": "Tipe notifikasi {{type}} belum terdaftar.",
32
33
  "Query users": "Kueri pengguna",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Dihasilkan secara acak dan tidak dapat diubah. Mendukung huruf, angka, dan garis bawah, harus diawali dengan huruf.",
34
35
  "Reason": "Alasan",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Gestione Notifiche",
30
30
  "Notification manager": "Gestore notifiche",
31
31
  "Notification type": "Tipo di notifica",
32
+ "Notification type {{type}} is not registered.": "Il tipo di notifica {{type}} non è registrato.",
32
33
  "Query users": "Cerca utenti",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Generato casualmente e non modificabile. Supporta lettere, numeri e underscore, deve iniziare con una lettera.",
34
35
  "Reason": "Motivo",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "通知管理",
30
30
  "Notification manager": "通知管理",
31
31
  "Notification type": "通知タイプ",
32
+ "Notification type {{type}} is not registered.": "通知タイプ {{type}} は登録されていません。",
32
33
  "Query users": "ユーザーを検索",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "ランダム生成され変更不可。英字、数字、アンダースコアをサポートし、英字で始まる必要があります。",
34
35
  "Reason": "理由",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "알림 관리",
30
30
  "Notification manager": "알림 관리자",
31
31
  "Notification type": "알림 유형",
32
+ "Notification type {{type}} is not registered.": "알림 유형 {{type}}이(가) 등록되지 않았습니다.",
32
33
  "Query users": "사용자 조회",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "무작위로 생성되며 수정할 수 없습니다. 영문자, 숫자, 밑줄을 지원하며, 반드시 영문자로 시작해야 합니다.",
34
35
  "Reason": "사유",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Notificatiebeheerder",
30
30
  "Notification manager": "Notificatiebeheerder",
31
31
  "Notification type": "Notificatietype",
32
+ "Notification type {{type}} is not registered.": "Notificatietype {{type}} is niet geregistreerd.",
32
33
  "Query users": "Gebruikers zoeken",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Willekeurig gegenereerd en kan niet worden gewijzigd. Ondersteunende letters, cijfers en underscores, moeten beginnen met een letter.",
34
35
  "Reason": "Reden",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Notification Management",
30
30
  "Notification manager": "Notification manager",
31
31
  "Notification type": "Notification type",
32
+ "Notification type {{type}} is not registered.": "O tipo de notificação {{type}} não está registrado.",
32
33
  "Query users": "Query users",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.",
34
35
  "Reason": "Reason",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Управление уведомлениями",
30
30
  "Notification manager": "Менеджер уведомлений",
31
31
  "Notification type": "Тип уведомления",
32
+ "Notification type {{type}} is not registered.": "Тип уведомления {{type}} не зарегистрирован.",
32
33
  "Query users": "Запрос пользователей",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Генерируется случайным образом и не может быть изменено. Поддерживаются буквы, цифры и подчеркивания, должно начинаться с буквы.",
34
35
  "Reason": "Причина",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Notification Management",
30
30
  "Notification manager": "Notification manager",
31
31
  "Notification type": "Notification type",
32
+ "Notification type {{type}} is not registered.": "Bildirim türü {{type}} kayıtlı değil.",
32
33
  "Query users": "Query users",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.",
34
35
  "Reason": "Reason",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Notification Management",
30
30
  "Notification manager": "Notification manager",
31
31
  "Notification type": "Notification type",
32
+ "Notification type {{type}} is not registered.": "Тип сповіщення {{type}} не зареєстровано.",
32
33
  "Query users": "Query users",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.",
34
35
  "Reason": "Reason",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Notification Management",
30
30
  "Notification manager": "Notification manager",
31
31
  "Notification type": "Notification type",
32
+ "Notification type {{type}} is not registered.": "Loại thông báo {{type}} chưa được đăng ký.",
32
33
  "Query users": "Query users",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.",
34
35
  "Reason": "Reason",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "通知管理",
30
30
  "Notification manager": "通知管理",
31
31
  "Notification type": "通知类型",
32
+ "Notification type {{type}} is not registered.": "通知类型 {{type}} 尚未注册。",
32
33
  "Query users": "查询用户",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "随机生成,不可修改。支持英文、数字和下划线,必须以英文字母开头。",
34
35
  "Reason": "原因",
@@ -29,6 +29,7 @@
29
29
  "Notification Management": "Notification Management",
30
30
  "Notification manager": "Notification manager",
31
31
  "Notification type": "Notification type",
32
+ "Notification type {{type}} is not registered.": "通知類型 {{type}} 尚未註冊。",
32
33
  "Query users": "Query users",
33
34
  "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.": "Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.",
34
35
  "Reason": "Reason",
@@ -1 +1 @@
1
- {"name":"uuid","version":"10.0.0","description":"RFC9562 UUIDs","funding":["https://github.com/sponsors/broofa","https://github.com/sponsors/ctavan"],"commitlint":{"extends":["@commitlint/config-conventional"]},"keywords":["uuid","guid","rfc4122","rfc9562"],"license":"MIT","bin":{"uuid":"dist/bin/uuid"},"sideEffects":false,"main":"./dist/index.js","exports":{".":{"node":{"module":"./dist/esm-node/index.js","require":"./dist/index.js","import":"./wrapper.mjs"},"browser":{"import":"./dist/esm-browser/index.js","require":"./dist/commonjs-browser/index.js"},"default":"./dist/esm-browser/index.js"},"./package.json":"./package.json"},"module":"./dist/esm-node/index.js","browser":{"./dist/esm-node/index.js":"./dist/esm-browser/index.js","./dist/md5.js":"./dist/md5-browser.js","./dist/native.js":"./dist/native-browser.js","./dist/rng.js":"./dist/rng-browser.js","./dist/sha1.js":"./dist/sha1-browser.js"},"files":["CHANGELOG.md","CONTRIBUTING.md","LICENSE.md","README.md","dist","wrapper.mjs"],"devDependencies":{"@babel/cli":"7.24.6","@babel/core":"7.24.6","@babel/eslint-parser":"7.24.6","@babel/plugin-syntax-import-attributes":"7.24.6","@babel/preset-env":"7.24.6","@commitlint/cli":"19.3.0","@commitlint/config-conventional":"19.2.2","@wdio/browserstack-service":"7.16.10","@wdio/cli":"7.16.10","@wdio/jasmine-framework":"7.16.6","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/static-server-service":"7.16.6","bundlewatch":"0.3.3","eslint":"9.4.0","eslint-plugin-prettier":"5.1.3","globals":"15.3.0","husky":"9.0.11","jest":"29.7.0","lint-staged":"15.2.5","neostandard":"0.5.1","npm-run-all":"4.1.5","optional-dev-dependency":"2.0.1","prettier":"3.3.0","random-seed":"0.3.0","runmd":"1.3.9","standard-version":"9.5.0"},"optionalDevDependencies":{"@wdio/browserstack-service":"7.16.10","@wdio/cli":"7.16.10","@wdio/jasmine-framework":"7.16.6","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/static-server-service":"7.16.6"},"scripts":{"examples:browser:webpack:build":"cd examples/browser-webpack && npm install && npm run build","examples:browser:rollup:build":"cd examples/browser-rollup && npm install && npm run build","examples:node:commonjs:test":"cd examples/node-commonjs && npm install && npm test","examples:node:esmodules:test":"cd examples/node-esmodules && npm install && npm test","examples:node:jest:test":"cd examples/node-jest && npm install && npm test","prepare":"husky install","lint":"npm run eslint:check && npm run prettier:check","eslint:check":"eslint src/ test/ examples/ *.js","eslint:fix":"eslint --fix src/ test/ examples/ *.js","pretest":"npm run build","test":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/","test:matching":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/ -t","pretest:browser":"optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**","test:browser":"wdio run ./wdio.conf.js","pretest:node":"npm run build","test:node":"npm-run-all --parallel examples:node:**","test:pack":"./scripts/testpack.sh","pretest:benchmark":"npm run build","test:benchmark":"cd examples/benchmark && HUSKY=0 npm install && npm test","prettier:check":"prettier --check .","prettier:fix":"prettier --write .","bundlewatch":"npm run pretest:browser && bundlewatch --config bundlewatch.config.json","md":"runmd --watch --output=README.md README_js.md","docs":"npm run build && npx runmd --output=README.md README_js.md","docs:diff":"npm run docs && git diff --quiet README.md","build":"./scripts/build.sh","prepack":"npm run build","release":"standard-version --no-verify"},"repository":{"type":"git","url":"git+https://github.com/uuidjs/uuid.git"},"lint-staged":{"*":["prettier --no-error-on-unmatched-pattern --write"],"*.{js,jsx}":["eslint --no-error-on-unmatched-pattern --fix"]},"standard-version":{"scripts":{"postchangelog":"prettier --write CHANGELOG.md"}},"packageManager":"npm@10.8.1+sha256.b8807aebb9656758e2872fa6e7c564b506aa2faa9297439a478d471d2fe32483","_lastModified":"2026-05-29T02:54:01.942Z"}
1
+ {"name":"uuid","version":"10.0.0","description":"RFC9562 UUIDs","funding":["https://github.com/sponsors/broofa","https://github.com/sponsors/ctavan"],"commitlint":{"extends":["@commitlint/config-conventional"]},"keywords":["uuid","guid","rfc4122","rfc9562"],"license":"MIT","bin":{"uuid":"dist/bin/uuid"},"sideEffects":false,"main":"./dist/index.js","exports":{".":{"node":{"module":"./dist/esm-node/index.js","require":"./dist/index.js","import":"./wrapper.mjs"},"browser":{"import":"./dist/esm-browser/index.js","require":"./dist/commonjs-browser/index.js"},"default":"./dist/esm-browser/index.js"},"./package.json":"./package.json"},"module":"./dist/esm-node/index.js","browser":{"./dist/esm-node/index.js":"./dist/esm-browser/index.js","./dist/md5.js":"./dist/md5-browser.js","./dist/native.js":"./dist/native-browser.js","./dist/rng.js":"./dist/rng-browser.js","./dist/sha1.js":"./dist/sha1-browser.js"},"files":["CHANGELOG.md","CONTRIBUTING.md","LICENSE.md","README.md","dist","wrapper.mjs"],"devDependencies":{"@babel/cli":"7.24.6","@babel/core":"7.24.6","@babel/eslint-parser":"7.24.6","@babel/plugin-syntax-import-attributes":"7.24.6","@babel/preset-env":"7.24.6","@commitlint/cli":"19.3.0","@commitlint/config-conventional":"19.2.2","@wdio/browserstack-service":"7.16.10","@wdio/cli":"7.16.10","@wdio/jasmine-framework":"7.16.6","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/static-server-service":"7.16.6","bundlewatch":"0.3.3","eslint":"9.4.0","eslint-plugin-prettier":"5.1.3","globals":"15.3.0","husky":"9.0.11","jest":"29.7.0","lint-staged":"15.2.5","neostandard":"0.5.1","npm-run-all":"4.1.5","optional-dev-dependency":"2.0.1","prettier":"3.3.0","random-seed":"0.3.0","runmd":"1.3.9","standard-version":"9.5.0"},"optionalDevDependencies":{"@wdio/browserstack-service":"7.16.10","@wdio/cli":"7.16.10","@wdio/jasmine-framework":"7.16.6","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/static-server-service":"7.16.6"},"scripts":{"examples:browser:webpack:build":"cd examples/browser-webpack && npm install && npm run build","examples:browser:rollup:build":"cd examples/browser-rollup && npm install && npm run build","examples:node:commonjs:test":"cd examples/node-commonjs && npm install && npm test","examples:node:esmodules:test":"cd examples/node-esmodules && npm install && npm test","examples:node:jest:test":"cd examples/node-jest && npm install && npm test","prepare":"husky install","lint":"npm run eslint:check && npm run prettier:check","eslint:check":"eslint src/ test/ examples/ *.js","eslint:fix":"eslint --fix src/ test/ examples/ *.js","pretest":"npm run build","test":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/","test:matching":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/ -t","pretest:browser":"optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**","test:browser":"wdio run ./wdio.conf.js","pretest:node":"npm run build","test:node":"npm-run-all --parallel examples:node:**","test:pack":"./scripts/testpack.sh","pretest:benchmark":"npm run build","test:benchmark":"cd examples/benchmark && HUSKY=0 npm install && npm test","prettier:check":"prettier --check .","prettier:fix":"prettier --write .","bundlewatch":"npm run pretest:browser && bundlewatch --config bundlewatch.config.json","md":"runmd --watch --output=README.md README_js.md","docs":"npm run build && npx runmd --output=README.md README_js.md","docs:diff":"npm run docs && git diff --quiet README.md","build":"./scripts/build.sh","prepack":"npm run build","release":"standard-version --no-verify"},"repository":{"type":"git","url":"git+https://github.com/uuidjs/uuid.git"},"lint-staged":{"*":["prettier --no-error-on-unmatched-pattern --write"],"*.{js,jsx}":["eslint --no-error-on-unmatched-pattern --fix"]},"standard-version":{"scripts":{"postchangelog":"prettier --write CHANGELOG.md"}},"packageManager":"npm@10.8.1+sha256.b8807aebb9656758e2872fa6e7c564b506aa2faa9297439a478d471d2fe32483","_lastModified":"2026-05-30T01:30:35.238Z"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description.ru-RU": "Предоставляет единый сервис управления, включающий конфигурирование каналов, логирование и другие функции, поддерживает настройку различных каналов уведомлений, включая внутренние сообщения и электронную почту.",
7
7
  "displayName.zh-CN": "通知管理",
8
8
  "description.zh-CN": "提供统一的管理服务,涵盖渠道配置、日志记录等功能,支持多种通知渠道的配置,包括站内信和电子邮件等。",
9
- "version": "2.1.0-beta.38",
9
+ "version": "2.1.0-beta.41",
10
10
  "homepage": "https://docs.nocobase.com/handbook/notification-manager",
11
11
  "homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/notification-manager",
12
12
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/notification-manager",
@@ -25,6 +25,7 @@
25
25
  "peerDependencies": {
26
26
  "@nocobase/actions": "2.x",
27
27
  "@nocobase/client": "2.x",
28
+ "@nocobase/client-v2": "2.x",
28
29
  "@nocobase/database": "2.x",
29
30
  "@nocobase/plugin-workflow": ">=0.17.0-alpha.3",
30
31
  "@nocobase/server": "2.x",
@@ -35,5 +36,5 @@
35
36
  "Notification"
36
37
  ],
37
38
  "license": "Apache-2.0",
38
- "gitHead": "d1c585108ff6e51c17b0b52bacb1a2d621d9c119"
39
+ "gitHead": "ea3f966811146edb13c9e8016bf4cdc81597a003"
39
40
  }