@hbdlzy/ui-core 0.1.1 → 0.1.3

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 (113) hide show
  1. package/README.md +37 -2
  2. package/components.manifest.json +198 -161
  3. package/dist/components/BaseCard/BaseCard.types.d.ts +36 -0
  4. package/dist/components/BaseCard/BaseCard.vue.d.ts +122 -0
  5. package/dist/components/BaseCard/index.d.ts +3 -0
  6. package/dist/components/BaseEChart/BaseEChart.types.d.ts +26 -0
  7. package/dist/components/BaseEChart/BaseEChart.vue.d.ts +66 -0
  8. package/dist/components/BaseEChart/index.d.ts +3 -0
  9. package/dist/components/BaseExportButton/BaseExportButton.types.d.ts +21 -0
  10. package/dist/components/BaseExportButton/BaseExportButton.utils.d.ts +4 -0
  11. package/dist/components/BaseExportButton/BaseExportButton.vue.d.ts +128 -0
  12. package/dist/components/BaseExportButton/index.d.ts +5 -0
  13. package/dist/components/BaseTable/BaseTable.types.d.ts +163 -0
  14. package/dist/components/BaseTable/BaseTable.vue.d.ts +157 -0
  15. package/dist/components/BaseTable/index.d.ts +3 -0
  16. package/dist/components/OutlinedCascader/OutlinedCascader.types.d.ts +25 -0
  17. package/dist/components/OutlinedCascader/OutlinedCascader.vue.d.ts +85 -0
  18. package/dist/components/OutlinedCascader/index.d.ts +3 -0
  19. package/dist/components/OutlinedDatePicker/OutlinedDatePicker.types.d.ts +27 -0
  20. package/dist/components/OutlinedDatePicker/OutlinedDatePicker.vue.d.ts +88 -0
  21. package/dist/components/OutlinedDatePicker/index.d.ts +3 -0
  22. package/dist/components/OutlinedDateTimePicker/OutlinedDateTimePicker.types.d.ts +26 -0
  23. package/dist/components/OutlinedDateTimePicker/OutlinedDateTimePicker.vue.d.ts +97 -0
  24. package/dist/components/OutlinedDateTimePicker/index.d.ts +3 -0
  25. package/dist/components/OutlinedInput/OutlinedInput.types.d.ts +29 -0
  26. package/dist/components/OutlinedInput/OutlinedInput.vue.d.ts +97 -0
  27. package/dist/components/OutlinedInput/index.d.ts +3 -0
  28. package/dist/components/OutlinedSelect/OutlinedSelect.types.d.ts +38 -0
  29. package/dist/components/OutlinedSelect/OutlinedSelect.vue.d.ts +116 -0
  30. package/dist/components/OutlinedSelect/index.d.ts +3 -0
  31. package/dist/components/OutlinedTimePicker/OutlinedTimePicker.types.d.ts +28 -0
  32. package/dist/components/OutlinedTimePicker/OutlinedTimePicker.vue.d.ts +94 -0
  33. package/dist/components/OutlinedTimePicker/index.d.ts +3 -0
  34. package/dist/components/OutlinedTreeSelect/OutlinedTreeSelect.types.d.ts +46 -0
  35. package/dist/components/OutlinedTreeSelect/OutlinedTreeSelect.vue.d.ts +137 -0
  36. package/dist/components/OutlinedTreeSelect/index.d.ts +3 -0
  37. package/dist/echarts/index.d.ts +9 -0
  38. package/dist/excel/exportExcel.d.ts +18 -0
  39. package/dist/index.cjs +1 -1
  40. package/dist/index.d.ts +26 -0
  41. package/dist/index.js +2181 -41
  42. package/dist/style.css +1 -1
  43. package/package.json +6 -4
  44. package/src/components/BaseCard/BaseCard.types.d.ts +36 -0
  45. package/src/components/BaseCard/BaseCard.vue.d.ts +122 -0
  46. package/src/components/BaseCard/index.d.ts +3 -0
  47. package/src/components/BaseEChart/BaseEChart.types.d.ts +26 -0
  48. package/src/components/BaseEChart/BaseEChart.vue.d.ts +66 -0
  49. package/src/components/BaseEChart/index.d.ts +3 -0
  50. package/src/components/BaseExportButton/BaseExportButton.types.d.ts +21 -0
  51. package/src/components/BaseExportButton/BaseExportButton.utils.d.ts +4 -0
  52. package/src/components/BaseExportButton/BaseExportButton.vue.d.ts +128 -0
  53. package/src/components/BaseExportButton/index.d.ts +5 -0
  54. package/src/components/BaseTable/BaseTable.types.d.ts +163 -0
  55. package/src/components/BaseTable/BaseTable.types.ts +12 -0
  56. package/src/components/BaseTable/BaseTable.vue +412 -13
  57. package/src/components/BaseTable/BaseTable.vue.d.ts +157 -0
  58. package/src/components/BaseTable/README.md +106 -120
  59. package/src/components/BaseTable/index.d.ts +3 -0
  60. package/src/components/OutlinedCascader/OutlinedCascader.types.d.ts +25 -0
  61. package/src/components/OutlinedCascader/OutlinedCascader.types.ts +28 -0
  62. package/src/components/OutlinedCascader/OutlinedCascader.vue +250 -0
  63. package/src/components/OutlinedCascader/OutlinedCascader.vue.d.ts +85 -0
  64. package/src/components/OutlinedCascader/README.md +91 -0
  65. package/src/components/OutlinedCascader/index.d.ts +3 -0
  66. package/src/components/OutlinedCascader/index.ts +10 -0
  67. package/src/components/OutlinedDatePicker/OutlinedDatePicker.types.d.ts +27 -0
  68. package/src/components/OutlinedDatePicker/OutlinedDatePicker.types.ts +40 -0
  69. package/src/components/OutlinedDatePicker/OutlinedDatePicker.vue +365 -0
  70. package/src/components/OutlinedDatePicker/OutlinedDatePicker.vue.d.ts +88 -0
  71. package/src/components/OutlinedDatePicker/README.md +137 -0
  72. package/src/components/OutlinedDatePicker/index.d.ts +3 -0
  73. package/src/components/OutlinedDatePicker/index.ts +11 -0
  74. package/src/components/OutlinedDateTimePicker/OutlinedDateTimePicker.types.d.ts +26 -0
  75. package/src/components/OutlinedDateTimePicker/OutlinedDateTimePicker.types.ts +34 -0
  76. package/src/components/OutlinedDateTimePicker/OutlinedDateTimePicker.vue +421 -0
  77. package/src/components/OutlinedDateTimePicker/OutlinedDateTimePicker.vue.d.ts +97 -0
  78. package/src/components/OutlinedDateTimePicker/README.md +88 -0
  79. package/src/components/OutlinedDateTimePicker/index.d.ts +3 -0
  80. package/src/components/OutlinedDateTimePicker/index.ts +11 -0
  81. package/src/components/OutlinedInput/OutlinedInput.types.d.ts +29 -0
  82. package/src/components/OutlinedInput/OutlinedInput.types.ts +32 -0
  83. package/src/components/OutlinedInput/OutlinedInput.vue +307 -0
  84. package/src/components/OutlinedInput/OutlinedInput.vue.d.ts +97 -0
  85. package/src/components/OutlinedInput/README.md +154 -0
  86. package/src/components/OutlinedInput/index.d.ts +3 -0
  87. package/src/components/OutlinedInput/index.ts +10 -0
  88. package/src/components/OutlinedSelect/OutlinedSelect.types.d.ts +38 -0
  89. package/src/components/OutlinedSelect/OutlinedSelect.types.ts +48 -0
  90. package/src/components/OutlinedSelect/OutlinedSelect.vue +359 -0
  91. package/src/components/OutlinedSelect/OutlinedSelect.vue.d.ts +116 -0
  92. package/src/components/OutlinedSelect/README.md +166 -0
  93. package/src/components/OutlinedSelect/index.d.ts +3 -0
  94. package/src/components/OutlinedSelect/index.ts +12 -0
  95. package/src/components/OutlinedTimePicker/OutlinedTimePicker.types.d.ts +28 -0
  96. package/src/components/OutlinedTimePicker/OutlinedTimePicker.types.ts +36 -0
  97. package/src/components/OutlinedTimePicker/OutlinedTimePicker.vue +303 -0
  98. package/src/components/OutlinedTimePicker/OutlinedTimePicker.vue.d.ts +94 -0
  99. package/src/components/OutlinedTimePicker/README.md +93 -0
  100. package/src/components/OutlinedTimePicker/index.d.ts +3 -0
  101. package/src/components/OutlinedTimePicker/index.ts +10 -0
  102. package/src/components/OutlinedTreeSelect/OutlinedTreeSelect.types.d.ts +46 -0
  103. package/src/components/OutlinedTreeSelect/OutlinedTreeSelect.types.ts +56 -0
  104. package/src/components/OutlinedTreeSelect/OutlinedTreeSelect.vue +354 -0
  105. package/src/components/OutlinedTreeSelect/OutlinedTreeSelect.vue.d.ts +137 -0
  106. package/src/components/OutlinedTreeSelect/README.md +107 -0
  107. package/src/components/OutlinedTreeSelect/index.d.ts +3 -0
  108. package/src/components/OutlinedTreeSelect/index.ts +12 -0
  109. package/src/echarts/index.d.ts +9 -0
  110. package/src/echarts/index.ts +13 -8
  111. package/src/excel/exportExcel.d.ts +18 -0
  112. package/src/index.d.ts +26 -0
  113. package/src/index.ts +14 -0
