x25 17.1.13 → 17.1.16
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/Async/types.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { State } from "src/types";
|
|
2
2
|
import type { ModalsTypes } from "../Modal/types";
|
|
3
3
|
export declare type Reducer = (state: State, action: any) => any;
|
|
4
|
-
export declare type Reducers =
|
|
5
|
-
[key: string]: Reducer;
|
|
6
|
-
};
|
|
4
|
+
export declare type Reducers = any;
|
|
7
5
|
export declare type ReducerOptionsType = {
|
|
8
6
|
key: string;
|
|
9
7
|
func: Reducer;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
declare type ConfirmationModalProps = ModalWindowProps & {
|
|
4
|
-
footerProps: FooterProps;
|
|
5
|
-
};
|
|
2
|
+
import { ConfirmationModalProps } from "./types";
|
|
6
3
|
declare const ConfirmationModal: (props: ConfirmationModalProps) => JSX.Element;
|
|
7
4
|
export default ConfirmationModal;
|
|
@@ -36,12 +36,12 @@ var actions_1 = require("../actions");
|
|
|
36
36
|
var utility_1 = require("../utility");
|
|
37
37
|
var _1 = require(".");
|
|
38
38
|
var ModalFooter = function (props) {
|
|
39
|
-
var languageMessage = utility_1.words.message, label = utility_1.words.label, _a = props.cancelButtonLabel, cancelButtonLabel = _a === void 0 ? label.cancel : _a, _b = props.
|
|
39
|
+
var languageMessage = utility_1.words.message, label = utility_1.words.label, dispatch = (0, react_redux_1.useDispatch)(), _a = props.cancelButtonLabel, cancelButtonLabel = _a === void 0 ? label.cancel : _a, _b = props.confirmButtonLabel, confirmButtonLabel = _b === void 0 ? label.remove : _b, _c = props.errMessage, errMessage = _c === void 0 ? languageMessage.failPerform : _c, _d = props.isResponseValid, isResponseValid = _d === void 0 ? function (response) { return ({
|
|
40
40
|
valid: response === "",
|
|
41
41
|
error: response,
|
|
42
|
-
}); } : _d, _e = props.confirmButtonColor, confirmButtonColor = _e === void 0 ? "danger" : _e, _f =
|
|
42
|
+
}); } : _d, _e = props.confirmButtonColor, confirmButtonColor = _e === void 0 ? "danger" : _e, _f = props.showError, showError = _f === void 0 ? function (msg) {
|
|
43
43
|
dispatch((0, actions_1.notifyError)(msg));
|
|
44
|
-
}, endPerforming = function (cb) {
|
|
44
|
+
} : _f, _g = (0, react_1.useState)(false), isPerforming = _g[0], setIsPerforming = _g[1], endPerforming = function (cb) {
|
|
45
45
|
setIsPerforming(false);
|
|
46
46
|
if (typeof cb === "function") {
|
|
47
47
|
cb();
|
|
@@ -70,8 +70,9 @@ var ModalFooter = function (props) {
|
|
|
70
70
|
};
|
|
71
71
|
return (react_1.default.createElement("div", { className: "modal-footer" },
|
|
72
72
|
react_1.default.createElement("button", { className: "btn btn-secondary me-1", onClick: props.tryToClose, type: "button" }, cancelButtonLabel),
|
|
73
|
-
react_1.default.createElement("button", { className: "btn ".concat(confirmButtonColor ? "btn-".concat(confirmButtonColor) : ""), disabled: isPerforming, onClick: handleConfirmation, type: "button" }, isPerforming ? (react_1.default.createElement("span", null,
|
|
73
|
+
react_1.default.createElement("button", { autoFocus: props.focusButton, className: "btn ".concat(confirmButtonColor ? "btn-".concat(confirmButtonColor) : ""), disabled: isPerforming, onClick: handleConfirmation, type: "button" }, isPerforming ? (react_1.default.createElement("span", null,
|
|
74
74
|
react_1.default.createElement("i", { className: "fa fa-refresh fa-spin fa-fw" }), " ".concat(utility_1.words.PleaseWait))) : confirmButtonLabel)));
|
|
75
|
-
}, ConfirmationModal = function (props) { return (react_1.default.createElement(_1.ModalWindow, __assign({}, props, { Footer: ModalFooter
|
|
75
|
+
}, ConfirmationModal = function (props) { return (react_1.default.createElement(_1.ModalWindow, __assign({}, props, { Footer: ModalFooter, title: props.title ? props.title : "Confirmation" }),
|
|
76
|
+
react_1.default.createElement("div", null, props.footerProps.message))); };
|
|
76
77
|
exports.default = ConfirmationModal;
|
|
77
78
|
//# sourceMappingURL=ConfirmationModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationModal.js","sourceRoot":"","sources":["../../src/Modal/ConfirmationModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAwC;AACxC,2CAA0C;AAC1C,sCAAyC;AACzC,sCAAmC;AAEnC,sBAAgC;
|
|
1
|
+
{"version":3,"file":"ConfirmationModal.js","sourceRoot":"","sources":["../../src/Modal/ConfirmationModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAwC;AACxC,2CAA0C;AAC1C,sCAAyC;AACzC,sCAAmC;AAEnC,sBAAgC;AAOhC,IAAM,WAAW,GAAG,UAAC,KAAwB;IAErC,IAAS,eAAe,GAAY,eAAK,QAAjB,EAAE,KAAK,GAAK,eAAK,MAAV,EAEjC,QAAQ,GAAG,IAAA,yBAAW,GAAE,EAEtB,KAcE,KAAK,kBAdyB,EAAhC,iBAAiB,mBAAG,KAAK,CAAC,MAAM,KAAA,EAChC,KAaE,KAAK,mBAb0B,EAAjC,kBAAkB,mBAAG,KAAK,CAAC,MAAM,KAAA,EACjC,KAYE,KAAK,WAZiC,EAAxC,UAAU,mBAAG,eAAe,CAAC,WAAW,KAAA,EAExC,KAUE,KAAK,gBAPL,EAHF,eAAe,mBAAG,UAAC,QAAa,IAAK,OAAA,CAAC;QACpC,KAAK,EAAG,QAAQ,KAAK,EAAE;QACvB,KAAK,EAAG,QAAQ;KACjB,CAAC,EAHmC,CAGnC,KAAA,EAEF,KAKE,KAAK,mBALsB,EAA7B,kBAAkB,mBAAG,QAAQ,KAAA,EAE7B,KAGE,KAAK,UADN,EAFD,SAAS,mBAAG,UAAC,GAAS;QACpB,QAAQ,CAAC,IAAA,qBAAW,EAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,CAAC,KAAA,EAGH,KAAkC,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAA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,IAAI,EAAC,QAAQ,IAEX,YAAY,CAAC,CAAC,CAAC,CACb;YACE,qCAAG,SAAS,EAAC,6BAA6B,GAAG,EAC5C,WAAI,eAAK,CAAC,UAAU,CAAE,CAClB,CACR,CAAC,CAAC,CAAC,kBAAkB,CAEjB,CACL,CACP,CAAC;AACJ,CAAC,EACD,iBAAiB,GAAG,UAAC,KAA8B,IAAK,OAAA,CACtD,8BAAC,cAAW,eACN,KAAK,IACT,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc;IACjD,2CACG,KAAK,CAAC,WAAW,CAAC,OAAO,CACtB,CACM,CACf,EATuD,CASvD,CAAC;AAEJ,kBAAe,iBAAiB,CAAC"}
|
package/Modal/ModalWindow.js
CHANGED
|
@@ -100,7 +100,7 @@ var ModalWindow = function (props) {
|
|
|
100
100
|
react_1.default.createElement("button", { "aria-label": "Close", className: "btn btn-link", "data-dismiss": "modal", onClick: tryToClose, type: "button" },
|
|
101
101
|
react_1.default.createElement("i", { className: "fa fa-times" }))),
|
|
102
102
|
react_1.default.createElement("div", { className: "modal-body" }, props.children),
|
|
103
|
-
Footer ? (react_1.default.createElement(Footer, __assign({}, props.footerProps, { tryToClose: tryToClose })))
|
|
103
|
+
typeof Footer === "undefined" ? null : (react_1.default.createElement(Footer, __assign({}, props.footerProps, { tryToClose: tryToClose })))))));
|
|
104
104
|
};
|
|
105
105
|
exports.default = ModalWindow;
|
|
106
106
|
//# sourceMappingURL=ModalWindow.js.map
|
package/Modal/ModalWindow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalWindow.js","sourceRoot":"","sources":["../../src/Modal/ModalWindow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2D;AAC3D,2CAA0C;AAC1C,qCAAsC;AAGtC,IAAM,WAAW,GAAG,U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,EACrD,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE;YACL,UAAU,EAAE,kBAAkB;SAC/B;QACD,uCAAK,SAAS,EAAE,6BAAsB,IAAI,CAAE,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAC,UAAU;YAC3E,uCAAK,SAAS,EAAC,eAAe;gBAC5B,uCAAK,SAAS,EAAC,cAAc;oBAC3B,sCAAI,SAAS,EAAC,aAAa,IACxB,KAAK,CAAC,KAAK,CACT;oBACL,wDACa,OAAO,EAClB,SAAS,EAAC,cAAc,kBACX,OAAO,EACpB,OAAO,EAAE,UAAU,EACnB,IAAI,EAAC,QAAQ;wBACb,qCAAG,SAAS,EAAC,aAAa,GAAG,CACtB,CACL;gBACN,uCAAK,SAAS,EAAC,YAAY,IACxB,KAAK,CAAC,QAAQ,CACX;gBAEJ,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACrC,8BAAC,MAAM,eAAK,KAAK,CAAC,WAAW,IAAE,UAAU,EAAE,UAAU,IAAI,CAC1D,CAEC,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAGF,kBAAe,WAAW,CAAC"}
|
package/Modal/types.d.ts
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export declare type ModalsTypes = Record<string, React.ReactNode>;
|
|
3
|
-
|
|
3
|
+
declare type CommonProps = {
|
|
4
4
|
onClose?: () => any;
|
|
5
5
|
closeByEscape?: boolean;
|
|
6
|
-
children: JSX.Element;
|
|
7
|
-
title: string;
|
|
8
6
|
Footer?: any;
|
|
9
7
|
footerProps?: FooterProps;
|
|
10
8
|
size?: "lg" | "sm" | "xl" | "";
|
|
11
9
|
};
|
|
12
|
-
declare type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
export declare type ModalWindowProps = CommonProps & {
|
|
11
|
+
title: string;
|
|
12
|
+
children: JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export declare type ConfirmationModalProps = CommonProps & {
|
|
15
|
+
title?: string;
|
|
16
|
+
children?: JSX.Element;
|
|
17
|
+
footerProps: FooterProps;
|
|
16
18
|
};
|
|
17
19
|
export declare type FooterProps = {
|
|
18
|
-
cancelButtonLabel: string;
|
|
19
|
-
title: string;
|
|
20
|
-
errMessage: string;
|
|
21
|
-
confirmButtonLabel: string;
|
|
22
|
-
tryToClose: () => any;
|
|
23
20
|
readonly confirmButtonColor?: string;
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly closeModal: () => void;
|
|
28
|
-
readonly showError: (message?: string) => void;
|
|
29
|
-
readonly request: () => Promise<any>;
|
|
30
|
-
readonly onSuccess: (response: any) => void;
|
|
31
|
-
readonly isResponseValid: (response: any) => {
|
|
21
|
+
readonly cancelButtonLabel?: string;
|
|
22
|
+
readonly errMessage?: string;
|
|
23
|
+
readonly isResponseValid?: (response: any) => {
|
|
32
24
|
valid: boolean;
|
|
33
25
|
error: string;
|
|
34
26
|
};
|
|
27
|
+
readonly confirmButtonLabel?: string;
|
|
28
|
+
readonly focusButton?: boolean;
|
|
29
|
+
readonly showError?: (message?: string) => void;
|
|
30
|
+
readonly message: any;
|
|
31
|
+
readonly request: () => Promise<any>;
|
|
32
|
+
readonly onSuccess: (response: any) => void;
|
|
35
33
|
};
|
|
36
34
|
export {};
|
package/package.json
CHANGED