@open-xamu-co/ui-common-types 3.0.0-next.16 → 3.0.0-next.18
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/package.json +1 -1
- package/src/plugin.ts +2 -3
- package/src/swal.ts +2 -0
- package/src/values.ts +3 -1
package/package.json
CHANGED
package/src/plugin.ts
CHANGED
|
@@ -98,6 +98,7 @@ export interface iPluginOptions<ComponentType = unknown> {
|
|
|
98
98
|
overrides?: SweetAlertOptions;
|
|
99
99
|
preventOverrides?: SweetAlertOptions;
|
|
100
100
|
loaderOverrides?: SweetAlertOptions;
|
|
101
|
+
toastOverrides?: SweetAlertOptions;
|
|
101
102
|
};
|
|
102
103
|
/**
|
|
103
104
|
* Iso2 code for the default country
|
|
@@ -106,13 +107,11 @@ export interface iPluginOptions<ComponentType = unknown> {
|
|
|
106
107
|
*/
|
|
107
108
|
country?: string;
|
|
108
109
|
/**
|
|
109
|
-
* Countries API base endpoint
|
|
110
|
+
* Countries API base endpoint (full URL)
|
|
110
111
|
*
|
|
111
112
|
* If using nuxt, get better performance with the module
|
|
112
113
|
* @see https://www.npmjs.com/package/nuxt-countries-api
|
|
113
114
|
*
|
|
114
|
-
* Using an absolute path will enable the module
|
|
115
|
-
*
|
|
116
115
|
* @default "https://countries.xamu.com.co/api/v1"
|
|
117
116
|
*/
|
|
118
117
|
countriesUrl?: string;
|
package/src/swal.ts
CHANGED
|
@@ -15,6 +15,8 @@ export type tSwal = Omit<typeof DefaultSwal, "fire"> & {
|
|
|
15
15
|
fire: <T = any>(options?: tSwalOptions) => Promise<SweetAlertResult<Awaited<T>>>;
|
|
16
16
|
firePrevent: <T = any>(options?: tSwalOptions) => Promise<SweetAlertResult<Awaited<T>>>;
|
|
17
17
|
fireLoader: <T = any>(options?: tSwalOptions) => Promise<SweetAlertResult<Awaited<T>>>;
|
|
18
|
+
fireToast: <T = any>(options?: tSwalOptions) => Promise<SweetAlertResult<Awaited<T>>>;
|
|
18
19
|
firePreventDefaults: SweetAlertOptions;
|
|
19
20
|
fireLoaderDefaults: SweetAlertOptions;
|
|
21
|
+
fireToastDefaults: SweetAlertOptions;
|
|
20
22
|
};
|
package/src/values.ts
CHANGED
|
@@ -5,6 +5,8 @@ export interface iSelectOption {
|
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
export type iNodeFnResponse = [boolean?, Event?, (() => void)?];
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
11
|
* Funtions that uses a node and perform some action
|
|
10
12
|
*
|
|
@@ -12,7 +14,7 @@ export interface iSelectOption {
|
|
|
12
14
|
*/
|
|
13
15
|
export type iNodeFn<T extends Record<string, any>, Ta extends [T?, ...any[]] = [T]> = (
|
|
14
16
|
...args: Ta
|
|
15
|
-
) => boolean | undefined | Promise<boolean | undefined>;
|
|
17
|
+
) => boolean | undefined | iNodeFnResponse | Promise<boolean | undefined | iNodeFnResponse>;
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* used on FactoryTable and related components
|