@nocobase/plugin-notification-in-app-message 2.2.0-alpha.7 → 2.2.0-beta.10
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.
- package/dist/client/index.js +1 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/plugin.d.ts +5 -0
- package/dist/externalVersion.js +10 -12
- package/dist/node_modules/uuid/package.json +1 -1
- package/package.json +2 -4
- package/dist/client/840.ce9ba2a36037778a.js +0 -10
- package/dist/client-v2/821.ea74c740c488d845.js +0 -10
- package/dist/client-v2/839.1731373ad55724b2.js +0 -10
- package/dist/client-v2/components/ContentConfigForm.d.ts +0 -12
- package/dist/client-v2/components/MessageConfigForm.d.ts +0 -12
package/dist/client-v2/index.js
CHANGED
|
@@ -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("@emotion/css"),require("@nocobase/plugin-notification-manager/client-v2"),require("@nocobase/client-v2"),require("react-router-dom"),require("@dnd-kit/sortable"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@dnd-kit/core"),require("@nocobase/utils/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-notification-in-app-message/client-v2",["ahooks","react-i18next","@emotion/css","@nocobase/plugin-notification-manager/client-v2","@nocobase/client-v2","react-router-dom","@dnd-kit/sortable","react","antd","@nocobase/plugin-workflow/client-v2","@ant-design/icons","@nocobase/flow-engine","@dnd-kit/core","@nocobase/utils/client"],n):"object"==typeof exports?exports["@nocobase/plugin-notification-in-app-message/client-v2"]=n(require("ahooks"),require("react-i18next"),require("@emotion/css"),require("@nocobase/plugin-notification-manager/client-v2"),require("@nocobase/client-v2"),require("react-router-dom"),require("@dnd-kit/sortable"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@dnd-kit/core"),require("@nocobase/utils/client")):e["@nocobase/plugin-notification-in-app-message/client-v2"]=n(e.ahooks,e["react-i18next"],e["@emotion/css"],e["@nocobase/plugin-notification-manager/client-v2"],e["@nocobase/client-v2"],e["react-router-dom"],e["@dnd-kit/sortable"],e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@dnd-kit/core"],e["@nocobase/utils/client"])}(self,function(e,n,t,r,o,i,c,a,u,l,s,f,p,b){return function(){"use strict";var d,g,v,h={247:function(e,n,t){t.d(n,{A:function(){return o},e:function(){return i}});var r=null;function o(e){r=e}function i(){return r}},488:function(e,n,t){t.d(n,{MZ:function(){return l},kj:function(){return u},mG:function(){return a}});var r=t(694),o=t(953),i="notification-in-app-message",c="@nocobase/plugin-notification-in-app-message";function a(){return(0,o.useTranslation)([i,c,"client"],{nsMode:"fallback"})}function u(){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,c,"client"],nsMode:"fallback"},t))}}function l(e){return(0,r.tExpr)(e,{ns:[i,c,"client"]})}},375:function(e){e.exports=s},799:function(e){e.exports=p},428:function(e){e.exports=c},477:function(e){e.exports=t},485:function(e){e.exports=o},694:function(e){e.exports=f},341:function(e){e.exports=r},197:function(e){e.exports=l},768:function(e){e.exports=b},625:function(n){n.exports=e},59:function(e){e.exports=u},155:function(e){e.exports=a},953:function(e){e.exports=n},442:function(e){e.exports=i}},m={};function y(e){var n=m[e];if(void 0!==n)return n.exports;var t=m[e]={exports:{}};return h[e].call(t.exports,t,t.exports,y),t.exports}y.m=h,y.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return y.d(n,{a:n}),n},y.d=function(e,n){for(var t in n)y.o(n,t)&&!y.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},y.f={},y.e=function(e){return Promise.all(Object.keys(y.f).reduce(function(n,t){return y.f[t](e,n),n},[]))},y.u=function(e){return""+e+"."+({297:"503d86e234fdb749",821:"ea74c740c488d845",839:"1731373ad55724b2"})[e]+".js"},y.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),y.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},w={},y.l=function(e,n,t,r){if(w[e])return void w[e].push(n);if(void 0!==t)for(var o,i,c=document.getElementsByTagName("script"),a=0;a<c.length;a++){var u=c[a];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@nocobase/plugin-notification-in-app-message/client-v2:"+t){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,y.nc&&o.setAttribute("nonce",y.nc),o.setAttribute("data-rspack","@nocobase/plugin-notification-in-app-message/client-v2:"+t),o.src=e),w[e]=[n];var l=function(n,t){o.onerror=o.onload=null,clearTimeout(s);var r=w[e];if(delete w[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)},y.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},y.g.importScripts&&(_=y.g.location+"");var w,_,x=y.g.document;if(!_&&x&&(x.currentScript&&"SCRIPT"===x.currentScript.tagName.toUpperCase()&&(_=x.currentScript.src),!_)){var k=x.getElementsByTagName("script");if(k.length)for(var O=k.length-1;O>-1&&(!_||!/^http(s?):/.test(_));)_=k[O--].src}if(!_)throw Error("Automatic publicPath is not supported in this browser");y.p=_.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d={889:0},y.f.j=function(e,n){var t=y.o(d,e)?d[e]:void 0;if(0!==t)if(t)n.push(t[2]);else{var r=new Promise(function(n,r){t=d[e]=[n,r]});n.push(t[2]=r);var o=y.p+y.u(e),i=Error();y.l(o,function(n){if(y.o(d,e)&&(0!==(t=d[e])&&(d[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)}},g=function(e,n){var t,r,o=n[0],i=n[1],c=n[2],a=0;if(o.some(function(e){return 0!==d[e]})){for(t in i)y.o(i,t)&&(y.m[t]=i[t]);c&&c(y)}for(e&&e(n);a<o.length;a++)r=o[a],y.o(d,r)&&d[r]&&d[r][0](),d[r]=0},(v=self.webpackChunk_nocobase_plugin_notification_in_app_message_client_v2=self.webpackChunk_nocobase_plugin_notification_in_app_message_client_v2||[]).forEach(g.bind(null,0)),v.push=g.bind(null,v.push.bind(v));var j={};return!function(){var e="",n="u">typeof document?document.currentScript:null;if(n&&n.src){var t=n.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");t.indexOf("/static/plugins/@nocobase/plugin-notification-in-app-message/dist/client-v2/")>=0&&(e=t.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-notification-in-app-message/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var c=window.location.pathname||"/",a=c.indexOf(i);e=a>=0?c.slice(0,a+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-notification-in-app-message/dist/client-v2/"}y.p=e}(),!function(){y.r(j),y.d(j,{PluginNotificationInAppMessageClientV2:function(){return d},NAMESPACE:function(){return b},default:function(){return g}});var e=y(485),n=y(341),t=y.n(n),r=y(247),o=y(488);function i(e,n,t,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){t(e);return}a.done?n(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var c=e.apply(n,t);function a(e){i(c,r,o,a,u,"next",e)}function u(e){i(c,r,o,a,u,"throw",e)}a(void 0)})}}function a(e,n,t){return(a=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 u(e){return(u=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 a(e,arguments,u(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:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(c,"next",{value:u(0)}),a(c,"throw",{value:u(1)}),a(c,"return",{value:u(2)}),"function"==typeof Symbol&&a(c,Symbol.iterator,{value:function(){return this}}),c;function u(a){return function(u){var l=[a,u];if(t)throw TypeError("Generator is already executing.");for(;c&&(c=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-in-app-message",d=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function i(){var e,n;if(!(this instanceof i))throw TypeError("Cannot call a class as a function");return e=i,n=arguments,e=u(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(e,n||[],u(this).constructor):e.apply(this,n))}return i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),e&&l(i,e),n=[{key:"beforeLoad",value:function(){return c(function(){var e;return p(this,function(n){return(e=this.pm.get(t()))&&e.registerChannelType({type:"in-app-message",title:(0,o.MZ)("In-app message"),components:{ContentConfigFormLoader:function(){return y.e("821").then(y.bind(y,68))},MessageConfigFormLoader:function(){return y.e("839").then(y.bind(y,138))}},meta:{creatable:!0,editable:!0,deletable:!0}}),[2]})}).call(this)}},{key:"load",value:function(){return c(function(){return p(this,function(e){return(0,r.A)(this.app.apiClient),this.flowEngine.registerModelLoaders({InboxTopbarActionModel:{extends:"TopbarActionModel",loader:function(){return y.e("297").then(y.bind(y,8))}}}),[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)}}(i.prototype,n),i}(s(e.Plugin)),g=d}(),j}()});
|
|
10
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("ahooks"),require("react-i18next"),require("@emotion/css"),require("@nocobase/plugin-notification-manager/client-v2"),require("@nocobase/client-v2"),require("react-router-dom"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-notification-in-app-message/client-v2",["ahooks","react-i18next","@emotion/css","@nocobase/plugin-notification-manager/client-v2","@nocobase/client-v2","react-router-dom","react","antd","@ant-design/icons","@nocobase/flow-engine","@nocobase/utils/client"],n):"object"==typeof exports?exports["@nocobase/plugin-notification-in-app-message/client-v2"]=n(require("ahooks"),require("react-i18next"),require("@emotion/css"),require("@nocobase/plugin-notification-manager/client-v2"),require("@nocobase/client-v2"),require("react-router-dom"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):e["@nocobase/plugin-notification-in-app-message/client-v2"]=n(e.ahooks,e["react-i18next"],e["@emotion/css"],e["@nocobase/plugin-notification-manager/client-v2"],e["@nocobase/client-v2"],e["react-router-dom"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"])}(self,function(e,n,t,r,o,i,c,a,u,l,s){return function(){"use strict";var f,p,b,d={247:function(e,n,t){t.d(n,{A:function(){return o},e:function(){return i}});var r=null;function o(e){r=e}function i(){return r}},488:function(e,n,t){t.d(n,{MZ:function(){return l},kj:function(){return u},mG:function(){return a}});var r=t(694),o=t(953),i="notification-in-app-message",c="@nocobase/plugin-notification-in-app-message";function a(){return(0,o.useTranslation)([i,c,"client"],{nsMode:"fallback"})}function u(){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,c,"client"],nsMode:"fallback"},t))}}function l(e){return(0,r.tExpr)(e,{ns:[i,c,"client"]})}},375:function(e){e.exports=u},477:function(e){e.exports=t},485:function(e){e.exports=o},694:function(e){e.exports=l},341:function(e){e.exports=r},768:function(e){e.exports=s},625:function(n){n.exports=e},59:function(e){e.exports=a},155:function(e){e.exports=c},953:function(e){e.exports=n},442:function(e){e.exports=i}},g={};function v(e){var n=g[e];if(void 0!==n)return n.exports;var t=g[e]={exports:{}};return d[e].call(t.exports,t,t.exports,v),t.exports}v.m=d,v.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return v.d(n,{a:n}),n},v.d=function(e,n){for(var t in n)v.o(n,t)&&!v.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},v.f={},v.e=function(e){return Promise.all(Object.keys(v.f).reduce(function(n,t){return v.f[t](e,n),n},[]))},v.u=function(e){return""+e+".503d86e234fdb749.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,n){return Object.prototype.hasOwnProperty.call(e,n)},h={},v.l=function(e,n,t,r){if(h[e])return void h[e].push(n);if(void 0!==t)for(var o,i,c=document.getElementsByTagName("script"),a=0;a<c.length;a++){var u=c[a];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@nocobase/plugin-notification-in-app-message/client-v2:"+t){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,v.nc&&o.setAttribute("nonce",v.nc),o.setAttribute("data-rspack","@nocobase/plugin-notification-in-app-message/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)},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&&(m=v.g.location+"");var h,m,y=v.g.document;if(!m&&y&&(y.currentScript&&"SCRIPT"===y.currentScript.tagName.toUpperCase()&&(m=y.currentScript.src),!m)){var w=y.getElementsByTagName("script");if(w.length)for(var _=w.length-1;_>-1&&(!m||!/^http(s?):/.test(m));)m=w[_--].src}if(!m)throw Error("Automatic publicPath is not supported in this browser");v.p=m.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f={889:0},v.f.j=function(e,n){var t=v.o(f,e)?f[e]:void 0;if(0!==t)if(t)n.push(t[2]);else{var r=new Promise(function(n,r){t=f[e]=[n,r]});n.push(t[2]=r);var o=v.p+v.u(e),i=Error();v.l(o,function(n){if(v.o(f,e)&&(0!==(t=f[e])&&(f[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)}},p=function(e,n){var t,r,o=n[0],i=n[1],c=n[2],a=0;if(o.some(function(e){return 0!==f[e]})){for(t in i)v.o(i,t)&&(v.m[t]=i[t]);c&&c(v)}for(e&&e(n);a<o.length;a++)r=o[a],v.o(f,r)&&f[r]&&f[r][0](),f[r]=0},(b=self.webpackChunk_nocobase_plugin_notification_in_app_message_client_v2=self.webpackChunk_nocobase_plugin_notification_in_app_message_client_v2||[]).forEach(p.bind(null,0)),b.push=p.bind(null,b.push.bind(b));var x={};return!function(){var e="",n="u">typeof document?document.currentScript:null;if(n&&n.src){var t=n.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");t.indexOf("/static/plugins/@nocobase/plugin-notification-in-app-message/dist/client-v2/")>=0&&(e=t.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-notification-in-app-message/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var c=window.location.pathname||"/",a=c.indexOf(i);e=a>=0?c.slice(0,a+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-notification-in-app-message/dist/client-v2/"}v.p=e}(),!function(){v.r(x),v.d(x,{PluginNotificationInAppMessageClientV2:function(){return d},NAMESPACE:function(){return b},default:function(){return g}});var e=v(485),n=v(341),t=v.n(n),r=v(247),o=v(488);function i(e,n,t,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){t(e);return}a.done?n(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var c=e.apply(n,t);function a(e){i(c,r,o,a,u,"next",e)}function u(e){i(c,r,o,a,u,"throw",e)}a(void 0)})}}function a(e,n,t){return(a=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 u(e){return(u=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 a(e,arguments,u(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:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(c,"next",{value:u(0)}),a(c,"throw",{value:u(1)}),a(c,"return",{value:u(2)}),"function"==typeof Symbol&&a(c,Symbol.iterator,{value:function(){return this}}),c;function u(a){return function(u){var l=[a,u];if(t)throw TypeError("Generator is already executing.");for(;c&&(c=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-in-app-message",d=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function i(){var e,n;if(!(this instanceof i))throw TypeError("Cannot call a class as a function");return e=i,n=arguments,e=u(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(e,n||[],u(this).constructor):e.apply(this,n))}return i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),e&&l(i,e),n=[{key:"beforeLoad",value:function(){return c(function(){var e;return p(this,function(n){return(e=this.pm.get(t()))&&e.registerChannelType({type:"in-app-message",title:(0,o.MZ)("In-app message"),components:{},meta:{creatable:!0,editable:!0,deletable:!0}}),[2]})}).call(this)}},{key:"load",value:function(){return c(function(){return p(this,function(e){return(0,r.A)(this.app.apiClient),this.flowEngine.registerModelLoaders({InboxTopbarActionModel:{extends:"TopbarActionModel",loader:function(){return v.e("297").then(v.bind(v,8))}}}),[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)}}(i.prototype,n),i}(s(e.Plugin)),g=d}(),x}()});
|
|
@@ -8,8 +8,13 @@
|
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* TODO (deferred to follow-up v2 migrations):
|
|
11
|
+
* - Editing UI: MessageConfigForm / ContentConfigForm / configFormCommonFieldset
|
|
12
|
+
* depend on `@nocobase/plugin-workflow` v2 (variable scope, UsersSelect/UsersAddition
|
|
13
|
+
* query mode). Will be added when workflow's client-v2 lands.
|
|
11
14
|
* - Mobile shell: MobileChannelPage / MobileMessagePage / MobileTabBarMessageItem /
|
|
12
15
|
* messageSchemaInitializerItem depend on `@nocobase/plugin-mobile` v2.
|
|
16
|
+
* - Triple-brace variable picker (`{{{ ... }}}`) needs `VariableInput.delimiters`
|
|
17
|
+
* support in `@nocobase/client-v2`, additive change.
|
|
13
18
|
*/
|
|
14
19
|
import { Plugin } from '@nocobase/client-v2';
|
|
15
20
|
import type { Application } from '@nocobase/client-v2';
|
package/dist/externalVersion.js
CHANGED
|
@@ -9,28 +9,26 @@
|
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"react": "18.2.0",
|
|
12
|
-
"@nocobase/client": "2.2.0-
|
|
13
|
-
"@nocobase/plugin-notification-manager": "2.2.0-
|
|
14
|
-
"@nocobase/plugin-mobile": "2.2.0-
|
|
15
|
-
"@nocobase/utils": "2.2.0-
|
|
16
|
-
"@nocobase/client-v2": "2.2.0-
|
|
17
|
-
"@nocobase/flow-engine": "2.2.0-
|
|
12
|
+
"@nocobase/client": "2.2.0-beta.10",
|
|
13
|
+
"@nocobase/plugin-notification-manager": "2.2.0-beta.10",
|
|
14
|
+
"@nocobase/plugin-mobile": "2.2.0-beta.10",
|
|
15
|
+
"@nocobase/utils": "2.2.0-beta.10",
|
|
16
|
+
"@nocobase/client-v2": "2.2.0-beta.10",
|
|
17
|
+
"@nocobase/flow-engine": "2.2.0-beta.10",
|
|
18
18
|
"react-i18next": "11.18.6",
|
|
19
19
|
"dayjs": "1.11.13",
|
|
20
|
-
"@nocobase/database": "2.2.0-
|
|
21
|
-
"@nocobase/server": "2.2.0-
|
|
20
|
+
"@nocobase/database": "2.2.0-beta.10",
|
|
21
|
+
"@nocobase/server": "2.2.0-beta.10",
|
|
22
22
|
"sequelize": "6.35.2",
|
|
23
|
-
"@nocobase/actions": "2.2.0-
|
|
23
|
+
"@nocobase/actions": "2.2.0-beta.10",
|
|
24
24
|
"antd": "5.24.2",
|
|
25
25
|
"antd-style": "3.7.1",
|
|
26
26
|
"@emotion/css": "11.13.0",
|
|
27
27
|
"@formily/react": "2.3.7",
|
|
28
|
-
"@nocobase/plugin-workflow": "2.2.0-
|
|
28
|
+
"@nocobase/plugin-workflow": "2.2.0-beta.10",
|
|
29
29
|
"react-router-dom": "6.30.1",
|
|
30
30
|
"@formily/reactive": "2.3.7",
|
|
31
31
|
"ahooks": "3.7.8",
|
|
32
32
|
"@ant-design/icons": "5.6.1",
|
|
33
|
-
"@dnd-kit/core": "6.1.0",
|
|
34
|
-
"@dnd-kit/sortable": "7.0.2",
|
|
35
33
|
"@formily/shared": "2.3.7"
|
|
36
34
|
};
|
|
@@ -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-07-
|
|
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-07-09T02:57:07.972Z"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-notification-in-app-message",
|
|
3
|
-
"version": "2.2.0-
|
|
3
|
+
"version": "2.2.0-beta.10",
|
|
4
4
|
"displayName": "Notification: In-app message",
|
|
5
5
|
"displayName.ru-RU": "Уведомления: Всплывающие сообщения внутри приложения",
|
|
6
6
|
"displayName.zh-CN": "通知:站内信",
|
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
"immer": "^10.1.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@dnd-kit/core": "^6.0.0",
|
|
22
|
-
"@dnd-kit/sortable": "^7.0.0",
|
|
23
21
|
"antd-mobile": "^5.38"
|
|
24
22
|
},
|
|
25
23
|
"peerDependencies": {
|
|
@@ -35,5 +33,5 @@
|
|
|
35
33
|
"react-router-dom": "^6.x"
|
|
36
34
|
},
|
|
37
35
|
"license": "Apache-2.0",
|
|
38
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "d572beec24de46df948f28db72b25303a63bf62d"
|
|
39
37
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_notification_in_app_message=self.webpackChunk_nocobase_plugin_notification_in_app_message||[]).push([["840"],{5363:function(e,t,r){r.r(t),r.d(t,{MessageConfigForm:function(){return k},default:function(){return E}});var n=r(7375),a=r(9341),i=r(197),o=r(6799),l=r(5428),s=r(2059),c=r(9155),u=r.n(c),f=r(7694),m=r(5953),p="notification-in-app-message",b="@nocobase/plugin-notification-in-app-message";function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t,r,n,a,i,o){try{var l=e[i](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,a)}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function g(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return y(e,void 0);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 y(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return g(null!=e?e:[]).concat(g(r))}var O=u().createContext(null);function w(e){var t=(0,l.useSortable)({id:e.id}),r=t.attributes,n=t.isDragging,a=t.listeners,i=t.setActivatorNodeRef,o=t.setNodeRef,s=t.transform,c=t.transition;return u().createElement(O.Provider,{value:{attributes:r,listeners:a,setActivatorNodeRef:i}},u().createElement("div",{ref:o,style:v({transform:s?"translate3d(".concat(s.x,"px, ").concat(s.y,"px, 0)"):void 0,transition:c,width:"100%"},n?{position:"relative",zIndex:1}:null)},e.children))}function x(){var e,t,r=u().useContext(O),a=s.theme.useToken().token;return u().createElement("span",(e=v({ref:null==r?void 0:r.setActivatorNodeRef},null==r?void 0:r.attributes,null==r?void 0:r.listeners),t=t={style:{alignItems:"center",color:a.colorTextTertiary,cursor:"grab",display:"inline-flex"}},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e),u().createElement(n.MenuOutlined,null))}function k(e){var t,r=(0,m.useTranslation)([p,b,"client"],{nsMode:"fallback"}).t,c=(t=(0,f.useFlowEngine)(),function(e,r){return t.context.t(e,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({ns:[p,b,"client"],nsMode:"fallback"},r))}),y=s.Form.useFormInstance(),v=h(e.namePrefix,"receivers"),g=s.Form.useWatch(v,y),O=Array.isArray(g)?g:[],k=(0,o.useSensors)((0,o.useSensor)(o.PointerSensor,{activationConstraint:{distance:1}}));return u().createElement(u().Fragment,null,u().createElement(s.Form.List,{name:v,rules:[{validator:function(e,t){var n;return(n=function(){return function(e,t){var r,n,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&c[0]?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){i.label=c[1];break}if(6===c[0]&&i.label<a[1]){i.label=a[1],a=c;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(c);break}a[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){if(Array.isArray(t)&&t.filter(Boolean).length>0)return[2];throw Error(r("The field value is required"))})},function(){var e=this,t=arguments;return new Promise(function(r,a){var i=n.apply(e,t);function o(e){d(i,r,a,o,l,"next",e)}function l(e){d(i,r,a,o,l,"throw",e)}o(void 0)})})()}}]},function(t,i,f){var m=f.errors;return u().createElement(s.Form.Item,{label:r("Receivers"),required:!0,extra:c("When select receivers from node result, only support ID of user (or IDs array of users). Others will not match any user."),validateStatus:m.length?"error":void 0,help:m[0]},u().createElement(s.Flex,{vertical:!0,gap:"small",style:{width:"100%"}},u().createElement(o.DndContext,{sensors:k,collisionDetection:o.closestCenter,onDragEnd:function(e){var r=e.active,n=e.over;if(n&&r.id!==n.id){var a=t.map(function(e){return String(e.key)}),o=a.indexOf(String(r.id)),l=a.indexOf(String(n.id));o<0||l<0||o===l||i.move(o,l)}}},u().createElement(l.SortableContext,{items:t.map(function(e){return String(e.key)}),strategy:l.verticalListSortingStrategy},u().createElement(s.Flex,{vertical:!0,gap:"small",style:{width:"100%"}},t.map(function(t){return u().createElement(w,{key:t.key,id:String(t.key)},u().createElement(s.Flex,{gap:"small",align:"center",style:{width:"100%"}},u().createElement(x,null),u().createElement("div",{style:{flex:1,minWidth:0}},u().createElement(s.Form.Item,{name:t.name,noStyle:!0},u().createElement(a.UserSelect,{variableOptions:e.variableOptions}))),u().createElement(s.Button,{type:"text",icon:u().createElement(n.DeleteOutlined,null),"aria-label":r("Receivers"),onClick:function(){return i.remove(t.name)}})))})))),u().createElement(a.UserAddition,{value:O,onChange:function(e){return y.setFieldValue(v,e)}})))}),u().createElement(s.Form.Item,{name:h(e.namePrefix,"title"),label:r("Message title"),rules:[{required:!0,message:r("The field value is required")}]},u().createElement(i.WorkflowVariableInput,{variableOptions:{types:["string"]}})),u().createElement(s.Form.Item,{name:h(e.namePrefix,"content"),label:r("Message content"),rules:[{required:!0,message:r("The field value is required")}]},u().createElement(i.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"Hi,",delimiters:["{{{","}}}"]})),u().createElement(s.Form.Item,{name:h(e.namePrefix,"options","url"),label:r("Details page for desktop"),extra:c('Support two types of links: internal links and external links. If using an internal link, the link starts with "/", for example, "/admin". If using an external link, the link starts with "http", for example, "https://example.com".')},u().createElement(i.WorkflowVariableInput,{variableOptions:{types:["string"]}})),u().createElement(s.Form.Item,{name:h(e.namePrefix,"options","mobileUrl"),label:r("Details page for mobile"),extra:c('Support two types of links: internal links and external links. If using an internal link, the link starts with "/", for example, "/m". If using an external link, the link starts with "http", for example, "https://example.com".')},u().createElement(i.WorkflowVariableInput,{variableOptions:{types:["string"]}})),u().createElement(s.Form.Item,{name:h(e.namePrefix,"options","duration"),label:r("Close after"),extra:c("Unit is second. Will not close automatically when set to empty."),initialValue:5},u().createElement(s.InputNumber,null)))}var E=k}}]);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_notification_in_app_message_client_v2=self.webpackChunk_nocobase_plugin_notification_in_app_message_client_v2||[]).push([["821"],{68:function(e,t,n){n.r(t),n.d(t,{ContentConfigForm:function(){return f}});var r=n(197),a=n(59),i=n(155),l=n.n(i),o=n(488);function s(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 m(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return s(e,void 0);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 s(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return m(null!=e?e:[]).concat(m(n))}function f(e){var t=(0,o.mG)().t,n=(0,o.kj)();return l().createElement(l().Fragment,null,l().createElement(a.Form.Item,{name:u(e.namePrefix,"title"),label:t("Message title"),rules:[{required:!0,message:t("The field value is required")}]},l().createElement(r.WorkflowVariableInput,{variableOptions:{types:["string"]}})),l().createElement(a.Form.Item,{name:u(e.namePrefix,"content"),label:t("Message content"),rules:[{required:!0,message:t("The field value is required")}]},l().createElement(r.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"Hi,",delimiters:["{{{","}}}"]})),l().createElement(a.Form.Item,{name:u(e.namePrefix,"options","url"),label:t("Details page for desktop"),extra:n('Support two types of links: internal links and external links. If using an internal link, the link starts with "/", for example, "/admin". If using an external link, the link starts with "http", for example, "https://example.com".')},l().createElement(r.WorkflowVariableInput,{variableOptions:{types:["string"]}})),l().createElement(a.Form.Item,{name:u(e.namePrefix,"options","mobileUrl"),label:t("Details page for mobile"),extra:n('Support two types of links: internal links and external links. If using an internal link, the link starts with "/", for example, "/m". If using an external link, the link starts with "http", for example, "https://example.com".')},l().createElement(r.WorkflowVariableInput,{variableOptions:{types:["string"]}})),l().createElement(a.Form.Item,{name:u(e.namePrefix,"options","duration"),label:t("Close after"),extra:n("Unit is second. Will not close automatically when set to empty."),initialValue:5},l().createElement(a.InputNumber,null)))}t.default=f}}]);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_notification_in_app_message_client_v2=self.webpackChunk_nocobase_plugin_notification_in_app_message_client_v2||[]).push([["839"],{138:function(e,t,r){r.r(t),r.d(t,{MessageConfigForm:function(){return x}});var n=r(375),a=r(341),i=r(197),o=r(799),l=r(428),s=r(59),c=r(155),u=r.n(c),f=r(488);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t,r,n,a,i,o){try{var l=e[i](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,a)}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function d(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return m(e,void 0);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 m(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return d(null!=e?e:[]).concat(d(r))}var v=u().createContext(null);function h(e){var t=(0,l.useSortable)({id:e.id}),r=t.attributes,n=t.isDragging,a=t.listeners,i=t.setActivatorNodeRef,o=t.setNodeRef,s=t.transform,c=t.transition;return u().createElement(v.Provider,{value:{attributes:r,listeners:a,setActivatorNodeRef:i}},u().createElement("div",{ref:o,style:y({transform:s?"translate3d(".concat(s.x,"px, ").concat(s.y,"px, 0)"):void 0,transition:c,width:"100%"},n?{position:"relative",zIndex:1}:null)},e.children))}function g(){var e,t,r=u().useContext(v),a=s.theme.useToken().token;return u().createElement("span",(e=y({ref:null==r?void 0:r.setActivatorNodeRef},null==r?void 0:r.attributes,null==r?void 0:r.listeners),t=t={style:{alignItems:"center",color:a.colorTextTertiary,cursor:"grab",display:"inline-flex"}},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e),u().createElement(n.MenuOutlined,null))}function x(e){var t=(0,f.mG)().t,r=(0,f.kj)(),c=s.Form.useFormInstance(),m=b(e.namePrefix,"receivers"),y=s.Form.useWatch(m,c),d=Array.isArray(y)?y:[],v=(0,o.useSensors)((0,o.useSensor)(o.PointerSensor,{activationConstraint:{distance:1}}));return u().createElement(u().Fragment,null,u().createElement(s.Form.List,{name:m,rules:[{validator:function(e,r){var n;return(n=function(){return function(e,t){var r,n,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&c[0]?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){i.label=c[1];break}if(6===c[0]&&i.label<a[1]){i.label=a[1],a=c;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(c);break}a[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){if(Array.isArray(r)&&r.filter(Boolean).length>0)return[2];throw Error(t("The field value is required"))})},function(){var e=this,t=arguments;return new Promise(function(r,a){var i=n.apply(e,t);function o(e){p(i,r,a,o,l,"next",e)}function l(e){p(i,r,a,o,l,"throw",e)}o(void 0)})})()}}]},function(i,f,p){var y=p.errors;return u().createElement(s.Form.Item,{label:t("Receivers"),required:!0,extra:r("When select receivers from node result, only support ID of user (or IDs array of users). Others will not match any user."),validateStatus:y.length?"error":void 0,help:y[0]},u().createElement(s.Flex,{vertical:!0,gap:"small",style:{width:"100%"}},u().createElement(o.DndContext,{sensors:v,collisionDetection:o.closestCenter,onDragEnd:function(e){var t=e.active,r=e.over;if(r&&t.id!==r.id){var n=i.map(function(e){return String(e.key)}),a=n.indexOf(String(t.id)),o=n.indexOf(String(r.id));a<0||o<0||a===o||f.move(a,o)}}},u().createElement(l.SortableContext,{items:i.map(function(e){return String(e.key)}),strategy:l.verticalListSortingStrategy},u().createElement(s.Flex,{vertical:!0,gap:"small",style:{width:"100%"}},i.map(function(r){return u().createElement(h,{key:r.key,id:String(r.key)},u().createElement(s.Flex,{gap:"small",align:"center",style:{width:"100%"}},u().createElement(g,null),u().createElement("div",{style:{flex:1,minWidth:0}},u().createElement(s.Form.Item,{name:r.name,noStyle:!0},u().createElement(a.UserSelect,{variableOptions:e.variableOptions}))),u().createElement(s.Button,{type:"text",icon:u().createElement(n.DeleteOutlined,null),"aria-label":t("Receivers"),onClick:function(){return f.remove(r.name)}})))})))),u().createElement(a.UserAddition,{value:d,onChange:function(e){return c.setFieldValue(m,e)}})))}),u().createElement(s.Form.Item,{name:b(e.namePrefix,"title"),label:t("Message title"),rules:[{required:!0,message:t("The field value is required")}]},u().createElement(i.WorkflowVariableInput,{variableOptions:{types:["string"]}})),u().createElement(s.Form.Item,{name:b(e.namePrefix,"content"),label:t("Message content"),rules:[{required:!0,message:t("The field value is required")}]},u().createElement(i.WorkflowVariableTextArea,{autoSize:{minRows:10},placeholder:"Hi,",delimiters:["{{{","}}}"]})),u().createElement(s.Form.Item,{name:b(e.namePrefix,"options","url"),label:t("Details page for desktop"),extra:r('Support two types of links: internal links and external links. If using an internal link, the link starts with "/", for example, "/admin". If using an external link, the link starts with "http", for example, "https://example.com".')},u().createElement(i.WorkflowVariableInput,{variableOptions:{types:["string"]}})),u().createElement(s.Form.Item,{name:b(e.namePrefix,"options","mobileUrl"),label:t("Details page for mobile"),extra:r('Support two types of links: internal links and external links. If using an internal link, the link starts with "/", for example, "/m". If using an external link, the link starts with "http", for example, "https://example.com".')},u().createElement(i.WorkflowVariableInput,{variableOptions:{types:["string"]}})),u().createElement(s.Form.Item,{name:b(e.namePrefix,"options","duration"),label:t("Close after"),extra:r("Unit is second. Will not close automatically when set to empty."),initialValue:5},u().createElement(s.InputNumber,null)))}t.default=x}}]);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import type { ContentConfigFormProps } from '@nocobase/plugin-notification-manager/client-v2';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
export declare function ContentConfigForm(props: ContentConfigFormProps): React.JSX.Element;
|
|
12
|
-
export default ContentConfigForm;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import type { MessageConfigFormProps } from '@nocobase/plugin-notification-manager/client-v2';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
export declare function MessageConfigForm(props: MessageConfigFormProps): React.JSX.Element;
|
|
12
|
-
export default MessageConfigForm;
|