react-dialogger 1.1.70 → 1.1.72
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/LICENCE.txt +21 -0
- package/components/Actions.js +0 -12
- package/components/DialogBase.js +7 -12
- package/components/DialogContent.js +4 -4
- package/components/DialogContentHeader.js +6 -4
- package/components/RippleButton.js +2 -1
- package/features/DialogInfoAction.js +7 -1
- package/helpers/Resizeable.js +2 -1
- package/helpers/appLogger.d.ts +1 -0
- package/helpers/appLogger.js +16 -0
- package/helpers/dialogBoundsMemoize.js +5 -4
- package/helpers/formInputKeyListeners.js +0 -2
- package/helpers/initDialogMemoizeBounds.js +0 -3
- package/models/Dialog.d.ts +1 -4
- package/models/Dialog.js +2 -1
- package/package.json +4 -5
- package/types/DialogTypes.d.ts +3 -0
package/LICENCE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 [Süleyman Topaloglu]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/components/Actions.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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.Actions = void 0;
|
|
15
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -18,7 +7,6 @@ var Actions = function (_a) {
|
|
|
18
7
|
var actions = _a.actions, dialog = _a.dialog;
|
|
19
8
|
var dialogOptions = dialog.dialogOptions;
|
|
20
9
|
return (0, jsx_runtime_1.jsx)("div", { style: { position: 'relative', display: 'flex', flexDirection: 'row', columnGap: 10, alignItems: 'center' }, children: actions.map(function (action, index) {
|
|
21
|
-
console.log('Actions_action', __assign(__assign({}, action.options), action.intent));
|
|
22
10
|
var referencedAction = dialog.initializeActionRef(action.name);
|
|
23
11
|
action._actionComponent = referencedAction;
|
|
24
12
|
return (0, jsx_runtime_1.jsx)(_components_1.DialogActionBase, { name: action.name, ref: referencedAction, dialogBaseComponent: dialog,
|
package/components/DialogBase.js
CHANGED
|
@@ -89,7 +89,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
89
89
|
return _this._actionRefs[key];
|
|
90
90
|
};
|
|
91
91
|
_this.setInProcess = function (process, message, holder) {
|
|
92
|
-
var _a, _b, _c;
|
|
92
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
93
93
|
_this._inProcess = __assign({ inProcess: process }, message ? { message: message } : {});
|
|
94
94
|
if (!process) {
|
|
95
95
|
_this._holder = null;
|
|
@@ -104,12 +104,11 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
104
104
|
for (var actionKey in _this._actionRefs) {
|
|
105
105
|
var action = _this._actionRefs[actionKey];
|
|
106
106
|
// Save the current disabled state before changing it
|
|
107
|
-
var currentDisabled = action.current.options.disabled;
|
|
108
|
-
console.log('this._actions', currentDisabled, process);
|
|
107
|
+
var currentDisabled = (_d = (_c = action.current) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.disabled;
|
|
109
108
|
// Set the options with prevDisabled as the current disabled state
|
|
110
109
|
if (currentDisabled !== process) {
|
|
111
110
|
action.current
|
|
112
|
-
.updateOptions(__assign(__assign({}, action.current.options), { prevDisabled: currentDisabled, disabled: process // Set the new disabled state based on the process
|
|
111
|
+
.updateOptions(__assign(__assign({}, (_f = (_e = action.current) === null || _e === void 0 ? void 0 : _e.options) !== null && _f !== void 0 ? _f : {}), { prevDisabled: currentDisabled, disabled: process // Set the new disabled state based on the process
|
|
113
112
|
}));
|
|
114
113
|
}
|
|
115
114
|
}
|
|
@@ -119,8 +118,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
119
118
|
var action = _this._actionRefs[actionKey];
|
|
120
119
|
// Restore the previous disabled state from options
|
|
121
120
|
// Call prevDisabled state from memo
|
|
122
|
-
action.current
|
|
123
|
-
.updateOptions(__assign(__assign({}, action.current.options), { disabled: action.current.options.prevDisabled // Set the new disabled state based on the process
|
|
121
|
+
(_g = action.current) === null || _g === void 0 ? void 0 : _g.updateOptions(__assign(__assign({}, (_j = (_h = action.current) === null || _h === void 0 ? void 0 : _h.options) !== null && _j !== void 0 ? _j : {}), { disabled: action.current.options.prevDisabled // Set the new disabled state based on the process
|
|
124
122
|
}));
|
|
125
123
|
}
|
|
126
124
|
}
|
|
@@ -132,8 +130,8 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
132
130
|
// this._processingListener(process);
|
|
133
131
|
//
|
|
134
132
|
// }
|
|
135
|
-
for (var _i = 0,
|
|
136
|
-
var listener =
|
|
133
|
+
for (var _i = 0, _l = _this._processingListeners; _i < _l.length; _i++) {
|
|
134
|
+
var listener = _l[_i];
|
|
137
135
|
if (typeof listener === "function") {
|
|
138
136
|
listener(process);
|
|
139
137
|
}
|
|
@@ -143,7 +141,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
143
141
|
// //
|
|
144
142
|
// // }
|
|
145
143
|
// @ts-ignore
|
|
146
|
-
(
|
|
144
|
+
(_k = _this._footerRef.current) === null || _k === void 0 ? void 0 : _k.setProcessing(process);
|
|
147
145
|
return _this;
|
|
148
146
|
};
|
|
149
147
|
_this.isInProcess = function () {
|
|
@@ -176,7 +174,6 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
176
174
|
return _this.props.dom;
|
|
177
175
|
};
|
|
178
176
|
_this.render = function () {
|
|
179
|
-
console.log('this._prevDialogRect', _this.state.prevDialogRect);
|
|
180
177
|
return (0, jsx_runtime_1.jsx)(_context_1.DialogContentContextProvider
|
|
181
178
|
// 1️⃣initialValues={this.props.initialValues}
|
|
182
179
|
, {
|
|
@@ -222,7 +219,6 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
222
219
|
size: _this._dialogSize
|
|
223
220
|
}
|
|
224
221
|
}, _this._dialogOptions);
|
|
225
|
-
console.log('Dialog_Base_Options', defaultOptions, window["dialogOptions"], props.initialOptions);
|
|
226
222
|
_this._dialogOptions = (0, lodash_1.merge)({}, defaultOptions, window["dialogOptions"], props.initialOptions);
|
|
227
223
|
_this._header = props.header;
|
|
228
224
|
_this._body = props.body;
|
|
@@ -240,7 +236,6 @@ var DialogBase = /** @class */ (function (_super) {
|
|
|
240
236
|
_this._parent = props.parent;
|
|
241
237
|
_this._processingListeners = (_a = props.processingListeners) !== null && _a !== void 0 ? _a : [];
|
|
242
238
|
_this._features = [];
|
|
243
|
-
console.log('this._dialogOptions', _this._dialogOptions);
|
|
244
239
|
return _this;
|
|
245
240
|
}
|
|
246
241
|
DialogBase.prototype.addFeature = function (key, value) {
|
|
@@ -70,6 +70,7 @@ var _1 = require("./");
|
|
|
70
70
|
var react_1 = require("react");
|
|
71
71
|
var jumper_animate_1 = require("../utils/effects/jumper-animate");
|
|
72
72
|
var _context_1 = require("../context/index.js");
|
|
73
|
+
var appLogger_1 = require("../helpers/appLogger");
|
|
73
74
|
var DialogContent = function (props) {
|
|
74
75
|
var _a, _b, _c, _d, _e;
|
|
75
76
|
var firstUpdate = React.useRef(true);
|
|
@@ -100,13 +101,12 @@ var DialogContent = function (props) {
|
|
|
100
101
|
if (typeof dialog.props.stateListener === "function") {
|
|
101
102
|
dialog.props.stateListener(dialog.values, dialog);
|
|
102
103
|
}
|
|
103
|
-
// console.log('DialogContent_actions_refs', dialog._actionRefs);
|
|
104
104
|
// State Listener Actions
|
|
105
105
|
for (var actionKey in dialog._actionRefs) {
|
|
106
106
|
// const action = dialog._actionRefs[actionKey];
|
|
107
107
|
var actionRef = dialog.initializeActionRef(actionKey);
|
|
108
108
|
if (typeof actionRef.current._stateListener === "function") {
|
|
109
|
-
|
|
109
|
+
(0, appLogger_1.appLog)('DialogContent_actions_ref', actionRef.current._stateListener);
|
|
110
110
|
actionRef.current._stateListener(dialog.values, actionRef === null || actionRef === void 0 ? void 0 : actionRef.current, dialog);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -145,7 +145,7 @@ var DialogContent = function (props) {
|
|
|
145
145
|
}
|
|
146
146
|
}, 1000);
|
|
147
147
|
}, []);
|
|
148
|
-
return (0, jsx_runtime_1.jsx)(react_draggable_1.default, { disabled: !baseOptions.draggable || fullscreenMode, axis: 'both', handle: baseOptions.draggable ? '.drag-handle' : '', scale: 1,
|
|
148
|
+
return (0, jsx_runtime_1.jsx)(react_draggable_1.default, { disabled: !baseOptions.draggable || fullscreenMode, axis: 'both', handle: baseOptions.draggable ? '.drag-handle' : '', scale: 1, nodeRef: dialogRef, onDrag: function (event, data) {
|
|
149
149
|
event.stopPropagation();
|
|
150
150
|
dialog._dialogTranslate = { lastX: data.lastX, lastY: data.lastY };
|
|
151
151
|
}, onStop: function (event, data) {
|
|
@@ -153,7 +153,7 @@ var DialogContent = function (props) {
|
|
|
153
153
|
event.stopPropagation();
|
|
154
154
|
event.preventDefault();
|
|
155
155
|
var _c = (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect(), width = _c.width, height = _c.height, x = _c.x, y = _c.y;
|
|
156
|
-
|
|
156
|
+
(0, appLogger_1.appLog)('onDragStop', 'fired', (_b = dialogRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect());
|
|
157
157
|
(0, _helpers_1.setDialogBounds)(dialogOptions.base.id, {
|
|
158
158
|
width: width,
|
|
159
159
|
height: height,
|
|
@@ -60,15 +60,17 @@ var DialogContentHeader = function (_a) {
|
|
|
60
60
|
var baseOptions = dialogOptions.base;
|
|
61
61
|
var _g = React.useState(bounds === null || bounds === void 0 ? void 0 : bounds.fullscreen), fullscreen = _g[0], setFullscreen = _g[1];
|
|
62
62
|
(0, react_1.useEffect)(function () {
|
|
63
|
+
var _a, _b, _c;
|
|
63
64
|
if (fullscreen) {
|
|
64
|
-
dialogRef.current.classList.add('fullscreen');
|
|
65
|
+
(_a = dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _a === void 0 ? void 0 : _a.classList.add('fullscreen');
|
|
65
66
|
}
|
|
66
67
|
else {
|
|
67
|
-
dialogRef.current.classList.remove('fullscreen');
|
|
68
|
+
(_b = dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _b === void 0 ? void 0 : _b.classList.remove('fullscreen');
|
|
68
69
|
}
|
|
69
|
-
dialogRef.current.classList.add('no-user-select');
|
|
70
|
+
(_c = dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _c === void 0 ? void 0 : _c.classList.add('no-user-select');
|
|
70
71
|
setTimeout(function () {
|
|
71
|
-
|
|
72
|
+
var _a;
|
|
73
|
+
(_a = dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove('no-user-select');
|
|
72
74
|
}, 300);
|
|
73
75
|
}, [fullscreen]);
|
|
74
76
|
var CustomHeader = (_b = dialogOptions.slot) === null || _b === void 0 ? void 0 : _b.header;
|
|
@@ -48,6 +48,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
48
48
|
var React = __importStar(require("react"));
|
|
49
49
|
var react_1 = require("react");
|
|
50
50
|
var Colorify_1 = require("../helpers/Colorify");
|
|
51
|
+
var appLogger_1 = require("../helpers/appLogger");
|
|
51
52
|
exports.default = React.forwardRef(function (_a, ref) {
|
|
52
53
|
var variant = _a.variant, color = _a.color, children = _a.children, disabled = _a.disabled, onClick = _a.onClick, style = _a.style, baseStyle = _a.baseStyle, innerRef = _a.innerRef, fontFamily = _a.fontFamily;
|
|
53
54
|
var _b = React.useState({ x: -1, y: -1 }), coords = _b[0], setCoords = _b[1];
|
|
@@ -87,7 +88,7 @@ exports.default = React.forwardRef(function (_a, ref) {
|
|
|
87
88
|
hexedColor = (0, Colorify_1.colorNameToHex)(hexedColor);
|
|
88
89
|
}
|
|
89
90
|
exclusive = (0, Colorify_1.getButtonColors)(hexedColor);
|
|
90
|
-
|
|
91
|
+
(0, appLogger_1.appLog)('Button_variant', variant);
|
|
91
92
|
if (variant === 'text') {
|
|
92
93
|
exclusive.backgroundColor = 'inherit';
|
|
93
94
|
exclusive.color = color; // exclusive.backgroundColor;
|
|
@@ -44,6 +44,12 @@ var _icons_1 = require("../icons/index.js");
|
|
|
44
44
|
var package_json_1 = __importDefault(require("../package.json"));
|
|
45
45
|
var _context_1 = require("../context/index.js");
|
|
46
46
|
var _models_1 = __importStar(require("../models/index.js"));
|
|
47
|
+
// const packageJSon = {
|
|
48
|
+
// author: 'Suleyman Topaloglu',
|
|
49
|
+
// version: '1.1.67',
|
|
50
|
+
// name: 'react-dialogger',
|
|
51
|
+
//
|
|
52
|
+
// }
|
|
47
53
|
// const DialogFullscreenAction = ({dialog}:{dialog: React.RefObject<IDialogRef> | undefined}) => {
|
|
48
54
|
var DialogInfoAction = function () {
|
|
49
55
|
var _a, _b, _c, _d;
|
|
@@ -80,7 +86,7 @@ var DialogInfoAction = function () {
|
|
|
80
86
|
});
|
|
81
87
|
dialog
|
|
82
88
|
.setHeader(function (dialog1) { return 'Info'; })
|
|
83
|
-
.setBody(function (dialog1) { return (0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "Name" }), (0, jsx_runtime_1.jsx)("td", { children: package_json_1.default.name })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "
|
|
89
|
+
.setBody(function (dialog1) { return (0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "Name" }), (0, jsx_runtime_1.jsx)("td", { children: package_json_1.default === null || package_json_1.default === void 0 ? void 0 : package_json_1.default.name })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "Version" }), (0, jsx_runtime_1.jsx)("td", { children: package_json_1.default === null || package_json_1.default === void 0 ? void 0 : package_json_1.default.version })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "Author" }), (0, jsx_runtime_1.jsx)("td", { children: package_json_1.default === null || package_json_1.default === void 0 ? void 0 : package_json_1.default.author })] })] }) }); })
|
|
84
90
|
.addActions([
|
|
85
91
|
closeAction
|
|
86
92
|
])
|
package/helpers/Resizeable.js
CHANGED
|
@@ -13,6 +13,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.Resizeable = void 0;
|
|
15
15
|
var _helpers_1 = require("./index.js");
|
|
16
|
+
var appLogger_1 = require("./appLogger");
|
|
16
17
|
var Resizeable = /** @class */ (function () {
|
|
17
18
|
function Resizeable() {
|
|
18
19
|
var _this = this;
|
|
@@ -30,7 +31,7 @@ var Resizeable = /** @class */ (function () {
|
|
|
30
31
|
// Bounds case
|
|
31
32
|
var container = _this._container.current;
|
|
32
33
|
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
|
-
|
|
34
|
+
(0, appLogger_1.appLog)('resizeHandleMouseUp', container === null || container === void 0 ? void 0 : container.getBoundingClientRect().toJSON());
|
|
34
35
|
// setDialogBounds( this._dialogOptions.base.id, {width, height, x, y, fullscreen: false}, this._container );
|
|
35
36
|
(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
37
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const appLog: (...args: any[]) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appLog = void 0;
|
|
4
|
+
// require('dotenv').config();
|
|
5
|
+
// const isProd = process.env.NODE_ENV === 'production';
|
|
6
|
+
var appLog = function () {
|
|
7
|
+
var args = [];
|
|
8
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
9
|
+
args[_i] = arguments[_i];
|
|
10
|
+
}
|
|
11
|
+
// if (isProd) {
|
|
12
|
+
//
|
|
13
|
+
// }
|
|
14
|
+
// console.log(...args);
|
|
15
|
+
};
|
|
16
|
+
exports.appLog = appLog;
|
|
@@ -14,6 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.setDialogBound = exports.setDialogBounds = exports.getDialogBounds = exports.dialogRegister = void 0;
|
|
15
15
|
// import {registeredDialogs} from "../hooks/initDialogMemoizeBounds";
|
|
16
16
|
var initDialogMemoizeBounds_1 = require("./initDialogMemoizeBounds");
|
|
17
|
+
var appLogger_1 = require("./appLogger");
|
|
17
18
|
/**
|
|
18
19
|
* Read from RAM...
|
|
19
20
|
* */
|
|
@@ -46,7 +47,7 @@ var dialogRegister = function (dialogId, initialBounds) {
|
|
|
46
47
|
};
|
|
47
48
|
// To RAM
|
|
48
49
|
initDialogMemoizeBounds_1.registeredDialogs.set(combined.join('-'), newDialogBounds);
|
|
49
|
-
|
|
50
|
+
(0, appLogger_1.appLog)('dialogRegister_combined', initialBounds, newDialogBounds, combined.join('-'), initDialogMemoizeBounds_1.registeredDialogs, Array.from(initDialogMemoizeBounds_1.registeredDialogs));
|
|
50
51
|
// To Store
|
|
51
52
|
try {
|
|
52
53
|
window.localStorage.setItem(initDialogMemoizeBounds_1.BOUNDS_STORE_KEY, JSON.stringify(Array.from(initDialogMemoizeBounds_1.registeredDialogs)));
|
|
@@ -62,7 +63,7 @@ var getDialogBounds = function (dialogId) {
|
|
|
62
63
|
throw new Error('Dialog bounds can not be memoized. Dialog id is required.');
|
|
63
64
|
}
|
|
64
65
|
var dialog = dialogInStore(dialogId);
|
|
65
|
-
|
|
66
|
+
(0, appLogger_1.appLog)('getDialogBounds_dialog', initDialogMemoizeBounds_1.registeredDialogs, dialog);
|
|
66
67
|
if (dialog) {
|
|
67
68
|
return dialog.bounds;
|
|
68
69
|
}
|
|
@@ -72,7 +73,7 @@ exports.getDialogBounds = getDialogBounds;
|
|
|
72
73
|
var setDialogBounds = function (dialogId, bounds, dialogRef) {
|
|
73
74
|
var combined = ['guzzle', dialogId];
|
|
74
75
|
var foundedDialog = initDialogMemoizeBounds_1.registeredDialogs.get(combined.join('-'));
|
|
75
|
-
|
|
76
|
+
(0, appLogger_1.appLog)('setDialogBounds_combined', combined, combined.join('-'), bounds, foundedDialog);
|
|
76
77
|
if (foundedDialog) {
|
|
77
78
|
// Save to RAM
|
|
78
79
|
initDialogMemoizeBounds_1.registeredDialogs.set(combined.join('-'), {
|
|
@@ -91,7 +92,7 @@ var setDialogBounds = function (dialogId, bounds, dialogRef) {
|
|
|
91
92
|
*
|
|
92
93
|
* */
|
|
93
94
|
// Save to Store
|
|
94
|
-
|
|
95
|
+
(0, appLogger_1.appLog)('registeredDialogs', initDialogMemoizeBounds_1.registeredDialogs);
|
|
95
96
|
try {
|
|
96
97
|
window.localStorage.setItem(initDialogMemoizeBounds_1.BOUNDS_STORE_KEY, JSON.stringify(Array.from(initDialogMemoizeBounds_1.registeredDialogs)));
|
|
97
98
|
}
|
|
@@ -7,8 +7,6 @@ var formInputKeyListeners = function (wrapperEl) {
|
|
|
7
7
|
var inputElements = wrapperEl.querySelectorAll("input");
|
|
8
8
|
// Tüm input elemanlarını döngüye al
|
|
9
9
|
inputElements.forEach(function (input) {
|
|
10
|
-
console.log(input); // Her bir input elemanını burada işleyebilirsiniz
|
|
11
|
-
// Örneğin, input değerini okuma veya ayarlama
|
|
12
10
|
input.addEventListener('keydown', function (e) { return e.key === "Enter" && e.preventDefault(); }); // Değerini boşaltmak için örnek
|
|
13
11
|
input.addEventListener('keyup', function (e) { return e.key === "Enter" && e.preventDefault(); }); // Değerini boşaltmak için örnek
|
|
14
12
|
input.addEventListener('keypress', function (e) { return e.key === "Enter" && e.preventDefault(); }); // Değerini boşaltmak için örnek
|
|
@@ -32,12 +32,9 @@ var InitDialogMemoizeBounds = function () {
|
|
|
32
32
|
createBoundStore();
|
|
33
33
|
}
|
|
34
34
|
var boundsRaw = window.localStorage.getItem(exports.BOUNDS_STORE_KEY);
|
|
35
|
-
// console.log('boundsRaw', boundStoreExists, JSON.parse(boundsRaw));
|
|
36
35
|
var boundsArray = boundsRaw ? JSON.parse(boundsRaw) : [];
|
|
37
|
-
console.log('readFromStore-0', boundsArray);
|
|
38
36
|
return new Map(boundsArray.map(function (d) { return [d[0], d[1]]; }));
|
|
39
37
|
};
|
|
40
|
-
console.log('readFromStore', window.localStorage.getItem(exports.BOUNDS_STORE_KEY), readFromStore());
|
|
41
38
|
// Set this on App level
|
|
42
39
|
exports.registeredDialogs = readFromStore();
|
|
43
40
|
exports.InitDialogMemoizeBoundsDeclared = true;
|
package/models/Dialog.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { DialogAction } from "./DialogAction";
|
|
3
3
|
import { TInitialHolder, DialogValues, IDialogSize, TDialogStateListenerCallbackType, DialogOptionsType, IDialogApiDef, TDialogCallbackVoidFn, TDialogCallbackFn } from "../types/index.js";
|
|
4
|
-
|
|
5
|
-
setHeader(header: TDialogCallbackFn): Dialog;
|
|
6
|
-
}
|
|
7
|
-
declare class Dialog implements DialogProps {
|
|
4
|
+
declare class Dialog {
|
|
8
5
|
private _processingListeners;
|
|
9
6
|
private _stateListener;
|
|
10
7
|
private _keyboardListener;
|
package/models/Dialog.js
CHANGED
|
@@ -50,6 +50,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
50
50
|
var React = __importStar(require("react"));
|
|
51
51
|
var DialogBase_1 = __importDefault(require("../components/DialogBase"));
|
|
52
52
|
var client_1 = require("react-dom/client");
|
|
53
|
+
var appLogger_1 = require("../helpers/appLogger");
|
|
53
54
|
var Dialog = /** @class */ (function () {
|
|
54
55
|
function Dialog(dialogRef, options) {
|
|
55
56
|
var _this = this;
|
|
@@ -66,7 +67,7 @@ var Dialog = /** @class */ (function () {
|
|
|
66
67
|
return highest + 1;
|
|
67
68
|
};
|
|
68
69
|
this.createDom = function () {
|
|
69
|
-
|
|
70
|
+
(0, appLogger_1.appLog)('this._actions', _this._actions);
|
|
70
71
|
var dom = document.createElement('div');
|
|
71
72
|
dom.setAttribute('role', 'presentation');
|
|
72
73
|
dom.setAttribute('data-type', 'dialog');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dialogger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.72",
|
|
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",
|
|
@@ -20,15 +20,14 @@
|
|
|
20
20
|
"email": "developer@appinsource.eu"
|
|
21
21
|
}
|
|
22
22
|
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"pb": "npm version patch && npm publish && cp ./package.json ../src/dist.package.json"
|
|
25
|
-
},
|
|
26
23
|
"keywords": [
|
|
27
24
|
"react",
|
|
28
25
|
"dialog",
|
|
29
26
|
"dynamic",
|
|
30
27
|
"component",
|
|
31
28
|
"ui",
|
|
32
|
-
"react-component"
|
|
29
|
+
"react-component",
|
|
30
|
+
"dynamic dialog",
|
|
31
|
+
"react-dialogger"
|
|
33
32
|
]
|
|
34
33
|
}
|