@tachybase/plugin-manual-notification 1.3.16 → 1.3.18

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.
@@ -1 +1 @@
1
- (function(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@tachybase/client"),require("@tachybase/schema"),require("react/jsx-runtime"),require("antd")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/schema","react/jsx-runtime","antd"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o["@tachybase/plugin-manual-notification"]={},o["@tachybase/client"],o["@tachybase/schema"],o.jsxRuntime,o.antd))})(this,function(o,e,n,a,l){"use strict";var D=Object.defineProperty,N=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var v=(o,e,n)=>e in o?D(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,x=(o,e)=>{for(var n in e||(e={}))I.call(e,n)&&v(o,n,e[n]);if(g)for(var n of g(e))V.call(e,n)&&v(o,n,e[n]);return o},b=(o,e)=>N(o,B(e));var m=(o,e,n)=>new Promise((a,l)=>{var t=r=>{try{i(n.next(r))}catch(d){l(d)}},f=r=>{try{i(n.throw(r))}catch(d){l(d)}},i=r=>r.done?a(r.value):Promise.resolve(r.value).then(t,f);i((n=n.apply(o,e)).next())});const t="@tachybase/plugin-manual-notification";function f(c,p={}){return e.i18n.t(c,b(x({},p),{ns:t}))}const i={name:"notificationConfigs",fields:[{name:"id",interface:"id",type:"bigInt",autoIncrement:!0,uiSchema:{type:"number",title:'{{t("ID")}}',"x-component":"InputNumber","x-read-pretty":!0}},{interface:"input",type:"string",name:"title",uiSchema:{type:"string",title:`{{t("Notification title", { ns: "${t}" })}}`,"x-component":"Input"}},{interface:"input",type:"string",name:"detail",uiSchema:{type:"string",title:`{{t("Detail", { ns: "${t}" })}}`,"x-component":"Input.TextArea"}},{interface:"input",type:"number",name:"duration",uiSchema:{type:"number",title:`{{t("Notification duration", { ns: "${t}" })}}`,description:`{{t('Set to manual close when this item is empty', { ns: "${t}" })}}`,"x-component":"InputNumber","x-read-pretty":!0,"x-component-props":{min:0,max:99999,suffix:"s"}}},{interface:"select",type:"string",name:"notifyType",uiSchema:{type:"string",title:`{{t("Notification type", { ns: "${t}" })}}`,"x-component":"Select",enum:[{value:e.NoticeType.MODAL,label:`{{t("modal", { ns: "${t}" })}}`,description:`{{t("modal_description", { ns: "${t}" })}}`},{value:e.NoticeType.NOTIFICATION,label:`{{t("notification", { ns: "${t}" })}}`,description:`{{t("notification_description", { ns: "${t}" })}}`},{value:e.NoticeType.STATUS,label:`{{t("status", { ns: "${t}" })}}`,description:`{{t("status_description", { ns: "${t}" })}}`},{value:e.NoticeType.TOAST,label:`{{t("toast", { ns: "${t}" })}}`,description:`{{t("toast_description", { ns: "${t}" })}}`}]}},{interface:"select",type:"string",name:"level",uiSchema:{type:"string",title:`{{t("Notification level", { ns: "${t}" })}}`,"x-component":"Select",enum:[{value:"info",label:`{{t("info", { ns: "${t}" })}}`,color:"blue"},{value:"success",label:`{{t("success", { ns: "${t}" })}}`,color:"green"},{value:"error",label:`{{t("error", { ns: "${t}" })}}`,color:"red"},{value:"warning",label:`{{t("warning", { ns: "${t}" })}}`,color:"yellow"}]}},{name:"endTime",type:"date",interface:"createdAt",uiSchema:{type:"datetime",title:`{{t("End time", { ns: "${t}" })}}`,"x-component":"DatePicker","x-component-props":{showTime:!0,disabledDate:c=>c&&c<new Date}}}]},r=()=>{const c=e.useDataBlockResource(),p=e.useCollectionRecordData();return{onClick(){return m(this,null,function*(){if(p)try{yield c.send(x({},p))}catch(u){console.error("send failed:",u)}})}}};function d({data:c}){const{label:p,color:s,description:u}=c,y=e.useCompile();return a.jsxs(l.Space,{direction:"vertical",children:[a.jsx(l.Tag,{color:s,children:y(p)}),a.jsx(l.Typography.Text,{type:"secondary",style:{whiteSpace:"normal"},children:y(u)})]})}const C={notifyType:{"x-component":"CollectionField","x-decorator":"FormItem","x-component-props":{optionRender:d,popupMatchSelectWidth:!0,listHeight:300}},level:{"x-component":"CollectionField","x-decorator":"FormItem","x-component-props":{optionRender:d,popupMatchSelectWidth:!0,listHeight:300},"x-visible":'{{ $self.query(".notifyType").value() !== "status"}}'},title:{"x-component":"CollectionField","x-decorator":"FormItem","x-visible":'{{$self.query(".notifyType").value() !== "status" && $self.query(".notifyType").value() !== "toast"}}'},detail:{"x-component":"CollectionField","x-decorator":"FormItem",required:!0},duration:{"x-component":"CollectionField","x-decorator":"FormItem","x-visible":'{{$self.query(".notifyType").value() !== "status"}}'},endTime:{"x-component":"CollectionField","x-decorator":"FormItem"}},A={type:"void","x-action":"create","x-acl-action":"create",title:"{{t('Add new')}}","x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{openMode:"drawer",type:"primary",component:"CreateRecordAction",icon:"PlusOutlined"},"x-align":"right","x-acl-action-props":{skipScopeCheck:!0},properties:{drawer:{type:"void",title:`{{ t("Add notification", { ns: "${t}" }) }}`,"x-component":"Action.Container","x-component-props":{className:"tb-action-popup"},properties:{body:{type:"void","x-acl-action-props":{skipScopeCheck:!0},"x-acl-action":"notificationConfigs:create","x-decorator":"FormBlockProvider","x-use-decorator-props":"useCreateFormBlockDecoratorProps","x-decorator-props":{dataSource:"main",collection:i},"x-component":"CardItem",properties:{form:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:x({actionBar:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:24}},properties:{cancel:{title:'{{ t("Cancel") }}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{ t("Submit") }}',"x-component":"Action","x-use-component-props":"useCreateActionProps","x-component-props":{type:"primary",htmlType:"submit"},"x-action-settings":{assignedValues:{},triggerWorkflows:[],pageMode:!1}}}}},C)}}}}}}},T={type:"void",title:'{{ t("Edit") }}',"x-action":"update","x-component":"Action.Link","x-component-props":{openMode:"drawer",icon:"EditOutlined"},"x-decorator":"ACLActionProvider",properties:{drawer:{type:"void",title:`{{ t("Edit notification", { ns: "${t}" }) }}`,"x-component":"Action.Container","x-component-props":{openMode:"drawer",className:"tb-action-popup"},properties:{card:{type:"void","x-acl-action-props":{skipScopeCheck:!1},"x-acl-action":`${i.name}:update`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useEditFormBlockDecoratorProps","x-decorator-props":{action:"get",dataSource:"main",collection:i},"x-component":"CardItem",properties:{form:{type:"void","x-component":"FormV2","x-use-component-props":"useEditFormBlockProps",properties:x({actionBar:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:24}},properties:{cancel:{title:'{{ t("Cancel") }}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{ t("Submit") }}',"x-component":"Action","x-use-component-props":"useUpdateActionProps","x-component-props":{type:"primary"},"x-action-settings":{isDeltaChanged:!0}}}}},C)}}}}}}},S={type:"void",properties:{notificationconfig:{type:"void","x-decorator":"TableBlockProvider","x-decorator-props":{collection:i,action:"list",params:{pageSize:50,sort:["-createdAt"]}},title:`{{t("Notification Config", { ns: "${t}" })}}`,properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action","x-action":"destroy","x-decorator":"ACLActionProvider","x-use-component-props":"useBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"},actionCallback:"{{ dataSourceDeleteCallback }}"}},create:A}},table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"key",rowSelection:{type:"checkbox"}},properties:{id:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:20,align:"left"},properties:{id:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},notifyType:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:50,align:"center"},properties:{notifyType:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},title:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{align:"left"},properties:{title:{type:"string","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0}}},detail:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{align:"left"},properties:{detail:{type:"string","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0}}},level:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:50,align:"center"},properties:{level:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},duration:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:50,align:"center"},properties:{duration:{type:"string","x-component":"CollectionField","x-disabled":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"TableV2.Column","x-component-props":{width:50,align:"center"},properties:{actions:{type:"void","x-component":"Space",properties:{send:{type:"void",title:`{{t("Send", { ns: "${t}" })}}`,"x-component":"Action.Link","x-component-props":{icon:"WarningOutlined",confirm:{title:`{{t('Send record confirmation', { ns: "${t}" })}}`,content:`{{t('Are you sure you want to send it to all user', { ns: "${t}" })}}`}},"x-use-component-props":"useSendActionProps"},update:T,destroy:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-decorator":"ACLActionProvider","x-component":"Action.Link","x-use-component-props":"useDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}}}}}}}}}}}},$=()=>a.jsx(l.Card,{bordered:!1,children:a.jsx(e.ExtendCollectionsProvider,{collections:[i],children:a.jsx(e.SchemaComponent,{schema:S,scope:{useSendActionProps:r}})})});class P extends e.Plugin{afterAdd(){return m(this,null,function*(){})}beforeLoad(){return m(this,null,function*(){})}load(){return m(this,null,function*(){this.app.systemSettingsManager.add("system-services.manual-notification",{icon:"SettingOutlined",title:f("Manual Notification"),Component:$,aclSnippet:"pm.system-services.manual-notification"}),n.autorun(()=>m(this,null,function*(){var p;try{const{data:s}=yield this.app.apiClient.request({resource:"notificationConfigs",action:"getRecent",params:{}});if(!((p=s==null?void 0:s.data)!=null&&p.length))return;const u=s.data,{notifyType:y,title:F,content:k,level:w,duration:h}=u[0];this.app.noticeManager[y](F,k,w,h,h)}catch(s){console.error("Failed to fetch recent notifications:",s)}}))})}}o.default=P,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@tachybase/client"),require("@tachybase/schema"),require("react/jsx-runtime"),require("antd")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/schema","react/jsx-runtime","antd"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o["@tachybase/plugin-manual-notification"]={},o["@tachybase/client"],o["@tachybase/schema"],o.jsxRuntime,o.antd))})(this,function(o,e,n,a,l){"use strict";var w=Object.defineProperty,N=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var v=(o,e,n)=>e in o?w(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,x=(o,e)=>{for(var n in e||(e={}))O.call(e,n)&&v(o,n,e[n]);if(g)for(var n of g(e))B.call(e,n)&&v(o,n,e[n]);return o},b=(o,e)=>N(o,M(e));var m=(o,e,n)=>new Promise((a,l)=>{var t=r=>{try{i(n.next(r))}catch(d){l(d)}},f=r=>{try{i(n.throw(r))}catch(d){l(d)}},i=r=>r.done?a(r.value):Promise.resolve(r.value).then(t,f);i((n=n.apply(o,e)).next())});const t="@tachybase/plugin-manual-notification";function f(c,p={}){return e.i18n.t(c,b(x({},p),{ns:t}))}const i={name:"notificationConfigs",fields:[{name:"id",interface:"id",type:"bigInt",autoIncrement:!0,uiSchema:{type:"number",title:'{{t("ID")}}',"x-component":"InputNumber","x-read-pretty":!0}},{interface:"input",type:"string",name:"title",uiSchema:{type:"string",title:`{{t("Notification title", { ns: "${t}" })}}`,"x-component":"Input"}},{interface:"input",type:"string",name:"detail",uiSchema:{type:"string",title:`{{t("Detail", { ns: "${t}" })}}`,"x-component":"Input.TextArea"}},{interface:"input",type:"number",name:"duration",uiSchema:{type:"number",title:`{{t("Notification duration", { ns: "${t}" })}}`,description:`{{t('Set to manual close when this item is empty', { ns: "${t}" })}}`,"x-component":"InputNumber","x-read-pretty":!0,"x-component-props":{min:0,max:99999,suffix:"s"}}},{interface:"select",type:"string",name:"notifyType",uiSchema:{type:"string",title:`{{t("Notification type", { ns: "${t}" })}}`,"x-component":"Select",enum:[{value:e.NoticeType.MODAL,label:`{{t("modal", { ns: "${t}" })}}`,description:`{{t("modal_description", { ns: "${t}" })}}`},{value:e.NoticeType.NOTIFICATION,label:`{{t("notification", { ns: "${t}" })}}`,description:`{{t("notification_description", { ns: "${t}" })}}`},{value:e.NoticeType.STATUS,label:`{{t("status", { ns: "${t}" })}}`,description:`{{t("status_description", { ns: "${t}" })}}`},{value:e.NoticeType.TOAST,label:`{{t("toast", { ns: "${t}" })}}`,description:`{{t("toast_description", { ns: "${t}" })}}`}]}},{interface:"select",type:"string",name:"level",uiSchema:{type:"string",title:`{{t("Notification level", { ns: "${t}" })}}`,"x-component":"Select",enum:[{value:"info",label:`{{t("info", { ns: "${t}" })}}`,color:"blue"},{value:"success",label:`{{t("success", { ns: "${t}" })}}`,color:"green"},{value:"error",label:`{{t("error", { ns: "${t}" })}}`,color:"red"},{value:"warning",label:`{{t("warning", { ns: "${t}" })}}`,color:"yellow"}]}},{name:"endTime",type:"date",interface:"createdAt",uiSchema:{type:"datetime",title:`{{t("End time", { ns: "${t}" })}}`,"x-component":"DatePicker","x-component-props":{showTime:!0,disabledDate:c=>c&&c<new Date}}}]},r=()=>{const c=e.useDataBlockResource(),p=e.useCollectionRecordData();return{onClick(){return m(this,null,function*(){if(p)try{yield c.send(x({},p))}catch(u){console.error("send failed:",u)}})}}};function d({data:c}){const{label:p,color:s,description:u}=c,y=e.useCompile();return a.jsxs(l.Space,{direction:"vertical",children:[a.jsx(l.Tag,{color:s,children:y(p)}),a.jsx(l.Typography.Text,{type:"secondary",style:{whiteSpace:"normal"},children:y(u)})]})}const C={notifyType:{"x-component":"CollectionField","x-decorator":"FormItem","x-component-props":{optionRender:d,popupMatchSelectWidth:!0,listHeight:300}},level:{"x-component":"CollectionField","x-decorator":"FormItem","x-component-props":{optionRender:d,popupMatchSelectWidth:!0,listHeight:300},"x-visible":'{{ $self.query(".notifyType").value() !== "status"}}'},title:{"x-component":"CollectionField","x-decorator":"FormItem","x-visible":'{{$self.query(".notifyType").value() !== "status" && $self.query(".notifyType").value() !== "toast"}}'},detail:{"x-component":"CollectionField","x-decorator":"FormItem",required:!0},duration:{"x-component":"CollectionField","x-decorator":"FormItem","x-visible":'{{$self.query(".notifyType").value() !== "status"}}'},endTime:{"x-component":"CollectionField","x-decorator":"FormItem"}},A={type:"void","x-action":"create","x-acl-action":"create",title:"{{t('Add new')}}","x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{openMode:e.OpenMode.DRAWER_MODE,type:"primary",component:"CreateRecordAction",icon:"PlusOutlined"},"x-align":"right","x-acl-action-props":{skipScopeCheck:!0},properties:{drawer:{type:"void",title:`{{ t("Add notification", { ns: "${t}" }) }}`,"x-component":"Action.Container","x-component-props":{className:"tb-action-popup"},properties:{body:{type:"void","x-acl-action-props":{skipScopeCheck:!0},"x-acl-action":"notificationConfigs:create","x-decorator":"FormBlockProvider","x-use-decorator-props":"useCreateFormBlockDecoratorProps","x-decorator-props":{dataSource:"main",collection:i},"x-component":"CardItem",properties:{form:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:x({actionBar:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:24}},properties:{cancel:{title:'{{ t("Cancel") }}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{ t("Submit") }}',"x-component":"Action","x-use-component-props":"useCreateActionProps","x-component-props":{type:"primary",htmlType:"submit"},"x-action-settings":{assignedValues:{},triggerWorkflows:[],pageMode:!1}}}}},C)}}}}}}},T={type:"void",title:'{{ t("Edit") }}',"x-action":"update","x-component":"Action.Link","x-component-props":{openMode:e.OpenMode.DRAWER_MODE,icon:"EditOutlined"},"x-decorator":"ACLActionProvider",properties:{drawer:{type:"void",title:`{{ t("Edit notification", { ns: "${t}" }) }}`,"x-component":"Action.Container","x-component-props":{openMode:e.OpenMode.DRAWER_MODE,className:"tb-action-popup"},properties:{card:{type:"void","x-acl-action-props":{skipScopeCheck:!1},"x-acl-action":`${i.name}:update`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useEditFormBlockDecoratorProps","x-decorator-props":{action:"get",dataSource:"main",collection:i},"x-component":"CardItem",properties:{form:{type:"void","x-component":"FormV2","x-use-component-props":"useEditFormBlockProps",properties:x({actionBar:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:24}},properties:{cancel:{title:'{{ t("Cancel") }}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{ t("Submit") }}',"x-component":"Action","x-use-component-props":"useUpdateActionProps","x-component-props":{type:"primary"},"x-action-settings":{isDeltaChanged:!0}}}}},C)}}}}}}},S={type:"void",properties:{notificationconfig:{type:"void","x-decorator":"TableBlockProvider","x-decorator-props":{collection:i,action:"list",params:{pageSize:50,sort:["-createdAt"]}},title:`{{t("Notification Config", { ns: "${t}" })}}`,properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action","x-action":"destroy","x-decorator":"ACLActionProvider","x-use-component-props":"useBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"},actionCallback:"{{ dataSourceDeleteCallback }}"}},create:A}},table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"key",rowSelection:{type:"checkbox"}},properties:{id:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:20,align:"left"},properties:{id:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},notifyType:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:50,align:"center"},properties:{notifyType:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},title:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{align:"left"},properties:{title:{type:"string","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0}}},detail:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{align:"left"},properties:{detail:{type:"string","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0}}},level:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:50,align:"center"},properties:{level:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},duration:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:50,align:"center"},properties:{duration:{type:"string","x-component":"CollectionField","x-disabled":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"TableV2.Column","x-component-props":{width:50,align:"center"},properties:{actions:{type:"void","x-component":"Space",properties:{send:{type:"void",title:`{{t("Send", { ns: "${t}" })}}`,"x-component":"Action.Link","x-component-props":{icon:"WarningOutlined",confirm:{title:`{{t('Send record confirmation', { ns: "${t}" })}}`,content:`{{t('Are you sure you want to send it to all user', { ns: "${t}" })}}`}},"x-use-component-props":"useSendActionProps"},update:T,destroy:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-decorator":"ACLActionProvider","x-component":"Action.Link","x-use-component-props":"useDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}}}}}}}}}}}},D=()=>a.jsx(l.Card,{bordered:!1,children:a.jsx(e.ExtendCollectionsProvider,{collections:[i],children:a.jsx(e.SchemaComponent,{schema:S,scope:{useSendActionProps:r}})})});class $ extends e.Plugin{afterAdd(){return m(this,null,function*(){})}beforeLoad(){return m(this,null,function*(){})}load(){return m(this,null,function*(){this.app.systemSettingsManager.add("system-services.manual-notification",{icon:"SettingOutlined",title:f("Manual Notification"),Component:D,aclSnippet:"pm.system-services.manual-notification"}),n.autorun(()=>m(this,null,function*(){var p;try{const{data:s}=yield this.app.apiClient.request({resource:"notificationConfigs",action:"getRecent",params:{}});if(!((p=s==null?void 0:s.data)!=null&&p.length))return;const u=s.data,{notifyType:y,title:P,content:F,level:k,duration:h}=u[0];this.app.noticeManager[y](P,F,k,h,h)}catch(s){console.error("Failed to fetch recent notifications:",s)}}))})}}o.default=$,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,9 +1,9 @@
1
1
  module.exports = {
2
- "@tachybase/client": "1.3.16",
2
+ "@tachybase/client": "1.3.18",
3
3
  "antd": "5.22.5",
4
- "@tachybase/schema": "1.3.16",
5
- "@tachybase/server": "1.3.16",
6
- "@tachybase/actions": "1.3.16",
7
- "@tachybase/database": "1.3.16",
8
- "@tachybase/utils": "1.3.16"
4
+ "@tachybase/schema": "1.3.18",
5
+ "@tachybase/server": "1.3.18",
6
+ "@tachybase/actions": "1.3.18",
7
+ "@tachybase/database": "1.3.18",
8
+ "@tachybase/utils": "1.3.18"
9
9
  };
