x25 17.4.52 → 17.4.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/Inputs/index.d.ts +8 -9
- package/Inputs/index.js +8 -9
- package/Inputs/index.js.map +1 -1
- package/Modal/Root.d.ts +3 -15
- package/Modal/Root.js +16 -40
- package/Modal/Root.js.map +1 -1
- package/Modal/getComponent.d.ts +2 -1
- package/Modal/getComponent.js +1 -1
- package/Modal/getComponent.js.map +1 -1
- package/Modal/reducer.d.ts +2 -2
- package/Modal/reducer.js.map +1 -1
- package/Modal/types.d.ts +1 -0
- package/package.json +1 -1
- package/reducer/index.d.ts +1 -1
- package/utility/dev/ErrorBoundary.d.ts +0 -1
- package/utility/dev/ErrorBoundary.js +0 -3
- package/utility/dev/ErrorBoundary.js.map +1 -1
- package/utility/others.d.ts +5 -1
- package/utility/others.js +15 -3
- package/utility/others.js.map +1 -1
- package/Inputs/FocusTemplate.d.ts +0 -19
- package/Inputs/FocusTemplate.js +0 -53
- package/Inputs/FocusTemplate.js.map +0 -1
package/Inputs/index.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./Business";
|
|
2
|
+
export * from "./CaptchaBox";
|
|
3
|
+
export * from "./DateInput";
|
|
4
|
+
export * from "./DateTemplate";
|
|
2
5
|
export * from "./DelayInputChange";
|
|
3
|
-
export * from "./FocusTemplate";
|
|
4
6
|
export * from "./InputTemplate";
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./DateInput";
|
|
7
|
+
export * from "./LabelTemplate";
|
|
7
8
|
export * from "./NumericInput";
|
|
8
9
|
export * from "./NumericTemplate";
|
|
9
|
-
export * from "./TextareaTemplate";
|
|
10
|
-
export * from "./SimpleTextarea";
|
|
11
|
-
export * from "./CaptchaBox";
|
|
12
|
-
export * from "./LabelTemplate";
|
|
13
10
|
export * from "./Selects";
|
|
14
|
-
export * from "./
|
|
11
|
+
export * from "./SimpleInput";
|
|
12
|
+
export * from "./SimpleTextarea";
|
|
13
|
+
export * from "./TextareaTemplate";
|
package/Inputs/index.js
CHANGED
|
@@ -14,18 +14,17 @@ 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
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./Business"), exports);
|
|
18
|
+
__exportStar(require("./CaptchaBox"), exports);
|
|
19
|
+
__exportStar(require("./DateInput"), exports);
|
|
20
|
+
__exportStar(require("./DateTemplate"), exports);
|
|
18
21
|
__exportStar(require("./DelayInputChange"), exports);
|
|
19
|
-
__exportStar(require("./FocusTemplate"), exports);
|
|
20
22
|
__exportStar(require("./InputTemplate"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./DateInput"), exports);
|
|
23
|
+
__exportStar(require("./LabelTemplate"), exports);
|
|
23
24
|
__exportStar(require("./NumericInput"), exports);
|
|
24
25
|
__exportStar(require("./NumericTemplate"), exports);
|
|
25
|
-
__exportStar(require("./TextareaTemplate"), exports);
|
|
26
|
-
__exportStar(require("./SimpleTextarea"), exports);
|
|
27
|
-
__exportStar(require("./CaptchaBox"), exports);
|
|
28
|
-
__exportStar(require("./LabelTemplate"), exports);
|
|
29
26
|
__exportStar(require("./Selects"), exports);
|
|
30
|
-
__exportStar(require("./
|
|
27
|
+
__exportStar(require("./SimpleInput"), exports);
|
|
28
|
+
__exportStar(require("./SimpleTextarea"), exports);
|
|
29
|
+
__exportStar(require("./TextareaTemplate"), exports);
|
|
31
30
|
//# sourceMappingURL=index.js.map
|
package/Inputs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Inputs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Inputs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,+CAA6B;AAC7B,8CAA4B;AAC5B,iDAA+B;AAC/B,qDAAmC;AACnC,kDAAgC;AAChC,kDAAgC;AAChC,iDAA+B;AAC/B,oDAAkC;AAClC,4CAA0B;AAC1B,gDAA8B;AAC9B,mDAAiC;AACjC,qDAAmC"}
|
package/Modal/Root.d.ts
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
declare class ModalRoot extends React.Component<ModalRootPropTypes> {
|
|
6
|
-
shouldComponentUpdate(nextProps: ModalRootPropTypes): boolean;
|
|
7
|
-
render(): any;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: import("react-redux").ConnectedComponent<typeof ModalRoot, {
|
|
10
|
-
ref?: React.LegacyRef<ModalRoot> | undefined;
|
|
11
|
-
key?: React.Key | null | undefined;
|
|
12
|
-
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
|
|
13
|
-
store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
|
|
14
|
-
}>;
|
|
15
|
-
export default _default;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const ModalRoot: () => JSX.Element;
|
|
3
|
+
export default ModalRoot;
|
package/Modal/Root.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++) {
|
|
@@ -31,33 +16,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
31
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
17
|
var react_1 = __importDefault(require("react"));
|
|
33
18
|
var react_redux_1 = require("react-redux");
|
|
19
|
+
var others_1 = require("../utility/others");
|
|
34
20
|
var getComponent_1 = __importDefault(require("./getComponent"));
|
|
35
21
|
var reducer_1 = require("./reducer");
|
|
36
|
-
var
|
|
37
|
-
list
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
__extends(ModalRoot, _super);
|
|
41
|
-
function ModalRoot() {
|
|
42
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
+
var propsAreEqual = (0, others_1.propsAreEqualCreator)([], ["list"]), RawModalRoot = function (_a) {
|
|
23
|
+
var list = _a.list;
|
|
24
|
+
if (list.size === 0) {
|
|
25
|
+
return null;
|
|
43
26
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var list = this.props.list;
|
|
49
|
-
if (list.size === 0) {
|
|
50
|
-
return null;
|
|
27
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, list.map(function (current, index) {
|
|
28
|
+
var modalType = current.get("type"), Component = (0, getComponent_1.default)(modalType), isTheLastOne = index !== list.size - 1;
|
|
29
|
+
if (typeof Component === "undefined") {
|
|
30
|
+
return (react_1.default.createElement("div", { key: "no-modal" }, "No MODAL component for the type [".concat(modalType, "] in Modal/components.jsx")));
|
|
51
31
|
}
|
|
52
|
-
return
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
return ModalRoot;
|
|
61
|
-
}(react_1.default.Component));
|
|
62
|
-
exports.default = (0, react_redux_1.connect)(mapStateToProps)(ModalRoot);
|
|
32
|
+
return (react_1.default.createElement(Component, __assign({ doNotCloseByEscape: isTheLastOne, key: index, pleaseClose: current.get("pleaseClose") }, current.get("props").toJS())));
|
|
33
|
+
})));
|
|
34
|
+
}, InnerModalRoot = react_1.default.memo(RawModalRoot, propsAreEqual), ModalRoot = function () {
|
|
35
|
+
var list = (0, react_redux_1.useSelector)(reducer_1.selectors.getModals);
|
|
36
|
+
return react_1.default.createElement(InnerModalRoot, { list: list });
|
|
37
|
+
};
|
|
38
|
+
exports.default = ModalRoot;
|
|
63
39
|
//# sourceMappingURL=Root.js.map
|
package/Modal/Root.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Root.js","sourceRoot":"","sources":["../../src/Modal/Root.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Root.js","sourceRoot":"","sources":["../../src/Modal/Root.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,2CAA0C;AAC1C,4CAAyD;AACzD,gEAA0C;AAC1C,qCAAsC;AAOtC,IACE,aAAa,GAAG,IAAA,6BAAoB,EAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,EAClD,YAAY,GAAG,UAAC,EAA4B;QAA1B,IAAI,UAAA;IACpB,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAQ,CACN,8DAEI,IAAI,CAAC,GAAG,CAAC,UAAC,OAAa,EAAE,KAAc;QACrC,IACE,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAC/B,SAAS,GAAG,IAAA,sBAAY,EAAC,SAAS,CAAC,EACnC,YAAY,GAAG,KAAK,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QAEzC,IAAI,OAAO,SAAS,KAAK,WAAW,EAAE,CAAC;YACrC,OAAO,CACL,uCAAK,GAAG,EAAC,UAAU,IAChB,2CAAoC,SAAS,8BAA2B,CACrE,CACP,CAAC;QACJ,CAAC;QAED,OAAO,CACL,8BAAC,SAAS,aACR,kBAAkB,EAAE,YAAY,EAChC,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAC/B,CACH,CAAC;IACJ,CAAC,CAAC,CAEH,CACJ,CAAC;AACJ,CAAC,EACD,cAAc,GAAG,eAAK,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,EACxD,SAAS,GAAG;IACV,IAAM,IAAI,GAAG,IAAA,yBAAW,EAAC,mBAAS,CAAC,SAAS,CAAC,CAAC;IAE9C,OAAO,8BAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;AACxC,CAAC,CAAC;AAEJ,kBAAe,SAAS,CAAC"}
|
package/Modal/getComponent.d.ts
CHANGED
package/Modal/getComponent.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var Messages_1 = require("../Messages");
|
|
9
|
-
var util_1 = require("./util");
|
|
10
9
|
var ModalWindow_1 = __importDefault(require("./ModalWindow"));
|
|
10
|
+
var util_1 = require("./util");
|
|
11
11
|
var NothingSelected = function () { return (react_1.default.createElement(ModalWindow_1.default, { onClose: function () { }, title: "Not registered" },
|
|
12
12
|
react_1.default.createElement(Messages_1.ErrorMessage, { message: "Please define a modal component in Modal/components.jsx" }))); },
|
|
13
13
|
/* eslint-disable complexity */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getComponent.js","sourceRoot":"","sources":["../../src/Modal/getComponent.tsx"],"names":[],"mappings":";;;;;AAAA,yDAAyD;AACzD,gDAA0B;AAC1B,wCAA2C;AAC3C,+BAAkC;
|
|
1
|
+
{"version":3,"file":"getComponent.js","sourceRoot":"","sources":["../../src/Modal/getComponent.tsx"],"names":[],"mappings":";;;;;AAAA,yDAAyD;AACzD,gDAA0B;AAC1B,wCAA2C;AAC3C,8DAAwC;AACxC,+BAAkC;AAElC,IAAM,eAAe,GAAG,cAAM,OAAA,CAC1B,8BAAC,qBAAW,IAAC,OAAO,EAAE,cAAO,CAAC,EAAE,KAAK,EAAC,gBAAgB;IACpD,8BAAC,uBAAY,IAAC,OAAO,EAAC,yDAAyD,GAAG,CACtE,CACf,EAJ2B,CAI3B;AAED,+BAA+B;AAC/B,YAAY,GAAG,UAAC,IAAS;IACvB,IAAM,SAAS,GAAG,IAAA,eAAQ,EAAC,IAAI,CAAC,CAAC;IAEjC,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAEJ,kBAAe,YAAY,CAAC"}
|
package/Modal/reducer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Modals } from "./types";
|
|
2
2
|
import type { Action, State } from "src/types";
|
|
3
3
|
declare const reducer: (state: any, action: Action) => any;
|
|
4
4
|
export declare const selectors: {
|
|
5
|
-
getModals: (state: State) =>
|
|
5
|
+
getModals: (state: State) => Modals;
|
|
6
6
|
};
|
|
7
7
|
export default reducer;
|
package/Modal/reducer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../src/Modal/reducer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAuC;AACvC,oCAA2C;
|
|
1
|
+
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../src/Modal/reducer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAuC;AACvC,oCAA2C;AAI3C,IAAM,YAAY,GAAG,SAAS,CAAC,IAAI,EAA8B,EAE/D,SAAS,GAAG,UAAC,KAAU,EAAE,EAK6B;QAJpD,eAGC,EAFC,SAAS,eAAA,EACT,UAAU,gBAAA;IAE6C,OAAA,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;QAClF,IAAI,EAAI,SAAS;QACjB,KAAK,EAAG,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;KAClC,CAAC,CAAC;AAHwD,CAGxD,EACH,SAAS,GAAG,UAAC,KAAU,IAAK,OAAA,KAAK,CAAC,GAAG,EAAE,EAAX,CAAW,EACvC,aAAa,GAAG,UAAC,KAAU;IACzB,IAAM,YAAY,GAAG,CAAC,CAAC,CAAC;IAExB,OAAO,CACL,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,UAAC,OAAmC,IAAK,OAAA,CAClE,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CACjC,EAFmE,CAEnE,CAAC,CACH,CAAC;AACJ,CAAC,EAED,OAAO,GAAG,UAAC,KAAyB,EAAE,MAAc;IAAzC,sBAAA,EAAA,oBAAyB;IAClC,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,YAAY;YACf,OAAO,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAElC,KAAK,YAAY;YACf,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;QAE1B,KAAK,iBAAiB;YACpB,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;QAE9B;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC,EAED,SAAS,GAAG,UAAC,KAAY,IAAK,OAAA,CAAC,IAAA,uBAAc,EAAC,KAAK,CAAC,IAAI,YAAY,CAAW,EAAjD,CAAiD,CAAC;AAErE,QAAA,SAAS,GAAG;IACvB,SAAS,WAAA;CACV,CAAC;AACF,kBAAe,OAAO,CAAC"}
|
package/Modal/types.d.ts
CHANGED
package/package.json
CHANGED
package/reducer/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare const state: {
|
|
|
4
4
|
captchas: (state: any, action: any) => any;
|
|
5
5
|
modal: (state: any, action: any) => any;
|
|
6
6
|
}, selectors: {
|
|
7
|
-
getModals: (state: any) => import("
|
|
7
|
+
getModals: (state: any) => import("../Modal/types").Modals;
|
|
8
8
|
getCurrentAccountCompanies: (state: any) => any;
|
|
9
9
|
getCurrentAccount: (state: any) => any;
|
|
10
10
|
getCurrentAccountIsFetching: (state: any) => any;
|
|
@@ -16,7 +16,6 @@ declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBou
|
|
|
16
16
|
refresh: () => void;
|
|
17
17
|
componentDidCatch(error: ErrorType, info: InfoType): void;
|
|
18
18
|
constructor(props: ErrorBoundaryProps);
|
|
19
|
-
shouldComponentUpdate(): boolean;
|
|
20
19
|
render(): any;
|
|
21
20
|
}
|
|
22
21
|
export default ErrorBoundary;
|
|
@@ -59,9 +59,6 @@ var ErrorBoundary = /** @class */ (function (_super) {
|
|
|
59
59
|
info: info,
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
|
-
ErrorBoundary.prototype.shouldComponentUpdate = function () {
|
|
63
|
-
return true;
|
|
64
|
-
};
|
|
65
62
|
ErrorBoundary.prototype.render = function () {
|
|
66
63
|
var _a = this.state, info = _a.info, error = _a.error, status = _a.status;
|
|
67
64
|
// render fallback UI
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/utility/dev/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,gDAA0B;AAC1B,wBAA2B;
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/utility/dev/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,gDAA0B;AAC1B,wBAA2B;AAC3B,wDAAkC;AAGlC,IAAM,cAAc,GAAG,EAAE,EACvB,YAAY,GAAG,GAAG,CAAC;AAErB;IAA4B,iCAAuD;IAWjF,uBAAa,KAAyB;QACpC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;QACb,KAAI,CAAC,KAAK,GAAG;YACX,MAAM,EAAG,IAAI;YACb,KAAK,EAAI,IAAI;YACb,IAAI,EAAK,IAAI;SACd,CAAC;QAEF,KAAI,CAAC,SAAS,GAAG,UAAC,KAAoB;YACpC,IAAI,KAAK,CAAC,OAAO,KAAK,cAAc,EAAE,CAAC;gBACrC,KAAI,CAAC,OAAO,EAAE,CAAC;YACjB,CAAC;QACH,CAAC,CAAC;QAEF,KAAI,CAAC,OAAO,GAAG;YACb,KAAI,CAAC,QAAQ,CAAC;gBACZ,MAAM,EAAG,SAAK,CAAC,eAAe;gBAC9B,KAAK,EAAI,IAAI;gBACb,IAAI,EAAK,IAAI;aACd,EAAE;gBACD,UAAU,CAAC;oBACT,KAAI,CAAC,QAAQ,CAAC;wBACZ,MAAM,EAAG,IAAI;wBACb,KAAK,EAAI,IAAI;wBACb,IAAI,EAAK,IAAI;qBACd,CAAC,CAAC;gBACL,CAAC,EAAE,YAAY,CAAC,CAAC;YACnB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;;IACJ,CAAC;IApCD,yCAAiB,GAAjB,UAAmB,KAAgB,EAAE,IAAc;QACjD,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK,OAAA;YACL,IAAI,MAAA;SACL,CAAC,CAAC;IACL,CAAC;IAiCD,8BAAM,GAAN;QACQ,IAAA,KAIF,IAAI,CAAC,KAAK,EAHZ,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,MAAM,YACM,CAAC;QAEf,qBAAqB;QACrB,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,CACL,8BAAC,kBAAQ,IACP,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,MAAM,GACd,CACH,CAAC;QACJ,CAAC;QAED,uDAAuD;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;IAEH,oBAAC;AAAD,CAAC,AAlED,CAA4B,eAAK,CAAC,SAAS,GAkE1C;AAED,kBAAe,aAAa,CAAC"}
|
package/utility/others.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { List as ImmutableList, Map as ImmutableMap } from "immutable";
|
|
3
|
-
|
|
3
|
+
type PropsType = {
|
|
4
|
+
[key: string]: undefined | any;
|
|
5
|
+
};
|
|
6
|
+
export declare const propsAreEqualCreator: <T extends PropsType>(objects: (keyof T)[], primitives: (keyof T)[]) => (prevProps: T, nextProps: T) => boolean, getDateSortNumber: (item: string) => number, isAdministratorAccount: (current: number) => boolean, createModal: (modalType: string, modalProps?: any) => {
|
|
4
7
|
type: string;
|
|
5
8
|
payload: {
|
|
6
9
|
modalType: string;
|
|
7
10
|
modalProps: any;
|
|
8
11
|
};
|
|
9
12
|
}, noError = "", rowsPerLoad = 50, nothingFetched = -1, removeID: (payload: ImmutableMap<string, any>) => (list: ImmutableList<string>) => ImmutableList<string>, addID: (payload: ImmutableMap<string, any>) => (list: ImmutableList<string>) => ImmutableList<string>, delay: () => Promise<any>, showCheck: (value: boolean) => JSX.Element | null, tryToCloseModalDefault: (cb?: () => any) => void;
|
|
13
|
+
export {};
|
package/utility/others.js
CHANGED
|
@@ -2,13 +2,25 @@
|
|
|
2
2
|
// type ReduxError = {
|
|
3
3
|
// error: any;
|
|
4
4
|
// };
|
|
5
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
6
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
7
|
+
if (ar || !(i in from)) {
|
|
8
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
9
|
+
ar[i] = from[i];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
13
|
+
};
|
|
5
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
16
|
};
|
|
8
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.tryToCloseModalDefault = exports.showCheck = exports.delay = exports.addID = exports.removeID = exports.nothingFetched = exports.rowsPerLoad = exports.noError = exports.createModal = exports.isAdministratorAccount = exports.getDateSortNumber = void 0;
|
|
18
|
+
exports.tryToCloseModalDefault = exports.showCheck = exports.delay = exports.addID = exports.removeID = exports.nothingFetched = exports.rowsPerLoad = exports.noError = exports.createModal = exports.isAdministratorAccount = exports.getDateSortNumber = exports.propsAreEqualCreator = void 0;
|
|
10
19
|
var react_1 = __importDefault(require("react"));
|
|
11
|
-
var
|
|
20
|
+
var propsAreEqualCreator = function (objects, primitives) { return function (prevProps, nextProps) {
|
|
21
|
+
var result = __spreadArray(__spreadArray([], objects.map(function (field) { return (JSON.stringify(prevProps[field]) === JSON.stringify(nextProps[field])); }), true), primitives.map(function (field) { return prevProps[field] === nextProps[field]; }), true).filter(function (current) { return current; });
|
|
22
|
+
return result.length === (objects.length + primitives.length);
|
|
23
|
+
}; }, getDateSortNumber = function (item) { return Number(new Date(item).getTime()); }, isAdministratorAccount = function (current) { return current === 0; }, createModal = function (modalType, modalProps) { return ({
|
|
12
24
|
type: "SHOW_MODAL",
|
|
13
25
|
payload: {
|
|
14
26
|
modalType: modalType,
|
|
@@ -21,5 +33,5 @@ var getDateSortNumber = function (item) { return Number(new Date(item).getTime()
|
|
|
21
33
|
cb();
|
|
22
34
|
}
|
|
23
35
|
};
|
|
24
|
-
exports.getDateSortNumber = getDateSortNumber, exports.isAdministratorAccount = isAdministratorAccount, exports.createModal = createModal, exports.noError = "", exports.rowsPerLoad = 50, exports.nothingFetched = -1, exports.removeID = removeID, exports.addID = addID, exports.delay = delay, exports.showCheck = showCheck, exports.tryToCloseModalDefault = tryToCloseModalDefault;
|
|
36
|
+
exports.propsAreEqualCreator = propsAreEqualCreator, exports.getDateSortNumber = getDateSortNumber, exports.isAdministratorAccount = isAdministratorAccount, exports.createModal = createModal, exports.noError = "", exports.rowsPerLoad = 50, exports.nothingFetched = -1, exports.removeID = removeID, exports.addID = addID, exports.delay = delay, exports.showCheck = showCheck, exports.tryToCloseModalDefault = tryToCloseModalDefault;
|
|
25
37
|
//# sourceMappingURL=others.js.map
|
package/utility/others.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"others.js","sourceRoot":"","sources":["../../src/utility/others.tsx"],"names":[],"mappings":";AACA,sBAAsB;AACtB,gBAAgB;AAChB,KAAK
|
|
1
|
+
{"version":3,"file":"others.js","sourceRoot":"","sources":["../../src/utility/others.tsx"],"names":[],"mappings":";AACA,sBAAsB;AACtB,gBAAgB;AAChB,KAAK;;;;;;;;;;;;;;;AAGL,gDAA0B;AAOnB,IACL,oBAAoB,GAAG,UAAsB,OAAsB,EAAE,UAAyB,IAAK,OAAA,UAAC,SAAa,EAAE,SAAa;IAC9H,IACE,MAAM,GAAG,gCACJ,OAAO,CAAC,GAAG,CAAC,UAAC,KAAW,IAAK,OAAA,CAC9B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CACtE,EAF+B,CAE/B,CAAC,SACC,UAAU,CAAC,GAAG,CAAC,UAAC,KAAU,IAAK,OAAA,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC,KAAK,CAAC,EAArC,CAAqC,CAAC,QAExE,MAAM,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAEjC,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAChE,CAAC,EAXkG,CAWlG,EACD,iBAAiB,GAAG,UAAC,IAAY,IAAK,OAAA,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,EAAhC,CAAgC,EACtE,sBAAsB,GAAG,UAAC,OAAe,IAAK,OAAA,OAAO,KAAK,CAAC,EAAb,CAAa,EAC3D,WAAW,GAAG,UAAC,SAAiB,EAAE,UAAgB,IAAK,OAAA,CAAC;IACtD,IAAI,EAAM,YAAY;IACtB,OAAO,EAAG;QACR,SAAS,WAAA;QACT,UAAU,YAAA;KACX;CACF,CAAC,EANqD,CAMrD,EAIF,QAAQ,GAAG,UAAC,OAAkC,IAAK,OAAA,UAAC,IAA2B,IAAK,OAAA,CAClF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,UAAC,OAAe,IAAK,OAAA,OAAO,KAAK,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAArC,CAAqC,CAAC,CAAC,CACxF,EAFmF,CAEnF,EAFkD,CAElD,EACD,KAAK,GAAG,UAAC,OAAkC,IAAK,OAAA,CAC9C,UAAC,IAA2B,IAAK,OAAA,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAApC,CAAoC,CACtE,EAF+C,CAE/C,EACD,KAAK,GAAG,cAAM,OAAC,IAAI,OAAO,CAAC,UAAC,OAAO;IACjC,UAAU,CAAC,OAAO,CAAC,CAAC;AACtB,CAAC,CAAkB,EAFL,CAEK,EACnB,SAAS,GAAG,UAAC,KAAc,IAAK,OAAA,KAAK,CAAC,CAAC,CAAC,qCAAG,SAAS,EAAC,0BAA0B,GAAG,CAAC,CAAC,CAAC,IAAI,EAAzD,CAAyD,EACzF,sBAAsB,GAAG,UAAC,EAAc;IACtC,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;QAC7B,EAAE,EAAE,CAAC;IACP,CAAC;AACH,CAAC,CAAC;AAtCF,QAAA,oBAAoB,yBAYpB,QAAA,iBAAiB,sBACjB,QAAA,sBAAsB,2BACtB,QAAA,WAAW,gBAOX,QAAA,OAAO,GAAG,EAAE,EACZ,QAAA,WAAW,GAAG,EAAE,EAChB,QAAA,cAAc,GAAG,CAAC,CAAC,EACnB,QAAA,QAAQ,aAGR,QAAA,KAAK,UAGL,QAAA,KAAK,UAGL,QAAA,SAAS,cACT,QAAA,sBAAsB,0BAIpB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type FocusTemplatePropTypes = {
|
|
2
|
-
readonly autoFocus?: boolean;
|
|
3
|
-
readonly input: any;
|
|
4
|
-
readonly label: string;
|
|
5
|
-
readonly placeholder: string;
|
|
6
|
-
readonly type: string;
|
|
7
|
-
readonly meta: {
|
|
8
|
-
submitting: boolean;
|
|
9
|
-
touched: boolean;
|
|
10
|
-
error?: any;
|
|
11
|
-
};
|
|
12
|
-
readonly onRegisterRef: (callback: (node: any) => void) => void;
|
|
13
|
-
};
|
|
14
|
-
import React from "react";
|
|
15
|
-
export declare class FocusTemplate extends React.Component<FocusTemplatePropTypes> {
|
|
16
|
-
shouldComponentUpdate(nextProps: FocusTemplatePropTypes): boolean;
|
|
17
|
-
render(): JSX.Element;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
package/Inputs/FocusTemplate.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
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
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.FocusTemplate = void 0;
|
|
33
|
-
var react_1 = __importDefault(require("react"));
|
|
34
|
-
var InputTemplate_1 = require("./InputTemplate");
|
|
35
|
-
var FocusTemplate = /** @class */ (function (_super) {
|
|
36
|
-
__extends(FocusTemplate, _super);
|
|
37
|
-
function FocusTemplate() {
|
|
38
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
39
|
-
}
|
|
40
|
-
FocusTemplate.prototype.shouldComponentUpdate = function (nextProps) {
|
|
41
|
-
return (this.props.input !== nextProps.input ||
|
|
42
|
-
this.props.label !== nextProps.label ||
|
|
43
|
-
this.props.meta.submitting !== nextProps.meta.submitting ||
|
|
44
|
-
this.props.meta.touched !== nextProps.meta.touched ||
|
|
45
|
-
this.props.meta.error !== nextProps.meta.error);
|
|
46
|
-
};
|
|
47
|
-
FocusTemplate.prototype.render = function () {
|
|
48
|
-
return react_1.default.createElement(InputTemplate_1.InputTemplate, __assign({}, this.props));
|
|
49
|
-
};
|
|
50
|
-
return FocusTemplate;
|
|
51
|
-
}(react_1.default.Component));
|
|
52
|
-
exports.FocusTemplate = FocusTemplate;
|
|
53
|
-
//# sourceMappingURL=FocusTemplate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTemplate.js","sourceRoot":"","sources":["../../src/Inputs/FocusTemplate.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,gDAA0B;AAC1B,iDAAgD;AAEhD;IAAmC,iCAAuC;IAA1E;;IAgBA,CAAC;IAdC,6CAAqB,GAArB,UAAuB,SAAiC;QACtD,OAAO,CACL,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK;YACpC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK;YACpC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,KAAK,SAAS,CAAC,IAAI,CAAC,UAAU;YACxD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,IAAI,CAAC,OAAO;YAClD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,IAAI,CAAC,KAAK,CAC/C,CAAC;IACJ,CAAC;IAED,8BAAM,GAAN;QACE,OAAO,8BAAC,6BAAa,eAAK,IAAI,CAAC,KAAK,EAAI,CAAC;IAC3C,CAAC;IAEH,oBAAC;AAAD,CAAC,AAhBD,CAAmC,eAAK,CAAC,SAAS,GAgBjD;AAhBY,sCAAa"}
|