@tachybase/module-message 1.5.1 → 1.6.0
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 +9 -4
- package/dist/client/usage/components/ColumnShowJSON.style.d.ts +1 -0
- package/dist/externalVersion.js +3 -3
- package/dist/locale/en-US.json +1 -0
- package/dist/locale/zh-CN.json +1 -0
- package/dist/node_modules/@alicloud/dysmsapi20170525/package.json +1 -1
- package/dist/node_modules/@alicloud/openapi-client/package.json +1 -1
- package/dist/node_modules/@alicloud/tea-util/package.json +1 -1
- package/dist/node_modules/tencentcloud-sdk-nodejs/package.json +1 -1
- package/dist/node_modules/ws/package.json +1 -1
- package/package.json +3 -3
package/dist/client/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(d,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@tachybase/client"),require("@tego/client"),require("react/jsx-runtime"),require("react"),require("@tachybase/schema"),require("antd"),require("@tachybase/module-workflow/client"),require("lodash"),require("dayjs"),require("@ant-design/icons"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tego/client","react/jsx-runtime","react","@tachybase/schema","antd","@tachybase/module-workflow/client","lodash","dayjs","@ant-design/icons","react-router-dom"],e):(d=typeof globalThis!="undefined"?globalThis:d||self,e(d["@tachybase/module-message"]={},d["@tachybase/client"],d["@tego/client"],d.jsxRuntime,d.react,d["@tachybase/schema"],d.antd,d["@tachybase/module-workflow"],d.lodash,d.dayjs,d["@ant-design/icons"],d["react-router-dom"]))})(this,function(d,e,x,r,g,I,M,C,v,T,W,ee){"use strict";var xt=Object.defineProperty,gt=Object.defineProperties;var ht=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var yt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable;var Q=(d,e,x)=>e in d?xt(d,e,{enumerable:!0,configurable:!0,writable:!0,value:x}):d[e]=x,f=(d,e)=>{for(var x in e||(e={}))yt.call(e,x)&&Q(d,x,e[x]);if(Z)for(var x of Z(e))Ct.call(e,x)&&Q(d,x,e[x]);return d},A=(d,e)=>gt(d,ht(e));var u=(d,e,x)=>new Promise((r,g)=>{var I=v=>{try{C(x.next(v))}catch(T){g(T)}},M=v=>{try{C(x.throw(v))}catch(T){g(T)}},C=v=>v.done?r(v.value):Promise.resolve(v.value).then(I,M);C((x=x.apply(d,e)).next())});const L="message-instruction",h="message",te="messages",oe="messages-update-badge-count",ne="site-message",se="sms",re=({children:t})=>{const o=e.useApp(),n=e.useCompile(),s=e.usePlugin(D),a=g.useMemo(()=>Array.from(s.channels.getValues()),[s]).map(i=>{var p,l;return i.send||((l=(p=i.useAction)==null?void 0:p.call(i))==null?void 0:l.send)}).filter(Boolean);return g.useEffect(()=>{I.autorun(()=>{if(o.ws.connected){const i={type:"signIn",payload:{token:o.apiClient.auth.getToken()}};o.ws.send(JSON.stringify(i))}})},[]),g.useEffect(()=>{o.ws.on("message",i=>{const p=JSON.parse(i.data);if((p==null?void 0:p.type)===te){const l=p.payload.message,m=n(l.title),b=n(l.content),w={title:m,content:b};a.forEach(S=>S==null?void 0:S(w))}})},[]),r.jsx(r.Fragment,{children:t})};class B{}const E=()=>{const{i18n:t}=e.useApp();return{t:(n,s={})=>t.t(n,f({ns:[h,"core"]},s))}},y=t=>e.tval(t,{ns:[h,"core"]});function N(t){return e.i18n.t(t,{ns:[h,"core"]})}const z=ne;class ae extends B{constructor(){super(...arguments),this.name=z,this.title=N("In-App Notifications")}useAction(){const o=e.useApp();return{send:s=>{const{title:c,content:a}=s;o.notification.info({key:c,message:`${c}${a?":"+a:""}`,duration:10})}}}}class ie extends e.Plugin{load(){return u(this,null,function*(){this.app.pm.get(D).registerChannel(z,ae)})}}const K=se;class ce extends B{constructor(){super(...arguments),this.name=K,this.title=N("Text Message Alerts")}}class pe extends e.Plugin{load(){return u(this,null,function*(){this.app.pm.get(D).registerChannel(K,ce)})}}class le extends e.Plugin{afterAdd(){return u(this,null,function*(){yield this.app.pm.add(ie),yield this.app.pm.add(pe)})}load(){return u(this,null,function*(){this.app.use(re)})}}const _="messages_providers",V={dumpRules:{group:"third-party"},name:_,shared:!0,fields:[{type:"string",name:"id",primaryKey:!0,interface:"input",uiSchema:{title:'{{t("ID")}}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"title",interface:"input",uiSchema:{title:'{{t("Title")}}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"type",interface:"select",uiSchema:{title:`{{t("Provider type", { ns: "${h}" })}}`,type:"string","x-component":"Select",required:!0,enum:[{label:`{{t("Aliyun SMS", { ns: "${h}" })}}`,value:"sms-aliyun"},{label:`{{t("Tencent SMS", { ns: "${h}" })}}`,value:"sms-tencent"}]}},{type:"jsonb",name:"options"},{type:"radio",name:"default",interface:"checkbox",uiSchema:{title:'{{t("Default")}}',type:"boolean","x-component":"Checkbox"}}]},de={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 record") }}',"x-component":"Action.Container","x-component-props":{className:"tb-action-popup"},properties:{card:{type:"void","x-acl-action-props":{skipScopeCheck:!1},"x-acl-action":`${_}:update`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useEditFormBlockDecoratorProps","x-decorator-props":{action:"get",dataSource:"main",collection:V},"x-component":"CardItem",properties:{form:{type:"void","x-component":"FormV2","x-use-component-props":"useEditFormBlockProps",properties:{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"}}}},id:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":!0},title:{"x-component":"CollectionField","x-decorator":"FormItem"},type:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":!0},options:{type:"object","x-component":"ProviderOptions"},default:{"x-component":"CollectionField","x-decorator":"FormItem"}}}}}}}}},me={type:"void",name:"NotificationProviders","x-component":M.Card,"x-component-props":{bordered:!1},properties:{tableCard:{type:"void",name:"tableCard","x-decorator":"TableBlockProvider","x-decorator-props":{collection:V,action:"list",params:{pageSize:50,sort:["-default","id"],appends:[]}},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',"x-action":"filter","x-designer":"Filter.Action.Designer","x-component":"Filter.Action","x-use-component-props":"useFilterActionProps","x-component-props":{icon:"FilterOutlined"},"x-align":"left"},refresher:{type:"void",title:'{{ t("Refresh") }}',"x-action":"refresh","x-component":"Action","x-use-component-props":"useRefreshActionProps","x-designer":"Action.Designer","x-component-props":{icon:"ReloadOutlined"},"x-align":"right"},delete:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-decorator":"ACLActionProvider","x-component":"Action","x-use-component-props":"useBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},create:{type:"void",title:'{{t("Add new")}}',"x-component":"Action","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues(t){const o=e.useActionContext();return e.useRequest(()=>Promise.resolve({data:{name:`s_${I.uid()}`}}),A(f({},t),{refreshDeps:[o.visible]}))}},title:'{{t("Add new")}}',properties:{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"},create:{title:'{{ t("Submit") }}',"x-action":"submit","x-component":"Action","x-use-component-props":"useCreateDatabaseConnectionAction","x-component-props":{type:"primary"}}}},id:{"x-component":"CollectionField","x-decorator":"FormItem",description:'{{t("Identifier for program usage. Support letters, numbers and underscores, must start with an letter.")}}'},title:{"x-component":"CollectionField","x-decorator":"FormItem"},type:{"x-component":"CollectionField","x-decorator":"FormItem"},options:{type:"object","x-component":"ProviderOptions"},default:{"x-component":"CollectionField","x-decorator":"FormItem"}}}}}}},table:{type:"array","x-uid":"input","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-use-decorator-props":"useTableBlockDecoratorProps","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"}},properties:{id:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{id:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},title:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{title:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},type:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{type:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},default:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{default:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{update:de,delete:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action.Link","x-use-component-props":"useDestroyActionProps","x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}}}}}}}}}}}},ue={type:"object",properties:{accessKeyId:{title:`{{t("Access Key ID", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},accessKeySecret:{title:`{{t("Access Key Secret", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Password"},endpoint:{title:`{{t("Endpoint", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},sign:{title:`{{t("Sign", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},template:{title:`{{t("Template code", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"}}},xe={type:"object",properties:{secretId:{title:`{{t("Secret Id", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},secretKey:{title:`{{t("Secret Key", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Password"},region:{title:`{{t("Region", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},endpoint:{title:`{{t("Endpoint", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input",default:"sms.tencentcloudapi.com"},SignName:{title:`{{t("Sign name", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},SmsSdkAppId:{title:`{{t("Sms sdk app id", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},TemplateId:{title:`{{t("Template Id", { ns: "${h}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"}}},O=new x.Registry,q="sms-aliyun",ge="sms-tencent";O.register(q,ue),O.register(ge,xe);const he=q,ye=I.observer(t=>{const o=I.useForm(),n=I.useField(),[s,c]=g.useState(new I.Schema({}));return g.useEffect(()=>{o.clearFormGraph("options.*"),c(new I.Schema(O.get(o.values.type)||{}))},[o.values.type]),r.jsx(x.FormLayout,{layout:"vertical",children:r.jsx(I.RecursionField,{basePath:n.address,onlyRenderProperties:!0,schema:s},o.values.type||he)})},{displayName:"ProviderOptions"}),Ce=()=>r.jsx(e.ExtendCollectionsProvider,{collections:[V],children:r.jsx(e.SchemaComponent,{schema:me,components:{ProviderOptions:ye}})}),Se="notification-providers";class fe extends e.Plugin{load(){return u(this,null,function*(){this.app.systemSettingsManager.add(`system-services.${Se}`,{icon:"CheckCircleOutlined",title:`{{t("Notification providers", { ns: "${h}" })}}`,aclSnippet:"pm.message.providers",Component:Ce})})}}const be=()=>{const t=e.usePlugin(D),o=Array.from(t.channels.getValues());return r.jsx(M.Card,{children:o.map(n=>r.jsx(we,{channel:n},n.name))})},we=t=>{var w,S;const{channel:o}=t,{name:n,title:s}=o,c=e.useAPIClient(),{t:a}=E(),{message:i}=M.App.useApp(),p=e.useCurrentUserContext(),l=((S=(w=p==null?void 0:p.data)==null?void 0:w.data)==null?void 0:S.subPrefs)||{},m=l[n]||{},b=P=>u(null,null,function*(){var X;const R=yield c.resource("users").updateProfile({values:{subPrefs:A(f({},l),{[n]:{enable:P}})}});R.status===200&&i.success(a("Edited successfully")),p.mutate({data:f(f({},(X=p==null?void 0:p.data)==null?void 0:X.data),R.data.data[0])})});return r.jsxs("p",{children:[s,r.jsx(M.Switch,{checked:m.enable,onChange:b})]})};class ve extends e.Plugin{load(){return u(this,null,function*(){this.userSettingsManager.add("sub-manager",{title:N("Subscription management"),icon:"BellOutlined",Component:be})})}}class Ae extends e.Plugin{afterAdd(){return u(this,null,function*(){yield this.app.pm.add(le),yield this.app.pm.add(fe),yield this.app.pm.add(ve)})}}const Ie=()=>{var l;const{workflow:t}=C.useFlowContext(),[o,n]=e.parseCollectionName((l=t.config)==null?void 0:l.collection),s=e.useSchemaInitializerItem(),{insert:c}=e.useSchemaInitializer(),{getTemplateSchemaByMode:a}=e.useSchemaTemplateManager(),i=e.useRecordCollectionDataSourceItems("FormItem"),p=b=>u(null,[b],function*({item:m}){const w=m.template?yield a(m):null,S=e.createReadPrettyFormBlockSchema({actionInitializers:null,resource:n,collection:n,dataSource:o,template:w,settings:"blockSettings:details"});v.unset(S,["x-acl-action","x-acl-action-props"]);const[P]=Object.keys(S.properties);v.set(S.properties[P],"x-use-component-props","usePropsShowDetail"),c(S)});return r.jsx(e.SchemaInitializerItem,A(f({},s),{onClick:p,items:i}))};function Me(){var p;const t=e.usePlugin(C),{workflow:o}=C.useFlowContext(),n=C.useTrigger(),s=C.useContextNode(),c=C.useAvailableUpstreams(s),a=[(p=n.useInitializers)==null?void 0:p.call(n,o.config)].filter(Boolean),i=c.map(l=>{var b;const m=t.instructions.get(l.type);return(b=m==null?void 0:m.useInitializers)==null?void 0:b.call(m,l)}).filter(Boolean);return[...a,...i.length?[{name:"nodes",type:"subMenu",title:'{{t("Node result", { ns: "workflow" })}}',children:i}]:[]].filter(Boolean)}const ke=({app:t})=>{const n=t.schemaInitializerManager.get("page:addBlock").items;return new e.SchemaInitializer({name:"InitializerBlockMessage",title:"{{t('Add block')}}",wrap:e.gridRowColWrap,items:[{name:"messageCard",type:"itemGroup",title:y("Trigger data"),children:[{name:"detail",type:"item",title:'{{t("Details")}}',Component:Ie}]},{name:"dataBlocks",type:"itemGroup",title:y("Workflow Data blocks"),checkChildrenLength:!0,useChildren:Me},...n]})};class Pe extends e.Plugin{load(){return u(this,null,function*(){const o=ke({app:this.app});this.app.schemaInitializerManager.add(o)})}}function Te(t){const{value:o,onChange:n}=t,s=e.useAPIClient(),c=g.useCallback(p=>{},[]),{data:a,loading:i}=e.useRequest(()=>u(null,null,function*(){return yield De({srcId:o,onChange:n,apiClient:s})}));return{schemaData:a,loading:i,handleSchemaChange:c}}function De(s){return u(this,arguments,function*({srcId:t,onChange:o,apiClient:n}){const c=t!=null?t:x.uid(),a=Ne(c);if(t){const i=yield Fe({apiClient:n,srcId:t});if(i["x-uid"]===t)return i}else yield Be({apiClient:n,schema:a}),o(c);return a})}function Ne(t){return{type:"void",name:t,"x-uid":t,"x-component":"Grid","x-initializer":"InitializerBlockMessage",properties:{}}}function Fe(n){return u(this,arguments,function*({apiClient:t,srcId:o}){var a;const{data:s}=yield t.request({url:`uiSchemas:getJsonSchema/${o}`});return(a=s.data)!=null?a:{}})}function Be(n){return u(this,arguments,function*({apiClient:t,schema:o}){yield t.resource("uiSchemas").insert({values:o})})}const Ee=t=>{const{schemaData:o,loading:n,handleSchemaChange:s}=Te(t);return n?r.jsx(M.Spin,{}):r.jsx(e.SchemaComponent,{schema:o,scope:{usePropsShowDetail:()=>({})},memoized:!0,onChange:s})},Ve={actionStyle:e.css`
|
|
1
|
+
(function(m,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@tachybase/client"),require("@tego/client"),require("react/jsx-runtime"),require("react"),require("@tachybase/schema"),require("antd"),require("@tachybase/module-workflow/client"),require("lodash"),require("@ant-design/icons"),require("dayjs"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tego/client","react/jsx-runtime","react","@tachybase/schema","antd","@tachybase/module-workflow/client","lodash","@ant-design/icons","dayjs","react-router-dom"],e):(m=typeof globalThis!="undefined"?globalThis:m||self,e(m["@tachybase/module-message"]={},m["@tachybase/client"],m["@tego/client"],m.jsxRuntime,m.react,m["@tachybase/schema"],m.antd,m["@tachybase/module-workflow"],m.lodash,m["@ant-design/icons"],m.dayjs,m["react-router-dom"]))})(this,function(m,e,y,s,h,T,P,C,k,B,ce,pe){"use strict";var bt=Object.defineProperty,At=Object.defineProperties;var wt=Object.getOwnPropertyDescriptors;var ae=Object.getOwnPropertySymbols;var It=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable;var ie=(m,e,y)=>e in m?bt(m,e,{enumerable:!0,configurable:!0,writable:!0,value:y}):m[e]=y,w=(m,e)=>{for(var y in e||(e={}))It.call(e,y)&&ie(m,y,e[y]);if(ae)for(var y of ae(e))vt.call(e,y)&&ie(m,y,e[y]);return m},M=(m,e)=>At(m,wt(e));var g=(m,e,y)=>new Promise((s,h)=>{var T=k=>{try{C(y.next(k))}catch(B){h(B)}},P=k=>{try{C(y.throw(k))}catch(B){h(B)}},C=k=>k.done?s(k.value):Promise.resolve(k.value).then(T,P);C((y=y.apply(m,e)).next())});const U="message-instruction",f="message",le="messages",de="messages-update-badge-count",me="site-message",ue="sms",ge=({children:t})=>{const o=e.useApp(),n=e.useCompile(),r=e.usePlugin(O),a=h.useMemo(()=>Array.from(r.channels.getValues()),[r]).map(p=>{var d,x;return p.send||((x=(d=p.useAction)==null?void 0:d.call(p))==null?void 0:x.send)}).filter(Boolean);return h.useEffect(()=>{T.autorun(()=>{if(o.ws.connected){const p={type:"signIn",payload:{token:o.apiClient.auth.getToken()}};o.ws.send(JSON.stringify(p))}})},[]),h.useEffect(()=>{o.ws.on("message",p=>{const d=JSON.parse(p.data);if((d==null?void 0:d.type)===le){const x=d.payload.message,i=n(x.title),b=n(x.content),A={title:i,content:b};a.forEach(u=>u==null?void 0:u(A))}})},[]),s.jsx(s.Fragment,{children:t})};class ${}const L=()=>{const{i18n:t}=e.useApp();return{t:(n,r={})=>t.t(n,w({ns:[f,"core"]},r))}},S=t=>e.tval(t,{ns:[f,"core"]});function z(t){return e.i18n.t(t,{ns:[f,"core"]})}const G=me;class xe extends ${constructor(){super(...arguments),this.name=G,this.title=z("In-App Notifications")}useAction(){const o=e.useApp();return{send:r=>{const{title:c,content:a}=r;o.notification.info({key:c,message:`${c}${a?":"+a:""}`,duration:10})}}}}class ye extends e.Plugin{load(){return g(this,null,function*(){this.app.pm.get(O).registerChannel(G,xe)})}}const J=ue;class he extends ${constructor(){super(...arguments),this.name=J,this.title=z("Text Message Alerts")}}class fe extends e.Plugin{load(){return g(this,null,function*(){this.app.pm.get(O).registerChannel(J,he)})}}class Se extends e.Plugin{afterAdd(){return g(this,null,function*(){yield this.app.pm.add(ye),yield this.app.pm.add(fe)})}load(){return g(this,null,function*(){this.app.use(ge)})}}const Y="messages_providers",j={dumpRules:{group:"third-party"},name:Y,shared:!0,fields:[{type:"string",name:"id",primaryKey:!0,interface:"input",uiSchema:{title:'{{t("ID")}}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"title",interface:"input",uiSchema:{title:'{{t("Title")}}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"type",interface:"select",uiSchema:{title:`{{t("Provider type", { ns: "${f}" })}}`,type:"string","x-component":"Select",required:!0,enum:[{label:`{{t("Aliyun SMS", { ns: "${f}" })}}`,value:"sms-aliyun"},{label:`{{t("Tencent SMS", { ns: "${f}" })}}`,value:"sms-tencent"}]}},{type:"jsonb",name:"options"},{type:"radio",name:"default",interface:"checkbox",uiSchema:{title:'{{t("Default")}}',type:"boolean","x-component":"Checkbox"}}]},Ce={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 record") }}',"x-component":"Action.Container","x-component-props":{className:"tb-action-popup"},properties:{card:{type:"void","x-acl-action-props":{skipScopeCheck:!1},"x-acl-action":`${Y}:update`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useEditFormBlockDecoratorProps","x-decorator-props":{action:"get",dataSource:"main",collection:j},"x-component":"CardItem",properties:{form:{type:"void","x-component":"FormV2","x-use-component-props":"useEditFormBlockProps",properties:{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"}}}},id:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":!0},title:{"x-component":"CollectionField","x-decorator":"FormItem"},type:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":!0},options:{type:"object","x-component":"ProviderOptions"},default:{"x-component":"CollectionField","x-decorator":"FormItem"}}}}}}}}},be={type:"void",name:"NotificationProviders","x-component":P.Card,"x-component-props":{bordered:!1},properties:{tableCard:{type:"void",name:"tableCard","x-decorator":"TableBlockProvider","x-decorator-props":{collection:j,action:"list",params:{pageSize:50,sort:["-default","id"],appends:[]}},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',"x-action":"filter","x-designer":"Filter.Action.Designer","x-component":"Filter.Action","x-use-component-props":"useFilterActionProps","x-component-props":{icon:"FilterOutlined"},"x-align":"left"},refresher:{type:"void",title:'{{ t("Refresh") }}',"x-action":"refresh","x-component":"Action","x-use-component-props":"useRefreshActionProps","x-designer":"Action.Designer","x-component-props":{icon:"ReloadOutlined"},"x-align":"right"},delete:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-decorator":"ACLActionProvider","x-component":"Action","x-use-component-props":"useBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},create:{type:"void",title:'{{t("Add new")}}',"x-component":"Action","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues(t){const o=e.useActionContext();return e.useRequest(()=>Promise.resolve({data:{name:`s_${T.uid()}`}}),M(w({},t),{refreshDeps:[o.visible]}))}},title:'{{t("Add new")}}',properties:{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"},create:{title:'{{ t("Submit") }}',"x-action":"submit","x-component":"Action","x-use-component-props":"useCreateDatabaseConnectionAction","x-component-props":{type:"primary"}}}},id:{"x-component":"CollectionField","x-decorator":"FormItem",description:'{{t("Identifier for program usage. Support letters, numbers and underscores, must start with an letter.")}}'},title:{"x-component":"CollectionField","x-decorator":"FormItem"},type:{"x-component":"CollectionField","x-decorator":"FormItem"},options:{type:"object","x-component":"ProviderOptions"},default:{"x-component":"CollectionField","x-decorator":"FormItem"}}}}}}},table:{type:"array","x-uid":"input","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-use-decorator-props":"useTableBlockDecoratorProps","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"}},properties:{id:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{id:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},title:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{title:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},type:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{type:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},default:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{default:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{update:Ce,delete:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action.Link","x-use-component-props":"useDestroyActionProps","x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}}}}}}}}}}}},Ae={type:"object",properties:{accessKeyId:{title:`{{t("Access Key ID", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},accessKeySecret:{title:`{{t("Access Key Secret", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Password"},endpoint:{title:`{{t("Endpoint", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},sign:{title:`{{t("Sign", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},template:{title:`{{t("Template code", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"}}},we={type:"object",properties:{secretId:{title:`{{t("Secret Id", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},secretKey:{title:`{{t("Secret Key", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Password"},region:{title:`{{t("Region", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},endpoint:{title:`{{t("Endpoint", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input",default:"sms.tencentcloudapi.com"},SignName:{title:`{{t("Sign name", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},SmsSdkAppId:{title:`{{t("Sms sdk app id", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},TemplateId:{title:`{{t("Template Id", { ns: "${f}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"}}},q=new y.Registry,H="sms-aliyun",Ie="sms-tencent";q.register(H,Ae),q.register(Ie,we);const ve=H,ke=T.observer(t=>{const o=T.useForm(),n=T.useField(),[r,c]=h.useState(new T.Schema({}));return h.useEffect(()=>{o.clearFormGraph("options.*"),c(new T.Schema(q.get(o.values.type)||{}))},[o.values.type]),s.jsx(y.FormLayout,{layout:"vertical",children:s.jsx(T.RecursionField,{basePath:n.address,onlyRenderProperties:!0,schema:r},o.values.type||ve)})},{displayName:"ProviderOptions"}),Me=()=>s.jsx(e.ExtendCollectionsProvider,{collections:[j],children:s.jsx(e.SchemaComponent,{schema:be,components:{ProviderOptions:ke}})}),Te="notification-providers";class Pe extends e.Plugin{load(){return g(this,null,function*(){this.app.systemSettingsManager.add(`system-services.${Te}`,{icon:"CheckCircleOutlined",title:`{{t("Notification providers", { ns: "${f}" })}}`,aclSnippet:"pm.message.providers",Component:Me})})}}const Ne=()=>{const t=e.usePlugin(O),o=Array.from(t.channels.getValues());return s.jsx(P.Card,{children:o.map(n=>s.jsx(De,{channel:n},n.name))})},De=t=>{var A,u;const{channel:o}=t,{name:n,title:r}=o,c=e.useAPIClient(),{t:a}=L(),{message:p}=P.App.useApp(),d=e.useCurrentUserContext(),x=((u=(A=d==null?void 0:d.data)==null?void 0:A.data)==null?void 0:u.subPrefs)||{},i=x[n]||{},b=l=>g(null,null,function*(){var I;const D=yield c.resource("users").updateProfile({values:{subPrefs:M(w({},x),{[n]:{enable:l}})}});D.status===200&&p.success(a("Edited successfully")),d.mutate({data:w(w({},(I=d==null?void 0:d.data)==null?void 0:I.data),D.data.data[0])})});return s.jsxs("p",{children:[r,s.jsx(P.Switch,{checked:i.enable,onChange:b})]})};class Fe extends e.Plugin{load(){return g(this,null,function*(){this.userSettingsManager.add("sub-manager",{title:z("Subscription management"),icon:"BellOutlined",Component:Ne})})}}class Be extends e.Plugin{afterAdd(){return g(this,null,function*(){yield this.app.pm.add(Se),yield this.app.pm.add(Pe),yield this.app.pm.add(Fe)})}}const Ee=()=>{var x;const{workflow:t}=C.useFlowContext(),[o,n]=e.parseCollectionName((x=t.config)==null?void 0:x.collection),r=e.useSchemaInitializerItem(),{insert:c}=e.useSchemaInitializer(),{getTemplateSchemaByMode:a}=e.useSchemaTemplateManager(),p=e.useRecordCollectionDataSourceItems("FormItem"),d=b=>g(null,[b],function*({item:i}){const A=i.template?yield a(i):null,u=e.createReadPrettyFormBlockSchema({actionInitializers:null,resource:n,collection:n,dataSource:o,template:A,settings:"blockSettings:details"});k.unset(u,["x-acl-action","x-acl-action-props"]);const[l]=Object.keys(u.properties);k.set(u.properties[l],"x-use-component-props","usePropsShowDetail"),c(u)});return s.jsx(e.SchemaInitializerItem,M(w({},r),{onClick:d,items:p}))};function Oe(){var d;const t=e.usePlugin(C),{workflow:o}=C.useFlowContext(),n=C.useTrigger(),r=C.useContextNode(),c=C.useAvailableUpstreams(r),a=[(d=n.useInitializers)==null?void 0:d.call(n,o.config)].filter(Boolean),p=c.map(x=>{var b;const i=t.instructions.get(x.type);return(b=i==null?void 0:i.useInitializers)==null?void 0:b.call(i,x)}).filter(Boolean);return[...a,...p.length?[{name:"nodes",type:"subMenu",title:'{{t("Node result", { ns: "workflow" })}}',children:p}]:[]].filter(Boolean)}const Ve=({app:t})=>{const n=t.schemaInitializerManager.get("page:addBlock").items;return new e.SchemaInitializer({name:"InitializerBlockMessage",title:"{{t('Add block')}}",wrap:e.gridRowColWrap,items:[{name:"messageCard",type:"itemGroup",title:S("Trigger data"),children:[{name:"detail",type:"item",title:'{{t("Details")}}',Component:Ee}]},{name:"dataBlocks",type:"itemGroup",title:S("Workflow Data blocks"),checkChildrenLength:!0,useChildren:Oe},...n]})};class Le extends e.Plugin{load(){return g(this,null,function*(){const o=Ve({app:this.app});this.app.schemaInitializerManager.add(o)})}}function ze(t){const{value:o,onChange:n}=t,r=e.useAPIClient(),c=h.useCallback(d=>{},[]),{data:a,loading:p}=e.useRequest(()=>g(null,null,function*(){return yield Ke({srcId:o,onChange:n,apiClient:r})}));return{schemaData:a,loading:p,handleSchemaChange:c}}function Ke(r){return g(this,arguments,function*({srcId:t,onChange:o,apiClient:n}){const c=t!=null?t:y.uid(),a=_e(c);if(t){const p=yield $e({apiClient:n,srcId:t});if(p["x-uid"]===t)return p}else yield je({apiClient:n,schema:a}),o(c);return a})}function _e(t){return{type:"void",name:t,"x-uid":t,"x-component":"Grid","x-initializer":"InitializerBlockMessage",properties:{}}}function $e(n){return g(this,arguments,function*({apiClient:t,srcId:o}){var a;const{data:r}=yield t.request({url:`uiSchemas:getJsonSchema/${o}`});return(a=r.data)!=null?a:{}})}function je(n){return g(this,arguments,function*({apiClient:t,schema:o}){yield t.resource("uiSchemas").insert({values:o})})}const qe=t=>{const{schemaData:o,loading:n,handleSchemaChange:r}=ze(t);return n?s.jsx(P.Spin,{}):s.jsx(e.SchemaComponent,{schema:o,scope:{usePropsShowDetail:()=>({})},memoized:!0,onChange:r})},Ue={actionStyle:e.css`
|
|
2
2
|
.ant-drawer-body {
|
|
3
3
|
background: var(--tb-box-bg);
|
|
4
4
|
}
|
|
5
|
-
`},
|
|
5
|
+
`},Ge={name:"drawer",type:"void",title:S("The interface of show message detail"),"x-component":"Action.Drawer","x-component-props":{className:Ue.actionStyle},properties:{showMessageDetail:{type:"string","x-component":"ViewMessageDetail"}}},R=()=>{const t=h.useContext(e.SchemaComponentContext),[,o]=h.useState(y.uid()),{workflow:n}=C.useFlowContext(),r=h.useMemo(()=>M(w({},t),{reset:()=>{},refresh:()=>{o(y.uid())},designable:!n.executed}),[t,n.executed]);return s.jsx(e.SchemaComponentContext.Provider,{value:r,children:s.jsx(e.SchemaComponent,{schema:Ge,components:{ViewMessageDetail:qe}})})};e.createStyles({});const X={ArrayItemsStyle:e.css`
|
|
6
6
|
&[disabled] {
|
|
7
7
|
> .ant-formily-array-base-addition {
|
|
8
8
|
display: none;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
> .ant-space-item:nth-child(2) {
|
|
20
20
|
flex-grow: 1;
|
|
21
21
|
}
|
|
22
|
-
`};class
|
|
22
|
+
`};class Je extends C.Instruction{constructor(){super(...arguments),this.title=S("Site Messages"),this.type=U,this.group=C.BuiltinGroupType.EXTENDED,this.icon="SiteMessage",this.color="#1eca0a",this.description=S("In the workflow, notification messages can be viewed by the notified person in the notification center."),this.components={ArrayItems:y.ArrayItems,SelectNotifiedPerson:C.SelectNotifiedPerson,AdditionNotifiedPerson:C.AdditionNotifiedPerson,ConfigButtonMessage:C.ConfigButtonMessage,WorkflowVariableCodeMirror:C.WorkflowVariableCodeMirror,MessageDetail:R,ViewShowMessage:R},this.fieldset={notifiedPerson:{type:"array",title:S("The Notified Person"),required:!0,"x-decorator":"FormItem","x-component":"ArrayItems","x-component-props":{className:X.ArrayItemsStyle},items:{type:"void","x-component":"Space","x-component-props":{className:X.SpaceStyle},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"SelectNotifiedPerson"},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:S("Add Notified Person"),"x-component":"AdditionNotifiedPerson"}}},title:{type:"string",title:S("Title"),required:!0,"x-decorator":"FormItem","x-component":"WorkflowVariableCodeMirror","x-component-props":{changeOnSelect:!0,height:100,options:Z()}},content:{type:"string",title:S("Content"),"x-decorator":"FormItem","x-component":"WorkflowVariableCodeMirror","x-component-props":{changeOnSelect:!0,options:Z()}},showMessageDetail:{type:"void",title:S("Show message detail"),"x-decorator":"FormItem","x-component":"ConfigButtonMessage",properties:{showNoticeDetail:{type:"void","x-component":"ViewShowMessage"}}}}}useCurrentFormVariables(o,n){const r=e.useCompile(),{key:c}=o,{fieldNames:a}=n;return Object.entries(this.fieldset).map(([x,i])=>({[a.label]:r(i==null?void 0:i.title)||x,[a.value]:`${x}`}))}}function Z(){return[{label:S("Message variables"),value:"$messageVariables",children:[{label:S("The Notified Person"),value:"notifiedPerson",children:[{label:'{{t("Nickname")}}',value:"nickname"}]}]}]}class Ye extends e.Plugin{afterAdd(){return g(this,null,function*(){yield this.app.pm.add(Le)})}load(){return g(this,null,function*(){this.pm.get(C).registerInstruction(U,Je)})}}const F=t=>`{{t("${t}", ${JSON.stringify({ns:[f,"core"]})})}}`,K="messages",He={dumpRules:"required",name:K,title:F("Site Messages"),sortable:!0,createdBy:!0,updatedBy:!0,logging:!0,fields:[{name:"id",type:"bigInt",autoIncrement:!0,primaryKey:!0,allowNull:!1,interface:"id"},{name:"createdAt",interface:"createdAt",type:"date",field:"createdAt",uiSchema:{type:"datetime",title:'{{t("Created at")}}',"x-component":"DatePicker","x-component-props":{showTime:!0},"x-read-pretty":!0}},{name:"title",interface:"input",type:"string",allowNull:!1,unique:!1,uiSchema:{type:"string",title:F("Title"),"x-component":"Input",required:!0}},{name:"content",interface:"input",type:"string",allowNull:!1,unique:!1,uiSchema:{type:"string",title:F("Content"),"x-component":"Input",required:!0}},{name:"collectionName",interface:"input",type:"string"},{name:"dataKey",type:"string",interface:"input"},{name:"jsonContent",interface:"input",type:"jsonb",uiSchema:{type:"array",title:F("Content"),"x-component":"ShowJsonContent","x-component-props":{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}},{type:"jsonb",name:"snapshot",defaultValue:{}},{name:"read",type:"boolean",interface:"checkbox",defaultValue:!1,description:F("Read"),uiSchema:{"x-component-props":{showUnchecked:!0},type:"boolean","x-component":"Checkbox",title:F("Read")}},{name:"userId",type:"bigInt",interface:"integer",isForeignKey:!0,uiSchema:{type:"number",title:"userId","x-component":"InputNumber","x-read-pretty":!0}},{name:"user",foreignKey:"userId",onDelete:"CASCADE",type:"belongsTo",interface:"m2o",uiSchema:{"x-component":"AssociationField","x-component-props":{multiple:!1,fieldNames:{label:"id",value:"id"}},title:F("User")},target:"users",targetKey:"id"},{name:"schema",type:"belongsTo",target:"uiSchemas",targetKey:"x-uid",foreignKey:"schemaName",constraints:!1}]},Re=t=>{const{collection:o,params:n={filter:{}},action:r="list",children:c}=t,a=e.useCollectionRecordData(),p={collection:o,resource:o,action:r,params:M(w({pageSize:20,sort:["-createdAt"]},n),{filter:a!=null&&a.id?w({dataKey:`${a.id}`},n.filter):w({},n.filter)}),rowKey:"id",showIndex:!0,dragSort:!1};return s.jsx(e.ExtendCollectionsProvider,{collections:[He],children:s.jsx(e.TableBlockProvider,M(w({name:o},p),{children:c}))})};function Xe(t){const{onClick:o}=t,n=e.useAPIClient(),{refresh:r}=e.useDataBlockRequest(),c=e.useCollectionRecordData(),{id:a,read:p}=c,d=()=>g(null,null,function*(){o==null||o(),a&&!p&&(yield n.resource("messages").update({filter:{id:a},values:{read:!0}}),r())});return M(w({},t),{onClick:d})}const Q=h.createContext(null),Ze=Q.Provider;function Qe(){return h.useContext(Q)}function We(){const{snapshot:t}=Qe(),{form:o}=e.useFormBlockContext();return h.useEffect(()=>{o.setValues(t||{})},[o,t]),{form:o}}const et=t=>{const{record:o}=t,n=e.useSchemaComponentContext(),{schemaName:r}=o,[c,a]=h.useState({}),p={filterByTk:{}},{run:d}=e.useRequest({resource:o==null?void 0:o.collectionName,action:"get",params:p},{manual:!0,onSuccess(x){a(x.data||{})}});return h.useEffect(()=>{o!=null&&o.dataKey&&!Object.keys(c).length&&(p.filterByTk=o.dataKey,d())},[o]),(Object.keys(c).length||!o.dataKey)&&s.jsx(e.RecordProvider,{record:w({record:o},c),children:s.jsx(Ze,{value:o,children:s.jsx(e.SchemaComponentContext.Provider,{value:M(w({},n),{designable:!1}),children:s.jsx(e.RemoteSchemaComponent,{uid:r,noForm:!0})})})})},tt=t=>{const{record:o}=t;return{name:`view-${o.id}`,type:"void",title:'{{t("View", {"ns":["messages","client"]})}}',"x-action":"view","x-decorator":"ACLActionProvider","x-component":"Action.Link","x-component-props":{openMode:"drawer"},"x-use-component-props":"usePropsCheckLink",properties:{drawer:{type:"void",title:'{{t("View record", {"ns":["messages","client"]})}}',"x-component":"Action.Drawer","x-component-props":{className:"tb-action-popup"},properties:{checkContent:{type:"void","x-component":"ViewCheckContent","x-component-props":{record:o}}}}}}},ot=()=>{const t=e.useCollectionRecordData(),o=tt({record:t});return s.jsx(e.SchemaComponent,{schema:o,components:{ViewCheckContent:et},scope:{usePropsCheckLink:Xe,usePropsShowDetail:We}})},nt=e.createStyles(({css:t})=>({columnShowJSON:t`
|
|
23
23
|
text-align: left;
|
|
24
24
|
.json-item {
|
|
25
25
|
display: flex;
|
|
@@ -41,4 +41,9 @@
|
|
|
41
41
|
text-overflow: ellipsis;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
`,tablePlaceholder:t`
|
|
45
|
+
color: #999;
|
|
46
|
+
font-style: italic;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
`})),E="[object Object]",_={LITERAL:"literal",TABLE:"table",DATE:"date",ARRAY:"array"},st=t=>{const{value:o}=t,n=e.useCollectionRecordData(),r=e.useCollectionManager(),c=e.useCompile(),{t:a}=L(),{styles:p}=nt(),{collectionName:d}=n,x=h.useMemo(()=>Array.isArray(o)?o.map(i=>{var V,se;if(!i||typeof i!="object")return null;const{key:b,label:A,type:u,value:l}=i||{},D=c(A)||b||"";let I="",v=!1;switch(u){case _.LITERAL:l&&Object.prototype.toString.call(l)===E?I=(V=l==null?void 0:l.name)!=null?V:JSON.stringify(l):I=l;break;case _.DATE:l&&(I=typeof l=="string"&&W(l)?ee(l):String(l));break;case _.ARRAY:Array.isArray(l)?I=l.map(N=>{var re;return N&&Object.prototype.toString.call(N)===E?(re=N==null?void 0:N.name)!=null?re:JSON.stringify(N):String(N!=null?N:"")}).join(", "):I=String(l!=null?l:"");break;case _.TABLE:I=a("Table data"),v=!0;break;default:l&&Object.prototype.toString.call(l)===E?I=(se=l==null?void 0:l.name)!=null?se:JSON.stringify(l):I=String(l!=null?l:"");break}return{key:b||D,label:D,value:I,isTable:v}}).filter(Boolean):o&&typeof o=="object"&&!Array.isArray(o)?Object.entries(o).map(([i,b])=>{var l,D,I;const A=r.getCollectionField(`${d}.${i}`);let u=b;return Object.prototype.toString.call(b)===E&&(u=(l=b==null?void 0:b.name)!=null?l:b),Array.isArray(u)&&(u=u.map(v=>{var V;return v&&Object.prototype.toString.call(v)===E?(V=v==null?void 0:v.name)!=null?V:JSON.stringify(v):String(v!=null?v:"")}).join(", ")),u&&Object.prototype.toString.call(u)===E&&(u=JSON.stringify(u)),typeof u=="string"&&W(u)?{key:i,label:c(((D=A==null?void 0:A.uiSchema)==null?void 0:D.title)||i),value:ee(u)}:{key:i,label:c(((I=A==null?void 0:A.uiSchema)==null?void 0:I.title)||i),value:u}}):[],[o,d,r,c,a]);return s.jsx("div",{className:p.columnShowJSON,children:x.map(i=>s.jsxs("div",{className:"json-item",children:[s.jsxs("div",{className:"item-label",children:[`${i.label}:`," "]}),i.isTable?s.jsxs("div",{className:`item-value ${p.tablePlaceholder}`,children:[s.jsx(B.TableOutlined,{style:{marginRight:4,fontSize:12}}),i.value]}):s.jsx("div",{className:"item-value",children:i.value})]},i.key||i.label))})},rt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function W(t=""){return rt.test(t)}function ee(t){return ce.utc(t).local().format("YYYY-MM-DD HH:mm:ss")}const at=()=>{const{t}=L(),o=e.useCollectionRecordData(),{schemaName:n}=o||{},r=`${location.origin}/r/${n}`;return s.jsx("a",{href:r,target:"_blank",children:t("External link")})},it=t=>{const{record:o}=t;return{name:`delete-${o.id}`,type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","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?')}}"}},"x-action-settings":{triggerWorkflows:[]},"x-decorator":"ACLActionProvider"}},ct=t=>{const o=e.useCollectionRecordData(),n=it({record:o});return s.jsx(e.SchemaComponent,{schema:n})},pt={type:"void",name:"schemaTableMessages",properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:"var(--tb-spacing)"}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',"x-action":"filter","x-component":"Filter.Action","x-component-props":{icon:"FilterOutlined"},"x-use-component-props":"useFilterActionProps","x-align":"left"},refresher:{type:"void",title:'{{ t("Refresh") }}',"x-action":"refresh","x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"},"x-align":"right"},delete:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0},"x-use-component-props":"useBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}},"x-acl-action":"messages:destroy","x-align":"right"},setHaveReaded:{type:"void",title:S("Mark as read"),"x-action":"customize:bulkUpdate","x-action-settings":{assignedValues:{read:!0},updateMode:"selected",onSuccess:{manualClose:!0,redirecting:!1,successMessage:'{{t("Updated successfully")}}'}},"x-component":"Action","x-use-component-props":"useCustomizeBulkUpdateActionProps","x-component-props":{icon:"InboxOutlined"},"x-align":"right"},setAllHaveReaded:{type:"void",title:S("Mark all as read"),"x-component":"Action","x-use-component-props":"useCustomizeBulkUpdateActionProps","x-component-props":{icon:"InboxOutlined"},"x-action":"customize:bulkUpdate","x-action-settings":{assignedValues:{read:!0},updateMode:"all",onSuccess:{manualClose:!0,redirecting:!1,successMessage:'{{t("Updated successfully")}}'}},"x-align":"right"}}},table:{type:"array","x-component":"TableV2","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"}},"x-use-component-props":"useTableBlockProps",properties:{actions:{type:"void",title:'{{ t("Actions") }}',"x-action-column":"actions","x-decorator":"TableV2.Column.ActionBar","x-component":"TableV2.Column","x-component-props":{width:50,align:"center"},"x-designer":"TableV2.ActionColumnDesigner","x-initializer":"MessageTable:configureItemActions",properties:{actionList:{type:"void","x-decorator":"DndContext","x-component":"Space","x-component-props":{split:"|"},properties:{checkLink:{"x-component":"ViewCheckLink"},delete:{"x-component":"ViewDeleteLink"}}}}},read:{type:"void",title:S("Read"),"x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:20,align:"center"},properties:{read:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0,"x-component-props":{showUnchecked:!0}}}},createdAt:{type:"void",title:S("Created at"),"x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:100,align:"center"},properties:{createdAt:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},title:{type:"void",title:S("Title"),"x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:100,align:"center"},properties:{title:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},content:{type:"void",title:S("Content"),"x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:100,align:"center"},properties:{content:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},jsonContent:{type:"void",title:S("Summary"),"x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:350,align:"center"},properties:{jsonContent:{type:"string","x-component":"ColumnShowJSON"}}},url:{type:"void",title:S("URL"),"x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:100,align:"center"},properties:{url:{type:"string","x-component":"ColumnShowURL"}}}}}}},lt=()=>s.jsx(e.SchemaComponent,{schema:pt,components:{ViewCheckLink:ot,ViewDeleteLink:ct,ColumnShowURL:at,ColumnShowJSON:st}}),te=t=>{const{params:o}=t||{};return{type:"void",name:"message-table","x-uid":"message-table","x-decorator":"Messages-ProviderCollectionMessages","x-decorator-props":{collection:K,action:"list",params:o},"x-component":"CardItem","x-acl-action":"messages:list","x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:table",properties:{block:{type:"void","x-component":"Messages-ViewTableMessages"}}}},dt=()=>{const t=e.useSchemaInitializerItem(),{insert:o}=e.useSchemaInitializer(),n=()=>{const r=te();o(r)};return s.jsx(e.SchemaInitializerItem,M(w({},t),{onClick:n}))},oe="otherBlocks.messages",ne={name:"messageBlock",type:"item",title:e.tval("Site Messages"),icon:"BellOutlined",Component:"Messages-ViewBlockInitItem",collection:K,params:{appends:[]}};class mt extends e.Plugin{load(){return g(this,null,function*(){this.app.addComponents({"Messages-ViewBlockInitItem":dt}),this.app.schemaInitializerManager.get("page:addBlock").add(oe,ne),this.app.schemaInitializerManager.get("popup:common:addBlock").add(oe,ne)})}}const ut=t=>{const o=te(t);return s.jsx(e.SchemaComponent,{memoized:!0,schema:o})},gt={type:"void",properties:{page:{type:"void","x-component":"Page",title:z("Site Messages"),properties:{messages:{type:"void","x-component":"ViewTableMessagesWrapper"}}}}},xt=()=>{const t=e.useSchemaComponentContext();return s.jsx(e.SchemaComponentContext.Provider,{value:M(w({},t),{designable:!1}),children:s.jsx(e.SchemaComponent,{schema:gt,components:{ViewTableMessagesWrapper:ut}})})};class yt extends e.Plugin{load(){return g(this,null,function*(){this.addRouters()})}addRouters(){this.app.router.add("app.messages",{path:"messages",Component:xt})}}function ht(t=0){var x;const o=e.useAPIClient(),n=e.useCurrentUserContext(),r=(x=n==null?void 0:n.data)==null?void 0:x.data,[c,a]=h.useState(t),p=()=>g(null,null,function*(){var A,u;const i=yield o.request({resource:K,action:"count",params:{filter:{read:!1,userId:r==null?void 0:r.id}}}),b=(u=(A=i==null?void 0:i.data)==null?void 0:A.data)!=null?u:0;a(b)}),d=h.useMemo(()=>k.debounce(p,300),[p]);return e.useNoticeSub(de,()=>{d()}),h.useEffect(()=>{p()},[]),{badgeCount:c}}const ft=()=>{const t=pe.useNavigate(),{token:o}=e.useToken(),{t:n}=L(),{badgeCount:r}=ht(),c=()=>t("/admin/messages");return s.jsx(P.Tooltip,{title:n("Site Messages"),children:s.jsx(P.Badge,{count:r,overflowCount:99,offset:["-10%","40%"],size:"small",children:s.jsx(P.Button,{icon:s.jsx(B.BellOutlined,{style:{color:o.colorTextHeaderMenu}}),title:n("Site Messages"),onClick:c})})})},St=t=>s.jsx(e.PinnedPluginListProvider,{items:{nl:{order:220,component:"NotificationLink",pin:!0,isPublic:!0,belongTo:"pinnedmenu"}},children:s.jsx(e.SchemaComponentOptions,{components:{NotificationLink:ft},children:t.children})});class Ct extends e.Plugin{afterAdd(){return g(this,null,function*(){this.app.use(St),yield this.app.pm.add(yt),yield this.app.pm.add(mt)})}load(){return g(this,null,function*(){this.app.addComponents({"Messages-ProviderCollectionMessages":Re,"Messages-ViewTableMessages":lt}),this.app.addScopes({useSubmit:()=>({run(){return g(this,null,function*(){})}})})})}}class O extends e.Plugin{constructor(){super(...arguments),this.channels=new y.Registry}registerChannel(o,n){if(typeof n=="function")this.channels.register(o,new n);else if(n instanceof $)this.channels.register(o,n);else throw new TypeError("invalid channel type to register")}afterAdd(){return g(this,null,function*(){yield this.app.pm.add(Be),yield this.app.pm.add(Ye),yield this.app.pm.add(Ct)})}}m.default=O,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@tachybase/client": "1.
|
|
2
|
+
"@tachybase/client": "1.6.0",
|
|
3
3
|
"@tego/client": "1.3.52",
|
|
4
4
|
"@tego/server": "1.3.52",
|
|
5
|
-
"@tachybase/module-workflow": "1.
|
|
5
|
+
"@tachybase/module-workflow": "1.6.0",
|
|
6
6
|
"react": "18.3.1",
|
|
7
7
|
"@tachybase/schema": "1.3.52",
|
|
8
8
|
"antd": "5.22.5",
|
|
9
9
|
"lodash": "4.17.21",
|
|
10
|
-
"dayjs": "1.11.13",
|
|
11
10
|
"@ant-design/icons": "5.6.1",
|
|
11
|
+
"dayjs": "1.11.13",
|
|
12
12
|
"react-router-dom": "6.28.1",
|
|
13
13
|
"ahooks": "3.9.0"
|
|
14
14
|
};
|
package/dist/locale/en-US.json
CHANGED
package/dist/locale/zh-CN.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@alicloud/dysmsapi20170525","version":"2.0.24","description":"","main":"dist/client.js","scripts":{"test":"mocha --reporter spec --timeout 3000 test/*.test.js","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Alibaba Cloud SDK","license":"Apache-2.0","devDependencies":{"@types/node":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.7","@alicloud/openapi-client":"^0.4.4","@alicloud/openapi-util":"^0.3.1","@alicloud/endpoint-util":"^0.0.1"},"files":["dist","src"],"_lastModified":"2025-11-
|
|
1
|
+
{"name":"@alicloud/dysmsapi20170525","version":"2.0.24","description":"","main":"dist/client.js","scripts":{"test":"mocha --reporter spec --timeout 3000 test/*.test.js","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Alibaba Cloud SDK","license":"Apache-2.0","devDependencies":{"@types/node":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.7","@alicloud/openapi-client":"^0.4.4","@alicloud/openapi-util":"^0.3.1","@alicloud/endpoint-util":"^0.0.1"},"files":["dist","src"],"_lastModified":"2025-11-20T08:16:27.370Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@alicloud/openapi-client","version":"0.4.15","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts --timeout=10000","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"","license":"ISC","devDependencies":{"@types/mocha":"^5.2.7","mocha":"^6.2.0","@types/node":"^18.0.0","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^10.0.0","typescript":"^5.6.0","@alicloud/gateway-pop":"0.0.6"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"1.4.9","@alicloud/credentials":"^2.4.2","@alicloud/openapi-util":"^0.3.2","@alicloud/gateway-spi":"^0.0.8","@alicloud/tea-xml":"0.0.3"},"files":["dist","src"],"repository":"git@github.com:aliyun/darabonba-openapi.git","_lastModified":"2025-11-
|
|
1
|
+
{"name":"@alicloud/openapi-client","version":"0.4.15","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts --timeout=10000","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"","license":"ISC","devDependencies":{"@types/mocha":"^5.2.7","mocha":"^6.2.0","@types/node":"^18.0.0","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^10.0.0","typescript":"^5.6.0","@alicloud/gateway-pop":"0.0.6"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"1.4.9","@alicloud/credentials":"^2.4.2","@alicloud/openapi-util":"^0.3.2","@alicloud/gateway-spi":"^0.0.8","@alicloud/tea-xml":"0.0.3"},"files":["dist","src"],"repository":"git@github.com:aliyun/darabonba-openapi.git","_lastModified":"2025-11-20T08:16:28.297Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@alicloud/tea-util","version":"1.4.10","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Jackson Tian","license":"Apache-2.0","devDependencies":{"@types/mocha":"^7.0.1","@types/node":"^12.12.26","mocha":"^7.0.1","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.5.1","@darabonba/typescript":"^1.0.0","kitx":"^2.0.0"},"files":["dist","src"],"repository":"git@github.com:aliyun/tea-util.git","_lastModified":"2025-11-
|
|
1
|
+
{"name":"@alicloud/tea-util","version":"1.4.10","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Jackson Tian","license":"Apache-2.0","devDependencies":{"@types/mocha":"^7.0.1","@types/node":"^12.12.26","mocha":"^7.0.1","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.5.1","@darabonba/typescript":"^1.0.0","kitx":"^2.0.0"},"files":["dist","src"],"repository":"git@github.com:aliyun/tea-util.git","_lastModified":"2025-11-20T08:16:28.993Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"tencentcloud-sdk-nodejs","version":"4.0.996","description":"腾讯云 API NODEJS SDK","main":"tencentcloud/index.js","scripts":{"test":"mocha -t 10000","build":"tsc","prettier":"prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'"},"engines":{"node":">=10"},"keywords":["tencentcloudapi","tencentcloud","qcloud","sdk","js","nodejs"],"author":"tencentcloudapi","license":"Apache-2.0","dependencies":{"form-data":"^3.0.0","get-stream":"^6.0.0","https-proxy-agent":"^5.0.0","is-stream":"^2.0.0","json-bigint":"^1.0.0","node-fetch":"^2.2.0","tslib":"1.13.0","uuid":"^9.0.1"},"directories":{"example":"examples","lib":"lib"},"repository":{"type":"git","url":"https://github.com/tencentcloud/tencentcloud-sdk-nodejs"},"devDependencies":{"@types/form-data":"^2.5.0","@types/json-bigint":"^1.0.1","@types/node":"^14.0.26","@types/node-fetch":"^2.5.7","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^2.34.0","@typescript-eslint/parser":"^2.34.0","babel-eslint":"^10.0.2","chai":"^4.2.0","eslint":"^6.8.0","eslint-plugin-react":"^7.17.0","mocha":"^8.1.1","prettier":"^2.3.0","ts-node":"^8.10.2","typescript":"^3.9.7"},"_lastModified":"2025-11-
|
|
1
|
+
{"name":"tencentcloud-sdk-nodejs","version":"4.0.996","description":"腾讯云 API NODEJS SDK","main":"tencentcloud/index.js","scripts":{"test":"mocha -t 10000","build":"tsc","prettier":"prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'"},"engines":{"node":">=10"},"keywords":["tencentcloudapi","tencentcloud","qcloud","sdk","js","nodejs"],"author":"tencentcloudapi","license":"Apache-2.0","dependencies":{"form-data":"^3.0.0","get-stream":"^6.0.0","https-proxy-agent":"^5.0.0","is-stream":"^2.0.0","json-bigint":"^1.0.0","node-fetch":"^2.2.0","tslib":"1.13.0","uuid":"^9.0.1"},"directories":{"example":"examples","lib":"lib"},"repository":{"type":"git","url":"https://github.com/tencentcloud/tencentcloud-sdk-nodejs"},"devDependencies":{"@types/form-data":"^2.5.0","@types/json-bigint":"^1.0.1","@types/node":"^14.0.26","@types/node-fetch":"^2.5.7","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^2.34.0","@typescript-eslint/parser":"^2.34.0","babel-eslint":"^10.0.2","chai":"^4.2.0","eslint":"^6.8.0","eslint-plugin-react":"^7.17.0","mocha":"^8.1.1","prettier":"^2.3.0","ts-node":"^8.10.2","typescript":"^3.9.7"},"_lastModified":"2025-11-20T08:16:33.557Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ws","version":"8.18.3","description":"Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js","keywords":["HyBi","Push","RFC-6455","WebSocket","WebSockets","real-time"],"homepage":"https://github.com/websockets/ws","bugs":"https://github.com/websockets/ws/issues","repository":{"type":"git","url":"git+https://github.com/websockets/ws.git"},"author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","license":"MIT","main":"index.js","exports":{".":{"browser":"./browser.js","import":"./wrapper.mjs","require":"./index.js"},"./package.json":"./package.json"},"browser":"browser.js","engines":{"node":">=10.0.0"},"files":["browser.js","index.js","lib/*.js","wrapper.mjs"],"scripts":{"test":"nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js","integration":"mocha --throw-deprecation test/*.integration.js","lint":"eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""},"peerDependencies":{"bufferutil":"^4.0.1","utf-8-validate":">=5.0.2"},"peerDependenciesMeta":{"bufferutil":{"optional":true},"utf-8-validate":{"optional":true}},"devDependencies":{"benchmark":"^2.1.4","bufferutil":"^4.0.1","eslint":"^9.0.0","eslint-config-prettier":"^10.0.1","eslint-plugin-prettier":"^5.0.0","globals":"^16.0.0","mocha":"^8.4.0","nyc":"^15.0.0","prettier":"^3.0.0","utf-8-validate":"^6.0.0"},"_lastModified":"2025-11-
|
|
1
|
+
{"name":"ws","version":"8.18.3","description":"Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js","keywords":["HyBi","Push","RFC-6455","WebSocket","WebSockets","real-time"],"homepage":"https://github.com/websockets/ws","bugs":"https://github.com/websockets/ws/issues","repository":{"type":"git","url":"git+https://github.com/websockets/ws.git"},"author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","license":"MIT","main":"index.js","exports":{".":{"browser":"./browser.js","import":"./wrapper.mjs","require":"./index.js"},"./package.json":"./package.json"},"browser":"browser.js","engines":{"node":">=10.0.0"},"files":["browser.js","index.js","lib/*.js","wrapper.mjs"],"scripts":{"test":"nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js","integration":"mocha --throw-deprecation test/*.integration.js","lint":"eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""},"peerDependencies":{"bufferutil":"^4.0.1","utf-8-validate":">=5.0.2"},"peerDependenciesMeta":{"bufferutil":{"optional":true},"utf-8-validate":{"optional":true}},"devDependencies":{"benchmark":"^2.1.4","bufferutil":"^4.0.1","eslint":"^9.0.0","eslint-config-prettier":"^10.0.1","eslint-plugin-prettier":"^5.0.0","globals":"^16.0.0","mocha":"^8.4.0","nyc":"^15.0.0","prettier":"^3.0.0","utf-8-validate":"^6.0.0"},"_lastModified":"2025-11-20T08:16:26.229Z"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/module-message",
|
|
3
3
|
"displayName": "Message",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.6.0",
|
|
5
5
|
"description": "Send messages to users.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"System management"
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"react-router-dom": "6.28.1",
|
|
27
27
|
"tencentcloud-sdk-nodejs": "^4.0.996",
|
|
28
28
|
"ws": "^8.18.3",
|
|
29
|
-
"@tachybase/
|
|
30
|
-
"@tachybase/
|
|
29
|
+
"@tachybase/client": "1.6.0",
|
|
30
|
+
"@tachybase/module-workflow": "1.6.0"
|
|
31
31
|
},
|
|
32
32
|
"description.zh-CN": "用于给用户发送消息",
|
|
33
33
|
"displayName.zh-CN": "消息通知",
|