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

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 (146) 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 +30 -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 +193 -0
  11. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
  12. package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
  13. package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
  14. package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
  15. package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
  16. package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
  17. package/components/buttonscan/helpers/getErrorCode.helper.d.ts +3 -0
  18. package/components/buttonscan/helpers/index.d.ts +1 -0
  19. package/components/buttonscan/workers/scanner.worker.d.ts +1 -0
  20. package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
  21. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
  22. package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
  23. package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
  24. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +16 -0
  25. package/components/calendar/BaseCalendar.vue.d.ts +127 -0
  26. package/components/calendar/Calendar.vue.d.ts +570 -0
  27. package/components/card/Card.vue.d.ts +139 -0
  28. package/components/checkbox/Checkbox.vue.d.ts +329 -0
  29. package/components/customcolumn/ColumnList.vue.d.ts +47 -0
  30. package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
  31. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +16 -0
  32. package/components/datatable/DataTable.vue.d.ts +735 -0
  33. package/components/datatable/MultiRow.vue.d.ts +36 -0
  34. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +1 -0
  35. package/components/datatable/helpers/filter.helper.d.ts +38 -0
  36. package/components/datatable/helpers/index.d.ts +6 -0
  37. package/components/datatable/helpers/readConfig.helper.d.ts +5 -0
  38. package/components/datatable/store/dataTable.store.d.ts +25 -0
  39. package/components/dialog/Dialog.vue.d.ts +464 -0
  40. package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
  41. package/components/dialogform/DialogForm.vue.d.ts +349 -0
  42. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
  43. package/components/dropdown/Dropdown.vue.d.ts +274 -0
  44. package/components/editor/CodeSnippetAdapter.vue.d.ts +152 -0
  45. package/components/editor/Editor.vue.d.ts +191 -0
  46. package/components/editor/EditorButton.vue.d.ts +35 -0
  47. package/components/editor/MentionList.vue.d.ts +49 -0
  48. package/components/editor/MentionSection.vue.d.ts +152 -0
  49. package/components/editor/codeSnippetExtension.d.ts +3 -0
  50. package/components/editor/mentionSectionExtension.d.ts +3 -0
  51. package/components/editor/suggestion.d.ts +2 -0
  52. package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
  53. package/components/fileupload/FileUpload.vue.d.ts +169 -0
  54. package/components/filtercontainer/FilterContainer.vue.d.ts +181 -0
  55. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +14 -0
  56. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +7 -0
  57. package/components/filtercontainer/helpers/getOption.helper.d.ts +12 -0
  58. package/components/form/Form.vue.d.ts +316 -0
  59. package/components/icon/Icon.vue.d.ts +256 -0
  60. package/components/image/Image.vue.d.ts +403 -0
  61. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +59 -0
  62. package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
  63. package/components/imagecompressor/ImageInputInfo.vue.d.ts +55 -0
  64. package/components/index.d.ts +58 -0
  65. package/components/inputbadge/InputBadge.vue.d.ts +122 -0
  66. package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
  67. package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
  68. package/components/inputemail/InputEmail.vue.d.ts +25 -0
  69. package/components/inputnumber/InputNumber.vue.d.ts +282 -0
  70. package/components/inputpassword/InputPassword.vue.d.ts +32 -0
  71. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
  72. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +8 -0
  73. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
  74. package/components/inputsearch/InputSearch.vue.d.ts +32 -0
  75. package/components/inputtext/InputText.vue.d.ts +352 -0
  76. package/components/inputurl/InputURL.vue.d.ts +36 -0
  77. package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
  78. package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
  79. package/components/loading/Loading.vue.d.ts +47 -0
  80. package/components/loading/store/loading.store.d.ts +8 -0
  81. package/components/menu/Menu.vue.d.ts +390 -0
  82. package/components/menu/helpers/filterMenu.helper.d.ts +15 -0
  83. package/components/menu/helpers/index.d.ts +1 -0
  84. package/components/menuitem/MenuItem.vue +70 -0
  85. package/components/menuitem/MenuItem.vue.d.ts +39 -0
  86. package/components/menuitem/index.d.ts +106 -0
  87. package/components/multiselect/MultiSelect.vue.d.ts +194 -0
  88. package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
  89. package/components/passthrough/index.d.ts +16 -0
  90. package/components/tabmenu/TabMenu.vue.d.ts +288 -0
  91. package/components/textarea/Textarea.vue.d.ts +170 -0
  92. package/components/timeline/Timeline.vue.d.ts +121 -0
  93. package/components/timeline/TimelineContentByType.vue.d.ts +64 -0
  94. package/components/toast/Toast.vue.d.ts +367 -0
  95. package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
  96. package/components/tree/Tree.vue.d.ts +148 -0
  97. package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
  98. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
  99. package/components/tree/helpers/index.d.ts +3 -0
  100. package/components/ts-helpers.d.ts +85 -0
  101. package/components/username/UserName.vue.d.ts +113 -0
  102. package/components/userwithicon/UserWithIcon.vue.d.ts +19 -0
  103. package/config/defaultProps.d.ts +3 -0
  104. package/config/index.d.ts +3 -0
  105. package/config/locale.d.ts +3 -0
  106. package/event-bus/mitt.d.ts +25 -7
  107. package/loading-page-BrQattYE.js +1 -0
  108. package/loading-page-CgfbWppy.js +1 -0
  109. package/loading-page-CoC9UhfC.js +4 -0
  110. package/loading-page-CoXtqoc9.js +4 -0
  111. package/loading-page-DbLuqCHa.js +1 -0
  112. package/loading-page-f8D03l3G.js +4 -0
  113. package/loading-plane-CgfbWppy.js +1 -0
  114. package/loading-plane-CoXtqoc9.js +4 -0
  115. package/loading-table-Bdr9ZhtP.js +1 -0
  116. package/loading-table-ByUoWqUo.js +4 -0
  117. package/loading-table-BygEMzFM.js +4 -0
  118. package/loading-table-BzrSQlA0.js +1 -0
  119. package/loading-table-D9bw9OcI.js +4 -0
  120. package/loading-table-chOgXi94.js +1 -0
  121. package/main.d.ts +31 -0
  122. package/no-data-CTKux8RI.js +4 -0
  123. package/no-data-Cgze_Rvp.js +1 -0
  124. package/no-data-DLHO1L_u.js +4 -0
  125. package/no-data-Dep79CBh.js +1 -0
  126. package/no-data-g0dJCy2p.js +4 -0
  127. package/no-data-y1X5WtcQ.js +1 -0
  128. package/package.json +1 -1
  129. package/plugins/WangsVue.d.ts +64 -14
  130. package/plugins/formValidation.d.ts +11 -2
  131. package/plugins/i18n-extension.d.ts +4 -0
  132. package/plugins/i18n.d.ts +8 -4
  133. package/style.css +1 -0
  134. package/utils/addAttachment.util.d.ts +18 -2
  135. package/utils/date.util.d.ts +33 -4
  136. package/utils/filterOptions.util.d.ts +3 -1
  137. package/utils/genPlaceholder.util.d.ts +11 -6
  138. package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
  139. package/utils/index.d.ts +34 -0
  140. package/utils/listenSidebarChanges.util.d.ts +16 -0
  141. package/utils/mergePropsWithDefaults.util.d.ts +4 -1
  142. package/utils/object.util.d.ts +14 -3
  143. package/utils/role.util.d.ts +69 -0
  144. package/utils/textFormatter.util.d.ts +15 -3
  145. package/wangsvue-fats.es.js +123730 -0
  146. package/wangsvue-fats.system.js +478 -0
