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.
Files changed (146) hide show
  1. package/dist/filePreview/fontawesome-webfont.woff2 +0 -0
  2. package/dist/filePreview/iconfont.css +457 -0
  3. package/dist/filePreview/loading.gif +0 -0
  4. package/dist/filePreview/logo.svg +1 -0
  5. package/dist/filePreview/luckyexcel.umd.js +26153 -0
  6. package/dist/filePreview/luckysheet.css +7145 -0
  7. package/dist/filePreview/luckysheet.umd.js +137608 -0
  8. package/dist/filePreview/plugin.js +29474 -0
  9. package/dist/filePreview/plugins.css +10 -0
  10. package/dist/filePreview/pluginsCss.css +1 -0
  11. package/dist/filePreview/waffle_sprite.png +0 -0
  12. package/dist/font/demo.css +539 -0
  13. package/dist/font/demo_index.html +20820 -0
  14. package/dist/font/iconfont.css +3604 -0
  15. package/dist/font/iconfont.js +70 -0
  16. package/dist/font/iconfont.json +6288 -0
  17. package/dist/font/iconfont.svg +1813 -0
  18. package/dist/font/iconfont.ttf +0 -0
  19. package/dist/font/iconfont.woff +0 -0
  20. package/dist/font/iconfont.woff2 +0 -0
  21. package/dist/index.cjs.js +529 -0
  22. package/dist/index.es.js +44594 -0
  23. package/dist/index.umd.js +633 -0
  24. package/dist/logo.svg +1 -0
  25. package/dist/onchain-uikit.css +10 -0
  26. package/dist/xlsx-C9icP-aY.mjs +24775 -0
  27. package/dist/xlsx-qn1xoUuv.js +105 -0
  28. package/lib/src/App.d.ts +1 -1
  29. package/lib/src/app/main/model/context.d.ts +30 -0
  30. package/lib/src/components/OnChainAI/index.d.ts +3 -0
  31. package/lib/src/{stories/Page.stories.d.ts → components/OnChainAI/index.stories.d.ts} +4 -2
  32. package/lib/src/components/OnChainAI/welcome.d.ts +6 -0
  33. package/lib/src/components/OnChainAdvancedSearch/index.d.ts +8 -0
  34. package/lib/src/{stories/XsButton.stories.d.ts → components/OnChainAdvancedSearch/index.stories.d.ts} +1 -1
  35. package/lib/src/components/OnChainBadge/index.d.ts +52 -0
  36. package/lib/src/{stories/PlmMosaic.stories.d.ts → components/OnChainBadge/index.stories.d.ts} +2 -2
  37. package/lib/src/components/OnChainCompositeForm/index.d.ts +26 -0
  38. package/lib/src/components/OnChainCompositeForm/index.stories.d.ts +14 -0
  39. package/lib/src/components/OnChainDropMenu/index.d.ts +21 -0
  40. package/lib/src/components/OnChainDropMenu/index.stories.d.ts +14 -0
  41. package/lib/src/components/OnChainExcelViewer/index.d.ts +8 -0
  42. package/lib/src/components/OnChainExcelViewer/index.stories.d.ts +14 -0
  43. package/lib/src/components/OnChainForm/index.d.ts +14 -0
  44. package/lib/src/components/OnChainForm/index.stories.d.ts +14 -0
  45. package/lib/src/components/OnChainFormItem/index.d.ts +175 -0
  46. package/lib/src/components/OnChainFormItem/index.stories.d.ts +19 -0
  47. package/lib/src/components/OnChainFormItem/title/index.d.ts +2 -0
  48. package/lib/src/components/OnChainGenAntImage/index.d.ts +5 -0
  49. package/lib/src/components/OnChainGenAntImage/index.stories.d.ts +14 -0
  50. package/lib/src/components/OnChainGlobalLoading/index.d.ts +9 -0
  51. package/lib/src/components/OnChainGlobalLoading/index.stories.d.ts +14 -0
  52. package/lib/src/components/OnChainHighLightWords/index.d.ts +9 -0
  53. package/lib/src/components/OnChainHighLightWords/index.stories.d.ts +14 -0
  54. package/lib/src/components/OnChainIcon/index.d.ts +31 -0
  55. package/lib/src/components/OnChainIcon/index.stories.d.ts +15 -0
  56. package/lib/src/components/OnChainImage/index.d.ts +9 -0
  57. package/lib/src/components/OnChainImage/index.stories.d.ts +18 -0
  58. package/lib/src/components/OnChainInput/index.d.ts +13 -0
  59. package/lib/src/components/OnChainInput/index.stories.d.ts +14 -0
  60. package/lib/src/components/OnChainLinkInstance/index.d.ts +1 -0
  61. package/lib/src/components/OnChainLoading/index.d.ts +10 -0
  62. package/lib/src/components/OnChainLoading/index.stories.d.ts +14 -0
  63. package/lib/src/components/OnChainLoadingSkCube/index.d.ts +6 -0
  64. package/lib/src/components/OnChainLoadingSkCube/index.stories.d.ts +14 -0
  65. package/lib/src/components/OnChainMarkdown/index.d.ts +16 -0
  66. package/lib/src/components/OnChainMarkdown/index.stories.d.ts +14 -0
  67. package/lib/src/components/OnChainModal/index.d.ts +22 -0
  68. package/lib/src/components/OnChainModal/index.stories.d.ts +14 -0
  69. package/lib/src/components/OnChainMosaic/index.d.ts +7 -0
  70. package/lib/src/components/OnChainMosaic/index.stories.d.ts +14 -0
  71. package/lib/src/components/OnChainPopoverTransfer/index.d.ts +49 -0
  72. package/lib/src/components/OnChainPopoverTransfer/select/index.d.ts +18 -0
  73. package/lib/src/components/OnChainPopupSelect/index.d.ts +32 -0
  74. package/lib/src/components/OnChainPopupSelect/index.stories.d.ts +14 -0
  75. package/lib/src/components/OnChainProgress/index.d.ts +7 -0
  76. package/lib/src/components/OnChainProgress/index.stories.d.ts +16 -0
  77. package/lib/src/components/OnChainProvider/index.d.ts +18 -0
  78. package/lib/src/components/OnChainProvider/index.stories.d.ts +14 -0
  79. package/lib/src/components/OnChainPublicTree/index.d.ts +20 -0
  80. package/lib/src/components/OnChainPublicTree/index.stories.d.ts +14 -0
  81. package/lib/src/components/OnChainQueryBuilder/AbcSelectTransfer/index.d.ts +15 -0
  82. package/lib/src/components/OnChainQueryBuilder/index.d.ts +31 -0
  83. package/lib/src/components/OnChainResourceTree/index.d.ts +26 -0
  84. package/lib/src/components/OnChainResourceTree/index.stories.d.ts +14 -0
  85. package/lib/src/components/OnChainScrollBar/index.d.ts +7 -0
  86. package/lib/src/components/OnChainScrollBar/index.stories.d.ts +14 -0
  87. package/lib/src/components/OnChainScrollBarAssembly/index.d.ts +11 -0
  88. package/lib/src/components/OnChainScrollBarAssembly/index.stories.d.ts +14 -0
  89. package/lib/src/components/OnChainSelect/index.d.ts +14 -0
  90. package/lib/src/{stories/PlmSelect/PlmSelect.stories.d.ts → components/OnChainSelect/index.stories.d.ts} +8 -3
  91. package/lib/src/components/OnChainSelectPopupForm/index.d.ts +45 -0
  92. package/lib/src/components/OnChainSelectPopupForm/select/index.d.ts +20 -0
  93. package/lib/src/components/OnChainTable/ContextMenu.d.ts +8 -0
  94. package/lib/src/components/OnChainTable/EditableCell.d.ts +39 -0
  95. package/lib/src/components/OnChainTable/EditableRow.d.ts +6 -0
  96. package/lib/src/components/OnChainTable/OnChainTableFormItem/index.d.ts +14 -0
  97. package/lib/src/components/OnChainTable/ResizableTitle.d.ts +2 -0
  98. package/lib/src/components/OnChainTable/TableFooter.d.ts +13 -0
  99. package/lib/src/components/OnChainTable/TableUtils.d.ts +78 -0
  100. package/lib/src/components/OnChainTable/const.d.ts +2 -0
  101. package/lib/src/components/OnChainTable/index.d.ts +101 -0
  102. package/lib/src/components/OnChainTable/index.stories.d.ts +28 -0
  103. package/lib/src/components/OnChainTable/type.d.ts +10 -0
  104. package/lib/src/components/OnChainTable/useClipboard.d.ts +67 -0
  105. package/lib/src/components/OnChainTable/useColumn.d.ts +5 -0
  106. package/lib/src/components/OnChainTable/useCopy.d.ts +5 -0
  107. package/lib/src/components/OnChainTable/useDynamicHeight.d.ts +13 -0
  108. package/lib/src/components/OnChainTable/useFiltered.d.ts +23 -0
  109. package/lib/src/components/OnChainTable/usePaste.d.ts +5 -0
  110. package/lib/src/components/OnChainTable/useVirtualScroll.d.ts +3 -0
  111. package/lib/src/components/OnChainTable/virtualScroll.d.ts +91 -0
  112. package/lib/src/components/OnChainTableSelection/index.d.ts +40 -0
  113. package/lib/src/components/OnChainTableSelection/index.stories.d.ts +14 -0
  114. package/lib/src/components/OnChainTabs/index.d.ts +20 -0
  115. package/lib/src/components/OnChainTabs/index.stories.d.ts +14 -0
  116. package/lib/src/components/OnChainViewerError/index.d.ts +6 -0
  117. package/lib/src/components/OnChainViewerError/index.stories.d.ts +14 -0
  118. package/lib/src/components/OnChainformUploader/index.d.ts +1 -0
  119. package/lib/src/components/PlmSearchSelect/index.d.ts +18 -0
  120. package/lib/src/hooks/useShortcutKey/index.d.ts +5 -0
  121. package/lib/src/hooks/useStore/index.d.ts +14 -0
  122. package/lib/src/index.d.ts +32 -4
  123. package/lib/src/language/index.d.ts +23 -0
  124. package/lib/src/language/translate.d.ts +5 -0
  125. package/lib/src/types/gantt.d.ts +269 -0
  126. package/lib/src/typings.d.ts +610 -612
  127. package/lib/src/utils/attribute.d.ts +70 -0
  128. package/lib/src/utils/authority/basicsAuthority.d.ts +0 -5
  129. package/lib/src/utils/authority/const.d.ts +30 -0
  130. package/lib/src/utils/itemCode.d.ts +159 -0
  131. package/lib/src/utils/utility.d.ts +46 -0
  132. package/lib/typings.d.ts +126 -130
  133. package/package.json +31 -7
  134. package/lib/instance.cjs.mjs +0 -366
  135. package/lib/instance.es.mjs +0 -29301
  136. package/lib/instance.umd.mjs +0 -366
  137. package/lib/src/components/PlmMosaic/index.d.ts +0 -5
  138. package/lib/src/stories/Button.d.ts +0 -14
  139. package/lib/src/stories/Button.stories.d.ts +0 -23
  140. package/lib/src/stories/Header.d.ts +0 -11
  141. package/lib/src/stories/Header.stories.d.ts +0 -18
  142. package/lib/src/stories/OnChainProvider.d.ts +0 -12
  143. package/lib/src/stories/Page.d.ts +0 -2
  144. package/lib/src/stories/PlmSelect/index.d.ts +0 -20
  145. package/lib/src/stories/XsButton.d.ts +0 -22
  146. /package/{lib → dist}/vite.svg +0 -0
