@fewangsit/wangsvue-gsts 1.0.0-alpha.23 → 1.0.0-alpha.24
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/build-entry.d.ts +2 -2
- package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
- package/components/buttonscan/helpers/getErrorCode.helper.d.ts +3 -0
- package/components/buttonscan/helpers/index.d.ts +1 -0
- package/components/buttonscan/workers/scanner.worker.d.ts +1 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +3 -1
- package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -34
- package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
- package/components/dropdown/Dropdown.vue.d.ts +13 -3
- package/components/filtercontainer/FilterContainer.vue.d.ts +7 -7
- package/components/hardwaresync/store/device.store.d.ts +36 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +6 -0
- package/components/imagecompressor/ImageInputInfo.vue.d.ts +2 -0
- package/components/index.d.ts +3 -1
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -36
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +4 -22
- package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +1 -1
- package/components/litedropdown/LiteDropdown.vue.d.ts +2 -2
- package/components/multiselect/MultiSelect.vue.d.ts +6 -4
- package/components/tagtype/TagType.vue.d.ts +2 -3
- package/components/timeline/Timeline.vue.d.ts +7 -1
- package/components/timeline/TimelineContentByType.vue.d.ts +3 -3
- package/event-bus/index.d.ts +3 -1
- package/package.json +1 -1
- package/plugins/WangsVue.d.ts +120 -2
- package/plugins/i18n.d.ts +94 -0
- package/style.css +1 -1
- package/utils/filterOptions.util.d.ts +2 -2
- package/utils/index.d.ts +3 -3
- package/wangsvue-gsts.es.js +32779 -31491
- package/wangsvue-gsts.system.js +194 -159
- package/assets/json/supported-official-langs.json.d.ts +0 -530
- package/components/buttonsplit/ButtonSplit.d.ts +0 -350
- package/plugins/translation.d.ts +0 -84
- package/types/options.type.d.ts +0 -16
package/build-entry.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { default as Tooltip } from 'primevue/tooltip';
|
|
|
8
8
|
export { Focus } from './directives';
|
|
9
9
|
export { useForm, useField } from './plugins/formValidation';
|
|
10
10
|
export type { FormContext } from './plugins/formValidation';
|
|
11
|
-
export * from './plugins/
|
|
12
|
-
export { default as i18n } from './plugins/
|
|
11
|
+
export * from './plugins/i18n';
|
|
12
|
+
export { default as i18n } from './plugins/i18n';
|
|
13
13
|
export * from './components';
|
|
14
14
|
export { default as WangsVue } from './config';
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { ClassComponent, HintedString } from '../../components/ts-helpers.d';
|
|
2
|
+
import { ButtonProps } from '../../components/button/Button.vue.d';
|
|
3
|
+
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
4
|
+
|
|
5
|
+
export type ScannerErrorCode =
|
|
6
|
+
| 'DRIVER_NOT_FOUND'
|
|
7
|
+
| 'DEVICE_NOT_CONNECTED'
|
|
8
|
+
| 'DEVICE_DISCONNECTED'
|
|
9
|
+
| 'NOT_SUPPORTED_SYSTEM'
|
|
10
|
+
| 'HARDWARE_NOT_SYNCHRONIZED';
|
|
11
|
+
|
|
12
|
+
export type ScannerErrorMessage = {
|
|
13
|
+
title: string;
|
|
14
|
+
detail: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type ScannerOption = Partial<Device> & {
|
|
18
|
+
label: string;
|
|
19
|
+
device: Device | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type Device = {
|
|
23
|
+
jenisDevice: string;
|
|
24
|
+
serialNumber: string;
|
|
25
|
+
API: string;
|
|
26
|
+
rfidScan: boolean;
|
|
27
|
+
qrScan: boolean;
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type RegisteredDevice = {
|
|
32
|
+
_id: string;
|
|
33
|
+
imageSmall: string;
|
|
34
|
+
imageBig: string;
|
|
35
|
+
serialNumber: string;
|
|
36
|
+
status: string;
|
|
37
|
+
lastReportDate: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
group: null;
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type DeviceList = Device[];
|
|
45
|
+
|
|
46
|
+
export interface ButtonScanProps extends Omit<ButtonProps, 'type'> {
|
|
47
|
+
/**
|
|
48
|
+
* Set custom button label.
|
|
49
|
+
*
|
|
50
|
+
* @default Scan Type
|
|
51
|
+
*/
|
|
52
|
+
label?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Set custom button icon.
|
|
55
|
+
*
|
|
56
|
+
* @default 'qr' | 'rfid'
|
|
57
|
+
*/
|
|
58
|
+
icon?: WangsIcons;
|
|
59
|
+
/**
|
|
60
|
+
* Scpecify the scan type
|
|
61
|
+
*/
|
|
62
|
+
type?: 'RFID' | 'QR';
|
|
63
|
+
/**
|
|
64
|
+
* Automatically switch between RFID and QR scan types during the scanning process.
|
|
65
|
+
* This allows the scan type to change dynamically based on the validation of the scanned code.
|
|
66
|
+
*
|
|
67
|
+
* The scan type will alternate between RFID and QR based on the validation result:
|
|
68
|
+
* - If the current scan is valid, it proceeds with the next scan type.
|
|
69
|
+
* - If the scan is invalid, it will re-scan using the previous scan type.
|
|
70
|
+
*
|
|
71
|
+
* This behavior continues in a loop until a stop condition is met, typically triggered by the parent component.
|
|
72
|
+
*
|
|
73
|
+
* Note: Only work with single Scan
|
|
74
|
+
*
|
|
75
|
+
* @default false
|
|
76
|
+
* @type {boolean}
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* // Example usage in a component:
|
|
80
|
+
* <Button :auto-switch="true" />
|
|
81
|
+
*
|
|
82
|
+
* In this case, scanning will automatically switch between RFID and QR based on the validation results.
|
|
83
|
+
*/
|
|
84
|
+
autoSwitch?: boolean;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Do validation when a tag is scanned, if valid, it will emits scan, otherwise re-scanning.
|
|
88
|
+
* when need to show toast on validation failed, set the toast group to `scan-error-validation`
|
|
89
|
+
*
|
|
90
|
+
* @param type
|
|
91
|
+
* @param code
|
|
92
|
+
* @param serialNumber
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
95
|
+
scanValidation?: (
|
|
96
|
+
type: 'RFID' | 'QR',
|
|
97
|
+
code: string,
|
|
98
|
+
serialNumber: string,
|
|
99
|
+
) => Promise<boolean>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The value of the input (tag).
|
|
103
|
+
*
|
|
104
|
+
* @deprecated use `onScan` instead.
|
|
105
|
+
*/
|
|
106
|
+
modelValue?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the scanner is in bulk mode.
|
|
109
|
+
*
|
|
110
|
+
* @toto add support bulk scan
|
|
111
|
+
*/
|
|
112
|
+
bulk?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* The id of the button element.
|
|
115
|
+
*/
|
|
116
|
+
id?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Wether the button should be disabled.
|
|
119
|
+
*/
|
|
120
|
+
disabled?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Whether the scanner is a powerbank.
|
|
123
|
+
*
|
|
124
|
+
* @deprecated
|
|
125
|
+
*/
|
|
126
|
+
powerbank?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Display the label only (wihout icon).
|
|
129
|
+
*
|
|
130
|
+
* @default false
|
|
131
|
+
*/
|
|
132
|
+
labelOnly?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Add a border class without a background initially.
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
outlined?: boolean | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Defines the style of the button.
|
|
140
|
+
*/
|
|
141
|
+
severity?:
|
|
142
|
+
| HintedString<
|
|
143
|
+
| 'secondary'
|
|
144
|
+
| 'success'
|
|
145
|
+
| 'info'
|
|
146
|
+
| 'warning'
|
|
147
|
+
| 'help'
|
|
148
|
+
| 'danger'
|
|
149
|
+
| 'contrast'
|
|
150
|
+
>
|
|
151
|
+
| undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Defines the size of the button.
|
|
154
|
+
*/
|
|
155
|
+
size: 'small' | 'large';
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type ButtonScanEmits = {
|
|
159
|
+
'update:modelValue': [tag: string];
|
|
160
|
+
'connect': [];
|
|
161
|
+
'connected': [device?: Device];
|
|
162
|
+
'scan': [tag: string, deviceSerialNumber: string];
|
|
163
|
+
'stop': [];
|
|
164
|
+
'error': [error: unknown | Event];
|
|
165
|
+
'beforeStartScan': [];
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export interface ButtonScanExposes {
|
|
169
|
+
onBeforeStartScan: () => void;
|
|
170
|
+
startScan: () => void;
|
|
171
|
+
/**
|
|
172
|
+
* Method to stop the scan process.
|
|
173
|
+
*/
|
|
174
|
+
stopScan: (afterScan?: boolean) => void;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* **TSVue v2 - ButtonScan**
|
|
179
|
+
*
|
|
180
|
+
* _ButtonScan is component for scanning RFID or QR Tag._
|
|
181
|
+
*
|
|
182
|
+
* --- ---
|
|
183
|
+
* 
|
|
184
|
+
*
|
|
185
|
+
* @group Component
|
|
186
|
+
*/
|
|
187
|
+
declare class ButtonScan
|
|
188
|
+
extends ClassComponent<ButtonScanProps, ButtonScanEmits, unknown>
|
|
189
|
+
implements ButtonScanExposes
|
|
190
|
+
{
|
|
191
|
+
onBeforeStartScan: () => void;
|
|
192
|
+
startScan: () => void;
|
|
193
|
+
stopScan: (afterScan?: boolean) => void;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
interface Window {
|
|
197
|
+
scannerWorker: Worker;
|
|
198
|
+
toastGroups: string[] | undefined;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export default ButtonScan;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as getErrorCode } from './getErrorCode.helper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Slot } from 'vue';
|
|
2
2
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
3
3
|
import { TreeNode } from '../basetree/BaseTree.vue.d';
|
|
4
|
-
import { ShortFetchResponse } from '../datatable/DataTable.vue.d';
|
|
4
|
+
import { QueryParams, ShortFetchResponse } from '../datatable/DataTable.vue.d';
|
|
5
5
|
|
|
6
6
|
export type KeysModelValue = number[] | undefined;
|
|
7
7
|
export type NodeModelValue =
|
|
@@ -75,7 +75,9 @@ export interface ButtonSelectTreeProps {
|
|
|
75
75
|
|
|
76
76
|
fetchTree?: (
|
|
77
77
|
type: 'group' | 'category',
|
|
78
|
+
params?: QueryParams,
|
|
78
79
|
) => Promise<ShortFetchResponse<TreeNode> | undefined>;
|
|
80
|
+
params?: QueryParams;
|
|
79
81
|
/**
|
|
80
82
|
* Specify wether the all tree node should be auto checked once it rendered.
|
|
81
83
|
* @default false
|
|
@@ -1,34 +1,350 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
type
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* ButtonSplit groups a set of commands in an overlay with a default command.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primevue.org/splitbutton/)
|
|
6
|
+
*
|
|
7
|
+
* @module splitbutton
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import { ButtonHTMLAttributes, VNode } from 'vue';
|
|
11
|
+
import { ComponentHooks } from '../basecomponent';
|
|
12
|
+
import { ButtonPassThroughOptions } from 'primevue/button';
|
|
13
|
+
import { MenuItem } from '../menuitem';
|
|
14
|
+
import { PassThroughOptions } from '../passthrough';
|
|
15
|
+
import {
|
|
16
|
+
TieredMenuPassThroughOptions,
|
|
17
|
+
TieredMenuRouterBindProps,
|
|
18
|
+
} from 'primevue/tieredmenu';
|
|
19
|
+
import {
|
|
20
|
+
ClassComponent,
|
|
21
|
+
GlobalComponentConstructor,
|
|
22
|
+
PassThrough,
|
|
23
|
+
HintedString,
|
|
24
|
+
} from '../ts-helpers';
|
|
25
|
+
import { WangsIcons } from '../icon/Icon.vue';
|
|
26
|
+
|
|
27
|
+
export declare type ButtonSplitPassThroughOptionType =
|
|
28
|
+
| ButtonSplitPassThroughAttributes
|
|
29
|
+
| ((
|
|
30
|
+
options: ButtonSplitPassThroughMethodOptions,
|
|
31
|
+
) => ButtonSplitPassThroughAttributes | string)
|
|
32
|
+
| string
|
|
33
|
+
| null
|
|
34
|
+
| undefined;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Custom passthrough(pt) option method.
|
|
38
|
+
*/
|
|
39
|
+
export interface ButtonSplitPassThroughMethodOptions {
|
|
40
|
+
/**
|
|
41
|
+
* Defines instance.
|
|
42
|
+
*/
|
|
43
|
+
instance: any;
|
|
44
|
+
/**
|
|
45
|
+
* Defines valid properties.
|
|
46
|
+
*/
|
|
47
|
+
props: ButtonSplitProps;
|
|
48
|
+
/**
|
|
49
|
+
* Defines current inline state.
|
|
50
|
+
*/
|
|
51
|
+
state: ButtonSplitState;
|
|
52
|
+
/**
|
|
53
|
+
* Defines valid attributes.
|
|
54
|
+
*/
|
|
55
|
+
attrs: any;
|
|
56
|
+
/**
|
|
57
|
+
* Defines parent options.
|
|
58
|
+
*/
|
|
59
|
+
parent: any;
|
|
60
|
+
/**
|
|
61
|
+
* Defines passthrough(pt) options in global config.
|
|
62
|
+
*/
|
|
63
|
+
global: object | undefined;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Custom shared passthrough(pt) option method.
|
|
68
|
+
*/
|
|
69
|
+
export interface ButtonSplitSharedPassThroughMethodOptions {
|
|
70
|
+
/**
|
|
71
|
+
* Defines valid properties.
|
|
72
|
+
*/
|
|
73
|
+
props: ButtonSplitProps;
|
|
74
|
+
/**
|
|
75
|
+
* Defines current inline state.
|
|
76
|
+
*/
|
|
77
|
+
state: ButtonSplitState;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Custom passthrough(pt) options.
|
|
82
|
+
* @see {@link ButtonSplitProps.pt}
|
|
83
|
+
*/
|
|
84
|
+
export interface ButtonSplitPassThroughOptions {
|
|
85
|
+
/**
|
|
86
|
+
* Used to pass attributes to the root's DOM element.
|
|
87
|
+
*/
|
|
88
|
+
root?: ButtonSplitPassThroughOptionType;
|
|
89
|
+
/**
|
|
90
|
+
* Used to pass attributes to the button's DOM element.
|
|
91
|
+
*/
|
|
92
|
+
button?: ButtonSplitPassThroughOptionType;
|
|
93
|
+
/**
|
|
94
|
+
* Used to pass attributes to the Button component.
|
|
95
|
+
* @see {@link ButtonPassThroughOptions}
|
|
96
|
+
*/
|
|
97
|
+
menuButton?: ButtonPassThroughOptions<ButtonSplitSharedPassThroughMethodOptions>;
|
|
98
|
+
/**
|
|
99
|
+
* Used to pass attributes to the TieredMenu component.
|
|
100
|
+
* @see {@link TieredMenuPassThroughOptions}
|
|
101
|
+
*/
|
|
102
|
+
menu?: TieredMenuPassThroughOptions<ButtonSplitSharedPassThroughMethodOptions>;
|
|
103
|
+
/**
|
|
104
|
+
* Used to manage all lifecycle hooks.
|
|
105
|
+
* @see {@link BaseComponent.ComponentHooks}
|
|
106
|
+
*/
|
|
107
|
+
hooks?: ComponentHooks;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Custom passthrough attributes for each DOM elements
|
|
112
|
+
*/
|
|
113
|
+
export interface ButtonSplitPassThroughAttributes {
|
|
114
|
+
[key: string]: any;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Defines current inline state in ButtonSplit component.
|
|
119
|
+
*/
|
|
120
|
+
export interface ButtonSplitState {
|
|
121
|
+
/**
|
|
122
|
+
* Current blocked state as a boolean.
|
|
123
|
+
* @defaultValue false
|
|
124
|
+
*/
|
|
125
|
+
isBlocked: boolean;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Defines valid properties in ButtonSplit component.
|
|
130
|
+
*/
|
|
131
|
+
export interface ButtonSplitProps {
|
|
132
|
+
/**
|
|
133
|
+
* Text of the button.
|
|
134
|
+
*/
|
|
135
|
+
label?: string | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* Name of the icon of main button.
|
|
138
|
+
*/
|
|
139
|
+
icon?: WangsIcons | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* MenuModel instance to define the overlay items.
|
|
142
|
+
*/
|
|
143
|
+
model?: MenuItem[] | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Whether to automatically manage layering.
|
|
146
|
+
* @defaultValue true
|
|
147
|
+
*/
|
|
148
|
+
autoZIndex?: boolean | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* Base zIndex value to use in layering.
|
|
151
|
+
* @defaultValue 0
|
|
152
|
+
*/
|
|
153
|
+
baseZIndex?: number | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
|
|
156
|
+
* Special keywords are 'body' for document body and 'self' for the element itself.
|
|
157
|
+
* @defaultValue body
|
|
158
|
+
*/
|
|
159
|
+
appendTo?: HintedString<'body' | 'self'> | undefined | HTMLElement;
|
|
160
|
+
/**
|
|
161
|
+
* When present, it specifies that the element should be disabled.
|
|
162
|
+
* @defaultValue false
|
|
163
|
+
*/
|
|
164
|
+
disabled?: boolean | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* Style class of the component.
|
|
167
|
+
*/
|
|
168
|
+
class?: any | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* Inline style of the component.
|
|
171
|
+
*/
|
|
172
|
+
style?: any | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* Used to pass all properties of the HTMLButtonElement to the default button.
|
|
175
|
+
*/
|
|
176
|
+
buttonProps?: ButtonHTMLAttributes | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Used to pass all properties of the HTMLButtonElement to the menu button.
|
|
179
|
+
*/
|
|
180
|
+
menuButtonProps?: ButtonHTMLAttributes | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* Name of the menu button icon.
|
|
183
|
+
*/
|
|
184
|
+
menuButtonIcon?: WangsIcons | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* Defines the style of the button.
|
|
187
|
+
*/
|
|
188
|
+
severity?:
|
|
189
|
+
| HintedString<
|
|
190
|
+
| 'secondary'
|
|
191
|
+
| 'success'
|
|
192
|
+
| 'info'
|
|
193
|
+
| 'warning'
|
|
194
|
+
| 'help'
|
|
195
|
+
| 'danger'
|
|
196
|
+
| 'contrast'
|
|
197
|
+
>
|
|
198
|
+
| undefined;
|
|
199
|
+
/**
|
|
200
|
+
* Add a shadow to indicate elevation.
|
|
201
|
+
* @defaultValue false
|
|
202
|
+
*/
|
|
203
|
+
raised?: boolean | undefined;
|
|
204
|
+
/**
|
|
205
|
+
* Add a circular border radius to the button.
|
|
206
|
+
* @defaultValue false
|
|
207
|
+
*/
|
|
208
|
+
rounded?: boolean | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Add a textual class to the button without a background initially.
|
|
211
|
+
* @defaultValue false
|
|
212
|
+
*/
|
|
213
|
+
text?: boolean | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* Add a border class without a background initially.
|
|
216
|
+
* @defaultValue false
|
|
217
|
+
*/
|
|
218
|
+
outlined?: boolean | undefined;
|
|
219
|
+
/**
|
|
220
|
+
* Defines the size of the button.
|
|
221
|
+
*/
|
|
222
|
+
size?: 'small' | 'large' | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* Add a plain textual class to the button without a background initially.
|
|
225
|
+
* @defaultValue false
|
|
226
|
+
*/
|
|
227
|
+
plain?: boolean | undefined;
|
|
228
|
+
/**
|
|
229
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
230
|
+
* @type {ButtonSplitPassThroughOptions}
|
|
231
|
+
*/
|
|
232
|
+
pt?: PassThrough<ButtonSplitPassThroughOptions>;
|
|
233
|
+
/**
|
|
234
|
+
* Used to configure passthrough(pt) options of the component.
|
|
235
|
+
* @type {PassThroughOptions}
|
|
236
|
+
*/
|
|
237
|
+
ptOptions?: PassThroughOptions;
|
|
238
|
+
/**
|
|
239
|
+
* When enabled, it removes component related styles in the core.
|
|
240
|
+
* @defaultValue false
|
|
241
|
+
*/
|
|
242
|
+
unstyled?: boolean;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Defines valid slots in ButtonSplit component.
|
|
247
|
+
*/
|
|
248
|
+
export interface ButtonSplitSlots {
|
|
249
|
+
/**
|
|
250
|
+
* Button part of the content can easily be customized with the default slot instead of using the built-in modes.
|
|
251
|
+
*/
|
|
252
|
+
default(): VNode[];
|
|
253
|
+
/**
|
|
254
|
+
* Command button part of the content can easily be customized with the button content slot.
|
|
255
|
+
*/
|
|
256
|
+
buttoncontent(): VNode[];
|
|
257
|
+
/**
|
|
258
|
+
* Custom button icon template.
|
|
259
|
+
* @param {Object} scope - icon slot's params.
|
|
260
|
+
*/
|
|
261
|
+
icon(scope: {
|
|
262
|
+
/**
|
|
263
|
+
* Style class of the icon.
|
|
264
|
+
*/
|
|
265
|
+
class: string;
|
|
266
|
+
}): VNode[];
|
|
267
|
+
/**
|
|
268
|
+
* Custom menu button icon template.
|
|
269
|
+
* @param {Object} scope - menubuttonicon slot's params.
|
|
270
|
+
*/
|
|
271
|
+
menubuttonicon(scope: {
|
|
272
|
+
/**
|
|
273
|
+
* Style class of the icon.
|
|
274
|
+
*/
|
|
275
|
+
class: string;
|
|
276
|
+
}): VNode[];
|
|
277
|
+
/**
|
|
278
|
+
* Custom menu item icon template.
|
|
279
|
+
* @param {Object} scope - menuitemicon slot's params.
|
|
280
|
+
*/
|
|
281
|
+
menuitemicon(scope: {
|
|
282
|
+
/**
|
|
283
|
+
* Menuitem instance
|
|
284
|
+
*/
|
|
285
|
+
item: MenuItem;
|
|
286
|
+
/**
|
|
287
|
+
* Style class of the item icon element.
|
|
288
|
+
*/
|
|
289
|
+
class: any;
|
|
290
|
+
}): VNode[];
|
|
291
|
+
/**
|
|
292
|
+
* Custom content for each menu item.
|
|
293
|
+
* @param {Object} scope - item slot's params.
|
|
294
|
+
*/
|
|
295
|
+
item(scope: {
|
|
296
|
+
/**
|
|
297
|
+
* Menuitem instance
|
|
298
|
+
*/
|
|
299
|
+
item: MenuItem;
|
|
300
|
+
/**
|
|
301
|
+
* Label property of the menuitem
|
|
302
|
+
*/
|
|
303
|
+
label: string | ((...args: any) => string) | undefined;
|
|
304
|
+
/**
|
|
305
|
+
* Binding properties of the menuitem
|
|
306
|
+
*/
|
|
307
|
+
props: TieredMenuRouterBindProps;
|
|
308
|
+
/**
|
|
309
|
+
* Whether or not there is a submenu
|
|
310
|
+
*/
|
|
311
|
+
hasSubmenu: boolean;
|
|
312
|
+
}): VNode[];
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Defines valid emits in ButtonSplit component.
|
|
317
|
+
*/
|
|
318
|
+
export interface ButtonSplitEmits {
|
|
319
|
+
/**
|
|
320
|
+
* Callback to invoke when main button is clicked.
|
|
321
|
+
* @param {Event} event - Browser event.
|
|
322
|
+
*/
|
|
323
|
+
click(event: Event): void;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* **PrimeVue - ButtonSplit**
|
|
328
|
+
*
|
|
329
|
+
* _ButtonSplit groups a set of commands in an overlay with a default command._
|
|
330
|
+
*
|
|
331
|
+
* [Live Demo](https://www.primevue.org/splitbutton/)
|
|
332
|
+
* --- ---
|
|
333
|
+
* 
|
|
334
|
+
*
|
|
335
|
+
* @group Component
|
|
336
|
+
*
|
|
337
|
+
*/
|
|
338
|
+
declare class ButtonSplit extends ClassComponent<
|
|
339
|
+
ButtonSplitProps,
|
|
340
|
+
ButtonSplitSlots,
|
|
341
|
+
ButtonSplitEmits
|
|
342
|
+
> {}
|
|
343
|
+
|
|
344
|
+
declare module 'vue' {
|
|
345
|
+
export interface GlobalComponents {
|
|
346
|
+
ButtonSplit: GlobalComponentConstructor<ButtonSplit>;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export default ButtonSplit;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ClassComponent } from '../ts-helpers';
|
|
2
|
+
|
|
3
|
+
export interface ButtonSyncProps {
|
|
4
|
+
/**
|
|
5
|
+
* Defines no scan buttons in hardware sync dialog footer.
|
|
6
|
+
*/
|
|
7
|
+
withoutScanBtn?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare class ButtonSync extends ClassComponent<
|
|
11
|
+
ButtonSyncProps,
|
|
12
|
+
unknown,
|
|
13
|
+
unknown
|
|
14
|
+
> {}
|
|
15
|
+
|
|
16
|
+
declare module 'vue' {
|
|
17
|
+
export interface GlobalComponents {
|
|
18
|
+
ButtonSync: typeof ButtonSync;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default ButtonSync;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { Slot } from 'vue';
|
|
2
|
-
import { DropdownOption, OptionValue } from '../../types/options.type';
|
|
3
2
|
import { CustomValidation } from '../form/Form.vue.d';
|
|
4
3
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
5
4
|
import { BadgeProps } from '../../components/badge/Badge.vue.d';
|
|
5
|
+
import { WangsIcons } from '../../components/icon/Icon.vue.d';
|
|
6
|
+
|
|
7
|
+
export type OptionValue = string | number | boolean | Record<string, any>;
|
|
8
|
+
|
|
9
|
+
export type Option = {
|
|
10
|
+
label?: string;
|
|
11
|
+
value?: OptionValue;
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
icon?: WangsIcons;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
6
16
|
|
|
7
17
|
/**
|
|
8
18
|
* Configuration interface for localizing dropdown component placeholders and error messages.
|
|
@@ -77,7 +87,7 @@ export interface DropdownProps {
|
|
|
77
87
|
/**
|
|
78
88
|
* List of options to display.
|
|
79
89
|
*/
|
|
80
|
-
options?:
|
|
90
|
+
options?: Option[] | string[] | Record<string, any>;
|
|
81
91
|
|
|
82
92
|
/**
|
|
83
93
|
* Allows `null` to be treated as a valid selectable option in the dropdown.
|
|
@@ -212,7 +222,7 @@ export interface DropdownProps {
|
|
|
212
222
|
|
|
213
223
|
export interface DropdownSlots {
|
|
214
224
|
'value': Slot<{ value: string; originalValue: any }>;
|
|
215
|
-
'option': Slot<{ option:
|
|
225
|
+
'option': Slot<{ option: Option }>;
|
|
216
226
|
'addon-left': Slot;
|
|
217
227
|
'addon-right': Slot;
|
|
218
228
|
}
|