@hbdlzy/ui-core 0.1.2 → 0.1.4
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/components.manifest.json +40 -1
- package/dist/components/BaseCard/BaseCard.types.d.ts +36 -0
- package/dist/components/BaseCard/BaseCard.vue.d.ts +122 -0
- package/dist/components/BaseCard/index.d.ts +3 -0
- package/dist/components/BaseDialog/BaseDialog.types.d.ts +25 -0
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +100 -0
- package/dist/components/BaseDialog/index.d.ts +3 -0
- package/dist/components/BaseEChart/BaseEChart.types.d.ts +26 -0
- package/dist/components/BaseEChart/BaseEChart.vue.d.ts +66 -0
- package/dist/components/BaseEChart/index.d.ts +3 -0
- package/dist/components/BaseExportButton/BaseExportButton.types.d.ts +21 -0
- package/dist/components/BaseExportButton/BaseExportButton.utils.d.ts +4 -0
- package/dist/components/BaseExportButton/BaseExportButton.vue.d.ts +128 -0
- package/dist/components/BaseExportButton/index.d.ts +5 -0
- package/dist/components/BaseSearchForm/BaseSearchForm.types.d.ts +42 -0
- package/dist/components/BaseSearchForm/BaseSearchForm.utils.d.ts +5 -0
- package/dist/components/BaseSearchForm/BaseSearchForm.vue.d.ts +88 -0
- package/dist/components/BaseSearchForm/index.d.ts +4 -0
- package/dist/components/BaseTable/BaseTable.types.d.ts +163 -0
- package/dist/components/BaseTable/BaseTable.vue.d.ts +157 -0
- package/dist/components/BaseTable/index.d.ts +3 -0
- package/dist/components/OutlinedCascader/OutlinedCascader.types.d.ts +25 -0
- package/dist/components/OutlinedCascader/OutlinedCascader.vue.d.ts +85 -0
- package/dist/components/OutlinedCascader/index.d.ts +3 -0
- package/dist/components/OutlinedDatePicker/OutlinedDatePicker.types.d.ts +27 -0
- package/dist/components/OutlinedDatePicker/OutlinedDatePicker.vue.d.ts +88 -0
- package/dist/components/OutlinedDatePicker/index.d.ts +3 -0
- package/dist/components/OutlinedDateTimePicker/OutlinedDateTimePicker.types.d.ts +26 -0
- package/dist/components/OutlinedDateTimePicker/OutlinedDateTimePicker.vue.d.ts +97 -0
- package/dist/components/OutlinedDateTimePicker/index.d.ts +3 -0
- package/dist/components/OutlinedInput/OutlinedInput.types.d.ts +29 -0
- package/dist/components/OutlinedInput/OutlinedInput.vue.d.ts +97 -0
- package/dist/components/OutlinedInput/index.d.ts +3 -0
- package/dist/components/OutlinedSelect/OutlinedSelect.types.d.ts +38 -0
- package/dist/components/OutlinedSelect/OutlinedSelect.vue.d.ts +116 -0
- package/dist/components/OutlinedSelect/index.d.ts +3 -0
- package/dist/components/OutlinedTimePicker/OutlinedTimePicker.types.d.ts +28 -0
- package/dist/components/OutlinedTimePicker/OutlinedTimePicker.vue.d.ts +94 -0
- package/dist/components/OutlinedTimePicker/index.d.ts +3 -0
- package/dist/components/OutlinedTreeSelect/OutlinedTreeSelect.types.d.ts +46 -0
- package/dist/components/OutlinedTreeSelect/OutlinedTreeSelect.vue.d.ts +137 -0
- package/dist/components/OutlinedTreeSelect/index.d.ts +3 -0
- package/dist/echarts/index.d.ts +9 -0
- package/dist/excel/exportExcel.d.ts +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +30 -0
- package/dist/index.js +832 -169
- package/dist/style.css +1 -1
- package/package.json +7 -4
- package/src/components/BaseDialog/BaseDialog.types.ts +28 -0
- package/src/components/BaseDialog/BaseDialog.vue +158 -0
- package/src/components/BaseDialog/README.md +69 -0
- package/src/components/BaseDialog/index.ts +10 -0
- package/src/components/BaseExportButton/BaseExportButton.vue +3 -1
- package/src/components/BaseSearchForm/BaseSearchForm.types.ts +46 -0
- package/src/components/BaseSearchForm/BaseSearchForm.utils.ts +41 -0
- package/src/components/BaseSearchForm/BaseSearchForm.vue +267 -0
- package/src/components/BaseSearchForm/README.md +66 -0
- package/src/components/BaseSearchForm/index.ts +20 -0
- package/src/components/BaseTable/BaseTable.types.ts +13 -1
- package/src/components/BaseTable/BaseTable.vue +412 -13
- package/src/components/BaseTable/README.md +106 -120
- package/src/echarts/index.ts +13 -8
- package/src/index.ts +4 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { BaseSearchFormField, BaseSearchFormModel, BaseSearchFormProps } from './BaseSearchForm.types';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseSearchFormProps>, {
|
|
3
|
+
modelValue: () => {};
|
|
4
|
+
collapsed: boolean;
|
|
5
|
+
showCollapse: boolean;
|
|
6
|
+
columns: number;
|
|
7
|
+
labelWidth: number;
|
|
8
|
+
fieldWidth: undefined;
|
|
9
|
+
gutter: number;
|
|
10
|
+
submitText: string;
|
|
11
|
+
resetText: string;
|
|
12
|
+
expandText: string;
|
|
13
|
+
collapseText: string;
|
|
14
|
+
}>>, {
|
|
15
|
+
submit: () => void;
|
|
16
|
+
reset: () => void;
|
|
17
|
+
setFieldValue: (key: string, value: unknown) => void;
|
|
18
|
+
getModel: () => BaseSearchFormModel;
|
|
19
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: BaseSearchFormModel) => void;
|
|
21
|
+
search: (value: BaseSearchFormModel) => void;
|
|
22
|
+
reset: (value: BaseSearchFormModel) => void;
|
|
23
|
+
"field-change": (key: string, value: unknown, model: BaseSearchFormModel) => void;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseSearchFormProps>, {
|
|
25
|
+
modelValue: () => {};
|
|
26
|
+
collapsed: boolean;
|
|
27
|
+
showCollapse: boolean;
|
|
28
|
+
columns: number;
|
|
29
|
+
labelWidth: number;
|
|
30
|
+
fieldWidth: undefined;
|
|
31
|
+
gutter: number;
|
|
32
|
+
submitText: string;
|
|
33
|
+
resetText: string;
|
|
34
|
+
expandText: string;
|
|
35
|
+
collapseText: string;
|
|
36
|
+
}>>> & Readonly<{
|
|
37
|
+
onReset?: ((value: BaseSearchFormModel) => any) | undefined;
|
|
38
|
+
onSearch?: ((value: BaseSearchFormModel) => any) | undefined;
|
|
39
|
+
"onUpdate:modelValue"?: ((value: BaseSearchFormModel) => any) | undefined;
|
|
40
|
+
"onField-change"?: ((key: string, value: unknown, model: BaseSearchFormModel) => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
modelValue: BaseSearchFormModel;
|
|
43
|
+
collapsed: boolean;
|
|
44
|
+
showCollapse: boolean;
|
|
45
|
+
columns: number;
|
|
46
|
+
labelWidth: import("./BaseSearchForm.types").BaseSearchFormCssValue;
|
|
47
|
+
fieldWidth: import("./BaseSearchForm.types").BaseSearchFormCssValue;
|
|
48
|
+
gutter: number;
|
|
49
|
+
submitText: string;
|
|
50
|
+
resetText: string;
|
|
51
|
+
expandText: string;
|
|
52
|
+
collapseText: string;
|
|
53
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Partial<Record<string, (_: {
|
|
54
|
+
field: BaseSearchFormField;
|
|
55
|
+
model: BaseSearchFormModel;
|
|
56
|
+
value: unknown;
|
|
57
|
+
setValue: (value: unknown) => void;
|
|
58
|
+
}) => any>> & {
|
|
59
|
+
"actions-before"?(_: {
|
|
60
|
+
model: BaseSearchFormModel;
|
|
61
|
+
}): any;
|
|
62
|
+
"actions-after"?(_: {
|
|
63
|
+
model: BaseSearchFormModel;
|
|
64
|
+
}): any;
|
|
65
|
+
}>;
|
|
66
|
+
export default _default;
|
|
67
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
68
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
69
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
70
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
71
|
+
} : {
|
|
72
|
+
type: import('vue').PropType<T[K]>;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
type __VLS_WithDefaults<P, D> = {
|
|
77
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
78
|
+
default: D[K];
|
|
79
|
+
}> : P[K];
|
|
80
|
+
};
|
|
81
|
+
type __VLS_Prettify<T> = {
|
|
82
|
+
[K in keyof T]: T[K];
|
|
83
|
+
} & {};
|
|
84
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
85
|
+
new (): {
|
|
86
|
+
$slots: S;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import BaseSearchForm from './BaseSearchForm.vue';
|
|
2
|
+
export default BaseSearchForm;
|
|
3
|
+
export { cloneSearchFormModel, getVisibleSearchFields, resetSearchFormModel, toSearchFormCssValue } from './BaseSearchForm.utils';
|
|
4
|
+
export type { BaseSearchFormCssValue, BaseSearchFormExpose, BaseSearchFormField, BaseSearchFormFieldType, BaseSearchFormModel, BaseSearchFormOption, BaseSearchFormOptionValue, BaseSearchFormProps } from './BaseSearchForm.types';
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export type BaseTableCssValue = string | number;
|
|
2
|
+
export type BaseTableAlign = 'left' | 'center' | 'right';
|
|
3
|
+
export type BaseTableColumnKind = 'text' | 'link' | 'actions' | 'image' | 'tag' | 'html' | 'input';
|
|
4
|
+
export type BaseTableSortOrder = 'ascending' | 'descending' | null;
|
|
5
|
+
export type BaseTableSortDirection = string | null;
|
|
6
|
+
export interface BaseTableHeaderSearchConfig {
|
|
7
|
+
paramKey?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
width?: BaseTableCssValue;
|
|
10
|
+
searchText?: string;
|
|
11
|
+
resetText?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BaseTableOption {
|
|
14
|
+
label: string;
|
|
15
|
+
value: string | number | boolean;
|
|
16
|
+
tagType?: '' | 'success' | 'warning' | 'info' | 'danger' | 'primary';
|
|
17
|
+
color?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface BaseTableAction<Row = Record<string, any>> {
|
|
20
|
+
label: string;
|
|
21
|
+
type: string;
|
|
22
|
+
buttonType?: '' | 'primary' | 'success' | 'warning' | 'info' | 'danger';
|
|
23
|
+
disabled?: boolean | ((row: Row) => boolean);
|
|
24
|
+
visible?: boolean | ((row: Row) => boolean);
|
|
25
|
+
}
|
|
26
|
+
export interface BaseTableColumn<Row = Record<string, any>> {
|
|
27
|
+
label: string;
|
|
28
|
+
prop?: keyof Row | string;
|
|
29
|
+
kind?: BaseTableColumnKind;
|
|
30
|
+
type?: string;
|
|
31
|
+
width?: BaseTableCssValue;
|
|
32
|
+
minWidth?: BaseTableCssValue;
|
|
33
|
+
align?: BaseTableAlign;
|
|
34
|
+
headerAlign?: BaseTableAlign;
|
|
35
|
+
fixed?: boolean | 'left' | 'right';
|
|
36
|
+
sortable?: boolean | 'custom';
|
|
37
|
+
sortField?: string;
|
|
38
|
+
headerSearch?: boolean | BaseTableHeaderSearchConfig;
|
|
39
|
+
showOverflowTooltip?: boolean;
|
|
40
|
+
className?: string;
|
|
41
|
+
headerClassName?: string;
|
|
42
|
+
actions?: BaseTableAction<Row>[];
|
|
43
|
+
clickable?: boolean;
|
|
44
|
+
options?: BaseTableOption[];
|
|
45
|
+
optionValueKey?: string;
|
|
46
|
+
optionLabelKey?: string;
|
|
47
|
+
optionTagTypeKey?: string;
|
|
48
|
+
emptyText?: string;
|
|
49
|
+
inputType?: string;
|
|
50
|
+
imageFit?: '' | 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
51
|
+
imageWidth?: BaseTableCssValue;
|
|
52
|
+
imageHeight?: BaseTableCssValue;
|
|
53
|
+
slotName?: string;
|
|
54
|
+
headerSlotName?: string;
|
|
55
|
+
formatter?: (row: Row, column: BaseTableColumn<Row>) => unknown;
|
|
56
|
+
html?: (row: Row, column: BaseTableColumn<Row>) => string;
|
|
57
|
+
clickHandler?: (row: Row, column: BaseTableColumn<Row>) => void;
|
|
58
|
+
inputHandler?: (value: string, row: Row, column: BaseTableColumn<Row>) => void;
|
|
59
|
+
}
|
|
60
|
+
export interface BaseTablePagination {
|
|
61
|
+
currentPage: number;
|
|
62
|
+
pageSize: number;
|
|
63
|
+
total: number;
|
|
64
|
+
pageSizes: number[];
|
|
65
|
+
}
|
|
66
|
+
export interface BaseTableRequestParams {
|
|
67
|
+
currentPage: number;
|
|
68
|
+
pageSize: number;
|
|
69
|
+
[key: string]: unknown;
|
|
70
|
+
}
|
|
71
|
+
export interface BaseTableSortState {
|
|
72
|
+
prop?: string;
|
|
73
|
+
order: BaseTableSortOrder;
|
|
74
|
+
}
|
|
75
|
+
export interface BaseTableSortOrderMap {
|
|
76
|
+
ascending: string;
|
|
77
|
+
descending: string;
|
|
78
|
+
}
|
|
79
|
+
export interface BaseTableRequestResult<Row = Record<string, any>> {
|
|
80
|
+
records?: Row[];
|
|
81
|
+
list?: Row[];
|
|
82
|
+
items?: Row[];
|
|
83
|
+
total?: number;
|
|
84
|
+
data?: {
|
|
85
|
+
records?: Row[];
|
|
86
|
+
list?: Row[];
|
|
87
|
+
items?: Row[];
|
|
88
|
+
total?: number;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export interface BaseTableNormalizedResult<Row = Record<string, any>> {
|
|
92
|
+
rows?: Row[];
|
|
93
|
+
total?: number;
|
|
94
|
+
}
|
|
95
|
+
export type BaseTableRequestHandler<Row = Record<string, any>> = (params: BaseTableRequestParams) => Promise<BaseTableRequestResult<Row> | Row[] | unknown>;
|
|
96
|
+
export type BaseTableResultAdapter<Row = Record<string, any>> = (result: unknown, params: BaseTableRequestParams) => BaseTableNormalizedResult<Row>;
|
|
97
|
+
export interface BaseTableProps<Row = Record<string, any>> {
|
|
98
|
+
columns: BaseTableColumn<Row>[];
|
|
99
|
+
data?: Row[];
|
|
100
|
+
request?: BaseTableRequestHandler<Row>;
|
|
101
|
+
requestParams?: Record<string, unknown>;
|
|
102
|
+
resultAdapter?: BaseTableResultAdapter<Row>;
|
|
103
|
+
autoLoad?: boolean;
|
|
104
|
+
reloadOnParamsChange?: boolean;
|
|
105
|
+
reloadOnSortChange?: boolean;
|
|
106
|
+
rowKey?: string;
|
|
107
|
+
height?: BaseTableCssValue;
|
|
108
|
+
border?: boolean;
|
|
109
|
+
stripe?: boolean;
|
|
110
|
+
showToolbar?: boolean;
|
|
111
|
+
showPagination?: boolean;
|
|
112
|
+
hasSelection?: boolean;
|
|
113
|
+
hasIndex?: boolean;
|
|
114
|
+
indexLabel?: string;
|
|
115
|
+
indexWidth?: BaseTableCssValue;
|
|
116
|
+
selectionWidth?: BaseTableCssValue;
|
|
117
|
+
rowSelectable?: (row: Row, index: number) => boolean;
|
|
118
|
+
pagination?: Partial<BaseTablePagination>;
|
|
119
|
+
currentPageKey?: string;
|
|
120
|
+
pageSizeKey?: string;
|
|
121
|
+
defaultSort?: BaseTableSortState;
|
|
122
|
+
sortFieldKey?: string;
|
|
123
|
+
sortOrderKey?: string;
|
|
124
|
+
sortOrderMap?: BaseTableSortOrderMap;
|
|
125
|
+
sortMapper?: (payload: BaseTableSortPayload<Row>) => Record<string, unknown> | void;
|
|
126
|
+
emptyText?: string;
|
|
127
|
+
loadingText?: string;
|
|
128
|
+
}
|
|
129
|
+
export interface BaseTableSortPayload<Row = Record<string, any>> {
|
|
130
|
+
column: BaseTableColumn<Row> | undefined;
|
|
131
|
+
prop?: string;
|
|
132
|
+
order: BaseTableSortOrder;
|
|
133
|
+
field?: string;
|
|
134
|
+
direction: BaseTableSortDirection;
|
|
135
|
+
}
|
|
136
|
+
export interface BaseTableRowActionPayload<Row = Record<string, any>> {
|
|
137
|
+
row: Row;
|
|
138
|
+
action: BaseTableAction<Row>;
|
|
139
|
+
column: BaseTableColumn<Row>;
|
|
140
|
+
}
|
|
141
|
+
export interface BaseTableCellPayload<Row = Record<string, any>> {
|
|
142
|
+
row: Row;
|
|
143
|
+
column: BaseTableColumn<Row>;
|
|
144
|
+
value: unknown;
|
|
145
|
+
}
|
|
146
|
+
export interface BaseTableLoadedPayload<Row = Record<string, any>> {
|
|
147
|
+
rows: Row[];
|
|
148
|
+
total: number;
|
|
149
|
+
params: BaseTableRequestParams;
|
|
150
|
+
}
|
|
151
|
+
export interface BaseTableExpose<Row = Record<string, any>> {
|
|
152
|
+
load: (data?: Row[]) => Promise<void>;
|
|
153
|
+
refresh: () => Promise<void>;
|
|
154
|
+
setData: (data: Row[]) => void;
|
|
155
|
+
resetPage: () => Promise<void>;
|
|
156
|
+
setHeaderSearchValue: (key: string, value: string, shouldReload?: boolean) => Promise<void>;
|
|
157
|
+
resetHeaderSearch: (key?: string) => Promise<void>;
|
|
158
|
+
getHeaderSearchValues: () => Record<string, string>;
|
|
159
|
+
clearSelection: () => void;
|
|
160
|
+
toggleRowSelection: (row: Row, selected?: boolean) => void;
|
|
161
|
+
getSelectionRows: () => Row[];
|
|
162
|
+
getRows: () => Row[];
|
|
163
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { BaseTableCellPayload, BaseTableColumn, BaseTableCssValue, BaseTableLoadedPayload, BaseTablePagination, BaseTableProps, BaseTableRowActionPayload, BaseTableSortPayload } from './BaseTable.types';
|
|
2
|
+
type BaseTableRow = Record<string, any>;
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseTableProps<Record<string, any>>>, {
|
|
4
|
+
data: () => never[];
|
|
5
|
+
requestParams: () => {};
|
|
6
|
+
autoLoad: boolean;
|
|
7
|
+
reloadOnParamsChange: boolean;
|
|
8
|
+
reloadOnSortChange: boolean;
|
|
9
|
+
rowKey: string;
|
|
10
|
+
height: string;
|
|
11
|
+
border: boolean;
|
|
12
|
+
stripe: boolean;
|
|
13
|
+
showToolbar: boolean;
|
|
14
|
+
showPagination: boolean;
|
|
15
|
+
hasSelection: boolean;
|
|
16
|
+
hasIndex: boolean;
|
|
17
|
+
indexLabel: string;
|
|
18
|
+
indexWidth: number;
|
|
19
|
+
selectionWidth: number;
|
|
20
|
+
pagination: () => {};
|
|
21
|
+
currentPageKey: string;
|
|
22
|
+
pageSizeKey: string;
|
|
23
|
+
defaultSort: () => {
|
|
24
|
+
prop: undefined;
|
|
25
|
+
order: null;
|
|
26
|
+
};
|
|
27
|
+
sortFieldKey: string;
|
|
28
|
+
sortOrderKey: string;
|
|
29
|
+
sortOrderMap: () => {
|
|
30
|
+
ascending: string;
|
|
31
|
+
descending: string;
|
|
32
|
+
};
|
|
33
|
+
emptyText: string;
|
|
34
|
+
loadingText: string;
|
|
35
|
+
}>>, {
|
|
36
|
+
load: (data?: Record<string, any>[] | undefined) => Promise<void>;
|
|
37
|
+
refresh: () => Promise<void>;
|
|
38
|
+
setData: (data: Record<string, any>[]) => void;
|
|
39
|
+
resetPage: () => Promise<void>;
|
|
40
|
+
setHeaderSearchValue: (key: string, value: string, shouldReload?: boolean | undefined) => Promise<void>;
|
|
41
|
+
resetHeaderSearch: (key?: string | undefined) => Promise<void>;
|
|
42
|
+
getHeaderSearchValues: () => Record<string, string>;
|
|
43
|
+
clearSelection: () => void;
|
|
44
|
+
toggleRowSelection: (row: Record<string, any>, selected?: boolean | undefined) => void;
|
|
45
|
+
getSelectionRows: () => Record<string, any>[];
|
|
46
|
+
getRows: () => Record<string, any>[];
|
|
47
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
|
+
"selection-change": (rows: BaseTableRow[]) => void;
|
|
49
|
+
"sort-change": (payload: BaseTableSortPayload<Record<string, any>>) => void;
|
|
50
|
+
"row-action": (payload: BaseTableRowActionPayload<Record<string, any>>) => void;
|
|
51
|
+
"cell-click": (payload: BaseTableCellPayload<Record<string, any>>) => void;
|
|
52
|
+
"cell-input": (payload: BaseTableCellPayload<Record<string, any>>) => void;
|
|
53
|
+
"page-change": (currentPage: number) => void;
|
|
54
|
+
"size-change": (pageSize: number) => void;
|
|
55
|
+
"update:pagination": (pagination: BaseTablePagination) => void;
|
|
56
|
+
loaded: (payload: BaseTableLoadedPayload<Record<string, any>>) => void;
|
|
57
|
+
"request-error": (error: unknown) => void;
|
|
58
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseTableProps<Record<string, any>>>, {
|
|
59
|
+
data: () => never[];
|
|
60
|
+
requestParams: () => {};
|
|
61
|
+
autoLoad: boolean;
|
|
62
|
+
reloadOnParamsChange: boolean;
|
|
63
|
+
reloadOnSortChange: boolean;
|
|
64
|
+
rowKey: string;
|
|
65
|
+
height: string;
|
|
66
|
+
border: boolean;
|
|
67
|
+
stripe: boolean;
|
|
68
|
+
showToolbar: boolean;
|
|
69
|
+
showPagination: boolean;
|
|
70
|
+
hasSelection: boolean;
|
|
71
|
+
hasIndex: boolean;
|
|
72
|
+
indexLabel: string;
|
|
73
|
+
indexWidth: number;
|
|
74
|
+
selectionWidth: number;
|
|
75
|
+
pagination: () => {};
|
|
76
|
+
currentPageKey: string;
|
|
77
|
+
pageSizeKey: string;
|
|
78
|
+
defaultSort: () => {
|
|
79
|
+
prop: undefined;
|
|
80
|
+
order: null;
|
|
81
|
+
};
|
|
82
|
+
sortFieldKey: string;
|
|
83
|
+
sortOrderKey: string;
|
|
84
|
+
sortOrderMap: () => {
|
|
85
|
+
ascending: string;
|
|
86
|
+
descending: string;
|
|
87
|
+
};
|
|
88
|
+
emptyText: string;
|
|
89
|
+
loadingText: string;
|
|
90
|
+
}>>> & Readonly<{
|
|
91
|
+
"onSelection-change"?: ((rows: BaseTableRow[]) => any) | undefined;
|
|
92
|
+
"onSort-change"?: ((payload: BaseTableSortPayload<Record<string, any>>) => any) | undefined;
|
|
93
|
+
"onRow-action"?: ((payload: BaseTableRowActionPayload<Record<string, any>>) => any) | undefined;
|
|
94
|
+
"onCell-click"?: ((payload: BaseTableCellPayload<Record<string, any>>) => any) | undefined;
|
|
95
|
+
"onCell-input"?: ((payload: BaseTableCellPayload<Record<string, any>>) => any) | undefined;
|
|
96
|
+
"onPage-change"?: ((currentPage: number) => any) | undefined;
|
|
97
|
+
"onSize-change"?: ((pageSize: number) => any) | undefined;
|
|
98
|
+
"onUpdate:pagination"?: ((pagination: BaseTablePagination) => any) | undefined;
|
|
99
|
+
onLoaded?: ((payload: BaseTableLoadedPayload<Record<string, any>>) => any) | undefined;
|
|
100
|
+
"onRequest-error"?: ((error: unknown) => any) | undefined;
|
|
101
|
+
}>, {
|
|
102
|
+
data: Record<string, any>[];
|
|
103
|
+
requestParams: Record<string, unknown>;
|
|
104
|
+
autoLoad: boolean;
|
|
105
|
+
reloadOnParamsChange: boolean;
|
|
106
|
+
reloadOnSortChange: boolean;
|
|
107
|
+
rowKey: string;
|
|
108
|
+
height: BaseTableCssValue;
|
|
109
|
+
border: boolean;
|
|
110
|
+
stripe: boolean;
|
|
111
|
+
showToolbar: boolean;
|
|
112
|
+
showPagination: boolean;
|
|
113
|
+
hasSelection: boolean;
|
|
114
|
+
hasIndex: boolean;
|
|
115
|
+
indexLabel: string;
|
|
116
|
+
indexWidth: BaseTableCssValue;
|
|
117
|
+
selectionWidth: BaseTableCssValue;
|
|
118
|
+
pagination: Partial<BaseTablePagination>;
|
|
119
|
+
currentPageKey: string;
|
|
120
|
+
pageSizeKey: string;
|
|
121
|
+
defaultSort: import("./BaseTable.types").BaseTableSortState;
|
|
122
|
+
sortFieldKey: string;
|
|
123
|
+
sortOrderKey: string;
|
|
124
|
+
sortOrderMap: import("./BaseTable.types").BaseTableSortOrderMap;
|
|
125
|
+
emptyText: string;
|
|
126
|
+
loadingText: string;
|
|
127
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: {
|
|
128
|
+
row: any;
|
|
129
|
+
columnConfig: BaseTableColumn<Record<string, any>>;
|
|
130
|
+
columnIndex: any;
|
|
131
|
+
value: any;
|
|
132
|
+
}) => any>> & {
|
|
133
|
+
toolbar?(_: {}): any;
|
|
134
|
+
}>;
|
|
135
|
+
export default _default;
|
|
136
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
137
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
138
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
139
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
140
|
+
} : {
|
|
141
|
+
type: import('vue').PropType<T[K]>;
|
|
142
|
+
required: true;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
type __VLS_WithDefaults<P, D> = {
|
|
146
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
147
|
+
default: D[K];
|
|
148
|
+
}> : P[K];
|
|
149
|
+
};
|
|
150
|
+
type __VLS_Prettify<T> = {
|
|
151
|
+
[K in keyof T]: T[K];
|
|
152
|
+
} & {};
|
|
153
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
154
|
+
new (): {
|
|
155
|
+
$slots: S;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import BaseTable from './BaseTable.vue';
|
|
2
|
+
export default BaseTable;
|
|
3
|
+
export type { BaseTableAction, BaseTableAlign, BaseTableCellPayload, BaseTableColumn, BaseTableColumnKind, BaseTableCssValue, BaseTableExpose, BaseTableLoadedPayload, BaseTableNormalizedResult, BaseTableOption, BaseTablePagination, BaseTableProps, BaseTableResultAdapter, BaseTableRequestHandler, BaseTableRequestParams, BaseTableRequestResult, BaseTableRowActionPayload, BaseTableSortOrder, BaseTableSortPayload } from './BaseTable.types';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type OutlinedCascaderCssValue = string | number;
|
|
2
|
+
export type OutlinedCascaderValue = Array<string | number>;
|
|
3
|
+
export interface OutlinedCascaderProps {
|
|
4
|
+
value?: OutlinedCascaderValue;
|
|
5
|
+
options?: Record<string, unknown>[];
|
|
6
|
+
clearable?: boolean;
|
|
7
|
+
propsValue?: Record<string, unknown>;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
popperClass?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
inputHeight?: number;
|
|
13
|
+
isBorder?: boolean;
|
|
14
|
+
filterable?: boolean;
|
|
15
|
+
levels?: boolean;
|
|
16
|
+
marginBottom?: OutlinedCascaderCssValue;
|
|
17
|
+
paddingTop?: OutlinedCascaderCssValue;
|
|
18
|
+
}
|
|
19
|
+
export interface OutlinedCascaderExpose {
|
|
20
|
+
focus: () => void;
|
|
21
|
+
blur: () => void;
|
|
22
|
+
togglePopperVisible: () => void;
|
|
23
|
+
clear: () => void;
|
|
24
|
+
getCascaderRef: () => unknown | null;
|
|
25
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { OutlinedCascaderCssValue, OutlinedCascaderProps, OutlinedCascaderValue } from './OutlinedCascader.types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OutlinedCascaderProps>, {
|
|
3
|
+
value: () => never[];
|
|
4
|
+
options: () => never[];
|
|
5
|
+
clearable: boolean;
|
|
6
|
+
propsValue: undefined;
|
|
7
|
+
placeholder: string;
|
|
8
|
+
label: string;
|
|
9
|
+
popperClass: string;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
inputHeight: number;
|
|
12
|
+
isBorder: boolean;
|
|
13
|
+
filterable: boolean;
|
|
14
|
+
levels: boolean;
|
|
15
|
+
marginBottom: number;
|
|
16
|
+
paddingTop: number;
|
|
17
|
+
}>>, {
|
|
18
|
+
focus: () => void;
|
|
19
|
+
blur: () => void;
|
|
20
|
+
togglePopperVisible: () => void;
|
|
21
|
+
clear: () => void;
|
|
22
|
+
getCascaderRef: () => unknown;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
input: (value: OutlinedCascaderValue) => void;
|
|
25
|
+
"update:value": (value: OutlinedCascaderValue) => void;
|
|
26
|
+
change: (value: OutlinedCascaderValue) => void;
|
|
27
|
+
focus: (value: FocusEvent) => void;
|
|
28
|
+
blur: (value: FocusEvent) => void;
|
|
29
|
+
"visible-change": (value: boolean) => void;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OutlinedCascaderProps>, {
|
|
31
|
+
value: () => never[];
|
|
32
|
+
options: () => never[];
|
|
33
|
+
clearable: boolean;
|
|
34
|
+
propsValue: undefined;
|
|
35
|
+
placeholder: string;
|
|
36
|
+
label: string;
|
|
37
|
+
popperClass: string;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
inputHeight: number;
|
|
40
|
+
isBorder: boolean;
|
|
41
|
+
filterable: boolean;
|
|
42
|
+
levels: boolean;
|
|
43
|
+
marginBottom: number;
|
|
44
|
+
paddingTop: number;
|
|
45
|
+
}>>> & Readonly<{
|
|
46
|
+
onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
47
|
+
onChange?: ((value: OutlinedCascaderValue) => any) | undefined;
|
|
48
|
+
onFocus?: ((value: FocusEvent) => any) | undefined;
|
|
49
|
+
onInput?: ((value: OutlinedCascaderValue) => any) | undefined;
|
|
50
|
+
"onUpdate:value"?: ((value: OutlinedCascaderValue) => any) | undefined;
|
|
51
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
52
|
+
}>, {
|
|
53
|
+
label: string;
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
value: OutlinedCascaderValue;
|
|
56
|
+
options: Record<string, unknown>[];
|
|
57
|
+
placeholder: string;
|
|
58
|
+
clearable: boolean;
|
|
59
|
+
popperClass: string;
|
|
60
|
+
propsValue: Record<string, unknown>;
|
|
61
|
+
inputHeight: number;
|
|
62
|
+
isBorder: boolean;
|
|
63
|
+
filterable: boolean;
|
|
64
|
+
levels: boolean;
|
|
65
|
+
marginBottom: OutlinedCascaderCssValue;
|
|
66
|
+
paddingTop: OutlinedCascaderCssValue;
|
|
67
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
68
|
+
export default _default;
|
|
69
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
70
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
71
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
72
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
73
|
+
} : {
|
|
74
|
+
type: import('vue').PropType<T[K]>;
|
|
75
|
+
required: true;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
type __VLS_WithDefaults<P, D> = {
|
|
79
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
80
|
+
default: D[K];
|
|
81
|
+
}> : P[K];
|
|
82
|
+
};
|
|
83
|
+
type __VLS_Prettify<T> = {
|
|
84
|
+
[K in keyof T]: T[K];
|
|
85
|
+
} & {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type OutlinedDatePickerCssValue = string | number;
|
|
2
|
+
export type OutlinedDatePickerValue = string | number | Date | Array<string | number | Date> | null;
|
|
3
|
+
export type OutlinedDatePickerDisabledDate = string | number | Date | ((date: Date) => boolean);
|
|
4
|
+
export interface OutlinedDatePickerProps {
|
|
5
|
+
value?: OutlinedDatePickerValue;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
timeValue?: boolean;
|
|
10
|
+
typeDate?: string;
|
|
11
|
+
format?: string;
|
|
12
|
+
valueFormat?: string;
|
|
13
|
+
showPassword?: boolean;
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
inputHeight?: number;
|
|
16
|
+
isBorder?: boolean;
|
|
17
|
+
disabledDate?: OutlinedDatePickerDisabledDate;
|
|
18
|
+
marginBottom?: OutlinedDatePickerCssValue;
|
|
19
|
+
paddingTop?: OutlinedDatePickerCssValue;
|
|
20
|
+
}
|
|
21
|
+
export interface OutlinedDatePickerExpose {
|
|
22
|
+
focus: () => void;
|
|
23
|
+
blur: () => void;
|
|
24
|
+
handleOpen: () => void;
|
|
25
|
+
handleClose: () => void;
|
|
26
|
+
getPickerRef: () => unknown | null;
|
|
27
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { OutlinedDatePickerCssValue, OutlinedDatePickerDisabledDate, OutlinedDatePickerProps, OutlinedDatePickerValue } from './OutlinedDatePicker.types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OutlinedDatePickerProps>, {
|
|
3
|
+
value: string;
|
|
4
|
+
placeholder: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
timeValue: boolean;
|
|
8
|
+
typeDate: string;
|
|
9
|
+
format: string;
|
|
10
|
+
valueFormat: string;
|
|
11
|
+
showPassword: boolean;
|
|
12
|
+
multiple: boolean;
|
|
13
|
+
inputHeight: number;
|
|
14
|
+
isBorder: boolean;
|
|
15
|
+
disabledDate: undefined;
|
|
16
|
+
marginBottom: number;
|
|
17
|
+
paddingTop: number;
|
|
18
|
+
}>>, {
|
|
19
|
+
focus: () => void;
|
|
20
|
+
blur: () => void;
|
|
21
|
+
handleOpen: () => void;
|
|
22
|
+
handleClose: () => void;
|
|
23
|
+
getPickerRef: () => unknown;
|
|
24
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
input: (value: OutlinedDatePickerValue) => void;
|
|
26
|
+
"update:value": (value: OutlinedDatePickerValue) => void;
|
|
27
|
+
change: (value: OutlinedDatePickerValue) => void;
|
|
28
|
+
focus: (value: FocusEvent) => void;
|
|
29
|
+
blur: (value: FocusEvent) => void;
|
|
30
|
+
"visible-change": (value: boolean) => void;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OutlinedDatePickerProps>, {
|
|
32
|
+
value: string;
|
|
33
|
+
placeholder: string;
|
|
34
|
+
label: string;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
timeValue: boolean;
|
|
37
|
+
typeDate: string;
|
|
38
|
+
format: string;
|
|
39
|
+
valueFormat: string;
|
|
40
|
+
showPassword: boolean;
|
|
41
|
+
multiple: boolean;
|
|
42
|
+
inputHeight: number;
|
|
43
|
+
isBorder: boolean;
|
|
44
|
+
disabledDate: undefined;
|
|
45
|
+
marginBottom: number;
|
|
46
|
+
paddingTop: number;
|
|
47
|
+
}>>> & Readonly<{
|
|
48
|
+
onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
49
|
+
onChange?: ((value: OutlinedDatePickerValue) => any) | undefined;
|
|
50
|
+
onFocus?: ((value: FocusEvent) => any) | undefined;
|
|
51
|
+
onInput?: ((value: OutlinedDatePickerValue) => any) | undefined;
|
|
52
|
+
"onUpdate:value"?: ((value: OutlinedDatePickerValue) => any) | undefined;
|
|
53
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
54
|
+
}>, {
|
|
55
|
+
label: string;
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
value: OutlinedDatePickerValue;
|
|
58
|
+
placeholder: string;
|
|
59
|
+
inputHeight: number;
|
|
60
|
+
isBorder: boolean;
|
|
61
|
+
marginBottom: OutlinedDatePickerCssValue;
|
|
62
|
+
paddingTop: OutlinedDatePickerCssValue;
|
|
63
|
+
multiple: boolean;
|
|
64
|
+
timeValue: boolean;
|
|
65
|
+
typeDate: string;
|
|
66
|
+
format: string;
|
|
67
|
+
valueFormat: string;
|
|
68
|
+
showPassword: boolean;
|
|
69
|
+
disabledDate: OutlinedDatePickerDisabledDate;
|
|
70
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
71
|
+
export default _default;
|
|
72
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
73
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
74
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
75
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
76
|
+
} : {
|
|
77
|
+
type: import('vue').PropType<T[K]>;
|
|
78
|
+
required: true;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
type __VLS_WithDefaults<P, D> = {
|
|
82
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
83
|
+
default: D[K];
|
|
84
|
+
}> : P[K];
|
|
85
|
+
};
|
|
86
|
+
type __VLS_Prettify<T> = {
|
|
87
|
+
[K in keyof T]: T[K];
|
|
88
|
+
} & {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import OutlinedDatePicker from './OutlinedDatePicker.vue';
|
|
2
|
+
export default OutlinedDatePicker;
|
|
3
|
+
export type { OutlinedDatePickerCssValue, OutlinedDatePickerDisabledDate, OutlinedDatePickerExpose, OutlinedDatePickerProps, OutlinedDatePickerValue } from './OutlinedDatePicker.types';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type OutlinedDateTimePickerCssValue = string | number;
|
|
2
|
+
export type OutlinedDateTimePickerValue = string;
|
|
3
|
+
export type OutlinedDateTimePickerDisabledDate = string | number | Date | ((date: Date) => boolean);
|
|
4
|
+
export interface OutlinedDateTimePickerProps {
|
|
5
|
+
value?: OutlinedDateTimePickerValue;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
inputHeight?: number;
|
|
9
|
+
isBorder?: boolean;
|
|
10
|
+
disabledDate?: OutlinedDateTimePickerDisabledDate;
|
|
11
|
+
separatorText?: string;
|
|
12
|
+
timePlaceholder?: string;
|
|
13
|
+
clearable?: boolean;
|
|
14
|
+
marginBottom?: OutlinedDateTimePickerCssValue;
|
|
15
|
+
paddingTop?: OutlinedDateTimePickerCssValue;
|
|
16
|
+
}
|
|
17
|
+
export interface OutlinedDateTimePickerExpose {
|
|
18
|
+
focusDate: () => void;
|
|
19
|
+
focusTime: () => void;
|
|
20
|
+
blurDate: () => void;
|
|
21
|
+
blurTime: () => void;
|
|
22
|
+
openDatePanel: () => void;
|
|
23
|
+
openTimePanel: () => void;
|
|
24
|
+
getDatePickerRef: () => unknown | null;
|
|
25
|
+
getTimePickerRef: () => unknown | null;
|
|
26
|
+
}
|