@fewangsit/wangsvue-gsts 1.0.0-alpha.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/assets/json/currencies.json.d.ts +1068 -0
- package/assets/json/languages.json.d.ts +180 -0
- 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 +14 -0
- package/components/animation/Animation.vue.d.ts +24 -0
- package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
- package/components/badge/Badge.vue.d.ts +66 -0
- package/components/badgegroup/BadgeGroup.vue.d.ts +40 -0
- package/components/badgegrouptree/BadgeGroupTree.vue.d.ts +34 -0
- package/components/basecomponent/index.d.ts +28 -0
- package/components/basetree/BaseTree.vue.d.ts +567 -0
- package/components/basetree/TreeNode.vue.d.ts +35 -0
- package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
- package/components/button/Button.vue.d.ts +185 -0
- package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +26 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +97 -0
- package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
- package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
- package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +193 -0
- package/components/buttonsplit/ButtonSplit.d.ts +350 -0
- package/components/buttonsplit/ButtonSplit.vue.d.ts +34 -0
- package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
- package/components/calendar/BaseCalendar.vue.d.ts +83 -0
- package/components/calendar/Calendar.vue.d.ts +561 -0
- package/components/card/Card.vue.d.ts +139 -0
- package/components/changelog/Changelog.vue.d.ts +158 -0
- package/components/changelogpage/ChangelogFilter.vue.d.ts +16 -0
- package/components/changelogpage/ChangelogPage.vue.d.ts +124 -0
- package/components/checkbox/Checkbox.vue.d.ts +329 -0
- package/components/codesnippet/CodeSnippet.vue.d.ts +14 -0
- package/components/customcolumn/CustomColumn.vue.d.ts +35 -0
- package/components/datatable/DataTable.vue.d.ts +704 -0
- package/components/datatable/MultiRow.vue.d.ts +16 -0
- package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +1 -0
- package/components/datatable/helpers/filter.helper.d.ts +28 -0
- package/components/datatable/helpers/index.d.ts +3 -0
- package/components/datatable/helpers/readConfig.helper.d.ts +2 -0
- package/components/datatable/store/dataTable.store.d.ts +22 -0
- package/components/dialog/Dialog.vue.d.ts +464 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +153 -0
- package/components/dialogform/DialogForm.vue.d.ts +349 -0
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +111 -0
- package/components/dropdown/Dropdown.vue.d.ts +257 -0
- package/components/editor/CodeSnippetAdapter.vue.d.ts +92 -0
- package/components/editor/Editor.vue.d.ts +191 -0
- package/components/editor/EditorButton.vue.d.ts +15 -0
- package/components/editor/MentionList.vue.d.ts +35 -0
- package/components/editor/MentionSection.vue.d.ts +92 -0
- package/components/editor/codeSnippetExtension.d.ts +3 -0
- package/components/editor/mentionSectionExtension.d.ts +3 -0
- package/components/editor/suggestion.d.ts +2 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
- package/components/fileupload/FileUpload.vue.d.ts +153 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +141 -0
- package/components/filtercontainer/helpers/applyFilter.helper.d.ts +3 -0
- package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +7 -0
- package/components/filtercontainer/helpers/getOption.helper.d.ts +3 -0
- package/components/form/Form.vue.d.ts +306 -0
- package/components/gallerypreview/GalleryPreview.vue.d.ts +31 -0
- package/components/helpers/convertToArrayClass.helper.d.ts +2 -0
- package/components/helpers/index.d.ts +2 -0
- package/components/helpers/label.d.ts +15 -0
- package/components/icon/Icon.vue.d.ts +245 -0
- package/components/image/Image.vue.d.ts +403 -0
- package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +36 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +191 -0
- package/components/imagecompressor/ImageInputInfo.vue.d.ts +30 -0
- package/components/index.d.ts +66 -0
- package/components/inlinemessage/InlineMessage.vue.d.ts +167 -0
- package/components/inputbadge/InputBadge.vue.d.ts +122 -0
- package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
- package/components/inputcurrency/helpers/currency.helper.d.ts +4 -0
- package/components/inputemail/InputEmail.vue.d.ts +25 -0
- package/components/inputgroup/InputGroup.vue.d.ts +141 -0
- package/components/inputnumber/InputNumber.vue.d.ts +282 -0
- package/components/inputpassword/InputPassword.vue.d.ts +32 -0
- package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
- package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +8 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
- package/components/inputtext/InputText.vue.d.ts +352 -0
- package/components/inputurl/InputURL.vue.d.ts +39 -0
- package/components/invisiblefield/InvisibleField.vue.d.ts +36 -0
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +58 -0
- package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +18 -0
- package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
- package/components/loading/Loading.vue.d.ts +47 -0
- package/components/loading/store/loading.store.d.ts +8 -0
- package/components/menu/Menu.vue.d.ts +390 -0
- package/components/menu/helpers/filterMenu.helper.d.ts +12 -0
- package/components/menu/helpers/index.d.ts +1 -0
- package/components/menuitem/MenuItem.vue.d.ts +19 -0
- package/components/menuitem/index.d.ts +104 -0
- package/components/multiselect/MultiSelect.vue.d.ts +192 -0
- package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
- package/components/passthrough/index.d.ts +16 -0
- package/components/progressbar/ProgressBar.vue.d.ts +72 -0
- package/components/quickfilter/QuickFilter.vue.d.ts +25 -0
- package/components/tabmenu/TabMenu.vue.d.ts +288 -0
- package/components/tagtype/TagType.vue.d.ts +22 -0
- package/components/textarea/Textarea.vue.d.ts +170 -0
- package/components/timeline/Timeline.vue.d.ts +115 -0
- package/components/timeline/TimelineContentByType.vue.d.ts +16 -0
- package/components/toast/Toast.vue.d.ts +367 -0
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
- package/components/tooltipspan/TooltipSpan.vue.d.ts +20 -0
- package/components/tree/Tree.vue.d.ts +146 -0
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +16 -0
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +6 -0
- package/components/tree/helpers/index.d.ts +3 -0
- package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
- package/components/ts-helpers.d.ts +63 -0
- package/components/usergroup/UserGroup.vue.d.ts +57 -0
- package/components/username/UserName.vue.d.ts +61 -0
- package/components/validatormessage/ValidatorMessage.vue.d.ts +12 -0
- package/config/defaultProps.d.ts +3 -0
- package/config/index.d.ts +3 -0
- package/config/locale.d.ts +3 -0
- package/directives/focus.d.ts +7 -0
- package/directives/index.d.ts +1 -0
- package/event-bus/index.d.ts +55 -0
- package/event-bus/mitt.d.ts +26 -0
- package/loading-page-BrQattYE.js +1 -0
- package/loading-page-CgfbWppy.js +1 -0
- package/loading-page-CoC9UhfC.js +4 -0
- package/loading-page-CoXtqoc9.js +4 -0
- package/loading-page-DbLuqCHa.js +1 -0
- package/loading-page-f8D03l3G.js +4 -0
- package/loading-plane-CgfbWppy.js +1 -0
- package/loading-plane-CoXtqoc9.js +4 -0
- package/loading-table-Bb2MtjdD.js +4 -0
- package/loading-table-Br25QIny.js +1 -0
- package/loading-table-ByUoWqUo.js +4 -0
- package/loading-table-BygEMzFM.js +4 -0
- package/loading-table-BzrSQlA0.js +1 -0
- package/loading-table-chOgXi94.js +1 -0
- package/main.d.ts +2 -0
- package/no-data-CTKux8RI.js +4 -0
- package/no-data-Cgze_Rvp.js +1 -0
- package/no-data-DLHO1L_u.js +4 -0
- package/no-data-Dep79CBh.js +1 -0
- package/no-data-g0dJCy2p.js +4 -0
- package/no-data-y1X5WtcQ.js +1 -0
- package/package.json +16 -0
- package/plugins/WangsVue.d.ts +121 -0
- package/plugins/formValidation.d.ts +10 -0
- package/plugins/translation.d.ts +37 -0
- package/style.css +1 -0
- package/types/options.type.d.ts +16 -0
- package/utils/date.util.d.ts +37 -0
- package/utils/exportToExcel.util.d.ts +20 -0
- package/utils/filterOptions.util.d.ts +3 -0
- package/utils/genPlaceholder.util.d.ts +8 -0
- package/utils/getAttachmentIcon.util.d.ts +8 -0
- package/utils/getStatusSeverity.util.d.ts +3 -0
- package/utils/index.d.ts +18 -0
- package/utils/mergePropsWithDefaults.util.d.ts +20 -0
- package/utils/object.util.d.ts +9 -0
- package/utils/role.util.d.ts +2 -0
- package/utils/textFormatter.util.d.ts +17 -0
- package/utils/toast.util.d.ts +114 -0
- package/wangsvue-gsts.es.js +133347 -0
- package/wangsvue-gsts.system.js +454 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { CustomValidation } from '../form/Form.vue.d';
|
|
2
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
3
|
+
|
|
4
|
+
export type CurrencyFormat = {
|
|
5
|
+
name?: string;
|
|
6
|
+
label: string;
|
|
7
|
+
currency: string;
|
|
8
|
+
symbol: string;
|
|
9
|
+
locale: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export interface CurrencyValue {
|
|
13
|
+
currency: string; // Currency ISO Code
|
|
14
|
+
value?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Configuration interface for locale-specific settings of the InputCurrency component.
|
|
19
|
+
*/
|
|
20
|
+
export interface InputCurrencyLocaleConfig {
|
|
21
|
+
/**
|
|
22
|
+
* Error message to display when the input is empty.
|
|
23
|
+
*
|
|
24
|
+
* @example '{label} must not be empty' - 'Amount must not be empty'
|
|
25
|
+
*/
|
|
26
|
+
emptyInputErrorMessage?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* InputCurrency component props
|
|
31
|
+
*/
|
|
32
|
+
export interface InputCurrencyProps {
|
|
33
|
+
/**
|
|
34
|
+
* Number modelValue of the input.
|
|
35
|
+
*/
|
|
36
|
+
modelValue?: CurrencyValue;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sets the initial value of the field.
|
|
40
|
+
* This will only available with option 'useValidator'.
|
|
41
|
+
*
|
|
42
|
+
* In usecase like edit form, you need to display the previous inputted value.
|
|
43
|
+
*/
|
|
44
|
+
value?: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The input label. Tell the user what input is this.
|
|
48
|
+
*/
|
|
49
|
+
label?: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Max input number value.
|
|
53
|
+
*/
|
|
54
|
+
max?: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Wether the input should be validated with vee-validator or not.
|
|
58
|
+
* If you use this component within form input, you need to set this props as true.
|
|
59
|
+
*/
|
|
60
|
+
useValidator?: boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* This prop is required if you use this component in a form input.
|
|
64
|
+
* Specify the unique field name, match with your needs for API request.
|
|
65
|
+
*
|
|
66
|
+
* @default 'numberInput'
|
|
67
|
+
*/
|
|
68
|
+
fieldName?: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Wether this input field is required or not.
|
|
72
|
+
*/
|
|
73
|
+
mandatory?: boolean;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Set custom validator message.
|
|
77
|
+
* It is rarely use, this component has handled the validator message.
|
|
78
|
+
*
|
|
79
|
+
* @example: '{label} is required'
|
|
80
|
+
* @example: { empty: '{label} field is required' }
|
|
81
|
+
*/
|
|
82
|
+
validatorMessage?: string | CustomValidation<'empty'>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Custom invalid state.
|
|
86
|
+
*/
|
|
87
|
+
invalid?: boolean;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Specify the input placeholder.
|
|
91
|
+
*
|
|
92
|
+
* @default 'Enter {label}' or 'Enter number'
|
|
93
|
+
*/
|
|
94
|
+
placeholder?: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Disabled the input.
|
|
98
|
+
*/
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Displays increment/decrement buttons.
|
|
103
|
+
*/
|
|
104
|
+
showButtons?: boolean;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The width of input.
|
|
108
|
+
*/
|
|
109
|
+
size?: 'small' | 'normal' | 'full';
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Defines the behavior of the component.
|
|
113
|
+
* @defaultValue currency
|
|
114
|
+
*/
|
|
115
|
+
mode?: 'decimal' | 'currency';
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.
|
|
119
|
+
* @defaultValue true
|
|
120
|
+
*/
|
|
121
|
+
useGrouping?: boolean;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Show information about the field.
|
|
125
|
+
*/
|
|
126
|
+
fieldInfo?: string;
|
|
127
|
+
inputnNumberId?: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* InputCurrency component emits
|
|
132
|
+
*/
|
|
133
|
+
export type InputCurrencyEmits = {
|
|
134
|
+
/**
|
|
135
|
+
* Emits when the input has loosen focus.
|
|
136
|
+
* The model value is the valid value from given min and max number.
|
|
137
|
+
*
|
|
138
|
+
* If the inputted number is above max, return the max. And vice versa.
|
|
139
|
+
*/
|
|
140
|
+
'update:modelValue': [payload?: CurrencyValue];
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* If you need to check validation, you can use this events.
|
|
144
|
+
*/
|
|
145
|
+
'input': [payload?: number];
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* **WangsVue - InputCurrency**
|
|
150
|
+
*
|
|
151
|
+
* _Handle input Currency with form validation._
|
|
152
|
+
*
|
|
153
|
+
* --- ---
|
|
154
|
+
* 
|
|
155
|
+
*
|
|
156
|
+
* @group form
|
|
157
|
+
*/
|
|
158
|
+
declare class InputCurrency extends ClassComponent<
|
|
159
|
+
InputCurrencyProps,
|
|
160
|
+
unknown,
|
|
161
|
+
InputCurrencyEmits
|
|
162
|
+
> {}
|
|
163
|
+
|
|
164
|
+
declare module '@vue/runtime-core' {
|
|
165
|
+
interface GlobalComponents {
|
|
166
|
+
InputCurrency: GlobalComponentConstructor<InputCurrency>;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export default InputCurrency;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CurrencyFormat } from '../InputCurrency.vue.d';
|
|
2
|
+
declare const getCurrency: (code?: string) => CurrencyFormat;
|
|
3
|
+
declare const formatCurrency: (value?: number | string | null, currency?: string, prefix?: boolean) => string;
|
|
4
|
+
export { getCurrency, formatCurrency };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
import { InputTextEmits, InputTextProps } from '../inputtext/InputText.vue.d';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* InputEmail component props
|
|
6
|
+
*/
|
|
7
|
+
export type InputEmailProps = Omit<InputTextProps, 'type'>;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* InputEmail component emits
|
|
11
|
+
*/
|
|
12
|
+
export type InputEmailEmits = InputTextEmits;
|
|
13
|
+
/**
|
|
14
|
+
* **WangsVue - InputEmail**
|
|
15
|
+
*
|
|
16
|
+
* _Handle input email with form validation._
|
|
17
|
+
*
|
|
18
|
+
* --- ---
|
|
19
|
+
* 
|
|
20
|
+
*
|
|
21
|
+
* @group form
|
|
22
|
+
*/
|
|
23
|
+
declare const InputEmail: DefineComponent<InputEmailProps, InputEmailEmits>;
|
|
24
|
+
|
|
25
|
+
export default InputEmail;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* InputGroup displays text, icon, buttons and other content can be grouped next to an input.
|
|
4
|
+
*
|
|
5
|
+
* @module inputgroup
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import { VNode } from 'vue';
|
|
9
|
+
import { ComponentHooks } from '../basecomponent';
|
|
10
|
+
import { PassThroughOptions } from '../passthrough';
|
|
11
|
+
import {
|
|
12
|
+
ClassComponent,
|
|
13
|
+
GlobalComponentConstructor,
|
|
14
|
+
PassThrough,
|
|
15
|
+
} from '../ts-helpers';
|
|
16
|
+
|
|
17
|
+
export declare type InputGroupPassThroughOptionType =
|
|
18
|
+
| InputGroupPassThroughAttributes
|
|
19
|
+
| ((
|
|
20
|
+
options: InputGroupPassThroughMethodOptions,
|
|
21
|
+
) => InputGroupPassThroughAttributes | string)
|
|
22
|
+
| string
|
|
23
|
+
| null
|
|
24
|
+
| undefined;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Custom passthrough(pt) option method.
|
|
28
|
+
*/
|
|
29
|
+
export interface InputGroupPassThroughMethodOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Defines instance.
|
|
32
|
+
*/
|
|
33
|
+
instance: any;
|
|
34
|
+
/**
|
|
35
|
+
* Defines valid attributes.
|
|
36
|
+
*/
|
|
37
|
+
attrs: any;
|
|
38
|
+
/**
|
|
39
|
+
* Defines parent options.
|
|
40
|
+
*/
|
|
41
|
+
parent: any;
|
|
42
|
+
/**
|
|
43
|
+
* Defines passthrough(pt) options in global config.
|
|
44
|
+
*/
|
|
45
|
+
global: object | undefined;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Custom passthrough(pt) options.
|
|
50
|
+
* @see {@link InputGroupProps.pt}
|
|
51
|
+
*/
|
|
52
|
+
export interface InputGroupPassThroughOptions {
|
|
53
|
+
/**
|
|
54
|
+
* Used to pass attributes to the root's DOM element.
|
|
55
|
+
*/
|
|
56
|
+
root?: InputGroupPassThroughOptionType;
|
|
57
|
+
/**
|
|
58
|
+
* Used to manage all lifecycle hooks.
|
|
59
|
+
* @see {@link BaseComponent.ComponentHooks}
|
|
60
|
+
*/
|
|
61
|
+
hooks?: ComponentHooks;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Custom passthrough attributes for each DOM elements
|
|
66
|
+
*/
|
|
67
|
+
export interface InputGroupPassThroughAttributes {
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Defines valid properties in InputGroup component.
|
|
73
|
+
*/
|
|
74
|
+
export interface InputGroupProps {
|
|
75
|
+
/**
|
|
76
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
77
|
+
* @type {InputGroupPassThroughOptions}
|
|
78
|
+
*/
|
|
79
|
+
pt?: PassThrough<InputGroupPassThroughOptions>;
|
|
80
|
+
/**
|
|
81
|
+
* Used to configure passthrough(pt) options of the component.
|
|
82
|
+
* @type {PassThroughOptions}
|
|
83
|
+
*/
|
|
84
|
+
ptOptions?: PassThroughOptions;
|
|
85
|
+
/**
|
|
86
|
+
* @default default
|
|
87
|
+
*/
|
|
88
|
+
ring?: 'none' | 'default';
|
|
89
|
+
/**
|
|
90
|
+
* When enabled, it removes component related styles in the core.
|
|
91
|
+
* @defaultValue false
|
|
92
|
+
*/
|
|
93
|
+
unstyled?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* @defaultValue false
|
|
96
|
+
*/
|
|
97
|
+
invalid?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* @defaultValue false
|
|
100
|
+
*/
|
|
101
|
+
disabled?: boolean;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Defines valid slots in InputGroup component.
|
|
106
|
+
*/
|
|
107
|
+
export interface InputGroupSlots {
|
|
108
|
+
/**
|
|
109
|
+
* Custom default template.
|
|
110
|
+
*/
|
|
111
|
+
default(): VNode[];
|
|
112
|
+
/**
|
|
113
|
+
* Dynamic content template.
|
|
114
|
+
* @todo
|
|
115
|
+
*/
|
|
116
|
+
[key: string]: (node: any) => VNode[];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* **WangsVue - InputGroup**
|
|
121
|
+
*
|
|
122
|
+
* _InputGroup displays text, icon, buttons and other content can be grouped next to an input._
|
|
123
|
+
*
|
|
124
|
+
* --- ---
|
|
125
|
+
* 
|
|
126
|
+
*
|
|
127
|
+
* @group Component
|
|
128
|
+
*/
|
|
129
|
+
declare class InputGroup extends ClassComponent<
|
|
130
|
+
InputGroupProps,
|
|
131
|
+
InputGroupSlots,
|
|
132
|
+
unknown
|
|
133
|
+
> {}
|
|
134
|
+
|
|
135
|
+
declare module '@vue/runtime-core' {
|
|
136
|
+
interface GlobalComponents {
|
|
137
|
+
InputGroup: GlobalComponentConstructor<InputGroup>;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export default InputGroup;
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { DefineComponent, Slot } from 'vue';
|
|
2
|
+
import { CustomValidation } from '../form/Form.vue.d';
|
|
3
|
+
|
|
4
|
+
export type InputNumberEvent = number | string | undefined;
|
|
5
|
+
|
|
6
|
+
export interface InputNumberLocaleConfig {
|
|
7
|
+
/**
|
|
8
|
+
* @example 'Tulis {label}' - label can be ommited, and if exist will be replaced with props.label
|
|
9
|
+
*/
|
|
10
|
+
defaultPlaceholder?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @example '{label} sudah ada' - label will be replaced with props.label
|
|
14
|
+
*/
|
|
15
|
+
alreadyExistInvalidText?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @example '{label} must not be empty' - label will be replaced with props.label
|
|
19
|
+
*/
|
|
20
|
+
emptyInvalidText?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* InputNumber component props
|
|
25
|
+
*/
|
|
26
|
+
export interface InputNumberProps {
|
|
27
|
+
/**
|
|
28
|
+
* Number modelValue of the input.
|
|
29
|
+
*/
|
|
30
|
+
modelValue?: number;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Sets the initial value of the field.
|
|
34
|
+
* This will only available with option 'useValidator'.
|
|
35
|
+
*
|
|
36
|
+
* In use case like edit form, you need to display the previous inputted value.
|
|
37
|
+
*/
|
|
38
|
+
value?: number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Existing values to be checked with validation 'exist' - check the validatorMessage props
|
|
42
|
+
*
|
|
43
|
+
* - Need to specify the custom validation : { empty: 'Error message when empty' } within props validatorMessage
|
|
44
|
+
*/
|
|
45
|
+
existingValues?: number[];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The input label. Tell the user what input is this.
|
|
49
|
+
*/
|
|
50
|
+
label?: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Min input number value.
|
|
54
|
+
*/
|
|
55
|
+
min?: number;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Max input number value.
|
|
59
|
+
*/
|
|
60
|
+
max?: number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The maximum input length.
|
|
64
|
+
*
|
|
65
|
+
* @default 16 digit number
|
|
66
|
+
*/
|
|
67
|
+
maxDigit?: number;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Set the pad start of value.
|
|
71
|
+
*
|
|
72
|
+
* Insert '0' in the front of value
|
|
73
|
+
* @default 1
|
|
74
|
+
*/
|
|
75
|
+
padStart?: number;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Weather the input should be validated with vee-validator or not.
|
|
79
|
+
* If you use this component within form input, you need to set this props as true.
|
|
80
|
+
*/
|
|
81
|
+
useValidator?: boolean;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* This prop is required if you use this component in a form input.
|
|
85
|
+
* Specify the unique field name, match with your needs for API request.
|
|
86
|
+
*
|
|
87
|
+
* @default 'numberInput'
|
|
88
|
+
*/
|
|
89
|
+
fieldName?: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Whether this input field is required or not.
|
|
93
|
+
*/
|
|
94
|
+
mandatory?: boolean;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Set custom validator message.
|
|
98
|
+
* Will be show if invalid="true"
|
|
99
|
+
*/
|
|
100
|
+
validatorMessage?: string | CustomValidation;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Show the validator message on error.
|
|
104
|
+
*
|
|
105
|
+
* @default true;
|
|
106
|
+
*/
|
|
107
|
+
showValidatorMessage?: boolean;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Specify the input placeholder.
|
|
111
|
+
*
|
|
112
|
+
* @default 'Enter {label}' or 'Enter number'
|
|
113
|
+
*/
|
|
114
|
+
placeholder?: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Disabled the input.
|
|
118
|
+
*/
|
|
119
|
+
disabled?: boolean;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* State of invalid input.
|
|
123
|
+
*/
|
|
124
|
+
invalid?: boolean;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Displays increment/decrement buttons.
|
|
128
|
+
*/
|
|
129
|
+
showButtons?: boolean;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The width of input.
|
|
133
|
+
*/
|
|
134
|
+
size?: 'small' | 'normal' | 'full';
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Defines the behavior of the component.
|
|
138
|
+
* @defaultValue decimal
|
|
139
|
+
*/
|
|
140
|
+
mode?: 'decimal' | 'currency';
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The currency to use in currency formatting. Possible values are the [ISO 4217 currency codes](https://www.six-group.com/en/products-services/financial-information/data-standards.html#scrollTo=maintenance-agency), such as 'USD' for the US dollar, 'EUR' for the euro, or 'CNY' for the Chinese RMB.
|
|
144
|
+
* There is no default value; if the style is 'currency', the currency property must be provided.
|
|
145
|
+
*/
|
|
146
|
+
currency?: string | undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The `locale` variable specifies the regional setting or language preference to be used.
|
|
150
|
+
* It is an optional string that can influence date, time, number formatting, and other locale-specific operations.
|
|
151
|
+
*
|
|
152
|
+
* If not provided, the system may default to a pre-configured or fallback locale.
|
|
153
|
+
*/
|
|
154
|
+
locale?: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Text to display before the value.
|
|
158
|
+
*/
|
|
159
|
+
prefix?: string | undefined;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Text to display after the value.
|
|
163
|
+
*/
|
|
164
|
+
suffix?: string | undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The minimal digits of decimal value.
|
|
168
|
+
*/
|
|
169
|
+
minFractionDigits?: number;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The maximal digits of decimal value.
|
|
173
|
+
*/
|
|
174
|
+
maxFractionDigits?: number;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.
|
|
178
|
+
* @defaultValue false
|
|
179
|
+
*/
|
|
180
|
+
useGrouping?: boolean;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Show information about the field.
|
|
184
|
+
*/
|
|
185
|
+
fieldInfo?: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The filed info tooltip position
|
|
189
|
+
*/
|
|
190
|
+
tooltipPos?: 'top' | 'right' | 'bottom' | 'left';
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Specify the appearance of addon right and left
|
|
194
|
+
* - filled - has background and border
|
|
195
|
+
* - plain - no background, no border
|
|
196
|
+
*
|
|
197
|
+
* @defaultValue filled
|
|
198
|
+
*/
|
|
199
|
+
addonVariant?: 'filled' | 'plain';
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Class to be bind on addon left component
|
|
203
|
+
*/
|
|
204
|
+
addonLeftClass?: any;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Class to be bind on addon left component
|
|
208
|
+
*/
|
|
209
|
+
addonRightClass?: any;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Class to be bind on input group component
|
|
213
|
+
*/
|
|
214
|
+
inputGroupClass?: any;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Class to be bind on input number component
|
|
218
|
+
*/
|
|
219
|
+
inputNumberClass?: any;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Unique id for input number element
|
|
223
|
+
*/
|
|
224
|
+
inputId?: string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Set auto Resize Input
|
|
228
|
+
* The input width is counted by the value length
|
|
229
|
+
*
|
|
230
|
+
* @default false
|
|
231
|
+
*/
|
|
232
|
+
autoResize?: boolean;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Allow input to have value null or undefined.
|
|
236
|
+
* If it sets to 'false', when the value is empty, it will fall back to min value if exists, zero otherwise
|
|
237
|
+
*
|
|
238
|
+
* @default true
|
|
239
|
+
*/
|
|
240
|
+
allowEmptyValue?: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* InputNumber component emits
|
|
245
|
+
*/
|
|
246
|
+
export type InputNumberEmits = {
|
|
247
|
+
/**
|
|
248
|
+
* Emits when the input has losen focus.
|
|
249
|
+
* The model value is the valid value from given min and max number.
|
|
250
|
+
*
|
|
251
|
+
* If the inputed number is above max, return the max. And vice versa.
|
|
252
|
+
*/
|
|
253
|
+
'update:modelValue': [payload?: number];
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* If you need to check validation, you can use this events.
|
|
257
|
+
*/
|
|
258
|
+
'input': [payload?: number];
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export interface InputNumberSlots {
|
|
262
|
+
'addon-left': Slot;
|
|
263
|
+
'addon-right': Slot;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* **WangsVue - InputNumber**
|
|
268
|
+
*
|
|
269
|
+
* _Handle input number with form validation._
|
|
270
|
+
*
|
|
271
|
+
* --- ---
|
|
272
|
+
* 
|
|
273
|
+
*
|
|
274
|
+
* @group form
|
|
275
|
+
*/
|
|
276
|
+
declare const InputNumber: DefineComponent<
|
|
277
|
+
InputNumberProps,
|
|
278
|
+
InputNumberEmits,
|
|
279
|
+
InputNumberSlots
|
|
280
|
+
>;
|
|
281
|
+
|
|
282
|
+
export default InputNumber;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
import { CustomValidation } from '../form/Form.vue.d';
|
|
3
|
+
|
|
4
|
+
export type InputPasswordProps = {
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
labelClass?: string;
|
|
8
|
+
inputContainerClass?: string;
|
|
9
|
+
mandatory?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
feedback?: boolean;
|
|
12
|
+
fieldName?: string;
|
|
13
|
+
useValidator?: boolean;
|
|
14
|
+
invalid?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Set custom validator message.
|
|
17
|
+
* Will be show if invalid="true"
|
|
18
|
+
*/
|
|
19
|
+
validatorMessage?: string | CustomValidation;
|
|
20
|
+
validatorMessageClass?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type InputPasswordEmits = {
|
|
24
|
+
'update:modelValue': [payload?: string];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare const InputPassword: DefineComponent<
|
|
28
|
+
InputPasswordProps,
|
|
29
|
+
InputPasswordEmits
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
export default InputPassword;
|