@tachybase/module-message 0.23.22 → 0.23.40
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/base/notification-providers/NotificationProviders.schema.d.ts +96 -164
- package/dist/client/index.js +4 -4
- package/dist/externalVersion.js +8 -8
- 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 +10 -10
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ISchema } from '@tachybase/schema';
|
|
2
|
+
export declare const update: ISchema;
|
|
1
3
|
export declare const schemaNotificationProviders: {
|
|
2
4
|
type: string;
|
|
3
5
|
name: string;
|
|
@@ -76,83 +78,11 @@ export declare const schemaNotificationProviders: {
|
|
|
76
78
|
primaryKey?: undefined;
|
|
77
79
|
})[];
|
|
78
80
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
pageSize: number;
|
|
85
|
-
sort: string[];
|
|
86
|
-
appends: any[];
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
'x-component': string;
|
|
91
|
-
'x-component-props': {
|
|
92
|
-
collection: {
|
|
93
|
-
dumpRules: {
|
|
94
|
-
group: string;
|
|
95
|
-
};
|
|
96
|
-
name: string;
|
|
97
|
-
shared: boolean;
|
|
98
|
-
fields: ({
|
|
99
|
-
type: string;
|
|
100
|
-
name: string;
|
|
101
|
-
primaryKey: boolean;
|
|
102
|
-
interface: string;
|
|
103
|
-
uiSchema: {
|
|
104
|
-
title: string;
|
|
105
|
-
type: string;
|
|
106
|
-
'x-component': string;
|
|
107
|
-
required: boolean;
|
|
108
|
-
enum?: undefined;
|
|
109
|
-
};
|
|
110
|
-
} | {
|
|
111
|
-
type: string;
|
|
112
|
-
name: string;
|
|
113
|
-
interface: string;
|
|
114
|
-
uiSchema: {
|
|
115
|
-
title: string;
|
|
116
|
-
type: string;
|
|
117
|
-
'x-component': string;
|
|
118
|
-
required: boolean;
|
|
119
|
-
enum?: undefined;
|
|
120
|
-
};
|
|
121
|
-
primaryKey?: undefined;
|
|
122
|
-
} | {
|
|
123
|
-
type: string;
|
|
124
|
-
name: string;
|
|
125
|
-
interface: string;
|
|
126
|
-
uiSchema: {
|
|
127
|
-
title: string;
|
|
128
|
-
type: string;
|
|
129
|
-
'x-component': string;
|
|
130
|
-
required: boolean;
|
|
131
|
-
enum: {
|
|
132
|
-
label: string;
|
|
133
|
-
value: string;
|
|
134
|
-
}[];
|
|
135
|
-
};
|
|
136
|
-
primaryKey?: undefined;
|
|
137
|
-
} | {
|
|
138
|
-
type: string;
|
|
139
|
-
name: string;
|
|
140
|
-
primaryKey?: undefined;
|
|
141
|
-
interface?: undefined;
|
|
142
|
-
uiSchema?: undefined;
|
|
143
|
-
} | {
|
|
144
|
-
type: string;
|
|
145
|
-
name: string;
|
|
146
|
-
interface: string;
|
|
147
|
-
uiSchema: {
|
|
148
|
-
title: string;
|
|
149
|
-
type: string;
|
|
150
|
-
'x-component': string;
|
|
151
|
-
required?: undefined;
|
|
152
|
-
enum?: undefined;
|
|
153
|
-
};
|
|
154
|
-
primaryKey?: undefined;
|
|
155
|
-
})[];
|
|
81
|
+
action: string;
|
|
82
|
+
params: {
|
|
83
|
+
pageSize: number;
|
|
84
|
+
sort: string[];
|
|
85
|
+
appends: any[];
|
|
156
86
|
};
|
|
157
87
|
};
|
|
158
88
|
properties: {
|
|
@@ -192,10 +122,12 @@ export declare const schemaNotificationProviders: {
|
|
|
192
122
|
delete: {
|
|
193
123
|
type: string;
|
|
194
124
|
title: string;
|
|
125
|
+
'x-action': string;
|
|
126
|
+
'x-decorator': string;
|
|
195
127
|
'x-component': string;
|
|
128
|
+
'x-use-component-props': string;
|
|
196
129
|
'x-component-props': {
|
|
197
130
|
icon: string;
|
|
198
|
-
useAction: string;
|
|
199
131
|
confirm: {
|
|
200
132
|
title: string;
|
|
201
133
|
content: string;
|
|
@@ -220,6 +152,31 @@ export declare const schemaNotificationProviders: {
|
|
|
220
152
|
};
|
|
221
153
|
title: string;
|
|
222
154
|
properties: {
|
|
155
|
+
actionBar: {
|
|
156
|
+
type: string;
|
|
157
|
+
'x-component': string;
|
|
158
|
+
'x-component-props': {
|
|
159
|
+
style: {
|
|
160
|
+
marginBottom: number;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
properties: {
|
|
164
|
+
cancel: {
|
|
165
|
+
title: string;
|
|
166
|
+
'x-component': string;
|
|
167
|
+
'x-use-component-props': string;
|
|
168
|
+
};
|
|
169
|
+
create: {
|
|
170
|
+
title: string;
|
|
171
|
+
'x-action': string;
|
|
172
|
+
'x-component': string;
|
|
173
|
+
'x-use-component-props': string;
|
|
174
|
+
'x-component-props': {
|
|
175
|
+
type: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
223
180
|
id: {
|
|
224
181
|
'x-component': string;
|
|
225
182
|
'x-decorator': string;
|
|
@@ -241,27 +198,6 @@ export declare const schemaNotificationProviders: {
|
|
|
241
198
|
'x-component': string;
|
|
242
199
|
'x-decorator': string;
|
|
243
200
|
};
|
|
244
|
-
footer: {
|
|
245
|
-
type: string;
|
|
246
|
-
'x-component': string;
|
|
247
|
-
properties: {
|
|
248
|
-
cancel: {
|
|
249
|
-
title: string;
|
|
250
|
-
'x-component': string;
|
|
251
|
-
'x-component-props': {
|
|
252
|
-
useAction: string;
|
|
253
|
-
};
|
|
254
|
-
};
|
|
255
|
-
submit: {
|
|
256
|
-
title: string;
|
|
257
|
-
'x-component': string;
|
|
258
|
-
'x-component-props': {
|
|
259
|
-
type: string;
|
|
260
|
-
useAction: string;
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
};
|
|
265
201
|
};
|
|
266
202
|
};
|
|
267
203
|
};
|
|
@@ -272,12 +208,13 @@ export declare const schemaNotificationProviders: {
|
|
|
272
208
|
type: string;
|
|
273
209
|
'x-uid': string;
|
|
274
210
|
'x-component': string;
|
|
211
|
+
'x-use-component-props': string;
|
|
212
|
+
'x-use-decorator-props': string;
|
|
275
213
|
'x-component-props': {
|
|
276
214
|
rowKey: string;
|
|
277
215
|
rowSelection: {
|
|
278
216
|
type: string;
|
|
279
217
|
};
|
|
280
|
-
useDataSource: string;
|
|
281
218
|
};
|
|
282
219
|
properties: {
|
|
283
220
|
id: {
|
|
@@ -340,79 +277,74 @@ export declare const schemaNotificationProviders: {
|
|
|
340
277
|
split: string;
|
|
341
278
|
};
|
|
342
279
|
properties: {
|
|
343
|
-
update: {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
};
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
};
|
|
404
|
-
};
|
|
405
|
-
};
|
|
280
|
+
update: import("@tachybase/schema").Stringify<{
|
|
281
|
+
[key: symbol]: any;
|
|
282
|
+
[key: `x-${string}`]: any;
|
|
283
|
+
[key: `x-${number}`]: any;
|
|
284
|
+
version?: string;
|
|
285
|
+
name?: import("@tachybase/schema").SchemaKey;
|
|
286
|
+
title?: any;
|
|
287
|
+
description?: any;
|
|
288
|
+
default?: any;
|
|
289
|
+
readOnly?: boolean;
|
|
290
|
+
writeOnly?: boolean;
|
|
291
|
+
type?: import("@tachybase/schema").SchemaTypes;
|
|
292
|
+
enum?: import("@tachybase/schema").SchemaEnum<any>;
|
|
293
|
+
const?: any;
|
|
294
|
+
multipleOf?: number;
|
|
295
|
+
maximum?: number;
|
|
296
|
+
exclusiveMaximum?: number;
|
|
297
|
+
minimum?: number;
|
|
298
|
+
exclusiveMinimum?: number;
|
|
299
|
+
maxLength?: number;
|
|
300
|
+
minLength?: number;
|
|
301
|
+
pattern?: string | RegExp;
|
|
302
|
+
maxItems?: number;
|
|
303
|
+
minItems?: number;
|
|
304
|
+
uniqueItems?: boolean;
|
|
305
|
+
maxProperties?: number;
|
|
306
|
+
minProperties?: number;
|
|
307
|
+
required?: string[] | boolean | string;
|
|
308
|
+
format?: string;
|
|
309
|
+
$ref?: string;
|
|
310
|
+
$namespace?: string;
|
|
311
|
+
definitions?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
312
|
+
properties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
313
|
+
items?: import("@tachybase/schema").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
314
|
+
additionalItems?: import("@tachybase/schema").Stringify</*elided*/ any>;
|
|
315
|
+
patternProperties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
316
|
+
additionalProperties?: import("@tachybase/schema").Stringify</*elided*/ any>;
|
|
317
|
+
"x-value"?: any;
|
|
318
|
+
"x-index"?: number;
|
|
319
|
+
"x-pattern"?: any;
|
|
320
|
+
"x-display"?: any;
|
|
321
|
+
"x-validator"?: any;
|
|
322
|
+
"x-decorator"?: any;
|
|
323
|
+
"x-decorator-props"?: any;
|
|
324
|
+
"x-component"?: any;
|
|
325
|
+
"x-component-props"?: any;
|
|
326
|
+
"x-reactions"?: import("@tachybase/schema").SchemaReactions<any>;
|
|
327
|
+
"x-content"?: any;
|
|
328
|
+
"x-data"?: any;
|
|
329
|
+
"x-visible"?: boolean;
|
|
330
|
+
"x-hidden"?: boolean;
|
|
331
|
+
"x-disabled"?: boolean;
|
|
332
|
+
"x-editable"?: boolean;
|
|
333
|
+
"x-read-only"?: boolean;
|
|
334
|
+
"x-read-pretty"?: boolean;
|
|
335
|
+
"x-compile-omitted"?: string[];
|
|
336
|
+
}>;
|
|
406
337
|
delete: {
|
|
407
338
|
type: string;
|
|
408
339
|
title: string;
|
|
340
|
+
'x-action': string;
|
|
409
341
|
'x-component': string;
|
|
342
|
+
'x-use-component-props': string;
|
|
410
343
|
'x-component-props': {
|
|
411
344
|
confirm: {
|
|
412
345
|
title: string;
|
|
413
346
|
content: string;
|
|
414
347
|
};
|
|
415
|
-
useAction: string;
|
|
416
348
|
};
|
|
417
349
|
};
|
|
418
350
|
};
|
package/dist/client/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(c,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@tachybase/client"),require("@tachybase/utils/client"),require("react/jsx-runtime"),require("react"),require("@tachybase/schema"),require("antd"),require("@tachybase/components"),require("@tachybase/module-workflow/client"),require("lodash"),require("@ant-design/icons"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/utils/client","react/jsx-runtime","react","@tachybase/schema","antd","@tachybase/components","@tachybase/module-workflow/client","lodash","@ant-design/icons","react-router-dom"],e):(c=typeof globalThis!="undefined"?globalThis:c||self,e(c["@tachybase/module-message"]={},c["@tachybase/client"],c["@tachybase/utils"],c.jsxRuntime,c.react,c["@tachybase/schema"],c.antd,c["@tachybase/components"],c["@tachybase/module-workflow"],c.lodash,c["@ant-design/icons"],c["react-router-dom"]))})(this,function(c,e,x,r,C,I,M,T,g,k,ee,te){"use strict";var xt=Object.defineProperty,gt=Object.defineProperties;var ht=Object.getOwnPropertyDescriptors;var W=Object.getOwnPropertySymbols;var yt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable;var z=(c,e,x)=>e in c?xt(c,e,{enumerable:!0,configurable:!0,writable:!0,value:x}):c[e]=x,f=(c,e)=>{for(var x in e||(e={}))yt.call(e,x)&&z(c,x,e[x]);if(W)for(var x of W(e))Ct.call(e,x)&&z(c,x,e[x]);return c},v=(c,e)=>gt(c,ht(e));var b=(c,e,x)=>z(c,typeof e!="symbol"?e+"":e,x);var u=(c,e,x)=>new Promise((r,C)=>{var I=g=>{try{T(x.next(g))}catch(k){C(k)}},M=g=>{try{T(x.throw(g))}catch(k){C(k)}},T=g=>g.done?r(g.value):Promise.resolve(g.value).then(I,M);T((x=x.apply(c,e)).next())});const _="message-instruction",h="message",oe="messages",ne="messages-update-badge-count",se="site-message",re="sms",ae=({children:t})=>{const o=e.useApp(),n=e.useCompile(),s=e.usePlugin(N),i=C.useMemo(()=>Array.from(s.channels.getValues()),[s]).map(a=>{var l,d;return a.send||((d=(l=a.useAction)==null?void 0:l.call(a))==null?void 0:d.send)}).filter(Boolean);return C.useEffect(()=>{I.autorun(()=>{if(o.ws.connected){const a={type:"signIn",payload:{token:o.apiClient.auth.getToken()}};o.ws.send(JSON.stringify(a))}})},[]),C.useEffect(()=>{o.ws.on("message",a=>{const l=JSON.parse(a.data);if((l==null?void 0:l.type)===oe){const d=l.payload.message,m=n(d.title),w=n(d.content),A={title:m,content:w};i.forEach(S=>S==null?void 0:S(A))}})},[]),r.jsx(r.Fragment,{children:t})};class B{constructor(){b(this,"name");b(this,"title")}}const V=()=>{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 F(t){return e.i18n.t(t,{ns:[h,"core"]})}const K=se;class ie extends B{constructor(){super(...arguments);b(this,"name",K);b(this,"title",F("In-App Notifications"))}useAction(){const n=e.useApp();return{send:p=>{const{title:i,content:a}=p;n.notification.info({key:i,message:`${i}${a?":"+a:""}`,duration:10})}}}}class ce extends e.Plugin{load(){return u(this,null,function*(){this.app.pm.get(N).registerChannel(K,ie)})}}const $=re;class pe extends B{constructor(){super(...arguments);b(this,"name",$);b(this,"title",F("Text Message Alerts"))}}class le extends e.Plugin{load(){return u(this,null,function*(){this.app.pm.get(N).registerChannel($,pe)})}}class de extends e.Plugin{afterAdd(){return u(this,null,function*(){yield this.app.pm.add(ce),yield this.app.pm.add(le)})}load(){return u(this,null,function*(){this.app.use(ae)})}}const O="messages_providers",q={dumpRules:{group:"third-party"},name:O,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"}}]},me={type:"void",name:"NotificationProviders","x-component":M.Card,"x-component-props":{bordered:!1},properties:{tableCard:{type:"void",name:"tableCard","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:q,resourceName:O,request:{resource:O,action:"list",params:{pageSize:50,sort:["-default","id"],appends:[]}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:q},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-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:"{{ cm.useBulkDestroyAction }}",confirm:{title:"{{t('Delete')}}",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()}`}}),v(f({},t),{refreshDeps:[o.visible]}))}},title:'{{t("Add new")}}',properties:{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"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useCreateAction }}"}}}}}}}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}"},properties:{id:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{id:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},title:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{title:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},type:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{type:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},default:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{default:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{update:{type:"void",title:'{{t("Edit")}}',"x-component":"Action.Link","x-component-props":{type:"primary"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ cm.useValuesFromRecord }}"},title:'{{t("Edit")}}',properties:{id:{"x-component":"CollectionField","x-decorator":"FormItem"},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"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useUpdateAction }}"}}}}}}}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{cm.useDestroyAction}}"}}}}}}}}}}}},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"}}},L=new x.Registry,U="sms-aliyun",ge="sms-tencent";L.register(U,ue),L.register(ge,xe);const he=U,ye=I.observer(t=>{const o=I.useForm(),n=I.useField(),[s,p]=C.useState(new I.Schema({}));return C.useEffect(()=>{o.clearFormGraph("options.*"),p(new I.Schema(L.get(o.values.type)||{}))},[o.values.type]),r.jsx(T.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.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(N),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 A,S;const{channel:o}=t,{name:n,title:s}=o,p=e.useAPIClient(),{t:i}=V(),{message:a}=M.App.useApp(),l=e.useCurrentUserContext(),d=((S=(A=l==null?void 0:l.data)==null?void 0:A.data)==null?void 0:S.subPrefs)||{},m=d[n]||{},w=D=>u(this,null,function*(){var Q;const Z=yield p.resource("users").updateProfile({values:{subPrefs:v(f({},d),{[n]:{enable:D}})}});Z.status===200&&a.success(i("Edited successfully")),l.mutate({data:f(f({},(Q=l==null?void 0:l.data)==null?void 0:Q.data),Z.data.data[0])})});return r.jsxs("p",{children:[s,r.jsx(M.Switch,{checked:m.enable,onChange:w})]})};class Ae extends e.Plugin{load(){return u(this,null,function*(){this.userSettingsManager.add("sub-manager",{title:F("Subscription management"),icon:"BellOutlined",Component:be})})}}class ve extends e.Plugin{afterAdd(){return u(this,null,function*(){yield this.app.pm.add(de),yield this.app.pm.add(fe),yield this.app.pm.add(Ae)})}}const Ie=()=>{var d;const{workflow:t}=g.useFlowContext(),[o,n]=e.parseCollectionName((d=t.config)==null?void 0:d.collection),s=e.useSchemaInitializerItem(),{insert:p}=e.useSchemaInitializer(),{getTemplateSchemaByMode:i}=e.useSchemaTemplateManager(),a=e.useRecordCollectionDataSourceItems("FormItem"),l=w=>u(this,[w],function*({item:m}){const A=m.template?yield i(m):null,S=e.createReadPrettyFormBlockSchema({actionInitializers:null,resource:n,collection:n,dataSource:o,template:A,settings:"blockSettings:details"});k.unset(S,["x-acl-action","x-acl-action-props"]);const[D]=Object.keys(S.properties);k.set(S.properties[D],"x-use-component-props","usePropsShowDetail"),p(S)});return r.jsx(e.SchemaInitializerItem,v(f({},s),{onClick:l,items:a}))};function Me(){var l;const t=e.usePlugin(g),{workflow:o}=g.useFlowContext(),n=g.useTrigger(),s=g.useContextNode(),p=g.useAvailableUpstreams(s),i=[(l=n.useInitializers)==null?void 0:l.call(n,o.config)].filter(Boolean),a=p.map(d=>{var w;const m=t.instructions.get(d.type);return(w=m==null?void 0:m.useInitializers)==null?void 0:w.call(m,d)}).filter(Boolean);return[...i,...a.length?[{name:"nodes",type:"subMenu",title:'{{t("Node result", { ns: "workflow" })}}',children:a}]:[]].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(),p=C.useCallback(l=>{},[]),{data:i,loading:a}=e.useRequest(()=>u(this,null,function*(){return yield De({srcId:o,onChange:n,apiClient:s})}));return{schemaData:i,loading:a,handleSchemaChange:p}}function De(s){return u(this,arguments,function*({srcId:t,onChange:o,apiClient:n}){const p=t!=null?t:x.uid(),i=Ne(p);if(t){const a=yield Fe({apiClient:n,srcId:t});if(a["x-uid"]===t)return a}else yield Ee({apiClient:n,schema:i}),o(p);return i})}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 i;const{data:s}=yield t.request({url:`uiSchemas:getJsonSchema/${o}`});return(i=s.data)!=null?i:{}})}function Ee(n){return u(this,arguments,function*({apiClient:t,schema:o}){yield t.resource("uiSchemas").insert({values:o})})}const Be=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(c,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@tachybase/client"),require("@tachybase/utils/client"),require("react/jsx-runtime"),require("react"),require("@tachybase/schema"),require("antd"),require("@tachybase/components"),require("@tachybase/module-workflow/client"),require("lodash"),require("@ant-design/icons"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/utils/client","react/jsx-runtime","react","@tachybase/schema","antd","@tachybase/components","@tachybase/module-workflow/client","lodash","@ant-design/icons","react-router-dom"],e):(c=typeof globalThis!="undefined"?globalThis:c||self,e(c["@tachybase/module-message"]={},c["@tachybase/client"],c["@tachybase/utils"],c.jsxRuntime,c.react,c["@tachybase/schema"],c.antd,c["@tachybase/components"],c["@tachybase/module-workflow"],c.lodash,c["@ant-design/icons"],c["react-router-dom"]))})(this,function(c,e,x,r,C,I,M,T,g,k,ee,te){"use strict";var gt=Object.defineProperty,yt=Object.defineProperties;var ht=Object.getOwnPropertyDescriptors;var W=Object.getOwnPropertySymbols;var Ct=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable;var z=(c,e,x)=>e in c?gt(c,e,{enumerable:!0,configurable:!0,writable:!0,value:x}):c[e]=x,f=(c,e)=>{for(var x in e||(e={}))Ct.call(e,x)&&z(c,x,e[x]);if(W)for(var x of W(e))St.call(e,x)&&z(c,x,e[x]);return c},A=(c,e)=>yt(c,ht(e));var b=(c,e,x)=>z(c,typeof e!="symbol"?e+"":e,x);var u=(c,e,x)=>new Promise((r,C)=>{var I=g=>{try{T(x.next(g))}catch(k){C(k)}},M=g=>{try{T(x.throw(g))}catch(k){C(k)}},T=g=>g.done?r(g.value):Promise.resolve(g.value).then(I,M);T((x=x.apply(c,e)).next())});const _="message-instruction",y="message",oe="messages",ne="messages-update-badge-count",se="site-message",re="sms",ae=({children:t})=>{const o=e.useApp(),n=e.useCompile(),s=e.usePlugin(N),i=C.useMemo(()=>Array.from(s.channels.getValues()),[s]).map(a=>{var l,d;return a.send||((d=(l=a.useAction)==null?void 0:l.call(a))==null?void 0:d.send)}).filter(Boolean);return C.useEffect(()=>{I.autorun(()=>{if(o.ws.connected){const a={type:"signIn",payload:{token:o.apiClient.auth.getToken()}};o.ws.send(JSON.stringify(a))}})},[]),C.useEffect(()=>{o.ws.on("message",a=>{const l=JSON.parse(a.data);if((l==null?void 0:l.type)===oe){const d=l.payload.message,m=n(d.title),w=n(d.content),v={title:m,content:w};i.forEach(S=>S==null?void 0:S(v))}})},[]),r.jsx(r.Fragment,{children:t})};class V{constructor(){b(this,"name");b(this,"title")}}const E=()=>{const{i18n:t}=e.useApp();return{t:(n,s={})=>t.t(n,f({ns:[y,"core"]},s))}},h=t=>e.tval(t,{ns:[y,"core"]});function F(t){return e.i18n.t(t,{ns:[y,"core"]})}const $=se;class ie extends V{constructor(){super(...arguments);b(this,"name",$);b(this,"title",F("In-App Notifications"))}useAction(){const n=e.useApp();return{send:p=>{const{title:i,content:a}=p;n.notification.info({key:i,message:`${i}${a?":"+a:""}`,duration:10})}}}}class ce extends e.Plugin{load(){return u(this,null,function*(){this.app.pm.get(N).registerChannel($,ie)})}}const K=re;class pe extends V{constructor(){super(...arguments);b(this,"name",K);b(this,"title",F("Text Message Alerts"))}}class le extends e.Plugin{load(){return u(this,null,function*(){this.app.pm.get(N).registerChannel(K,pe)})}}class de extends e.Plugin{afterAdd(){return u(this,null,function*(){yield this.app.pm.add(ce),yield this.app.pm.add(le)})}load(){return u(this,null,function*(){this.app.use(ae)})}}const q="messages_providers",O={dumpRules:{group:"third-party"},name:q,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: "${y}" })}}`,type:"string","x-component":"Select",required:!0,enum:[{label:`{{t("Aliyun SMS", { ns: "${y}" })}}`,value:"sms-aliyun"},{label:`{{t("Tencent SMS", { ns: "${y}" })}}`,value:"sms-tencent"}]}},{type:"jsonb",name:"options"},{type:"radio",name:"default",interface:"checkbox",uiSchema:{title:'{{t("Default")}}',type:"boolean","x-component":"Checkbox"}}]},me={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":`${q}:update`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useEditFormBlockDecoratorProps","x-decorator-props":{action:"get",dataSource:"main",collection:O},"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"}}}}}}}}},ue={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:O,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:me,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?')}}"}}}}}}}}}}}}},xe={type:"object",properties:{accessKeyId:{title:`{{t("Access Key ID", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},accessKeySecret:{title:`{{t("Access Key Secret", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Password"},endpoint:{title:`{{t("Endpoint", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},sign:{title:`{{t("Sign", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},template:{title:`{{t("Template code", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"}}},ge={type:"object",properties:{secretId:{title:`{{t("Secret Id", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},secretKey:{title:`{{t("Secret Key", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Password"},region:{title:`{{t("Region", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},endpoint:{title:`{{t("Endpoint", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input",default:"sms.tencentcloudapi.com"},SignName:{title:`{{t("Sign name", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},SmsSdkAppId:{title:`{{t("Sms sdk app id", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"},TemplateId:{title:`{{t("Template Id", { ns: "${y}" })}}`,type:"string","x-decorator":"FormItem","x-component":"Input"}}},L=new x.Registry,U="sms-aliyun",ye="sms-tencent";L.register(U,xe),L.register(ye,ge);const he=U,Ce=I.observer(t=>{const o=I.useForm(),n=I.useField(),[s,p]=C.useState(new I.Schema({}));return C.useEffect(()=>{o.clearFormGraph("options.*"),p(new I.Schema(L.get(o.values.type)||{}))},[o.values.type]),r.jsx(T.FormLayout,{layout:"vertical",children:r.jsx(I.RecursionField,{basePath:n.address,onlyRenderProperties:!0,schema:s},o.values.type||he)})},{displayName:"ProviderOptions"}),Se=()=>r.jsx(e.ExtendCollectionsProvider,{collections:[O],children:r.jsx(e.SchemaComponent,{schema:ue,components:{ProviderOptions:Ce}})}),fe="notification-providers";class be extends e.Plugin{load(){return u(this,null,function*(){this.app.systemSettingsManager.add(`system-services.${fe}`,{icon:"CheckCircleOutlined",title:`{{t("Notification providers", { ns: "${y}" })}}`,aclSnippet:"pm.message.providers",Component:Se})})}}const we=()=>{const t=e.usePlugin(N),o=Array.from(t.channels.getValues());return r.jsx(M.Card,{children:o.map(n=>r.jsx(ve,{channel:n},n.name))})},ve=t=>{var v,S;const{channel:o}=t,{name:n,title:s}=o,p=e.useAPIClient(),{t:i}=E(),{message:a}=M.App.useApp(),l=e.useCurrentUserContext(),d=((S=(v=l==null?void 0:l.data)==null?void 0:v.data)==null?void 0:S.subPrefs)||{},m=d[n]||{},w=D=>u(this,null,function*(){var Q;const Z=yield p.resource("users").updateProfile({values:{subPrefs:A(f({},d),{[n]:{enable:D}})}});Z.status===200&&a.success(i("Edited successfully")),l.mutate({data:f(f({},(Q=l==null?void 0:l.data)==null?void 0:Q.data),Z.data.data[0])})});return r.jsxs("p",{children:[s,r.jsx(M.Switch,{checked:m.enable,onChange:w})]})};class Ae extends e.Plugin{load(){return u(this,null,function*(){this.userSettingsManager.add("sub-manager",{title:F("Subscription management"),icon:"BellOutlined",Component:we})})}}class Ie extends e.Plugin{afterAdd(){return u(this,null,function*(){yield this.app.pm.add(de),yield this.app.pm.add(be),yield this.app.pm.add(Ae)})}}const Me=()=>{var d;const{workflow:t}=g.useFlowContext(),[o,n]=e.parseCollectionName((d=t.config)==null?void 0:d.collection),s=e.useSchemaInitializerItem(),{insert:p}=e.useSchemaInitializer(),{getTemplateSchemaByMode:i}=e.useSchemaTemplateManager(),a=e.useRecordCollectionDataSourceItems("FormItem"),l=w=>u(this,[w],function*({item:m}){const v=m.template?yield i(m):null,S=e.createReadPrettyFormBlockSchema({actionInitializers:null,resource:n,collection:n,dataSource:o,template:v,settings:"blockSettings:details"});k.unset(S,["x-acl-action","x-acl-action-props"]);const[D]=Object.keys(S.properties);k.set(S.properties[D],"x-use-component-props","usePropsShowDetail"),p(S)});return r.jsx(e.SchemaInitializerItem,A(f({},s),{onClick:l,items:a}))};function ke(){var l;const t=e.usePlugin(g),{workflow:o}=g.useFlowContext(),n=g.useTrigger(),s=g.useContextNode(),p=g.useAvailableUpstreams(s),i=[(l=n.useInitializers)==null?void 0:l.call(n,o.config)].filter(Boolean),a=p.map(d=>{var w;const m=t.instructions.get(d.type);return(w=m==null?void 0:m.useInitializers)==null?void 0:w.call(m,d)}).filter(Boolean);return[...i,...a.length?[{name:"nodes",type:"subMenu",title:'{{t("Node result", { ns: "workflow" })}}',children:a}]:[]].filter(Boolean)}const Pe=({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:h("Trigger data"),children:[{name:"detail",type:"item",title:'{{t("Details")}}',Component:Me}]},{name:"dataBlocks",type:"itemGroup",title:h("Workflow Data blocks"),checkChildrenLength:!0,useChildren:ke},...n]})};class Te extends e.Plugin{load(){return u(this,null,function*(){const o=Pe({app:this.app});this.app.schemaInitializerManager.add(o)})}}function De(t){const{value:o,onChange:n}=t,s=e.useAPIClient(),p=C.useCallback(l=>{},[]),{data:i,loading:a}=e.useRequest(()=>u(this,null,function*(){return yield Ne({srcId:o,onChange:n,apiClient:s})}));return{schemaData:i,loading:a,handleSchemaChange:p}}function Ne(s){return u(this,arguments,function*({srcId:t,onChange:o,apiClient:n}){const p=t!=null?t:x.uid(),i=Fe(p);if(t){const a=yield Be({apiClient:n,srcId:t});if(a["x-uid"]===t)return a}else yield Ve({apiClient:n,schema:i}),o(p);return i})}function Fe(t){return{type:"void",name:t,"x-uid":t,"x-component":"Grid","x-initializer":"InitializerBlockMessage",properties:{}}}function Be(n){return u(this,arguments,function*({apiClient:t,srcId:o}){var i;const{data:s}=yield t.request({url:`uiSchemas:getJsonSchema/${o}`});return(i=s.data)!=null?i:{}})}function Ve(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}=De(t);return n?r.jsx(M.Spin,{}):r.jsx(e.SchemaComponent,{schema:o,scope:{usePropsShowDetail:()=>({})},memoized:!0,onChange:s})},Oe={actionStyle:e.css`
|
|
2
2
|
.ant-drawer-body {
|
|
3
3
|
background: var(--tb-box-bg);
|
|
4
4
|
}
|
|
5
|
-
`},
|
|
5
|
+
`},Le={name:"drawer",type:"void",title:h("The interface of show message detail"),"x-component":"Action.Drawer","x-component-props":{className:Oe.actionStyle},properties:{showMessageDetail:{type:"string","x-component":"ViewMessageDetail"}}},j=()=>{const t=C.useContext(e.SchemaComponentContext),[,o]=C.useState(x.uid()),{workflow:n}=g.useFlowContext(),s=C.useMemo(()=>A(f({},t),{refresh:()=>o(x.uid()),designable:!n.executed}),[t,n.executed]);return r.jsx(e.SchemaComponentContext.Provider,{value:s,children:r.jsx(e.SchemaComponent,{schema:Le,components:{ViewMessageDetail:Ee}})})};e.createStyles({});const G={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 ze extends g.Instruction{constructor(){super(...arguments);b(this,"title",h("Site Messages"));b(this,"type",_);b(this,"group",g.BuiltinGroupType.EXTENDED);b(this,"icon","SiteMessage");b(this,"color","#1eca0a");b(this,"description",h("In the workflow, notification messages can be viewed by the notified person in the notification center."));b(this,"components",{ArrayItems:T.ArrayItems,SelectNotifiedPerson:g.SelectNotifiedPerson,AdditionNotifiedPerson:g.AdditionNotifiedPerson,ConfigButtonMessage:g.ConfigButtonMessage,WorkflowVariableCodeMirror:g.WorkflowVariableCodeMirror,MessageDetail:j,ViewShowMessage:j});b(this,"fieldset",{notifiedPerson:{type:"array",title:h("The Notified Person"),"x-decorator":"FormItem","x-component":"ArrayItems","x-component-props":{className:G.ArrayItemsStyle},items:{type:"void","x-component":"Space","x-component-props":{className:G.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:h("Add Notified Person"),"x-component":"AdditionNotifiedPerson"}}},title:{type:"string",title:h("Title"),"x-decorator":"FormItem","x-component":"WorkflowVariableCodeMirror","x-component-props":{changeOnSelect:!0,height:100,options:H()}},content:{type:"string",title:h("Content"),"x-decorator":"FormItem","x-component":"WorkflowVariableCodeMirror","x-component-props":{changeOnSelect:!0,options:H()}},showMessageDetail:{type:"void",title:h("Show message detail"),"x-decorator":"FormItem","x-component":"ConfigButtonMessage",properties:{showNoticeDetail:{type:"void","x-component":"ViewShowMessage"}}}})}useCurrentFormVariables(n,s){const p=e.useCompile(),{fieldNames:i}=s;return Object.entries(this.fieldset).map(([d,m])=>({[i.label]:p(m==null?void 0:m.title)||d,[i.value]:`${d}`}))}}function H(){return[{label:h("Message variables"),value:"$messageVariables",children:[{label:h("The Notified Person"),value:"notifiedPerson",children:[{label:'{{t("Nickname")}}',value:"nickname"}]}]}]}class _e extends e.Plugin{afterAdd(){return u(this,null,function*(){yield this.app.pm.add(Te)})}load(){return u(this,null,function*(){this.pm.get(g).registerInstruction(_,ze)})}}const P=t=>`{{t("${t}", ${JSON.stringify({ns:[y,"core"]})})}}`,B="messages",$e={dumpRules:"required",name:B,title:P("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:P("Title"),"x-component":"Input",required:!0}},{name:"content",interface:"input",type:"string",allowNull:!1,unique:!1,uiSchema:{type:"string",title:P("Content"),"x-component":"Input",required:!0}},{name:"collectionName",interface:"input",type:"string"},{name:"jsonContent",interface:"input",type:"jsonb",uiSchema:{type:"array",title:P("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:P("Read"),uiSchema:{"x-component-props":{showUnchecked:!0},type:"boolean","x-component":"Checkbox",title:P("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:P("User")},target:"users",targetKey:"id"},{name:"schema",type:"belongsTo",target:"uiSchemas",targetKey:"x-uid",foreignKey:"schemaName",constraints:!1}]},Ke=t=>{const{collection:o,params:n={filter:{}},action:s="list",children:p}=t,i=e.useCollectionRecordData(),a={collection:o,resource:o,action:s,params:A(f({pageSize:20,sort:["-createdAt"]},n),{filter:i!=null&&i.id?f({dataKey:`${i.id}`},n.filter):f({},n.filter)}),rowKey:"id",showIndex:!0,dragSort:!1};return r.jsx(e.ExtendCollectionsProvider,{collections:[$e],children:r.jsx(e.TableBlockProvider,A(f({name:o},a),{children:p}))})};function qe(t){const{onClick:o}=t,n=e.useAPIClient(),{refresh:s}=e.useDataBlockRequest(),p=e.useCollectionRecordData(),{id:i,read:a}=p,l=()=>u(this,null,function*(){o==null||o(),i&&!a&&(yield n.resource("messages").update({filter:{id:i},values:{read:!0}}),s())});return A(f({},t),{onClick:l})}const J=C.createContext(null),Ue=J.Provider;function je(){return C.useContext(J)}function Ge(){const{snapshot:t}=je(),{form:o}=e.useFormBlockContext();return C.useEffect(()=>{o.setValues(t||{})},[o,t]),{form:o}}const He=t=>{const{record:o}=t,n=e.useSchemaComponentContext(),{schemaName:s}=o;return r.jsx(Ue,{value:o,children:r.jsx(e.SchemaComponentContext.Provider,{value:A(f({},n),{designable:!1}),children:r.jsx(e.RemoteSchemaComponent,{uid:s,noForm:!0})})})},Je=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}}}}}}},Ye=()=>{const t=e.useCollectionRecordData(),o=Je({record:t});return r.jsx(e.SchemaComponent,{schema:o,components:{ViewCheckContent:He},scope:{usePropsCheckLink:qe,usePropsShowDetail:Ge}})},Re=e.createStyles(({css:t})=>({columnShowJSON:t`
|
|
23
23
|
text-align: left;
|
|
24
24
|
.json-item {
|
|
25
25
|
display: flex;
|
|
@@ -41,4 +41,4 @@
|
|
|
41
41
|
text-overflow: ellipsis;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`})),
|
|
44
|
+
`})),Xe=t=>{const{value:o}=t,n=e.useCollectionRecordData(),s=e.useCollectionManager(),p=e.useCompile(),{styles:i}=Re(),{collectionName:a}=n,l=C.useMemo(()=>Object.entries(o||{}).map(([d,m])=>{var S,D;const w=s.getCollectionField(`${a}.${d}`),v=Object.prototype.toString.call(m)==="[object Object]"?m==null?void 0:m.name:m;return Qe(v)?{label:p(((S=w==null?void 0:w.uiSchema)==null?void 0:S.title)||d),value:We(v)}:{label:p(((D=w==null?void 0:w.uiSchema)==null?void 0:D.title)||d),value:v}}),[]);return r.jsx("div",{className:i.columnShowJSON,children:l.map(d=>r.jsxs("div",{className:"json-item",children:[r.jsxs("div",{className:"item-label",children:[`${d.label}:`," "]}),r.jsx("div",{className:"item-value",children:d.value})]},d.label))})},Ze=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function Qe(t=""){return Ze.test(t)}function We(t){return x.dayjs.utc(t).local().format("YYYY-MM-DD HH:mm:ss")}const et=()=>{const{t}=E(),o=e.useCollectionRecordData(),{schemaName:n}=o||{},s=`${location.origin}/r/${n}`;return r.jsx("a",{href:s,target:"_blank",children:t("External link")})},tt=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"}},ot=t=>{const o=e.useCollectionRecordData(),n=tt({record:o});return r.jsx(e.SchemaComponent,{schema:n})},nt={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:h("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:h("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:h("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:h("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:h("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:h("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:h("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:h("URL"),"x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:100,align:"center"},properties:{url:{type:"string","x-component":"ColumnShowURL"}}}}}}},st=()=>r.jsx(e.SchemaComponent,{schema:nt,components:{ViewCheckLink:Ye,ViewDeleteLink:ot,ColumnShowURL:et,ColumnShowJSON:Xe}}),Y=t=>{const{params:o}=t||{};return{type:"void",name:"message-table","x-uid":"message-table","x-decorator":"Messages-ProviderCollectionMessages","x-decorator-props":{collection:B,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"}}}},rt=()=>{const t=e.useSchemaInitializerItem(),{insert:o}=e.useSchemaInitializer(),n=()=>{const s=Y();o(s)};return r.jsx(e.SchemaInitializerItem,A(f({},t),{onClick:n}))},R="otherBlocks.messages",X={name:"messageBlock",type:"item",title:e.tval("Site Messages"),icon:"BellOutlined",Component:"Messages-ViewBlockInitItem",collection:B,params:{appends:[]}};class at extends e.Plugin{load(){return u(this,null,function*(){this.app.addComponents({"Messages-ViewBlockInitItem":rt}),this.app.schemaInitializerManager.get("page:addBlock").add(R,X),this.app.schemaInitializerManager.get("popup:common:addBlock").add(R,X)})}}const it=t=>{const o=Y(t);return r.jsx(e.SchemaComponent,{memoized:!0,schema:o})},ct={type:"void",properties:{page:{type:"void","x-component":"Page",title:F("Site Messages"),properties:{messages:{type:"void","x-component":"ViewTableMessagesWrapper"}}}}},pt=()=>{const t=e.useSchemaComponentContext();return r.jsx(e.SchemaComponentContext.Provider,{value:A(f({},t),{designable:!1}),children:r.jsx(e.SchemaComponent,{schema:ct,components:{ViewTableMessagesWrapper:it}})})};class lt extends e.Plugin{load(){return u(this,null,function*(){this.addRouters()})}addRouters(){this.app.router.add("app.messages",{path:"messages",Component:pt})}}function dt(t=0){var d;const o=e.useAPIClient(),n=e.useCurrentUserContext(),s=(d=n==null?void 0:n.data)==null?void 0:d.data,[p,i]=C.useState(t),a=()=>u(this,null,function*(){var v,S;const m=yield o.request({resource:B,action:"count",params:{filter:{read:!1,userId:s==null?void 0:s.id}}}),w=(S=(v=m==null?void 0:m.data)==null?void 0:v.data)!=null?S:0;i(w)}),l=C.useMemo(()=>k.debounce(a,300),[a]);return e.useNoticeSub(ne,()=>{l()}),C.useEffect(()=>{a()},[]),{badgeCount:p}}const mt=()=>{const t=te.useNavigate(),{token:o}=e.useToken(),{t:n}=E(),{badgeCount:s}=dt(),p=()=>t("/admin/messages");return r.jsx(M.Tooltip,{title:n("Site Messages"),children:r.jsx(M.Badge,{count:s,overflowCount:99,offset:["-10%","40%"],size:"small",children:r.jsx(M.Button,{icon:r.jsx(ee.BellOutlined,{style:{color:o.colorTextHeaderMenu}}),title:n("Site Messages"),onClick:p})})})},ut=t=>r.jsx(e.PinnedPluginListProvider,{items:{nl:{order:220,component:"NotificationLink",pin:!0,isPublic:!0,belongTo:"pinnedmenu"}},children:r.jsx(e.SchemaComponentOptions,{components:{NotificationLink:mt},children:t.children})});class xt extends e.Plugin{afterAdd(){return u(this,null,function*(){this.app.use(ut),yield this.app.pm.add(lt),yield this.app.pm.add(at)})}load(){return u(this,null,function*(){this.app.addComponents({"Messages-ProviderCollectionMessages":Ke,"Messages-ViewTableMessages":st}),this.app.addScopes({useSubmit:()=>({run(){return u(this,null,function*(){})}})})})}}class N extends e.Plugin{constructor(){super(...arguments);b(this,"channels",new x.Registry)}registerChannel(n,s){if(typeof s=="function")this.channels.register(n,new s);else if(s instanceof V)this.channels.register(n,s);else throw new TypeError("invalid channel type to register")}afterAdd(){return u(this,null,function*(){yield this.app.pm.add(Ie),yield this.app.pm.add(_e),yield this.app.pm.add(xt)})}}c.default=N,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@tachybase/client": "0.23.
|
|
3
|
-
"@tachybase/utils": "0.23.
|
|
4
|
-
"@tachybase/database": "0.23.
|
|
5
|
-
"@tachybase/server": "0.23.
|
|
6
|
-
"@tachybase/module-workflow": "0.23.
|
|
2
|
+
"@tachybase/client": "0.23.40",
|
|
3
|
+
"@tachybase/utils": "0.23.40",
|
|
4
|
+
"@tachybase/database": "0.23.40",
|
|
5
|
+
"@tachybase/server": "0.23.40",
|
|
6
|
+
"@tachybase/module-workflow": "0.23.40",
|
|
7
7
|
"jsonwebtoken": "8.5.1",
|
|
8
|
-
"@tachybase/components": "0.23.
|
|
8
|
+
"@tachybase/components": "0.23.40",
|
|
9
9
|
"react": "18.3.1",
|
|
10
|
-
"@tachybase/actions": "0.23.
|
|
11
|
-
"@tachybase/schema": "0.23.
|
|
10
|
+
"@tachybase/actions": "0.23.40",
|
|
11
|
+
"@tachybase/schema": "0.23.40",
|
|
12
12
|
"antd": "5.22.5",
|
|
13
13
|
"lodash": "4.17.21",
|
|
14
14
|
"@ant-design/icons": "5.3.7",
|
|
@@ -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":"
|
|
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-01-18T18:53:02.358Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@alicloud/openapi-client","version":"0.4.12","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":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5","@alicloud/gateway-pop":"0.0.6"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.9","@alicloud/credentials":"^2.3.1","@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":"
|
|
1
|
+
{"name":"@alicloud/openapi-client","version":"0.4.12","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":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5","@alicloud/gateway-pop":"0.0.6"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.9","@alicloud/credentials":"^2.3.1","@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-01-18T18:53:03.001Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@alicloud/tea-util","version":"1.4.9","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","kitx":"^2.0.0"},"files":["dist","src"],"repository":"git@github.com:aliyun/tea-util.git","_lastModified":"
|
|
1
|
+
{"name":"@alicloud/tea-util","version":"1.4.9","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","kitx":"^2.0.0"},"files":["dist","src"],"repository":"git@github.com:aliyun/tea-util.git","_lastModified":"2025-01-18T18:53:03.112Z"}
|
|
@@ -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":"
|
|
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-01-18T18:53:07.320Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ws","version":"8.18.0","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":"^9.0.0","eslint-plugin-prettier":"^5.0.0","globals":"^15.0.0","mocha":"^8.4.0","nyc":"^15.0.0","prettier":"^3.0.0","utf-8-validate":"^6.0.0"},"_lastModified":"
|
|
1
|
+
{"name":"ws","version":"8.18.0","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":"^9.0.0","eslint-plugin-prettier":"^5.0.0","globals":"^15.0.0","mocha":"^8.4.0","nyc":"^15.0.0","prettier":"^3.0.0","utf-8-validate":"^6.0.0"},"_lastModified":"2025-01-18T18:53:01.580Z"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/module-message",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.40",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"dependencies": {},
|
|
6
6
|
"devDependencies": {
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"react-router-dom": "6.28.1",
|
|
17
17
|
"tencentcloud-sdk-nodejs": "^4.0.996",
|
|
18
18
|
"ws": "^8.18.0",
|
|
19
|
-
"@tachybase/components": "0.23.
|
|
20
|
-
"@tachybase/utils": "0.23.
|
|
21
|
-
"@tachybase/actions": "0.23.
|
|
19
|
+
"@tachybase/components": "0.23.40",
|
|
20
|
+
"@tachybase/utils": "0.23.40",
|
|
21
|
+
"@tachybase/actions": "0.23.40"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@tachybase/
|
|
25
|
-
"@tachybase/
|
|
26
|
-
"@tachybase/
|
|
27
|
-
"@tachybase/
|
|
28
|
-
"@tachybase/
|
|
29
|
-
"@tachybase/
|
|
24
|
+
"@tachybase/database": "0.23.40",
|
|
25
|
+
"@tachybase/schema": "0.23.40",
|
|
26
|
+
"@tachybase/client": "0.23.40",
|
|
27
|
+
"@tachybase/module-workflow": "0.23.40",
|
|
28
|
+
"@tachybase/test": "0.23.40",
|
|
29
|
+
"@tachybase/server": "0.23.40"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tachybase-build --no-dts @tachybase/module-message"
|