@autoafleveren/ui 0.10.2 → 0.11.0
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/icons.cjs +46 -39
- package/dist/icons.js +9073 -6349
- package/dist/types/composables/index.d.ts +1 -0
- package/dist/types/composables/useEcho/index.d.ts +23 -0
- package/dist/types/plugins/Toast/types.d.ts +4 -4
- package/dist/types/plugins/index.d.ts +5 -0
- package/dist/ui.cjs +62 -55
- package/dist/ui.js +29213 -25351
- package/package.json +4 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Echo from 'laravel-echo';
|
|
2
|
+
import type { Authorizer, Channel } from 'pusher-js';
|
|
3
|
+
interface Listener {
|
|
4
|
+
name: string;
|
|
5
|
+
isListening: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function getOrCreateListener(listerName?: string): Listener;
|
|
8
|
+
export declare function registerEcho(key: string, authorizer: (channel: Channel) => Authorizer): void;
|
|
9
|
+
export declare function useEcho(listenerName?: string | null): {
|
|
10
|
+
on: (channel: string, event: string, handler: (data: any) => unknown, privateChannel?: boolean) => void;
|
|
11
|
+
off: (channel: string, event: string, handler?: ((data: any) => unknown) | undefined, privateChannel?: boolean) => void;
|
|
12
|
+
listener: Listener;
|
|
13
|
+
state: {
|
|
14
|
+
listeners: import("vue").Ref<{
|
|
15
|
+
name: string;
|
|
16
|
+
isListening: boolean;
|
|
17
|
+
}[]>;
|
|
18
|
+
echo: Echo | null;
|
|
19
|
+
key: string | null;
|
|
20
|
+
authorizer: ((channel: Channel) => Authorizer) | null;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -250,16 +250,16 @@ export interface ToastInstance {
|
|
|
250
250
|
options?: ToastOptions | undefined;
|
|
251
251
|
}, create?: true | undefined): void;
|
|
252
252
|
};
|
|
253
|
-
success: (content:
|
|
253
|
+
success: (title: string, content: string, options?: (ToastOptions & {
|
|
254
254
|
type?: TYPE.SUCCESS | undefined;
|
|
255
255
|
}) | undefined) => ToastID;
|
|
256
|
-
info: (content:
|
|
256
|
+
info: (title: string, content: string, options?: (ToastOptions & {
|
|
257
257
|
type?: TYPE.INFO | undefined;
|
|
258
258
|
}) | undefined) => ToastID;
|
|
259
|
-
error: (content:
|
|
259
|
+
error: (title: string, content: string, options?: (ToastOptions & {
|
|
260
260
|
type?: TYPE.ERROR | undefined;
|
|
261
261
|
}) | undefined) => ToastID;
|
|
262
|
-
warning: (content:
|
|
262
|
+
warning: (title: string, content: string, options?: (ToastOptions & {
|
|
263
263
|
type?: TYPE.WARNING | undefined;
|
|
264
264
|
}) | undefined) => ToastID;
|
|
265
265
|
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
2
|
import type { TippyPluginOptions as TippyOptions } from 'vue-tippy';
|
|
3
3
|
import type { PluginOptions as ToastOptions } from 'vue-toastification';
|
|
4
|
+
import type { Authorizer, Channel } from 'pusher-js';
|
|
4
5
|
import type { Options as SentryOptions } from './Sentry/index.d';
|
|
5
6
|
export * from './Toast';
|
|
6
7
|
export interface Options {
|
|
7
8
|
toast?: ToastOptions;
|
|
8
9
|
tippy?: TippyOptions;
|
|
9
10
|
sentry?: SentryOptions;
|
|
11
|
+
pusher?: {
|
|
12
|
+
appKey: string;
|
|
13
|
+
authorizer: (channel: Channel) => Authorizer;
|
|
14
|
+
};
|
|
10
15
|
}
|
|
11
16
|
export declare const plugin: Plugin;
|