@fewangsit/wangsvue-fats 1.0.0-alpha.99 → 1.0.0-rc.1
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/assetinfo/AssetInfo.vue.d.ts +5 -0
- package/components/buttondownload/ButtonDownload.vue.d.ts +31 -0
- package/components/carousel/Carousel.vue.d.ts +28 -0
- package/components/datatable/DataTable.vue.d.ts +2 -0
- package/components/datepicker/DatePicker.vue.d.ts +52 -0
- package/components/daypicker/DayPicker.vue.d.ts +52 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +1 -1
- package/components/dialogtransferlog/DialogTransferLog.vue.d.ts +16 -0
- package/components/dropdown/Dropdown.vue.d.ts +5 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +7 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +96 -65
- package/components/form/Form.vue.d.ts +2 -0
- package/components/icon/Icon.vue.d.ts +1 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +8 -0
- package/components/index.d.ts +9 -0
- package/components/inputotp/InputOtp.vue.d.ts +3 -0
- package/components/steps/Steps.vue.d.ts +20 -0
- package/components/tabmenu/TabMenu.vue.d.ts +1 -1
- package/components/ts-helpers.d.ts +8 -0
- package/components/username/UserName.vue.d.ts +7 -2
- package/components/validatormessage/ValidatorMessage.vue.d.ts +12 -0
- package/event-bus/index.d.ts +5 -2
- package/package.json +15 -8
- package/plugins/WangsVue.d.ts +6 -0
- package/plugins/formValidation.d.ts +1 -0
- package/stats.html +1 -1
- package/style.css +1 -1
- package/utils/exportToExcel.util.d.ts +27 -0
- package/utils/getStatusSeverity.util.d.ts +33 -0
- package/utils/index.d.ts +4 -2
- package/utils/isBasic.util.d.ts +1 -0
- package/utils/role.util.d.ts +2 -0
- package/utils/xlsx.util.d.ts +19 -0
- package/wangsvue-fats.js +21556 -20788
- package/wangsvue-fats.system.js +72 -71
- package/utils/getSeverityByAssetStatus.util.d.ts +0 -3
|
@@ -1,5 +1,23 @@
|
|
|
1
|
+
import { DataTableProps } from '../datatable/DataTable.vue.d';
|
|
1
2
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers.d';
|
|
2
3
|
|
|
4
|
+
export interface ButtonDownloadLocaleConfig {
|
|
5
|
+
/**
|
|
6
|
+
* Message to display on loading ovevrlay while downloading
|
|
7
|
+
*/
|
|
8
|
+
downloadingMessage: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Text when booleanValue is true
|
|
12
|
+
*/
|
|
13
|
+
trueText: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Text when booleanValue is false
|
|
17
|
+
*/
|
|
18
|
+
falseText: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
3
21
|
export interface ButtonDownloadProps {
|
|
4
22
|
fileName: string;
|
|
5
23
|
/**
|
|
@@ -21,6 +39,19 @@ export interface ButtonDownloadProps {
|
|
|
21
39
|
* Texts below table in downloaded excel
|
|
22
40
|
*/
|
|
23
41
|
additionalTextBelowTable?: (string | string[])[];
|
|
42
|
+
/**
|
|
43
|
+
* If this props exist, download data from provided configs instead syncing with data tables
|
|
44
|
+
*/
|
|
45
|
+
dataConfigs?: Pick<
|
|
46
|
+
DataTableProps,
|
|
47
|
+
'columns' | 'fetchFunction' | 'data' | 'tableTitle'
|
|
48
|
+
>[];
|
|
49
|
+
/**
|
|
50
|
+
* Specify the error message download excel when tableConfigs is in use
|
|
51
|
+
*
|
|
52
|
+
* @example 'Error, failed to download {fileName}' - fileName will be replaced
|
|
53
|
+
*/
|
|
54
|
+
excelToastErrorMessage?: string;
|
|
24
55
|
}
|
|
25
56
|
|
|
26
57
|
/**
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ImageGallery } from '../image/Image.vue.d';
|
|
2
|
+
import { ClassComponent } from '../ts-helpers';
|
|
3
|
+
|
|
4
|
+
export interface CarouselProps {
|
|
5
|
+
/**
|
|
6
|
+
* An array of image object to be displayed.
|
|
7
|
+
*/
|
|
8
|
+
value: ImageGallery[] | undefined;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* **TSVue v2 - Carousel**
|
|
13
|
+
*
|
|
14
|
+
* _Carousel is a component for displaying a collection of images or content in a sliding or rotating fashion.
|
|
15
|
+
* You can navigate through the items using the provided next and previous functions._
|
|
16
|
+
*
|
|
17
|
+
* --- ---
|
|
18
|
+
* 
|
|
19
|
+
*
|
|
20
|
+
* @group components
|
|
21
|
+
*/
|
|
22
|
+
declare class Carousel extends ClassComponent<
|
|
23
|
+
CarouselProps,
|
|
24
|
+
unknown,
|
|
25
|
+
unknown
|
|
26
|
+
> {}
|
|
27
|
+
|
|
28
|
+
export default Carousel;
|
|
@@ -4,6 +4,7 @@ import { DialogConfirmProps } from '../../components/dialogconfirm/DialogConfirm
|
|
|
4
4
|
import { MenuItem } from '../../components/menuitem';
|
|
5
5
|
import { DateOptions } from '../../utils/date.util';
|
|
6
6
|
|
|
7
|
+
import { WangsIconseverities } from '../icon/Icon.vue.d';
|
|
7
8
|
import { ClassComponent, HintedString } from '../ts-helpers.d';
|
|
8
9
|
|
|
9
10
|
export interface DataTableLocaleConfig {
|
|
@@ -249,6 +250,7 @@ export interface TableColumn {
|
|
|
249
250
|
field: string;
|
|
250
251
|
fieldType?: 'string' | 'number' | 'boolean' | 'array';
|
|
251
252
|
info?: string;
|
|
253
|
+
infoSeverity?: WangsIconseverities;
|
|
252
254
|
editable?: boolean;
|
|
253
255
|
/**
|
|
254
256
|
* If the column is editable, only allow number inputs.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* DatePicker component props
|
|
5
|
+
*/
|
|
6
|
+
export interface DatePickerProps {
|
|
7
|
+
/**
|
|
8
|
+
* DatePicker modelValue is day index from 0
|
|
9
|
+
*/
|
|
10
|
+
modelValue?: number[];
|
|
11
|
+
/**
|
|
12
|
+
* DatePicker initialValue is day index from 0
|
|
13
|
+
*/
|
|
14
|
+
initialValue?: number[];
|
|
15
|
+
/**
|
|
16
|
+
* Display label on top of Date Input.
|
|
17
|
+
*/
|
|
18
|
+
label?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Enable Validator using vee-validate. Combine with Form that handle form validation.
|
|
21
|
+
*/
|
|
22
|
+
useValidator?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* When used as field in From Validation using Form,
|
|
25
|
+
* specify the unique field name, match with your needs for API request.
|
|
26
|
+
*/
|
|
27
|
+
fieldName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether this field should be filled or not.
|
|
30
|
+
*/
|
|
31
|
+
mandatory?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the invalid state.
|
|
34
|
+
*/
|
|
35
|
+
invalid?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Set the custom validator message.
|
|
38
|
+
* By default each field has preserved with its validator message, you don't need to worrying about the message.
|
|
39
|
+
*/
|
|
40
|
+
errorMessage?: { empty: string };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* DatePicker component emits
|
|
45
|
+
*/
|
|
46
|
+
export type DatePickerEmits = {
|
|
47
|
+
'update:modelValue': [days?: number[]];
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
declare const DatePicker: DefineComponent<DatePickerProps, DatePickerEmits>;
|
|
51
|
+
|
|
52
|
+
export default DatePicker;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* DayPicker component props
|
|
5
|
+
*/
|
|
6
|
+
export interface DayPickerProps {
|
|
7
|
+
/**
|
|
8
|
+
* DayPicker modelValue is day index from 0
|
|
9
|
+
*/
|
|
10
|
+
modelValue?: number[];
|
|
11
|
+
/**
|
|
12
|
+
* DayPicker initialValue is day index from 0
|
|
13
|
+
*/
|
|
14
|
+
initialValue?: number[];
|
|
15
|
+
/**
|
|
16
|
+
* Display label on top of Date Input.
|
|
17
|
+
*/
|
|
18
|
+
label?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Enable Validator using vee-validate. Combine with Form that handle form validation.
|
|
21
|
+
*/
|
|
22
|
+
useValidator?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* When used as field in From Validation using Form,
|
|
25
|
+
* specify the unique field name, match with your needs for API request.
|
|
26
|
+
*/
|
|
27
|
+
fieldName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether this field should be filled or not.
|
|
30
|
+
*/
|
|
31
|
+
mandatory?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the invalid state.
|
|
34
|
+
*/
|
|
35
|
+
invalid?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Set the custom validator message.
|
|
38
|
+
* By default each field has preserved with its validator message, you don't need to worrying about the message.
|
|
39
|
+
*/
|
|
40
|
+
errorMessage?: { empty: string };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* DayPicker component emits
|
|
45
|
+
*/
|
|
46
|
+
export type DayPickerEmits = {
|
|
47
|
+
'update:modelValue': [days?: number[]];
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
declare const DayPicker: DefineComponent<DayPickerProps, DayPickerEmits>;
|
|
51
|
+
|
|
52
|
+
export default DayPicker;
|
|
@@ -3,7 +3,7 @@ import { Slot } from 'vue';
|
|
|
3
3
|
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
4
4
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
5
5
|
|
|
6
|
-
type ConfirmDialogSeverity = 'success' | 'danger';
|
|
6
|
+
type ConfirmDialogSeverity = 'success' | 'danger' | 'primary';
|
|
7
7
|
|
|
8
8
|
export interface DialogConfirmLocaleConfig {
|
|
9
9
|
actionableCloseButtonLabel?: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ClassComponent } from '../../components/ts-helpers.d';
|
|
2
|
+
|
|
3
|
+
// You need to provide requestIds with Ref<string[]> to enable prev and next buttons
|
|
4
|
+
|
|
5
|
+
export interface DialogTransferLogProps {
|
|
6
|
+
id: string;
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare class DialogTransferLog extends ClassComponent<
|
|
11
|
+
DialogTransferLogProps,
|
|
12
|
+
unknown,
|
|
13
|
+
unknown
|
|
14
|
+
> {}
|
|
15
|
+
|
|
16
|
+
export default DialogTransferLog;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
1
2
|
import { DefineComponent, Slot } from 'vue';
|
|
2
3
|
|
|
3
4
|
import {
|
|
@@ -10,6 +11,7 @@ import { CalendarProps } from '../calendar/Calendar.vue.d';
|
|
|
10
11
|
import { QueryParams } from '../datatable/DataTable.vue.d';
|
|
11
12
|
import { InputRangeNumberProps } from '../inputrangenumber/InputRangeNumber.vue.d';
|
|
12
13
|
import { MultiSelectProps } from '../multiselect/MultiSelect.vue.d';
|
|
14
|
+
import { StringKeyOf, TypeError } from '../ts-helpers';
|
|
13
15
|
|
|
14
16
|
export type FilterMatchMode =
|
|
15
17
|
| 'CONTAINS'
|
|
@@ -23,66 +25,76 @@ export type FilterMatchMode =
|
|
|
23
25
|
| 'BETWEEN'
|
|
24
26
|
| 'DATE_BETWEEN';
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
export interface MultiSelectFilterField extends MultiSelectProps {
|
|
28
|
-
type: 'multiselect';
|
|
28
|
+
type BaseSelectField<OptionsQueryParams extends QueryParams> = {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Represents a function type for fetching options based on query parameters.
|
|
31
31
|
*
|
|
32
|
-
*
|
|
33
|
-
* For example, if filtering by a user's full name, the field could be 'user.fullName', which will extract
|
|
34
|
-
* unique full names from the table data and use them as filter options.
|
|
35
|
-
*/
|
|
36
|
-
field: string;
|
|
37
|
-
optionField?: string; // @example - actionOptions
|
|
38
|
-
params?: QueryParams; // Additional QueryParams for the fetchOptionFn
|
|
39
|
-
fetchOptionFn?:
|
|
40
|
-
| ((args?: any) => Option[] | undefined) // Sync function to fetch options
|
|
41
|
-
| ((args?: any) => Promise<Option[] | undefined>); // Async function
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface DropdownFilterField extends DropdownProps {
|
|
45
|
-
type: 'dropdown';
|
|
46
|
-
/**
|
|
47
|
-
* The name of the field this filter applies to.
|
|
32
|
+
* @template T - The type of query parameters, extending `QueryParams`. Defaults to `any`.
|
|
48
33
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
field: string;
|
|
54
|
-
optionField?: string; // @example - actionOptions
|
|
55
|
-
params?: QueryParams; // Additional QueryParams for the fetchOptionFn
|
|
56
|
-
fetchOptionFn?:
|
|
57
|
-
| ((args?: any) => Option[] | undefined) // Sync function to fetch options
|
|
58
|
-
| ((args?: any) => Promise<Option[]> | undefined); // Async function
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface RangeNumberFilterField extends InputRangeNumberProps {
|
|
62
|
-
type: 'rangenumber';
|
|
63
|
-
/**
|
|
64
|
-
* Specify min and max field
|
|
34
|
+
* This function can have one of the following signatures:
|
|
35
|
+
* - A synchronous function that takes query parameters and returns an array of `Option` objects.
|
|
36
|
+
* - An asynchronous function that takes query parameters and returns a `Promise` resolving to an array of `Option` objects.
|
|
37
|
+
* - An asynchronous function that takes query parameters and returns a `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
|
|
65
38
|
*
|
|
66
|
-
* @
|
|
39
|
+
* @param args - The query parameters of type `T` used to fetch the options.
|
|
40
|
+
* @returns One of the following:
|
|
41
|
+
* - An array of `Option` objects.
|
|
42
|
+
* - A `Promise` resolving to an array of `Option` objects.
|
|
43
|
+
* - A `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
|
|
67
44
|
*/
|
|
68
|
-
|
|
45
|
+
fetchOptionFn?(
|
|
46
|
+
args: OptionsQueryParams,
|
|
47
|
+
): Option[] | Promise<Option[]> | Promise<AxiosResponse<FetchOptionResponse>>;
|
|
69
48
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
49
|
+
optionField?: keyof OptionsQueryParams; // @example - actionOptions
|
|
50
|
+
params?: OptionsQueryParams; // Additional QueryParams for the fetchOptionFn
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export interface MultiSelectFilterField<OptionsQueryParams extends QueryParams>
|
|
54
|
+
extends BaseSelectField<OptionsQueryParams>,
|
|
55
|
+
MultiSelectProps {
|
|
56
|
+
type: 'multiselect';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface DropdownFilterField<OptionsQueryParams extends QueryParams>
|
|
60
|
+
extends BaseSelectField<OptionsQueryParams>,
|
|
61
|
+
DropdownProps {
|
|
62
|
+
type: 'dropdown';
|
|
80
63
|
}
|
|
81
64
|
|
|
82
|
-
|
|
83
|
-
|
|
65
|
+
type RangeNumberFilterField<Field extends string> =
|
|
66
|
+
| (InputRangeNumberProps & {
|
|
67
|
+
type: 'rangenumber';
|
|
68
|
+
/**
|
|
69
|
+
* Specify min and max field
|
|
70
|
+
*
|
|
71
|
+
* @example ['minAge', 'maxAge']
|
|
72
|
+
*/
|
|
73
|
+
fields: [Field, Field];
|
|
74
|
+
field?: TypeError<'`field` must not be specified when using `fields` property'>;
|
|
75
|
+
tooltip?: string;
|
|
76
|
+
})
|
|
77
|
+
| (InputRangeNumberProps & {
|
|
78
|
+
type: 'rangenumber';
|
|
79
|
+
/**
|
|
80
|
+
* Specify single field for both min and max input.
|
|
81
|
+
* The value will be a number array.
|
|
82
|
+
*
|
|
83
|
+
* Prefer using this property when working with Static Filtering
|
|
84
|
+
*
|
|
85
|
+
* @example value: [1000, 5000] or equivalent to 'value.0': 1000 & 'value.1': 5000
|
|
86
|
+
*/
|
|
87
|
+
field: Field;
|
|
88
|
+
fields?: TypeError<'`fields` must not be specified when using `field` property'>;
|
|
89
|
+
tooltip?: string;
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export interface ButtonSelectTreeFilterField<
|
|
93
|
+
Field extends string,
|
|
94
|
+
Params = QueryParams,
|
|
95
|
+
> extends Omit<ButtonSelectTreeProps, 'type' | 'label' | 'fieldLabel'> {
|
|
84
96
|
type: 'group' | 'category';
|
|
85
|
-
field:
|
|
97
|
+
field: Field; // The name of the field this filter applies to
|
|
86
98
|
/**
|
|
87
99
|
* The field label.
|
|
88
100
|
*/
|
|
@@ -92,22 +104,46 @@ export interface ButtonSelectTreeFilterField
|
|
|
92
104
|
* @default to Select Group|Category
|
|
93
105
|
*/
|
|
94
106
|
buttonLabel?: string;
|
|
95
|
-
params?:
|
|
107
|
+
params?: Params; // Override QueryParams for the fetchTree
|
|
96
108
|
}
|
|
97
109
|
|
|
98
110
|
export interface CalendarFilterField extends CalendarProps {
|
|
99
111
|
type: 'calendar';
|
|
100
|
-
field: string;
|
|
101
112
|
}
|
|
102
113
|
|
|
103
|
-
export type AdditionalFilterField =
|
|
114
|
+
export type AdditionalFilterField<Field extends string = string> =
|
|
115
|
+
ButtonSelectTreeFilterField<Field>;
|
|
104
116
|
|
|
105
|
-
export type
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
117
|
+
export type BaseFilterField<Params extends QueryParams = QueryParams> = {
|
|
118
|
+
/**
|
|
119
|
+
* Filter field visibility
|
|
120
|
+
*
|
|
121
|
+
* You dont need manually filter, this component already handle it.
|
|
122
|
+
*/
|
|
123
|
+
visible?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* The name of the field this filter applies to.
|
|
126
|
+
*
|
|
127
|
+
* When using a static filter, it also specifies the field in the data to be used for generating unique options.
|
|
128
|
+
* For example, if filtering by a user's full name, the field could be 'user.fullName', which will extract
|
|
129
|
+
* unique full names from the table data and use them as filter options.
|
|
130
|
+
*/
|
|
131
|
+
field: keyof Params;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export type FilterField<
|
|
135
|
+
Params extends QueryParams = QueryParams,
|
|
136
|
+
OptionsQueryParams extends QueryParams = QueryParams,
|
|
137
|
+
> =
|
|
138
|
+
| (BaseFilterField<Params> &
|
|
139
|
+
(
|
|
140
|
+
| AdditionalFilterField<StringKeyOf<Params>>
|
|
141
|
+
| MultiSelectFilterField<OptionsQueryParams>
|
|
142
|
+
| DropdownFilterField<OptionsQueryParams>
|
|
143
|
+
| CalendarFilterField
|
|
144
|
+
))
|
|
145
|
+
| (Omit<BaseFilterField<Params>, 'field'> &
|
|
146
|
+
RangeNumberFilterField<StringKeyOf<Params>>);
|
|
111
147
|
|
|
112
148
|
export type FilterOptions<Opt = Record<string, boolean>> = Record<
|
|
113
149
|
keyof Opt,
|
|
@@ -150,11 +186,6 @@ export interface FilterContainerProps {
|
|
|
150
186
|
* Slots for FilterContainer component
|
|
151
187
|
*/
|
|
152
188
|
export type FilterContainerSlots = {
|
|
153
|
-
/**
|
|
154
|
-
* @deprecated Please use props.fields instead
|
|
155
|
-
*/
|
|
156
|
-
default: Slot;
|
|
157
|
-
|
|
158
189
|
/**
|
|
159
190
|
* Additional template for field.
|
|
160
191
|
*/
|
|
@@ -168,6 +168,10 @@ export interface ImageCompressorProps {
|
|
|
168
168
|
* @default 'webp'
|
|
169
169
|
*/
|
|
170
170
|
fileType?: 'webp' | 'jpeg' | 'jpg';
|
|
171
|
+
/**
|
|
172
|
+
* @default normal
|
|
173
|
+
*/
|
|
174
|
+
type?: 'inline-table' | 'normal';
|
|
171
175
|
}
|
|
172
176
|
|
|
173
177
|
export interface ImageCompressorSlots {
|
|
@@ -184,6 +188,10 @@ export type ImageCompressorEmits = {
|
|
|
184
188
|
*/
|
|
185
189
|
'applyProp': [];
|
|
186
190
|
'update:defaultImage': [index?: number];
|
|
191
|
+
/**
|
|
192
|
+
* Emits on every changes in `field.value`
|
|
193
|
+
*/
|
|
194
|
+
'update:fieldValue': [value?: File[] | File];
|
|
187
195
|
/**
|
|
188
196
|
* On delete button clicked.
|
|
189
197
|
*
|
package/components/index.d.ts
CHANGED
|
@@ -17,7 +17,9 @@ export { default as ButtonSync } from './buttonsync/ButtonSync.vue';
|
|
|
17
17
|
export { default as ButtonToggle } from './buttontoggle/ButtonToggle.vue';
|
|
18
18
|
export { default as Calendar } from './calendar/Calendar.vue';
|
|
19
19
|
export { default as Card } from './card/Card.vue';
|
|
20
|
+
export { default as Carousel } from './carousel/Carousel.vue';
|
|
20
21
|
export { default as Checkbox } from './checkbox/Checkbox.vue';
|
|
22
|
+
export { default as CustomColumn } from './customcolumn/CustomColumn.vue';
|
|
21
23
|
export { default as DataTable } from './datatable/DataTable.vue';
|
|
22
24
|
export { default as Dialog } from './dialog/Dialog.vue';
|
|
23
25
|
export { default as DialogConfirm } from './dialogconfirm/DialogConfirm.vue';
|
|
@@ -56,6 +58,7 @@ export { default as Toast } from './toast/Toast.vue';
|
|
|
56
58
|
export { default as ToggleSwitch } from './toggleswitch/ToggleSwitch.vue';
|
|
57
59
|
export { default as Tree } from './tree/Tree.vue';
|
|
58
60
|
export { default as UserName } from './username/UserName.vue';
|
|
61
|
+
export { default as ValidatorMessage } from './validatormessage/ValidatorMessage.vue';
|
|
59
62
|
|
|
60
63
|
export { default as AssetInfo } from './assetinfo/AssetInfo.vue';
|
|
61
64
|
export { default as ButtonAddByScan } from './buttonaddbyscan/ButtonAddByScan.vue';
|
|
@@ -67,8 +70,14 @@ export { default as UserWithIcon } from './userwithicon/UserWithIcon.vue';
|
|
|
67
70
|
export { default as FilterContainer } from './filtercontainer/FilterContainer.vue';
|
|
68
71
|
export { default as InputSearch } from './inputsearch/InputSearch.vue';
|
|
69
72
|
export { default as TransactionRoles } from './transactionroles/TransactionRoles.vue';
|
|
73
|
+
export { default as DatePicker } from './datepicker/DatePicker.vue';
|
|
74
|
+
export { default as DayPicker } from './daypicker/DayPicker.vue';
|
|
70
75
|
export { default as DialogPrintQR } from './dialogprintqr/DialogPrintQR.vue';
|
|
71
76
|
export { default as DialogAssetNameDetail } from './dialogassetnamedetail/DialogAssetNameDetail.vue';
|
|
72
77
|
export { default as DialogReportTag } from './dialogreporttag/DialogReportTag.vue';
|
|
73
78
|
export { default as DialogReportDamage } from './dialogreportdamage/DialogReportDamage.vue';
|
|
74
79
|
export { default as DialogReportMissing } from './dialogreportmissing/DialogReportMissing.vue';
|
|
80
|
+
export { default as DialogTransferLog } from './dialogtransferlog/DialogTransferLog.vue';
|
|
81
|
+
export { default as DialogDamageLog } from './dialogdamagelog/DialogDamageLog.vue';
|
|
82
|
+
export { default as DisposalReport } from './disposalreport/DisposalReport.vue';
|
|
83
|
+
export { default as Steps } from './steps/Steps.vue';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ClassComponent } from '../../components/ts-helpers.d';
|
|
2
|
+
|
|
3
|
+
export type Step = {
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export interface StepsProps {
|
|
8
|
+
/**
|
|
9
|
+
* List of step object or label.
|
|
10
|
+
*/
|
|
11
|
+
steps: Step[] | string[] | (string | Step)[];
|
|
12
|
+
/**
|
|
13
|
+
* The current active step start from 1.
|
|
14
|
+
*/
|
|
15
|
+
currentStep: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class Steps extends ClassComponent<StepsProps, unknown, unknown> {}
|
|
19
|
+
|
|
20
|
+
export default Steps;
|
|
@@ -81,3 +81,11 @@ export declare type PresetMethodOptions = {
|
|
|
81
81
|
export declare type PresetOptionMethodType<Opt = PresetMethodOptions> = (
|
|
82
82
|
options: Partial<Opt>,
|
|
83
83
|
) => PresetAttributes;
|
|
84
|
+
|
|
85
|
+
export type StringKeyOf<T> = Extract<keyof T, string>;
|
|
86
|
+
|
|
87
|
+
declare const TypeException: unique symbol;
|
|
88
|
+
|
|
89
|
+
export type TypeError<T extends string> = {
|
|
90
|
+
[TypeException]: T;
|
|
91
|
+
};
|
|
@@ -30,7 +30,7 @@ export interface UserNameComponentConfigs {
|
|
|
30
30
|
/**
|
|
31
31
|
* @example `/tim-member/member/{userId}/detail-member`
|
|
32
32
|
*/
|
|
33
|
-
detailUserPath
|
|
33
|
+
detailUserPath?: string;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* @default 'picture' - Show user profile picture instead of user icon
|
|
@@ -42,6 +42,11 @@ export interface UserNameComponentConfigs {
|
|
|
42
42
|
* @default true
|
|
43
43
|
*/
|
|
44
44
|
showUserName?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to shorten the user's name..
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
formatUserName?: boolean;
|
|
45
50
|
/**
|
|
46
51
|
* Specify the field of user to be used as display name
|
|
47
52
|
*
|
|
@@ -60,7 +65,7 @@ export interface UserNameComponentConfigs {
|
|
|
60
65
|
* @param userId The user id
|
|
61
66
|
* @returns Full user detail object
|
|
62
67
|
*/
|
|
63
|
-
getUserDetail
|
|
68
|
+
getUserDetail?: (
|
|
64
69
|
userId: string,
|
|
65
70
|
) => UserNameProps['user'] | Promise<UserNameProps['user']>;
|
|
66
71
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface ValidatorMessageProps {
|
|
4
|
+
/**
|
|
5
|
+
* Shows validator message if message exist.
|
|
6
|
+
*/
|
|
7
|
+
message?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare const ValidatorMessage: DefineComponent<ValidatorMessageProps>;
|
|
11
|
+
|
|
12
|
+
export default ValidatorMessage;
|
package/event-bus/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ToastParams } from '../utils/toast.util';
|
|
|
4
4
|
export type TableEvent = {
|
|
5
5
|
tableName?: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type PredefinedEvents = {
|
|
8
8
|
'data-table:apply-filter': TableEvent & {
|
|
9
9
|
filter: QueryParams;
|
|
10
10
|
};
|
|
@@ -58,6 +58,9 @@ export type Events<CustomEvents = Record<string, any>> = CustomEvents & {
|
|
|
58
58
|
overlayId: number;
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
export type Events<CustomEvents = undefined> = CustomEvents extends undefined
|
|
62
|
+
? PredefinedEvents
|
|
63
|
+
: CustomEvents & PredefinedEvents;
|
|
64
|
+
declare const eventBus: Emitter<PredefinedEvents>;
|
|
62
65
|
export declare const extendEventBus: <T>() => Emitter<Events<T>>;
|
|
63
66
|
export default eventBus;
|