@fewangsit/wangsvue-fats 1.0.0-alpha.98 → 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.
Files changed (36) hide show
  1. package/components/assetinfo/AssetInfo.vue.d.ts +5 -0
  2. package/components/buttondownload/ButtonDownload.vue.d.ts +31 -0
  3. package/components/carousel/Carousel.vue.d.ts +28 -0
  4. package/components/datatable/DataTable.vue.d.ts +2 -0
  5. package/components/datepicker/DatePicker.vue.d.ts +52 -0
  6. package/components/daypicker/DayPicker.vue.d.ts +52 -0
  7. package/components/dialogconfirm/DialogConfirm.vue.d.ts +1 -1
  8. package/components/dialogtransferlog/DialogTransferLog.vue.d.ts +16 -0
  9. package/components/dropdown/Dropdown.vue.d.ts +5 -0
  10. package/components/fieldwrapper/FieldWrapper.vue.d.ts +7 -0
  11. package/components/filtercontainer/FilterContainer.vue.d.ts +96 -65
  12. package/components/form/Form.vue.d.ts +2 -0
  13. package/components/icon/Icon.vue.d.ts +1 -0
  14. package/components/imagecompressor/ImageCompressor.vue.d.ts +8 -0
  15. package/components/index.d.ts +10 -0
  16. package/components/inputotp/InputOtp.vue.d.ts +3 -0
  17. package/components/steps/Steps.vue.d.ts +20 -0
  18. package/components/tabmenu/TabMenu.vue.d.ts +2 -2
  19. package/components/ts-helpers.d.ts +8 -0
  20. package/components/username/UserName.vue.d.ts +7 -2
  21. package/components/validatormessage/ValidatorMessage.vue.d.ts +12 -0
  22. package/event-bus/index.d.ts +5 -2
  23. package/package.json +15 -8
  24. package/plugins/WangsVue.d.ts +10 -0
  25. package/plugins/formValidation.d.ts +1 -0
  26. package/stats.html +1 -1
  27. package/style.css +1 -1
  28. package/utils/exportToExcel.util.d.ts +27 -0
  29. package/utils/getStatusSeverity.util.d.ts +33 -0
  30. package/utils/index.d.ts +4 -2
  31. package/utils/isBasic.util.d.ts +1 -0
  32. package/utils/role.util.d.ts +2 -0
  33. package/utils/xlsx.util.d.ts +19 -0
  34. package/wangsvue-fats.js +18731 -17662
  35. package/wangsvue-fats.system.js +72 -71
  36. package/utils/getSeverityByAssetStatus.util.d.ts +0 -3
@@ -22,6 +22,11 @@ export interface AssetInfoProps {
22
22
  * @default true
23
23
  */
24
24
  useNfc?: boolean;
25
+
26
+ /**
27
+ * @default true
28
+ */
29
+ useTagType?: boolean;
25
30
  }
26
31
 
27
32
  declare class AssetInfo extends ClassComponent<
@@ -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
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
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;
@@ -249,6 +249,11 @@ export type DropdownEmits = {
249
249
  * Emits when overlay shown.
250
250
  */
251
251
  'show': [];
252
+
253
+ /**
254
+ * Emits when the Field Info icon is clicked.
255
+ */
256
+ 'fieldInfoClick': [];
252
257
  };
253
258
 
254
259
  /**
@@ -76,4 +76,11 @@ declare class FieldWrapper extends ClassComponent<
76
76
  unknown
77
77
  > {}
78
78
 
79
+ export type FieldWrapperEmits = {
80
+ /**
81
+ * Emitted when the information (tooltip) is clicked.
82
+ */
83
+ infoClick: [];
84
+ };
85
+
79
86
  export default FieldWrapper;
