mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 21:52:19 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
39
web/node_modules/react-toastify/dist/core/eventManager.d.ts
generated
vendored
Normal file
39
web/node_modules/react-toastify/dist/core/eventManager.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/// <reference types="react" />
|
||||
import { Id, ToastContent, ClearWaitingQueueParams, NotValidatedToastProps } from '../types';
|
||||
import { ContainerInstance } from '../hooks';
|
||||
export declare const enum Event {
|
||||
Show = 0,
|
||||
Clear = 1,
|
||||
DidMount = 2,
|
||||
WillUnmount = 3,
|
||||
Change = 4,
|
||||
ClearWaitingQueue = 5
|
||||
}
|
||||
declare type OnShowCallback = (content: ToastContent, options: NotValidatedToastProps) => void;
|
||||
declare type OnClearCallback = (id?: Id) => void;
|
||||
declare type OnClearWaitingQueue = (params: ClearWaitingQueueParams) => void;
|
||||
declare type OnDidMountCallback = (containerInstance: ContainerInstance) => void;
|
||||
declare type OnWillUnmountCallback = OnDidMountCallback;
|
||||
export declare type OnChangeCallback = (toast: number, containerId?: number | string) => void;
|
||||
declare type Callback = OnShowCallback | OnClearCallback | OnClearWaitingQueue | OnDidMountCallback | OnWillUnmountCallback | OnChangeCallback;
|
||||
declare type TimeoutId = ReturnType<typeof window.setTimeout>;
|
||||
export interface EventManager {
|
||||
list: Map<Event, Callback[]>;
|
||||
emitQueue: Map<Event, TimeoutId[]>;
|
||||
on(event: Event.Show, callback: OnShowCallback): EventManager;
|
||||
on(event: Event.Clear, callback: OnClearCallback): EventManager;
|
||||
on(event: Event.ClearWaitingQueue, callback: OnClearWaitingQueue): EventManager;
|
||||
on(event: Event.DidMount, callback: OnDidMountCallback): EventManager;
|
||||
on(event: Event.WillUnmount, callback: OnWillUnmountCallback): EventManager;
|
||||
on(event: Event.Change, callback: OnChangeCallback): EventManager;
|
||||
off(event: Event, callback?: Callback): EventManager;
|
||||
cancelEmit(event: Event): EventManager;
|
||||
emit(event: Event.Show, content: React.ReactNode, options: NotValidatedToastProps): void;
|
||||
emit(event: Event.Clear, id?: string | number): void;
|
||||
emit(event: Event.ClearWaitingQueue, params: ClearWaitingQueueParams): void;
|
||||
emit(event: Event.DidMount, containerInstance: ContainerInstance): void;
|
||||
emit(event: Event.WillUnmount, containerInstance: ContainerInstance): void;
|
||||
emit(event: Event.Change, toast: number, containerId?: number | string): void;
|
||||
}
|
||||
export declare const eventManager: EventManager;
|
||||
export {};
|
2
web/node_modules/react-toastify/dist/core/index.d.ts
generated
vendored
Normal file
2
web/node_modules/react-toastify/dist/core/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
export * from './eventManager';
|
||||
export * from './toast';
|
55
web/node_modules/react-toastify/dist/core/toast.d.ts
generated
vendored
Normal file
55
web/node_modules/react-toastify/dist/core/toast.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
import * as React from 'react';
|
||||
import { OnChangeCallback } from './eventManager';
|
||||
import { ToastContent, ToastOptions, Id, ToastContainerProps, UpdateOptions, ClearWaitingQueueParams } from '../types';
|
||||
declare const toast: {
|
||||
(content: ToastContent, options?: ToastOptions | undefined): React.ReactText;
|
||||
success: (content: ToastContent, options?: ToastOptions | undefined) => React.ReactText;
|
||||
info: (content: ToastContent, options?: ToastOptions | undefined) => React.ReactText;
|
||||
error: (content: ToastContent, options?: ToastOptions | undefined) => React.ReactText;
|
||||
warning: (content: ToastContent, options?: ToastOptions | undefined) => React.ReactText;
|
||||
dark: (content: ToastContent, options?: ToastOptions | undefined) => React.ReactText;
|
||||
warn: (content: ToastContent, options?: ToastOptions | undefined) => React.ReactText;
|
||||
/**
|
||||
* Remove toast programmaticaly
|
||||
*/
|
||||
dismiss(id?: string | number | undefined): void;
|
||||
/**
|
||||
* Clear waiting queue when limit is used
|
||||
*/
|
||||
clearWaitingQueue(params?: ClearWaitingQueueParams): void;
|
||||
/**
|
||||
* return true if one container is displaying the toast
|
||||
*/
|
||||
isActive(id: Id): boolean;
|
||||
update(toastId: Id, options?: UpdateOptions): void;
|
||||
/**
|
||||
* Used for controlled progress bar.
|
||||
*/
|
||||
done(id: Id): void;
|
||||
/**
|
||||
* Track changes. The callback get the number of toast displayed
|
||||
*
|
||||
*/
|
||||
onChange(callback: OnChangeCallback): () => void;
|
||||
/**
|
||||
* Configure the ToastContainer when lazy mounted
|
||||
*/
|
||||
configure(config?: ToastContainerProps): void;
|
||||
POSITION: {
|
||||
TOP_LEFT: import("../types").ToastPosition;
|
||||
TOP_RIGHT: import("../types").ToastPosition;
|
||||
TOP_CENTER: import("../types").ToastPosition;
|
||||
BOTTOM_LEFT: import("../types").ToastPosition;
|
||||
BOTTOM_RIGHT: import("../types").ToastPosition;
|
||||
BOTTOM_CENTER: import("../types").ToastPosition;
|
||||
};
|
||||
TYPE: {
|
||||
INFO: import("../types").TypeOptions;
|
||||
SUCCESS: import("../types").TypeOptions;
|
||||
WARNING: import("../types").TypeOptions;
|
||||
ERROR: import("../types").TypeOptions;
|
||||
DEFAULT: import("../types").TypeOptions;
|
||||
DARK: import("../types").TypeOptions;
|
||||
};
|
||||
};
|
||||
export { toast };
|
Loading…
Add table
Add a link
Reference in a new issue