@unizhen/ui 0.1.119 → 0.1.120

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.
@@ -0,0 +1,252 @@
1
+ declare const defaultForm: ({
2
+ input: string;
3
+ width: number;
4
+ label: string;
5
+ key: string;
6
+ source: string;
7
+ sourceFn: string;
8
+ params: {
9
+ placeholder: string;
10
+ clearable: boolean;
11
+ type: string;
12
+ immediately?: undefined;
13
+ options?: undefined;
14
+ showButton?: undefined;
15
+ };
16
+ form: {
17
+ span: number;
18
+ show: boolean;
19
+ disabled: boolean;
20
+ readonly: boolean;
21
+ updateValue: string;
22
+ display: string;
23
+ readonlyFn: string;
24
+ disabledFn: string;
25
+ createButton: boolean;
26
+ showDays: boolean;
27
+ backfill: boolean;
28
+ rule: {
29
+ required: boolean;
30
+ type: string;
31
+ message: string;
32
+ trigger: string;
33
+ validator: string;
34
+ };
35
+ create: {
36
+ show: boolean;
37
+ disabled: boolean;
38
+ readonly: boolean;
39
+ };
40
+ edit: {
41
+ show: boolean;
42
+ disabled: boolean;
43
+ readonly: boolean;
44
+ };
45
+ expand: {
46
+ show: boolean;
47
+ disabled: boolean;
48
+ readonly: boolean;
49
+ };
50
+ };
51
+ } | {
52
+ input: string;
53
+ label: string;
54
+ width: number;
55
+ key: string;
56
+ source: string;
57
+ sourceFn: string;
58
+ params: {
59
+ immediately: boolean;
60
+ placeholder: string;
61
+ clearable: boolean;
62
+ options: never[];
63
+ type?: undefined;
64
+ showButton?: undefined;
65
+ };
66
+ form: {
67
+ span: number;
68
+ show: boolean;
69
+ disabled: boolean;
70
+ readonly: boolean;
71
+ updateValue: string;
72
+ display: string;
73
+ readonlyFn: string;
74
+ disabledFn: string;
75
+ createButton: boolean;
76
+ showDays: boolean;
77
+ backfill: boolean;
78
+ rule: {
79
+ required: boolean;
80
+ type: string;
81
+ message: string;
82
+ trigger: string;
83
+ validator: string;
84
+ };
85
+ create: {
86
+ show: boolean;
87
+ disabled: boolean;
88
+ readonly: boolean;
89
+ };
90
+ edit: {
91
+ show: boolean;
92
+ disabled: boolean;
93
+ readonly: boolean;
94
+ };
95
+ expand: {
96
+ show: boolean;
97
+ disabled: boolean;
98
+ readonly: boolean;
99
+ };
100
+ };
101
+ } | {
102
+ input: string;
103
+ label: string;
104
+ key: string;
105
+ source: string;
106
+ sourceFn: string;
107
+ params: {
108
+ immediately: boolean;
109
+ placeholder: string;
110
+ clearable: boolean;
111
+ options: never[];
112
+ type?: undefined;
113
+ showButton?: undefined;
114
+ };
115
+ form: {
116
+ span: number;
117
+ show: boolean;
118
+ disabled: boolean;
119
+ readonly: boolean;
120
+ updateValue: string;
121
+ display: string;
122
+ readonlyFn: string;
123
+ disabledFn: string;
124
+ createButton: boolean;
125
+ showDays: boolean;
126
+ backfill: boolean;
127
+ rule: {
128
+ required: boolean;
129
+ type: string;
130
+ message: string;
131
+ trigger: string;
132
+ validator: string;
133
+ };
134
+ create: {
135
+ show: boolean;
136
+ disabled: boolean;
137
+ readonly: boolean;
138
+ };
139
+ edit: {
140
+ show: boolean;
141
+ disabled: boolean;
142
+ readonly: boolean;
143
+ };
144
+ expand: {
145
+ show: boolean;
146
+ disabled: boolean;
147
+ readonly: boolean;
148
+ };
149
+ };
150
+ width?: undefined;
151
+ } | {
152
+ input: string;
153
+ label: string;
154
+ key: string;
155
+ source: string;
156
+ sourceFn: string;
157
+ params: {
158
+ placeholder: string;
159
+ clearable: boolean;
160
+ showButton: boolean;
161
+ type?: undefined;
162
+ immediately?: undefined;
163
+ options?: undefined;
164
+ };
165
+ form: {
166
+ span: number;
167
+ show: boolean;
168
+ disabled: boolean;
169
+ readonly: boolean;
170
+ updateValue: string;
171
+ display: string;
172
+ readonlyFn: string;
173
+ disabledFn: string;
174
+ createButton: boolean;
175
+ showDays: boolean;
176
+ backfill: boolean;
177
+ rule: {
178
+ required: boolean;
179
+ type: string;
180
+ message: string;
181
+ trigger: string;
182
+ validator: string;
183
+ };
184
+ create: {
185
+ show: boolean;
186
+ disabled: boolean;
187
+ readonly: boolean;
188
+ };
189
+ edit: {
190
+ show: boolean;
191
+ disabled: boolean;
192
+ readonly: boolean;
193
+ };
194
+ expand: {
195
+ show: boolean;
196
+ disabled: boolean;
197
+ readonly: boolean;
198
+ };
199
+ };
200
+ width?: undefined;
201
+ } | {
202
+ input: string;
203
+ label: string;
204
+ key: string;
205
+ source: string;
206
+ sourceFn: string;
207
+ params: {
208
+ placeholder: string;
209
+ clearable: boolean;
210
+ type: string;
211
+ immediately?: undefined;
212
+ options?: undefined;
213
+ showButton?: undefined;
214
+ };
215
+ form: {
216
+ span: number;
217
+ show: boolean;
218
+ disabled: boolean;
219
+ readonly: boolean;
220
+ updateValue: string;
221
+ display: string;
222
+ readonlyFn: string;
223
+ disabledFn: string;
224
+ createButton: boolean;
225
+ showDays: boolean;
226
+ backfill: boolean;
227
+ rule: {
228
+ required: boolean;
229
+ type: string;
230
+ message: string;
231
+ trigger: string;
232
+ validator: string;
233
+ };
234
+ create: {
235
+ show: boolean;
236
+ disabled: boolean;
237
+ readonly: boolean;
238
+ };
239
+ edit: {
240
+ show: boolean;
241
+ disabled: boolean;
242
+ readonly: boolean;
243
+ };
244
+ expand: {
245
+ show: boolean;
246
+ disabled: boolean;
247
+ readonly: boolean;
248
+ };
249
+ };
250
+ width?: undefined;
251
+ })[];
252
+ export { defaultForm };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,5 @@
1
1
  import { PropType, DefineComponent, ExtractPropTypes, Ref, ComputedRef, ComponentOptionsMixin, PublicProps, VNodeChild, CSSProperties, SlotsType, ComponentProvideOptions } from 'vue';