@@ -0,0 +1,26 @@
1
+ import type { EChartInitOptions, EChartInstance, EChartLoadingOptions, EChartOption, EChartResizeOptions, EChartSetOptionOptions } from '../../echarts';
2
+ export interface BaseEChartProps {
3
+ option?: EChartOption;
4
+ theme?: string | Record<string, unknown>;
5
+ initOptions?: EChartInitOptions;
6
+ setOptionOptions?: boolean | EChartSetOptionOptions;
7
+ loading?: boolean;
8
+ loadingOptions?: EChartLoadingOptions;
9
+ autoResize?: boolean;
10
+ useDefaultColors?: boolean;
11
+ colorStorageKey?: string;
12
+ defaultColors?: string[];
13
+ group?: string;
14
+ }
15
+ export interface BaseEChartExpose {
16
+ getInstance: () => EChartInstance | null;
17
+ setOption: (option: EChartOption, setOptionOptions?: boolean | EChartSetOptionOptions) => EChartInstance | null;
18
+ resize: (resizeOptions?: EChartResizeOptions) => void;
19
+ dispatchAction: (payload: Record<string, unknown>) => void;
20
+ showLoading: (type?: string, loadingOptions?: EChartLoadingOptions) => void;
21
+ hideLoading: () => void;
22
+ clear: () => void;
23
+ dispose: () => void;
24
+ on: (eventName: string, handler: (...args: any[]) => void, context?: unknown) => void;
25
+ off: (eventName?: string, handler?: (...args: any[]) => void) => void;
26
+ }
@@ -0,0 +1,66 @@
1
+ import { echarts } from '../../echarts';
2
+ import type { BaseEChartProps } from './BaseEChart.types';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseEChartProps>, {
4
+ option: () => {};
5
+ initOptions: () => echarts.EChartsInitOpts;
6
+ setOptionOptions: () => echarts.SetOptionOpts;
7
+ loading: boolean;
8
+ autoResize: boolean;
9
+ useDefaultColors: boolean;
10
+ colorStorageKey: string;
11
+ defaultColors: () => never[];
12
+ group: undefined;
13
+ }>>, {
14
+ getInstance: () => echarts.ECharts | null;
15
+ setOption: (option: echarts.EChartsOption, setOptionOptions?: boolean | echarts.SetOptionOpts | undefined) => echarts.ECharts | null;
16
+ resize: (resizeOptions?: echarts.ResizeOpts | undefined) => void;
17
+ dispatchAction: (payload: Record<string, unknown>) => void;
18
+ showLoading: (type?: string | undefined, loadingOptions?: object | undefined) => void;
19
+ hideLoading: () => void;
20
+ clear: () => void;
21
+ dispose: () => void;
22
+ on: (eventName: string, handler: (...args: any[]) => void, context?: unknown) => void;
23
+ off: (eventName?: string | undefined, handler?: ((...args: any[]) => void) | undefined) => void;
24
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ ready: (chart: echarts.ECharts) => void;
26
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseEChartProps>, {
27
+ option: () => {};
28
+ initOptions: () => echarts.EChartsInitOpts;
29
+ setOptionOptions: () => echarts.SetOptionOpts;
30
+ loading: boolean;
31
+ autoResize: boolean;
32
+ useDefaultColors: boolean;
33
+ colorStorageKey: string;
34
+ defaultColors: () => never[];
35
+ group: undefined;
36
+ }>>> & Readonly<{
37
+ onReady?: ((chart: echarts.ECharts) => any) | undefined;
38
+ }>, {
39
+ option: echarts.EChartsOption;
40
+ initOptions: echarts.EChartsInitOpts;
41
+ setOptionOptions: boolean | echarts.SetOptionOpts;
42
+ loading: boolean;
43
+ autoResize: boolean;
44
+ useDefaultColors: boolean;
45
+ colorStorageKey: string;
46
+ defaultColors: string[];
47
+ group: string;
48
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
49
+ export default _default;
50
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
51
+ type __VLS_TypePropsToRuntimeProps<T> = {
52
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
53
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
54
+ } : {
55
+ type: import('vue').PropType<T[K]>;
56
+ required: true;
57
+ };
58
+ };
59
+ type __VLS_WithDefaults<P, D> = {
60
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
61
+ default: D[K];
62
+ }> : P[K];
63
+ };
64
+ type __VLS_Prettify<T> = {
65
+ [K in keyof T]: T[K];
66
+ } & {};
@@ -0,0 +1,3 @@
1
+ import BaseEChart from './BaseEChart.vue';
2
+ export default BaseEChart;
3
+ export type { BaseEChartExpose, BaseEChartProps } from './BaseEChart.types';
@@ -0,0 +1,21 @@
1
+ import type { ExcelExportOptions } from '../../excel/exportExcel';
2
+ export interface ExportResponseHeaders {
3
+ [key: string]: string | undefined;
4
+ }
5
+ export interface ExportResponseLike {
6
+ data: Blob | BlobPart | ArrayBuffer;
7
+ headers?: ExportResponseHeaders;
8
+ }
9
+ export type ExportRequestHandler = () => Promise<ExportResponseLike>;
10
+ export type ExportMode = 'excel' | 'request' | 'none' | 'invalid';
11
+ export type ExportBeforeHandler = () => boolean | void | Promise<boolean | void>;
12
+ export interface ExportSuccessPayload {
13
+ mode: Exclude<ExportMode, 'none' | 'invalid'>;
14
+ fileName?: string;
15
+ }
16
+ export interface BaseExportExcelConfig<Row = Record<string, any>> {
17
+ excelOptions: ExcelExportOptions<Row>;
18
+ }
19
+ export interface BaseExportRequestConfig {
20
+ requestHandler: ExportRequestHandler;
21
+ }
@@ -0,0 +1,4 @@
1
+ import type { ExportResponseLike } from './BaseExportButton.types';
2
+ export declare function extractFileNameFromDisposition(contentDisposition?: string): string;
3
+ export declare function normalizeExportFileName(fileName?: string): string;
4
+ export declare function downloadExportResponse(response: ExportResponseLike, fallbackFileName?: string): string;
@@ -0,0 +1,128 @@
1
+ import type { PropType } from 'vue';
2
+ import { type ExcelExportOptions } from '../../excel/exportExcel';
3
+ import type { ExportBeforeHandler, ExportRequestHandler, ExportSuccessPayload } from './BaseExportButton.types';
4
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ label: {
6
+ type: StringConstructor;
7
+ default: string;
8
+ };
9
+ type: {
10
+ type: PropType<"" | "info" | "primary" | "success" | "warning" | "danger">;
11
+ default: string;
12
+ };
13
+ size: {
14
+ type: PropType<"default" | "small" | "large">;
15
+ default: string;
16
+ };
17
+ plain: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ link: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ text: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ disabled: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ fileName: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
37
+ excelOptions: PropType<ExcelExportOptions<Record<string, any>>>;
38
+ requestHandler: PropType<ExportRequestHandler>;
39
+ beforeExport: PropType<ExportBeforeHandler>;
40
+ successMessage: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ errorMessage: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ autoMessage: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
+ start: () => void;
54
+ success: (payload: ExportSuccessPayload) => void;
55
+ error: (error: unknown) => void;
56
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
57
+ label: {
58
+ type: StringConstructor;
59
+ default: string;
60
+ };
61
+ type: {
62
+ type: PropType<"" | "info" | "primary" | "success" | "warning" | "danger">;
63
+ default: string;
64
+ };
65
+ size: {
66
+ type: PropType<"default" | "small" | "large">;
67
+ default: string;
68
+ };
69
+ plain: {
70
+ type: BooleanConstructor;
71
+ default: boolean;
72
+ };
73
+ link: {
74
+ type: BooleanConstructor;
75
+ default: boolean;
76
+ };
77
+ text: {
78
+ type: BooleanConstructor;
79
+ default: boolean;
80
+ };
81
+ disabled: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ };
85
+ fileName: {
86
+ type: StringConstructor;
87
+ default: string;
88
+ };
89
+ excelOptions: PropType<ExcelExportOptions<Record<string, any>>>;
90
+ requestHandler: PropType<ExportRequestHandler>;
91
+ beforeExport: PropType<ExportBeforeHandler>;
92
+ successMessage: {
93
+ type: StringConstructor;
94
+ default: string;
95
+ };
96
+ errorMessage: {
97
+ type: StringConstructor;
98
+ default: string;
99
+ };
100
+ autoMessage: {
101
+ type: BooleanConstructor;
102
+ default: boolean;
103
+ };
104
+ }>> & Readonly<{
105
+ onError?: ((error: unknown) => any) | undefined;
106
+ onSuccess?: ((payload: ExportSuccessPayload) => any) | undefined;
107
+ onStart?: (() => any) | undefined;
108
+ }>, {
109
+ type: "" | "info" | "primary" | "success" | "warning" | "danger";
110
+ label: string;
111
+ link: boolean;
112
+ text: boolean;
113
+ disabled: boolean;
114
+ fileName: string;
115
+ size: "default" | "small" | "large";
116
+ plain: boolean;
117
+ successMessage: string;
118
+ errorMessage: string;
119
+ autoMessage: boolean;
120
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
121
+ default?(_: {}): any;
122
+ }>;
123
+ export default _default;
124
+ type __VLS_WithTemplateSlots<T, S> = T & {
125
+ new (): {
126
+ $slots: S;
127
+ };
128
+ };
@@ -0,0 +1,5 @@
1
+ import BaseExportButton from './BaseExportButton.vue';
2
+ export { BaseExportButton };
3
+ export { downloadExportResponse, extractFileNameFromDisposition, normalizeExportFileName } from './BaseExportButton.utils';
4
+ export type { BaseExportExcelConfig, BaseExportRequestConfig, ExportBeforeHandler, ExportMode, ExportRequestHandler, ExportResponseHeaders, ExportResponseLike, ExportSuccessPayload } from './BaseExportButton.types';
5
+ export default BaseExportButton;
@@ -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[]>;
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
+ }