@@ -0,0 +1,570 @@
1
+ import { TransitionProps } from 'vue';
2
+ import { CustomValidation } from '../form/Form.vue.d';
3
+ import { ClassComponent } from '../ts-helpers';
4
+
5
+ export interface CalendarLocaleConfig {
6
+ defaultPlaceholder: string;
7
+
8
+ /**
9
+ * Error message displayed when no selection has been made.
10
+ *
11
+ * This message can include placeholders:
12
+ * - `{label}`: Replaced with the value of `props.label`.
13
+ * - `{formattedLabel}`: Replaced with the value of `props.label` formatted with an appropriate article (a/an).
14
+ *
15
+ * @example
16
+ * // If `props.label` is 'Date', the error message will be:
17
+ * '{label} must be picked' - 'Date must be picked'
18
+ *
19
+ * @example
20
+ * // If `props.label` is 'Audit Date', the error message will be:
21
+ * 'You must pick {formattedLabel}' - 'You must pick an Audit date'
22
+ */
23
+ emptyInvalidText?: string;
24
+
25
+ /**
26
+ * The cancel button when props.showTime or showButton
27
+ *
28
+ * @default 'Cancel'
29
+ */
30
+ cancelFooterButtonLabel?: string;
31
+
32
+ /**
33
+ * The apply button when props.showTime or showButton
34
+ *
35
+ * @default 'Apply'
36
+ */
37
+ applyFooterButtonLabel?: string;
38
+ }
39
+
40
+ export type CalendarPresetOptionMethodType = (
41
+ options: Partial<CalendarPresetMethodOptions>,
42
+ ) => CalendarPresetAttributes;
43
+
44
+ /**
45
+ * Defines the possible transition types for Calendar.
46
+ */
47
+ export type CalendarPresetTransitionType =
48
+ | {
49
+ transition?: TransitionProps;
50
+ }
51
+ | ((options: CalendarPresetMethodOptions) => TransitionProps)
52
+ | undefined;
53
+
54
+ /**
55
+ * Options passed to methods for pass-through properties.
56
+ */
57
+ export interface CalendarPresetMethodOptions {
58
+ instance: any;
59
+ props: CalendarProps;
60
+ state: CalendarState;
61
+ context: Partial<CalendarContext>;
62
+ attrs: any;
63
+ parent: any;
64
+ global: object | undefined;
65
+ }
66
+
67
+ /**
68
+ * Attributes for Calendar pass-through customization.
69
+ */
70
+ export interface CalendarPresetAttributes {
71
+ class?: any;
72
+ style?: any;
73
+ [key: string]: any;
74
+ }
75
+
76
+ /**
77
+ * Defines the structure for Calendar pass-through class options.
78
+ * Used in preset.
79
+ */
80
+ export interface CalendarPresetOptions {
81
+ root?: CalendarPresetOptionMethodType;
82
+ input?: CalendarPresetOptionMethodType;
83
+ inputicon?: CalendarPresetAttributes;
84
+ dropdownbutton?: {
85
+ root?: CalendarPresetAttributes;
86
+ };
87
+ panel?: CalendarPresetOptionMethodType;
88
+ datepickerMask?: CalendarPresetAttributes;
89
+ header?: CalendarPresetOptionMethodType;
90
+ previousbutton?: CalendarPresetOptionMethodType;
91
+ title?: CalendarPresetOptionMethodType;
92
+ monthTitle?: CalendarPresetAttributes;
93
+ yearTitle?: CalendarPresetOptionMethodType;
94
+ nextbutton?: CalendarPresetOptionMethodType;
95
+ table?: CalendarPresetAttributes;
96
+ tableheadercell?: CalendarPresetAttributes;
97
+ tablebodyrow?: CalendarPresetAttributes;
98
+ weekheader?: CalendarPresetAttributes;
99
+ weeknumber?: CalendarPresetAttributes;
100
+ weekday?: CalendarPresetAttributes;
101
+ day?: CalendarPresetAttributes;
102
+ weeklabelcontainer?: CalendarPresetOptionMethodType;
103
+ daylabel?: CalendarPresetOptionMethodType;
104
+ monthpicker?: CalendarPresetAttributes;
105
+ month?: CalendarPresetOptionMethodType;
106
+ yearpicker?: CalendarPresetAttributes;
107
+ year?: CalendarPresetOptionMethodType;
108
+ timepicker?: CalendarPresetAttributes;
109
+ separatorcontainer?: CalendarPresetAttributes;
110
+ separator?: CalendarPresetAttributes;
111
+ hourpicker?: CalendarPresetAttributes;
112
+ timepickerlabel?: CalendarPresetAttributes;
113
+ minutepicker?: CalendarPresetAttributes;
114
+ secondPicker?: CalendarPresetAttributes;
115
+ incrementbutton?: CalendarPresetAttributes;
116
+ incrementicon?: CalendarPresetAttributes;
117
+ decrementbutton?: CalendarPresetAttributes;
118
+ decrementicon?: CalendarPresetAttributes;
119
+ container?: CalendarPresetAttributes;
120
+ groupcontainer?: CalendarPresetAttributes;
121
+ group?: CalendarPresetAttributes;
122
+ buttonbar?: CalendarPresetAttributes;
123
+ todaybutton?: {
124
+ root?: CalendarPresetAttributes;
125
+ };
126
+ clearbutton?: {
127
+ root?: CalendarPresetAttributes;
128
+ };
129
+ transition?: {
130
+ enterFromClass?: string;
131
+ enterActiveClass?: string;
132
+ leaveActiveClass?: string;
133
+ leaveToClass?: string;
134
+ };
135
+ }
136
+
137
+ /**
138
+ * Represents the current state of the Calendar component.
139
+ */
140
+ export interface CalendarState {
141
+ currentView: CalendarProps['view'];
142
+ }
143
+
144
+ /**
145
+ * Defines current month options.
146
+ */
147
+ export interface CalendarMonthOptions {
148
+ /**
149
+ * Month index.
150
+ */
151
+ value: number;
152
+
153
+ /**
154
+ * Selectable state of the month.
155
+ */
156
+ selectable: boolean;
157
+ }
158
+
159
+ /**
160
+ * Defines current year options.
161
+ */
162
+ export interface CalendarYearOptions {
163
+ /**
164
+ * Year value.
165
+ */
166
+ value: number;
167
+
168
+ /**
169
+ * Selectable state of the year.
170
+ */
171
+ selectable: boolean;
172
+ }
173
+
174
+ export interface CalendarDate {
175
+ /**
176
+ * Current date.
177
+ */
178
+ day: number;
179
+
180
+ /**
181
+ * Current month state.
182
+ */
183
+ month: number;
184
+
185
+ /**
186
+ * Current year state.
187
+ */
188
+ year: number;
189
+
190
+ /**
191
+ * Current today state of the calendar's day.
192
+ */
193
+ today: boolean;
194
+
195
+ /**
196
+ * Selectable state of the day.
197
+ */
198
+ selectable: boolean;
199
+
200
+ /**
201
+ * Wether the day is on other month than currently shown
202
+ */
203
+ otherMonth: boolean;
204
+ }
205
+
206
+ /**
207
+ * Provides contextual information for the Calendar component.
208
+ */
209
+ export interface CalendarContext {
210
+ /**
211
+ * Current date.
212
+ */
213
+ date: CalendarDate;
214
+
215
+ /**
216
+ * Current today state of the calendar's day.
217
+ * @defaultValue false
218
+ */
219
+ today: boolean;
220
+
221
+ /**
222
+ * Current other month state of the calendar's day.
223
+ */
224
+ otherMonth: boolean;
225
+
226
+ /**
227
+ * Current selected state of the calendar's day or month or year.
228
+ * @defaultValue false
229
+ */
230
+ selected: boolean;
231
+
232
+ /**
233
+ * Current date is the first selected on range selection
234
+ */
235
+ firstSelected: boolean;
236
+
237
+ /**
238
+ * Current date is the last selected on range selection
239
+ */
240
+ lastSelected: boolean;
241
+
242
+ /**
243
+ * Current disabled state of the calendar's day or month or year.
244
+ * @defaultValue false
245
+ */
246
+ disabled: boolean;
247
+
248
+ /**
249
+ * Current month state.
250
+ */
251
+ month: CalendarMonthOptions;
252
+
253
+ /**
254
+ * Current month index state.
255
+ */
256
+ monthIndex: number;
257
+
258
+ /**
259
+ * Current year state.
260
+ */
261
+ year: CalendarYearOptions;
262
+ }
263
+
264
+ /**
265
+ * Calendar component props
266
+ */
267
+ export interface CalendarProps {
268
+ /**
269
+ * Bound value of the component.
270
+ * Supports single or multiple date selection.
271
+ *
272
+ * Used with `v-model`.
273
+ * It should not be used with useValidator. v-model should only be used when the Calendar not used in form
274
+ * @defaultValue null
275
+ */
276
+ modelValue?: Date | Date[] | null;
277
+
278
+ /**
279
+ * Initial date value for pre-filling forms.
280
+ * Typically used for editing existing records.
281
+ *
282
+ * Accepts epoch timestamps in milliseconds.
283
+ *
284
+ * It will only watch for changes once.
285
+ */
286
+ dateValue?: number | number[];
287
+
288
+ /**
289
+ * Epoch time in milliseconds representing the selected date(s).
290
+ *
291
+ * Can be used with `v-model:epochTimeMillis` for two way binding.
292
+ */
293
+ epochTimeMillis?: number | number[];
294
+
295
+ /**
296
+ * Defines the format in which the field value is handled.
297
+ * - `'date'` returns a `Date` object.
298
+ * - `'millis'` returns an epoch timestamp in milliseconds.
299
+ *
300
+ * @default millis
301
+ */
302
+ valueFormat?: 'date' | 'millis';
303
+
304
+ /**
305
+ * Display label on top of Date Input.
306
+ */
307
+ label?: string;
308
+
309
+ /**
310
+ * The input placeholder
311
+ * @default - The value on locale config {@link CalendarLocaleConfig.defaultPlaceholder}
312
+ */
313
+ placeholder?: string;
314
+ disabled?: boolean;
315
+
316
+ /**
317
+ * Make the calendar states readonly.
318
+ * If true, calendar will not allow user interaction with it. But user can view currently selected date and time.
319
+ *
320
+ * @default false
321
+ */
322
+ readonly?: boolean;
323
+
324
+ /**
325
+ * Identifier of the underlying input element.
326
+ */
327
+ inputId?: string | undefined;
328
+
329
+ /**
330
+ * Identifier of the wrapper element.
331
+ */
332
+ id?: string | undefined;
333
+
334
+ /**
335
+ * Whether single date or date range model value.
336
+ *
337
+ * @default 'single'
338
+ * @deprecated use selectionMode
339
+ */
340
+ mode?: 'range' | 'single';
341
+
342
+ /**
343
+ * Whether single date or date range model value.
344
+ *
345
+ * @default 'single'
346
+ */
347
+ selectionMode?: 'range' | 'single';
348
+
349
+ /**
350
+ * Whether to hide the overlay on date selection when showTime is enabled.
351
+ * @defaultValue false
352
+ */
353
+ hideOnDateTimeSelect?: boolean | undefined;
354
+
355
+ /**
356
+ * Whether to hide the overlay on date selection is completed when selectionMode is range.
357
+ * @defaultValue true - when showButtons and showTime false
358
+ * @defaultValue false - when showButtons and showTime true
359
+ */
360
+ hideOnRangeSelection?: boolean | undefined;
361
+
362
+ /**
363
+ * Type of view to display.
364
+ * @defaultValue date
365
+ */
366
+ view?: 'date' | 'month' | 'year' | undefined;
367
+
368
+ /**
369
+ * Wheter show year picker or not
370
+ *
371
+ * @default true
372
+ */
373
+ showYear?: boolean;
374
+
375
+ /**
376
+ * Show button Apply and cancel on footer.
377
+ *
378
+ * If shown, the modelValue will be updated on button Apply clicked.
379
+ *
380
+ * @default false;
381
+ */
382
+ showButtons?: boolean;
383
+
384
+ /**
385
+ * Enable Validator using vee-validate. Combine with Form component that handle form validation.
386
+ */
387
+ useValidator?: boolean;
388
+
389
+ /**
390
+ * When used as field in From Validation using Form component,
391
+ * specify the unique field name, match with your needs for API request.
392
+ */
393
+ fieldName?: string;
394
+
395
+ /**
396
+ * Show information to user about the field.
397
+ */
398
+ fieldInfo?: string;
399
+
400
+ /**
401
+ * Whether this field should be filled or not.
402
+ */
403
+ mandatory?: boolean;
404
+
405
+ /**
406
+ * Show the text (opsional)
407
+ *
408
+ * @default true if mandatory true
409
+ */
410
+ showOptionalText?: boolean;
411
+
412
+ /**
413
+ * Sets the invalid state.
414
+ */
415
+ invalid?: boolean;
416
+
417
+ /**
418
+ * Set the custom validator message.
419
+ * By default each field has preserved with its validator message, you don't need to worrying about the message.
420
+ */
421
+ validatorMessage?: string | CustomValidation<'empty'>;
422
+
423
+ /**
424
+ * Set custom validation message for certain condition
425
+ *
426
+ * @deprecated - use validatorMessage {@link validatorMessage}
427
+ */
428
+ customValidation?: CustomValidation;
429
+
430
+ /**
431
+ * Format of the date. Defaults to PrimeVue Locale configuration.
432
+ */
433
+ dateFormat?: string | undefined;
434
+
435
+ /**
436
+ * Specifies hour format.
437
+ * @defaultValue 24
438
+ */
439
+ hourFormat?: '12' | '24' | undefined;
440
+
441
+ /**
442
+ * Defines the calendar to use hour picker.
443
+ */
444
+ showTime?: boolean;
445
+
446
+ /**
447
+ * Separator of time selector.
448
+ * @defaultValue :
449
+ */
450
+ timeSeparator?: string | undefined;
451
+
452
+ /**
453
+ * Hours to change per step.
454
+ * @defaultValue 1
455
+ */
456
+ stepHour?: number | undefined;
457
+
458
+ /**
459
+ * Minutes to change per step.
460
+ * @defaultValue 1
461
+ */
462
+ stepMinute?: number | undefined;
463
+
464
+ /**
465
+ * Formats the hour picker to 12 hour format.
466
+ * @default true
467
+ *
468
+ * @deprecated use {@link hourFormat}
469
+ */
470
+ useTimeFormat?: boolean;
471
+
472
+ /**
473
+ * The minimum selectable date.
474
+ */
475
+ minDate?: Date | undefined;
476
+
477
+ /**
478
+ * The maximum selectable date.
479
+ */
480
+ maxDate?: Date | undefined;
481
+
482
+ /**
483
+ * The maximum selectable year.
484
+ *
485
+ * The full year: 2020
486
+ * @todo Support number, currently only support 'current'
487
+ */
488
+ maxYear?: 'current' | number | undefined;
489
+
490
+ /**
491
+ * The maximum selectable months.
492
+ *
493
+ * Number 0-11
494
+ *
495
+ * @todo Support number, currently only support 'current'
496
+ */
497
+ maxMonth?: 'current' | number | undefined;
498
+ /**
499
+ * When using range selection mode, selecting only the "start date" (without an "end date") will, by default, return a range ending 24 hours later.
500
+ * Enabling this prop will instead return the exact dates selected, without adding an extra day.
501
+ *
502
+ * @example Selecting dates from the 1st to the 5th will return an array of epoch timestamps for each day: [1st, 2nd, 3rd, 4th, 5th].
503
+ * @default false
504
+ * @requires selectionMode = 'range'
505
+ */
506
+ exactSelection?: boolean;
507
+ }
508
+
509
+ /**
510
+ * Custom Calendar month change event.
511
+ * @see {@link CalendarEmits.monthChange}
512
+ */
513
+ export interface CalendarMonthChangeEvent {
514
+ /**
515
+ * New month.
516
+ */
517
+ month: number;
518
+
519
+ /**
520
+ * New year.
521
+ */
522
+ year: number;
523
+ }
524
+
525
+ /**
526
+ * Custom Calendar year change event.
527
+ * @see {@link CalendarEmits.yearChange}
528
+ */
529
+ export interface CalendarYearChangeEvent {
530
+ /**
531
+ * New month.
532
+ */
533
+ month: number;
534
+
535
+ /**
536
+ * New year.
537
+ */
538
+ year: number;
539
+ }
540
+
541
+ /**
542
+ * Calendar component emits
543
+ */
544
+ export type CalendarEmits = {
545
+ 'update:modelValue': [
546
+ date: Date | Array<Date> | Array<Date | null> | undefined | null,
547
+ ];
548
+ 'update:epochTimeMillis': [millis?: number | number[]];
549
+ 'monthChange': [event: CalendarMonthChangeEvent];
550
+ 'yearChange': [event: CalendarYearChangeEvent];
551
+ 'dateSelect': [date: Date | Date[]];
552
+ };
553
+
554
+ /**
555
+ * **WangsVue - Calendar**
556
+ *
557
+ * _Handle input date with form validation._
558
+ *
559
+ * --- ---
560
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
561
+ *
562
+ * @group form
563
+ */
564
+ declare class Calendar extends ClassComponent<
565
+ CalendarProps,
566
+ unknown,
567
+ CalendarEmits
568
+ > {}
569
+
570
+ export default Calendar;
@@ -0,0 +1,139 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ /**
3
+ *
4
+ * Card is a flexible container component.
5
+ *
6
+ * @module card
7
+ *
8
+ */
9
+ import { VNode } from 'vue';
10
+ import { ComponentHooks } from '../basecomponent';
11
+ import { PassThroughOptions } from '../passthrough';
12
+ import {
13
+ ClassComponent,
14
+ GlobalComponentConstructor,
15
+ PassThrough,
16
+ } from '../ts-helpers';
17
+
18
+ export declare type CardPassThroughOptionType =
19
+ | CardPassThroughAttributes
20
+ | null
21
+ | undefined;
22
+
23
+ /**
24
+ * Custom passthrough(pt) options.
25
+ * @see {@link CardProps.pt}
26
+ */
27
+ export interface CardPassThroughOptions {
28
+ /**
29
+ * Used to pass attributes to the root's DOM element.
30
+ */
31
+ root?: CardPassThroughOptionType;
32
+ /**
33
+ * Used to pass attributes to the header's DOM element.
34
+ */
35
+ header?: CardPassThroughOptionType;
36
+ /**
37
+ * Used to pass attributes to the body's DOM element.
38
+ */
39
+ body?: CardPassThroughOptionType;
40
+ /**
41
+ * Used to pass attributes to the caption's DOM element.
42
+ */
43
+ caption?: CardPassThroughOptionType;
44
+ /**
45
+ * Used to pass attributes to the title's DOM element.
46
+ */
47
+ title?: CardPassThroughOptionType;
48
+ /**
49
+ * Used to pass attributes to the subtitle's DOM element.
50
+ */
51
+ subtitle?: CardPassThroughOptionType;
52
+ /**
53
+ * Used to pass attributes to the content's DOM element.
54
+ */
55
+ content?: CardPassThroughOptionType;
56
+ /**
57
+ * Used to pass attributes to the footer's DOM element.
58
+ */
59
+ footer?: CardPassThroughOptionType;
60
+ /**
61
+ * Used to manage all lifecycle hooks.
62
+ * @see {@link BaseComponent.ComponentHooks}
63
+ */
64
+ hooks?: ComponentHooks;
65
+ }
66
+
67
+ /**
68
+ * Custom passthrough attributes for each DOM elements
69
+ */
70
+ export interface CardPassThroughAttributes {
71
+ [key: string]: any;
72
+ }
73
+
74
+ /**
75
+ * Defines valid properties in Card component.
76
+ */
77
+ export interface CardProps {
78
+ /**
79
+ * Used to pass attributes to DOM elements inside the component.
80
+ * @type {CardPassThroughOptions}
81
+ */
82
+ pt?: PassThrough<CardPassThroughOptions>;
83
+ /**
84
+ * Used to configure passthrough(pt) options of the component.
85
+ * @type {PassThroughOptions}
86
+ */
87
+ ptOptions?: PassThroughOptions;
88
+ /**
89
+ * When enabled, it removes component related styles in the core.
90
+ * @defaultValue false
91
+ */
92
+ unstyled?: boolean;
93
+ }
94
+
95
+ /**
96
+ * Defines valid slots in Card component.
97
+ */
98
+ export interface CardSlots {
99
+ /**
100
+ * Custom header template.
101
+ */
102
+ header(): VNode[];
103
+ /**
104
+ * Custom title template.
105
+ */
106
+ title(): VNode[];
107
+ /**
108
+ * Custom subtitle template.
109
+ */
110
+ subtitle(): VNode[];
111
+ /**
112
+ * Custom content template.
113
+ */
114
+ content(): VNode[];
115
+ /**
116
+ * Custom footer template.
117
+ */
118
+ footer(): VNode[];
119
+ }
120
+
121
+ /**
122
+ * **WangsVue - Card**
123
+ *
124
+ * _Card is a flexible container component._
125
+ *
126
+ * --- ---
127
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
128
+ *
129
+ * @group Component
130
+ */
131
+ declare class Card extends ClassComponent<CardProps, CardSlots, unknown> {}
132
+
133
+ declare module '@vue/runtime-core' {
134
+ interface GlobalComponents {
135
+ Card: GlobalComponentConstructor<Card>;
136
+ }
137
+ }
138
+
139
+ export default Card;