onchain-uikit 0.0.3 → 0.0.7

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.
Files changed (72) hide show
  1. package/lib/instance.cjs.mjs +366 -0
  2. package/lib/instance.es.mjs +29301 -0
  3. package/lib/instance.umd.mjs +366 -0
  4. package/lib/src/App.d.ts +5 -0
  5. package/lib/src/components/PlmMosaic/index.d.ts +5 -0
  6. package/lib/src/index.d.ts +4 -0
  7. package/lib/src/main.d.ts +0 -0
  8. package/lib/src/stories/Button.d.ts +14 -0
  9. package/lib/src/stories/Button.stories.d.ts +23 -0
  10. package/lib/src/stories/Header.d.ts +11 -0
  11. package/lib/src/stories/Header.stories.d.ts +18 -0
  12. package/lib/src/stories/OnChainProvider.d.ts +12 -0
  13. package/lib/src/stories/Page.d.ts +2 -0
  14. package/lib/src/stories/Page.stories.d.ts +12 -0
  15. package/lib/src/stories/PlmMosaic.stories.d.ts +14 -0
  16. package/lib/src/stories/PlmSelect/PlmSelect.stories.d.ts +21 -0
  17. package/lib/src/stories/PlmSelect/index.d.ts +20 -0
  18. package/lib/src/stories/XsButton.d.ts +22 -0
  19. package/lib/src/stories/XsButton.stories.d.ts +14 -0
  20. package/lib/src/typings.d.ts +623 -0
  21. package/lib/src/utils/authority/basicsAuthority.d.ts +22 -0
  22. package/lib/src/utils/authority/index.d.ts +10 -0
  23. package/lib/typings.d.ts +130 -0
  24. package/lib/vite.config.d.ts +2 -0
  25. package/package.json +25 -5
  26. package/.storybook/main.ts +0 -16
  27. package/.storybook/preview.ts +0 -14
  28. package/dist/index.es.js +0 -634
  29. package/dist/index.umd.js +0 -30
  30. package/eslint.config.js +0 -28
  31. package/index.html +0 -13
  32. package/public/vite.svg +0 -1
  33. package/src/App.css +0 -42
  34. package/src/App.tsx +0 -35
  35. package/src/assets/react.svg +0 -1
  36. package/src/index.css +0 -68
  37. package/src/index.ts +0 -4
  38. package/src/main.tsx +0 -10
  39. package/src/stories/Button.stories.ts +0 -53
  40. package/src/stories/Button.tsx +0 -37
  41. package/src/stories/Configure.mdx +0 -364
  42. package/src/stories/Header.stories.ts +0 -33
  43. package/src/stories/Header.tsx +0 -56
  44. package/src/stories/Page.stories.ts +0 -32
  45. package/src/stories/Page.tsx +0 -73
  46. package/src/stories/XsButton.tsx +0 -7
  47. package/src/stories/assets/accessibility.png +0 -0
  48. package/src/stories/assets/accessibility.svg +0 -1
  49. package/src/stories/assets/addon-library.png +0 -0
  50. package/src/stories/assets/assets.png +0 -0
  51. package/src/stories/assets/avif-test-image.avif +0 -0
  52. package/src/stories/assets/context.png +0 -0
  53. package/src/stories/assets/discord.svg +0 -1
  54. package/src/stories/assets/docs.png +0 -0
  55. package/src/stories/assets/figma-plugin.png +0 -0
  56. package/src/stories/assets/github.svg +0 -1
  57. package/src/stories/assets/share.png +0 -0
  58. package/src/stories/assets/styling.png +0 -0
  59. package/src/stories/assets/testing.png +0 -0
  60. package/src/stories/assets/theming.png +0 -0
  61. package/src/stories/assets/tutorials.svg +0 -1
  62. package/src/stories/assets/youtube.svg +0 -1
  63. package/src/stories/button.css +0 -30
  64. package/src/stories/header.css +0 -32
  65. package/src/stories/page.css +0 -68
  66. package/tsconfig.app.json +0 -26
  67. package/tsconfig.json +0 -7
  68. package/tsconfig.node.json +0 -94
  69. package/tsconfig.tsbuildinfo +0 -1
  70. package/vite.config.ts +0 -33
  71. /package/{src → lib/src}/vite-env.d.ts +0 -0
  72. /package/{dist → lib}/vite.svg +0 -0