@@ -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
- // More specific filter field types
27
- export interface MultiSelectFilterField extends MultiSelectProps {
28
- type: 'multiselect';
28
+ type BaseSelectField<OptionsQueryParams extends QueryParams> = {
29
29
  /**
30
- * The name of the field this filter applies to.
30
+ * Represents a function type for fetching options based on query parameters.
31
31
  *
32
- * When using a static filter, it also specifies the field in the data to be used for generating unique options.
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
- * When using a static filter, it also specifies the field in the data to be used for generating unique options.
50
- * For example, if filtering by a user's full name, the field could be 'user.fullName', which will extract
51
- * unique full names from the table data and use them as filter options.
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
- * @example ['minAge', 'maxAge']
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
- fields?: string[];
45
+ fetchOptionFn?(
46
+ args: OptionsQueryParams,
47
+ ): Option[] | Promise<Option[]> | Promise<AxiosResponse<FetchOptionResponse>>;
69
48
 
70
- /**
71
- * Specify single field for both min and max input.
72
- * The value will be a number array.
73
- *
74
- * Prever use this property when you are working with Static Filtering
75
- *
76
- * @example value: [1000,5000] or equal to 'value.0': 1000 & 'value.1': 5000
77
- */
78
- field?: string;
79
- tooltip?: string;
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
- export interface ButtonSelectTreeFilterField
83
- extends Omit<ButtonSelectTreeProps, 'type' | 'label' | 'fieldLabel'> {
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: string; // The name of the field this filter applies to
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?: QueryParams; // Override QueryParams for the fetchTree
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 = ButtonSelectTreeFilterField;
114
+ export type AdditionalFilterField<Field extends string = string> =
115
+ ButtonSelectTreeFilterField<Field>;
104
116
 
105
- export type FilterField =
106
- | AdditionalFilterField
107
- | MultiSelectFilterField
108
- | DropdownFilterField
109
- | RangeNumberFilterField
110
- | CalendarFilterField;
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
  */
@@ -306,6 +306,8 @@ declare class Form extends ClassComponent<FormProps, FormSlots, FormEmits> {
306
306
  * The form values
307
307
  */
308
308
  values: GenericObject;
309
+
310
+ isSubmitClicked: boolean;
309
311
  }
310
312
 
311
313
  declare module '@vue/runtime-core' {
@@ -133,6 +133,7 @@ export type WangsIcons =
133
133
  | 'map-pin'
134
134
  | 'menu'
135
135
  | 'menu-unfold'
136
+ | 'mind-map'
136
137
  | 'minus'
137
138
  | 'money-cny-box'
138
139
  | 'money-dollar-circle'
@@ -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
  *
@@ -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';
@@ -34,6 +36,7 @@ export { default as InputBadge } from './inputbadge/InputBadge.vue';
34
36
  export { default as InputCurrency } from './inputcurrency/InputCurrency.vue';
35
37
  export { default as InputEmail } from './inputemail/InputEmail.vue';
36
38
  export { default as InputNumber } from './inputnumber/InputNumber.vue';
39
+ export { default as InputOtp } from './inputotp/InputOtp.vue';
37
40
  export { default as InputPassword } from './inputpassword/InputPassword.vue';
38
41
  export { default as InputPhoneNumber } from './inputphonenumber/InputPhoneNumber.vue';
39
42
  export { default as InputRangeNumber } from './inputrangenumber/InputRangeNumber.vue';
@@ -55,6 +58,7 @@ export { default as Toast } from './toast/Toast.vue';
55
58
  export { default as ToggleSwitch } from './toggleswitch/ToggleSwitch.vue';
56
59
  export { default as Tree } from './tree/Tree.vue';
57
60
  export { default as UserName } from './username/UserName.vue';
61
+ export { default as ValidatorMessage } from './validatormessage/ValidatorMessage.vue';
58
62
 
59
63
  export { default as AssetInfo } from './assetinfo/AssetInfo.vue';
60
64
  export { default as ButtonAddByScan } from './buttonaddbyscan/ButtonAddByScan.vue';
@@ -66,8 +70,14 @@ export { default as UserWithIcon } from './userwithicon/UserWithIcon.vue';
66
70
  export { default as FilterContainer } from './filtercontainer/FilterContainer.vue';
67
71
  export { default as InputSearch } from './inputsearch/InputSearch.vue';
68
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';
69
75
  export { default as DialogPrintQR } from './dialogprintqr/DialogPrintQR.vue';
70
76
  export { default as DialogAssetNameDetail } from './dialogassetnamedetail/DialogAssetNameDetail.vue';
71
77
  export { default as DialogReportTag } from './dialogreporttag/DialogReportTag.vue';
72
78
  export { default as DialogReportDamage } from './dialogreportdamage/DialogReportDamage.vue';
73
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,3 @@
1
+ import { WangsInputOtp } from '@wangs-ui/vue';
2
+
3
+ export default WangsInputOtp;
@@ -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;
@@ -9,8 +9,8 @@
9
9
  */
10
10
 
11
11
  import { TabMenuProps as WangsUITabMenuProps } from '@wangs-ui/core';
12
+ import { MenuItem } from '@wangs-ui/core/dist/types/components/menuitem/menuitem.type';
12
13
 
13
- import { MenuItem } from '../menuitem';
14
14
  import { ClassComponent } from '../ts-helpers';
15
15
 
16
16
  /**
@@ -58,7 +58,7 @@ export interface TabMenuProps extends WangsUITabMenuProps {
58
58
  * Defines type of TabMenu.
59
59
  * @defaultValue 'tab'
60
60
  */
61
- type?: 'tab' | 'pill';
61
+ type?: 'tab' | 'pill' | 'segmented';
62
62
  /**
63
63
  * Active index of menuitem.
64
64
  * @defaultValue 0
@@ -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: string;
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;