@aitronos/freddy-plugins 0.1.35 → 0.1.37
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/dist/index.cjs +1 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +136 -12
- package/dist/index.js +712 -669
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ import { ExtractPropTypes } from 'vue';
|
|
|
6
6
|
import { PublicProps } from 'vue';
|
|
7
7
|
import { Ref } from 'vue';
|
|
8
8
|
|
|
9
|
-
declare const __VLS_component: DefineComponent<
|
|
9
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
|
|
11
|
+
declare const __VLS_component_2: DefineComponent<ExtractPropTypes< {
|
|
10
12
|
isVisible: {
|
|
11
13
|
type: BooleanConstructor;
|
|
12
14
|
default: boolean;
|
|
@@ -33,19 +35,24 @@ isVisible: boolean;
|
|
|
33
35
|
largeModel: boolean;
|
|
34
36
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
35
37
|
|
|
36
|
-
declare const
|
|
38
|
+
declare const __VLS_component_3: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
37
39
|
close: (...args: any[]) => void;
|
|
38
|
-
}, string, PublicProps, Readonly<
|
|
40
|
+
}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{
|
|
39
41
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
40
42
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
41
43
|
|
|
42
44
|
declare type __VLS_Props = {
|
|
45
|
+
isVisible: boolean;
|
|
46
|
+
largeModel: boolean;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
declare type __VLS_Props_2 = {
|
|
43
50
|
modalTitle: string;
|
|
44
51
|
headerClass: string;
|
|
45
52
|
disableClickOutside?: boolean;
|
|
46
53
|
};
|
|
47
54
|
|
|
48
|
-
declare type
|
|
55
|
+
declare type __VLS_Props_3 = {
|
|
49
56
|
customClass?: string;
|
|
50
57
|
};
|
|
51
58
|
|
|
@@ -61,6 +68,17 @@ declare function __VLS_template(): {
|
|
|
61
68
|
};
|
|
62
69
|
|
|
63
70
|
declare function __VLS_template_2(): {
|
|
71
|
+
attrs: Partial<{}>;
|
|
72
|
+
slots: {
|
|
73
|
+
header?(_: {}): any;
|
|
74
|
+
body?(_: {}): any;
|
|
75
|
+
footer?(_: {}): any;
|
|
76
|
+
};
|
|
77
|
+
refs: {};
|
|
78
|
+
rootEl: any;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
declare function __VLS_template_3(): {
|
|
64
82
|
attrs: Partial<{}>;
|
|
65
83
|
slots: {
|
|
66
84
|
content?(_: {}): any;
|
|
@@ -73,6 +91,8 @@ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
73
91
|
|
|
74
92
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
75
93
|
|
|
94
|
+
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
95
|
+
|
|
76
96
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
77
97
|
new (): {
|
|
78
98
|
$slots: S;
|
|
@@ -85,36 +105,129 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
|
85
105
|
};
|
|
86
106
|
};
|
|
87
107
|
|
|
108
|
+
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
109
|
+
new (): {
|
|
110
|
+
$slots: S;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export declare const AdvancedModal: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Calculates the percentage of a partial value relative to a total value.
|
|
118
|
+
* @param partialValue - The part of the total value.
|
|
119
|
+
* @param totalValue - The total value.
|
|
120
|
+
* @returns The percentage as a string with one decimal place.
|
|
121
|
+
*/
|
|
88
122
|
export declare const calculatePercentage: (partialValue: number, totalValue: number) => string;
|
|
89
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Creates a deep clone of the provided value, handling circular references.
|
|
126
|
+
* This function is similar to Lodash's `cloneDeep`.
|
|
127
|
+
*
|
|
128
|
+
* @template T - The type of the value being cloned.
|
|
129
|
+
* @param {T} value - The value to deeply clone.
|
|
130
|
+
* @returns {T} - Returns the deeply cloned value.
|
|
131
|
+
*/
|
|
132
|
+
export declare function cloneDeepSafe<T>(value: T): T;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Copies the provided text to the clipboard and shows a toast notification.
|
|
136
|
+
* @param textToCopy - The text to copy to the clipboard.
|
|
137
|
+
*/
|
|
90
138
|
export declare const copyToClipboard: (textToCopy: string) => Promise<void>;
|
|
91
139
|
|
|
92
140
|
export declare const daysInMonth: number;
|
|
93
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Performs a deep comparison between two values to determine if they are equivalent.
|
|
144
|
+
* This function is similar to Lodash's `isEqual`.
|
|
145
|
+
*
|
|
146
|
+
* @template T - The type of the values being compared.
|
|
147
|
+
* @param {T} a - The first value to compare.
|
|
148
|
+
* @param {T} b - The second value to compare.
|
|
149
|
+
* @returns {boolean} - Returns `true` if the values are deeply equal, otherwise `false`.
|
|
150
|
+
*/
|
|
151
|
+
export declare function deepEqual<T>(a: T, b: T): boolean;
|
|
152
|
+
|
|
94
153
|
export declare const defaultImageSrc = "https://img.freepik.com/premium-vector/default-image-icon-vector-missing-picture-page-website-design-mobile-app-no-photo-available_87543-11093.jpg";
|
|
95
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Formats a file size in bytes into a human-readable string.
|
|
157
|
+
* @param bytes - The file size in bytes.
|
|
158
|
+
* @param decimals - The number of decimal places to include.
|
|
159
|
+
* @returns The formatted file size string.
|
|
160
|
+
*/
|
|
96
161
|
export declare const fileSizeFormatter: (bytes: number, decimals?: number) => string;
|
|
97
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Fills missing days in a month's data with a default value of 0.
|
|
165
|
+
* @param month - The month number (1-12).
|
|
166
|
+
* @param dayData - An array of objects containing day-value pairs.
|
|
167
|
+
* @returns An object with all days of the month filled.
|
|
168
|
+
*/
|
|
98
169
|
export declare const fillMissingDays: (month: number, dayData: Array<{
|
|
99
170
|
[key: number]: number;
|
|
100
171
|
}>) => {
|
|
101
172
|
[k: string]: number;
|
|
102
173
|
};
|
|
103
174
|
|
|
175
|
+
/**
|
|
176
|
+
* Formats a date to a relative format (e.g., "Yesterday" or "DD MMM YYYY").
|
|
177
|
+
* @param inputDate - The date string or Date object to format.
|
|
178
|
+
* @returns The formatted date string.
|
|
179
|
+
*/
|
|
104
180
|
export declare function formatDate(inputDate: Date | string): string;
|
|
105
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Formats a date string or Date object to a locale string.
|
|
184
|
+
* @param dateString - The date string or Date object to format.
|
|
185
|
+
* @returns The formatted date string.
|
|
186
|
+
*/
|
|
106
187
|
export declare function formatDateToLocaleString(dateString: Date | string): string;
|
|
107
188
|
|
|
189
|
+
/**
|
|
190
|
+
* Formats the last used date, defaulting to the created date if not provided.
|
|
191
|
+
* @param inputDate - The last used date string or Date object.
|
|
192
|
+
* @param createdOnDate - The created date string or Date object.
|
|
193
|
+
* @returns The formatted date string.
|
|
194
|
+
*/
|
|
108
195
|
export declare function formatLastUsedDate(inputDate: Date | string, createdOnDate?: Date | string): string;
|
|
109
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Generates an array of dates for a given month in "day month_name" format.
|
|
199
|
+
* @param monthNumber - The month number (1-12).
|
|
200
|
+
* @returns An array of formatted date strings.
|
|
201
|
+
*/
|
|
110
202
|
export declare const getDatesForMonth: (monthNumber: number) => string[];
|
|
111
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Gets the number of days in a given month and year.
|
|
206
|
+
* @param month - The month number (1-12).
|
|
207
|
+
* @param year - The year.
|
|
208
|
+
* @returns The number of days in the month.
|
|
209
|
+
*/
|
|
112
210
|
export declare function getDaysInMonth(month: number, year: number): number;
|
|
113
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Extracts the file name from a given URL.
|
|
214
|
+
* @param url - The URL containing the file name.
|
|
215
|
+
* @returns The extracted file name, or null if not found.
|
|
216
|
+
*/
|
|
114
217
|
export declare function getFileNameFromUrl(url: string): string | null;
|
|
115
218
|
|
|
219
|
+
/**
|
|
220
|
+
* Gets the short name of a month by its number.
|
|
221
|
+
* @param monthNumber - The month number (1-12).
|
|
222
|
+
* @returns The short month name (e.g., "Jan").
|
|
223
|
+
*/
|
|
116
224
|
export declare const getShortMonthName: (monthNumber: number) => string;
|
|
117
225
|
|
|
226
|
+
/**
|
|
227
|
+
* Checks if an element has overflow content.
|
|
228
|
+
* @param el - The HTML element to check.
|
|
229
|
+
* @returns True if the element has overflow, otherwise false.
|
|
230
|
+
*/
|
|
118
231
|
export declare function hasOverflow(el: HTMLElement): boolean;
|
|
119
232
|
|
|
120
233
|
export declare const IconAitronos: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
@@ -345,6 +458,13 @@ export declare interface IMenuListItem {
|
|
|
345
458
|
path: string;
|
|
346
459
|
}
|
|
347
460
|
|
|
461
|
+
/**
|
|
462
|
+
* Generates a series of interpolated colors between two colors.
|
|
463
|
+
* @param start - The starting color in hex format.
|
|
464
|
+
* @param end - The ending color in hex format.
|
|
465
|
+
* @param steps - The number of colors to generate in the series.
|
|
466
|
+
* @returns An array of interpolated colors in hex format.
|
|
467
|
+
*/
|
|
348
468
|
export declare const interpolateColor: (start: string, end: string, steps: number) => string[];
|
|
349
469
|
|
|
350
470
|
export declare interface ITabList {
|
|
@@ -352,14 +472,9 @@ export declare interface ITabList {
|
|
|
352
472
|
currentTab?: number;
|
|
353
473
|
}
|
|
354
474
|
|
|
355
|
-
export declare const
|
|
356
|
-
chart: any;
|
|
357
|
-
tooltip: any;
|
|
358
|
-
}, currentMonth: string) => void;
|
|
359
|
-
|
|
360
|
-
export declare const ModalBox: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
475
|
+
export declare const ModalBox: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
361
476
|
|
|
362
|
-
export declare const ModalOverlay:
|
|
477
|
+
export declare const ModalOverlay: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
363
478
|
|
|
364
479
|
export declare const Pagination: DefineComponent<ExtractPropTypes< {
|
|
365
480
|
totalItems: {
|
|
@@ -393,8 +508,17 @@ required: true;
|
|
|
393
508
|
"onUpdate:currentPage"?: ((...args: any[]) => any) | undefined;
|
|
394
509
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLElement>;
|
|
395
510
|
|
|
511
|
+
/**
|
|
512
|
+
* Converts a date to a human-readable format (e.g., "12 Dec 2023 at 12:34").
|
|
513
|
+
* @param date - The date string or Date object to format.
|
|
514
|
+
* @returns The formatted date string.
|
|
515
|
+
*/
|
|
396
516
|
export declare function readableDateFormat(date: Date | string): string;
|
|
397
517
|
|
|
518
|
+
/**
|
|
519
|
+
* Smoothly scrolls to a target element by its ID.
|
|
520
|
+
* @param targetElement - The ID of the target element.
|
|
521
|
+
*/
|
|
398
522
|
export declare const scrollToElement: (targetElement: string) => void;
|
|
399
523
|
|
|
400
524
|
export declare const SearchInput: DefineComponent<ExtractPropTypes< {
|
|
@@ -436,7 +560,7 @@ export declare interface Snack {
|
|
|
436
560
|
|
|
437
561
|
export declare const SnackBar: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
438
562
|
|
|
439
|
-
export declare const Spinner: DefineComponent<
|
|
563
|
+
export declare const Spinner: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
440
564
|
|
|
441
565
|
export declare const TabList: DefineComponent<ITabList, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
442
566
|
tabSwitch: (...args: any[]) => void;
|