@nocobase/plugin-notification-manager 2.1.0-beta.43 → 2.1.0-beta.45

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.
@@ -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("react-i18next"),require("@formily/core"),require("@formily/shared"),require("react"),require("antd"),require("@formily/antd-v5"),require("@nocobase/client"),require("@formily/react"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("@ant-design/icons")):"function"==typeof define&&define.amd?define("@nocobase/plugin-notification-manager",["react-i18next","@formily/core","@formily/shared","react","antd","@formily/antd-v5","@nocobase/client","@formily/react","@nocobase/flow-engine","@nocobase/utils/client","@ant-design/icons"],t):"object"==typeof exports?exports["@nocobase/plugin-notification-manager"]=t(require("react-i18next"),require("@formily/core"),require("@formily/shared"),require("react"),require("antd"),require("@formily/antd-v5"),require("@nocobase/client"),require("@formily/react"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("@ant-design/icons")):e["@nocobase/plugin-notification-manager"]=t(e["react-i18next"],e["@formily/core"],e["@formily/shared"],e.react,e.antd,e["@formily/antd-v5"],e["@nocobase/client"],e["@formily/react"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"],e["@ant-design/icons"])}(self,function(e,t,n,r,o,i,a,u,l,c,s){return function(){"use strict";var f,p,y,b={265:function(e,t,n){n.r(t),n.d(t,{UserAddition:function(){return E},PluginNotificationManagerClient:function(){return L},NotificationVariableContext:function(){return b},ContentConfigForm:function(){return C},default:function(){return U},useNotificationVariableOptions:function(){return m},UserSelect:function(){return P},MessageConfigForm:function(){return w},NotificationVariableProvider:function(){return v}});var r=n(342),o=n(872),i=n(803),a=n(768),u=function(){var e;function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");e="channelTypes",n=new a.Registry,e in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n}return e=[{key:"registerChannelType",value:function(e){this.channelTypes.register(e.type,e)}}],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)}}(t.prototype,e),t}();n(452);var l=n(230),c=n(59),s=n(155),f=n.n(s);function p(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}(0,s.createContext)({typeMap:{}}).displayName="ChannelTypesContext";var y=function(){var e=(0,o.yr)().t,t=(0,r.usePlugin)(U),n={},i=!0,a=!1,u=void 0;try{for(var c,s=t.channelTypes.getEntities()[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){var f,y=(f=c.value,function(e){if(Array.isArray(e))return e}(f)||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}}(f)||function(e){if(e){if("string"==typeof e)return p(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 p(e,2)}}(f)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=(y[0],y[1]),m=function(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(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}({},b),{title:l.Schema.compile(b.title,{t:e})});n[b.type]=m}}catch(e){a=!0,u=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw u}}return n},b=(0,s.createContext)([]),m=function(){return{scope:(0,s.useContext)(b)}},v=function(e){var t=e.value,n=e.children;return f().createElement(b.Provider,{value:t},n)},d=n(418),h=n(553);function g(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,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}var w=(0,l.observer)(function(e){var t,n=e.variableOptions,i=(0,l.useField)().form.values.channelName,a=function(e){if(Array.isArray(e))return e}(t=(0,s.useState)(null))||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}}(t)||function(e){if(e){if("string"==typeof e)return g(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 g(e,2)}}(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.")}(),u=a[0],c=a[1],p=(0,o.yr)().t,b=(0,r.useAPIClient)();(0,s.useEffect)(function(){var e;(e=function(){var e,t;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:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];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}}}}(this,function(n){switch(n.label){case 0:if(!i)return c(null),[2];return[4,b.request({url:"/".concat(h.L.channels,":get"),method:"get",params:{filterByTk:i}})];case 1:return c(null==(t=n.sent().data)||null==(e=t.data)?void 0:e.notificationType),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)})})()},[i,b]);var m=y(),v=((u?m[u]:{}).components||{}).MessageConfigForm,w={type:"void",properties:{channelName:{type:"string",title:'{{t("Channel")}}',required:!0,"x-decorator":"FormItem","x-component":"RemoteSelect","x-component-props":{multiple:!1,manual:!1,fieldNames:{label:"title",value:"name"},service:{resource:h.L.channels,action:"list"},style:{width:"100%"}}},message:{type:"void","x-component":"MessageConfigForm","x-component-props":{variableOptions:n}}}};return f().createElement(r.SchemaComponent,{schema:w,components:{MessageConfigForm:void 0===v?function(){return null}:v,ArrayItems:d.ArrayItems},scope:{t:p}})},{displayName:"MessageConfigForm"}),S=n(694),C=(0,r.withDynamicSchemaProps)((0,S.observer)(function(e){var t,n=e.variableOptions,r=e.channelType,o=y(),i=((null==(t=r?o[r]:{})?void 0:t.components)||{}).ContentConfigForm;return f().createElement(void 0===i?function(){return null}:i,{variableOptions:n})},{displayName:"ContentConfigForm"}));function j(e){var t=e.value,n=e.onChange,o=e.variableOptions;return f().createElement(r.Variable.Input,{scope:o,value:t,onChange:n},f().createElement(r.RemoteSelect,{fieldNames:{label:"nickname",value:"id"},service:{resource:"users",defaultParams:t?{filter:{id:t}}:void 0},manual:!1,value:t,onChange:n}))}function x(e){var t=(0,l.useField)(),n=(0,r.useCollectionFilterOptions)("users"),o=(0,r.useToken)().token,i=(0,s.useCallback)(function(t){var n=t.value,o=t.onChange,i=t.renderSchemaComponent;return f().createElement(r.Variable.Input,{value:n,onChange:o,scope:e.variableOptions},i())},[e.variableOptions]);return f().createElement("div",{style:{border:"1px dashed ".concat(o.colorBorder),padding:o.paddingSM}},f().createElement(r.SchemaComponent,{basePath:t.address,schema:{type:"void",properties:{filter:{type:"object","x-component":"Filter","x-component-props":{options:n,dynamicComponent:i}}}}}))}function P(e){var t;return"object"==((t=e.value)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)&&e.value?f().createElement(x,e):f().createElement(j,e)}var k=n(375);function A(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 E(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,s.useState)(!1))||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 A(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 A(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.")}(),n=t[0],r=t[1],i=(0,o.yr)().t,a=d.ArrayItems.useArray(),u=(0,l.useForm)(),p=(null==u?void 0:u.disabled)===!0,y=(0,s.useCallback)(function(){a.field.push(""),r(!1)},[a.field]),b=(0,s.useCallback)(function(){a.field.push({filter:{}}),r(!1)},[a.field]),m=f().createElement(c.Button,{icon:f().createElement(k.PlusOutlined,null),type:"dashed",block:!0,disabled:p,className:"ant-formily-array-base-addition"},i("Add user"));return p?m:f().createElement(c.Popover,{open:n,onOpenChange:r,content:f().createElement(c.Space,{direction:"vertical",size:"small"},f().createElement(c.Button,{type:"text",onClick:y},i("Select users")),f().createElement(c.Button,{type:"text",onClick:b},i("Query users")))},m)}function T(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function _(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){T(i,r,o,a,u,"next",e)}function u(e){T(i,r,o,a,u,"throw",e)}a(void 0)})}}function I(e,t,n){return(I=B()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&q(o,n.prototype),o}).apply(null,arguments)}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e){var t="function"==typeof Map?new Map:void 0;return(F=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 I(e,arguments,N(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),q(n,e)})(e)}function B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(B=function(){return!!e})()}function D(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),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];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}}}}var R=(0,r.lazy)(function(){return n.e("89").then(n.bind(n,840))},"ChannelManager").ChannelManager,V=(0,r.lazy)(function(){return n.e("507").then(n.bind(n,894))},"LogManager").LogManager,$="notification-manager",L=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=N(t),M(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,B()?Reflect.construct(t,r||[],N(this).constructor):t.apply(this,r)),"manager",void 0),M(e,"useNotificationTypes",i.aO),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&q(n,e),t=[{key:"channelTypes",get:function(){return this.manager.channelTypes}},{key:"registerChannelType",value:function(e){this.manager.registerChannelType(e)}},{key:"afterAdd",value:function(){return _(function(){return D(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return _(function(){return D(this,function(e){return this.manager=new u,[2]})}).call(this)}},{key:"load",value:function(){return _(function(){return D(this,function(e){return this.app.pluginSettingsManager.add($,{title:(0,o.vV)("Notification manager"),icon:"NotificationOutlined",aclSnippet:"pm.notification"}),this.app.pluginSettingsManager.add("".concat($,".channels"),{title:(0,o.vV)("Channels"),Component:R,aclSnippet:"pm.notification.channels",sort:1}),this.app.pluginSettingsManager.add("".concat($,".logs"),{title:(0,o.vV)("Logs"),Component:V,aclSnippet:"pm.notification.logs",sort:3}),[2]})}).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)}}(n.prototype,t),n}(F(r.Plugin)),U=L},842:function(e,t,n){n.d(t,{CW:function(){return l},Ox:function(){return u},Uz:function(){return a},nB:function(){return c}});var r=n(155),o=n.n(r);function i(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}var a=(0,r.createContext)({name:"",setName:function(){}});a.displayName="ChannelTypeContext";var u=(0,r.createContext)({channelTypes:[]});u.displayName="ChannelTypesContext";var l=function(){return(0,r.useContext)(u).channelTypes};function c(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(""))||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 i(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 i(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.")}(),n=t[0],u=t[1];return{name:n,setName:u,NotificationTypeNameProvider:function(e){var t=e.children;return o().createElement(a.Provider,{value:{name:n,setName:u}},t)}}}},803:function(e,t,n){n.d(t,{Gu:function(){return j},W2:function(){return O},Y1:function(){return g},Y2:function(){return S},aO:function(){return x},cJ:function(){return C},ru:function(){return w},wx:function(){return h}});var r=n(452),o=n(230),i=n(166),a=n(342),u=n(59),l=n(155),c=n(265),s=n(872),f=n(842);function p(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 y(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,u,"next",e)}function u(e){y(i,r,o,a,u,"throw",e)}a(void 0)})}}function m(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 v(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 d(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),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];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}}}}var h=function(){var e=(0,a.useActionContext)(),t=e.setVisible,n=e.setSubmitted;u.App.useApp().message;var r=(0,o.useForm)(),i=(0,a.useDataBlockResource)(),l=(0,a.useBlockRequestContext)().service;return{type:"primary",onClick:function(e,o){return b(function(){var e,a,u,c,s,f,p,y,b;return d(this,function(d){switch(d.label){case 0:return[4,r.submit()];case 1:return d.sent(),a=r.values,[4,i.create({values:a})];case 2:return d.sent(),s=void 0===(c=(u=(null==l||null==(e=l.data)?void 0:e.meta)||{}).count)?0:c,p=void 0===(f=u.page)?0:f,s%(void 0===(y=u.pageSize)?0:y)==1&&1!==p&&l.run(v(m({},null==l||null==(b=l.params)?void 0:b[0]),{page:p-1})),o&&(null==o||o()),null==n||n(!0),null==t||t(!1),[2]}})})()}}},g=function(){var e=(0,a.useActionContext)(),t=e.setVisible,n=e.setSubmitted;u.App.useApp().message;var r=(0,o.useForm)(),i=(0,a.useDataBlockResource)(),l=(0,a.useBlockRequestContext)().service,c=(0,a.useCollection)();return{type:"primary",onClick:function(e,o){return b(function(){var e,a,u,s,f,p,y,b,h;return d(this,function(d){switch(d.label){case 0:return[4,r.submit()];case 1:return d.sent(),a=r.values,[4,i.update({values:a,filterByTk:a[c.filterTargetKey]})];case 2:return d.sent(),f=void 0===(s=(u=(null==l||null==(e=l.data)?void 0:e.meta)||{}).count)?0:s,y=void 0===(p=u.page)?0:p,f%(void 0===(b=u.pageSize)?0:b)==1&&1!==y&&l.run(v(m({},null==l||null==(h=l.params)?void 0:h[0]),{page:y-1})),o&&(null==o||o()),null==n||n(!0),null==t||t(!1),[2]}})})()}}},O=function(){var e=(0,a.useCollectionRecordData)();return{form:(0,l.useMemo)(function(){return(0,r.createForm)({initialValues:e})},[])}},w=function(){var e,t=(0,a.useCollectionRecordData)(),n=null==t||null==(e=t.meta)?void 0:e.editable,r={};return!1===n&&(r.display="none"),{style:r}},S=function(){var e,t=(0,a.useCollectionRecordData)(),n=null==t||null==(e=t.meta)?void 0:e.deletable,r={},o=(0,a.useDestroyActionProps)();return!1===n&&(r.display="none"),v(m({},o),{style:r})},C=function(){(0,a.useActionContext)();var e=(0,l.useContext)(f.Uz).name;return{form:(0,l.useMemo)(function(){return(0,r.createForm)({values:{name:"s_".concat((0,i.uid)()),notificationType:e}})},[e])}},j=function(){var e=(0,a.useActionContext)().setVisible;return{type:"default",onClick:function(){e(!1)}}},x=function(){var e=(0,s.yr)().t,t=(0,a.usePlugin)(c.PluginNotificationManagerClient),n=[],r=!0,i=!1,u=void 0;try{for(var l,f=t.channelTypes.getEntities()[Symbol.iterator]();!(r=(l=f.next()).done);r=!0){var y,b=(y=l.value,function(e){if(Array.isArray(e))return e}(y)||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}}(y)||function(e){if(e){if("string"==typeof e)return p(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 p(e,2)}}(y)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=(b[0],b[1]),h=o.Schema.compile(d.title,{t:e}),g=v(m({},d),{name:d.type,key:d.type,value:d.type,title:h,label:h});n.push(g)}}catch(e){i=!0,u=e}finally{try{r||null==f.return||f.return()}finally{if(i)throw u}}return n}},872:function(e,t,n){n.d(t,{vV:function(){return a},yr:function(){return u}});var r=n(342),o=n(953),i="notification-manager";function a(e){return r.i18n.t(e,{ns:i})}function u(){return(0,o.useTranslation)([i,"client","data-source-manager"],{nsMode:"fallback"})}},553:function(e,t,n){n.d(t,{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=s},418:function(e){e.exports=i},452:function(e){e.exports=t},230:function(e){e.exports=u},166:function(e){e.exports=n},342:function(e){e.exports=a},694:function(e){e.exports=l},768:function(e){e.exports=c},59:function(e){e.exports=o},155:function(e){e.exports=r},953:function(t){t.exports=e},838:function(e,t,n){var r="",o="u">typeof document?document.currentScript:null;if(o&&o.src&&(r=o.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!r){var i=window.__webpack_public_path__||"";i&&("/"!==i.charAt(i.length-1)&&(i+="/"),r=i+"static/plugins/@nocobase/plugin-notification-manager/dist/client/")}if(!r){if(!(r=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var a=window.location.pathname||"/",u=a.indexOf("/v2/");r=u>=0?a.slice(0,u+1):"/"}r&&(r=r.replace(/\/v2\/?$/,"/")),r||(r="/"),"/"!==r.charAt(r.length-1)&&(r+="/"),r+="static/plugins/@nocobase/plugin-notification-manager/dist/client/"}n.p=r}},m={};function v(e){var t=m[e];if(void 0!==t)return t.exports;var n=m[e]={exports:{}};return b[e](n,n.exports,v),n.exports}v.m=b,v.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return v.d(t,{a:t}),t},v.d=function(e,t){for(var n in t)v.o(t,n)&&!v.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},v.f={},v.e=function(e){return Promise.all(Object.keys(v.f).reduce(function(t,n){return v.f[n](e,t),t},[]))},v.u=function(e){return""+e+"."+({507:"ef831b6db81405ab",89:"e5d970c24d7a4d5a"})[e]+".js"},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),v.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d={},v.l=function(e,t,n,r){if(d[e])return void d[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var l=a[u];if(l.getAttribute("src")==e||l.getAttribute("data-rspack")=="@nocobase/plugin-notification-manager:"+n){o=l;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,v.nc&&o.setAttribute("nonce",v.nc),o.setAttribute("data-rspack","@nocobase/plugin-notification-manager:"+n),o.src=e),d[e]=[t];var c=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=d[e];if(delete d[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},v.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},v.g.importScripts&&(h=v.g.location+"");var d,h,g=v.g.document;if(!h&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(h=g.currentScript.src),!h)){var O=g.getElementsByTagName("script");if(O.length)for(var w=O.length-1;w>-1&&(!h||!/^http(s?):/.test(h));)h=O[w--].src}if(!h)throw Error("Automatic publicPath is not supported in this browser");return v.p=h.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f={889:0},v.f.j=function(e,t){var n=v.o(f,e)?f[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var o=v.p+v.u(e),i=Error();v.l(o,function(t){if(v.o(f,e)&&(0!==(n=f[e])&&(f[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)}},p=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],u=0;if(o.some(function(e){return 0!==f[e]})){for(n in i)v.o(i,n)&&(v.m[n]=i[n]);a&&a(v)}for(e&&e(t);u<o.length;u++)r=o[u],v.o(f,r)&&f[r]&&f[r][0](),f[r]=0},(y=self.webpackChunk_nocobase_plugin_notification_manager=self.webpackChunk_nocobase_plugin_notification_manager||[]).forEach(p.bind(null,0)),y.push=p.bind(null,y.push.bind(y)),v(838),v(265)}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@formily/core"),require("@formily/shared"),require("@formily/antd-v5"),require("react"),require("antd"),require("@nocobase/client"),require("@formily/react"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("@ant-design/icons")):"function"==typeof define&&define.amd?define("@nocobase/plugin-notification-manager",["react-i18next","@formily/core","@formily/shared","@formily/antd-v5","react","antd","@nocobase/client","@formily/react","@nocobase/flow-engine","@nocobase/utils/client","@ant-design/icons"],t):"object"==typeof exports?exports["@nocobase/plugin-notification-manager"]=t(require("react-i18next"),require("@formily/core"),require("@formily/shared"),require("@formily/antd-v5"),require("react"),require("antd"),require("@nocobase/client"),require("@formily/react"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("@ant-design/icons")):e["@nocobase/plugin-notification-manager"]=t(e["react-i18next"],e["@formily/core"],e["@formily/shared"],e["@formily/antd-v5"],e.react,e.antd,e["@nocobase/client"],e["@formily/react"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"],e["@ant-design/icons"])}(self,function(e,t,n,r,o,i,a,u,l,c,s){return function(){"use strict";var f,p,y,b={265:function(e,t,n){n.r(t),n.d(t,{UserAddition:function(){return E},PluginNotificationManagerClient:function(){return L},NotificationVariableContext:function(){return b},ContentConfigForm:function(){return C},default:function(){return U},useNotificationVariableOptions:function(){return m},UserSelect:function(){return P},MessageConfigForm:function(){return O},NotificationVariableProvider:function(){return d}});var r=n(342),o=n(872),i=n(803),a=n(768),u=function(){var e;function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");e="channelTypes",n=new a.Registry,e in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n}return e=[{key:"registerChannelType",value:function(e){this.channelTypes.register(e.type,e)}}],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)}}(t.prototype,e),t}();n(452);var l=n(230),c=n(59),s=n(155),f=n.n(s);function p(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}(0,s.createContext)({typeMap:{}}).displayName="ChannelTypesContext";var y=function(){var e=(0,o.yr)().t,t=(0,r.usePlugin)(U),n={},i=!0,a=!1,u=void 0;try{for(var c,s=t.channelTypes.getEntities()[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){var f,y=(f=c.value,function(e){if(Array.isArray(e))return e}(f)||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}}(f)||function(e){if(e){if("string"==typeof e)return p(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 p(e,2)}}(f)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=(y[0],y[1]),m=function(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(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}({},b),{title:l.Schema.compile(b.title,{t:e})});n[b.type]=m}}catch(e){a=!0,u=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw u}}return n},b=(0,s.createContext)([]),m=function(){return{scope:(0,s.useContext)(b)}},d=function(e){var t=e.value,n=e.children;return f().createElement(b.Provider,{value:t},n)},v=n(418),h=n(553);function g(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 w(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}var O=(0,l.observer)(function(e){var t,n=e.variableOptions,i=(0,l.useField)().form.values.channelName,a=function(e){if(Array.isArray(e))return e}(t=(0,s.useState)(null))||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}}(t)||function(e){if(e){if("string"==typeof e)return g(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 g(e,2)}}(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.")}(),u=a[0],c=a[1],p=(0,o.yr)().t,b=(0,r.useAPIClient)();(0,s.useEffect)(function(){var e;(e=function(){var e,t;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:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];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}}}}(this,function(n){switch(n.label){case 0:if(!i)return c(null),[2];return[4,b.request({url:"/".concat(h.L.channels,":get"),method:"get",params:{filterByTk:i}})];case 1:return c(null==(t=n.sent().data)||null==(e=t.data)?void 0:e.notificationType),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){w(i,r,o,a,u,"next",e)}function u(e){w(i,r,o,a,u,"throw",e)}a(void 0)})})()},[i,b]);var m=y(),d=((u?m[u]:{}).components||{}).MessageConfigForm,O={type:"void",properties:{channelName:{type:"string",title:'{{t("Channel")}}',required:!0,"x-decorator":"FormItem","x-component":"RemoteSelect","x-component-props":{multiple:!1,manual:!1,fieldNames:{label:"title",value:"name"},service:{resource:h.L.channels,action:"list"},style:{width:"100%"}}},message:{type:"void","x-component":"MessageConfigForm","x-component-props":{variableOptions:n}}}};return f().createElement(r.SchemaComponent,{schema:O,components:{MessageConfigForm:void 0===d?function(){return null}:d,ArrayItems:v.ArrayItems},scope:{t:p}})},{displayName:"MessageConfigForm"}),S=n(694),C=(0,r.withDynamicSchemaProps)((0,S.observer)(function(e){var t,n=e.variableOptions,r=e.channelType,o=y(),i=((null==(t=r?o[r]:{})?void 0:t.components)||{}).ContentConfigForm;return f().createElement(void 0===i?function(){return null}:i,{variableOptions:n})},{displayName:"ContentConfigForm"}));function j(e){var t=e.value,n=e.onChange,o=e.variableOptions;return f().createElement(r.Variable.Input,{scope:o,value:t,onChange:n},f().createElement(r.RemoteSelect,{fieldNames:{label:"nickname",value:"id"},service:{resource:"users",defaultParams:t?{filter:{id:t}}:void 0},manual:!1,value:t,onChange:n}))}function x(e){var t=(0,l.useField)(),n=(0,r.useCollectionFilterOptions)("users"),o=(0,r.useToken)().token,i=(0,s.useCallback)(function(t){var n=t.value,o=t.onChange,i=t.renderSchemaComponent;return f().createElement(r.Variable.Input,{value:n,onChange:o,scope:e.variableOptions},i())},[e.variableOptions]);return f().createElement("div",{style:{border:"1px dashed ".concat(o.colorBorder),padding:o.paddingSM}},f().createElement(r.SchemaComponent,{basePath:t.address,schema:{type:"void",properties:{filter:{type:"object","x-component":"Filter","x-component-props":{options:n,dynamicComponent:i}}}}}))}function P(e){var t;return"object"==((t=e.value)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)&&e.value?f().createElement(x,e):f().createElement(j,e)}var k=n(375);function A(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 E(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,s.useState)(!1))||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 A(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 A(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.")}(),n=t[0],r=t[1],i=(0,o.yr)().t,a=v.ArrayItems.useArray(),u=(0,l.useForm)(),p=(null==u?void 0:u.disabled)===!0,y=(0,s.useCallback)(function(){a.field.push(""),r(!1)},[a.field]),b=(0,s.useCallback)(function(){a.field.push({filter:{}}),r(!1)},[a.field]),m=f().createElement(c.Button,{icon:f().createElement(k.PlusOutlined,null),type:"dashed",block:!0,disabled:p,className:"ant-formily-array-base-addition"},i("Add user"));return p?m:f().createElement(c.Popover,{open:n,onOpenChange:r,content:f().createElement(c.Space,{direction:"vertical",size:"small"},f().createElement(c.Button,{type:"text",onClick:y},i("Select users")),f().createElement(c.Button,{type:"text",onClick:b},i("Query users")))},m)}function T(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function _(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){T(i,r,o,a,u,"next",e)}function u(e){T(i,r,o,a,u,"throw",e)}a(void 0)})}}function I(e,t,n){return(I=R()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&q(o,n.prototype),o}).apply(null,arguments)}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e){var t="function"==typeof Map?new Map:void 0;return(F=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 I(e,arguments,N(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),q(n,e)})(e)}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(R=function(){return!!e})()}function B(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),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];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}}}}var D=(0,r.lazy)(function(){return n.e("89").then(n.bind(n,840))},"ChannelManager").ChannelManager,V=(0,r.lazy)(function(){return n.e("507").then(n.bind(n,894))},"LogManager").LogManager,$="notification-manager",L=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=N(t),M(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,R()?Reflect.construct(t,r||[],N(this).constructor):t.apply(this,r)),"manager",void 0),M(e,"useNotificationTypes",i.aO),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&q(n,e),t=[{key:"channelTypes",get:function(){return this.manager.channelTypes}},{key:"registerChannelType",value:function(e){this.manager.registerChannelType(e)}},{key:"afterAdd",value:function(){return _(function(){return B(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return _(function(){return B(this,function(e){return this.manager=new u,[2]})}).call(this)}},{key:"load",value:function(){return _(function(){return B(this,function(e){return this.app.pluginSettingsManager.add($,{title:(0,o.vV)("Notification manager"),icon:"NotificationOutlined",aclSnippet:"pm.notification"}),this.app.pluginSettingsManager.add("".concat($,".channels"),{title:(0,o.vV)("Channels"),Component:D,aclSnippet:"pm.notification.channels",sort:1}),this.app.pluginSettingsManager.add("".concat($,".logs"),{title:(0,o.vV)("Logs"),Component:V,aclSnippet:"pm.notification.logs",sort:3}),[2]})}).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)}}(n.prototype,t),n}(F(r.Plugin)),U=L},842:function(e,t,n){n.d(t,{CW:function(){return l},Ox:function(){return u},Uz:function(){return a},nB:function(){return c}});var r=n(155),o=n.n(r);function i(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}var a=(0,r.createContext)({name:"",setName:function(){}});a.displayName="ChannelTypeContext";var u=(0,r.createContext)({channelTypes:[]});u.displayName="ChannelTypesContext";var l=function(){return(0,r.useContext)(u).channelTypes};function c(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(""))||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 i(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 i(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.")}(),n=t[0],u=t[1];return{name:n,setName:u,NotificationTypeNameProvider:function(e){var t=e.children;return o().createElement(a.Provider,{value:{name:n,setName:u}},t)}}}},803:function(e,t,n){n.d(t,{Gu:function(){return j},W2:function(){return w},Y1:function(){return g},Y2:function(){return S},aO:function(){return x},cJ:function(){return C},ru:function(){return O},wx:function(){return h}});var r=n(452),o=n(230),i=n(166),a=n(342),u=n(59),l=n(155),c=n(265),s=n(872),f=n(842);function p(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 y(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,u,"next",e)}function u(e){y(i,r,o,a,u,"throw",e)}a(void 0)})}}function m(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 d(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 v(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),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];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}}}}var h=function(){var e=(0,a.useActionContext)(),t=e.setVisible,n=e.setSubmitted;u.App.useApp().message;var r=(0,o.useForm)(),i=(0,a.useDataBlockResource)(),l=(0,a.useBlockRequestContext)().service;return{type:"primary",onClick:function(e,o){return b(function(){var e,a,u,c,s,f,p,y,b;return v(this,function(v){switch(v.label){case 0:return[4,r.submit()];case 1:return v.sent(),a=r.values,[4,i.create({values:a})];case 2:return v.sent(),s=void 0===(c=(u=(null==l||null==(e=l.data)?void 0:e.meta)||{}).count)?0:c,p=void 0===(f=u.page)?0:f,s%(void 0===(y=u.pageSize)?0:y)==1&&1!==p&&l.run(d(m({},null==l||null==(b=l.params)?void 0:b[0]),{page:p-1})),o&&(null==o||o()),null==n||n(!0),null==t||t(!1),[2]}})})()}}},g=function(){var e=(0,a.useActionContext)(),t=e.setVisible,n=e.setSubmitted;u.App.useApp().message;var r=(0,o.useForm)(),i=(0,a.useDataBlockResource)(),l=(0,a.useBlockRequestContext)().service,c=(0,a.useCollection)();return{type:"primary",onClick:function(e,o){return b(function(){var e,a,u,s,f,p,y,b,h;return v(this,function(v){switch(v.label){case 0:return[4,r.submit()];case 1:return v.sent(),a=r.values,[4,i.update({values:a,filterByTk:a[c.filterTargetKey]})];case 2:return v.sent(),f=void 0===(s=(u=(null==l||null==(e=l.data)?void 0:e.meta)||{}).count)?0:s,y=void 0===(p=u.page)?0:p,f%(void 0===(b=u.pageSize)?0:b)==1&&1!==y&&l.run(d(m({},null==l||null==(h=l.params)?void 0:h[0]),{page:y-1})),o&&(null==o||o()),null==n||n(!0),null==t||t(!1),[2]}})})()}}},w=function(){var e=(0,a.useCollectionRecordData)();return{form:(0,l.useMemo)(function(){return(0,r.createForm)({initialValues:e})},[])}},O=function(){var e,t=(0,a.useCollectionRecordData)(),n=null==t||null==(e=t.meta)?void 0:e.editable,r={};return!1===n&&(r.display="none"),{style:r}},S=function(){var e,t=(0,a.useCollectionRecordData)(),n=null==t||null==(e=t.meta)?void 0:e.deletable,r={},o=(0,a.useDestroyActionProps)();return!1===n&&(r.display="none"),d(m({},o),{style:r})},C=function(){(0,a.useActionContext)();var e=(0,l.useContext)(f.Uz).name;return{form:(0,l.useMemo)(function(){return(0,r.createForm)({values:{name:"s_".concat((0,i.uid)()),notificationType:e}})},[e])}},j=function(){var e=(0,a.useActionContext)().setVisible;return{type:"default",onClick:function(){e(!1)}}},x=function(){var e=(0,s.yr)().t,t=(0,a.usePlugin)(c.PluginNotificationManagerClient),n=[],r=!0,i=!1,u=void 0;try{for(var l,f=t.channelTypes.getEntities()[Symbol.iterator]();!(r=(l=f.next()).done);r=!0){var y,b=(y=l.value,function(e){if(Array.isArray(e))return e}(y)||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}}(y)||function(e){if(e){if("string"==typeof e)return p(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 p(e,2)}}(y)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),v=(b[0],b[1]),h=o.Schema.compile(v.title,{t:e}),g=d(m({},v),{name:v.type,key:v.type,value:v.type,title:h,label:h});n.push(g)}}catch(e){i=!0,u=e}finally{try{r||null==f.return||f.return()}finally{if(i)throw u}}return n}},872:function(e,t,n){n.d(t,{vV:function(){return a},yr:function(){return u}});var r=n(342),o=n(953),i="notification-manager";function a(e){return r.i18n.t(e,{ns:i})}function u(){return(0,o.useTranslation)([i,"client","data-source-manager"],{nsMode:"fallback"})}},553:function(e,t,n){n.d(t,{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=s},418:function(e){e.exports=r},452:function(e){e.exports=t},230:function(e){e.exports=u},166:function(e){e.exports=n},342:function(e){e.exports=a},694:function(e){e.exports=l},768:function(e){e.exports=c},59:function(e){e.exports=i},155:function(e){e.exports=o},953:function(t){t.exports=e},633:function(e,t,n){var r="",o="u">typeof document?document.currentScript:null;if(o&&o.src&&(r=o.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!r){var i=window.__webpack_public_path__||"";i&&("/"!==i.charAt(i.length-1)&&(i+="/"),r=i+"static/plugins/@nocobase/plugin-notification-manager/dist/client/")}if(!r){var a=window.__nocobase_modern_client_prefix__||"v",u="/"+(a=String(a).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(r=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var l=window.location.pathname||"/",c=l.indexOf(u);r=c>=0?l.slice(0,c+1):"/"}r&&(r=r.replace(RegExp("/"+a+"/?$"),"/")),r||(r="/"),"/"!==r.charAt(r.length-1)&&(r+="/"),r+="static/plugins/@nocobase/plugin-notification-manager/dist/client/"}n.p=r}},m={};function d(e){var t=m[e];if(void 0!==t)return t.exports;var n=m[e]={exports:{}};return b[e](n,n.exports,d),n.exports}d.m=b,d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(t,n){return d.f[n](e,t),t},[]))},d.u=function(e){return""+e+"."+({507:"ef831b6db81405ab",89:"e5d970c24d7a4d5a"})[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,t){return Object.prototype.hasOwnProperty.call(e,t)},v={},d.l=function(e,t,n,r){if(v[e])return void v[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var l=a[u];if(l.getAttribute("src")==e||l.getAttribute("data-rspack")=="@nocobase/plugin-notification-manager:"+n){o=l;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:"+n),o.src=e),v[e]=[t];var c=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=v[e];if(delete v[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.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&&(h=d.g.location+"");var v,h,g=d.g.document;if(!h&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(h=g.currentScript.src),!h)){var w=g.getElementsByTagName("script");if(w.length)for(var O=w.length-1;O>-1&&(!h||!/^http(s?):/.test(h));)h=w[O--].src}if(!h)throw Error("Automatic publicPath is not supported in this browser");return d.p=h.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f={889:0},d.f.j=function(e,t){var n=d.o(f,e)?f[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var o=d.p+d.u(e),i=Error();d.l(o,function(t){if(d.o(f,e)&&(0!==(n=f[e])&&(f[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)}},p=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],u=0;if(o.some(function(e){return 0!==f[e]})){for(n in i)d.o(i,n)&&(d.m[n]=i[n]);a&&a(d)}for(e&&e(t);u<o.length;u++)r=o[u],d.o(f,r)&&f[r]&&f[r][0](),f[r]=0},(y=self.webpackChunk_nocobase_plugin_notification_manager=self.webpackChunk_nocobase_plugin_notification_manager||[]).forEach(p.bind(null,0)),y.push=p.bind(null,y.push.bind(y)),d(633),d(265)}()});
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
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}()});
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){var r=window.__nocobase_modern_client_prefix__||"v",o="/"+(r=String(r).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var i=window.location.pathname||"/",a=i.indexOf(o);e=a>=0?i.slice(0,a+1):"/"}e&&(e=e.replace(RegExp("/"+r+"/?$"),"/")),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}()});
@@ -10,15 +10,15 @@
10
10
  module.exports = {
11
11
  "react": "18.2.0",
12
12
  "antd": "5.24.2",
13
- "@nocobase/client": "2.1.0-beta.43",
14
- "@nocobase/utils": "2.1.0-beta.43",
15
- "@nocobase/flow-engine": "2.1.0-beta.43",
13
+ "@nocobase/client": "2.1.0-beta.45",
14
+ "@nocobase/utils": "2.1.0-beta.45",
15
+ "@nocobase/flow-engine": "2.1.0-beta.45",
16
16
  "react-i18next": "11.18.6",
17
- "@nocobase/client-v2": "2.1.0-beta.43",
18
- "@nocobase/database": "2.1.0-beta.43",
19
- "@nocobase/server": "2.1.0-beta.43",
20
- "@nocobase/cache": "2.1.0-beta.43",
21
- "@nocobase/logger": "2.1.0-beta.43",
17
+ "@nocobase/client-v2": "2.1.0-beta.45",
18
+ "@nocobase/database": "2.1.0-beta.45",
19
+ "@nocobase/server": "2.1.0-beta.45",
20
+ "@nocobase/cache": "2.1.0-beta.45",
21
+ "@nocobase/logger": "2.1.0-beta.45",
22
22
  "@formily/react": "2.3.7",
23
23
  "@formily/core": "2.3.7",
24
24
  "ahooks": "3.7.8",
@@ -27,5 +27,5 @@ module.exports = {
27
27
  "dayjs": "1.11.13",
28
28
  "@formily/shared": "2.3.7",
29
29
  "@formily/antd-v5": "1.2.3",
30
- "@nocobase/plugin-workflow": "2.1.0-beta.43"
30
+ "@nocobase/plugin-workflow": "2.1.0-beta.45"
31
31
  };
@@ -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-06-02T14:17:28.752Z"}
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-06-08T04:33:20.663Z"}
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.43",
9
+ "version": "2.1.0-beta.45",
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",
@@ -36,5 +36,5 @@
36
36
  "Notification"
37
37
  ],
38
38
  "license": "Apache-2.0",
39
- "gitHead": "6d7750e2373bf2451d246de88cc1f62491685e18"
39
+ "gitHead": "42587115fc34c3eb01ef2b2549f1c998e5708318"
40
40
  }