onchain-uikit 0.0.7 → 3.9.4-alpha2
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/filePreview/fontawesome-webfont.woff2 +0 -0
- package/dist/filePreview/iconfont.css +457 -0
- package/dist/filePreview/loading.gif +0 -0
- package/dist/filePreview/logo.svg +1 -0
- package/dist/filePreview/luckyexcel.umd.js +26153 -0
- package/dist/filePreview/luckysheet.css +7145 -0
- package/dist/filePreview/luckysheet.umd.js +137608 -0
- package/dist/filePreview/plugin.js +29474 -0
- package/dist/filePreview/plugins.css +10 -0
- package/dist/filePreview/pluginsCss.css +1 -0
- package/dist/filePreview/waffle_sprite.png +0 -0
- package/dist/font/demo.css +539 -0
- package/dist/font/demo_index.html +20820 -0
- package/dist/font/iconfont.css +3604 -0
- package/dist/font/iconfont.js +70 -0
- package/dist/font/iconfont.json +6288 -0
- package/dist/font/iconfont.svg +1813 -0
- package/dist/font/iconfont.ttf +0 -0
- package/dist/font/iconfont.woff +0 -0
- package/dist/font/iconfont.woff2 +0 -0
- package/dist/index.cjs.js +529 -0
- package/dist/index.es.js +44594 -0
- package/dist/index.umd.js +633 -0
- package/dist/logo.svg +1 -0
- package/dist/onchain-uikit.css +10 -0
- package/dist/xlsx-C9icP-aY.mjs +24775 -0
- package/dist/xlsx-qn1xoUuv.js +105 -0
- package/lib/src/App.d.ts +1 -1
- package/lib/src/app/main/model/context.d.ts +30 -0
- package/lib/src/components/OnChainAI/index.d.ts +3 -0
- package/lib/src/{stories/Page.stories.d.ts → components/OnChainAI/index.stories.d.ts} +4 -2
- package/lib/src/components/OnChainAI/welcome.d.ts +6 -0
- package/lib/src/components/OnChainAdvancedSearch/index.d.ts +8 -0
- package/lib/src/{stories/XsButton.stories.d.ts → components/OnChainAdvancedSearch/index.stories.d.ts} +1 -1
- package/lib/src/components/OnChainBadge/index.d.ts +52 -0
- package/lib/src/{stories/PlmMosaic.stories.d.ts → components/OnChainBadge/index.stories.d.ts} +2 -2
- package/lib/src/components/OnChainCompositeForm/index.d.ts +26 -0
- package/lib/src/components/OnChainCompositeForm/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainDropMenu/index.d.ts +21 -0
- package/lib/src/components/OnChainDropMenu/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainExcelViewer/index.d.ts +8 -0
- package/lib/src/components/OnChainExcelViewer/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainForm/index.d.ts +14 -0
- package/lib/src/components/OnChainForm/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainFormItem/index.d.ts +175 -0
- package/lib/src/components/OnChainFormItem/index.stories.d.ts +19 -0
- package/lib/src/components/OnChainFormItem/title/index.d.ts +2 -0
- package/lib/src/components/OnChainGenAntImage/index.d.ts +5 -0
- package/lib/src/components/OnChainGenAntImage/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainGlobalLoading/index.d.ts +9 -0
- package/lib/src/components/OnChainGlobalLoading/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainHighLightWords/index.d.ts +9 -0
- package/lib/src/components/OnChainHighLightWords/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainIcon/index.d.ts +31 -0
- package/lib/src/components/OnChainIcon/index.stories.d.ts +15 -0
- package/lib/src/components/OnChainImage/index.d.ts +9 -0
- package/lib/src/components/OnChainImage/index.stories.d.ts +18 -0
- package/lib/src/components/OnChainInput/index.d.ts +13 -0
- package/lib/src/components/OnChainInput/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainLinkInstance/index.d.ts +1 -0
- package/lib/src/components/OnChainLoading/index.d.ts +10 -0
- package/lib/src/components/OnChainLoading/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainLoadingSkCube/index.d.ts +6 -0
- package/lib/src/components/OnChainLoadingSkCube/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainMarkdown/index.d.ts +16 -0
- package/lib/src/components/OnChainMarkdown/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainModal/index.d.ts +22 -0
- package/lib/src/components/OnChainModal/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainMosaic/index.d.ts +7 -0
- package/lib/src/components/OnChainMosaic/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainPopoverTransfer/index.d.ts +49 -0
- package/lib/src/components/OnChainPopoverTransfer/select/index.d.ts +18 -0
- package/lib/src/components/OnChainPopupSelect/index.d.ts +32 -0
- package/lib/src/components/OnChainPopupSelect/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainProgress/index.d.ts +7 -0
- package/lib/src/components/OnChainProgress/index.stories.d.ts +16 -0
- package/lib/src/components/OnChainProvider/index.d.ts +18 -0
- package/lib/src/components/OnChainProvider/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainPublicTree/index.d.ts +20 -0
- package/lib/src/components/OnChainPublicTree/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainQueryBuilder/AbcSelectTransfer/index.d.ts +15 -0
- package/lib/src/components/OnChainQueryBuilder/index.d.ts +31 -0
- package/lib/src/components/OnChainResourceTree/index.d.ts +26 -0
- package/lib/src/components/OnChainResourceTree/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainScrollBar/index.d.ts +7 -0
- package/lib/src/components/OnChainScrollBar/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainScrollBarAssembly/index.d.ts +11 -0
- package/lib/src/components/OnChainScrollBarAssembly/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainSelect/index.d.ts +14 -0
- package/lib/src/{stories/PlmSelect/PlmSelect.stories.d.ts → components/OnChainSelect/index.stories.d.ts} +8 -3
- package/lib/src/components/OnChainSelectPopupForm/index.d.ts +45 -0
- package/lib/src/components/OnChainSelectPopupForm/select/index.d.ts +20 -0
- package/lib/src/components/OnChainTable/ContextMenu.d.ts +8 -0
- package/lib/src/components/OnChainTable/EditableCell.d.ts +39 -0
- package/lib/src/components/OnChainTable/EditableRow.d.ts +6 -0
- package/lib/src/components/OnChainTable/OnChainTableFormItem/index.d.ts +14 -0
- package/lib/src/components/OnChainTable/ResizableTitle.d.ts +2 -0
- package/lib/src/components/OnChainTable/TableFooter.d.ts +13 -0
- package/lib/src/components/OnChainTable/TableUtils.d.ts +78 -0
- package/lib/src/components/OnChainTable/const.d.ts +2 -0
- package/lib/src/components/OnChainTable/index.d.ts +101 -0
- package/lib/src/components/OnChainTable/index.stories.d.ts +28 -0
- package/lib/src/components/OnChainTable/type.d.ts +10 -0
- package/lib/src/components/OnChainTable/useClipboard.d.ts +67 -0
- package/lib/src/components/OnChainTable/useColumn.d.ts +5 -0
- package/lib/src/components/OnChainTable/useCopy.d.ts +5 -0
- package/lib/src/components/OnChainTable/useDynamicHeight.d.ts +13 -0
- package/lib/src/components/OnChainTable/useFiltered.d.ts +23 -0
- package/lib/src/components/OnChainTable/usePaste.d.ts +5 -0
- package/lib/src/components/OnChainTable/useVirtualScroll.d.ts +3 -0
- package/lib/src/components/OnChainTable/virtualScroll.d.ts +91 -0
- package/lib/src/components/OnChainTableSelection/index.d.ts +40 -0
- package/lib/src/components/OnChainTableSelection/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainTabs/index.d.ts +20 -0
- package/lib/src/components/OnChainTabs/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainViewerError/index.d.ts +6 -0
- package/lib/src/components/OnChainViewerError/index.stories.d.ts +14 -0
- package/lib/src/components/OnChainformUploader/index.d.ts +1 -0
- package/lib/src/components/PlmSearchSelect/index.d.ts +18 -0
- package/lib/src/hooks/useShortcutKey/index.d.ts +5 -0
- package/lib/src/hooks/useStore/index.d.ts +14 -0
- package/lib/src/index.d.ts +32 -4
- package/lib/src/language/index.d.ts +23 -0
- package/lib/src/language/translate.d.ts +5 -0
- package/lib/src/types/gantt.d.ts +269 -0
- package/lib/src/typings.d.ts +610 -612
- package/lib/src/utils/attribute.d.ts +70 -0
- package/lib/src/utils/authority/basicsAuthority.d.ts +0 -5
- package/lib/src/utils/authority/const.d.ts +30 -0
- package/lib/src/utils/itemCode.d.ts +159 -0
- package/lib/src/utils/utility.d.ts +46 -0
- package/lib/typings.d.ts +126 -130
- package/package.json +31 -7
- package/lib/instance.cjs.mjs +0 -366
- package/lib/instance.es.mjs +0 -29301
- package/lib/instance.umd.mjs +0 -366
- package/lib/src/components/PlmMosaic/index.d.ts +0 -5
- package/lib/src/stories/Button.d.ts +0 -14
- package/lib/src/stories/Button.stories.d.ts +0 -23
- package/lib/src/stories/Header.d.ts +0 -11
- package/lib/src/stories/Header.stories.d.ts +0 -18
- package/lib/src/stories/OnChainProvider.d.ts +0 -12
- package/lib/src/stories/Page.d.ts +0 -2
- package/lib/src/stories/PlmSelect/index.d.ts +0 -20
- package/lib/src/stories/XsButton.d.ts +0 -22
- /package/{lib → dist}/vite.svg +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export interface BasicsAttribute<ApiCode = string> {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
apicode: ApiCode;
|
|
6
|
+
status: boolean;
|
|
7
|
+
valueType: string;
|
|
8
|
+
defValue: string | null;
|
|
9
|
+
required: boolean;
|
|
10
|
+
controlled: any;
|
|
11
|
+
delFlag: number;
|
|
12
|
+
createTime: string;
|
|
13
|
+
createBy: string;
|
|
14
|
+
updateTime: string;
|
|
15
|
+
updateBy: string;
|
|
16
|
+
allowMultiple: any;
|
|
17
|
+
itemCode: number;
|
|
18
|
+
tabCode: number;
|
|
19
|
+
readonly: string;
|
|
20
|
+
bomVisible: boolean;
|
|
21
|
+
explanation: string;
|
|
22
|
+
defView: boolean;
|
|
23
|
+
fieldHeight: any;
|
|
24
|
+
allowLength: any;
|
|
25
|
+
maxLength: any;
|
|
26
|
+
allowDigits: any;
|
|
27
|
+
minValue: any;
|
|
28
|
+
maxValue: any;
|
|
29
|
+
allowZero: any;
|
|
30
|
+
dateFormat: string;
|
|
31
|
+
displayFormat: string;
|
|
32
|
+
listType: string;
|
|
33
|
+
listCode: any;
|
|
34
|
+
dateRule: string;
|
|
35
|
+
allowFileSize: any;
|
|
36
|
+
allowFileType: string;
|
|
37
|
+
dynamicTable: string;
|
|
38
|
+
initLineCount: any;
|
|
39
|
+
allowDuplication: any;
|
|
40
|
+
displayRule: string;
|
|
41
|
+
dataFrom: '0' | '1' | '2';
|
|
42
|
+
dataFromId: string;
|
|
43
|
+
sort: number;
|
|
44
|
+
canMove: any;
|
|
45
|
+
showDescription: any;
|
|
46
|
+
fileName: string;
|
|
47
|
+
textRule: string;
|
|
48
|
+
display: boolean;
|
|
49
|
+
canNotEdit: boolean;
|
|
50
|
+
showColumn: '1' | '2' | null;
|
|
51
|
+
/** 在创建时通过样式隐藏属性,数据仍然存在 */
|
|
52
|
+
hidden?: boolean;
|
|
53
|
+
[k: string]: any;
|
|
54
|
+
}
|
|
55
|
+
export declare class Attribute {
|
|
56
|
+
/** 根据 dataFrom 类型读取指定 属性id */
|
|
57
|
+
static getAttributesMapId<T = string>(attr: BasicsAttribute<T>, quoteMultipleKey?: 'id' | 'dataFromId'): string;
|
|
58
|
+
/** 是否是自定义属性 */
|
|
59
|
+
static isCustomAttr<T = string>(attr: BasicsAttribute<T>): boolean;
|
|
60
|
+
/** 是否是引用属性 */
|
|
61
|
+
static isQuoteAttr<T = string>(attr: BasicsAttribute<T>): boolean;
|
|
62
|
+
/** 是否是引用多种类型的实例 */
|
|
63
|
+
static isQuoteMultipleTypesAttr<T = string>(attr: BasicsAttribute<T>): boolean;
|
|
64
|
+
/** 实例上是否有某个属性 */
|
|
65
|
+
static hasAttr(object: Record<string, any> | undefined, attr: string): boolean | undefined;
|
|
66
|
+
}
|
|
67
|
+
export declare enum AttrReadonly {
|
|
68
|
+
}
|
|
69
|
+
export declare enum AttrValueType {
|
|
70
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { APP } from '../../typings';
|
|
2
|
-
import { editedStatusParamsType } from '../plmUtils/ITab';
|
|
3
1
|
export type Mosaic = '~#~';
|
|
4
2
|
export declare class BasicsAuthorityTool {
|
|
5
3
|
/** 马赛克`~#~` */
|
|
@@ -15,8 +13,5 @@ export declare class BasicsAuthorityTool {
|
|
|
15
13
|
isMosaic<T>(value: T | Mosaic): value is Mosaic;
|
|
16
14
|
/** 马赛克渲染为空 */
|
|
17
15
|
mosaicBlank(value: string): string;
|
|
18
|
-
getEditAndControlledState(props: editedStatusParamsType,
|
|
19
|
-
/** 实例信息 */
|
|
20
|
-
instanceInfo: APP.ProjectInstance | APP.MaterialInstance | APP.FileInstance | APP.instanceInfoType): any;
|
|
21
16
|
}
|
|
22
17
|
export declare const BasicsAuthority: BasicsAuthorityTool;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare enum HealthStatus {
|
|
2
|
+
/** 正常 */
|
|
3
|
+
Healthy = "Healthy",
|
|
4
|
+
/** 警告 */
|
|
5
|
+
Warning = "Warning",
|
|
6
|
+
/** 延期 */
|
|
7
|
+
Delay = "Delay",
|
|
8
|
+
/** 失效 */
|
|
9
|
+
Failure = "Failure"
|
|
10
|
+
}
|
|
11
|
+
interface CodeItemList<T = string> {
|
|
12
|
+
apicode: T;
|
|
13
|
+
children: CodeItemList<T>[];
|
|
14
|
+
description: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
pid: null;
|
|
19
|
+
readonly: boolean;
|
|
20
|
+
sort: number;
|
|
21
|
+
status: boolean;
|
|
22
|
+
code?: string;
|
|
23
|
+
value?: string;
|
|
24
|
+
label?: string;
|
|
25
|
+
[k: string]: any;
|
|
26
|
+
}
|
|
27
|
+
export interface HealthStatusObject extends CodeItemList {
|
|
28
|
+
apicode: HealthStatus;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
export declare enum BasicsItemCode {
|
|
2
|
+
/** 物料 */
|
|
3
|
+
material = "10001001",
|
|
4
|
+
/** 文档 */
|
|
5
|
+
document = "10001002",
|
|
6
|
+
/** 变更申请 */
|
|
7
|
+
changeRequest = "10001003",
|
|
8
|
+
/** 变更指令 */
|
|
9
|
+
changeInstruction = "10001004",
|
|
10
|
+
/** 工程变更 */
|
|
11
|
+
engineeringChange = "10001005",
|
|
12
|
+
/** 文件 */
|
|
13
|
+
file = "10001006",
|
|
14
|
+
/** 问题报告 */
|
|
15
|
+
problemReport = "10001007",
|
|
16
|
+
/** 制造商变更 */
|
|
17
|
+
manufacturerChange = "10001008",
|
|
18
|
+
/** 状态变更 */
|
|
19
|
+
statusChange = "10001009",
|
|
20
|
+
/** 申请流程 */
|
|
21
|
+
applicationProcess = "10001010",
|
|
22
|
+
/** 供应商请求 */
|
|
23
|
+
supplierRequest = "10001011",
|
|
24
|
+
/** 制造商 */
|
|
25
|
+
manufacturer = "10001012",
|
|
26
|
+
/** 制造商部件 */
|
|
27
|
+
manufacturerParts = "10001013",
|
|
28
|
+
/** 供应商 */
|
|
29
|
+
supplier = "10001014",
|
|
30
|
+
/** 项目启动变更 */
|
|
31
|
+
projectStartChange = "10001015",
|
|
32
|
+
/** 日报 */
|
|
33
|
+
dailyNewspaper = "10001019",
|
|
34
|
+
/** 项目基线变更 */
|
|
35
|
+
projectBaselineChange = "10001030",
|
|
36
|
+
/** 项目 */
|
|
37
|
+
project = "10001016",
|
|
38
|
+
/** 工作报告 */
|
|
39
|
+
workReport = "10001019",
|
|
40
|
+
/** 用户 */
|
|
41
|
+
user = "10001017",
|
|
42
|
+
/** 用户组 */
|
|
43
|
+
userGroup = "10001018",
|
|
44
|
+
/**制造商变更 */
|
|
45
|
+
manufactChange = "10001020",
|
|
46
|
+
/** 工艺 */
|
|
47
|
+
technology = "10001021",
|
|
48
|
+
/** 工厂 */
|
|
49
|
+
factory = "10001022",
|
|
50
|
+
/** 资源 */
|
|
51
|
+
resource = "10001023",
|
|
52
|
+
/** 工厂发布 */
|
|
53
|
+
factoryPublish = "10001024",
|
|
54
|
+
/**资源发布 */
|
|
55
|
+
resourcePublish = "10001025",
|
|
56
|
+
/**风险 */
|
|
57
|
+
risk = "10001028",
|
|
58
|
+
/**工艺发布 */
|
|
59
|
+
technologyPublish = "10001029",
|
|
60
|
+
/** 检查项 */
|
|
61
|
+
inspectItem = "10001031",
|
|
62
|
+
/** 选项 */
|
|
63
|
+
option = "10001032",
|
|
64
|
+
/** 客户 */
|
|
65
|
+
custom = "10001033",
|
|
66
|
+
/** 工艺特性 */
|
|
67
|
+
TechSpecial = "10001034",
|
|
68
|
+
/** 控制计划 */
|
|
69
|
+
ControlPlan = "10001035",
|
|
70
|
+
/** 工艺特性 */
|
|
71
|
+
TechSpecialPublish = "10001036",
|
|
72
|
+
/** 控制计划 */
|
|
73
|
+
ControlPlanPublish = "10001037"
|
|
74
|
+
}
|
|
75
|
+
export declare enum ArchivingStatusType {
|
|
76
|
+
BLANK = "0",
|
|
77
|
+
PENDING = "1",
|
|
78
|
+
ARCHIVED = "2"
|
|
79
|
+
}
|
|
80
|
+
export declare class TogetherItemCode {
|
|
81
|
+
static industrial(code: BasicsItemCode): boolean;
|
|
82
|
+
static isUserOrGroup(code: BasicsItemCode): boolean;
|
|
83
|
+
}
|
|
84
|
+
export declare class ItemCode {
|
|
85
|
+
/** 是否是物料 */
|
|
86
|
+
static isMaterial(code: string | number): code is BasicsItemCode.material;
|
|
87
|
+
/** 是否是文档 */
|
|
88
|
+
static isDocument(code: string | number): code is BasicsItemCode.document;
|
|
89
|
+
/** 是否是变更请求 */
|
|
90
|
+
static isChangeRequest(code: string | number): code is BasicsItemCode.changeRequest;
|
|
91
|
+
/** 是否是变更指令 */
|
|
92
|
+
static isChangeInstruction(code: string | number): code is BasicsItemCode.changeInstruction;
|
|
93
|
+
/** 是否是工程变更 */
|
|
94
|
+
static isEngineeringChange(code: string | number): code is BasicsItemCode.engineeringChange;
|
|
95
|
+
/** 是否是文件 */
|
|
96
|
+
static isFile(code: string | number): code is BasicsItemCode.file;
|
|
97
|
+
/** 是否是问题报告 */
|
|
98
|
+
static isProblemReport(code: string | number): code is BasicsItemCode.problemReport;
|
|
99
|
+
/** 是否是制造商变更 */
|
|
100
|
+
static isManufacturerChange(code: string | number): code is BasicsItemCode.manufacturerChange;
|
|
101
|
+
/** 是否是状态变更 */
|
|
102
|
+
static isStatusChange(code: string | number): code is BasicsItemCode.statusChange;
|
|
103
|
+
/** 是否是申请流程 */
|
|
104
|
+
static isApplicationProcess(code: string | number): code is BasicsItemCode.applicationProcess;
|
|
105
|
+
/** 是否是供应商请求 */
|
|
106
|
+
static isSupplierRequest(code: string | number): code is BasicsItemCode.supplierRequest;
|
|
107
|
+
/** 是否是制造商 */
|
|
108
|
+
static isManufacturer(code: string | number): code is BasicsItemCode.manufacturer;
|
|
109
|
+
/** 是否是制造商部件 */
|
|
110
|
+
static isManufacturerParts(code: string | number): code is BasicsItemCode.manufacturerParts;
|
|
111
|
+
/** 是否是制造商变更 */
|
|
112
|
+
static isManufactChange(code: string | number): code is BasicsItemCode.manufactChange;
|
|
113
|
+
/** 是否是供应商 */
|
|
114
|
+
static isSupplier(code: string | number): code is BasicsItemCode.supplier;
|
|
115
|
+
/** 是否是项目启动变更 */
|
|
116
|
+
static isProjectStartChange(code: string | number): code is BasicsItemCode.projectStartChange;
|
|
117
|
+
/** 是否是日报 */
|
|
118
|
+
static isDailyNewspaper(code: string | number): code is BasicsItemCode.dailyNewspaper;
|
|
119
|
+
/** 是否是项目基线变更 */
|
|
120
|
+
static isProjectBaselineChange(code: string | number): code is BasicsItemCode.projectBaselineChange;
|
|
121
|
+
/** 是否是项目变更 */
|
|
122
|
+
static isProjectChange(code: string | number): code is BasicsItemCode.projectStartChange | BasicsItemCode.projectBaselineChange;
|
|
123
|
+
/** 是否是项目 */
|
|
124
|
+
static isProject(code: string | number): code is BasicsItemCode.project;
|
|
125
|
+
/** 是否是工作报告 */
|
|
126
|
+
static isWorkReport(code: string | number): code is BasicsItemCode.dailyNewspaper;
|
|
127
|
+
/** 是否是用户 */
|
|
128
|
+
static isUser(code: string | number): code is BasicsItemCode.user;
|
|
129
|
+
/** 是否是用户组 */
|
|
130
|
+
static isUserGroup(code: string | number): code is BasicsItemCode.userGroup;
|
|
131
|
+
/** 是否是工艺 */
|
|
132
|
+
static isTechnology(code: string | number): code is BasicsItemCode.technology;
|
|
133
|
+
/** 是否是工厂 */
|
|
134
|
+
static isFactory(code: string | number): code is BasicsItemCode.factory;
|
|
135
|
+
/** 是否是资源 */
|
|
136
|
+
static isResource(code: string | number): code is BasicsItemCode.resource;
|
|
137
|
+
/** 是否是工艺发布 */
|
|
138
|
+
static isTechnologyPublish(code: string | number): code is BasicsItemCode.technologyPublish;
|
|
139
|
+
/** 是否是工厂发布 */
|
|
140
|
+
static isFactoryPublish(code: string | number): code is BasicsItemCode.factoryPublish;
|
|
141
|
+
/** 是否是资源发布 */
|
|
142
|
+
static isResoucePublish(code: string | number): code is BasicsItemCode.resourcePublish;
|
|
143
|
+
/** 是否是风险 */
|
|
144
|
+
static isRisk(code: string | number): code is BasicsItemCode.risk;
|
|
145
|
+
/** 是否是检查项 */
|
|
146
|
+
static isInspectItem(code: string | number): code is BasicsItemCode.inspectItem;
|
|
147
|
+
/** 是否是选项实例 */
|
|
148
|
+
static isOption(code: string | number): code is BasicsItemCode.option;
|
|
149
|
+
/** 是否是客户 */
|
|
150
|
+
static isCustom(code: string | number): code is BasicsItemCode.custom;
|
|
151
|
+
/** 是否是控制计划发布 */
|
|
152
|
+
static isControlPublish(code: string | number): code is BasicsItemCode.ControlPlanPublish;
|
|
153
|
+
/** 是否是可 */
|
|
154
|
+
static isTechSpecialPublish(code: string | number): code is BasicsItemCode.TechSpecialPublish;
|
|
155
|
+
/** 是否是控制计划 */
|
|
156
|
+
static isControlPlan(code: string | number): code is BasicsItemCode.ControlPlan;
|
|
157
|
+
/** 是否是工艺特性*/
|
|
158
|
+
static isTechSpecial(code: string | number): code is BasicsItemCode.TechSpecial;
|
|
159
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BasicsAttribute } from './attribute';
|
|
2
|
+
export declare class utility {
|
|
3
|
+
static getLabelInOptions: (params: {
|
|
4
|
+
value: string | boolean | string[];
|
|
5
|
+
options: any & {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string | boolean;
|
|
8
|
+
}[];
|
|
9
|
+
adaptor?: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
children?: string;
|
|
13
|
+
};
|
|
14
|
+
}) => any;
|
|
15
|
+
static transformArrayToMap: (list: Record<string, any>[], initKey: string | "autoGetId", initValue?: string, extra?: {
|
|
16
|
+
useAutoGetId?: boolean;
|
|
17
|
+
}) => any;
|
|
18
|
+
static autoTableHeight: (num?: number) => number;
|
|
19
|
+
static renderBomTag: (text: string) => any;
|
|
20
|
+
static tidyBomTag: (text: string, onExceedWarning?: () => void) => string;
|
|
21
|
+
static getAttrOf<T = string>(attrs: BasicsAttribute<T>[], apiCode: T): BasicsAttribute<T> | undefined;
|
|
22
|
+
static avoid0TypeConvert(value: any): any;
|
|
23
|
+
static generateUUID(): string;
|
|
24
|
+
static momentToRawData(data: any): any;
|
|
25
|
+
/** 获取 table row 某个属性的值 (可以通过`config.type`去配置获取的值是新的还是旧的) */
|
|
26
|
+
/** table row 数据是否是有被修改过 */
|
|
27
|
+
static tableRowHasChange(row: any): boolean;
|
|
28
|
+
/** table row 数据是否有newVal(被修改)*/
|
|
29
|
+
static tableRowHasNewValue(row: any): boolean;
|
|
30
|
+
/** table row 数据是否是新增数据 */
|
|
31
|
+
static isAddTableRow(row: any): boolean;
|
|
32
|
+
/** table row 数据是否是删除数据 */
|
|
33
|
+
static isDelTableRow(row: any): boolean;
|
|
34
|
+
/** 设置table row值 */
|
|
35
|
+
static setTableRowAttrValue(row: any, newVal: any): void;
|
|
36
|
+
static isMac(): boolean;
|
|
37
|
+
static makeDestructurable<T extends Record<string, unknown>, A extends readonly [any, ...any]>(obj: T, arr: A): T & A;
|
|
38
|
+
/** 数组对象扁平化 (返回的数据顺序与 antd table tree 相同,有使用的地方依赖这个顺序) */
|
|
39
|
+
static ArrayAttributeFlat<T = Record<string, any>>(params: T[], attr?: string, fn?: (item: T) => void): T[];
|
|
40
|
+
static getTreeRelationNoRecursion<T = any>({ data, lookup, childrenKey, }: {
|
|
41
|
+
data: T[];
|
|
42
|
+
lookup: (item: T, index: number) => boolean;
|
|
43
|
+
childrenKey?: string;
|
|
44
|
+
}): PlmProject.Relation<T>;
|
|
45
|
+
static judgeParentIcon(itemCode: string, icon?: string): string | undefined;
|
|
46
|
+
}
|
package/lib/typings.d.ts
CHANGED
|
@@ -1,130 +1,126 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
declare module
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare module
|
|
9
|
-
declare module
|
|
10
|
-
declare module
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
declare const
|
|
49
|
-
|
|
50
|
-
declare const
|
|
51
|
-
|
|
52
|
-
declare const
|
|
53
|
-
|
|
54
|
-
declare const
|
|
55
|
-
|
|
56
|
-
declare const
|
|
57
|
-
|
|
58
|
-
declare const
|
|
59
|
-
|
|
60
|
-
declare const
|
|
61
|
-
|
|
62
|
-
declare const
|
|
63
|
-
|
|
64
|
-
declare const
|
|
65
|
-
/**
|
|
66
|
-
declare const
|
|
67
|
-
|
|
68
|
-
declare const
|
|
69
|
-
|
|
70
|
-
declare const
|
|
71
|
-
|
|
72
|
-
declare const
|
|
73
|
-
|
|
74
|
-
declare const
|
|
75
|
-
|
|
76
|
-
declare const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
declare const
|
|
81
|
-
|
|
82
|
-
declare const
|
|
83
|
-
|
|
84
|
-
declare const
|
|
85
|
-
|
|
86
|
-
declare const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
declare const
|
|
91
|
-
|
|
92
|
-
declare const
|
|
93
|
-
|
|
94
|
-
declare const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
//
|
|
117
|
-
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
declare const DEPLOY_VERSION: string;
|
|
129
|
-
|
|
130
|
-
interface Window {}
|
|
1
|
+
declare module '*.css';
|
|
2
|
+
// declare module '*.less';
|
|
3
|
+
declare module '*.less' {
|
|
4
|
+
const classes: { [key: string]: string };
|
|
5
|
+
export default classes;
|
|
6
|
+
}
|
|
7
|
+
declare module '*.webp';
|
|
8
|
+
declare module '*.png';
|
|
9
|
+
declare module '*classnames';
|
|
10
|
+
declare module '*.svg' {
|
|
11
|
+
export function ReactComponent(props: React.SVGProps<SVGSVGElement>): React.ReactElement;
|
|
12
|
+
const url: string;
|
|
13
|
+
export default url;
|
|
14
|
+
}
|
|
15
|
+
declare module '@multiavatar/multiavatar';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 可更改所有属性
|
|
19
|
+
*/
|
|
20
|
+
declare type Writeable<T> = {
|
|
21
|
+
-readonly [P in keyof T]: T[P];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type PageRouteConfig = {
|
|
25
|
+
path: string;
|
|
26
|
+
component?: string | (() => any);
|
|
27
|
+
wrappers?: (string | (() => any))[];
|
|
28
|
+
redirect?: string;
|
|
29
|
+
exact?: boolean;
|
|
30
|
+
routes?: PageRouteConfig[];
|
|
31
|
+
[k: string]: any;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
declare interface BasicsFn<Result, Params = any> {
|
|
35
|
+
(...params: Params[]): Result;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare interface CacheFn<Result, Value = Result, Params = any> extends BasicsFn<Result, Params> {
|
|
39
|
+
(...params: Params[]): Result;
|
|
40
|
+
_value?: Value | null;
|
|
41
|
+
clearCache?: () => void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare const ICONFONT_URL: string;
|
|
45
|
+
|
|
46
|
+
declare const FULLSCREEN_PATH: string;
|
|
47
|
+
|
|
48
|
+
declare const PRODUCT_PATHNAME: string;
|
|
49
|
+
|
|
50
|
+
declare const FOLDER_PATHNAME: string;
|
|
51
|
+
|
|
52
|
+
declare const STOREHOUSE_PATHNAME: string;
|
|
53
|
+
|
|
54
|
+
declare const INSTANCE_PATHNAME: string;
|
|
55
|
+
|
|
56
|
+
declare const ES_API_PREFIX: string;
|
|
57
|
+
|
|
58
|
+
declare const TRANSMIT_API_PREFIX: string;
|
|
59
|
+
|
|
60
|
+
declare const CHAT_API_PREFIX: string;
|
|
61
|
+
/** 全部用户 */
|
|
62
|
+
declare const ALL_USER: string;
|
|
63
|
+
/** 全部产品清单 */
|
|
64
|
+
declare const ALL_PRODUCT: string;
|
|
65
|
+
/** 产品内全部用户 */
|
|
66
|
+
declare const ALL_IN_PRODUCT_USER: string;
|
|
67
|
+
|
|
68
|
+
declare const FIX_INS_TAbTABLE_COLUMNMAP: Record<string, string>;
|
|
69
|
+
|
|
70
|
+
declare const PREFERENCE: string;
|
|
71
|
+
|
|
72
|
+
declare const PREFERENCE_TAB: Record<string, string>;
|
|
73
|
+
|
|
74
|
+
// declare const FAV_LIST: Record<string, any>[];
|
|
75
|
+
|
|
76
|
+
declare const USER_PATHNAME: string;
|
|
77
|
+
|
|
78
|
+
declare const CHANGE_ITEMCODE: Number[];
|
|
79
|
+
|
|
80
|
+
declare const RECYCLE_BIN: string;
|
|
81
|
+
|
|
82
|
+
declare const WORKFLOW_ERROR_PATHNAME: string;
|
|
83
|
+
|
|
84
|
+
// declare const WORKFLOW_ACTION: Record<string, any>[];
|
|
85
|
+
|
|
86
|
+
declare const CHAT_PATHNAME: string;
|
|
87
|
+
|
|
88
|
+
declare const ALL_USERGROUP: string;
|
|
89
|
+
|
|
90
|
+
declare const ROUTES: Record<string, any>[];
|
|
91
|
+
|
|
92
|
+
declare const WORKFLOW_API_PREFIX: string;
|
|
93
|
+
|
|
94
|
+
declare const EXT_PATHNAME: string;
|
|
95
|
+
declare const isDevelopment: boolean;
|
|
96
|
+
|
|
97
|
+
interface Window {
|
|
98
|
+
moudleQiankunAppLifeCycles: any;
|
|
99
|
+
proxy: any;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface ImportMetaEnv {
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
BASE_URL: string;
|
|
105
|
+
MODE: string;
|
|
106
|
+
DEV: boolean;
|
|
107
|
+
PROD: boolean;
|
|
108
|
+
SSR: boolean;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// interface ImportMeta {
|
|
112
|
+
// url: string;
|
|
113
|
+
|
|
114
|
+
// readonly hot?: import('vite/types/hot').ViteHotContext;
|
|
115
|
+
|
|
116
|
+
// readonly env: ImportMetaEnv;
|
|
117
|
+
|
|
118
|
+
// glob: import('vite/types/importGlob').ImportGlobFunction;
|
|
119
|
+
// }
|
|
120
|
+
|
|
121
|
+
declare const GLOBAL_TABLE_TOP_CLASS: string;
|
|
122
|
+
declare const GLOBAL_ATTR_TITLE: string;
|
|
123
|
+
|
|
124
|
+
declare const DEPLOY_VERSION: string;
|
|
125
|
+
|
|
126
|
+
interface Window {}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onchain-uikit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.9.4-alpha2",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
7
7
|
"build": "vite build",
|
|
@@ -20,22 +20,46 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
|
-
"lib"
|
|
23
|
+
"lib",
|
|
24
|
+
"dist"
|
|
24
25
|
],
|
|
25
|
-
"main": "
|
|
26
|
+
"main": "dist/index.es.js",
|
|
26
27
|
"types": "lib/src/index.d.ts",
|
|
27
28
|
"publishConfig": {
|
|
28
29
|
"access": "public"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
|
-
"antd": "5.1
|
|
32
|
+
"antd": "5.24.1"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
35
|
+
"@ahooksjs/use-request": "^2.8.15",
|
|
36
|
+
"@ant-design/icons": "^4.7.0",
|
|
37
|
+
"@ant-design/x": "^1.0.5",
|
|
38
|
+
"@storybook/theming": "^8.5.8",
|
|
39
|
+
"@uppy/core": "^3.5.1",
|
|
40
|
+
"@uppy/react": "^3.1.0",
|
|
41
|
+
"@uppy/tus": "^3.0.5",
|
|
42
|
+
"ahooks": "^3.1.9",
|
|
43
|
+
"antd": "5.24.1",
|
|
44
|
+
"lodash": "^4.17.21",
|
|
45
|
+
"markdown-it": "^14.1.0",
|
|
46
|
+
"moment": "^2.29.4",
|
|
47
|
+
"openai": "^4.85.3",
|
|
48
|
+
"path-to-regexp": "^8.2.0",
|
|
49
|
+
"qier-progress": "^1.0.4",
|
|
50
|
+
"react": "18.x",
|
|
51
|
+
"react-contexify": "5.0.0",
|
|
52
|
+
"react-custom-scrollbars": "^4.2.1",
|
|
53
|
+
"react-dnd": "^16.0.1",
|
|
36
54
|
"react-dom": "^18.3.1",
|
|
55
|
+
"react-draggable": "^4.4.5",
|
|
37
56
|
"react-highlight-words": "^0.21.0",
|
|
38
|
-
"
|
|
57
|
+
"react-mde": "^11.5.0",
|
|
58
|
+
"react-resizable": "^3.0.5",
|
|
59
|
+
"showdown": "^2.1.0",
|
|
60
|
+
"video-react": "^0.16.0",
|
|
61
|
+
"vite-plugin-dts": "^4.5.0",
|
|
62
|
+
"xlsx": "^0.18.5"
|
|
39
63
|
},
|
|
40
64
|
"devDependencies": {
|
|
41
65
|
"@chromatic-com/storybook": "^3.2.3",
|