@@ -0,0 +1,5 @@
1
+ declare const useShortcutKey: (major: "alt" | "ctrl" | "meta" | "shift", { shortcuts, namespace, }: {
2
+ shortcuts: [string[], (e: KeyboardEvent) => void][];
3
+ namespace?: string;
4
+ }) => void;
5
+ export default useShortcutKey;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @description 多状态管理
3
+ * @date 2023-04-18 10:37:49
4
+ * @export
5
+ * @template T
6
+ * @param {T} initStore 接收一个对象
7
+ */
8
+ declare function useStore<T>(initStore: T | (() => T)): {
9
+ store: T;
10
+ setStore: (params: Partial<T> | ((store: T) => T | void)) => void;
11
+ resetStore: () => void;
12
+ latestStore: import('react').MutableRefObject<T>;
13
+ } & [T, (params: Partial<T> | ((store: T) => T | void)) => void, () => void, import('react').MutableRefObject<T>];
14
+ export default useStore;
@@ -1,4 +1,32 @@
1
- import { default as OnChainProvider } from './stories/OnChainProvider';
2
- import { default as XsButton } from './stories/XsButton';
3
- import { default as PlmSelect } from './stories/PlmSelect';
4
- export { OnChainProvider, XsButton, PlmSelect };
1
+ import { default as OnChainProvider } from './components/OnChainProvider';
2
+ import { default as OnChainSelect } from './components/OnChainSelect';
3
+ import { default as OnChainIcon } from './components/OnChainIcon';
4
+ import { default as OnChainBadge } from './components/OnChainBadge';
5
+ import { default as OnChainHighLightWords } from './components/OnChainHighLightWords';
6
+ import { default as OnChainInput } from './components/OnChainInput';
7
+ import { default as OnChainLoading } from './components/OnChainLoading';
8
+ import { default as OnChainLoadingSkCube } from './components/OnChainLoadingSkCube';
9
+ import { default as OnChainGlobalLoading } from './components/OnChainGlobalLoading';
10
+ import { default as OnChainMarkdown } from './components/OnChainMarkdown';
11
+ import { default as OnChainModal } from './components/OnChainModal';
12
+ import { default as OnChainMosaic } from './components/OnChainMosaic';
13
+ import { default as OnChainScrollBar } from './components/OnChainScrollBar';
14
+ import { default as OnChainViewerError } from './components/OnChainViewerError';
15
+ import { default as OnChainDropMenu } from './components/OnChainDropMenu';
16
+ import { default as OnChainCompositeForm } from './components/OnChainCompositeForm';
17
+ import { default as OnChainExcelViewer } from './components/OnChainExcelViewer';
18
+ import { default as OnChainForm } from './components/OnChainForm';
19
+ import { default as OnChainFormItem } from './components/OnChainFormItem';
20
+ import { default as OnChainGenAntImage } from './components/OnChainGenAntImage';
21
+ import { default as OnChainImage } from './components/OnChainImage';
22
+ import { default as OnChainTableSelection } from './components/OnChainTableSelection';
23
+ import { default as OnChainResourceTree } from './components/OnChainResourceTree';
24
+ import { default as OnChainAdvancedSearch } from './components/OnChainAdvancedSearch';
25
+ import { default as OnChainPopupSelect } from './components/OnChainPopupSelect';
26
+ import { default as OnChainQueryBuilder } from './components/OnChainQueryBuilder';
27
+ import { default as OnChainScrollBarAssembly } from './components/OnChainScrollBarAssembly';
28
+ import { default as OnChainSelectPopupForm } from './components/OnChainSelectPopupForm';
29
+ import { default as OnChainPublicTree } from './components/OnChainPublicTree';
30
+ import { default as OnChainTable } from './components/OnChainTable';
31
+ import { default as OnChainAI } from './components/OnChainAI';
32
+ export { OnChainAI, OnChainTable, OnChainProvider, OnChainSelect, OnChainIcon, OnChainBadge, OnChainHighLightWords, OnChainInput, OnChainLoading, OnChainLoadingSkCube, OnChainGlobalLoading, OnChainMarkdown, OnChainModal, OnChainMosaic, OnChainScrollBar, OnChainViewerError, OnChainDropMenu, OnChainCompositeForm, OnChainExcelViewer, OnChainForm, OnChainFormItem, OnChainGenAntImage, OnChainImage, OnChainTableSelection, OnChainResourceTree, OnChainAdvancedSearch, OnChainPopupSelect, OnChainQueryBuilder, OnChainScrollBarAssembly, OnChainSelectPopupForm, OnChainPublicTree };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 用于国际化的文本格式化处理
3
+ * t('{name}hello{age}', {name: '张三', age: '18'})
4
+ * @param strTemp '{name}hello{age}'
5
+ * @param obj {name: '张三', age: '18'}
6
+ * @returns 张三hello18
7
+ */
8
+ export declare function t(strTemp: string, obj?: Record<string, any>): string;
9
+ /**
10
+ * 国际化-根据pathCode从用户的languageMap查询对应文本
11
+ * @param languageMap 用户语言清单,后台返回的优先级为:扩展列>用户默认语种>系统默认语种
12
+ * @param pathCode 语言文本的路径code,全局唯一,英文句号'.'分隔层级
13
+ * @param placeholder 占位符
14
+ * @returns 最终显示文本.最低冗余placeholder,否则为undefined
15
+ */
16
+ export declare const getI18nText: (languageMap?: Record<string, string | undefined>, pathCode?: string, placeholder?: string) => string | undefined;
17
+ export interface I18nTemplateFn {
18
+ (key: string, extra?: {
19
+ variate?: object;
20
+ placeholder?: string;
21
+ }, languageMap?: Record<string, string | undefined>): string;
22
+ }
23
+ export declare const templateFn: I18nTemplateFn;
@@ -0,0 +1,5 @@
1
+ import { ContextData } from '../app/main/model/context';
2
+ export declare const template: (pathCode: string, extra?: {
3
+ variate?: object;
4
+ placeholder?: string;
5
+ }, contextData?: ContextData) => string;
@@ -0,0 +1,269 @@
1
+ type CompoundDate = Date | string;
2
+ declare module PlmProject {
3
+ export interface Task<T = CompoundDate> extends Object {
4
+ /** 任务id */
5
+ id: string;
6
+ /** 任务名称 */
7
+ text?: string;
8
+ /** 任务类型 */
9
+ type: 'project' | 'task' | 'milestone' | 'placeholder' | 'phase' | 'iteration' | 'gate';
10
+ /** 父任务id */
11
+ parent?: string;
12
+ /** 任务开始时间 */
13
+ start_date: T;
14
+ /** 任务结束时间 */
15
+ end_date: T;
16
+ /** 任务持续时间 */
17
+ duration: number;
18
+ /** 任务进度 0 - 1 */
19
+ progress?: number;
20
+ /** 指向后置任务的 link id */
21
+ $source: (number | string)[];
22
+ /** 指向前置任务的 link id */
23
+ $target: (number | string)[];
24
+ /** 行高 */
25
+ row_height?: number;
26
+ /** 任务是否只读 */
27
+ readonly?: boolean;
28
+ /** 隐藏计划 */
29
+ hide_bar?: boolean;
30
+ /** 取消计划 */
31
+ unscheduled?: boolean;
32
+ /** 定义甘特图是否应执行任务的自动调度 */
33
+ auto_scheduling?: boolean;
34
+ /** 约束的日期 */
35
+ constraint_date?: T;
36
+ /**
37
+ * 约束的类型
38
+ * ```json
39
+ * {
40
+ * "asap": "越早越好",
41
+ * "alap": "越晚越好",
42
+ * "snet": "不早于以下时间(constraint_date)开始",
43
+ * "snlt": "不迟于以下时间(constraint_date)开始",
44
+ * "fnet": "不早于以下时间(constraint_date)完成",
45
+ * "fnlt": "不迟于以下时间(constraint_date)完成",
46
+ * "mso": "必须开始于",
47
+ * "mfo": "必须完成于",
48
+ * }
49
+ * ```
50
+ */
51
+ constraint_type: 'asap' | 'alap' | 'snet' | 'snlt' | 'fnet' | 'fnlt' | 'mso' | 'mfo';
52
+ }
53
+ export interface DataSourceItem<Attr = Record<string, any>> {
54
+ children?: DataSourceItem<Attr>[];
55
+ attributes: Attr;
56
+ /** pid */
57
+ pid: string;
58
+ /** 自身的id */
59
+ insId: string;
60
+ /** 编号 */
61
+ number: string;
62
+ /** 项目实例类型名称 */
63
+ objectName: string;
64
+ /** 项目实例类型 id */
65
+ objectId: string;
66
+ /** 项目实例类型 ApiCode */
67
+ objectApicode: string;
68
+ /** 层级号 */
69
+ levelNo: string;
70
+ /** 项目id */
71
+ productId: string;
72
+ /** 项目名称 */
73
+ productName: string;
74
+ /** 前置任务 */
75
+ preTask: (string | number)[];
76
+ /** 后置任务 */
77
+ postTask: (string | number)[];
78
+ /** 目标交付数量 */
79
+ targetDeliveryCount: string;
80
+ /** 是否有子任务 */
81
+ insBom: boolean;
82
+ /** 行id */
83
+ rowId: string;
84
+ /** @deprecated 是否在变更流程中 */
85
+ affectedInPCO: boolean;
86
+ /** 实例在哪些流程中 (PSCO: 状态变更 | PCO: 基线变更) */
87
+ affectedIn: 'PCO' | 'PSCO' | '';
88
+ /** 项目经理id */
89
+ projectManager: string;
90
+ /** 最新版本 */
91
+ insVersion: string;
92
+ /** 最新版次 */
93
+ insVersionOrder: string;
94
+ /** 更新权限 */
95
+ updateAttributes: {
96
+ [key: string]: any;
97
+ };
98
+ [k: string]: any;
99
+ }
100
+
101
+ /**
102
+ * @description table row 任务数据
103
+ * @date 2023-02-13 18:48:03
104
+ * @export
105
+ * @interface NoLimitTask
106
+ * @extends {Task<T>}
107
+ * @extends {DataSourceItem<A>}
108
+ * @template T 时间格式
109
+ * @template S 项目类型格式
110
+ * @template F row禁止时间格式
111
+ * @template A row属性格式
112
+ */
113
+ export interface NoLimitTask<T = CompoundDate, S = string, F = Record<string, any>, A = Record<string, any>> extends Task<T>, DataSourceItem<A> {
114
+ /** 服务端源数据 */
115
+ sourceData?: NoLimitTask<T, S, F, A>;
116
+ /** 项目类型 */
117
+ basicsType: S;
118
+ /** 层级数据 */
119
+ hierarchy?: string;
120
+ children?: NoLimitTask<T, S, F, A>[];
121
+ /** 前端自定义 序号 */
122
+ serialNumber?: number;
123
+ /** 有来解决 onAfterTaskDrag 无法知道 是否真正跟新了数据 */
124
+ original?: NoLimitTask<T, S, F, A>;
125
+ /** 禁止时间 */
126
+ forbiddenTime: {
127
+ [k: string]: F | F[];
128
+ };
129
+ /** 前端数据临时 */
130
+ dataType?: 'add' | 'del' | 'update';
131
+ /** 只有 update 会有 newVal */
132
+ newVal?: Record<string, any>;
133
+ /** 服务端的红线 */
134
+ optType: 'add' | 'del' | 'update' | 'replace';
135
+ /** 只有项目变更时才有 */
136
+ inProcess?: Record<string, any>;
137
+ /** optType 为 del 时才会有这个属性,表示服务给的原始insId */
138
+ primitiveInsId?: string;
139
+ /** 原始的 insBom 属性 */
140
+ primitiveInsBom?: boolean;
141
+ /** 是否是关键路径 */
142
+ critical?: boolean;
143
+ /** 和前置任务的最小间隔 */
144
+ interval?: number;
145
+ [k: string]: any;
146
+ }
147
+
148
+ export interface Link {
149
+ /** 路线id */
150
+ id: string | number;
151
+ /** 源节点id */
152
+ source: string;
153
+ /** 目标节点id */
154
+ target: string;
155
+ /** 箭头类型 0: end -> start | 1:start -> start | 2: end -> end | 3: start -> end */
156
+ type: '0' | '1' | '2' | '3';
157
+ /** 当前添加前后置任务的任务id */
158
+ addId?: string;
159
+ /** 是否是关键路径 */
160
+ critical?: boolean;
161
+ }
162
+
163
+ export interface SerializeData {
164
+ data: Task[];
165
+ links: Link[];
166
+ }
167
+
168
+ export interface Relation<T = NoLimitTask> {
169
+ /** 父节点 */
170
+ parent?: T;
171
+ /** 自身 */
172
+ self?: T;
173
+ /** 前面的兄弟节点 */
174
+ beforeSibling: T[];
175
+ /** 后面的兄弟节点 */
176
+ afterSibling: T[];
177
+ /** 所处当前层级的索引 */
178
+ index?: number;
179
+ /** 全部祖先节点集合 */
180
+ stack: T[];
181
+ }
182
+
183
+ export type UpdateType = 'resize' | 'move' | 'progress';
184
+
185
+ export type ServerDateType = 'Schedule' | 'Estimate' | 'Actual';
186
+ export type ServerCostType = 'Budget';
187
+ export type ServerProgressType = 'Schedule' | 'Current';
188
+
189
+ /** 项目的个性化配置 */
190
+ export interface Personality {
191
+ /** 预算费用配置方式 */
192
+ projectBudget: string;
193
+ /** 1: 允许 | 2:警告 | 3:禁止 */
194
+ checkInFileNameToForceSameName: string;
195
+ /** 实际费用编辑规则 */
196
+ projectActualCostControlRule?: string;
197
+ [k: string]: any;
198
+ }
199
+
200
+ /** 项目子集的 类型对象 */
201
+ export interface ObjectItem<T = string> {
202
+ apicode: T;
203
+ label: string;
204
+ value: string;
205
+ [k: string]: any;
206
+ }
207
+
208
+ export interface ExtraServerCalendar {
209
+ id: string;
210
+ /** 日历id */
211
+ calendarId: string;
212
+ /** 名称 */
213
+ name: string;
214
+ /** 例外日期 */
215
+ specialDay: string;
216
+ /** 0: 例外工作日 | 1: 例外休息日 */
217
+ type: '0' | '1';
218
+ /** 0: 永不 | 1: 按年 | 2: 按月 */
219
+ repeatType: '0' | '1' | '2';
220
+ /** 工作时间段 */
221
+ workTime: string;
222
+ [k: string]: any;
223
+ }
224
+ export interface Calendar {
225
+ createBy?: string;
226
+ createTime: string;
227
+ description?: string;
228
+ id: string;
229
+ isDefault?: boolean;
230
+ name: string;
231
+ readonly: string;
232
+ status: boolean;
233
+ updateBy?: string;
234
+ updateTime: string;
235
+ versionOrder: number;
236
+ workDay: string;
237
+ workHours: string;
238
+ workTime: string;
239
+ }
240
+
241
+ export interface GanttCalendarInstance<M> {
242
+ id: string;
243
+ calculateDuration: (config: { start_date: Date; end_date: Date }) => number;
244
+ calculateEndDate: (config: { start_date: Date; duration: number }) => Date;
245
+ setWorkTime: (config: { date: Date }) => void;
246
+ unsetWorkTime: (config: { date: Date }) => void;
247
+ isWorkTime: (params: { date: Date }) => boolean;
248
+ /** 自定义方法非gantt原有 */
249
+ toggleWorkTime: (params: { date: string | M | Date | number; isWork: boolean }) => void;
250
+ format: {
251
+ startFormat?: string;
252
+ endFormat?: string;
253
+ };
254
+ [key: string]: any;
255
+ }
256
+
257
+ export interface UpdateTableGanttDataParams {
258
+ /** 刷新数据 (重新渲染 table和 gantt) */
259
+ isHardRefresh?: boolean;
260
+ /** 数据 (不传会使用当前table数据进行渲染) */
261
+ data?: any[];
262
+ /** 是否重新初始化页面编辑栈 (默认是`true`, 必须`isHardRefresh`为`true`,`data`有值的情况下才会重新初始化) */
263
+ isInitChangeStack?: boolean;
264
+ /** 是否是重服务的新请求的数据 (新数数据因为数据结构可能发生变化,需要重新初始化位置) */
265
+ isNewServerData?: boolean;
266
+ /** 是否计算关键路径 */
267
+ isCalculateCriticalPath?: boolean;
268
+ }
269
+ }