package/dist/index.js CHANGED
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var src_exports = {};
30
- __export(src_exports, {
29
+ var index_exports = {};
30
+ __export(index_exports, {
31
31
  default: () => import_server.default
32
32
  });
33
- module.exports = __toCommonJS(src_exports);
34
- __reExport(src_exports, require("./server"), module.exports);
33
+ module.exports = __toCommonJS(index_exports);
34
+ __reExport(index_exports, require("./server"), module.exports);
35
35
  var import_server = __toESM(require("./server"));
36
36
  // Annotate the CommonJS export names for ESM import in node:
37
37
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-manual-notification",
3
3
  "displayName": "Manual Notification",
4
- "version": "1.3.16",
4
+ "version": "1.3.18",
5
5
  "description": "Used to send notifications to all online users, including system updates and important events",
6
6
  "keywords": [
7
7
  "System management"
@@ -11,13 +11,13 @@
11
11
  "antd": "5.22.5"
12
12
  },
13
13
  "peerDependencies": {
14
- "@tachybase/actions": "1.3.16",
15
- "@tachybase/client": "1.3.16",
16
- "@tachybase/schema": "1.3.16",
17
- "@tachybase/server": "1.3.16",
18
- "@tachybase/database": "1.3.16",
19
- "@tachybase/test": "1.3.16",
20
- "@tachybase/utils": "1.3.16"
14
+ "@tachybase/client": "1.3.18",
15
+ "@tachybase/database": "1.3.18",
16
+ "@tachybase/actions": "1.3.18",
17
+ "@tachybase/server": "1.3.18",
18
+ "@tachybase/schema": "1.3.18",
19
+ "@tachybase/utils": "1.3.18",
20
+ "@tachybase/test": "1.3.18"
21
21
  },
22
22
  "description.zh-CN": "用于给所有在线人员发送通知,包括系统更新,重要事件",
23
23
  "displayName.zh-CN": "广播通知"