@fewangsit/wangsvue-fats 1.0.0-alpha.0
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 +32 -0
- package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
- package/components/assetinfo/AssetInfo.vue.d.ts +44 -0
- package/components/badge/Badge.vue.d.ts +73 -0
- package/components/badgegroup/BadgeGroup.vue.d.ts +54 -0
- package/components/basecomponent/index.d.ts +28 -0
- package/components/basetree/BaseTree.vue.d.ts +596 -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 +189 -0
- package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
- package/components/buttonaddbyscan/ButtonAddByScan.vue.d.ts +40 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +105 -0
- package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
- package/components/buttondownload/ButtonDownload.vue.d.ts +80 -0
- package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +258 -0
- package/components/buttonscan/ButtonScan.vue.d.ts +202 -0
- package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
- package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +46 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +201 -0
- package/components/buttonsplit/ButtonSplit.vue.d.ts +352 -0
- package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
- package/components/buttontoggle/ButtonToggle.vue.d.ts +19 -0
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
- package/components/calendar/Calendar.vue.d.ts +598 -0
- package/components/card/Card.vue.d.ts +140 -0
- package/components/carousel/Carousel.vue.d.ts +28 -0
- package/components/checkbox/Checkbox.vue.d.ts +330 -0
- package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
- package/components/datatable/DataTable.vue.d.ts +745 -0
- package/components/datepicker/DatePicker.vue.d.ts +52 -0
- package/components/daypicker/DayPicker.vue.d.ts +52 -0
- package/components/dialog/Dialog.vue.d.ts +465 -0
- 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 +165 -0
- package/components/dialogform/DialogForm.vue.d.ts +350 -0
- 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 +137 -0
- 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 +288 -0
- package/components/editor/Editor.vue.d.ts +192 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +86 -0
- package/components/fileupload/FileUpload.vue.d.ts +170 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +217 -0
- package/components/form/Form.vue.d.ts +319 -0
- package/components/icon/Icon.vue.d.ts +260 -0
- package/components/image/Image.vue.d.ts +411 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +237 -0
- package/components/index.d.ts +83 -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 +8 -0
- package/components/inputemail/InputEmail.vue.d.ts +26 -0
- package/components/inputnumber/InputNumber.vue.d.ts +288 -0
- package/components/inputotp/InputOtp.vue.d.ts +3 -0
- package/components/inputpassword/InputPassword.vue.d.ts +33 -0
- package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +121 -0
- package/components/inputsearch/InputSearch.vue.d.ts +36 -0
- package/components/inputtext/InputText.vue.d.ts +353 -0
- package/components/inputurl/InputURL.vue.d.ts +41 -0
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +33 -0
- package/components/languageswitcher/LanguageSwitcher.vue.d.ts +15 -0
- package/components/litedropdown/LiteDropdown.vue.d.ts +98 -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 +391 -0
- package/components/menuitem/index.d.ts +106 -0
- package/components/multiselect/MultiSelect.vue.d.ts +195 -0
- package/components/overlaypanel/OverlayPanel.vue.d.ts +302 -0
- package/components/paginator/Paginator.vue.d.ts +285 -0
- package/components/passthrough/index.d.ts +16 -0
- package/components/steps/Steps.vue.d.ts +20 -0
- package/components/tabmenu/TabMenu.vue.d.ts +104 -0
- package/components/tagtype/TagType.vue.d.ts +26 -0
- package/components/textarea/Textarea.vue.d.ts +171 -0
- package/components/timeline/Timeline.vue.d.ts +140 -0
- package/components/toast/Toast.vue.d.ts +368 -0
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +282 -0
- package/components/transactionroles/TransactionRoles.vue.d.ts +58 -0
- package/components/tree/Tree.vue.d.ts +151 -0
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
- package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
- package/components/ts-helpers.d.ts +91 -0
- package/components/username/UserName.vue.d.ts +123 -0
- package/components/userwithicon/UserWithIcon.vue.d.ts +21 -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 +66 -0
- package/event-bus/mitt.d.ts +41 -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-Bdr9ZhtP.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-D9bw9OcI.js +4 -0
- package/loading-table-chOgXi94.js +1 -0
- package/main.d.ts +34 -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 +27 -0
- package/plugins/VueHtmlToPaper.d.ts +11 -0
- package/plugins/WangsVue.d.ts +311 -0
- package/plugins/formValidation.d.ts +20 -0
- package/plugins/i18n-extension.d.ts +4 -0
- package/plugins/i18n.d.ts +103 -0
- package/stats.html +4949 -0
- package/style.css +1 -0
- package/utils/date.util.d.ts +79 -0
- package/utils/exportToExcel.util.d.ts +27 -0
- package/utils/formatTagCode.util.d.ts +1 -0
- package/utils/getStatusSeverity.util.d.ts +33 -0
- package/utils/index.d.ts +9 -0
- package/utils/isBasic.util.d.ts +1 -0
- package/utils/listenSidebarChanges.util.d.ts +16 -0
- package/utils/object.util.d.ts +27 -0
- package/utils/role.util.d.ts +70 -0
- package/utils/toast.util.d.ts +120 -0
- package/utils/xlsx.util.d.ts +19 -0
- package/wangsvue-fats.js +57238 -0
- package/wangsvue-fats.system.js +427 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { StyleValue } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { ComponentHooks } from '../basecomponent';
|
|
4
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
5
|
+
|
|
6
|
+
export declare type ButtonRadioPassThroughOptionType =
|
|
7
|
+
| ButtonRadioPassThroughAttributes
|
|
8
|
+
| ((
|
|
9
|
+
options: ButtonRadioPassThroughMethodOptions,
|
|
10
|
+
) => ButtonRadioPassThroughAttributes | string)
|
|
11
|
+
| string
|
|
12
|
+
| null
|
|
13
|
+
| undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface ButtonRadioPassThroughMethodOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Defines instance.
|
|
21
|
+
*/
|
|
22
|
+
instance: any;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Defines valid properties.
|
|
26
|
+
*/
|
|
27
|
+
props: ButtonRadioProps;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Defines current inline state.
|
|
31
|
+
*/
|
|
32
|
+
state: ButtonRadioState;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Defines current options.
|
|
36
|
+
*/
|
|
37
|
+
context: ButtonRadioContext;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Defines valid attributes.
|
|
41
|
+
*/
|
|
42
|
+
attrs: any;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Defines parent options.
|
|
46
|
+
*/
|
|
47
|
+
parent: any;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Defines passthrough(pt) options in global config.
|
|
51
|
+
*/
|
|
52
|
+
global: object | undefined;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Custom passthrough(pt) options.
|
|
57
|
+
* @see {@link ButtonRadioProps.pt}
|
|
58
|
+
*/
|
|
59
|
+
export interface ButtonRadioPassThroughOptions {
|
|
60
|
+
/**
|
|
61
|
+
* Used to pass attributes to the root's DOM element.
|
|
62
|
+
*/
|
|
63
|
+
root?: ButtonRadioPassThroughOptionType;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Used to pass attributes to the input's DOM element.
|
|
67
|
+
*/
|
|
68
|
+
input?: ButtonRadioPassThroughOptionType;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Used to pass attributes to the box's DOM element.
|
|
72
|
+
*/
|
|
73
|
+
box?: ButtonRadioPassThroughOptionType;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Used to pass attributes to the icon's DOM element.
|
|
77
|
+
*/
|
|
78
|
+
icon?: ButtonRadioPassThroughOptionType;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Used to manage all lifecycle hooks.
|
|
82
|
+
* @see {@link BaseComponent.ComponentHooks}
|
|
83
|
+
*/
|
|
84
|
+
hooks?: ComponentHooks;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Custom passthrough attributes for each DOM elements
|
|
89
|
+
*/
|
|
90
|
+
export interface ButtonRadioPassThroughAttributes {
|
|
91
|
+
[key: string]: any;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Defines current inline state in ButtonRadio component.
|
|
96
|
+
*/
|
|
97
|
+
export interface ButtonRadioState {
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Defines valid properties in ButtonRadio component.
|
|
103
|
+
*/
|
|
104
|
+
export interface ButtonRadioProps {
|
|
105
|
+
/**
|
|
106
|
+
* The label for the input element
|
|
107
|
+
*/
|
|
108
|
+
label?: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Value of the input.
|
|
112
|
+
*/
|
|
113
|
+
value?: any;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Value binding of the input.
|
|
117
|
+
*/
|
|
118
|
+
modelValue?: any;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Name of the input element.
|
|
122
|
+
*/
|
|
123
|
+
name?: string | undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Allows to select a boolean value.
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
binary?: boolean;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* When present, it specifies that the component should have invalid state style.
|
|
133
|
+
* @defaultValue false
|
|
134
|
+
*/
|
|
135
|
+
invalid?: boolean | undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* When present, it specifies that the component should be disabled.
|
|
139
|
+
* @defaultValue false
|
|
140
|
+
*/
|
|
141
|
+
disabled?: boolean | undefined;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Specifies the input variant of the component.
|
|
145
|
+
* @defaultValue outlined
|
|
146
|
+
*/
|
|
147
|
+
variant?: 'outlined' | 'filled' | undefined;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* When present, it specifies that an input field is read-only.
|
|
151
|
+
* @default false
|
|
152
|
+
*/
|
|
153
|
+
readonly?: boolean | undefined;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Index of the element in tabbing order.
|
|
157
|
+
*/
|
|
158
|
+
tabindex?: number | undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Identifier of the underlying input element.
|
|
162
|
+
*/
|
|
163
|
+
inputId?: string | undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Inline style of the input field.
|
|
167
|
+
*/
|
|
168
|
+
inputStyle?: StyleValue | undefined;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Style class of the input field.
|
|
172
|
+
*/
|
|
173
|
+
inputClass?: string | object | undefined;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Tooltip info about the checkbox.
|
|
177
|
+
*/
|
|
178
|
+
tooltip?: string;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Tooltip position.
|
|
182
|
+
*
|
|
183
|
+
* @default 'top'
|
|
184
|
+
*/
|
|
185
|
+
tooltipPos?: 'top' | 'right' | 'left' | 'bottom';
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Defines current options in ButtonRadio component.
|
|
190
|
+
*/
|
|
191
|
+
export interface ButtonRadioContext {
|
|
192
|
+
/**
|
|
193
|
+
* Current checked state of the item as a boolean.
|
|
194
|
+
* @defaultValue false
|
|
195
|
+
*/
|
|
196
|
+
checked: boolean;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Current disabled state of the item as a boolean.
|
|
200
|
+
* @defaultValue false
|
|
201
|
+
*/
|
|
202
|
+
disabled: boolean;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Defines valid emits in ButtonRadio component.
|
|
207
|
+
*/
|
|
208
|
+
export type ButtonRadioEmits = {
|
|
209
|
+
/**
|
|
210
|
+
* Emitted when the value changes.
|
|
211
|
+
* @param {*} value - New value.
|
|
212
|
+
*/
|
|
213
|
+
'update:modelValue': [value: any];
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Callback to invoke on radio button value change.
|
|
217
|
+
* @param {Event} event - Browser event.
|
|
218
|
+
*/
|
|
219
|
+
'change': [event: Event];
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Callback to invoke when the component receives focus.
|
|
223
|
+
* @param {Event} event - Browser event.
|
|
224
|
+
*/
|
|
225
|
+
'focus': [event: Event];
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Callback to invoke when the component loses focus.
|
|
229
|
+
* @param {Event} event - Browser event.
|
|
230
|
+
*/
|
|
231
|
+
'blur': [event: Event];
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* **WangsVue - ButtonRadio**
|
|
236
|
+
*
|
|
237
|
+
* _ButtonRadio is an extension to standard radio button element with theming._
|
|
238
|
+
*
|
|
239
|
+
* [Live Demo](https://fewangsit.github.io/wangsvue/buttonradio)
|
|
240
|
+
* --- ---
|
|
241
|
+
* 
|
|
242
|
+
*
|
|
243
|
+
* @group Component
|
|
244
|
+
*
|
|
245
|
+
*/
|
|
246
|
+
declare class ButtonRadio extends ClassComponent<
|
|
247
|
+
ButtonRadioProps,
|
|
248
|
+
unknown,
|
|
249
|
+
ButtonRadioEmits
|
|
250
|
+
> {}
|
|
251
|
+
|
|
252
|
+
declare module 'vue' {
|
|
253
|
+
export interface GlobalComponents {
|
|
254
|
+
ButtonRadio: GlobalComponentConstructor<ButtonRadio>;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export default ButtonRadio;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { ButtonProps } from '../../components/button/Button.vue.d';
|
|
2
|
+
import { ClassComponent, HintedString } from '../../components/ts-helpers.d';
|
|
3
|
+
|
|
4
|
+
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
5
|
+
|
|
6
|
+
export type ScannerErrorCode =
|
|
7
|
+
| 'DRIVER_NOT_FOUND'
|
|
8
|
+
| 'DEVICE_NOT_CONNECTED'
|
|
9
|
+
| 'DEVICE_DISCONNECTED'
|
|
10
|
+
| 'NOT_SUPPORTED_SYSTEM'
|
|
11
|
+
| 'HARDWARE_NOT_SYNCHRONIZED';
|
|
12
|
+
|
|
13
|
+
export type ScannerErrorMessage = {
|
|
14
|
+
title: string;
|
|
15
|
+
detail: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type ScannerOption = Partial<Device> & {
|
|
19
|
+
label: string;
|
|
20
|
+
device: Device | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type Device = {
|
|
24
|
+
jenisDevice: string;
|
|
25
|
+
serialNumber: string;
|
|
26
|
+
API: string;
|
|
27
|
+
rfidScan: boolean;
|
|
28
|
+
qrScan: boolean;
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type RegisteredDevice = {
|
|
33
|
+
_id: string;
|
|
34
|
+
imageSmall: string;
|
|
35
|
+
imageBig: string;
|
|
36
|
+
serialNumber: string;
|
|
37
|
+
status: string;
|
|
38
|
+
lastReportDate: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
updatedAt: string;
|
|
41
|
+
group: null;
|
|
42
|
+
name: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type DeviceList = Device[];
|
|
46
|
+
|
|
47
|
+
export interface ButtonScanProps extends Omit<ButtonProps, 'type'> {
|
|
48
|
+
/**
|
|
49
|
+
* Set custom button label.
|
|
50
|
+
*
|
|
51
|
+
* @default Scan Type
|
|
52
|
+
*/
|
|
53
|
+
label?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Set custom button icon.
|
|
56
|
+
*
|
|
57
|
+
* @default 'qr' | 'rfid'
|
|
58
|
+
*/
|
|
59
|
+
icon?: WangsIcons;
|
|
60
|
+
/**
|
|
61
|
+
* Scpecify the scan type
|
|
62
|
+
*/
|
|
63
|
+
type?: 'RFID' | 'QR';
|
|
64
|
+
/**
|
|
65
|
+
* Automatically switch between RFID and QR scan types during the scanning process.
|
|
66
|
+
* This allows the scan type to change dynamically based on the validation of the scanned code.
|
|
67
|
+
*
|
|
68
|
+
* The scan type will alternate between RFID and QR based on the validation result:
|
|
69
|
+
* - If the current scan is valid, it proceeds with the next scan type.
|
|
70
|
+
* - If the scan is invalid, it will re-scan using the previous scan type.
|
|
71
|
+
*
|
|
72
|
+
* This behavior continues in a loop until a stop condition is met, typically triggered by the parent component.
|
|
73
|
+
*
|
|
74
|
+
* Note: Only work with single Scan
|
|
75
|
+
*
|
|
76
|
+
* @default false
|
|
77
|
+
* @type {boolean}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* // Example usage in a component:
|
|
81
|
+
* <Button :auto-switch="true" />
|
|
82
|
+
*
|
|
83
|
+
* In this case, scanning will automatically switch between RFID and QR based on the validation results.
|
|
84
|
+
*/
|
|
85
|
+
autoSwitch?: boolean;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Do validation when a tag is scanned, if valid, it will emits scan, otherwise re-scanning.
|
|
89
|
+
* when need to show toast on validation failed, set the toast group to `scan-error-validation`
|
|
90
|
+
*
|
|
91
|
+
* @param type
|
|
92
|
+
* @param code
|
|
93
|
+
* @param serialNumber
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
96
|
+
scanValidation?: (
|
|
97
|
+
type: 'RFID' | 'QR',
|
|
98
|
+
code: string,
|
|
99
|
+
serialNumber: string,
|
|
100
|
+
) => Promise<boolean>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The value of the input (tag).
|
|
104
|
+
*
|
|
105
|
+
* @deprecated use `onScan` instead.
|
|
106
|
+
*/
|
|
107
|
+
modelValue?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Whether the scanner is in bulk mode.
|
|
110
|
+
*
|
|
111
|
+
* @toto add support bulk scan
|
|
112
|
+
*/
|
|
113
|
+
bulk?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* The id of the button element.
|
|
116
|
+
*/
|
|
117
|
+
id?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Wether the button should be disabled.
|
|
120
|
+
*/
|
|
121
|
+
disabled?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Whether the scanner is a powerbank.
|
|
124
|
+
*
|
|
125
|
+
* @deprecated
|
|
126
|
+
*/
|
|
127
|
+
powerbank?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Display the label only (wihout icon).
|
|
130
|
+
*
|
|
131
|
+
* @default false
|
|
132
|
+
*/
|
|
133
|
+
labelOnly?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Add a border class without a background initially.
|
|
136
|
+
* @default false
|
|
137
|
+
*/
|
|
138
|
+
outlined?: boolean | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Defines the style of the button.
|
|
141
|
+
*/
|
|
142
|
+
severity?:
|
|
143
|
+
| HintedString<
|
|
144
|
+
| 'secondary'
|
|
145
|
+
| 'success'
|
|
146
|
+
| 'info'
|
|
147
|
+
| 'warning'
|
|
148
|
+
| 'help'
|
|
149
|
+
| 'danger'
|
|
150
|
+
| 'contrast'
|
|
151
|
+
>
|
|
152
|
+
| undefined;
|
|
153
|
+
/**
|
|
154
|
+
* Defines the size of the button.
|
|
155
|
+
*/
|
|
156
|
+
size: 'small' | 'large';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export type ButtonScanEmits = {
|
|
160
|
+
'update:modelValue': [tag: string];
|
|
161
|
+
'connect': [];
|
|
162
|
+
'connected': [device?: Device];
|
|
163
|
+
'scan': [tag: string, deviceSerialNumber: string];
|
|
164
|
+
'stop': [];
|
|
165
|
+
'error': [error: unknown | Event];
|
|
166
|
+
'beforeStartScan': [];
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export interface ButtonScanExposes {
|
|
170
|
+
onBeforeStartScan: () => void;
|
|
171
|
+
startScan: () => void;
|
|
172
|
+
/**
|
|
173
|
+
* Method to stop the scan process.
|
|
174
|
+
*/
|
|
175
|
+
stopScan: (afterScan?: boolean) => void;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* **TSVue v2 - ButtonScan**
|
|
180
|
+
*
|
|
181
|
+
* _ButtonScan is component for scanning RFID or QR Tag._
|
|
182
|
+
*
|
|
183
|
+
* --- ---
|
|
184
|
+
* 
|
|
185
|
+
*
|
|
186
|
+
* @group Component
|
|
187
|
+
*/
|
|
188
|
+
declare class ButtonScan
|
|
189
|
+
extends ClassComponent<ButtonScanProps, ButtonScanEmits, unknown>
|
|
190
|
+
implements ButtonScanExposes
|
|
191
|
+
{
|
|
192
|
+
onBeforeStartScan: () => void;
|
|
193
|
+
startScan: () => void;
|
|
194
|
+
stopScan: (afterScan?: boolean) => void;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
interface Window {
|
|
198
|
+
scannerWorker: Worker;
|
|
199
|
+
toastGroups: string[] | undefined;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export default ButtonScan;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface ButtonSearchLocaleConfig {
|
|
4
|
+
searchPlaceholder?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type ButtonSearchEmits = {
|
|
8
|
+
/**
|
|
9
|
+
* Emits when the Enter key is pressed.
|
|
10
|
+
*/
|
|
11
|
+
search: [payload?: string];
|
|
12
|
+
/**
|
|
13
|
+
* Emits when the search box is hidden by clicking the left arrow button.
|
|
14
|
+
* The 'search' query parameter should be reset to undefined when this event is emitted.
|
|
15
|
+
*/
|
|
16
|
+
collapsed: [];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export interface ButtonSearchProps {
|
|
20
|
+
tableName?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* **WangsVue - ButtonSearch**
|
|
25
|
+
*
|
|
26
|
+
* _Search button with searchbox for table._
|
|
27
|
+
*
|
|
28
|
+
* --- ---
|
|
29
|
+
* 
|
|
30
|
+
*
|
|
31
|
+
* @group form
|
|
32
|
+
*/
|
|
33
|
+
declare const ButtonSearch: DefineComponent<
|
|
34
|
+
ButtonSearchProps,
|
|
35
|
+
ButtonSearchEmits
|
|
36
|
+
>;
|
|
37
|
+
|
|
38
|
+
export default ButtonSearch;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { ButtonScanProps } from '../buttonscan/ButtonScan.vue.d';
|
|
4
|
+
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
5
|
+
|
|
6
|
+
export type ScanPayload = {
|
|
7
|
+
type: 'RFID' | 'QR';
|
|
8
|
+
code: string;
|
|
9
|
+
device: string; // Serial Number
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type ButtonSearchByScanEmits = {
|
|
13
|
+
scan: [payload: ScanPayload];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export interface ButtonSearchByScanProps {
|
|
17
|
+
/**
|
|
18
|
+
* The button label.
|
|
19
|
+
*
|
|
20
|
+
* @default 'Search by Scan'
|
|
21
|
+
*/
|
|
22
|
+
label?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The button icon.
|
|
25
|
+
*/
|
|
26
|
+
icon?: WangsIcons;
|
|
27
|
+
/**
|
|
28
|
+
* The datatable tablename which handles the search by scan.
|
|
29
|
+
*
|
|
30
|
+
* @default 'datatable' - default DataTable tablename
|
|
31
|
+
*/
|
|
32
|
+
tableName?: string;
|
|
33
|
+
bulk?: boolean;
|
|
34
|
+
scanValidation?: ButtonScanProps['scanValidation'];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type ButtonSearchByScanExposes = {
|
|
38
|
+
stopScan: (afterScan?: boolean) => void;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
declare const ButtonSearchByScan: DefineComponent<
|
|
42
|
+
ButtonSearchByScanProps,
|
|
43
|
+
ButtonSearchByScanEmits
|
|
44
|
+
>;
|
|
45
|
+
|
|
46
|
+
export default ButtonSearchByScan;
|