react-dialogger 1.1.5 → 1.1.8
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/DialogBase.d.ts +1 -1
- package/components/DialogBase.js +4 -4
- package/components/Futures/DialogInfoAction.d.ts +3 -0
- package/components/Futures/DialogInfoAction.js +93 -0
- package/components/Futures/index.d.ts +1 -0
- package/components/Futures/index.js +3 -1
- package/components/icons/InfoIcon.d.ts +6 -0
- package/components/icons/InfoIcon.js +23 -0
- package/index.d.ts +1 -1
- package/index.js +2 -1
- package/package.json +5 -2
- package/styles/dialog.css +13 -1
@@ -116,12 +116,12 @@ declare class DialogBase extends Component<BaseDialogProps, BaseDialogState> {
|
|
116
116
|
}) => void;
|
117
117
|
close: (key?: string) => void;
|
118
118
|
};
|
119
|
+
getSize: () => IDialogSize;
|
119
120
|
private baseZoomEffect;
|
120
121
|
private withBackdrop;
|
121
122
|
switchFullScreen: () => void;
|
122
123
|
private Placeholder;
|
123
124
|
private Header;
|
124
|
-
getSize: () => IDialogSize;
|
125
125
|
private Body;
|
126
126
|
private Footer;
|
127
127
|
private Actions;
|
package/components/DialogBase.js
CHANGED
@@ -289,6 +289,9 @@ var DialogBase = /** @class */ (function (_super) {
|
|
289
289
|
_this.getDom = function () {
|
290
290
|
return _this.props.dom;
|
291
291
|
};
|
292
|
+
_this.getSize = function () {
|
293
|
+
return _this._dialogSize;
|
294
|
+
};
|
292
295
|
_this.baseZoomEffect = function () {
|
293
296
|
var _a = _this._dialogTranslate, lastX = _a.lastX, lastY = _a.lastY;
|
294
297
|
_this._dialogRef.current.animate([
|
@@ -386,9 +389,6 @@ var DialogBase = /** @class */ (function (_super) {
|
|
386
389
|
}
|
387
390
|
return React.createElement("div", { style: (_g = (_f = _this._dialogOptions.base) === null || _f === void 0 ? void 0 : _f.header) === null || _g === void 0 ? void 0 : _g.style, className: 'drag-handle dialog-header' }, header);
|
388
391
|
};
|
389
|
-
_this.getSize = function () {
|
390
|
-
return _this._dialogSize;
|
391
|
-
};
|
392
392
|
_this.Body = function (body) {
|
393
393
|
if (body instanceof Function) {
|
394
394
|
return React.createElement("div", { ref: _this._dialogBodyRef, className: 'dialog-body', style: { height: '100%' } },
|
@@ -419,7 +419,7 @@ var DialogBase = /** @class */ (function (_super) {
|
|
419
419
|
inProcess: _this.isInProcess()
|
420
420
|
});
|
421
421
|
}
|
422
|
-
console.log('FooterSlot_props_Y', footerProps, staticProps);
|
422
|
+
console.log('FooterSlot_props_Y', footerProps, staticProps, 'V6 ya hazirlik');
|
423
423
|
return React.createElement("div", { className: 'dialog-footer', style: (_c = (_b = _this._dialogOptions.base) === null || _b === void 0 ? void 0 : _b.footer) === null || _c === void 0 ? void 0 : _c.style },
|
424
424
|
React.createElement("div", null,
|
425
425
|
React.createElement(WithHeaderFooterContext, __assign({}, staticProps, { dialog: _this }), _this._dialogOptions.slot.footer ?
|
@@ -0,0 +1,93 @@
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.DialogInfoAction = void 0;
|
30
|
+
var React = __importStar(require("react"));
|
31
|
+
var react_1 = require("react");
|
32
|
+
var DialogBase_1 = require("../DialogBase");
|
33
|
+
var InfoIcon_1 = __importDefault(require("../icons/InfoIcon"));
|
34
|
+
var package_json_1 = __importDefault(require("../../../package.json"));
|
35
|
+
var __1 = __importStar(require("../../"));
|
36
|
+
// const DialogFullscreenAction = ({dialog}:{dialog: React.RefObject<IDialogRef> | undefined}) => {
|
37
|
+
var DialogInfoAction = function () {
|
38
|
+
var _a, _b, _c, _d;
|
39
|
+
var dialogHeaderContext = (0, react_1.useContext)(DialogBase_1.DialogHeaderFooterContext);
|
40
|
+
var _dialog = dialogHeaderContext.dialog;
|
41
|
+
return React.createElement("div", { className: 'info-icon-wrapper', onClick: function (event) {
|
42
|
+
var closeAction = new __1.DialogAction('closeAction', {
|
43
|
+
label: 'Close',
|
44
|
+
variant: 'text',
|
45
|
+
color: 'default'
|
46
|
+
});
|
47
|
+
closeAction.onClick(function (button, dialog1) {
|
48
|
+
dialog1.close();
|
49
|
+
});
|
50
|
+
var dialog = new __1.default(null, {
|
51
|
+
base: {
|
52
|
+
resizeable: false,
|
53
|
+
draggable: false,
|
54
|
+
closeable: true,
|
55
|
+
size: {
|
56
|
+
width: 'xs',
|
57
|
+
height: 'initial'
|
58
|
+
},
|
59
|
+
initialAnchor: _dialog.dialogOptions.base.initialAnchor,
|
60
|
+
footer: {
|
61
|
+
style: {
|
62
|
+
borderTop: 'none'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
header: {
|
66
|
+
style: {
|
67
|
+
borderBottom: 'none'
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
});
|
72
|
+
dialog
|
73
|
+
.setHeader(function (dialog1) { return 'Info'; })
|
74
|
+
.setBody(function (dialog1) { return React.createElement("table", null,
|
75
|
+
React.createElement("tbody", null,
|
76
|
+
React.createElement("tr", null,
|
77
|
+
React.createElement("td", null, "Name"),
|
78
|
+
React.createElement("td", null, package_json_1.default.name)),
|
79
|
+
React.createElement("tr", null,
|
80
|
+
React.createElement("td", null, "Varsion"),
|
81
|
+
React.createElement("td", null, package_json_1.default.version)),
|
82
|
+
React.createElement("tr", null,
|
83
|
+
React.createElement("td", null, "Author"),
|
84
|
+
React.createElement("td", null, package_json_1.default.author)))); })
|
85
|
+
.addActions([
|
86
|
+
closeAction
|
87
|
+
])
|
88
|
+
.initialState({})
|
89
|
+
.show();
|
90
|
+
} },
|
91
|
+
React.createElement(InfoIcon_1.default, { 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 }));
|
92
|
+
};
|
93
|
+
exports.DialogInfoAction = DialogInfoAction;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export { DialogCloseAction } from "./DialogCloseAction";
|
2
|
+
export { DialogInfoAction } from "./DialogInfoAction";
|
2
3
|
export { DialogProcessing } from "./DialogProcessing";
|
3
4
|
export { DialogFullscreenAction } from "./DialogFullscreenAction";
|
4
5
|
export { DialogHeaderActionsWrapper } from "./DialogHeaderActionsWrapper";
|
@@ -1,8 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.DialogHeaderActionsWrapper = exports.DialogFullscreenAction = exports.DialogProcessing = exports.DialogCloseAction = void 0;
|
3
|
+
exports.DialogHeaderActionsWrapper = exports.DialogFullscreenAction = exports.DialogProcessing = exports.DialogInfoAction = exports.DialogCloseAction = void 0;
|
4
4
|
var DialogCloseAction_1 = require("./DialogCloseAction");
|
5
5
|
Object.defineProperty(exports, "DialogCloseAction", { enumerable: true, get: function () { return DialogCloseAction_1.DialogCloseAction; } });
|
6
|
+
var DialogInfoAction_1 = require("./DialogInfoAction");
|
7
|
+
Object.defineProperty(exports, "DialogInfoAction", { enumerable: true, get: function () { return DialogInfoAction_1.DialogInfoAction; } });
|
6
8
|
var DialogProcessing_1 = require("./DialogProcessing");
|
7
9
|
Object.defineProperty(exports, "DialogProcessing", { enumerable: true, get: function () { return DialogProcessing_1.DialogProcessing; } });
|
8
10
|
var DialogFullscreenAction_1 = require("./DialogFullscreenAction");
|
@@ -0,0 +1,23 @@
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
var react_1 = __importDefault(require("react"));
|
18
|
+
exports.default = (function (_a) {
|
19
|
+
var size = _a.size, color = _a.color;
|
20
|
+
return react_1.default.createElement("div", { className: 'info-icon', style: __assign({ fill: color }, size ? { width: size } : null) },
|
21
|
+
react_1.default.createElement("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "InfoIcon" },
|
22
|
+
react_1.default.createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" })));
|
23
|
+
});
|
package/index.d.ts
CHANGED
@@ -3,6 +3,6 @@ import './styles/dialog.action.scss';
|
|
3
3
|
import './styles/circular-progress.scss';
|
4
4
|
export { default as Dialog } from "./models/Dialog";
|
5
5
|
export { default } from "./models/Dialog";
|
6
|
-
export { DialogProcessing, DialogCloseAction, DialogFullscreenAction, DialogHeaderActionsWrapper } from "./components/Futures";
|
6
|
+
export { DialogProcessing, DialogCloseAction, DialogFullscreenAction, DialogHeaderActionsWrapper, DialogInfoAction } from "./components/Futures";
|
7
7
|
export { DialogAction, ActionProgress } from "./models/DialogAction";
|
8
8
|
export { useDialogOptions } from "./hooks/useDialogOptions";
|
package/index.js
CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.useDialogOptions = exports.ActionProgress = exports.DialogAction = exports.DialogHeaderActionsWrapper = exports.DialogFullscreenAction = exports.DialogCloseAction = exports.DialogProcessing = exports.default = exports.Dialog = void 0;
|
6
|
+
exports.useDialogOptions = exports.ActionProgress = exports.DialogAction = exports.DialogInfoAction = exports.DialogHeaderActionsWrapper = exports.DialogFullscreenAction = exports.DialogCloseAction = exports.DialogProcessing = exports.default = exports.Dialog = void 0;
|
7
7
|
require("./styles/dialog.css");
|
8
8
|
require("./styles/dialog.action.css");
|
9
9
|
require("./styles/circular-progress.css");
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "DialogProcessing", { enumerable: true, get: func
|
|
17
17
|
Object.defineProperty(exports, "DialogCloseAction", { enumerable: true, get: function () { return Futures_1.DialogCloseAction; } });
|
18
18
|
Object.defineProperty(exports, "DialogFullscreenAction", { enumerable: true, get: function () { return Futures_1.DialogFullscreenAction; } });
|
19
19
|
Object.defineProperty(exports, "DialogHeaderActionsWrapper", { enumerable: true, get: function () { return Futures_1.DialogHeaderActionsWrapper; } });
|
20
|
+
Object.defineProperty(exports, "DialogInfoAction", { enumerable: true, get: function () { return Futures_1.DialogInfoAction; } });
|
20
21
|
var DialogAction_1 = require("./models/DialogAction");
|
21
22
|
Object.defineProperty(exports, "DialogAction", { enumerable: true, get: function () { return DialogAction_1.DialogAction; } });
|
22
23
|
Object.defineProperty(exports, "ActionProgress", { enumerable: true, get: function () { return DialogAction_1.ActionProgress; } });
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-dialogger",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.8",
|
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,6 +20,9 @@
|
|
20
20
|
"email": "developer@appinsource.eu"
|
21
21
|
}
|
22
22
|
],
|
23
|
+
"scripts": {
|
24
|
+
"pb": "npm version patch && npm publish"
|
25
|
+
},
|
23
26
|
"keywords": [
|
24
27
|
"react",
|
25
28
|
"dialog",
|
@@ -28,4 +31,4 @@
|
|
28
31
|
"ui",
|
29
32
|
"react-component"
|
30
33
|
]
|
31
|
-
}
|
34
|
+
}
|
package/styles/dialog.css
CHANGED
@@ -213,7 +213,7 @@
|
|
213
213
|
min-height: 64px;
|
214
214
|
padding: 10px 20px 10px 20px;
|
215
215
|
display: flex;
|
216
|
-
flex:
|
216
|
+
flex: 0;
|
217
217
|
justify-content: space-between;
|
218
218
|
align-items: center;
|
219
219
|
border-bottom: 0.5px solid rgba(0, 0, 0, 0.2);
|
@@ -222,6 +222,16 @@
|
|
222
222
|
display: flex;
|
223
223
|
flex-direction: row;
|
224
224
|
}
|
225
|
+
.dialog-main .dialog-header .info-icon-wrapper {
|
226
|
+
cursor: help !important;
|
227
|
+
}
|
228
|
+
.dialog-main .dialog-header .info-icon-wrapper .close-icon {
|
229
|
+
fill: #666666;
|
230
|
+
width: 30px;
|
231
|
+
}
|
232
|
+
.dialog-main .dialog-header .info-icon-wrapper *:hover {
|
233
|
+
color: #CCCCCC;
|
234
|
+
}
|
225
235
|
.dialog-main .dialog-header .close-icon-wrapper {
|
226
236
|
cursor: pointer !important;
|
227
237
|
}
|
@@ -244,6 +254,7 @@
|
|
244
254
|
}
|
245
255
|
.dialog-main .dialog-body {
|
246
256
|
display: flex;
|
257
|
+
flex: 1;
|
247
258
|
position: relative;
|
248
259
|
padding: 10px 20px 10px 20px;
|
249
260
|
overflow: auto;
|
@@ -270,6 +281,7 @@
|
|
270
281
|
column-gap: 10px;
|
271
282
|
align-items: center;
|
272
283
|
justify-content: space-between;
|
284
|
+
flex: 0;
|
273
285
|
}
|
274
286
|
.dialog-main .resizable-handle {
|
275
287
|
position: absolute;
|