@fewangsit/wangsvue-fats 1.0.0-alpha.14 → 1.0.0-alpha.140
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/animation/Animation.vue.d.ts +9 -1
- package/components/assetinfo/AssetInfo.vue.d.ts +44 -0
- package/components/badgegroup/BadgeGroup.vue.d.ts +3 -1
- package/components/basetree/BaseTree.vue.d.ts +6 -1
- package/components/button/Button.vue.d.ts +3 -2
- package/components/buttonaddbyscan/ButtonAddByScan.vue.d.ts +40 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +1 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +1 -0
- package/components/buttonscan/ButtonScan.vue.d.ts +3 -2
- package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +46 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +2 -1
- package/components/buttonsplit/ButtonSplit.vue.d.ts +352 -34
- package/components/buttonsync/ButtonSync.vue.d.ts +13 -1
- package/components/buttontoggle/ButtonToggle.vue.d.ts +1 -0
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
- package/components/calendar/Calendar.vue.d.ts +32 -4
- package/components/card/Card.vue.d.ts +1 -0
- package/components/carousel/Carousel.vue.d.ts +28 -0
- package/components/checkbox/Checkbox.vue.d.ts +1 -0
- package/components/datatable/DataTable.vue.d.ts +12 -4
- package/components/dialog/Dialog.vue.d.ts +4 -3
- package/components/dialogassetnamedetail/DialogAssetNameDetail.vue.d.ts +46 -0
- package/components/dialogassetnamedetail/options/columns.d.ts +2 -0
- package/components/dialogassetnamedetail/options/filter.d.ts +2 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +2 -1
- package/components/dialogform/DialogForm.vue.d.ts +3 -2
- package/components/dialoglinkedasset/DialogLinkedAsset.vue.d.ts +106 -0
- package/components/dialogprintqr/DialogPrintQR.vue.d.ts +18 -0
- package/components/dialogreportdamage/DialogReportDamage.vue.d.ts +34 -0
- package/components/dialogreportmissing/DialogReportMissing.vue.d.ts +33 -0
- package/components/dialogreporttag/DialogReportTag.vue.d.ts +31 -0
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +3 -2
- package/components/dialogselectuser/DialogSelectUser.vue.d.ts +102 -0
- package/components/dialogselectuser/options/columns.d.ts +3 -0
- package/components/dialogtransferlog/DialogTransferLog.vue.d.ts +16 -0
- package/components/dropdown/Dropdown.vue.d.ts +28 -4
- package/components/editor/Editor.vue.d.ts +1 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +19 -2
- package/components/fileupload/FileUpload.vue.d.ts +1 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +104 -69
- package/components/form/Form.vue.d.ts +4 -1
- package/components/icon/Icon.vue.d.ts +4 -0
- package/components/image/Image.vue.d.ts +8 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +14 -0
- package/components/index.d.ts +34 -21
- package/components/inputcurrency/helpers/currency.helper.d.ts +5 -1
- package/components/inputemail/InputEmail.vue.d.ts +1 -0
- package/components/inputnumber/InputNumber.vue.d.ts +6 -0
- package/components/inputotp/InputOtp.vue.d.ts +3 -0
- package/components/inputpassword/InputPassword.vue.d.ts +1 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +1 -0
- package/components/inputsearch/InputSearch.vue.d.ts +7 -1
- package/components/inputtext/InputText.vue.d.ts +2 -1
- package/components/inputurl/InputURL.vue.d.ts +4 -2
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -36
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +5 -19
- package/components/litedropdown/LiteDropdown.vue.d.ts +5 -3
- package/components/loading/store/loading.store.d.ts +3 -3
- package/components/menu/Menu.vue.d.ts +2 -1
- package/components/multiselect/MultiSelect.vue.d.ts +7 -4
- package/components/overlaypanel/OverlayPanel.vue.d.ts +1 -0
- package/components/paginator/Paginator.vue.d.ts +285 -0
- package/components/steps/Steps.vue.d.ts +20 -0
- package/components/tabmenu/TabMenu.vue.d.ts +7 -191
- package/components/tagtype/TagType.vue.d.ts +26 -0
- package/components/textarea/Textarea.vue.d.ts +2 -1
- package/components/timeline/Timeline.vue.d.ts +21 -2
- package/components/toast/Toast.vue.d.ts +2 -1
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +1 -0
- package/components/transactionroles/TransactionRoles.vue.d.ts +58 -0
- package/components/tree/Tree.vue.d.ts +6 -3
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +8 -2
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +3 -1
- package/components/ts-helpers.d.ts +8 -0
- package/components/username/UserName.vue.d.ts +6 -1
- package/components/userwithicon/UserWithIcon.vue.d.ts +21 -0
- package/config/defaultProps.d.ts +1 -1
- package/config/index.d.ts +1 -1
- package/config/locale.d.ts +1 -1
- package/directives/focus.d.ts +1 -1
- package/event-bus/index.d.ts +59 -53
- package/event-bus/mitt.d.ts +29 -14
- package/loading-page-BKLGrwQz.js +1 -0
- package/loading-page-fUogn1yP.js +1 -0
- package/loading-page-vGlJdJXh.js +1 -0
- package/loading-plane-BKLGrwQz.js +1 -0
- package/loading-table-15LLi35m.js +1 -0
- package/loading-table-CN9d0zPh.js +1 -0
- package/loading-table-Crgp9X_l.js +1 -0
- package/main.d.ts +34 -2
- package/no-data-CA5oLyk_.js +1 -0
- package/no-data-DPErfTY5.js +1 -0
- package/no-data-DcQXm3zT.js +1 -0
- package/package.json +16 -8
- package/plugins/VueHtmlToPaper.d.ts +11 -0
- package/plugins/WangsVue.d.ts +272 -98
- package/plugins/formValidation.d.ts +16 -6
- package/plugins/i18n-extension.d.ts +1 -1
- package/plugins/i18n.d.ts +90 -67
- package/stats.html +4949 -0
- package/style.css +1 -1
- package/utils/date.util.d.ts +64 -31
- package/utils/exportToExcel.util.d.ts +7 -14
- package/utils/formatTagCode.util.d.ts +1 -0
- package/utils/getStatusSeverity.util.d.ts +27 -0
- package/utils/index.d.ts +8 -21
- package/utils/isBasic.util.d.ts +1 -0
- package/utils/listenSidebarChanges.util.d.ts +14 -9
- package/utils/object.util.d.ts +14 -3
- package/utils/role.util.d.ts +63 -26
- package/utils/toast.util.d.ts +78 -78
- package/utils/xlsx.util.d.ts +19 -0
- package/wangsvue-fats.js +56922 -0
- package/wangsvue-fats.system.js +199 -281
- package/wangsvue-fats.umd.cjs +427 -0
- package/assets/json/currencies.json.d.ts +0 -1068
- package/assets/lottie/admin/loading-page.lottie +0 -0
- package/assets/lottie/admin/loading-table.lottie +0 -0
- package/assets/lottie/admin/no-data.lottie +0 -0
- package/assets/lottie/supplyasset/loading-page.lottie +0 -0
- package/assets/lottie/supplyasset/loading-table.lottie +0 -0
- package/assets/lottie/supplyasset/no-data.lottie +0 -0
- package/assets/lottie/workspace/loading-page.lottie +0 -0
- package/assets/lottie/workspace/loading-plane.lottie +0 -0
- package/assets/lottie/workspace/loading-table.lottie +0 -0
- package/assets/lottie/workspace/no-data.lottie +0 -0
- package/build-entry.d.ts +0 -14
- package/components/buttonscan/helpers/getErrorCode.helper.d.ts +0 -3
- package/components/buttonscan/helpers/index.d.ts +0 -1
- package/components/buttonscan/workers/scanner.worker.d.ts +0 -1
- package/components/buttonsplit/ButtonSplit.d.ts +0 -350
- package/components/calendar/BaseCalendar.vue.d.ts +0 -86
- package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
- package/components/customcolumn/ColumnList.vue.d.ts +0 -27
- package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
- package/components/datatable/MultiRow.vue.d.ts +0 -16
- package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
- package/components/datatable/helpers/filter.helper.d.ts +0 -28
- package/components/datatable/helpers/index.d.ts +0 -3
- package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
- package/components/datatable/store/dataTable.store.d.ts +0 -22
- package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
- package/components/editor/EditorButton.vue.d.ts +0 -15
- package/components/editor/MentionList.vue.d.ts +0 -35
- package/components/editor/MentionSection.vue.d.ts +0 -92
- package/components/editor/codeSnippetExtension.d.ts +0 -3
- package/components/editor/mentionSectionExtension.d.ts +0 -3
- package/components/editor/suggestion.d.ts +0 -2
- package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -5
- package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
- package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
- package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
- package/components/hardwaresync/store/device.store.d.ts +0 -36
- package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
- package/components/helpers/index.d.ts +0 -2
- package/components/helpers/label.d.ts +0 -15
- package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
- package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -30
- package/components/inputgroup/InputGroup.vue.d.ts +0 -141
- package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
- package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
- package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
- package/components/menu/helpers/index.d.ts +0 -1
- package/components/menuitem/MenuItem.vue.d.ts +0 -19
- package/components/progressbar/ProgressBar.vue.d.ts +0 -72
- package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
- package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
- package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
- package/components/tree/helpers/index.d.ts +0 -3
- package/components/usergroup/UserGroup.vue.d.ts +0 -57
- package/components/validatormessage/ValidatorMessage.vue.d.ts +0 -12
- package/loading-page-BrQattYE.js +0 -1
- package/loading-page-CgfbWppy.js +0 -1
- package/loading-page-DbLuqCHa.js +0 -1
- package/loading-plane-CgfbWppy.js +0 -1
- package/loading-table-Bdr9ZhtP.js +0 -1
- package/loading-table-BzrSQlA0.js +0 -1
- package/loading-table-chOgXi94.js +0 -1
- package/no-data-Cgze_Rvp.js +0 -1
- package/no-data-Dep79CBh.js +0 -1
- package/no-data-y1X5WtcQ.js +0 -1
- package/types/options.type.d.ts +0 -16
- package/utils/addAttachment.util.d.ts +0 -43
- package/utils/filterOptions.util.d.ts +0 -3
- package/utils/genPlaceholder.util.d.ts +0 -8
- package/utils/getAttachmentIcon.util.d.ts +0 -8
- package/utils/mergePropsWithDefaults.util.d.ts +0 -20
- package/utils/textFormatter.util.d.ts +0 -17
- package/wangsvue-fats.es.js +0 -133530
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { Slot } from 'vue';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { BadgeProps } from '../../components/badge/Badge.vue.d';
|
|
4
|
+
import { WangsIcons } from '../../components/icon/Icon.vue.d';
|
|
5
|
+
|
|
3
6
|
import { CustomValidation } from '../form/Form.vue.d';
|
|
4
7
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
5
|
-
|
|
8
|
+
|
|
9
|
+
export type OptionValue = string | number | boolean | Record<string, any>;
|
|
10
|
+
|
|
11
|
+
export type Option = {
|
|
12
|
+
label?: string;
|
|
13
|
+
value?: OptionValue;
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
icon?: WangsIcons;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
6
18
|
|
|
7
19
|
/**
|
|
8
20
|
* Configuration interface for localizing dropdown component placeholders and error messages.
|
|
@@ -77,7 +89,7 @@ export interface DropdownProps {
|
|
|
77
89
|
/**
|
|
78
90
|
* List of options to display.
|
|
79
91
|
*/
|
|
80
|
-
options?:
|
|
92
|
+
options?: Option[] | string[] | Record<string, any>;
|
|
81
93
|
|
|
82
94
|
/**
|
|
83
95
|
* Allows `null` to be treated as a valid selectable option in the dropdown.
|
|
@@ -208,11 +220,18 @@ export interface DropdownProps {
|
|
|
208
220
|
* @default 'Search'
|
|
209
221
|
*/
|
|
210
222
|
filterPlaceholder?: string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* To determine whether dropdown panel width should fit its max content or not
|
|
226
|
+
*
|
|
227
|
+
* @default false
|
|
228
|
+
*/
|
|
229
|
+
panelMaxContent?: boolean;
|
|
211
230
|
}
|
|
212
231
|
|
|
213
232
|
export interface DropdownSlots {
|
|
214
233
|
'value': Slot<{ value: string; originalValue: any }>;
|
|
215
|
-
'option': Slot<{ option:
|
|
234
|
+
'option': Slot<{ option: Option }>;
|
|
216
235
|
'addon-left': Slot;
|
|
217
236
|
'addon-right': Slot;
|
|
218
237
|
}
|
|
@@ -230,6 +249,11 @@ export type DropdownEmits = {
|
|
|
230
249
|
* Emits when overlay shown.
|
|
231
250
|
*/
|
|
232
251
|
'show': [];
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Emits when the Field Info icon is clicked.
|
|
255
|
+
*/
|
|
256
|
+
'fieldInfoClick': [];
|
|
233
257
|
};
|
|
234
258
|
|
|
235
259
|
/**
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Slot } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { ClassComponent } from '../ts-helpers';
|
|
2
4
|
|
|
3
5
|
export interface FieldWrapperLocaleConfig {
|
|
4
6
|
/**
|
|
@@ -64,6 +66,21 @@ export interface FieldWrapperProps {
|
|
|
64
66
|
tooltipPos?: 'top' | 'right' | 'bottom' | 'left';
|
|
65
67
|
}
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
export interface FieldWrapperSlots {
|
|
70
|
+
'label-addon': Slot;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare class FieldWrapper extends ClassComponent<
|
|
74
|
+
FieldWrapperProps,
|
|
75
|
+
FieldWrapperSlots,
|
|
76
|
+
unknown
|
|
77
|
+
> {}
|
|
78
|
+
|
|
79
|
+
export type FieldWrapperEmits = {
|
|
80
|
+
/**
|
|
81
|
+
* Emitted when the information (tooltip) is clicked.
|
|
82
|
+
*/
|
|
83
|
+
infoClick: [];
|
|
84
|
+
};
|
|
68
85
|
|
|
69
86
|
export default FieldWrapper;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { DefineComponent, Slot } from 'vue';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
DropdownProps,
|
|
6
|
+
Option,
|
|
7
|
+
} from '../../components/dropdown/Dropdown.vue.d';
|
|
8
|
+
|
|
9
|
+
import { ButtonSelectTreeProps } from '../buttonselecttree/ButtonSelectTree.vue.d';
|
|
3
10
|
import { CalendarProps } from '../calendar/Calendar.vue.d';
|
|
4
11
|
import { QueryParams } from '../datatable/DataTable.vue.d';
|
|
5
|
-
import { DropdownProps } from '../dropdown/Dropdown.vue.d';
|
|
6
12
|
import { InputRangeNumberProps } from '../inputrangenumber/InputRangeNumber.vue.d';
|
|
7
13
|
import { MultiSelectProps } from '../multiselect/MultiSelect.vue.d';
|
|
8
|
-
import {
|
|
14
|
+
import { StringKeyOf, TypeError } from '../ts-helpers';
|
|
9
15
|
|
|
10
16
|
export type FilterMatchMode =
|
|
11
17
|
| 'CONTAINS'
|
|
@@ -19,66 +25,76 @@ export type FilterMatchMode =
|
|
|
19
25
|
| 'BETWEEN'
|
|
20
26
|
| 'DATE_BETWEEN';
|
|
21
27
|
|
|
22
|
-
|
|
23
|
-
export interface MultiSelectFilterField extends MultiSelectProps {
|
|
24
|
-
type: 'multiselect';
|
|
28
|
+
type BaseSelectField<OptionsQueryParams extends QueryParams> = {
|
|
25
29
|
/**
|
|
26
|
-
*
|
|
30
|
+
* Represents a function type for fetching options based on query parameters.
|
|
27
31
|
*
|
|
28
|
-
*
|
|
29
|
-
* For example, if filtering by a user's full name, the field could be 'user.fullName', which will extract
|
|
30
|
-
* unique full names from the table data and use them as filter options.
|
|
31
|
-
*/
|
|
32
|
-
field: string;
|
|
33
|
-
optionField?: string; // @example - actionOptions
|
|
34
|
-
params?: QueryParams; // Additional QueryParams for the fetchOptionFn
|
|
35
|
-
fetchOptionFn?:
|
|
36
|
-
| ((args?: any) => MultiSelectOption[] | undefined) // Sync function to fetch options
|
|
37
|
-
| ((args?: any) => Promise<MultiSelectOption[] | undefined>); // Async function
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface DropdownFilterField extends DropdownProps {
|
|
41
|
-
type: 'dropdown';
|
|
42
|
-
/**
|
|
43
|
-
* The name of the field this filter applies to.
|
|
32
|
+
* @template T - The type of query parameters, extending `QueryParams`. Defaults to `any`.
|
|
44
33
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
field: string;
|
|
50
|
-
optionField?: string; // @example - actionOptions
|
|
51
|
-
params?: QueryParams; // Additional QueryParams for the fetchOptionFn
|
|
52
|
-
fetchOptionFn?:
|
|
53
|
-
| ((args?: any) => MultiSelectOption[] | undefined) // Sync function to fetch options
|
|
54
|
-
| ((args?: any) => Promise<MultiSelectOption[]> | undefined); // Async function
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface RangeNumberFilterField extends InputRangeNumberProps {
|
|
58
|
-
type: 'rangenumber';
|
|
59
|
-
/**
|
|
60
|
-
* 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.
|
|
61
38
|
*
|
|
62
|
-
* @
|
|
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.
|
|
63
44
|
*/
|
|
64
|
-
|
|
45
|
+
fetchOptionFn?(
|
|
46
|
+
args: OptionsQueryParams,
|
|
47
|
+
): Option[] | Promise<Option[]> | Promise<AxiosResponse<FetchOptionResponse>>;
|
|
65
48
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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';
|
|
76
63
|
}
|
|
77
64
|
|
|
78
|
-
|
|
79
|
-
|
|
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'> {
|
|
80
96
|
type: 'group' | 'category';
|
|
81
|
-
field:
|
|
97
|
+
field: Field; // The name of the field this filter applies to
|
|
82
98
|
/**
|
|
83
99
|
* The field label.
|
|
84
100
|
*/
|
|
@@ -88,26 +104,50 @@ export interface ButtonSelectTreeFilterField
|
|
|
88
104
|
* @default to Select Group|Category
|
|
89
105
|
*/
|
|
90
106
|
buttonLabel?: string;
|
|
91
|
-
params?:
|
|
107
|
+
params?: Params; // Override QueryParams for the fetchTree
|
|
92
108
|
}
|
|
93
109
|
|
|
94
110
|
export interface CalendarFilterField extends CalendarProps {
|
|
95
111
|
type: 'calendar';
|
|
96
|
-
field: string;
|
|
97
112
|
}
|
|
98
113
|
|
|
99
|
-
export type AdditionalFilterField =
|
|
114
|
+
export type AdditionalFilterField<Field extends string = string> =
|
|
115
|
+
ButtonSelectTreeFilterField<Field>;
|
|
100
116
|
|
|
101
|
-
export type
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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>>);
|
|
107
147
|
|
|
108
148
|
export type FilterOptions<Opt = Record<string, boolean>> = Record<
|
|
109
149
|
keyof Opt,
|
|
110
|
-
|
|
150
|
+
Option[]
|
|
111
151
|
>;
|
|
112
152
|
|
|
113
153
|
export type LoadingFilters = Record<string, boolean>;
|
|
@@ -146,11 +186,6 @@ export interface FilterContainerProps {
|
|
|
146
186
|
* Slots for FilterContainer component
|
|
147
187
|
*/
|
|
148
188
|
export type FilterContainerSlots = {
|
|
149
|
-
/**
|
|
150
|
-
* @deprecated Please use props.fields instead
|
|
151
|
-
*/
|
|
152
|
-
default: Slot;
|
|
153
|
-
|
|
154
189
|
/**
|
|
155
190
|
* Additional template for field.
|
|
156
191
|
*/
|
|
@@ -5,11 +5,12 @@ import {
|
|
|
5
5
|
MaybeArray,
|
|
6
6
|
} from 'vee-validate';
|
|
7
7
|
import { Ref, Slot } from 'vue';
|
|
8
|
+
|
|
8
9
|
import {
|
|
9
10
|
ClassComponent,
|
|
10
11
|
GlobalComponentConstructor,
|
|
11
|
-
Nullable,
|
|
12
12
|
HintedString,
|
|
13
|
+
Nullable,
|
|
13
14
|
} from '../ts-helpers';
|
|
14
15
|
|
|
15
16
|
export type Condition =
|
|
@@ -305,6 +306,8 @@ declare class Form extends ClassComponent<FormProps, FormSlots, FormEmits> {
|
|
|
305
306
|
* The form values
|
|
306
307
|
*/
|
|
307
308
|
values: GenericObject;
|
|
309
|
+
|
|
310
|
+
isSubmitClicked: boolean;
|
|
308
311
|
}
|
|
309
312
|
|
|
310
313
|
declare module '@vue/runtime-core' {
|
|
@@ -103,6 +103,7 @@ export type WangsIcons =
|
|
|
103
103
|
| 'filter'
|
|
104
104
|
| 'folder'
|
|
105
105
|
| 'folder-add-line'
|
|
106
|
+
| 'gate'
|
|
106
107
|
| 'group'
|
|
107
108
|
| 'hand-coin'
|
|
108
109
|
| 'handheld'
|
|
@@ -123,6 +124,7 @@ export type WangsIcons =
|
|
|
123
124
|
| 'link-unlink-m'
|
|
124
125
|
| 'list-settings'
|
|
125
126
|
| 'loader-4'
|
|
127
|
+
| 'lock-line'
|
|
126
128
|
| 'logout-box-r'
|
|
127
129
|
| 'mail-open'
|
|
128
130
|
| 'mail-send'
|
|
@@ -131,6 +133,7 @@ export type WangsIcons =
|
|
|
131
133
|
| 'map-pin'
|
|
132
134
|
| 'menu'
|
|
133
135
|
| 'menu-unfold'
|
|
136
|
+
| 'mind-map'
|
|
134
137
|
| 'minus'
|
|
135
138
|
| 'money-cny-box'
|
|
136
139
|
| 'money-dollar-circle'
|
|
@@ -151,6 +154,7 @@ export type WangsIcons =
|
|
|
151
154
|
| 'qr'
|
|
152
155
|
| 'qr-scan'
|
|
153
156
|
| 'reception'
|
|
157
|
+
| 'recycle-bin'
|
|
154
158
|
| 'refresh'
|
|
155
159
|
| 'replace-tag'
|
|
156
160
|
| 'report-tag'
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
11
|
import { TransitionProps, VNode } from 'vue';
|
|
12
|
+
|
|
12
13
|
import { ComponentHooks } from '../basecomponent';
|
|
13
14
|
import { PassThroughOptions } from '../passthrough';
|
|
14
15
|
import {
|
|
@@ -195,6 +196,13 @@ export interface ImageProps {
|
|
|
195
196
|
* The thumbnail image.
|
|
196
197
|
*/
|
|
197
198
|
src?: string | Blob;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Wether use preview full image functionality
|
|
202
|
+
*
|
|
203
|
+
* @default true
|
|
204
|
+
*/
|
|
205
|
+
preview?: boolean;
|
|
198
206
|
/**
|
|
199
207
|
* The thumbnail image width.
|
|
200
208
|
*
|
|
@@ -141,6 +141,12 @@ export interface ImageCompressorProps {
|
|
|
141
141
|
* @default true
|
|
142
142
|
*/
|
|
143
143
|
showInfo?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Change the requirements of the photo
|
|
146
|
+
*
|
|
147
|
+
* @default undefined - will use maxSizeRequirement, imageTypeRequirement from LocaleConfig
|
|
148
|
+
*/
|
|
149
|
+
customRequirements?: string[];
|
|
144
150
|
/**
|
|
145
151
|
* Show dialog confirmation before delete the image.
|
|
146
152
|
*/
|
|
@@ -162,6 +168,10 @@ export interface ImageCompressorProps {
|
|
|
162
168
|
* @default 'webp'
|
|
163
169
|
*/
|
|
164
170
|
fileType?: 'webp' | 'jpeg' | 'jpg';
|
|
171
|
+
/**
|
|
172
|
+
* @default normal
|
|
173
|
+
*/
|
|
174
|
+
type?: 'inline-table' | 'normal';
|
|
165
175
|
}
|
|
166
176
|
|
|
167
177
|
export interface ImageCompressorSlots {
|
|
@@ -178,6 +188,10 @@ export type ImageCompressorEmits = {
|
|
|
178
188
|
*/
|
|
179
189
|
'applyProp': [];
|
|
180
190
|
'update:defaultImage': [index?: number];
|
|
191
|
+
/**
|
|
192
|
+
* Emits on every changes in `field.value`
|
|
193
|
+
*/
|
|
194
|
+
'update:fieldValue': [value?: File[] | File];
|
|
181
195
|
/**
|
|
182
196
|
* On delete button clicked.
|
|
183
197
|
*
|
package/components/index.d.ts
CHANGED
|
@@ -1,66 +1,79 @@
|
|
|
1
|
-
export * from '.././components';
|
|
2
|
-
export { default as Animation } from './animation/Animation.vue';
|
|
3
1
|
export { default as ApproverInfo } from './approverinfo/ApproverInfo.vue';
|
|
4
2
|
export { default as Badge } from './badge/Badge.vue';
|
|
5
3
|
export { default as BadgeGroup } from './badgegroup/BadgeGroup.vue';
|
|
6
|
-
export { default as BaseTree } from '
|
|
4
|
+
export { default as BaseTree } from './basetree/BaseTree.vue';
|
|
7
5
|
export { default as Breadcrumb } from './breadcrumb/Breadcrumb.vue';
|
|
8
6
|
export { default as Button } from './button/Button.vue';
|
|
9
7
|
export { default as ButtonBulkAction } from './buttonbulkaction/ButtonBulkAction.vue';
|
|
10
8
|
export { default as ButtonCopy } from './buttoncopy/ButtonCopy.vue';
|
|
11
9
|
export { default as ButtonDownload } from './buttondownload/ButtonDownload.vue';
|
|
12
10
|
export { default as ButtonFilter } from './buttonfilter/ButtonFilter.vue';
|
|
13
|
-
export { default as ButtonImportExcel } from './buttonImportExcel/ButtonImportExcel.vue';
|
|
14
11
|
export { default as ButtonRadio } from './buttonradio/ButtonRadio.vue';
|
|
15
|
-
export { default as ButtonScan } from '
|
|
12
|
+
export { default as ButtonScan } from './buttonscan/ButtonScan.vue';
|
|
13
|
+
export { default as ButtonSearchByScan } from './buttonsearchbyscan/ButtonSearchByScan.vue';
|
|
16
14
|
export { default as ButtonSearch } from './buttonsearch/ButtonSearch.vue';
|
|
17
|
-
export { default as ButtonSelectTree } from '
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as ButtonSync } from '.././components/buttonsync/ButtonSync.vue';
|
|
15
|
+
export { default as ButtonSelectTree } from './buttonselecttree/ButtonSelectTree.vue';
|
|
16
|
+
export { default as ButtonSync } from './buttonsync/ButtonSync.vue';
|
|
20
17
|
export { default as ButtonToggle } from './buttontoggle/ButtonToggle.vue';
|
|
21
|
-
export { default as Calendar } from '
|
|
18
|
+
export { default as Calendar } from './calendar/Calendar.vue';
|
|
22
19
|
export { default as Card } from './card/Card.vue';
|
|
20
|
+
export { default as Carousel } from './carousel/Carousel.vue';
|
|
23
21
|
export { default as Checkbox } from './checkbox/Checkbox.vue';
|
|
24
|
-
export { default as CodeSnippet } from './codesnippet/CodeSnippet.vue';
|
|
25
22
|
export { default as DataTable } from './datatable/DataTable.vue';
|
|
26
23
|
export { default as Dialog } from './dialog/Dialog.vue';
|
|
27
24
|
export { default as DialogConfirm } from './dialogconfirm/DialogConfirm.vue';
|
|
28
25
|
export { default as DialogForm } from './dialogform/DialogForm.vue';
|
|
29
|
-
export { default as DialogSelectTree } from '
|
|
26
|
+
export { default as DialogSelectTree } from './dialogselecttree/DialogSelectTree.vue';
|
|
30
27
|
export { default as Dropdown } from './dropdown/Dropdown.vue';
|
|
31
|
-
export { default as Editor } from './editor/Editor.vue';
|
|
32
28
|
export { default as FileUpload } from './fileupload/FileUpload.vue';
|
|
33
|
-
export { default as FilterContainer } from './filtercontainer/FilterContainer.vue';
|
|
34
29
|
export { default as Form } from './form/Form.vue';
|
|
35
30
|
export { default as Icon } from './icon/Icon.vue';
|
|
36
31
|
export { default as Image } from './image/Image.vue';
|
|
37
32
|
export { default as ImageCompressor } from './imagecompressor/ImageCompressor.vue';
|
|
38
|
-
export { default as InlineMessage } from '
|
|
33
|
+
export { default as InlineMessage } from './inlinemessage/InlineMessage.vue';
|
|
39
34
|
export { default as InputBadge } from './inputbadge/InputBadge.vue';
|
|
40
35
|
export { default as InputCurrency } from './inputcurrency/InputCurrency.vue';
|
|
41
36
|
export { default as InputEmail } from './inputemail/InputEmail.vue';
|
|
42
37
|
export { default as InputNumber } from './inputnumber/InputNumber.vue';
|
|
38
|
+
export { default as InputOtp } from './inputotp/InputOtp.vue';
|
|
43
39
|
export { default as InputPassword } from './inputpassword/InputPassword.vue';
|
|
44
40
|
export { default as InputPhoneNumber } from './inputphonenumber/InputPhoneNumber.vue';
|
|
45
41
|
export { default as InputRangeNumber } from './inputrangenumber/InputRangeNumber.vue';
|
|
46
|
-
export { default as InputSearch } from './inputsearch/InputSearch.vue';
|
|
47
42
|
export { default as InputText } from './inputtext/InputText.vue';
|
|
48
43
|
export { default as InputURL } from './inputurl/InputURL.vue';
|
|
49
44
|
export { default as InvisibleField } from './invisiblefield/InvisibleField.vue';
|
|
50
|
-
export { default as LanguageDropdown } from './languagedropdown/LanguageDropdown.vue';
|
|
51
45
|
export { default as LiteDropdown } from './litedropdown/LiteDropdown.vue';
|
|
46
|
+
export { default as LanguageSwitcher } from './languageswitcher/LanguageSwitcher.vue';
|
|
52
47
|
export { default as Loading } from './loading/Loading.vue';
|
|
53
48
|
export { default as Menu } from './menu/Menu.vue';
|
|
54
49
|
export { default as MultiSelect } from './multiselect/MultiSelect.vue';
|
|
55
50
|
export { default as OverlayPanel } from './overlaypanel/OverlayPanel.vue';
|
|
56
|
-
export { default as
|
|
57
|
-
export { default as QuickFilter } from './quickfilter/QuickFilter.vue';
|
|
51
|
+
export { default as Paginator } from './paginator/Paginator.vue';
|
|
58
52
|
export { default as TabMenu } from './tabmenu/TabMenu.vue';
|
|
53
|
+
export { default as TagType } from './tagtype/TagType.vue';
|
|
59
54
|
export { default as Textarea } from './textarea/Textarea.vue';
|
|
60
55
|
export { default as Timeline } from './timeline/Timeline.vue';
|
|
61
56
|
export { default as Toast } from './toast/Toast.vue';
|
|
62
57
|
export { default as ToggleSwitch } from './toggleswitch/ToggleSwitch.vue';
|
|
63
|
-
export { default as
|
|
64
|
-
export { default as Tree } from '.././components/tree/Tree.vue';
|
|
65
|
-
export { default as UserGroup } from './usergroup/UserGroup.vue';
|
|
58
|
+
export { default as Tree } from './tree/Tree.vue';
|
|
66
59
|
export { default as UserName } from './username/UserName.vue';
|
|
60
|
+
|
|
61
|
+
export { default as AssetInfo } from './assetinfo/AssetInfo.vue';
|
|
62
|
+
export { default as ButtonAddByScan } from './buttonaddbyscan/ButtonAddByScan.vue';
|
|
63
|
+
export { default as ButtonSelectUser } from './buttonselectuser/ButtonSelectUser.vue';
|
|
64
|
+
export { default as ButtonViewLog } from './buttonviewlog/ButtonViewLog.vue';
|
|
65
|
+
export { default as DialogLinkedAsset } from './dialoglinkedasset/DialogLinkedAsset.vue';
|
|
66
|
+
export { default as DialogSelectUser } from './dialogselectuser/DialogSelectUser.vue';
|
|
67
|
+
export { default as UserWithIcon } from './userwithicon/UserWithIcon.vue';
|
|
68
|
+
export { default as FilterContainer } from './filtercontainer/FilterContainer.vue';
|
|
69
|
+
export { default as InputSearch } from './inputsearch/InputSearch.vue';
|
|
70
|
+
export { default as TransactionRoles } from './transactionroles/TransactionRoles.vue';
|
|
71
|
+
export { default as DialogPrintQR } from './dialogprintqr/DialogPrintQR.vue';
|
|
72
|
+
export { default as DialogAssetNameDetail } from './dialogassetnamedetail/DialogAssetNameDetail.vue';
|
|
73
|
+
export { default as DialogReportTag } from './dialogreporttag/DialogReportTag.vue';
|
|
74
|
+
export { default as DialogReportDamage } from './dialogreportdamage/DialogReportDamage.vue';
|
|
75
|
+
export { default as DialogReportMissing } from './dialogreportmissing/DialogReportMissing.vue';
|
|
76
|
+
export { default as DialogTransferLog } from './dialogtransferlog/DialogTransferLog.vue';
|
|
77
|
+
export { default as DialogDamageLog } from './dialogdamagelog/DialogDamageLog.vue';
|
|
78
|
+
export { default as DisposalReport } from './disposalreport/DisposalReport.vue';
|
|
79
|
+
export { default as Steps } from './steps/Steps.vue';
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { CurrencyFormat } from '../InputCurrency.vue.d';
|
|
2
2
|
declare const getCurrency: (code?: string) => CurrencyFormat;
|
|
3
|
-
declare const formatCurrency: (
|
|
3
|
+
declare const formatCurrency: (
|
|
4
|
+
value?: number | string | null,
|
|
5
|
+
currency?: string,
|
|
6
|
+
prefix?: boolean,
|
|
7
|
+
) => string;
|
|
4
8
|
export { getCurrency, formatCurrency };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DefineComponent, Slot } from 'vue';
|
|
2
|
+
|
|
2
3
|
import { CustomValidation } from '../form/Form.vue.d';
|
|
3
4
|
|
|
4
5
|
export type InputNumberEvent = number | string | undefined;
|
|
@@ -261,6 +262,11 @@ export type InputNumberEmits = {
|
|
|
261
262
|
export interface InputNumberSlots {
|
|
262
263
|
'addon-left': Slot;
|
|
263
264
|
'addon-right': Slot;
|
|
265
|
+
/**
|
|
266
|
+
* Slot for content in the right side of field label
|
|
267
|
+
*/
|
|
268
|
+
'field-label-addon': Slot;
|
|
269
|
+
'validatormessage': Slot;
|
|
264
270
|
}
|
|
265
271
|
|
|
266
272
|
/**
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ClassComponent,
|
|
3
|
+
GlobalComponentConstructor,
|
|
4
|
+
} from '../../components/ts-helpers';
|
|
5
|
+
|
|
2
6
|
export type InputSearchEmits = {
|
|
3
7
|
/**
|
|
4
8
|
* Emits when the Enter key is pressed.
|
|
@@ -28,3 +32,5 @@ declare module '@vue/runtime-core' {
|
|
|
28
32
|
InputSearch: GlobalComponentConstructor<InputSearch>;
|
|
29
33
|
}
|
|
30
34
|
}
|
|
35
|
+
|
|
36
|
+
export default InputSearch;
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import { InputHTMLAttributes, Slot } from 'vue';
|
|
11
|
+
|
|
11
12
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
-
import { ClassComponent, Nullable } from '../ts-helpers';
|
|
13
13
|
import { CustomValidation } from '../form/Form.vue.d';
|
|
14
|
+
import { ClassComponent, Nullable } from '../ts-helpers';
|
|
14
15
|
export declare type InputTextPassThroughOptionType<T = any> =
|
|
15
16
|
| InputTextPassThroughAttributes
|
|
16
17
|
| ((
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Slot } from 'vue';
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import {
|
|
4
4
|
InputTextEmits,
|
|
5
5
|
InputTextProps,
|
|
6
|
-
} from '
|
|
6
|
+
} from '../../components/inputtext/InputText.vue.d';
|
|
7
|
+
|
|
8
|
+
import { ClassComponent } from '../ts-helpers';
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* InputURL component props
|