react-dialogger 1.1.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.
Files changed (51) hide show
  1. package/README.md +303 -0
  2. package/components/CircularProgress.d.ts +8 -0
  3. package/components/CircularProgress.js +50 -0
  4. package/components/DialogActionBase.d.ts +44 -0
  5. package/components/DialogActionBase.js +222 -0
  6. package/components/DialogBase.d.ts +132 -0
  7. package/components/DialogBase.js +880 -0
  8. package/components/Futures/DialogCloseAction.d.ts +3 -0
  9. package/components/Futures/DialogCloseAction.js +54 -0
  10. package/components/Futures/DialogFullscreenAction.d.ts +3 -0
  11. package/components/Futures/DialogFullscreenAction.js +60 -0
  12. package/components/Futures/DialogHeaderActionsWrapper.d.ts +3 -0
  13. package/components/Futures/DialogHeaderActionsWrapper.js +11 -0
  14. package/components/Futures/DialogProcessing.d.ts +3 -0
  15. package/components/Futures/DialogProcessing.js +41 -0
  16. package/components/Futures/index.d.ts +4 -0
  17. package/components/Futures/index.js +11 -0
  18. package/components/RippleButton.d.ts +15 -0
  19. package/components/RippleButton.js +81 -0
  20. package/components/icons/CloseIcon.d.ts +6 -0
  21. package/components/icons/CloseIcon.js +23 -0
  22. package/components/icons/FullscreenExitIcon.d.ts +6 -0
  23. package/components/icons/FullscreenExitIcon.js +23 -0
  24. package/components/icons/FullscreenIcon.d.ts +6 -0
  25. package/components/icons/FullscreenIcon.js +23 -0
  26. package/components/icons/ResizeIcon.d.ts +6 -0
  27. package/components/icons/ResizeIcon.js +14 -0
  28. package/hooks/useDialogOptions.d.ts +3 -0
  29. package/hooks/useDialogOptions.js +82 -0
  30. package/index.d.ts +8 -0
  31. package/index.js +25 -0
  32. package/models/Dialog.d.ts +44 -0
  33. package/models/Dialog.js +142 -0
  34. package/models/DialogAction.d.ts +54 -0
  35. package/models/DialogAction.js +277 -0
  36. package/models/Resizeable.d.ts +21 -0
  37. package/models/Resizeable.js +87 -0
  38. package/package.json +20 -0
  39. package/styles/circular-progress.css +42 -0
  40. package/styles/dialog.action.css +234 -0
  41. package/styles/dialog.css +336 -0
  42. package/types/DialogActionTypes.d.ts +66 -0
  43. package/types/DialogActionTypes.js +3 -0
  44. package/types/DialogTypes.d.ts +128 -0
  45. package/types/DialogTypes.js +2 -0
  46. package/types/SizePosTypes.d.ts +5 -0
  47. package/types/SizePosTypes.js +2 -0
  48. package/types/index.d.ts +4 -0
  49. package/types/index.js +2 -0
  50. package/types/types.d.ts +58 -0
  51. package/types/types.js +2 -0
