@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,189 @@
|
|
|
1
|
+
import { TooltipOptions } from 'primevue/tooltip';
|
|
2
|
+
import { ButtonHTMLAttributes, VNode } from 'vue';
|
|
3
|
+
|
|
4
|
+
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
5
|
+
import {
|
|
6
|
+
ClassComponent,
|
|
7
|
+
GlobalComponentConstructor,
|
|
8
|
+
HintedString,
|
|
9
|
+
} from '../ts-helpers';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Defines valid properties in Button component.
|
|
13
|
+
*/
|
|
14
|
+
export interface ButtonProps extends /* @vue-ignore */ ButtonHTMLAttributes {
|
|
15
|
+
/**
|
|
16
|
+
* Inline style of the button.
|
|
17
|
+
*/
|
|
18
|
+
style?: any;
|
|
19
|
+
/**
|
|
20
|
+
* Style class of the button.
|
|
21
|
+
*/
|
|
22
|
+
class?: any;
|
|
23
|
+
/**
|
|
24
|
+
* Text of the button.
|
|
25
|
+
*/
|
|
26
|
+
label?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Name of the icon.
|
|
29
|
+
*/
|
|
30
|
+
icon?: WangsIcons | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Position of the icon.
|
|
33
|
+
* @defaultValue left
|
|
34
|
+
*/
|
|
35
|
+
iconPos?: 'left' | 'right' | 'top' | 'bottom' | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Style class of the icon.
|
|
38
|
+
*/
|
|
39
|
+
iconClass?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Tooltip/information to show on button hover.
|
|
42
|
+
*/
|
|
43
|
+
tooltip?: string | TooltipOptions;
|
|
44
|
+
/**
|
|
45
|
+
* Set the position of tooltip.
|
|
46
|
+
* @default bottom
|
|
47
|
+
*/
|
|
48
|
+
tooltipPos?: 'top' | 'right' | 'bottom' | 'left';
|
|
49
|
+
/**
|
|
50
|
+
* Value of the badge.
|
|
51
|
+
*/
|
|
52
|
+
badge?: string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Style class of the badge.
|
|
55
|
+
*/
|
|
56
|
+
badgeClass?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Severity type of the badge.
|
|
59
|
+
*/
|
|
60
|
+
badgeSeverity?:
|
|
61
|
+
| HintedString<
|
|
62
|
+
'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'contrast'
|
|
63
|
+
>
|
|
64
|
+
| null
|
|
65
|
+
| undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the button is in loading state.
|
|
68
|
+
* @defaultValue false
|
|
69
|
+
*/
|
|
70
|
+
loading?: boolean | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Icon to display in loading state.
|
|
73
|
+
*/
|
|
74
|
+
loadingIcon?: string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Add a link style to the button.
|
|
77
|
+
* @defaultValue false
|
|
78
|
+
*/
|
|
79
|
+
link?: boolean | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Defines the style of the button.
|
|
82
|
+
*/
|
|
83
|
+
severity?:
|
|
84
|
+
| HintedString<
|
|
85
|
+
| 'secondary'
|
|
86
|
+
| 'success'
|
|
87
|
+
| 'info'
|
|
88
|
+
| 'warning'
|
|
89
|
+
| 'help'
|
|
90
|
+
| 'danger'
|
|
91
|
+
| 'contrast'
|
|
92
|
+
>
|
|
93
|
+
| undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Add a shadow to indicate elevation.
|
|
96
|
+
* @defaultValue false
|
|
97
|
+
*/
|
|
98
|
+
raised?: boolean | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Add a circular border radius to the button.
|
|
101
|
+
* @defaultValue false
|
|
102
|
+
*/
|
|
103
|
+
rounded?: boolean | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Add a textual class to the button without a background initially.
|
|
106
|
+
* @defaultValue false
|
|
107
|
+
*/
|
|
108
|
+
text?: boolean | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Add a border class without a background initially.
|
|
111
|
+
* @defaultValue false
|
|
112
|
+
*/
|
|
113
|
+
outlined?: boolean | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Defines the size of the button.
|
|
116
|
+
*/
|
|
117
|
+
size?: 'small' | 'large' | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* Add a plain textual class to the button without a background initially.
|
|
120
|
+
* @defaultValue false
|
|
121
|
+
*/
|
|
122
|
+
plain?: boolean | undefined;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Defines current options in Button component.
|
|
127
|
+
*/
|
|
128
|
+
export interface ButtonContext {
|
|
129
|
+
/**
|
|
130
|
+
* Current disabled state of the element as a boolean.
|
|
131
|
+
* @defaultValue false
|
|
132
|
+
*/
|
|
133
|
+
disabled: boolean;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Defines valid slots in Button component.
|
|
138
|
+
*/
|
|
139
|
+
export interface ButtonSlots {
|
|
140
|
+
/**
|
|
141
|
+
* Custom content such as icons, images and text can be placed inside the button via the default slot. Note that when slot is used, label, icon and badge properties are not included.
|
|
142
|
+
*/
|
|
143
|
+
default(): VNode[];
|
|
144
|
+
/**
|
|
145
|
+
* Custom icon template.
|
|
146
|
+
* @param {Object} scope - icon slot's params.
|
|
147
|
+
*/
|
|
148
|
+
icon(scope: {
|
|
149
|
+
/**
|
|
150
|
+
* Style class of the icon.
|
|
151
|
+
*/
|
|
152
|
+
class: string;
|
|
153
|
+
}): VNode[];
|
|
154
|
+
/**
|
|
155
|
+
* Custom loading icon template.
|
|
156
|
+
* @param {Object} scope - loading icon slot's params.
|
|
157
|
+
*/
|
|
158
|
+
loadingicon(scope: {
|
|
159
|
+
/**
|
|
160
|
+
* Style class of the loading icon.
|
|
161
|
+
*/
|
|
162
|
+
class: string;
|
|
163
|
+
}): VNode[];
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* **WangsVue - Button**
|
|
168
|
+
*
|
|
169
|
+
* _Button is an extension to standard button element with icons and theming._
|
|
170
|
+
*
|
|
171
|
+
* [Live Demo](https://fewangsit.github.io/wangsvue/table)
|
|
172
|
+
* --- ---
|
|
173
|
+
* 
|
|
174
|
+
*
|
|
175
|
+
* @group Component
|
|
176
|
+
*/
|
|
177
|
+
declare class Button extends ClassComponent<
|
|
178
|
+
ButtonProps,
|
|
179
|
+
ButtonSlots,
|
|
180
|
+
Record<string, unknown>
|
|
181
|
+
> {}
|
|
182
|
+
|
|
183
|
+
declare module '@vue/runtime-core' {
|
|
184
|
+
interface GlobalComponents {
|
|
185
|
+
Button: GlobalComponentConstructor<Button>;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export default Button;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TableColumn } from '../datatable/DataTable.vue.d';
|
|
2
|
+
import { DialogFormProps } from '../dialogform/DialogForm.vue.d';
|
|
3
|
+
import { ClassComponent } from '../ts-helpers';
|
|
4
|
+
|
|
5
|
+
export interface ButtonImportExcelProps {
|
|
6
|
+
tableName: string;
|
|
7
|
+
dialog?: Omit<DialogFormProps, 'visible'>;
|
|
8
|
+
fileUpload?: {
|
|
9
|
+
/**
|
|
10
|
+
* @default 'File Upload'
|
|
11
|
+
*/
|
|
12
|
+
label: string;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* In case field from excel is different from datatable columns
|
|
18
|
+
* Also to determine field type for field that has datatype other than string
|
|
19
|
+
*
|
|
20
|
+
* @description - Array of string should be in order based on column order in data table
|
|
21
|
+
*/
|
|
22
|
+
columnFields?: { field: string; fieldType?: TableColumn['fieldType'] }[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type ButtonImportExcelEmits = {
|
|
26
|
+
importedJson: [value: unknown[]];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
declare class ButtonImportExcel extends ClassComponent<
|
|
30
|
+
ButtonImportExcelProps,
|
|
31
|
+
ButtonImportExcelEmits,
|
|
32
|
+
unknown
|
|
33
|
+
> {}
|
|
34
|
+
|
|
35
|
+
export default ButtonImportExcel;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Asset } from '@tagsamurai/fats-api-services/src/types/oldAssetService.type';
|
|
2
|
+
|
|
3
|
+
import { QueryParams } from '../../components/datatable/DataTable.vue.d';
|
|
4
|
+
import { ClassComponent } from '../../components/ts-helpers.d';
|
|
5
|
+
|
|
6
|
+
export type AssetWithOptionalTAG = Omit<Asset, 'qr' | 'rfid'> & {
|
|
7
|
+
qr?: string | boolean;
|
|
8
|
+
rfid?: string | boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type ScanPayload = {
|
|
12
|
+
type: 'RFID' | 'QR';
|
|
13
|
+
code: string;
|
|
14
|
+
device: string; // Serial Number
|
|
15
|
+
asset?: AssetWithOptionalTAG;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type ButtonAddByScanEmits = {
|
|
19
|
+
'update:modelValue': [assets: AssetWithOptionalTAG[]];
|
|
20
|
+
'scan': [payload: ScanPayload];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export interface ButtonAddByScanProps {
|
|
24
|
+
/**
|
|
25
|
+
* Defines asset data that already in the table.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
modelValue: AssetWithOptionalTAG[];
|
|
29
|
+
reportedDisposalAssets?: boolean;
|
|
30
|
+
noDisposalAssets?: boolean;
|
|
31
|
+
queryParams?: QueryParams;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class ButtonAddByScan extends ClassComponent<
|
|
35
|
+
ButtonAddByScanProps,
|
|
36
|
+
unknown,
|
|
37
|
+
ButtonAddByScanEmits
|
|
38
|
+
> {}
|
|
39
|
+
|
|
40
|
+
export default ButtonAddByScan;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { MenuItem } from '../menuitem';
|
|
4
|
+
|
|
5
|
+
export interface ButtonBulkActionLocaleConfig {
|
|
6
|
+
/**
|
|
7
|
+
* @example `{length} data selected`
|
|
8
|
+
*/
|
|
9
|
+
currentSelectionMessage?: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @description Label for when all records have been selected.
|
|
13
|
+
* @example 'Select all ({totalRecords} data)' - totalRecords - The total number of records available to select.
|
|
14
|
+
*/
|
|
15
|
+
allRecordSelected?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @description Label for the "Select All" option in a bulk action button.
|
|
19
|
+
* @example `Select all ({totalRecords} items)` - totalRecords - The total number of records available to select.
|
|
20
|
+
*/
|
|
21
|
+
selectAllRecords?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ButtonBulkActionProps {
|
|
25
|
+
/**
|
|
26
|
+
* Disable the button.
|
|
27
|
+
*/
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* An array of data objects to be included in an action.
|
|
31
|
+
* Use as 'v-model:selectedData' to automatically reset on Cancel or Apply.
|
|
32
|
+
*/
|
|
33
|
+
selectedData: Record<string, any>[];
|
|
34
|
+
/**
|
|
35
|
+
* The total selectable data. This is optional when working with dynamic data table,
|
|
36
|
+
* just define tableName, the component will handle the rest for you
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
totalRecords?: number;
|
|
40
|
+
options: MenuItem[];
|
|
41
|
+
/**
|
|
42
|
+
* Multiple bulk action mounted at the same time will cause unexpected behavior.
|
|
43
|
+
*
|
|
44
|
+
* You need to set the appropriate id the same with the table-name where the bulkaction used for.
|
|
45
|
+
*/
|
|
46
|
+
tableName?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Specify the select manue type. Default to overlay-panel
|
|
49
|
+
*
|
|
50
|
+
* @default overlay-panel
|
|
51
|
+
* @default dropdown - for wangsvue-acts
|
|
52
|
+
*
|
|
53
|
+
* @options dropdown overlay-panel
|
|
54
|
+
*/
|
|
55
|
+
selectMenuType?: 'dropdown' | 'overlay-panel';
|
|
56
|
+
/**
|
|
57
|
+
* Specify the name/label for selected data.
|
|
58
|
+
*
|
|
59
|
+
* @example 'Asset(s)' will be displayed as '3 Asset(s) Selected'
|
|
60
|
+
* @default 'Data' for all packages
|
|
61
|
+
*/
|
|
62
|
+
naming?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ButtonBulkActionSlots {
|
|
66
|
+
/**
|
|
67
|
+
* Use additional slot like input field.
|
|
68
|
+
* The button Apply will be shown if the selected option use additional slot.
|
|
69
|
+
*
|
|
70
|
+
* @slotprops selectedOption the current selected option/action. you can do conditional based on this slotprops.
|
|
71
|
+
*/
|
|
72
|
+
addition(selectedOption: MenuItem): () => any;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type ButtonBulkActionEmits = {
|
|
76
|
+
/**
|
|
77
|
+
* Emits when Apply button is clicked.
|
|
78
|
+
*
|
|
79
|
+
* By default, 'command' on MenuItem will be executed.
|
|
80
|
+
* With this event, You can do additional actions.
|
|
81
|
+
*/
|
|
82
|
+
'apply': [];
|
|
83
|
+
/**
|
|
84
|
+
* Emits when Cancel or Apply button is clicked.
|
|
85
|
+
*/
|
|
86
|
+
'update:selectedData': [datas: Record<string, unknown>[]];
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* **WangsVue - ButtonBulkAction**
|
|
91
|
+
*
|
|
92
|
+
* _ButtonBulkAction is a component for handling bulk action for multiple data at once._
|
|
93
|
+
*
|
|
94
|
+
* --- ---
|
|
95
|
+
* 
|
|
96
|
+
*
|
|
97
|
+
* @group buttons
|
|
98
|
+
*/
|
|
99
|
+
declare const ButtonBulkAction: DefineComponent<
|
|
100
|
+
ButtonBulkActionProps,
|
|
101
|
+
ButtonBulkActionSlots,
|
|
102
|
+
ButtonBulkActionEmits
|
|
103
|
+
>;
|
|
104
|
+
|
|
105
|
+
export default ButtonBulkAction;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface ButtonCopyProps {
|
|
4
|
+
/**
|
|
5
|
+
* Text to be copied.
|
|
6
|
+
*/
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* **WangsVue - ButtonCopy**
|
|
12
|
+
*
|
|
13
|
+
* _ButtonCopy is a component for copying text to the clipboard._
|
|
14
|
+
*
|
|
15
|
+
* --- ---
|
|
16
|
+
* 
|
|
17
|
+
*
|
|
18
|
+
* @group buttons
|
|
19
|
+
*/
|
|
20
|
+
declare const ButtonCopy: DefineComponent<
|
|
21
|
+
ButtonCopyProps,
|
|
22
|
+
Record<string, unknown>,
|
|
23
|
+
Record<string, unknown>
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
export default ButtonCopy;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DataTableProps } from '../datatable/DataTable.vue.d';
|
|
2
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers.d';
|
|
3
|
+
|
|
4
|
+
export interface ButtonDownloadLocaleConfig {
|
|
5
|
+
/**
|
|
6
|
+
* Message to display on loading ovevrlay while downloading
|
|
7
|
+
*/
|
|
8
|
+
downloadingMessage: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Text when booleanValue is true
|
|
12
|
+
*/
|
|
13
|
+
trueText: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Text when booleanValue is false
|
|
17
|
+
*/
|
|
18
|
+
falseText: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ButtonDownloadProps {
|
|
22
|
+
fileName: string;
|
|
23
|
+
/**
|
|
24
|
+
* Text of the button.
|
|
25
|
+
*/
|
|
26
|
+
label?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Specify which table to be exported.
|
|
29
|
+
* When it is not specified, the default name of data table will be used.
|
|
30
|
+
*
|
|
31
|
+
* @default 'datatable'
|
|
32
|
+
*/
|
|
33
|
+
tableName?: string;
|
|
34
|
+
/**
|
|
35
|
+
* If you want to download multiple table in 1 excel
|
|
36
|
+
*/
|
|
37
|
+
multiTableNames?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Texts below table in downloaded excel
|
|
40
|
+
*/
|
|
41
|
+
additionalTextBelowTable?: (string | string[])[];
|
|
42
|
+
/**
|
|
43
|
+
* If this props exist, download data from provided configs instead syncing with data tables
|
|
44
|
+
*/
|
|
45
|
+
dataConfigs?: Pick<
|
|
46
|
+
DataTableProps,
|
|
47
|
+
'columns' | 'fetchFunction' | 'data' | 'tableTitle'
|
|
48
|
+
>[];
|
|
49
|
+
/**
|
|
50
|
+
* Specify the error message download excel when tableConfigs is in use
|
|
51
|
+
*
|
|
52
|
+
* @example 'Error, failed to download {fileName}' - fileName will be replaced
|
|
53
|
+
*/
|
|
54
|
+
excelToastErrorMessage?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* **WangsVue - ButtonDownload**
|
|
59
|
+
*
|
|
60
|
+
* _Trigger DataTable Export Excel_
|
|
61
|
+
*
|
|
62
|
+
* [Live Demo](https://fewangsit.github.io/wangsvue/button)
|
|
63
|
+
* --- ---
|
|
64
|
+
* 
|
|
65
|
+
*
|
|
66
|
+
* @group Component
|
|
67
|
+
*/
|
|
68
|
+
declare class ButtonDownload extends ClassComponent<
|
|
69
|
+
ButtonDownloadProps,
|
|
70
|
+
Record<string, unknown>,
|
|
71
|
+
Record<string, unknown>
|
|
72
|
+
> {}
|
|
73
|
+
|
|
74
|
+
declare module '@vue/runtime-core' {
|
|
75
|
+
interface GlobalComponents {
|
|
76
|
+
ButtonDownload: GlobalComponentConstructor<ButtonDownload>;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export default ButtonDownload;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface ButtonFilterProps {
|
|
4
|
+
/**
|
|
5
|
+
* Integrate with datatable with table name
|
|
6
|
+
*/
|
|
7
|
+
tableName?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare const ButtonFilter: DefineComponent<ButtonFilterProps>;
|
|
11
|
+
|
|
12
|
+
export default ButtonFilter;
|