@fewangsit/wangsvue-fats 1.0.0-alpha.31 → 1.0.0-alpha.32

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.
Files changed (101) hide show
  1. package/components/animation/Animation.vue.d.ts +24 -0
  2. package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
  3. package/components/assetinfo/AssetInfo.vue.d.ts +34 -0
  4. package/components/badge/Badge.vue.d.ts +73 -0
  5. package/components/badgegroup/BadgeGroup.vue.d.ts +52 -0
  6. package/components/basecomponent/index.d.ts +28 -0
  7. package/components/basetree/BaseTree.vue.d.ts +591 -0
  8. package/components/basetree/TreeNode.vue.d.ts +35 -0
  9. package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
  10. package/components/button/Button.vue.d.ts +188 -0
  11. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
  12. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
  13. package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
  14. package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
  15. package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
  16. package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
  17. package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
  18. package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
  19. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
  20. package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -0
  21. package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
  22. package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
  23. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
  24. package/components/calendar/Calendar.vue.d.ts +570 -0
  25. package/components/card/Card.vue.d.ts +139 -0
  26. package/components/checkbox/Checkbox.vue.d.ts +329 -0
  27. package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
  28. package/components/datatable/DataTable.vue.d.ts +735 -0
  29. package/components/dialog/Dialog.vue.d.ts +464 -0
  30. package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
  31. package/components/dialogform/DialogForm.vue.d.ts +349 -0
  32. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
  33. package/components/dropdown/Dropdown.vue.d.ts +274 -0
  34. package/components/editor/Editor.vue.d.ts +191 -0
  35. package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
  36. package/components/fileupload/FileUpload.vue.d.ts +169 -0
  37. package/components/filtercontainer/FilterContainer.vue.d.ts +184 -0
  38. package/components/form/Form.vue.d.ts +316 -0
  39. package/components/icon/Icon.vue.d.ts +256 -0
  40. package/components/image/Image.vue.d.ts +403 -0
  41. package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
  42. package/components/index.d.ts +58 -0
  43. package/components/inputbadge/InputBadge.vue.d.ts +122 -0
  44. package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
  45. package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
  46. package/components/inputemail/InputEmail.vue.d.ts +25 -0
  47. package/components/inputnumber/InputNumber.vue.d.ts +282 -0
  48. package/components/inputpassword/InputPassword.vue.d.ts +32 -0
  49. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
  50. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
  51. package/components/inputsearch/InputSearch.vue.d.ts +36 -0
  52. package/components/inputtext/InputText.vue.d.ts +352 -0
  53. package/components/inputurl/InputURL.vue.d.ts +39 -0
  54. package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
  55. package/components/languagedropdown/LanguageDropdown.vue.d.ts +32 -0
  56. package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
  57. package/components/loading/Loading.vue.d.ts +47 -0
  58. package/components/loading/store/loading.store.d.ts +8 -0
  59. package/components/menu/Menu.vue.d.ts +390 -0
  60. package/components/menuitem/index.d.ts +106 -0
  61. package/components/multiselect/MultiSelect.vue.d.ts +194 -0
  62. package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
  63. package/components/passthrough/index.d.ts +16 -0
  64. package/components/tabmenu/TabMenu.vue.d.ts +288 -0
  65. package/components/textarea/Textarea.vue.d.ts +170 -0
  66. package/components/timeline/Timeline.vue.d.ts +121 -0
  67. package/components/toast/Toast.vue.d.ts +367 -0
  68. package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
  69. package/components/tree/Tree.vue.d.ts +148 -0
  70. package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
  71. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
  72. package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
  73. package/components/ts-helpers.d.ts +83 -0
  74. package/components/username/UserName.vue.d.ts +113 -0
  75. package/components/userwithicon/UserWithIcon.vue.d.ts +20 -0
  76. package/config/defaultProps.d.ts +3 -0
  77. package/config/index.d.ts +3 -0
  78. package/config/locale.d.ts +3 -0
  79. package/directives/focus.d.ts +1 -1
  80. package/event-bus/index.d.ts +51 -51
  81. package/event-bus/mitt.d.ts +29 -14
  82. package/main.d.ts +31 -0
  83. package/package.json +8 -4
  84. package/plugins/WangsVue.d.ts +249 -199
  85. package/plugins/formValidation.d.ts +15 -6
  86. package/plugins/i18n-extension.d.ts +4 -0
  87. package/plugins/i18n.d.ts +82 -78
  88. package/utils/date.util.d.ts +59 -30
  89. package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
  90. package/utils/index.d.ts +8 -0
  91. package/utils/listenSidebarChanges.util.d.ts +16 -0
  92. package/utils/object.util.d.ts +14 -3
  93. package/utils/role.util.d.ts +68 -0
  94. package/utils/toast.util.d.ts +78 -78
  95. package/utils/addAttachment.util.d.ts +0 -43
  96. package/utils/exportToExcel.util.d.ts +0 -20
  97. package/utils/filterOptions.util.d.ts +0 -3
  98. package/utils/genPlaceholder.util.d.ts +0 -8
  99. package/utils/getAttachmentIcon.util.d.ts +0 -8
  100. package/utils/mergePropsWithDefaults.util.d.ts +0 -20
  101. package/utils/textFormatter.util.d.ts +0 -17