@@ -0,0 +1,132 @@
1
+ import { Component, ReactNode, RefObject } from "react";
2
+ import { FormikProps } from "../types/FormikProps";
3
+ import * as React from "react";
4
+ import Dialog from "../models/Dialog";
5
+ import { DialogAction } from "../models/DialogAction";
6
+ import DialogActionBase from "./DialogActionBase";
7
+ import { IInProcess, ComponentOrderType, TInitialHolder, ISnackbarAnchor, ComponentOrderPositions, TSeverity, BaseDialogDOMRect, TAccessFrom, TInitialValues, DialogValues } from "../types/types";
8
+ import { BaseDialogProps, BaseDialogState, IDialogSize, DialogOptionsType, TBaseDialogState, TDialogStateListenerCallbackType, IDialogDef, TDialogCallbackNodeFn, TDialogCallbackVoidFn } from "../types/DialogTypes";
9
+ import Resizeable from "../models/Resizeable";
10
+ export declare const DialogHeaderFooterContext: React.Context<any>;
11
+ declare class DialogBase extends Component<BaseDialogProps, BaseDialogState> {
12
+ get parent(): Dialog;
13
+ protected _dom: HTMLDivElement;
14
+ protected _innerRef: React.RefObject<any>;
15
+ protected _stateListener: TDialogStateListenerCallbackType;
16
+ protected _keyboardListener: (key: string, dialog: IDialogDef) => void;
17
+ protected _initialHolder: TInitialHolder;
18
+ protected _accessFrom: TAccessFrom;
19
+ protected _header: TDialogCallbackNodeFn;
20
+ protected _body: TDialogCallbackNodeFn;
21
+ protected _actions: Array<DialogAction>;
22
+ protected readonly _backdropRef: RefObject<any>;
23
+ protected readonly _dialogRef: RefObject<any>;
24
+ protected readonly _dialogBodyRef: RefObject<any>;
25
+ protected readonly _snackbarRef: RefObject<any>;
26
+ protected _dialogSize: IDialogSize;
27
+ protected _holder?: TInitialHolder;
28
+ protected _formikProps: FormikProps<any>;
29
+ protected _dialogTranslate: {
30
+ lastX: number;
31
+ lastY: number;
32
+ };
33
+ private readonly _draggable;
34
+ private readonly _resizeable;
35
+ private readonly _closeable;
36
+ private readonly _fullscreen;
37
+ protected _order: ComponentOrderType;
38
+ protected readonly _parent: Dialog;
39
+ protected _dialogOptions?: DialogOptionsType;
40
+ protected _shInterval: number;
41
+ protected _onClose: () => void;
42
+ private _inProcess;
43
+ /**
44
+ * @deprecated
45
+ * @see dialogOptions.snackbar.anchorOrigin */
46
+ protected _snackbarAnchor: ISnackbarAnchor;
47
+ protected _Resizeable: Resizeable;
48
+ protected readonly dialogPosFromMultipleDialogs: BaseDialogDOMRect;
49
+ private readonly _actionRefs;
50
+ /**@deprecated
51
+ * @use _initialUserProps */
52
+ protected _initialState: TInitialValues<any>;
53
+ protected _initialValues: DialogValues;
54
+ readonly state: Readonly<BaseDialogState>;
55
+ /**
56
+ * The error you're encountering
57
+ * is related to the type of the props passed to the
58
+ * super(props) call in the DialogBase constructor.
59
+ * The type system is expecting BaseDialogProps | Readonly<BaseDialogProps>,
60
+ * but you're passing {} (an empty object),
61
+ * which is not assignable to that type.
62
+ * */
63
+ private readonly _fontFamily;
64
+ constructor(props?: Readonly<BaseDialogProps>);
65
+ get fullscreenMode(): boolean;
66
+ private initializeActionRef;
67
+ get dialogOptions(): DialogOptionsType;
68
+ /**@deprecate
69
+ * @see this.state
70
+ * */
71
+ getState: () => TBaseDialogState;
72
+ get formikProps(): FormikProps<any>;
73
+ set formikProps(value: FormikProps<any>);
74
+ get formikValidate(): Promise<FormikProps<any>>;
75
+ get values(): DialogValues;
76
+ setValues(values: DialogValues, callbackFn?: () => void): void;
77
+ setValue(key: string, values: any): void;
78
+ private dialogAutoPos;
79
+ componentDidMount(): void;
80
+ componentDidUpdate(prevProps: Readonly<BaseDialogProps>, prevState: Readonly<BaseDialogState>, snapshot?: any): void;
81
+ componentWillUnmount(): void;
82
+ setState<K extends keyof BaseDialogState>(state: ((prevState: Readonly<BaseDialogState>, props: Readonly<BaseDialogProps>) => (Pick<BaseDialogState, K> | BaseDialogState | null)) | Pick<BaseDialogState, K> | BaseDialogState | null, callback?: () => void): void;
83
+ protected setHeader(header: TDialogCallbackNodeFn): DialogBase;
84
+ setBody(body: TDialogCallbackNodeFn): DialogBase;
85
+ protected addActions(actions: Array<DialogAction>): DialogBase;
86
+ protected addAction(action: DialogAction): DialogBase;
87
+ stateListener(listener: TDialogStateListenerCallbackType): DialogBase;
88
+ protected keyboardListener(listener: (key: string, dialog: IDialogDef) => void): DialogBase;
89
+ protected initialHolder(holder: TInitialHolder): DialogBase;
90
+ protected onClose(callback: () => void): DialogBase;
91
+ setInProcess_noRef: (process: boolean, message?: string, holder?: TInitialHolder) => DialogBase;
92
+ setInProcess: (process: boolean, message?: string, holder?: TInitialHolder) => DialogBase;
93
+ isInProcess: () => IInProcess;
94
+ close: (callbackFn?: any) => void;
95
+ focus: () => void;
96
+ get actions(): {
97
+ [key: string]: Pick<DialogActionBase, "remove" | "click" | "options" | "setInProcess" | "setOptions" | "getLabel">;
98
+ };
99
+ private orderPositionWithReference;
100
+ /**
101
+ * @deprecated
102
+ * @info This method is deprecated and will be removed in a future release.
103
+ * Please use an alternative approach for setting dialog ordering or layout.
104
+ * The dialog ordering functionality will be managed differently in future versions.
105
+ */
106
+ setOrder: (position: ComponentOrderPositions, component: HTMLElement) => DialogBase;
107
+ getDom: () => HTMLDivElement;
108
+ get snackbar(): {
109
+ open: (message: string, severity: TSeverity, key?: string, action?: (key: string, snackbarRef: any) => ReactNode | void, autoHideDuration?: number | null) => void;
110
+ openX: ({ message, severity, key, action, autoHideDuration }: {
111
+ message: string;
112
+ severity: TSeverity;
113
+ key?: string;
114
+ action?: (key: string, snackbarRef: any) => ReactNode | void;
115
+ autoHideDuration?: number;
116
+ }) => void;
117
+ close: (key?: string) => void;
118
+ };
119
+ private baseZoomEffect;
120
+ private withBackdrop;
121
+ switchFullScreen: () => void;
122
+ private Placeholder;
123
+ private Header;
124
+ getSize: () => IDialogSize;
125
+ private Body;
126
+ private Footer;
127
+ private Actions;
128
+ private Content;
129
+ protected show(callback?: TDialogCallbackVoidFn): void;
130
+ render: () => React.JSX.Element;
131
+ }
132
+ export default DialogBase;