react-dialogger 1.1.53 → 1.1.55
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/components/Actions.d.ts +2 -2
- package/components/Actions.js +6 -5
- package/components/CircularProgress.d.ts +1 -1
- package/components/DialogActionBase.d.ts +8 -3
- package/components/DialogActionBase.js +11 -3
- package/components/DialogBase.d.ts +11 -12
- package/components/DialogBase.js +23 -11
- package/components/DialogContent.js +8 -8
- package/components/DialogContentBody.d.ts +1 -1
- package/components/DialogContentBody.js +3 -5
- package/components/DialogContentFooter.d.ts +1 -1
- package/components/DialogContentFooter.js +6 -6
- package/components/DialogContentHeader.d.ts +1 -2
- package/components/DialogContentHeader.js +10 -11
- package/components/DialogWithBackdropWrapper.js +6 -6
- package/components/RippleButton.d.ts +1 -1
- package/components/index.d.ts +2 -1
- package/components/index.js +5 -3
- package/context/DialogContentContextProvider.d.ts +2 -2
- package/context/DialogContentContextProvider.js +4 -4
- package/context/WithHeaderFooterContext.d.ts +3 -0
- package/context/WithHeaderFooterContext.js +54 -0
- package/context/index.d.ts +2 -3
- package/context/index.js +5 -41
- package/features/DialogCloseAction.js +15 -0
- package/features/DialogFullscreenAction.js +21 -0
- package/{components/Features → features}/DialogInfoAction.js +7 -7
- package/features/DialogProcessing.js +14 -0
- package/helpers/Resizeable.d.ts +1 -1
- package/helpers/Resizeable.js +2 -2
- package/helpers/dialogBoundsMemoize.d.ts +1 -1
- package/helpers/dialogRectAuto.d.ts +1 -1
- package/helpers/index.d.ts +3 -0
- package/helpers/index.js +6 -1
- package/helpers/initDialogMemoizeBounds.d.ts +1 -1
- package/icons/index.d.ts +5 -0
- package/icons/index.js +16 -0
- package/index.d.ts +3 -3
- package/index.js +8 -8
- package/models/Dialog.d.ts +1 -2
- package/models/DialogAction.d.ts +9 -5
- package/models/DialogAction.js +22 -40
- package/models/baseDialogOptions.d.ts +1 -1
- package/models/index.d.ts +1 -1
- package/models/index.js +16 -4
- package/package.json +1 -1
- package/types/DialogActionTypes.d.ts +7 -8
- package/types/DialogContentContextTypes.d.ts +3 -3
- package/types/DialogTypes.d.ts +74 -9
- package/types/index.d.ts +5 -5
- package/types/index.js +20 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +17 -0
- package/{components/utils → utils}/resizeManager.d.ts +2 -2
- package/{components/utils → utils}/resizeManager.js +2 -2
- package/components/Features/DialogCloseAction.js +0 -18
- package/components/Features/DialogFullscreenAction.js +0 -25
- package/components/Features/DialogProcessing.js +0 -14
- package/types/types.d.ts +0 -60
- package/types/types.js +0 -2
- /package/{components/Features → features}/DialogCloseAction.d.ts +0 -0
- /package/{components/Features → features}/DialogFullscreenAction.d.ts +0 -0
- /package/{components/Features → features}/DialogHeaderActionsWrapper.d.ts +0 -0
- /package/{components/Features → features}/DialogHeaderActionsWrapper.js +0 -0
- /package/{components/Features → features}/DialogInfoAction.d.ts +0 -0
- /package/{components/Features → features}/DialogProcessing.d.ts +0 -0
- /package/{components/Features → features}/index.d.ts +0 -0
- /package/{components/Features → features}/index.js +0 -0
- /package/{components/icons → icons}/CloseIcon.d.ts +0 -0
- /package/{components/icons → icons}/CloseIcon.js +0 -0
- /package/{components/icons → icons}/FullscreenExitIcon.d.ts +0 -0
- /package/{components/icons → icons}/FullscreenExitIcon.js +0 -0
- /package/{components/icons → icons}/FullscreenIcon.d.ts +0 -0
- /package/{components/icons → icons}/FullscreenIcon.js +0 -0
- /package/{components/icons → icons}/InfoIcon.d.ts +0 -0
- /package/{components/icons → icons}/InfoIcon.js +0 -0
- /package/{components/icons → icons}/ResizeIcon.d.ts +0 -0
- /package/{components/icons → icons}/ResizeIcon.js +0 -0
- /package/{components/utils → utils}/effects/jumper-animate.d.ts +0 -0
- /package/{components/utils → utils}/effects/jumper-animate.js +0 -0
package/context/index.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -21,34 +10,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
21
10
|
if (k2 === undefined) k2 = k;
|
|
22
11
|
o[k2] = m[k];
|
|
23
12
|
}));
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
-
exports.DialogHeaderFooterContext = exports.WithHeaderFooterContext = void 0;
|
|
48
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
49
|
-
var React = __importStar(require("react"));
|
|
50
|
-
var WithHeaderFooterContext = function (props) {
|
|
51
|
-
return (0, jsx_runtime_1.jsx)(exports.DialogHeaderFooterContext.Provider, { value: __assign({}, props), children: props.children });
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
52
15
|
};
|
|
53
|
-
exports
|
|
54
|
-
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./WithHeaderFooterContext"), exports);
|
|
18
|
+
__exportStar(require("./DialogContentContextProvider"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DialogCloseAction = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var _icons_1 = require("../icons/index.js");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var _context_1 = require("../context/index.js");
|
|
8
|
+
var DialogCloseAction = function () {
|
|
9
|
+
var _a, _b, _c, _d, _e, _f;
|
|
10
|
+
var dialog = (0, react_1.useContext)(_context_1.DialogHeaderFooterContext).dialog;
|
|
11
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'close-icon-wrapper', onClick: function (event) {
|
|
12
|
+
dialog.close();
|
|
13
|
+
}, children: (0, jsx_runtime_1.jsx)(_icons_1.CloseIcon, { size: (_c = (_b = (_a = dialog.dialogOptions.base) === null || _a === void 0 ? void 0 : _a.headerControllerIcons) === null || _b === void 0 ? void 0 : _b.size) !== null && _c !== void 0 ? _c : 24, color: (_f = (_e = (_d = dialog.dialogOptions.base) === null || _d === void 0 ? void 0 : _d.headerControllerIcons) === null || _e === void 0 ? void 0 : _e.color) !== null && _f !== void 0 ? _f : null }) });
|
|
14
|
+
};
|
|
15
|
+
exports.DialogCloseAction = DialogCloseAction;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DialogFullscreenAction = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var _icons_1 = require("../icons/index.js");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var _context_1 = require("../context/index.js");
|
|
8
|
+
var _helpers_1 = require("../helpers/index.js");
|
|
9
|
+
var DialogFullscreenAction = function () {
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
11
|
+
// use this owned context while setFullscreen mode declared
|
|
12
|
+
var _j = (0, react_1.useContext)(_context_1.DialogHeaderFooterContext), dialog = _j.dialog, setFullscreen = _j.setFullscreen, fullscreen = _j.fullscreen;
|
|
13
|
+
return (0, jsx_runtime_1.jsx)("div", { className: 'fullscreen-icon-wrapper', onClick: function (event) {
|
|
14
|
+
setFullscreen(!fullscreen);
|
|
15
|
+
(0, _helpers_1.setDialogBound)(dialog.dialogOptions.base.id, "fullscreen", !fullscreen);
|
|
16
|
+
}, children: fullscreen ?
|
|
17
|
+
(0, jsx_runtime_1.jsx)(_icons_1.FullscreenExitIcon, { size: (_b = (_a = dialog.dialogOptions.base.headerControllerIcons) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 24, color: (_d = (_c = dialog.dialogOptions.base.headerControllerIcons) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : null })
|
|
18
|
+
:
|
|
19
|
+
(0, jsx_runtime_1.jsx)(_icons_1.FullscreenIcon, { size: (_f = (_e = dialog.dialogOptions.base.headerControllerIcons) === null || _e === void 0 ? void 0 : _e.size) !== null && _f !== void 0 ? _f : 24, color: (_h = (_g = dialog.dialogOptions.base.headerControllerIcons) === null || _g === void 0 ? void 0 : _g.color) !== null && _h !== void 0 ? _h : null }) });
|
|
20
|
+
};
|
|
21
|
+
exports.DialogFullscreenAction = DialogFullscreenAction;
|
|
@@ -39,17 +39,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.DialogInfoAction = void 0;
|
|
40
40
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
var react_1 = require("react");
|
|
42
|
-
var
|
|
42
|
+
var _icons_1 = require("../icons/index.js");
|
|
43
43
|
//@ts-ignore
|
|
44
44
|
var package_json_1 = __importDefault(require("../../package.json"));
|
|
45
|
-
var
|
|
46
|
-
var
|
|
45
|
+
var _context_1 = require("../context/index.js");
|
|
46
|
+
var _models_1 = __importStar(require("../models/index.js"));
|
|
47
47
|
// const DialogFullscreenAction = ({dialog}:{dialog: React.RefObject<IDialogRef> | undefined}) => {
|
|
48
48
|
var DialogInfoAction = function () {
|
|
49
49
|
var _a, _b, _c, _d;
|
|
50
|
-
var prevDialog = (0, react_1.useContext)(
|
|
50
|
+
var prevDialog = (0, react_1.useContext)(_context_1.DialogHeaderFooterContext).dialog;
|
|
51
51
|
return (0, jsx_runtime_1.jsx)("div", { className: 'info-icon-wrapper', onClick: function (event) {
|
|
52
|
-
var closeAction = new
|
|
52
|
+
var closeAction = new _models_1.DialogAction('closeAction', {
|
|
53
53
|
label: 'Close',
|
|
54
54
|
variant: 'text',
|
|
55
55
|
color: 'default'
|
|
@@ -57,7 +57,7 @@ var DialogInfoAction = function () {
|
|
|
57
57
|
closeAction.onClick(function (button, dialog1) {
|
|
58
58
|
dialog1.close();
|
|
59
59
|
});
|
|
60
|
-
var dialog = new
|
|
60
|
+
var dialog = new _models_1.default(null, {
|
|
61
61
|
base: {
|
|
62
62
|
resizeable: false,
|
|
63
63
|
draggable: false,
|
|
@@ -85,6 +85,6 @@ var DialogInfoAction = function () {
|
|
|
85
85
|
closeAction
|
|
86
86
|
])
|
|
87
87
|
.show();
|
|
88
|
-
}, children: (0, jsx_runtime_1.jsx)(
|
|
88
|
+
}, children: (0, jsx_runtime_1.jsx)(_icons_1.InfoIcon, { size: (_b = (_a = prevDialog.dialogOptions.base.headerControllerIcons) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 24, color: (_d = (_c = prevDialog.dialogOptions.base.headerControllerIcons) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : null }) });
|
|
89
89
|
};
|
|
90
90
|
exports.DialogInfoAction = DialogInfoAction;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DialogProcessing = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
var _context_1 = require("../context/index.js");
|
|
7
|
+
var _components_1 = require("../components/index.js");
|
|
8
|
+
var DialogProcessing = function () {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
var dialog = (0, react_1.useContext)(_context_1.DialogHeaderFooterContext).dialog;
|
|
11
|
+
var progressOption = dialog.dialogOptions.progress;
|
|
12
|
+
return (0, jsx_runtime_1.jsx)(_components_1.CircularProgress, { size: (_a = progressOption.size) !== null && _a !== void 0 ? _a : 20, inProcess: dialog.isInProcess(), color: (_b = progressOption === null || progressOption === void 0 ? void 0 : progressOption.color) !== null && _b !== void 0 ? _b : '#399aec' });
|
|
13
|
+
};
|
|
14
|
+
exports.DialogProcessing = DialogProcessing;
|
package/helpers/Resizeable.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MouseEvent } from "react";
|
|
2
|
-
import { DialogOptionsType } from "../types/
|
|
2
|
+
import { DialogOptionsType } from "../types/index.js";
|
|
3
3
|
declare class Resizeable {
|
|
4
4
|
onResizeListener: (callbackFn: (width: number, height: number, rect?: DOMRect) => void) => void;
|
|
5
5
|
get width(): number;
|
package/helpers/Resizeable.js
CHANGED
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.Resizeable = void 0;
|
|
15
|
-
var
|
|
15
|
+
var _helpers_1 = require("./index.js");
|
|
16
16
|
var Resizeable = /** @class */ (function () {
|
|
17
17
|
function Resizeable() {
|
|
18
18
|
var _this = this;
|
|
@@ -32,7 +32,7 @@ var Resizeable = /** @class */ (function () {
|
|
|
32
32
|
var _d = (_c = container === null || container === void 0 ? void 0 : container.getBoundingClientRect()) !== null && _c !== void 0 ? _c : {}, width = _d.width, height = _d.height, x = _d.x, y = _d.y;
|
|
33
33
|
console.log('resizeHandleMouseUp', container === null || container === void 0 ? void 0 : container.getBoundingClientRect().toJSON());
|
|
34
34
|
// setDialogBounds( this._dialogOptions.base.id, {width, height, x, y, fullscreen: false}, this._container );
|
|
35
|
-
(0,
|
|
35
|
+
(0, _helpers_1.setDialogBounds)(_this._dialogOptions.base.id, __assign(__assign({}, container === null || container === void 0 ? void 0 : container.getBoundingClientRect().toJSON()), { fullscreen: false }), _this._container);
|
|
36
36
|
};
|
|
37
37
|
this.resizeHandleMouseDown = function () {
|
|
38
38
|
_this.isResizing = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDialogBoundsDef, IDialogIdentificationType } from "../types/
|
|
1
|
+
import { IDialogBoundsDef, IDialogIdentificationType } from "../types/index.js";
|
|
2
2
|
export declare const dialogRegister: (dialogId: IDialogIdentificationType, initialBounds: IDialogBoundsDef) => IDialogBoundsDef;
|
|
3
3
|
export declare const getDialogBounds: (dialogId: IDialogIdentificationType) => IDialogBoundsDef | undefined;
|
|
4
4
|
export declare const setDialogBounds: (dialogId: IDialogIdentificationType, bounds: IDialogBoundsDef, dialogRef: React.RefObject<any>) => void;
|
package/helpers/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { InitDialogMemoizeBounds, InitDialogMemoizeBoundsDeclared, registeredDialogs } from "./initDialogMemoizeBounds";
|
|
2
2
|
export * from "./dialogBoundsMemoize";
|
|
3
3
|
export { formInputKeyListeners } from "./formInputKeyListeners";
|
|
4
|
+
export * from "./Resizeable";
|
|
5
|
+
export { dialogRectAuto } from "./dialogRectAuto";
|
|
6
|
+
export { hexToRgb } from "./hexToRgb";
|
package/helpers/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.formInputKeyListeners = exports.registeredDialogs = exports.InitDialogMemoizeBoundsDeclared = exports.InitDialogMemoizeBounds = void 0;
|
|
17
|
+
exports.hexToRgb = exports.dialogRectAuto = exports.formInputKeyListeners = exports.registeredDialogs = exports.InitDialogMemoizeBoundsDeclared = exports.InitDialogMemoizeBounds = void 0;
|
|
18
18
|
var initDialogMemoizeBounds_1 = require("./initDialogMemoizeBounds");
|
|
19
19
|
Object.defineProperty(exports, "InitDialogMemoizeBounds", { enumerable: true, get: function () { return initDialogMemoizeBounds_1.InitDialogMemoizeBounds; } });
|
|
20
20
|
Object.defineProperty(exports, "InitDialogMemoizeBoundsDeclared", { enumerable: true, get: function () { return initDialogMemoizeBounds_1.InitDialogMemoizeBoundsDeclared; } });
|
|
@@ -22,3 +22,8 @@ Object.defineProperty(exports, "registeredDialogs", { enumerable: true, get: fun
|
|
|
22
22
|
__exportStar(require("./dialogBoundsMemoize"), exports);
|
|
23
23
|
var formInputKeyListeners_1 = require("./formInputKeyListeners");
|
|
24
24
|
Object.defineProperty(exports, "formInputKeyListeners", { enumerable: true, get: function () { return formInputKeyListeners_1.formInputKeyListeners; } });
|
|
25
|
+
__exportStar(require("./Resizeable"), exports);
|
|
26
|
+
var dialogRectAuto_1 = require("./dialogRectAuto");
|
|
27
|
+
Object.defineProperty(exports, "dialogRectAuto", { enumerable: true, get: function () { return dialogRectAuto_1.dialogRectAuto; } });
|
|
28
|
+
var hexToRgb_1 = require("./hexToRgb");
|
|
29
|
+
Object.defineProperty(exports, "hexToRgb", { enumerable: true, get: function () { return hexToRgb_1.hexToRgb; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDialogBoundsMemoKey, RegisteredDialogsMap } from "../types/
|
|
1
|
+
import { IDialogBoundsMemoKey, RegisteredDialogsMap } from "../types/index.js";
|
|
2
2
|
export declare let registeredDialogs: RegisteredDialogsMap;
|
|
3
3
|
export declare let InitDialogMemoizeBoundsDeclared: boolean;
|
|
4
4
|
export declare const BOUNDS_STORE_KEY: IDialogBoundsMemoKey;
|
package/icons/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as CloseIcon } from "./CloseIcon";
|
|
2
|
+
export { default as FullscreenIcon } from "./FullscreenIcon";
|
|
3
|
+
export { default as FullscreenExitIcon } from "./FullscreenExitIcon";
|
|
4
|
+
export { default as InfoIcon } from "./InfoIcon";
|
|
5
|
+
export { default as ResizeIcon } from "./ResizeIcon";
|
package/icons/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ResizeIcon = exports.InfoIcon = exports.FullscreenExitIcon = exports.FullscreenIcon = exports.CloseIcon = void 0;
|
|
7
|
+
var CloseIcon_1 = require("./CloseIcon");
|
|
8
|
+
Object.defineProperty(exports, "CloseIcon", { enumerable: true, get: function () { return __importDefault(CloseIcon_1).default; } });
|
|
9
|
+
var FullscreenIcon_1 = require("./FullscreenIcon");
|
|
10
|
+
Object.defineProperty(exports, "FullscreenIcon", { enumerable: true, get: function () { return __importDefault(FullscreenIcon_1).default; } });
|
|
11
|
+
var FullscreenExitIcon_1 = require("./FullscreenExitIcon");
|
|
12
|
+
Object.defineProperty(exports, "FullscreenExitIcon", { enumerable: true, get: function () { return __importDefault(FullscreenExitIcon_1).default; } });
|
|
13
|
+
var InfoIcon_1 = require("./InfoIcon");
|
|
14
|
+
Object.defineProperty(exports, "InfoIcon", { enumerable: true, get: function () { return __importDefault(InfoIcon_1).default; } });
|
|
15
|
+
var ResizeIcon_1 = require("./ResizeIcon");
|
|
16
|
+
Object.defineProperty(exports, "ResizeIcon", { enumerable: true, get: function () { return __importDefault(ResizeIcon_1).default; } });
|
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import './styles/dialog.scss';
|
|
|
2
2
|
import './styles/dialog.action.scss';
|
|
3
3
|
import './styles/circular-progress.scss';
|
|
4
4
|
export { default } from "./models/Dialog";
|
|
5
|
-
export { DialogProcessing, DialogCloseAction, DialogFullscreenAction, DialogHeaderActionsWrapper, DialogInfoAction } from "./
|
|
5
|
+
export { DialogProcessing, DialogCloseAction, DialogFullscreenAction, DialogHeaderActionsWrapper, DialogInfoAction } from "./features";
|
|
6
6
|
export { DialogAction, ActionProgress, baseDialogOptions } from "./models";
|
|
7
|
-
export { InitDialogMemoizeBounds } from "./helpers
|
|
8
|
-
export { IDialogApiDef } from './types
|
|
7
|
+
export { InitDialogMemoizeBounds } from "./helpers";
|
|
8
|
+
export { IDialogApiDef } from './types';
|
package/index.js
CHANGED
|
@@ -10,16 +10,16 @@ require("./styles/circular-progress.css");
|
|
|
10
10
|
// Models
|
|
11
11
|
var Dialog_1 = require("./models/Dialog");
|
|
12
12
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Dialog_1).default; } });
|
|
13
|
-
var
|
|
14
|
-
Object.defineProperty(exports, "DialogProcessing", { enumerable: true, get: function () { return
|
|
15
|
-
Object.defineProperty(exports, "DialogCloseAction", { enumerable: true, get: function () { return
|
|
16
|
-
Object.defineProperty(exports, "DialogFullscreenAction", { enumerable: true, get: function () { return
|
|
17
|
-
Object.defineProperty(exports, "DialogHeaderActionsWrapper", { enumerable: true, get: function () { return
|
|
18
|
-
Object.defineProperty(exports, "DialogInfoAction", { enumerable: true, get: function () { return
|
|
13
|
+
var features_1 = require("./features");
|
|
14
|
+
Object.defineProperty(exports, "DialogProcessing", { enumerable: true, get: function () { return features_1.DialogProcessing; } });
|
|
15
|
+
Object.defineProperty(exports, "DialogCloseAction", { enumerable: true, get: function () { return features_1.DialogCloseAction; } });
|
|
16
|
+
Object.defineProperty(exports, "DialogFullscreenAction", { enumerable: true, get: function () { return features_1.DialogFullscreenAction; } });
|
|
17
|
+
Object.defineProperty(exports, "DialogHeaderActionsWrapper", { enumerable: true, get: function () { return features_1.DialogHeaderActionsWrapper; } });
|
|
18
|
+
Object.defineProperty(exports, "DialogInfoAction", { enumerable: true, get: function () { return features_1.DialogInfoAction; } });
|
|
19
19
|
var models_1 = require("./models");
|
|
20
20
|
Object.defineProperty(exports, "DialogAction", { enumerable: true, get: function () { return models_1.DialogAction; } });
|
|
21
21
|
Object.defineProperty(exports, "ActionProgress", { enumerable: true, get: function () { return models_1.ActionProgress; } });
|
|
22
22
|
Object.defineProperty(exports, "baseDialogOptions", { enumerable: true, get: function () { return models_1.baseDialogOptions; } });
|
|
23
23
|
// Hooks
|
|
24
|
-
var
|
|
25
|
-
Object.defineProperty(exports, "InitDialogMemoizeBounds", { enumerable: true, get: function () { return
|
|
24
|
+
var helpers_1 = require("./helpers");
|
|
25
|
+
Object.defineProperty(exports, "InitDialogMemoizeBounds", { enumerable: true, get: function () { return helpers_1.InitDialogMemoizeBounds; } });
|
package/models/Dialog.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { DialogAction } from "./DialogAction";
|
|
3
|
-
import { TInitialHolder, DialogValues } from "../types/
|
|
4
|
-
import { IDialogSize, TDialogStateListenerCallbackType, DialogOptionsType, IDialogApiDef, TDialogCallbackVoidFn, TDialogCallbackFn } from "../types/DialogTypes";
|
|
3
|
+
import { TInitialHolder, DialogValues, IDialogSize, TDialogStateListenerCallbackType, DialogOptionsType, IDialogApiDef, TDialogCallbackVoidFn, TDialogCallbackFn } from "../types/index.js";
|
|
5
4
|
interface DialogProps {
|
|
6
5
|
setHeader(header: TDialogCallbackFn): Dialog;
|
|
7
6
|
}
|
package/models/DialogAction.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TDialogStateListenerForActionCallbackType, DialogActionOptionsType, DialogActionType, ActionIntentType } from "../types/
|
|
2
|
-
import DialogActionBase from "../components/DialogActionBase";
|
|
1
|
+
import type { TDialogStateListenerForActionCallbackType, DialogActionOptionsType, DialogActionType, ActionIntentType, ActionIntent } from "../types/index.js";
|
|
3
2
|
declare const ActionProgress: () => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export { ActionProgress };
|
|
5
4
|
export declare const ACTION_INTENTS: {
|
|
@@ -16,13 +15,18 @@ export declare const ACTION_INTENTS: {
|
|
|
16
15
|
readonly color: "primary";
|
|
17
16
|
};
|
|
18
17
|
};
|
|
19
|
-
declare class DialogAction
|
|
18
|
+
declare class DialogAction {
|
|
19
|
+
private readonly _name;
|
|
20
|
+
private _options;
|
|
21
|
+
private _intent;
|
|
22
|
+
_onCLick: DialogActionType;
|
|
23
|
+
_stateListener: TDialogStateListenerForActionCallbackType;
|
|
20
24
|
constructor(name: string, options?: DialogActionOptionsType);
|
|
25
|
+
get name(): string;
|
|
21
26
|
setIntent(intent: ActionIntentType): this;
|
|
22
|
-
getIntent():
|
|
27
|
+
getIntent(): ActionIntent;
|
|
23
28
|
setOptions: (options: DialogActionOptionsType) => this;
|
|
24
29
|
get options(): DialogActionOptionsType;
|
|
25
|
-
get name(): string;
|
|
26
30
|
onClick: (callback: DialogActionType) => this;
|
|
27
31
|
/**
|
|
28
32
|
* Only from init */
|
package/models/DialogAction.js
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __assign = (this && this.__assign) || function () {
|
|
18
3
|
__assign = Object.assign || function(t) {
|
|
19
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -25,16 +10,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
10
|
};
|
|
26
11
|
return __assign.apply(this, arguments);
|
|
27
12
|
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
14
|
exports.DialogAction = exports.ACTION_INTENTS = exports.ActionProgress = void 0;
|
|
33
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
35
|
-
var components_1 = require("../components");
|
|
16
|
+
var _components_1 = require("../components/index.js");
|
|
36
17
|
var ActionProgress = function () {
|
|
37
|
-
return (0, jsx_runtime_1.jsx)(
|
|
18
|
+
return (0, jsx_runtime_1.jsx)(_components_1.CircularProgress, { size: 20, inProcess: { inProcess: true } });
|
|
38
19
|
};
|
|
39
20
|
exports.ActionProgress = ActionProgress;
|
|
40
21
|
exports.ACTION_INTENTS = {
|
|
@@ -51,25 +32,27 @@ exports.ACTION_INTENTS = {
|
|
|
51
32
|
color: 'primary',
|
|
52
33
|
},
|
|
53
34
|
};
|
|
54
|
-
|
|
55
|
-
|
|
35
|
+
// class DialogAction extends DialogActionBase {
|
|
36
|
+
var DialogAction = /** @class */ (function () {
|
|
56
37
|
function DialogAction(name, options) {
|
|
57
|
-
var _this =
|
|
58
|
-
|
|
38
|
+
var _this = this;
|
|
39
|
+
this.setOptions = function (options) {
|
|
59
40
|
_this._options = options;
|
|
60
41
|
return _this;
|
|
61
42
|
};
|
|
62
|
-
|
|
63
|
-
|
|
43
|
+
this.onClick = function (callback) {
|
|
44
|
+
// super.onClick(callback);
|
|
45
|
+
_this._onCLick = callback;
|
|
64
46
|
return _this;
|
|
65
47
|
};
|
|
66
48
|
/**
|
|
67
49
|
* Only from init */
|
|
68
|
-
|
|
50
|
+
this.stateListener = function (listener) {
|
|
69
51
|
_this._stateListener = listener;
|
|
70
52
|
return _this;
|
|
71
53
|
};
|
|
72
|
-
|
|
54
|
+
// super();
|
|
55
|
+
this._name = name;
|
|
73
56
|
var defaultOptions = {
|
|
74
57
|
label: null,
|
|
75
58
|
variant: 'contained',
|
|
@@ -77,10 +60,16 @@ var DialogAction = /** @class */ (function (_super) {
|
|
|
77
60
|
disabled: false,
|
|
78
61
|
prevDisabled: false
|
|
79
62
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return _this;
|
|
63
|
+
this._options = __assign(__assign({}, defaultOptions), (options !== null && options !== void 0 ? options : {}));
|
|
64
|
+
this._intent = null;
|
|
83
65
|
}
|
|
66
|
+
Object.defineProperty(DialogAction.prototype, "name", {
|
|
67
|
+
get: function () {
|
|
68
|
+
return this._name;
|
|
69
|
+
},
|
|
70
|
+
enumerable: false,
|
|
71
|
+
configurable: true
|
|
72
|
+
});
|
|
84
73
|
DialogAction.prototype.setIntent = function (intent) {
|
|
85
74
|
this._intent = exports.ACTION_INTENTS[intent];
|
|
86
75
|
return this;
|
|
@@ -95,13 +84,6 @@ var DialogAction = /** @class */ (function (_super) {
|
|
|
95
84
|
enumerable: false,
|
|
96
85
|
configurable: true
|
|
97
86
|
});
|
|
98
|
-
Object.defineProperty(DialogAction.prototype, "name", {
|
|
99
|
-
get: function () {
|
|
100
|
-
return this._name;
|
|
101
|
-
},
|
|
102
|
-
enumerable: false,
|
|
103
|
-
configurable: true
|
|
104
|
-
});
|
|
105
87
|
return DialogAction;
|
|
106
|
-
}(
|
|
88
|
+
}());
|
|
107
89
|
exports.DialogAction = DialogAction;
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
18
|
};
|
|
5
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.baseDialogOptions = exports.default =
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, "DialogAction", { enumerable: true, get: function () { return DialogAction_1.DialogAction; } });
|
|
9
|
-
Object.defineProperty(exports, "ActionProgress", { enumerable: true, get: function () { return DialogAction_1.ActionProgress; } });
|
|
20
|
+
exports.baseDialogOptions = exports.default = void 0;
|
|
21
|
+
__exportStar(require("./DialogAction"), exports);
|
|
10
22
|
var Dialog_1 = require("./Dialog");
|
|
11
23
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Dialog_1).default; } });
|
|
12
24
|
var baseDialogOptions_1 = require("./baseDialogOptions");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.55",
|
|
4
4
|
"description": "This package is a continuation of the react-araci package. Due to an error, react-araci was removed, and it has been decided to continue under the new package name react-dialogger",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Sueleyman Topaloglu",
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { IDialogApiDef, IListenerDialogDef } from "./
|
|
2
|
-
import {
|
|
3
|
-
import DialogBase from "../components/DialogBase";
|
|
4
|
-
import DialogActionBase from "../components/DialogActionBase";
|
|
5
|
-
import { CSSProperties } from "react";
|
|
1
|
+
import { IDialogApiDef, IListenerDialogDef, TValues, ICoords } from "./index.js";
|
|
2
|
+
import { DialogBase, DialogActionBase } from "../components/index.js";
|
|
6
3
|
import * as React from "react";
|
|
7
|
-
import { DialogAction } from "../models";
|
|
8
|
-
import {
|
|
4
|
+
import { DialogAction, ACTION_INTENTS } from "../models/index.js";
|
|
5
|
+
import { CSSProperties } from "react";
|
|
9
6
|
export type ActionDialogDef = Omit<IDialogApiDef, 'switchFullScreen'>;
|
|
10
7
|
export type ActionDef = Pick<DialogAction, 'onClick' | 'setOptions' | 'name'>;
|
|
11
|
-
export type ActionBaseDef = Pick<DialogActionBase, 'updateOptions' |
|
|
8
|
+
export type ActionBaseDef = Pick<DialogActionBase, 'updateOptions' |
|
|
9
|
+
/**@deprecated use updateOptions*/
|
|
10
|
+
'setOptions' | 'setInProcess' | 'getLabel' | 'options' | 'click' | 'remove' | 'name'>;
|
|
12
11
|
export interface IDialogActionDef extends ActionBaseDef {
|
|
13
12
|
}
|
|
14
13
|
export type DialogActionType = (button: ActionBaseDef, dialog: Omit<IDialogApiDef, 'switchFullScreen'>) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TDialogCallbackFn } from "./DialogTypes";
|
|
2
2
|
import DialogBase from "../components/DialogBase";
|
|
3
3
|
import { ReactNode, RefObject } from "react";
|
|
4
|
-
import { BaseDialogDOMRect } from "./
|
|
5
|
-
import { Resizeable } from "../helpers/
|
|
4
|
+
import { BaseDialogDOMRect } from "./index.js";
|
|
5
|
+
import { Resizeable } from "../helpers/index.js";
|
|
6
6
|
export interface DialogContentContextProviderProps {
|
|
7
7
|
dialogBase: DialogBase<any>;
|
|
8
8
|
body: TDialogCallbackFn<ReturnType<any>>;
|
|
@@ -15,7 +15,7 @@ export interface DialogContentContextProviderProps {
|
|
|
15
15
|
prevDialogRect: BaseDialogDOMRect;
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
}
|
|
18
|
-
export interface DialogContentContextProviderSharedProps extends Partial<Pick<DialogContentContextProviderProps, 'dialogRef' | 'headerRef' | 'bodyRef' | 'footerRef' | 'backdropRef' | 'snackbarRef' | 'prevDialogRect'>> {
|
|
18
|
+
export interface DialogContentContextProviderSharedProps extends Partial<Pick<DialogContentContextProviderProps, 'body' | 'dialogRef' | 'headerRef' | 'bodyRef' | 'footerRef' | 'backdropRef' | 'snackbarRef' | 'prevDialogRect'>> {
|
|
19
19
|
baseZoomEffect: () => void;
|
|
20
20
|
dialog: DialogBase<any>;
|
|
21
21
|
resizeableObject: Resizeable | null;
|