@@ -0,0 +1,256 @@
1
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
2
+
3
+ export type WangsIconseverities =
4
+ | 'danger'
5
+ | 'info'
6
+ | 'warning'
7
+ | 'primary'
8
+ | 'success'
9
+ | 'secondary';
10
+
11
+ /**
12
+ * List of all available icons.
13
+ */
14
+ export type WangsIcons =
15
+ | 'add'
16
+ | 'admin-line'
17
+ | 'arrow-down'
18
+ | 'arrow-down-fill'
19
+ | 'arrow-drop-down'
20
+ | 'arrow-go-back'
21
+ | 'arrow-up-s'
22
+ | 'arrow-up-down'
23
+ | 'arrow-left'
24
+ | 'arrow-left-double'
25
+ | 'arrow-left-right'
26
+ | 'arrow-right'
27
+ | 'arrow-right-circle-line'
28
+ | 'arrow-right-double'
29
+ | 'arrow-right-fill'
30
+ | 'asset-view'
31
+ | 'asset'
32
+ | 'assignment'
33
+ | 'attachment-2'
34
+ | 'audit'
35
+ | 'barcode'
36
+ | 'barricade-line'
37
+ | 'bell'
38
+ | 'bell-alert'
39
+ | 'borrow'
40
+ | 'building'
41
+ | 'building-2'
42
+ | 'building-4'
43
+ | 'calculator'
44
+ | 'calendar'
45
+ | 'calendar-event'
46
+ | 'calendar-todo'
47
+ | 'chat'
48
+ | 'chat-check'
49
+ | 'change-tag'
50
+ | 'check'
51
+ | 'checkout'
52
+ | 'check-double-fill'
53
+ | 'checkbox-circle'
54
+ | 'checkbox-circle-fill'
55
+ | 'checkbox-blank-circle'
56
+ | 'checkbox-blank-circle-fill'
57
+ | 'checkbox-multiple'
58
+ | 'close'
59
+ | 'close-circle'
60
+ | 'close-circle-fill'
61
+ | 'cloud-line'
62
+ | 'coins'
63
+ | 'completion'
64
+ | 'dashboard'
65
+ | 'database'
66
+ | 'delete-back'
67
+ | 'delete-bin'
68
+ | 'delete-bin-7'
69
+ | 'device'
70
+ | 'disposal'
71
+ | 'download'
72
+ | 'dropbox'
73
+ | 'dragable-menu'
74
+ | 'edit'
75
+ | 'ellipsis-h'
76
+ | 'emotion-happy-fill'
77
+ | 'emotion-unhappy-fill'
78
+ | 'error'
79
+ | 'error-fill'
80
+ | 'exchange'
81
+ | 'expired'
82
+ | 'extension-borrow'
83
+ | 'eye'
84
+ | 'eye-off'
85
+ | 'flag'
86
+ | 'file-add'
87
+ | 'file-copy'
88
+ | 'file-copy-2-line'
89
+ | 'file-edit'
90
+ | 'file-history'
91
+ | 'file-history-fill'
92
+ | 'file-info'
93
+ | 'files'
94
+ | 'file-lines'
95
+ | 'file-list-2'
96
+ | 'file-list'
97
+ | 'file-settings'
98
+ | 'file-shield-line'
99
+ | 'file-shield-2'
100
+ | 'file-up'
101
+ | 'file-user'
102
+ | 'filter-fill'
103
+ | 'filter'
104
+ | 'folder'
105
+ | 'folder-add-line'
106
+ | 'group'
107
+ | 'hand-coin'
108
+ | 'handheld'
109
+ | 'history'
110
+ | 'image-add'
111
+ | 'indeterminate-circle-fill'
112
+ | 'info'
113
+ | 'information-line'
114
+ | 'infrared-thermometer'
115
+ | 'list-check'
116
+ | 'link'
117
+ | 'luggage-cart'
118
+ | 'csv'
119
+ | 'xls'
120
+ | 'doc'
121
+ | 'data'
122
+ | 'line-chart'
123
+ | 'link-unlink-m'
124
+ | 'list-settings'
125
+ | 'loader-4'
126
+ | 'logout-box-r'
127
+ | 'mail-open'
128
+ | 'mail-send'
129
+ | 'magic-line'
130
+ | 'map-2'
131
+ | 'map-pin'
132
+ | 'menu'
133
+ | 'menu-unfold'
134
+ | 'minus'
135
+ | 'money-cny-box'
136
+ | 'money-dollar-circle'
137
+ | 'more'
138
+ | 'move-to'
139
+ | 'nfc'
140
+ | 'node-tree'
141
+ | 'note'
142
+ | 'notification'
143
+ | 'pdf'
144
+ | 'pair-tag'
145
+ | 'pencil'
146
+ | 'phone'
147
+ | 'printer'
148
+ | 'printer-cloud'
149
+ | 'price-tag-3'
150
+ | 'profile'
151
+ | 'qr'
152
+ | 'qr-scan'
153
+ | 'reception'
154
+ | 'refresh'
155
+ | 'replace-tag'
156
+ | 'report-tag'
157
+ | 'repair-ticketing'
158
+ | 'rfid'
159
+ | 'round-keyboard-arrow-left'
160
+ | 'round-keyboard-arrow-right'
161
+ | 'round-keyboard-double-arrow-left'
162
+ | 'round-keyboard-double-arrow-right'
163
+ | 'search'
164
+ | 'search-line'
165
+ | 'search-eye'
166
+ | 'send-plane-line'
167
+ | 'settings'
168
+ | 'shopping-cart-2'
169
+ | 'smartphone'
170
+ | 'sort-asc'
171
+ | 'sort-desc'
172
+ | 'supplier-return'
173
+ | 'internal-return'
174
+ | 'spinner'
175
+ | 'stack'
176
+ | 'star'
177
+ | 'store'
178
+ | 'subtract'
179
+ | 'time'
180
+ | 'ticket'
181
+ | 'tools'
182
+ | 'tracking'
183
+ | 'unassign'
184
+ | 'upload-2'
185
+ | 'upload-cloud-2'
186
+ | 'user'
187
+ | 'user-add'
188
+ | 'user-follow'
189
+ | 'user-received-2-line'
190
+ | 'user-search'
191
+ | 'user-settings'
192
+ | 'user-shared-2-line'
193
+ | 'user-star'
194
+ | 'user-unfollow'
195
+ | 'verification'
196
+ | 'team'
197
+ | 'mail'
198
+ | 'timer'
199
+ | 'format-clear'
200
+ | 'code-line'
201
+ | 'link-m'
202
+ | 'list-ordered'
203
+ | 'bold'
204
+ | 'italic'
205
+ | 'underline'
206
+ | 'list-unordered'
207
+ | 'external-link'
208
+ | 'whatsapp'
209
+ | 'chat-1-line'
210
+ | 'chat-1-fill'
211
+ | 'attachment-2'
212
+ | 'save'
213
+ | 'chat-new-line'
214
+ | 'code-box-line'
215
+ | 'file-chart-line'
216
+ | 'bar-chart-line'
217
+ | 'bug-2-line'
218
+ | 'run-line'
219
+ | 'user-unfollow-line'
220
+ | 'archive-line'
221
+ | 'shield-user-line'
222
+ | 'emotion-happy-line'
223
+ | 'list-settings-line'
224
+ | 'timer-line'
225
+ | 'star-fill'
226
+ | 'focus-2-line'
227
+ | 'global-line'
228
+ | 'focus-3-line';
229
+
230
+ export interface IconProps {
231
+ icon: WangsIcons | null;
232
+ severity?: WangsIconseverities;
233
+ /**
234
+ * Show info on hover.
235
+ */
236
+ info?: string;
237
+ /**
238
+ * Set the position of tooltip.
239
+ */
240
+ tooltipPos?: 'top' | 'right' | 'bottom' | 'left';
241
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
242
+ class?: any;
243
+ }
244
+
245
+ /**
246
+ * Display icon with svg backrgounds
247
+ */
248
+ declare class Icon extends ClassComponent<IconProps, unknown, unknown> {}
249
+
250
+ declare module '@vue/runtime-core' {
251
+ interface GlobalComponents {
252
+ Icon: GlobalComponentConstructor<Icon>;
253
+ }
254
+ }
255
+
256
+ export default Icon;
@@ -0,0 +1,403 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ /**
3
+ *
4
+ * Displays an image with preview.
5
+ *
6
+ * [Live Demo](https://www.WangsVue.org/image/)
7
+ *
8
+ * @module image
9
+ *
10
+ */
11
+ import { TransitionProps, VNode } from 'vue';
12
+ import { ComponentHooks } from '../basecomponent';
13
+ import { PassThroughOptions } from '../passthrough';
14
+ import {
15
+ ClassComponent,
16
+ GlobalComponentConstructor,
17
+ PassThrough,
18
+ } from '../ts-helpers';
19
+
20
+ export declare type ImagePassThroughOptionType =
21
+ | ImagePassThroughAttributes
22
+ | ((
23
+ options: ImagePassThroughMethodOptions,
24
+ ) => ImagePassThroughAttributes | string)
25
+ | string
26
+ | null
27
+ | undefined;
28
+
29
+ export declare type ImagePassThroughTransitionType =
30
+ | TransitionProps
31
+ | ((options: ImagePassThroughMethodOptions) => TransitionProps)
32
+ | undefined;
33
+
34
+ /**
35
+ * Custom passthrough(pt) option method.
36
+ */
37
+ export interface ImagePassThroughMethodOptions {
38
+ /**
39
+ * Defines instance.
40
+ */
41
+ instance: any;
42
+ /**
43
+
44
+ * Defines valid properties.
45
+ */
46
+ props: ImageProps;
47
+ /**
48
+ * Defines current inline state.
49
+ */
50
+ state: ImageState;
51
+ /**
52
+ * Defines valid attributes.
53
+ */
54
+ attrs: any;
55
+ /**
56
+ * Defines parent options.
57
+ */
58
+ parent: any;
59
+ /**
60
+ * Defines passthrough(pt) options in global config.
61
+ */
62
+ global: object | undefined;
63
+ }
64
+
65
+ /**
66
+ * Custom passthrough(pt) options.
67
+ * @see {@link ImageProps.pt}
68
+ */
69
+ export interface ImagePassThroughOptions {
70
+ /**
71
+ * Used to pass attributes to the root's DOM element.
72
+ */
73
+ root?: ImagePassThroughOptionType;
74
+ /**
75
+ * Used to pass attributes to the image's DOM element.
76
+ */
77
+ image?: ImagePassThroughOptionType;
78
+ /**
79
+ * Used to pass attributes to the button's DOM element.
80
+ */
81
+ button?: ImagePassThroughOptionType;
82
+ /**
83
+ * Used to pass attributes to the icon's DOM element.
84
+ */
85
+ icon?: ImagePassThroughOptionType;
86
+ /**
87
+ * Used to pass attributes to the mask's DOM element.
88
+ */
89
+ mask?: ImagePassThroughOptionType;
90
+ /**
91
+ * Used to pass attributes to the toolbar's DOM element.
92
+ */
93
+ toolbar?: ImagePassThroughOptionType;
94
+ /**
95
+ * Used to pass attributes to the rotate right button's DOM element.
96
+ */
97
+ rotateRightButton?: ImagePassThroughOptionType;
98
+ /**
99
+ * Used to pass attributes to the rotate right icon's DOM element.
100
+ */
101
+ rotateRightIcon?: ImagePassThroughOptionType;
102
+ /**
103
+ * Used to pass attributes to the rotate left button's DOM element.
104
+ */
105
+ rotateLeftButton?: ImagePassThroughOptionType;
106
+ /**
107
+ * Used to pass attributes to the rotate left icon's DOM element.
108
+ */
109
+ rotateLeftIcon?: ImagePassThroughOptionType;
110
+ /**
111
+ * Used to pass attributes to the zoom out button's DOM element.
112
+ */
113
+ zoomOutButton?: ImagePassThroughOptionType;
114
+ /**
115
+ * Used to pass attributes to the zoom out icon's DOM element.
116
+ */
117
+ zoomOutIcon?: ImagePassThroughOptionType;
118
+ /**
119
+ * Used to pass attributes to the zoom in button's DOM element.
120
+ */
121
+ zoomInButton?: ImagePassThroughOptionType;
122
+ /**
123
+ * Used to pass attributes to the zoom in icon's DOM element.
124
+ */
125
+ zoomInIcon?: ImagePassThroughOptionType;
126
+ /**
127
+ * Used to pass attributes to the close button's DOM element.
128
+ */
129
+ closeButton?: ImagePassThroughOptionType;
130
+ /**
131
+ * Used to pass attributes to the close icon's DOM element.
132
+ */
133
+ closeIcon?: ImagePassThroughOptionType;
134
+ /**
135
+ * Used to pass attributes to the preview container's DOM element.
136
+ */
137
+ previewContainer?: ImagePassThroughOptionType;
138
+ /**
139
+ * Used to pass attributes to the preview's DOM element.
140
+ */
141
+ preview?: ImagePassThroughOptionType;
142
+ /**
143
+ * Used to manage all lifecycle hooks.
144
+ * @see {@link BaseComponent.ComponentHooks}
145
+ */
146
+ hooks?: ComponentHooks;
147
+ /**
148
+ * Used to control Vue Transition API.
149
+ */
150
+ transition?: ImagePassThroughTransitionType;
151
+ }
152
+
153
+ /**
154
+ * Custom passthrough attributes for each DOM elements
155
+ */
156
+ export interface ImagePassThroughAttributes {
157
+ [key: string]: any;
158
+ }
159
+
160
+ /**
161
+ * Defines current inline state in Image component.
162
+ */
163
+ export interface ImageState {
164
+ /**
165
+ * Mask visible state as a boolean.
166
+ * @defaultValue false
167
+ */
168
+ maskVisible: boolean;
169
+ /**
170
+ * Preview visible state as a boolean.
171
+ * @defaultValue false
172
+ */
173
+ previewVisible: boolean;
174
+ /**
175
+ * Rotate state as a number.
176
+ * @defaultValue 0
177
+ */
178
+ rotate: number;
179
+ /**
180
+ * Scale state as a boolean.
181
+ * @defaultValue 1
182
+ */
183
+ scale: number;
184
+ }
185
+
186
+ export type ImageGallery = {
187
+ src?: ImageProps['src'];
188
+ };
189
+
190
+ /**
191
+ * Defines valid properties in Image component.
192
+ */
193
+ export interface ImageProps {
194
+ /**
195
+ * The thumbnail image.
196
+ */
197
+ src?: string | Blob;
198
+ /**
199
+ * The thumbnail image width.
200
+ *
201
+ * small: 30
202
+ * medium: 80
203
+ * big: 125
204
+ *
205
+ * @default to 'big' or {@link width} - When the props.width specified, the size will use this value
206
+ */
207
+ size?: 'small' | 'medium' | 'big';
208
+
209
+ /**
210
+ * Set custom size in pixels (without 'px')
211
+ * @example 30
212
+ */
213
+ width?: number;
214
+ /**
215
+ * Specify the rounded level.
216
+ *
217
+ * If true, the image will be full rounded.
218
+ *
219
+ * @default 'false'
220
+ */
221
+ rounded?: boolean;
222
+ /**
223
+ * Inline style of the image element.
224
+ */
225
+ imageStyle?: any;
226
+ /**
227
+ * Style class of the image element.
228
+ */
229
+ imageClass?: any;
230
+ /**
231
+ * Show preview as galeria. Display multiple image with thumbnail.
232
+ */
233
+ galleries?: ImageGallery[];
234
+ /**
235
+ * Custom indicator icon.
236
+ * @deprecated since v3.27.0. Use 'indicator' slot.
237
+ */
238
+ indicatorIcon?: string;
239
+ /**
240
+ * Disable the zoom-in button
241
+ * @defaultValue false
242
+ */
243
+ zoomInDisabled?: boolean | undefined;
244
+ /**
245
+ * Disable the zoom-out button
246
+ * @defaultValue false
247
+ */
248
+ zoomOutDisabled?: boolean | undefined;
249
+ /**
250
+ * Used to pass attributes to DOM elements inside the component.
251
+ * @type {ImagePassThroughOptions}
252
+ */
253
+ pt?: PassThrough<ImagePassThroughOptions>;
254
+ /**
255
+ * Used to configure passthrough(pt) options of the component.
256
+ * @type {PassThroughOptions}
257
+ */
258
+ ptOptions?: PassThroughOptions;
259
+ /**
260
+ * When enabled, it removes component related styles in the core.
261
+ * @defaultValue false
262
+ */
263
+ unstyled?: boolean;
264
+
265
+ /**
266
+ * Get image url for specifics project from its server.
267
+ * @returns The full URL of the image from the server.
268
+ * @param path - the Image path from API Response JSON
269
+ * @param width - the image width in pixels
270
+ * @param height - the image height in pixels
271
+ */
272
+ getImageURL?: (
273
+ path?: string | null,
274
+ width?: number,
275
+ height?: number,
276
+ ) => string | undefined;
277
+
278
+ /**
279
+ * The placeholder to be shown when the image failed to load, or the src is not provided.
280
+ * It should be preserved by project configuration.
281
+ */
282
+ placeholder?: string | undefined;
283
+ }
284
+
285
+ /**
286
+ * Defines valid slots in Image slots.
287
+ */
288
+ export interface ImageSlots {
289
+ /**
290
+ * Custom indicator template.
291
+ */
292
+ indicator(): VNode[];
293
+ /**
294
+ * Custom indicator icon template.
295
+ */
296
+ indicatoricon(): VNode[];
297
+ /**
298
+ * Custom refresh template.
299
+ */
300
+ refresh(): VNode[];
301
+ /**
302
+ * Custom undo template.
303
+ */
304
+ undo(): VNode[];
305
+ /**
306
+ * Custom zoomout template.
307
+ */
308
+ zoomout(): VNode[];
309
+ /**
310
+ * Custom zoomin template.
311
+ */
312
+ zoomin(): VNode[];
313
+ /**
314
+ * Custom close template.
315
+ */
316
+ close(): VNode[];
317
+ /**
318
+ * Custom image template.
319
+ * @param {Object} scope - image slot's params.
320
+ */
321
+ image(scope: {
322
+ /**
323
+ * Style class of the image element.
324
+ */
325
+ class: any;
326
+ /**
327
+ * Style of the image element.
328
+ */
329
+ style: any;
330
+ /**
331
+ * Image error function.
332
+ * @deprecated since v3.39.0. Use 'errorCallback' property instead.
333
+ */
334
+ onError: () => void;
335
+ /**
336
+ * Preview click function.
337
+ */
338
+ errorCallback: () => void;
339
+ }): VNode[];
340
+ /**
341
+ * Custom preview template.
342
+ * @param {Object} scope - preview slot's params.
343
+ */
344
+ preview(scope: {
345
+ /**
346
+ * Style class of the preview image element.
347
+ */
348
+ class: any;
349
+ /**
350
+ * Style of the preview image element.
351
+ */
352
+ style: any;
353
+ /**
354
+ * Preview click function.
355
+ * @deprecated since v3.39.0. Use 'previewCallback' property instead.
356
+ */
357
+ onClick: () => void;
358
+ /**
359
+ * Preview click function.
360
+ */
361
+ previewCallback: () => void;
362
+ }): VNode[];
363
+ }
364
+
365
+ /**
366
+ * **WangsVue - Image**
367
+ *
368
+ * _Displays an image with preview._
369
+ *
370
+ * --- ---
371
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
372
+ *
373
+ * @group Component
374
+ *
375
+ */
376
+ declare class Image extends ClassComponent<ImageProps, ImageSlots, unknown> {
377
+ /**
378
+ * Triggered when the preview overlay is shown.
379
+ *
380
+ * @memberof Image
381
+ */
382
+ show(): void;
383
+ /**
384
+ * Triggered when the preview overlay is hidden.
385
+ *
386
+ * @memberof Image
387
+ */
388
+ hide(): void;
389
+ /**
390
+ * Triggered when an error occurs while loading an image file.
391
+ *
392
+ * @memberof Image
393
+ */
394
+ error(): void;
395
+ }
396
+
397
+ declare module '@vue/runtime-core' {
398
+ interface GlobalComponents {
399
+ Image: GlobalComponentConstructor<Image>;
400
+ }
401
+ }
402
+
403
+ export default Image;