2
2
  import { DataTableColumns, DataTableRowKey, DataTableBaseColumn, DataTableColumnKey, PaginationProps, DataTableCreateRowClassName, DataTableCreateRowProps, DataTableCreateRowKey, DataTableCreateSummary, DataTableRowData, DataTableSize, PopoverProps, ScrollbarProps, DataTableSpinProps, DataTableGetCsvCell, DataTableGetCsvHeader, DataTableFilterState, DataTableSortOrder, DataTableScrollTo, ThemeCommonVars, DataTableSlots } from 'naive-ui';
3
- import { IUzFormItems } from '../form';
4
3
  import { BomRow } from './interface';
5
4
  import { DataTableHeightForRow, RenderExpandIcon, DataTableOnLoad, OnUpdateSorter, OnUpdateFilters, OnUpdateCheckedRowKeys, OnUpdateExpandedRowKeys, CsvOptionsType, InternalRowData, TmNode } from 'naive-ui/es/data-table/src/interface';
6
5
  import { MaybeArray } from 'naive-ui/es/_utils';
@@ -23,14 +22,10 @@ import { TooltipTheme } from 'naive-ui/es/tooltip/styles';
23
22
  declare const _default: typeof __VLS_export;
24
23
  export default _default;
25
24
  declare const __VLS_export: DefineComponent<ExtractPropTypes<{
26
- data: {
25
+ value: {
27
26
  type: PropType<BomRow[]>;
28
27
  default: () => never[];
29
28
  };
30
- extendTable: {
31
- type: PropType<IUzFormItems>;
32
- default: () => never[];
33
- };
34
29
  height: {
35
30
  type: PropType<number | string | undefined>;
36
31
  default: undefined;
@@ -40,10 +35,10 @@ declare const __VLS_export: DefineComponent<ExtractPropTypes<{
40
35
  [x: string]: unknown;
41
36
  key: DataTableRowKey;
42
37
  level?: number | string | undefined;
38
+ sort: number;
43
39
  code: string;
44
40
  product_no: string;
45
41
  product_name: string;
46
- product_specifications?: string | undefined;
47
42
  unit?: string | undefined;
48
43
  operation_no?: string | undefined;
49
44
  quantity?: number | undefined;
@@ -54,10 +49,10 @@ declare const __VLS_export: DefineComponent<ExtractPropTypes<{
54
49
  [x: string]: unknown;
55
50
  key: DataTableRowKey;
56
51
  level?: number | string | undefined;
52
+ sort: number;
57
53
  code: string;
58
54
  product_no: string;
59
55
  product_name: string;
60
- product_specifications?: string | undefined;
61
56
  unit?: string | undefined;
62
57
  operation_no?: string | undefined;
63
58
  quantity?: number | undefined;
@@ -65,33 +60,38 @@ declare const __VLS_export: DefineComponent<ExtractPropTypes<{
65
60
  remark?: string | undefined;
66
61
  children?: /*elided*/ any[] | undefined;
67
62
  }[]>;
63
+ tableRef: Ref<{
64
+ $el?: HTMLElement | undefined;
65
+ } | null, {
66
+ $el?: HTMLElement;
67
+ } | {
68
+ $el?: HTMLElement | undefined;
69
+ } | null>;
70
+ tableVersion: Ref<number, number>;
68
71
  tableColumns: ComputedRef<DataTableColumns<BomRow>>;
69
72
  scrollX: ComputedRef<number>;
70
73
  innerExpandedRowKeys: Ref<DataTableRowKey[], DataTableRowKey[]>;
71
74
  getRowKey: (row: BomRow) => DataTableRowKey;
72
75
  getRowProps: (row: BomRow) => {
73
- style: string;
74
- } | {
75
- style?: undefined;
76
+ style?: string | undefined;
77
+ 'data-row-key': string;
78
+ 'data-parent-key': string;
76
79
  };
77
80
  handleExpandedRowKeysChange: (keys: DataTableRowKey[]) => void;
78
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
79
- data: {
81
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "update:value"[], "update:value", PublicProps, Readonly< ExtractPropTypes<{
82
+ value: {
80
83
  type: PropType<BomRow[]>;
81
84
  default: () => never[];
82
85
  };
83
- extendTable: {
84
- type: PropType<IUzFormItems>;
85
- default: () => never[];
86
- };
87
86
  height: {
88
87
  type: PropType<number | string | undefined>;
89
88
  default: undefined;
90
89
  };
91
- }>> & Readonly<{}>, {
92
- data: BomRow[];
90
+ }>> & Readonly<{
91
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
92
+ }>, {
93
+ value: BomRow[];
93
94
  height: string | number | undefined;
94
- extendTable: IUzFormItems;
95
95
  }, {}, {
96
96
  NDataTable: DefineComponent<ExtractPropTypes<{
97
97
  readonly onUnstableColumnResize: PropType<(resizedWidth: number, limitedWidth: number, column: DataTableBaseColumn, getColumnWidth: (key: DataTableColumnKey) => number | undefined) => void>;
@@ -2,10 +2,10 @@ import { DataTableRowKey } from 'naive-ui';
2
2
  export interface BomRow {
3
3
  key: DataTableRowKey;
4
4
  level?: number | string;
5
+ sort: number;
5
6
  code: string;
6
7
  product_no: string;
7
8
  product_name: string;
8
- product_specifications?: string;
9
9
  unit?: string;
10
10
  operation_no?: string;
11
11
  quantity?: number;
@@ -0,0 +1,19 @@
1
+ import { ObjectKey } from '../interface';
2
+ export declare const createOperationOptions: (rows: ObjectKey[]) => {
3
+ label: string;
4
+ value: any;
5
+ }[];
6
+ export declare const createUnitOptions: (rows: ObjectKey[]) => {
7
+ label: string;
8
+ value: any;
9
+ }[];
10
+ export declare const createCodeGroups: (products: ObjectKey[], materials: ObjectKey[]) => {
11
+ type: "group";
12
+ label: string;
13
+ key: string;
14
+ children: {
15
+ label: string;
16
+ value: any;
17
+ params: ObjectKey;
18
+ }[];
19
+ }[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { BomRow } from './interface';
2
+ export declare const calculateRequiredQuantity: (row: BomRow) => number | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import { Ref } from 'vue';
2
+ import { BomRow } from './interface.js';
3
+ import { DataTableBaseColumn } from 'naive-ui';
4
+ export declare const reorderBomRows: (rows: BomRow[], parentKey: string, orderedKeys: string[]) => BomRow[];
5
+ export declare const useBomSortable: (rows: Ref<BomRow[]>, updateRows: (rows: BomRow[]) => void) => {
6
+ dragColumn: DataTableBaseColumn<BomRow>;
7
+ getSortableRowProps: (row: BomRow) => {
8
+ 'data-row-key': string;
9
+ 'data-parent-key': string;
10
+ };
11
+ tableRef: Ref<{
12
+ $el?: HTMLElement | undefined;
13
+ } | null, {
14
+ $el?: HTMLElement;
15
+ } | {
16
+ $el?: HTMLElement | undefined;
17
+ } | null>;
18
+ tableVersion: Ref<number, number>;
19
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DataTableRowKey } from 'naive-ui';
2
+ import { BomRow } from './interface';
3
+ export declare const getBomRowKey: (row: BomRow) => DataTableRowKey;
4
+ export declare const insertSibling: (rows: BomRow[], targetKey: DataTableRowKey, sibling: BomRow) => BomRow[];
@@ -0,0 +1 @@
1
+ export {};