@fewangsit/wangsvue-gsts 1.0.0-alpha.2 → 1.0.0-alpha.21
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 +1 -1
- package/components/badge/Badge.vue.d.ts +11 -2
- package/components/badgegroup/BadgeGroup.vue.d.ts +19 -4
- package/components/basetree/BaseTree.vue.d.ts +24 -0
- package/components/button/Button.vue.d.ts +12 -4
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +7 -0
- package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +8 -3
- package/components/calendar/BaseCalendar.vue.d.ts +4 -1
- package/components/calendar/Calendar.vue.d.ts +9 -0
- package/components/customcolumn/ColumnList.vue.d.ts +27 -0
- package/components/customcolumn/CustomColumn.vue.d.ts +2 -0
- package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +12 -0
- package/components/datatable/DataTable.vue.d.ts +35 -5
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +14 -2
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +30 -5
- package/components/dropdown/Dropdown.vue.d.ts +9 -2
- package/components/fileupload/FileUpload.vue.d.ts +22 -2
- package/components/filtercontainer/FilterContainer.vue.d.ts +49 -9
- package/components/filtercontainer/helpers/applyFilter.helper.d.ts +2 -0
- package/components/form/Form.vue.d.ts +5 -0
- package/components/icon/Icon.vue.d.ts +8 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +33 -1
- package/components/index.d.ts +2 -1
- package/components/inputurl/InputURL.vue.d.ts +1 -1
- package/components/litedropdown/LiteDropdown.vue.d.ts +1 -1
- package/components/multiselect/MultiSelect.vue.d.ts +1 -1
- package/components/tabmenu/TabMenu.vue.d.ts +1 -1
- package/components/tree/Tree.vue.d.ts +5 -3
- package/components/ts-helpers.d.ts +20 -0
- package/components/username/UserName.vue.d.ts +69 -17
- package/event-bus/index.d.ts +3 -0
- package/loading-table-Bdr9ZhtP.js +1 -0
- package/loading-table-D9bw9OcI.js +4 -0
- package/package.json +2 -2
- package/plugins/WangsVue.d.ts +10 -2
- package/style.css +1 -1
- package/types/options.type.d.ts +1 -1
- package/utils/addAttachment.util.d.ts +43 -0
- package/utils/date.util.d.ts +9 -0
- package/utils/index.d.ts +4 -1
- package/utils/object.util.d.ts +8 -1
- package/utils/toast.util.d.ts +2 -113
- package/wangsvue-gsts.es.js +24600 -25934
- package/wangsvue-gsts.system.js +133 -133
- package/assets/lottie/admin/loading-page.lottie +0 -0
- package/assets/lottie/admin/loading-table.lottie +0 -0
- package/assets/lottie/admin/no-data.lottie +0 -0
- package/assets/lottie/supplyasset/loading-page.lottie +0 -0
- package/assets/lottie/supplyasset/loading-table.lottie +0 -0
- package/assets/lottie/supplyasset/no-data.lottie +0 -0
- package/assets/lottie/workspace/loading-page.lottie +0 -0
- package/assets/lottie/workspace/loading-plane.lottie +0 -0
- package/assets/lottie/workspace/loading-table.lottie +0 -0
- package/assets/lottie/workspace/no-data.lottie +0 -0
- package/loading-table-Bb2MtjdD.js +0 -4
- package/loading-table-Br25QIny.js +0 -1
package/utils/date.util.d.ts
CHANGED
|
@@ -2,10 +2,15 @@ export type TDateFormat = 'd/m/yy' | 'm/d/yy' | 'd/mm/yy' | 'dd/mm/yy' | 'dd/mm/
|
|
|
2
2
|
export type GoDateLayout = '02/01/06' | '_2/_1/06' | '_1/_2/06' | '02 Jan 06' | 'Mon, 02 Jan 06' | 'Mon, 02 Jan 2006';
|
|
3
3
|
export type TTimeFormat = 'HH:mm' | 'HH:mm a' | 'HH:mm:ss' | 'HH:mm:ss a';
|
|
4
4
|
export type GoTimeLayout = '15:04' | '03:04 PM' | '15:04:05' | '03:04:05 PM';
|
|
5
|
+
export type CustomDateTimeFormatOptions = Omit<Intl.DateTimeFormatOptions, 'timeZone'> & {
|
|
6
|
+
timezone?: string;
|
|
7
|
+
locale?: string;
|
|
8
|
+
};
|
|
5
9
|
export type DateOptions = {
|
|
6
10
|
locale?: string;
|
|
7
11
|
dateFormat?: TDateFormat | GoDateLayout;
|
|
8
12
|
timeFormat?: TTimeFormat | GoTimeLayout;
|
|
13
|
+
timezone?: string;
|
|
9
14
|
/**
|
|
10
15
|
* Show the time in the formatted date.
|
|
11
16
|
*
|
|
@@ -18,6 +23,10 @@ export type DateOptions = {
|
|
|
18
23
|
* @default true
|
|
19
24
|
*/
|
|
20
25
|
showDate?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* This is old format (general settings), if configuration still using old settings then this option parameter can be used
|
|
28
|
+
*/
|
|
29
|
+
formatPreset?: CustomDateTimeFormatOptions;
|
|
21
30
|
};
|
|
22
31
|
export declare const formatDate: (date: Date, options?: DateOptions) => string;
|
|
23
32
|
export declare const formatISODate: (date: string | Date) => string;
|
package/utils/index.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export { formatDate, formatDateReadable } from './date.util';
|
|
|
13
13
|
export { formatISODate } from './date.util';
|
|
14
14
|
export { formatUserName, getInititalName } from './textFormatter.util';
|
|
15
15
|
export { genPlaceholder } from './genPlaceholder.util';
|
|
16
|
-
export {
|
|
16
|
+
export { getFileType, formatFile, validateFileSize, validateFileType, } from './addAttachment.util';
|
|
17
|
+
export { setNestedPropertyValue, getNestedPropertyValue, isEmptyObject, } from './object.util';
|
|
18
|
+
export { ZIndexUtils } from 'primevue/utils';
|
|
19
|
+
export type { FileType, FormattedFile } from './addAttachment.util';
|
|
17
20
|
export type { ITable } from './exportToExcel.util';
|
|
18
21
|
export type { ToastParams, ToastMethod } from './toast.util';
|
package/utils/object.util.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Utility function to get nested property value.
|
|
3
|
+
*/
|
|
4
|
+
export declare const getNestedPropertyValue: (obj: Record<string, any>, path: string) => any;
|
|
5
|
+
/**
|
|
6
|
+
* Utility function to set nested property value.
|
|
7
|
+
*/
|
|
8
|
+
export declare const setNestedPropertyValue: (obj: Record<string, any>, path: string, value: any) => void;
|
|
2
9
|
export declare const isEmptyObject: (obj: object) => boolean;
|
|
3
10
|
export declare const deepEquals: (a: object, b: object) => boolean;
|
|
4
11
|
export declare const equals: (obj1: object, obj2: object, field?: string) => boolean;
|
package/utils/toast.util.d.ts
CHANGED
|
@@ -1,114 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ToastParams {
|
|
4
|
-
/**
|
|
5
|
-
* The main message to display in the toast. Will be formatted based on template message.
|
|
6
|
-
*/
|
|
7
|
-
message: string;
|
|
8
|
-
/**
|
|
9
|
-
* Indicates whether the message is customized and does not follow the default message template.
|
|
10
|
-
* If true, custom formatting will be applied.
|
|
11
|
-
*/
|
|
12
|
-
customMessage?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* The severity level of the toast message.
|
|
15
|
-
* Can be 'success', 'error', or 'info'.
|
|
16
|
-
*/
|
|
17
|
-
severity?: ToastSeverity;
|
|
18
|
-
/**
|
|
19
|
-
* The icon to display in the toast.
|
|
20
|
-
*/
|
|
21
|
-
icon?: WangsIcons;
|
|
22
|
-
/**
|
|
23
|
-
* The custom CSS class to apply to the icon.
|
|
24
|
-
*/
|
|
25
|
-
iconClass?: any;
|
|
26
|
-
/**
|
|
27
|
-
* The error object from a catch statement, used to provide additional details for error toasts.
|
|
28
|
-
* Accepts any type of error object.
|
|
29
|
-
*/
|
|
30
|
-
error?: unknown;
|
|
31
|
-
/**
|
|
32
|
-
* The duration for which the toast will be displayed, in milliseconds.
|
|
33
|
-
* Set to 0 to show the message infinitely.
|
|
34
|
-
*
|
|
35
|
-
* @default 3000 - 3 seconds
|
|
36
|
-
*/
|
|
37
|
-
life?: number;
|
|
38
|
-
/**
|
|
39
|
-
* The name of the message group to which this toast belongs.
|
|
40
|
-
*/
|
|
41
|
-
group?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Unique identifier of the toast message.
|
|
44
|
-
*/
|
|
45
|
-
messageId?: string;
|
|
46
|
-
}
|
|
47
|
-
export interface ToastMethod {
|
|
48
|
-
add(params: ToastParams): void;
|
|
49
|
-
/**
|
|
50
|
-
* Clears the messages that belongs to the group.
|
|
51
|
-
* @param {string} group - Name of the message group.
|
|
52
|
-
*/
|
|
53
|
-
removeGroup(group: string): void;
|
|
54
|
-
removeAllGroups(): void;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Configuration options for the `useToast` hook.
|
|
58
|
-
*/
|
|
59
|
-
export interface UseToastConfig {
|
|
60
|
-
/**
|
|
61
|
-
* Default message templates for each severity level.
|
|
62
|
-
* Keys represent the severity, and values are the template strings.
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* {
|
|
66
|
-
* success: 'Success, {message}',
|
|
67
|
-
* error: 'Error, {message} {additionalMessage}',
|
|
68
|
-
* info: 'Info, {message} {additionalMessage}',
|
|
69
|
-
* }
|
|
70
|
-
*/
|
|
71
|
-
template?: Record<string, string>;
|
|
72
|
-
/**
|
|
73
|
-
* Icons for each severity level.
|
|
74
|
-
* Keys represent the severity, and values are the corresponding icon identifiers.
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* {
|
|
78
|
-
* success: 'emotion-happy-fill',
|
|
79
|
-
* error: 'emotion-unhappy-fill',
|
|
80
|
-
* }
|
|
81
|
-
*/
|
|
82
|
-
icons?: Record<string, WangsIcons>;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Hook to create and manage toast notifications.
|
|
86
|
-
*
|
|
87
|
-
* @param {UseToastConfig} config - Configuration object for the toast notifications.
|
|
88
|
-
* Refer to {@link UseToastConfig} for the structure and details of this object.
|
|
89
|
-
*
|
|
90
|
-
* @returns {ToastMethod} A method to trigger toast notifications.
|
|
91
|
-
* The method accepts {@link ToastParams} to customize individual notifications.
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* const toast = useToast({
|
|
95
|
-
* template: {
|
|
96
|
-
* success: 'Success, {message}',
|
|
97
|
-
* error: 'Error, {message} {additionalMessage}',
|
|
98
|
-
* info: 'Info, {message} {additionalMessage}',
|
|
99
|
-
* },
|
|
100
|
-
* icons: {
|
|
101
|
-
* success: 'emotion-happy-fill',
|
|
102
|
-
* error: 'emotion-unhappy-fill',
|
|
103
|
-
* }
|
|
104
|
-
* });
|
|
105
|
-
*
|
|
106
|
-
* // Overiding the default config with ToastParams
|
|
107
|
-
* toast.add({
|
|
108
|
-
* message: 'Operation completed successfully!',
|
|
109
|
-
* customMessage: true,
|
|
110
|
-
* icon: 'custom-success-icon',
|
|
111
|
-
* });
|
|
112
|
-
*/
|
|
113
|
-
declare const useToast: ({ icons, template }?: UseToastConfig) => ToastMethod;
|
|
1
|
+
import { ToastMethod } from '.././utils';
|
|
2
|
+
declare const useToast: () => ToastMethod;
|
|
114
3
|
export default useToast;
|