@@ -0,0 +1,623 @@
1
+ import { Moment } from 'moment';
2
+ import { CSSProperties } from 'react';
3
+ import { temporaryData } from './models/temporaryData';
4
+ import { BasicsAttribute } from './utils/attribute';
5
+ import { AttributeStyle } from './utils/external-attribute';
6
+ import { ProjectGeneral, HealthStatusObject, ProjectStatusExample } from './utils/project';
7
+ import { HealthStatus, ForbiddenTime, BudgetEditTypeApiCode } from './utils/project/const';
8
+ import { UserIdentity } from './utils/userIdentity';
9
+ import { ArchivingStatusType } from './utils/itemCode';
10
+ import { BasicsInstanceTab } from './hooks/useTabInfo/type';
11
+ import { workflowApprove } from './pages/qualityData/utils';
12
+
13
+
14
+ declare namespace APP {
15
+ type user = {
16
+ email: string;
17
+ id: string;
18
+ name: string;
19
+ role: string;
20
+ surname: string;
21
+ username: string;
22
+ avatar?: string;
23
+ hasAuthFuncAuth: boolean;
24
+ hasLogFuncAuth: boolean;
25
+ hasUserFuncAuth: boolean;
26
+ };
27
+
28
+ type settings = {
29
+ collapsed: boolean;
30
+ };
31
+ type appInfo = {
32
+ title: string;
33
+ name: string;
34
+ };
35
+ type pageInfo = {
36
+ // 页面标题
37
+ name: string;
38
+
39
+ // 页面路径
40
+ path: string;
41
+
42
+ // 子页面
43
+ route: {
44
+ name: string;
45
+ path: string;
46
+ };
47
+ };
48
+
49
+ type historyBackOff = {
50
+ // 当前页
51
+ currentPage: number;
52
+
53
+ // 页面路径
54
+ path: string;
55
+ };
56
+
57
+ interface Message {
58
+ error: (text: string) => void;
59
+ [k: string]: any;
60
+ }
61
+
62
+ interface CodeItemList<T = string> {
63
+ apicode: T;
64
+ children: CodeItemList<T>[];
65
+ description: string;
66
+ icon: string;
67
+ id: string;
68
+ name: string;
69
+ pid: null;
70
+ readonly: boolean;
71
+ sort: number;
72
+ status: boolean;
73
+ code?: string;
74
+ value?: string;
75
+ label?: string;
76
+ [k: string]: any;
77
+ }
78
+
79
+ interface BudgetEditType<T = string> extends CodeItemList<T> {
80
+ children: BudgetEditType<T>[];
81
+ }
82
+
83
+ interface CreateInstanceResult {
84
+ affectedIn: string | null;
85
+ canDel: boolean;
86
+ checkOut: string | null;
87
+ code: string;
88
+ createBy: string;
89
+ createTime: string;
90
+ delFlag: number;
91
+ id: string;
92
+ itemCode: number;
93
+ lifecycleId: string | null;
94
+ objectApicode: string;
95
+ objectId: string;
96
+ publishTime: string | null;
97
+ publishing: string | null;
98
+ standardPartId: string | null;
99
+ tenantId: string;
100
+ updateBy: string | null;
101
+ updateTime: string;
102
+ versionNumber: string;
103
+ versionOrder: string;
104
+ workflowCode: string;
105
+ workspaceId: string;
106
+ }
107
+
108
+ type Project = {
109
+ /** 当前项目实例的id */
110
+ id: string;
111
+ name: string;
112
+ projectName: string;
113
+ healthList: HealthStatusObject[];
114
+ /** 编辑预算费用方式的配置列表 */
115
+ budgetEditTypeList: BudgetEditType<BudgetEditTypeApiCode>[];
116
+ /** 概览进度列表数据 */
117
+ dateTableData: {
118
+ name: string;
119
+ start: string;
120
+ apicode: string;
121
+ end: string;
122
+ days: string;
123
+ start_gap: string;
124
+ end_gap: string;
125
+ days_gap: string;
126
+ progress: string;
127
+ progress_name: string;
128
+ forbiddenTime: Record<string, ForbiddenTime>;
129
+ attrs: {
130
+ days: BasicsAttribute;
131
+ start: BasicsAttribute;
132
+ end: BasicsAttribute;
133
+ progress?: BasicsAttribute;
134
+ };
135
+ id: number;
136
+ }[];
137
+ /** 健康状态 */
138
+ health?: HealthStatus;
139
+ /** 所有者 */
140
+ owner: string;
141
+ /** 转移所有者目标用户 */
142
+ transferOwner: string;
143
+ /** 预算费用 */
144
+ budget: string | number;
145
+ /** 实际费用 */
146
+ actual: string | number;
147
+ /** 项目实例所在的项目id */
148
+ projectId: string;
149
+ /** 是否自上而下 */
150
+ isTopDown: boolean;
151
+ /** 日历 */
152
+ ownerType: "" | "1";
153
+ calendar: Partial<PlmProject.Calendar> & {
154
+ startFormat: string;
155
+ endFormat: string;
156
+ isInit: boolean;
157
+ };
158
+ calendarInstance: PlmProject.GanttCalendarInstance<Moment> | null;
159
+ /** 项目经理 */
160
+ projectManager: string;
161
+ projectStatusName: string;
162
+ /** 项目大类 apicode: id 映射 */
163
+ columnApiCodeIdMap: Record<string, any>;
164
+ /** 是否模板下拉列表 */
165
+ isTemplateList: CodeItemList<"Yes" | "No">[];
166
+ /** 是否是模板状态 */
167
+ // templateState: CodeItemList;
168
+ /** 是否是模板 */
169
+ isTemplate: boolean;
170
+ /** 当前进度 */
171
+ currentProcess: string;
172
+ /** 计划进度 */
173
+ scheduleProcess: string;
174
+ /** 已用工时 */
175
+ usedHours: string;
176
+ /** 计划开始时间 */
177
+ startDate: string;
178
+ /** 计划结束时间 */
179
+ endDate: string;
180
+ /** 计划时长 */
181
+ days: string;
182
+ /** 当前实例是否在发布后 基线变更中删除 */
183
+ isDeleteInProcess: boolean;
184
+ /** listCode列表缓存对象 */
185
+ listCodeListCacheObject: Record<string, APP.CodeItemList[]>;
186
+ };
187
+
188
+ type instanceInfoType<T = string> = {
189
+ /** @deprecated 实例 id */
190
+ id: string;
191
+ /** 实例 id */
192
+ insId: string;
193
+ /** 产品id */
194
+ productId: string;
195
+ /** 产品名称 */
196
+ productName: string;
197
+ /** 通用描述(name) */
198
+ insDesc: string;
199
+ /** 服务端给的是`number`或者`string`,这里使用`any`类型处理,可以使用`==`隐方转换 */
200
+ itemCode: any;
201
+ /** 实例类型名称 */
202
+ objectName: string;
203
+ /** 实例类型 id */
204
+ objectId: string;
205
+ /** 实例类型 ApiCode */
206
+ objectApicode: string;
207
+ /** 实例拥有的使有公有属性 */
208
+ BasicAttrs: BasicsAttribute<T>[];
209
+ /** 编辑权限,以及所有的数据 */
210
+ updateInstanceVo: Record<string, any>;
211
+ /** 所有tab页签 */
212
+ allTabs: BasicsInstanceTab[];
213
+ /** 实际渲染的页签(例如概览就通过公有属性转换过来) */
214
+ tabs: any[];
215
+ /** 实施对象tab页签 */
216
+ effectTabs: any;
217
+ /** tab页签的数量 */
218
+ tabInsCountMap: any;
219
+ /** 是否有子节点 */
220
+ insBom: boolean;
221
+ /** 是否在变更流程中 */
222
+ inChangeOrderWorkflow: any;
223
+ /**@deprecated 项目是否在变更流程中 */
224
+ affectedInPCO: boolean;
225
+ /** 实例在哪些流程中 */
226
+ affectedIn: string;
227
+ /** 工作流id */
228
+ workflowId: string;
229
+ /** 编号 */
230
+ number: string;
231
+ Name: string;
232
+ /** 当前版本 */
233
+ currentVersion: string;
234
+ /** 当前版号 */
235
+ currentVersionOrder: string;
236
+ /**@deprecated 最新版本 */
237
+ insVersion: string;
238
+ /** 最新版号 */
239
+ insVersionOrder: string | number;
240
+ /** 最新版本过权限 (有'~#~') */
241
+ insVersionWithAuth: string;
242
+ /** 最新版次过权限 (有'~#~') */
243
+ insVersionOrderWithAuth: string;
244
+ /** 最新版本(无'~#~') */
245
+ insVersionUnbound: string;
246
+ /** 最新版次(无'~#~') */
247
+ insVersionOrderUnbound: string;
248
+ /** 签出状态 */
249
+ checkOut: boolean;
250
+ /** 属性id:属性值 */
251
+ attributes: { [k: string]: any };
252
+ /** @deprecated */
253
+ attributeList: {
254
+ apiCode: string;
255
+ attrId: string;
256
+ attrValue: string;
257
+ [k: string]: any;
258
+ }[];
259
+ /** 基本属性布局方式 upperAndLowerLayout: 上下布局 | leftAndRightLayout: 左右布局 */
260
+ attributeStyle: AttributeStyle;
261
+ userDetails: { [k: string]: any };
262
+ userItemCode: any;
263
+ UserContent: { [k: string]: any };
264
+ archivingStatus?: ArchivingStatusType;
265
+ /** 工作流拒绝时的指定目标用户ID */
266
+ workflowRejectTargetUserId?: string;
267
+ workflow: Workflow["workflow"];
268
+
269
+ /** 生命周期 */
270
+ lifecycle: {
271
+ id: string;
272
+ instanceId: string;
273
+ objectId: string | null;
274
+ apicode: string;
275
+ name: string;
276
+ showName: string;
277
+ color: string;
278
+ status: boolean;
279
+ bomRule: string;
280
+ sort: number;
281
+ code: number;
282
+ isBase: boolean;
283
+ objectShowName: string | null;
284
+ objectBomRule: string | null;
285
+ };
286
+ children?: instanceInfoType<T>[];
287
+ [k: string]: any;
288
+ };
289
+
290
+ /** 工作流 */
291
+ interface Workflow<T = string> extends instanceInfoType<T> {
292
+ changeType: "order" | "request";
293
+ children?: Workflow<T>[];
294
+ workflow: {
295
+ cancel: boolean;
296
+ changeId: string;
297
+ changeItemCode: number;
298
+ changeNumber: string;
299
+ changeTypeName: string;
300
+ crtNodeClazz: string;
301
+ crtNodeId: string;
302
+ crtNodeIntoTime: string;
303
+ crtNodeName: string;
304
+ end: boolean;
305
+ publish: boolean;
306
+ waitingApprovalObjectInstanceIds: string;
307
+ wfDefId: string;
308
+ wfDefName: string;
309
+ wfId: string;
310
+ wfName: string;
311
+ [k: string]: any;
312
+ };
313
+ workflowNodes: {
314
+ children: Array<any>;
315
+ code: string;
316
+ id: string;
317
+ name: string;
318
+ sort: number;
319
+ type: string;
320
+ [k: string]: any;
321
+ }[];
322
+ workflowInstance: {
323
+ change_instance_desc: string;
324
+ change_instance_id: string;
325
+ change_instance_item_code: number;
326
+ change_instance_no: string;
327
+ change_instance_type: string;
328
+ create_by: string;
329
+ create_time: string;
330
+ follower: string;
331
+ id: string;
332
+ init_type: number;
333
+ instance_name: string;
334
+ is_cancel: boolean;
335
+ is_denied: boolean;
336
+ is_end: boolean;
337
+ is_pause: boolean;
338
+ is_publish: boolean;
339
+ org_id: string;
340
+ product_id: string;
341
+ reject_src_node_id: string;
342
+ remark: string;
343
+ running_node_id: string;
344
+ running_node_name: string;
345
+ running_node_sort: number;
346
+ status: string;
347
+ update_by: string;
348
+ update_time: string;
349
+ workflow_definition_id: string;
350
+ workflow_definition_name: string;
351
+ workflow_definition_version: string;
352
+ workflow_definition_version_id: string;
353
+ [k: string]: any;
354
+ };
355
+ workflowNodesThumb: {
356
+ ActiveNodes: any[];
357
+ BranchNodes: any;
358
+ MainNode: Record<string, any>;
359
+ [k: string]: any;
360
+ }[];
361
+ }
362
+
363
+ /** 文件实例 */
364
+ interface FileInstance<T = string> extends instanceInfoType<T> {
365
+ fileUrl: any;
366
+ fileName: any;
367
+ FileFormat: any;
368
+ FileSize: any;
369
+ FileSizeWithAuth: any;
370
+ storeNumber: any;
371
+ CheckOutUser: any;
372
+ onlineEditStatus: any;
373
+ LastEditTime: any;
374
+ }
375
+
376
+ /** 物料实例 */
377
+ interface MaterialInstance<T = string> extends instanceInfoType<T> {
378
+ extraAttr: any;
379
+ }
380
+
381
+ interface BasicsProjectInstance<T = string>
382
+ extends instanceInfoType<T>,
383
+ Workflow<T> {
384
+ /** 实例在哪些流程中 (PSCO: 状态变更 | PCO: 基线变更) */
385
+ affectedIn: "PCO" | "PSCO" | "";
386
+ /** 日历id */
387
+ calendarId: string;
388
+ /** 前置任务已完成 */
389
+ preComplete: boolean;
390
+ /** 预算编辑方式 */
391
+ budgetEditType: string;
392
+ /** 项目版本号 */
393
+ projectVersionOrder: string;
394
+ /** 前置任务 */
395
+ preTask: string;
396
+ /** 后置任务 */
397
+ postTask: string;
398
+ /** 目标交付数量 */
399
+ targetDeliveryCount: string;
400
+ /** 资源用户 */
401
+ resUsers?: string[];
402
+ /** 是否模板 */
403
+ isTemplate?: boolean;
404
+ /** 父级预算费用 */
405
+ pbudget?: string;
406
+ /** 父级类型 */
407
+ pobjectApicode?: string;
408
+ children?: BasicsProjectInstance<T>[];
409
+ }
410
+
411
+ /** 项目实例 */
412
+ interface ProjectInstance<T = string> extends BasicsProjectInstance<T> {
413
+ project: Project;
414
+ projectGeneral: ProjectGeneral;
415
+ projectStatusExample: ProjectStatusExample;
416
+ children?: ProjectInstance<T>[];
417
+ }
418
+
419
+ /** 个性化配置 */
420
+ interface Personality extends PlmProject.Personality {
421
+ /** 是否有科目数据 */
422
+ isHasSubject: boolean;
423
+ /** 全局可替代bom */
424
+ globalSubstituteCopyBom: boolean;
425
+ /** BOM位号和数量强制检查 */
426
+ bomCheck: boolean;
427
+ /** 是否显示无权限字段 */
428
+ showNoPermissionField: boolean;
429
+ /** 是否显示缩略图 */
430
+ showThumb: boolean;
431
+ /**页面滚动加载数量 */
432
+ pageScrollingNum: number;
433
+ [k: string]: any;
434
+ }
435
+
436
+ interface CurrentUserInfo {
437
+ id?: any;
438
+ consumerName?: any;
439
+ empno?: any;
440
+ orgCode?: any;
441
+ email?: any;
442
+ name?: any;
443
+ avatar?: any;
444
+ status?: any;
445
+ deptname?: any;
446
+ description?: any;
447
+ managerRoles: string;
448
+ otherRoles: string;
449
+ managerRoleApicodes: string;
450
+ otherRoleApicodes: string;
451
+ hasLogFuncAuth: boolean;
452
+ hasUserFuncAuth: boolean;
453
+ hasAuthFuncAuth: boolean;
454
+ userManager: boolean;
455
+ }
456
+
457
+ /** 产品清单对象 */
458
+ interface Detailed {
459
+ canDel: boolean;
460
+ category: string;
461
+ icon: string;
462
+ id: string;
463
+ isShow: number;
464
+ name: string;
465
+ parentId: string;
466
+ sort: number;
467
+ type: string;
468
+ [k: string]: any;
469
+ }
470
+
471
+ /** 全局模块对象 */
472
+ interface Module {
473
+ alias: string;
474
+ apiContext: string;
475
+ apicode: string;
476
+ id: string;
477
+ itemCodes: null | number;
478
+ name: string;
479
+ pathCode: null | string;
480
+ shortcutsCode: string;
481
+ sort: number;
482
+ status: boolean;
483
+ }
484
+
485
+ /** 产品数据实例分类对象 */
486
+ interface InstanceClassify {
487
+ belongModule: string;
488
+ butTabCode: null;
489
+ children: InstanceClassify | null;
490
+ conditionId: null;
491
+ count: number;
492
+ delFlag: boolean;
493
+ icon: string;
494
+ id: string;
495
+ itemCode: number;
496
+ leaf: boolean;
497
+ level: number;
498
+ name: string;
499
+ objectApicode: string | null;
500
+ parentId: string | null;
501
+ pathCode: string | null;
502
+ sort: number;
503
+ type: number;
504
+ }
505
+ }
506
+
507
+ declare interface ResponseData<T = any> {
508
+ code: number;
509
+ message: string;
510
+ result: T;
511
+ success: boolean;
512
+ warning: boolean;
513
+ timestamp: number;
514
+ [k: string]: any;
515
+ }
516
+ /**
517
+ * Base props
518
+ */
519
+ interface BaseComponentProps<T = any> {
520
+ className?: string;
521
+ children?: React.ReactNode;
522
+ id?: string;
523
+ ref?: React.Ref<T>;
524
+ style?: CSSProperties;
525
+ }
526
+
527
+ export type logType =
528
+ | "create"
529
+ | "add"
530
+ | "del"
531
+ | "update"
532
+ | "sort"
533
+ | "display"
534
+ | "enable"
535
+ | "disable"
536
+ | "other"
537
+ | "transfer"
538
+ | "reduction"
539
+ | "unlock"
540
+ | "saveAs"
541
+ | "export"
542
+ | "release"
543
+ | "upload"
544
+ | "addAppro" //添加审批人
545
+ | "addConcern" //添加关注人
546
+ | "delAppro"
547
+ | "delConcern"
548
+ | "download"
549
+ | "importCreate"
550
+ | "importUpdate";
551
+
552
+ export type tableType =
553
+ | "menu"
554
+ | "cad"
555
+ | "coderule"
556
+ | "version"
557
+ | "authorization"
558
+ | "list"
559
+ | "condition"
560
+ | "object"
561
+ | "attribute"
562
+ | "role"
563
+ | "instance"
564
+ | "lifecycle"
565
+ | "extension"
566
+ | "depart"
567
+ | "tab"
568
+ | "configEmail"
569
+ | "configCustomization"
570
+ | "configSso"
571
+ | "configFormat"
572
+ | "configPrint"
573
+ | "departInfo"
574
+ | "userStrategy"
575
+ | "expression"
576
+ | "workflow"
577
+ | "user"
578
+ | "userGroup"
579
+ | "printSignature"
580
+ | "filter"
581
+ | "trigger"
582
+ | "printTemplate";
583
+
584
+ interface SetOperateLogProps {
585
+ id: string;
586
+ table: tableType;
587
+ type: logType;
588
+ val: {
589
+ name?: string;
590
+ description: string;
591
+ };
592
+ }
593
+
594
+ export interface QiankunStateFromMaster {
595
+ operateLog: (params: SetOperateLogProps) => void;
596
+ generateAddDescription: (
597
+ labelVal: Record<string, any>,
598
+ newVal: Record<string, any>
599
+ ) => string;
600
+ generateUpdateDescription: (
601
+ labelVal: Record<string, any>,
602
+ oldVal: Record<string, any>,
603
+ newVal: Record<string, any>
604
+ ) => string;
605
+ getLabelInOptions: (params: {
606
+ value: string | boolean | string[];
607
+ options: any;
608
+ adaptor?:
609
+ | {
610
+ label: string;
611
+ value: string;
612
+ children?: string | undefined;
613
+ }
614
+ | undefined;
615
+ }) => any;
616
+ operateTypeMap: Record<logType, string>;
617
+ }
618
+
619
+ export interface ClipboardArray<T = any> extends Array<T> {
620
+ namespace?: string;
621
+ type?: "shear" | "copy";
622
+ onPasteCallback?: (runtimeNamespace: string) => Promise<any[]>;
623
+ }
@@ -0,0 +1,22 @@
1
+ import { APP } from '../../typings';
2
+ import { editedStatusParamsType } from '../plmUtils/ITab';
3
+ export type Mosaic = '~#~';
4
+ export declare class BasicsAuthorityTool {
5
+ /** 马赛克`~#~` */
6
+ static mosaic: Mosaic;
7
+ /**
8
+ * 判断有阅读权限
9
+ */
10
+ readPermission<T>(value: T): value is Exclude<T, Mosaic>;
11
+ handlingError(value: string): string;
12
+ /** 判断是否有权限,可以用于读取和更新权限 */
13
+ hasAuthority<T extends Record<string, any>>(updateVo: T, key: keyof T): boolean;
14
+ /** 是否是马赛克 */
15
+ isMosaic<T>(value: T | Mosaic): value is Mosaic;
16
+ /** 马赛克渲染为空 */
17
+ mosaicBlank(value: string): string;
18
+ getEditAndControlledState(props: editedStatusParamsType,
19
+ /** 实例信息 */
20
+ instanceInfo: APP.ProjectInstance | APP.MaterialInstance | APP.FileInstance | APP.instanceInfoType): any;
21
+ }
22
+ export declare const BasicsAuthority: BasicsAuthorityTool;
@@ -0,0 +1,10 @@
1
+ import { BasicsAuthorityTool, Mosaic } from './basicsAuthority';
2
+ declare class AuthorityTool extends BasicsAuthorityTool {
3
+ /** 马赛克`~#~` */
4
+ mosaic: Mosaic;
5
+ displayData(value: string, inLine?: boolean): string | import("react/jsx-runtime").JSX.Element;
6
+ /** 权限渲染方式 */
7
+ renderIsMosaic<V, C = React.ReactNode>(value: V, children: C, inLine?: boolean): Exclude<C | React.ReactNode, Mosaic>;
8
+ }
9
+ export declare const Authority: AuthorityTool;
10
+ export {};