x25 17.0.26 → 17.1.0
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/Account/Load.d.ts +2 -2
- package/Inputs/InputTemplate.d.ts +2 -2
- package/Inputs/InputTemplate.js +2 -2
- package/Inputs/InputTemplate.js.map +1 -1
- package/Inputs/Selects/index.js +2 -2
- package/Inputs/Selects/index.js.map +1 -1
- package/Inputs/SimpleInput.d.ts +2 -1
- package/Inputs/SimpleInput.js +2 -2
- package/Inputs/SimpleInput.js.map +1 -1
- package/Inputs/SimpleTextarea.d.ts +1 -2
- package/Inputs/SimpleTextarea.js +2 -2
- package/Inputs/SimpleTextarea.js.map +1 -1
- package/Inputs/TextareaTemplate.d.ts +0 -1
- package/Inputs/TextareaTemplate.js.map +1 -1
- package/Messages/Loading.js +2 -2
- package/Messages/Loading.js.map +1 -1
- package/Modal/Delete.d.ts +1 -1
- package/Modal/Root.d.ts +1 -1
- package/Modal/SimpleModal.d.ts +2 -2
- package/Things.js.map +1 -1
- package/actions.d.ts +8 -6
- package/actions.js +9 -12
- package/actions.js.map +1 -1
- package/package.json +26 -26
- package/style/index.css +1 -1
- package/utility/others.d.ts +1 -5
- package/utility/others.js +6 -15
- package/utility/others.js.map +1 -1
- package/utility/validation/common.d.ts +2 -61
- package/utility/validation/common.js +48 -107
- package/utility/validation/common.js.map +1 -1
- package/utility/validation/index.d.ts +2 -12
- package/utility/validation/index.js +5 -46
- package/utility/validation/index.js.map +1 -1
- package/utility/validation/specific.d.ts +1 -4
- package/utility/validation/types.d.ts +42 -0
- package/utility/validation/types.js +3 -0
- package/utility/validation/types.js.map +1 -0
package/Account/Load.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare type PropTypes = {
|
|
|
7
7
|
readonly shouldFetch: any;
|
|
8
8
|
readonly fetchInitialInformation: () => void;
|
|
9
9
|
};
|
|
10
|
-
declare const _default: import("react-redux").ConnectedComponent<(props: PropTypes) => any,
|
|
10
|
+
declare const _default: import("react-redux").ConnectedComponent<(props: PropTypes) => any, Omit<PropTypes, "data" | "hasError" | "isFetching" | "shouldFetch" | "fetchInitialInformation"> & {
|
|
11
11
|
appName: string;
|
|
12
|
-
}>;
|
|
12
|
+
} & import("react-redux").ConnectProps>;
|
|
13
13
|
export default _default;
|
|
@@ -4,7 +4,7 @@ declare type InputTemplatePropTypes = {
|
|
|
4
4
|
readonly input: any;
|
|
5
5
|
readonly label: string;
|
|
6
6
|
readonly placeholder: string;
|
|
7
|
-
readonly
|
|
7
|
+
readonly theType?: "input" | "password";
|
|
8
8
|
readonly divClass?: string;
|
|
9
9
|
readonly inputClass?: string;
|
|
10
10
|
readonly meta: {
|
|
@@ -17,5 +17,5 @@ declare type InputTemplatePropTypes = {
|
|
|
17
17
|
readonly right?: string;
|
|
18
18
|
readonly onRegisterRef?: (callback: (node: any) => void) => void;
|
|
19
19
|
};
|
|
20
|
-
export declare const InputTemplate: ({ input,
|
|
20
|
+
export declare const InputTemplate: ({ input, theType, label, onRegisterRef, autoFocus, inputClass, divClass, placeholder, left, tabIndex, right, meta: { submitting, touched, error }, }: InputTemplatePropTypes) => JSX.Element;
|
|
21
21
|
export {};
|
package/Inputs/InputTemplate.js
CHANGED
|
@@ -18,14 +18,14 @@ exports.InputTemplate = void 0;
|
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var classnames_1 = __importDefault(require("classnames"));
|
|
20
20
|
var InputTemplate = function (_a) {
|
|
21
|
-
var input = _a.input,
|
|
21
|
+
var input = _a.input, theType = _a.theType, label = _a.label, onRegisterRef = _a.onRegisterRef, autoFocus = _a.autoFocus, inputClass = _a.inputClass, divClass = _a.divClass, placeholder = _a.placeholder, left = _a.left, tabIndex = _a.tabIndex, right = _a.right, _b = _a.meta, submitting = _b.submitting, touched = _b.touched, error = _b.error;
|
|
22
22
|
var warningClass = "".concat(touched && error ? " is-invalid" : ""), customClass = "".concat(inputClass ? " ".concat(inputClass) : ""), classForInput = "form-control ".concat(warningClass).concat(customClass), classForDiv = "form-group row mt-md-2 ".concat(divClass ? divClass : "");
|
|
23
23
|
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(classForDiv, {
|
|
24
24
|
"is-invalid": touched && error,
|
|
25
25
|
}) },
|
|
26
26
|
react_1.default.createElement("label", { className: "".concat(left ? left : "col-md-4 text-md-right", " form-control-label"), htmlFor: input.name }, label),
|
|
27
27
|
react_1.default.createElement("div", { className: right ? right : "col-md-8" },
|
|
28
|
-
react_1.default.createElement("input", __assign({}, input, { "aria-label": label, autoComplete: input.name, autoFocus: autoFocus, className: classForInput, disabled: submitting, id: input.name, placeholder: placeholder, ref: onRegisterRef ? onRegisterRef : null, tabIndex: tabIndex, type:
|
|
28
|
+
react_1.default.createElement("input", __assign({}, input, { "aria-label": label, autoComplete: input.name, autoFocus: autoFocus, className: classForInput, disabled: submitting, id: input.name, placeholder: placeholder, ref: onRegisterRef ? onRegisterRef : null, tabIndex: tabIndex, type: theType })),
|
|
29
29
|
react_1.default.createElement("div", { className: "invalid-feedback" }, touched && error && (react_1.default.createElement("span", null, error))))));
|
|
30
30
|
};
|
|
31
31
|
exports.InputTemplate = InputTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTemplate.js","sourceRoot":"","sources":["../../src/Inputs/InputTemplate.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,gDAA0B;AAC1B,0DAAoC;AAE7B,IAAM,aAAa,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"InputTemplate.js","sourceRoot":"","sources":["../../src/Inputs/InputTemplate.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,gDAA0B;AAC1B,0DAAoC;AAE7B,IAAM,aAAa,GAAG,UAAC,EAIL;QAHvB,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,KAAK,WAAA,EAAE,aAAa,mBAAA,EAAE,SAAS,eAAA,EAAE,UAAU,gBAAA,EAAE,QAAQ,cAAA,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,KAAK,CACD,CACR,CACG,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,aAAa,iBA2CxB"}
|
package/Inputs/Selects/index.js
CHANGED
|
@@ -15,14 +15,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.SimpleCustomSelect = exports.CustomSelect = exports.SelectYear = exports.SelectMonth = void 0;
|
|
18
|
-
var
|
|
18
|
+
var react_final_form_1 = require("react-final-form");
|
|
19
19
|
var react_1 = __importDefault(require("react"));
|
|
20
20
|
var utility_1 = require("../../utility");
|
|
21
21
|
var Custom_1 = __importDefault(require("./Custom"));
|
|
22
22
|
exports.CustomSelect = Custom_1.default;
|
|
23
23
|
var Simple_1 = __importDefault(require("./Simple"));
|
|
24
24
|
exports.SimpleCustomSelect = Simple_1.default;
|
|
25
|
-
var SelectMonth = function (props) { return (react_1.default.createElement(
|
|
25
|
+
var SelectMonth = function (props) { return (react_1.default.createElement(react_final_form_1.Field, __assign({}, props, { component: props.simple ? Simple_1.default : Custom_1.default, data: utility_1.months, normalize: utility_1.normalizeSelectNumeric }))); }, SelectYear = function (props) { return (react_1.default.createElement(react_final_form_1.Field, __assign({}, props, { component: props.simple ? Simple_1.default : Custom_1.default, data: utility_1.years, normalize: utility_1.normalizeSelectNumeric }))); };
|
|
26
26
|
exports.SelectMonth = SelectMonth;
|
|
27
27
|
exports.SelectYear = SelectYear;
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Inputs/Selects/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Inputs/Selects/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAyC;AACzC,gDAA0B;AAC1B,yCAAsE;AACtE,oDAAoC;AAmBF,uBAnB3B,gBAAY,CAmB2B;AAlB9C,oDAA0C;AAkBM,6BAlBzC,gBAAkB,CAkByC;AAhBlE,IACE,WAAW,GAAG,UAAC,KAAU,IAAK,OAAA,CAC5B,8BAAC,wBAAK,eACA,KAAK,IACT,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAkB,CAAC,CAAC,CAAC,gBAAY,EAC3D,IAAI,EAAE,gBAAM,EAAE,SAAS,EAAE,gCAAsB,IAC/C,CACH,EAN6B,CAM7B,EACD,UAAU,GAAG,UAAC,KAAU,IAAK,OAAA,CAC3B,8BAAC,wBAAK,eACA,KAAK,IACT,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAkB,CAAC,CAAC,CAAC,gBAAY,EAC3D,IAAI,EAAE,eAAK,EACX,SAAS,EAAE,gCAAsB,IAAI,CACxC,EAN4B,CAM5B,CAAC;AAEK,kCAAW;AAAE,gCAAU"}
|
package/Inputs/SimpleInput.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare type SimpleInputPropTypes = {
|
|
3
3
|
readonly customClass?: any;
|
|
4
4
|
readonly input: any;
|
|
5
|
+
readonly theType?: "input" | "password";
|
|
5
6
|
readonly tabIndex?: string;
|
|
6
7
|
readonly label?: string;
|
|
7
8
|
readonly meta: {
|
|
@@ -11,4 +12,4 @@ export declare type SimpleInputPropTypes = {
|
|
|
11
12
|
};
|
|
12
13
|
readonly placeholder?: string;
|
|
13
14
|
};
|
|
14
|
-
export declare const SimpleInput: ({ customClass, input, label, tabIndex, meta: { submitting, touched, error
|
|
15
|
+
export declare const SimpleInput: ({ customClass, input, label, tabIndex, placeholder, theType, meta: { submitting, touched, error }, }: SimpleInputPropTypes) => JSX.Element;
|
package/Inputs/SimpleInput.js
CHANGED
|
@@ -18,10 +18,10 @@ exports.SimpleInput = void 0;
|
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var classnames_1 = __importDefault(require("classnames"));
|
|
20
20
|
var SimpleInput = function (_a) {
|
|
21
|
-
var customClass = _a.customClass, input = _a.input, label = _a.label, tabIndex = _a.tabIndex, _b = _a.meta, submitting = _b.submitting, touched = _b.touched, error = _b.error
|
|
21
|
+
var customClass = _a.customClass, input = _a.input, label = _a.label, tabIndex = _a.tabIndex, placeholder = _a.placeholder, theType = _a.theType, _b = _a.meta, submitting = _b.submitting, touched = _b.touched, error = _b.error;
|
|
22
22
|
return (react_1.default.createElement("input", __assign({}, input, { "aria-label": label, autoComplete: input.name, className: (0, classnames_1.default)("form-control ".concat(customClass || ""), {
|
|
23
23
|
"is-invalid": touched && error,
|
|
24
|
-
}), disabled: submitting, id: input.name, placeholder: placeholder || label, tabIndex: tabIndex, type:
|
|
24
|
+
}), disabled: submitting, id: input.name, placeholder: placeholder || label, tabIndex: tabIndex, type: theType })));
|
|
25
25
|
};
|
|
26
26
|
exports.SimpleInput = SimpleInput;
|
|
27
27
|
//# sourceMappingURL=SimpleInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleInput.js","sourceRoot":"","sources":["../../src/Inputs/SimpleInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SimpleInput.js","sourceRoot":"","sources":["../../src/Inputs/SimpleInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAaA,gDAA0B;AAC1B,0DAAoC;AAE7B,IAAM,WAAW,GAAG,UAAC,EAGL;QAFrB,WAAW,iBAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,WAAW,iBAAA,EAAE,OAAO,aAAA,EACzD,YAAoC,EAA5B,UAAU,gBAAA,EAAE,OAAO,aAAA,EAAE,KAAK,WAAA;IACR,OAAA,CAC1B,oDACM,KAAK,kBACG,KAAK,EACjB,YAAY,EAAE,KAAK,CAAC,IAAI,EACxB,SAAS,EAAE,IAAA,oBAAU,EAAC,uBAAgB,WAAW,IAAI,EAAE,CAAE,EAAE;YACzD,YAAY,EAAE,OAAO,IAAI,KAAK;SAC/B,CAAC,EAAE,QAAQ,EAAE,UAAU,EACxB,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,WAAW,EAAE,WAAW,IAAI,KAAK,EACjC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,OAAO,IAAI,CACpB;AAZ2B,CAY3B,CAAC;AAfW,QAAA,WAAW,eAetB"}
|
|
@@ -4,7 +4,6 @@ declare type InputTemplatePropTypes = {
|
|
|
4
4
|
readonly input: any;
|
|
5
5
|
readonly label: string;
|
|
6
6
|
readonly placeholder: string;
|
|
7
|
-
readonly type: string;
|
|
8
7
|
readonly inputClass?: string;
|
|
9
8
|
readonly tabIndex?: string;
|
|
10
9
|
readonly rows?: string;
|
|
@@ -15,5 +14,5 @@ declare type InputTemplatePropTypes = {
|
|
|
15
14
|
};
|
|
16
15
|
readonly onRegisterRef?: (callback: (node: any) => void) => void;
|
|
17
16
|
};
|
|
18
|
-
export declare const SimpleTextarea: ({ input,
|
|
17
|
+
export declare const SimpleTextarea: ({ input, label, onRegisterRef, autoFocus, inputClass, placeholder, tabIndex, rows, meta: { submitting, touched, error }, }: InputTemplatePropTypes) => JSX.Element;
|
|
19
18
|
export {};
|
package/Inputs/SimpleTextarea.js
CHANGED
|
@@ -17,9 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.SimpleTextarea = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var SimpleTextarea = function (_a) {
|
|
20
|
-
var input = _a.input,
|
|
20
|
+
var input = _a.input, label = _a.label, onRegisterRef = _a.onRegisterRef, autoFocus = _a.autoFocus, inputClass = _a.inputClass, placeholder = _a.placeholder, tabIndex = _a.tabIndex, rows = _a.rows, _b = _a.meta, submitting = _b.submitting, touched = _b.touched, error = _b.error;
|
|
21
21
|
var warningClass = "".concat(touched && error ? " is-invalid" : ""), customClass = "".concat(inputClass ? " ".concat(inputClass) : ""), classForInput = "form-control ".concat(warningClass).concat(customClass);
|
|
22
|
-
return (react_1.default.createElement("textarea", __assign({}, input, { "aria-label": label, autoFocus: autoFocus, className: classForInput, disabled: submitting, id: input.name, placeholder: placeholder, ref: onRegisterRef ? onRegisterRef : null, rows: rows, tabIndex: tabIndex
|
|
22
|
+
return (react_1.default.createElement("textarea", __assign({}, input, { "aria-label": label, autoFocus: autoFocus, className: classForInput, disabled: submitting, id: input.name, placeholder: placeholder, ref: onRegisterRef ? onRegisterRef : null, rows: rows, tabIndex: tabIndex })));
|
|
23
23
|
};
|
|
24
24
|
exports.SimpleTextarea = SimpleTextarea;
|
|
25
25
|
//# sourceMappingURL=SimpleTextarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleTextarea.js","sourceRoot":"","sources":["../../src/Inputs/SimpleTextarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SimpleTextarea.js","sourceRoot":"","sources":["../../src/Inputs/SimpleTextarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAeA,gDAA0B;AAEnB,IAAM,cAAc,GAAG,UAAC,EAGN;QAFvB,KAAK,WAAA,EAAE,KAAK,WAAA,EAAE,aAAa,mBAAA,EAAE,SAAS,eAAA,EAAE,UAAU,gBAAA,EAAE,WAAW,iBAAA,EAAE,QAAQ,cAAA,EAAE,IAAI,UAAA,EAC/E,YAAoC,EAA5B,UAAU,gBAAA,EAAE,OAAO,aAAA,EAAE,KAAK,WAAA;IAElC,IACE,YAAY,GAAG,UAAG,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAE,EACzD,WAAW,GAAG,UAAG,UAAU,CAAC,CAAC,CAAC,WAAI,UAAU,CAAE,CAAC,CAAC,CAAC,EAAE,CAAE,EACrD,aAAa,GAAG,uBAAgB,YAAY,SAAG,WAAW,CAAE,CAAC;IAE/D,OAAO,CACL,uDACM,KAAK,kBACG,KAAK,EACjB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,UAAU,EACpB,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EACzC,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,IAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,cAAc,kBAuBzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextareaTemplate.js","sourceRoot":"","sources":["../../src/Inputs/TextareaTemplate.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"TextareaTemplate.js","sourceRoot":"","sources":["../../src/Inputs/TextareaTemplate.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgBA,gDAA0B;AAC1B,0DAAoC;AACpC,mDAAkD;AAE3C,IAAM,gBAAgB,GAAG,UAAC,KAA6B;IAE1D,IAAA,KAAK,GAEH,KAAK,MAFF,EAAE,KAAK,GAEV,KAAK,MAFK,EAAE,IAAI,GAEhB,KAAK,KAFW,EAAE,KAAK,GAEvB,KAAK,MAFkB,EACzB,KACE,KAAK,KADiB,EAAhB,OAAO,aAAA,EAAE,KAAK,WAAE,CAChB;IAEV,OAAO,CACL,uCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,gBAAgB,EAAE;YAC3C,YAAY,EAAE,OAAO,IAAI,KAAK;SAC/B,CAAC;QACA,yCACE,SAAS,EAAE,UAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,sCAAmC,EACzE,OAAO,EAAE,KAAK,CAAC,IAAI,IAClB,KAAK,CACA;QACR,uCAAK,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU;YACxC,8BAAC,+BAAc,eAAK,KAAK,EAAI;YAC7B,uCAAK,SAAS,EAAC,kBAAkB,IAC9B,OAAO,IAAI,KAAK,IAAI,CACnB,4CACG,KAAK,CACD,CACR,CACG,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,gBAAgB,oBA2B3B"}
|
package/Messages/Loading.js
CHANGED
|
@@ -16,8 +16,8 @@ var LoadingMessage = function (_a) {
|
|
|
16
16
|
};
|
|
17
17
|
if (isSmall) {
|
|
18
18
|
return (react_1.default.createElement("div", { className: "text-center ".concat(className || "", " mb-1") },
|
|
19
|
-
react_1.default.createElement("div", { className: "font-weight-bold d-inline" }, getMessage()),
|
|
20
|
-
react_1.default.createElement("div", { className: "loading-sm d-inline-block" },
|
|
19
|
+
react_1.default.createElement("div", { className: "font-weight-bold d-inline align-middle" }, getMessage()),
|
|
20
|
+
react_1.default.createElement("div", { className: "loading-sm d-inline-block align-middle" },
|
|
21
21
|
react_1.default.createElement("div", null),
|
|
22
22
|
react_1.default.createElement("div", null),
|
|
23
23
|
react_1.default.createElement("div", null),
|
package/Messages/Loading.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loading.js","sourceRoot":"","sources":["../../src/Messages/Loading.tsx"],"names":[],"mappings":";;;;;;AAKA,gDAA0B;AAC1B,sCAAmC;AAE5B,IAAM,cAAc,GAAG,UAAC,EAIL;QAHxB,OAAO,aAAA,EACP,EAAE,QAAA,EACF,SAAS,eAAA;IAET,IAAM,OAAO,GAAG,EAAE,KAAK,IAAI,EAEzB,UAAU,GAAG;QACX,IAAI,OAAO,KAAK,EAAE,EAAE;YAClB,OAAO,IAAI,CAAC;SACb;QAED,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IAEJ,IAAI,OAAO,EAAE;QACX,OAAO,CACL,uCAAK,SAAS,EAAE,sBAAe,SAAS,IAAI,EAAE,UAAO;YACnD,uCAAK,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"Loading.js","sourceRoot":"","sources":["../../src/Messages/Loading.tsx"],"names":[],"mappings":";;;;;;AAKA,gDAA0B;AAC1B,sCAAmC;AAE5B,IAAM,cAAc,GAAG,UAAC,EAIL;QAHxB,OAAO,aAAA,EACP,EAAE,QAAA,EACF,SAAS,eAAA;IAET,IAAM,OAAO,GAAG,EAAE,KAAK,IAAI,EAEzB,UAAU,GAAG;QACX,IAAI,OAAO,KAAK,EAAE,EAAE;YAClB,OAAO,IAAI,CAAC;SACb;QAED,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IAEJ,IAAI,OAAO,EAAE;QACX,OAAO,CACL,uCAAK,SAAS,EAAE,sBAAe,SAAS,IAAI,EAAE,UAAO;YACnD,uCAAK,SAAS,EAAC,wCAAwC,IACpD,UAAU,EAAE,CACT;YACN,uCAAK,SAAS,EAAC,wCAAwC;gBAAC,0CAAO;gBAAA,0CAAO;gBAAA,0CAAO;gBAAA,0CAAO,CAAM,CACtF,CACP,CAAC;KACH;IAED,OAAO,CACL,uCAAK,SAAS,EAAE,2BAAoB,SAAS,IAAI,EAAE,CAAE;QACnD,uCAAK,SAAS,EAAC,6BAA6B,EAAC,IAAI,EAAC,QAAQ;YACxD,wCAAM,SAAS,EAAC,SAAS,IAAE,eAAK,CAAC,WAAW,CAAQ,CAChD;QACN,uCAAK,SAAS,EAAC,iBAAiB,IAAE,OAAO,CAAO,CAC5C,CACP,CAAC;AACJ,CAAC,CAAC;AAlCW,QAAA,cAAc,kBAkCzB"}
|
package/Modal/Delete.d.ts
CHANGED
|
@@ -38,5 +38,5 @@ declare class Confirm extends React.Component<ConfirmPropTypes, ConfirmStateType
|
|
|
38
38
|
shouldComponentUpdate(nextProps: ConfirmPropTypes, nextState: ConfirmStateTypes): boolean;
|
|
39
39
|
render(): JSX.Element;
|
|
40
40
|
}
|
|
41
|
-
declare const _default: import("react-redux").ConnectedComponent<typeof Confirm,
|
|
41
|
+
declare const _default: import("react-redux").ConnectedComponent<typeof Confirm, Omit<React.ClassAttributes<Confirm> & ConfirmPropTypes, "title" | "errMessage" | "confirmButtonColor" | "cancelButtonLabel" | "confirmButtonLabel" | "focusButton" | "isResponseValid"> & import("react-redux").ConnectProps>;
|
|
42
42
|
export default _default;
|
package/Modal/Root.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ declare class ModalRoot extends React.Component<ModalRootPropTypes> {
|
|
|
6
6
|
shouldComponentUpdate(nextProps: ModalRootPropTypes): boolean;
|
|
7
7
|
render(): any;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: import("react-redux").ConnectedComponent<typeof ModalRoot,
|
|
9
|
+
declare const _default: import("react-redux").ConnectedComponent<typeof ModalRoot, Omit<React.ClassAttributes<ModalRoot> & ModalRootPropTypes, "list"> & import("react-redux").ConnectProps>;
|
|
10
10
|
export default _default;
|
package/Modal/SimpleModal.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare type SimpleModalPropTypes = {
|
|
|
5
5
|
readonly children: any;
|
|
6
6
|
readonly hideModal?: () => void;
|
|
7
7
|
};
|
|
8
|
-
declare const _default: import("react-redux").ConnectedComponent<({ hideModal, children, size, title, }: SimpleModalPropTypes) => JSX.Element,
|
|
8
|
+
declare const _default: import("react-redux").ConnectedComponent<({ hideModal, children, size, title, }: SimpleModalPropTypes) => JSX.Element, Omit<SimpleModalPropTypes, "hideModal"> & {
|
|
9
9
|
cbHideModal?: (() => void) | undefined;
|
|
10
|
-
}>;
|
|
10
|
+
} & import("react-redux").ConnectProps>;
|
|
11
11
|
export default _default;
|
package/Things.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Things.js","sourceRoot":"","sources":["../src/Things.tsx"],"names":[],"mappings":";;;;;AAAA,gDAA0B;AAE1B,2CAAsC;AACtC,sGAA6D;AAC7D,sDAAqC;AACrC,qCAA+C;AAE/C,
|
|
1
|
+
{"version":3,"file":"Things.js","sourceRoot":"","sources":["../src/Things.tsx"],"names":[],"mappings":";;;;;AAAA,gDAA0B;AAE1B,2CAAsC;AACtC,sGAA6D;AAC7D,sDAAqC;AACrC,qCAA+C;AAE/C,IACE,eAAe,GAAG,UAAC,KAAY,IAAK,OAAA,CAAC;IACnC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,CAAC;CAC9C,CAAC,EAFkC,CAElC,EACF,kBAAkB,GAAG,UAAC,QAAkB,IAAK,OAAA,CAAC;IAC5C,aAAa,EAAE,UAAC,YAA+B;QAC7C,QAAQ,CAAC,IAAA,4BAAkB,EAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,CAAC;CACF,CAAC,EAJ2C,CAI3C,EAEF,sBAAsB,GAAG,IAAA,qBAAO,EAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,0CAAa,CAAC,EAEpF,MAAM,GAAG,cAAM,OAAA,CACb;IACE,uCAAK,SAAS,EAAC,cAAc;QAC3B,8BAAC,sBAAsB,OAAG,CACtB;IACN,8BAAC,cAAS,OAAG,CACZ,CACJ,EAPc,CAOd,CAAC;AAEJ,kBAAe,MAAM,CAAC"}
|
package/actions.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { Action } from "src/types";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare type NotificationOptions = {
|
|
4
|
+
title: string;
|
|
5
|
+
position: "tr" | "tl" | "tc" | "br" | "bl" | "bc";
|
|
6
|
+
autoDismiss: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const notify: (title: string | JSX.Element, options?: NotificationOptions | undefined) => Action, notifyWarning: (title: string | JSX.Element, options?: NotificationOptions | undefined) => Action, notifyError: (title: string | JSX.Element, options?: NotificationOptions | undefined) => Action, deleteNotification: (position: number) => Action, showCaptcha: (payload: {
|
|
6
9
|
id: string;
|
|
7
10
|
name: string;
|
|
8
|
-
}) => Action;
|
|
9
|
-
export declare const hideCaptcha: (payload: string) => Action;
|
|
11
|
+
}) => Action, hideCaptcha: (payload: string) => Action;
|
|
10
12
|
export * from "./Modal/actions";
|
|
11
13
|
export * from "./Account/actions";
|
package/actions.js
CHANGED
|
@@ -24,27 +24,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
24
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.hideCaptcha = exports.showCaptcha = exports.deleteNotification = exports.notifyError = exports.notify = void 0;
|
|
27
|
+
exports.hideCaptcha = exports.showCaptcha = exports.deleteNotification = exports.notifyError = exports.notifyWarning = exports.notify = void 0;
|
|
28
28
|
var react_notification_system_redux2_1 = __importDefault(require("react-notification-system-redux2"));
|
|
29
|
-
var createNotification = function (level) { return function (title, options) { return react_notification_system_redux2_1.default.show(__assign({ title: title, position: "tc", autoDismiss:
|
|
30
|
-
exports.notify = createNotification("success");
|
|
31
|
-
// export const notifyWarning = createNotification("warning");
|
|
32
|
-
exports.notifyError = createNotification("error");
|
|
29
|
+
var createNotification = function (level) { return function (title, options) { return react_notification_system_redux2_1.default.show(__assign({ title: title, position: "tc", autoDismiss: 5 }, options), level); }; };
|
|
33
30
|
var deleteNotification = function (position) { return ({
|
|
34
31
|
type: "DELETE_NOTIFICATION",
|
|
35
32
|
payload: position,
|
|
36
|
-
}); }
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
}); },
|
|
34
|
+
// captcha
|
|
35
|
+
showCaptcha = function (payload) { return ({
|
|
39
36
|
type: "SHOW_CAPTCHA",
|
|
40
37
|
payload: payload,
|
|
41
|
-
}); }
|
|
42
|
-
exports.showCaptcha = showCaptcha;
|
|
43
|
-
var hideCaptcha = function (payload) { return ({
|
|
38
|
+
}); }, hideCaptcha = function (payload) { return ({
|
|
44
39
|
type: "HIDE_CAPTCHA",
|
|
45
40
|
payload: payload,
|
|
46
41
|
}); };
|
|
47
|
-
exports.
|
|
42
|
+
exports.notify = createNotification("success"), exports.notifyWarning = createNotification("warning"), exports.notifyError = createNotification("error"), exports.deleteNotification = deleteNotification,
|
|
43
|
+
// captcha
|
|
44
|
+
exports.showCaptcha = showCaptcha, exports.hideCaptcha = hideCaptcha;
|
|
48
45
|
__exportStar(require("./Modal/actions"), exports);
|
|
49
46
|
__exportStar(require("./Account/actions"), exports);
|
|
50
47
|
//# sourceMappingURL=actions.js.map
|
package/actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sGAA6D;
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sGAA6D;AAY7D,IACE,kBAAkB,GAAwB,UAAC,KAAK,IAAK,OAAA,UAAC,KAAK,EAAE,OAAO,IAAK,OAAA,0CAAa,CAAC,IAAI,YACzF,KAAK,OAAA,EACL,QAAQ,EAAM,IAAI,EAClB,WAAW,EAAG,CAAC,IACZ,OAAO,GACT,KAAK,CAAC,EALgE,CAKhE,EAL4C,CAK5C,CAAC;AAEL,IAIL,kBAAkB,GAAG,UAAC,QAAgB,IAAa,OAAA,CAAC;IAClD,IAAI,EAAM,qBAAqB;IAC/B,OAAO,EAAG,QAAQ;CACnB,CAAC,EAHiD,CAGjD;AAEF,UAAU;AAEV,WAAW,GAAG,UAAC,OAGhB,IAAa,OAAA,CAAC;IACX,IAAI,EAAE,cAAc;IACpB,OAAO,SAAA;CACR,CAAC,EAHU,CAGV,EACF,WAAW,GAAG,UAAC,OAAe,IAAa,OAAA,CAAC;IAC1C,IAAI,EAAE,cAAc;IACpB,OAAO,SAAA;CACR,CAAC,EAHyC,CAGzC,CAAC;AApBH,QAAA,MAAM,GAAG,kBAAkB,CAAC,SAAS,CAAC,EACtC,QAAA,aAAa,GAAG,kBAAkB,CAAC,SAAS,CAAC,EAC7C,QAAA,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,EACzC,QAAA,kBAAkB;AAKlB,UAAU;AAEV,QAAA,WAAW,gBAOX,QAAA,WAAW,eAGR;AAEL,kDAAgC;AAChC,oDAAkC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "17.0
|
|
2
|
+
"version": "17.1.0",
|
|
3
3
|
"name": "x25",
|
|
4
4
|
"description": "x25",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"load": "npm run intern-pre && cd dist && npm run ts && npm run intern-copy && npm publish",
|
|
9
9
|
"load-beta": "npm run intern-pre && cd dist && npm run ts && npm run intern-copy && npm publish --tag beta",
|
|
10
10
|
"eslint": "eslint --ext .tsx,.ts src --fix",
|
|
11
|
-
"intern-pre": "npm run
|
|
11
|
+
"intern-pre": "npm run eslint && npm run intern-clean && npm run intern-build",
|
|
12
12
|
"intern-build-scss": "node-sass --output-style compressed src -o dist",
|
|
13
13
|
"intern-copy": " copy package.json dist",
|
|
14
14
|
"intern-build": "npm run intern-build-scss",
|
|
@@ -74,50 +74,50 @@
|
|
|
74
74
|
]
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
78
|
-
"@babel/plugin-proposal-export-default-from": "^7.
|
|
77
|
+
"@babel/plugin-proposal-class-properties": "^7.17.12",
|
|
78
|
+
"@babel/plugin-proposal-export-default-from": "^7.17.12",
|
|
79
79
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
80
|
-
"@babel/plugin-transform-modules-commonjs": "^7.
|
|
81
|
-
"@babel/plugin-transform-react-constant-elements": "^7.
|
|
80
|
+
"@babel/plugin-transform-modules-commonjs": "^7.17.12",
|
|
81
|
+
"@babel/plugin-transform-react-constant-elements": "^7.17.12",
|
|
82
82
|
"@babel/plugin-transform-react-inline-elements": "^7.16.7",
|
|
83
|
-
"@babel/plugin-transform-typescript": "^7.
|
|
84
|
-
"@babel/preset-env": "^7.
|
|
85
|
-
"@babel/preset-react": "^7.
|
|
86
|
-
"@babel/preset-typescript": "^7.
|
|
87
|
-
"@types/jest": "^27.
|
|
83
|
+
"@babel/plugin-transform-typescript": "^7.17.12",
|
|
84
|
+
"@babel/preset-env": "^7.17.12",
|
|
85
|
+
"@babel/preset-react": "^7.17.12",
|
|
86
|
+
"@babel/preset-typescript": "^7.17.12",
|
|
87
|
+
"@types/jest": "^27.5.1",
|
|
88
88
|
"@types/superagent": "^4.1.15",
|
|
89
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
90
|
-
"@typescript-eslint/parser": "^5.
|
|
89
|
+
"@typescript-eslint/eslint-plugin": "^5.25.0",
|
|
90
|
+
"@typescript-eslint/parser": "^5.25.0",
|
|
91
91
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
92
92
|
"copy": "^0.3.2",
|
|
93
|
-
"css-loader": "^6.
|
|
93
|
+
"css-loader": "^6.7.1",
|
|
94
94
|
"depcheck": "^1.4.3",
|
|
95
|
-
"eslint": "^8.
|
|
96
|
-
"eslint-plugin-import": "^2.
|
|
97
|
-
"eslint-plugin-react": "^7.
|
|
98
|
-
"jest-cli": "^
|
|
95
|
+
"eslint": "^8.15.0",
|
|
96
|
+
"eslint-plugin-import": "^2.26.0",
|
|
97
|
+
"eslint-plugin-react": "^7.29.4",
|
|
98
|
+
"jest-cli": "^28.1.0",
|
|
99
99
|
"jest-immutable-matchers": "^3.0.0",
|
|
100
100
|
"npm-check": "^5.9.2",
|
|
101
101
|
"style-loader": "^3.3.1",
|
|
102
|
-
"ts-loader": "^9.
|
|
103
|
-
"webpack": "^5.
|
|
102
|
+
"ts-loader": "^9.3.0",
|
|
103
|
+
"webpack": "^5.72.1"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"@docusaurus/react-loadable": "^5.5.2",
|
|
107
|
-
"@sentry/browser": "^6.
|
|
107
|
+
"@sentry/browser": "^6.19.7",
|
|
108
108
|
"classnames": "^2.3.1",
|
|
109
109
|
"immutable": "^4.0.0-rc.12",
|
|
110
110
|
"jest": "^27.5.1",
|
|
111
|
-
"moment": "^2.29.
|
|
111
|
+
"moment": "^2.29.3",
|
|
112
112
|
"node-sass": "^7.0.1",
|
|
113
113
|
"react": "^17.0.2",
|
|
114
|
+
"react-final-form": "^6.5.9",
|
|
114
115
|
"react-notification-system-redux2": "^3.0.4",
|
|
115
|
-
"react-redux": "^
|
|
116
|
+
"react-redux": "^8.0.1",
|
|
116
117
|
"reactstrap": "^9.0.1",
|
|
117
|
-
"redux": "^4.
|
|
118
|
-
"redux-form": "^8.3.8",
|
|
118
|
+
"redux": "^4.2.0",
|
|
119
119
|
"redux-injector": "^0.1.0",
|
|
120
120
|
"reselect": "^4.1.5",
|
|
121
|
-
"superagent": "^7.1.
|
|
121
|
+
"superagent": "^7.1.3"
|
|
122
122
|
}
|
|
123
123
|
}
|
package/style/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.delay-input{position:relative}.delay-input input{padding-right:27px}.delay-input .loading-spinner{position:absolute;right:4px;top:
|
|
1
|
+
.delay-input{position:relative}.delay-input input{padding-right:27px}.delay-input .loading-spinner{position:absolute;right:4px;top:5px;transition:all .2s ease-in-out}.digits-3{width:52px !important}.text-fancy,.fancy-text,.fancy-text-sm{-webkit-user-select:none;box-sizing:border-box;color:#b1b2b3;cursor:default;font-family:"Lucida Grande","Segoe UI",Ubuntu,Cantarell,sans-serif;font-weight:bold;list-style-image:none;list-style-position:outside;list-style-type:none;opacity:1;text-align:center}.text-fancy{margin-top:5px;color:gray;font-size:20px;font-weight:500}.fancy-text{font-size:31px;line-height:34px}.fancy-text-sm{font-size:16px;line-height:23.5px}.min-height-form{min-height:20rem}.min-300{min-width:300px}.min-200{min-width:200px}.min-150{min-width:150px}.min-100{min-width:100px}.min-80{min-width:80px}.min-50{min-width:50px}.width-13rem{max-width:25rem}.navbar .nav-toggler{background:#292b2c}.main{padding:20px}.main .page-header{margin-top:0}@media (min-width: 768px){.main{padding-right:40px;padding-left:40px}}.sidework-logo .first-char{color:#ff007b;font-size:32px;font-weight:500}.sidework-logo .color{color:#ff007b}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.no-hover{text-decoration:none !important}.cursor-pointer{cursor:pointer}.no-wrap{white-space:nowrap}.content{margin-bottom:3rem;margin-top:10px;margin-left:10px}.hr-sm{margin-top:.5rem;margin-bottom:.5rem}.text-fancy,.fancy-text,.fancy-text-sm{-webkit-user-select:none;box-sizing:border-box;color:#b1b2b3;cursor:default;font-family:"Lucida Grande","Segoe UI",Ubuntu,Cantarell,sans-serif;font-weight:bold;list-style-image:none;list-style-position:outside;list-style-type:none;opacity:1;text-align:center}.fancy-text{font-size:31px;line-height:34px}.fancy-text-sm{font-size:16px;line-height:23.5px}.invalid-feedback{display:block !important}.truncate{display:inline-block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 1201px){.brand-wrapper{width:500px}}@media screen and (min-width: 980px) and (max-width: 1200px){.brand-wrapper{width:350px}}@media screen and (min-width: 850px) and (max-width: 979px){.brand-wrapper{width:200px}}@media screen and (min-width: 798px) and (max-width: 849px){.brand-wrapper{width:100px}}@media screen and (min-width: 765px) and (max-width: 797px){.brand-wrapper{width:200px}}@media screen and (min-width: 580px) and (max-width: 764px){.brand-wrapper{width:400px}}@media screen and (min-width: 401px) and (max-width: 579px){.brand-wrapper{width:240px}}@media screen and (min-width: 350px) and (max-width: 400px){.brand-wrapper{width:230px}}@media screen and (max-width: 349px){.brand-wrapper{width:100px}}@media only screen and (min-device-width: 770px){.search-bar{width:220px !important}}::-webkit-input-placeholder{color:#e0e0e0 !important}::-moz-placeholder{color:#e0e0e0 !important}:-ms-input-placeholder{color:#e0e0e0 !important}:-moz-placeholder{color:#e0e0e0 !important}
|
package/utility/others.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare type ReduxError = {
|
|
3
|
-
error: any;
|
|
4
|
-
};
|
|
5
2
|
import type { List as ImmutableList, Map as ImmutableMap } from "immutable";
|
|
6
3
|
export declare const getDateSortNumber: (item: string) => number, isAdministratorAccount: (current: number) => boolean, createModal: (modalType: string, modalProps?: any) => {
|
|
7
4
|
type: string;
|
|
@@ -9,5 +6,4 @@ export declare const getDateSortNumber: (item: string) => number, isAdministrato
|
|
|
9
6
|
modalType: string;
|
|
10
7
|
modalProps: any;
|
|
11
8
|
};
|
|
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>,
|
|
13
|
-
export {};
|
|
9
|
+
}, 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;
|
package/utility/others.js
CHANGED
|
@@ -1,30 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// type ReduxError = {
|
|
3
|
+
// error: any;
|
|
4
|
+
// };
|
|
2
5
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
6
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
7
|
};
|
|
5
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.showCheck = exports.delay = exports.
|
|
9
|
+
exports.showCheck = exports.delay = exports.addID = exports.removeID = exports.nothingFetched = exports.rowsPerLoad = exports.noError = exports.createModal = exports.isAdministratorAccount = exports.getDateSortNumber = void 0;
|
|
7
10
|
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var immutable_1 = require("redux-form/immutable");
|
|
9
|
-
var words_1 = require("./words");
|
|
10
11
|
var getDateSortNumber = function (item) { return Number(new Date(item).getTime()); }, isAdministratorAccount = function (current) { return current === 0; }, createModal = function (modalType, modalProps) { return ({
|
|
11
12
|
type: "SHOW_MODAL",
|
|
12
13
|
payload: {
|
|
13
14
|
modalType: modalType,
|
|
14
15
|
modalProps: modalProps,
|
|
15
16
|
},
|
|
16
|
-
}); }, removeID = function (payload) { return function (list) { return (list.delete(list.findIndex(function (current) { return current === String(payload.get("ID")); }))); }; }, addID = function (payload) { return (function (list) { return list.push(String(payload.get("ID"))); }); },
|
|
17
|
-
if (error) {
|
|
18
|
-
if (error instanceof immutable_1.SubmissionError) {
|
|
19
|
-
throw error;
|
|
20
|
-
}
|
|
21
|
-
var _error = typeof error.error === "string" ? error.error : words_1.words.ThereWasAProblem;
|
|
22
|
-
throw new immutable_1.SubmissionError({
|
|
23
|
-
_error: _error,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}, delay = function () { return new Promise(function (resolve) {
|
|
17
|
+
}); }, removeID = function (payload) { return function (list) { return (list.delete(list.findIndex(function (current) { return current === String(payload.get("ID")); }))); }; }, addID = function (payload) { return (function (list) { return list.push(String(payload.get("ID"))); }); }, delay = function () { return new Promise(function (resolve) {
|
|
27
18
|
setTimeout(resolve);
|
|
28
19
|
}); }, showCheck = function (value) { return value ? react_1.default.createElement("i", { className: "fa fa-check text-success" }) : null; };
|
|
29
|
-
exports.getDateSortNumber = getDateSortNumber, exports.isAdministratorAccount = isAdministratorAccount, exports.createModal = createModal, exports.noError = "", exports.rowsPerLoad = 50, exports.nothingFetched = -1, exports.removeID = removeID, exports.addID = addID, exports.
|
|
20
|
+
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;
|
|
30
21
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"others.js","sourceRoot":"","sources":["../../src/utility/others.tsx"],"names":[],"mappings":";AACA,sBAAsB;AACtB,gBAAgB;AAChB,KAAK;;;;;;AAGL,gDAA0B;AAEnB,IACL,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,CAAC;AArB1F,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,aAAiF"}
|
|
@@ -1,61 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
error: null | string;
|
|
4
|
-
};
|
|
5
|
-
declare type ValidateStringOptions = {
|
|
6
|
-
what?: string;
|
|
7
|
-
min?: number;
|
|
8
|
-
max?: number;
|
|
9
|
-
optional?: boolean;
|
|
10
|
-
};
|
|
11
|
-
declare type ValidateFloatOptions = {
|
|
12
|
-
min?: number;
|
|
13
|
-
max?: number;
|
|
14
|
-
optional?: boolean;
|
|
15
|
-
integer?: boolean;
|
|
16
|
-
};
|
|
17
|
-
declare type AllOptions = ValidateFloatOptions | ValidateStringOptions;
|
|
18
|
-
declare type Field = {
|
|
19
|
-
field: string;
|
|
20
|
-
options: AllOptions;
|
|
21
|
-
};
|
|
22
|
-
declare type Fields = Array<Field>;
|
|
23
|
-
declare type Validator = (value?: string) => ValidatorResult;
|
|
24
|
-
declare type Checker = (options: any) => Validator;
|
|
25
|
-
declare type ValidateFields = (fields: Fields, checker: Checker) => any;
|
|
26
|
-
export declare const validateEmail: ({ optional }: {
|
|
27
|
-
optional: boolean;
|
|
28
|
-
}) => (value: string) => {
|
|
29
|
-
notValid: boolean;
|
|
30
|
-
error: string | null;
|
|
31
|
-
};
|
|
32
|
-
export declare const validateOptionalDate: (value: string) => {
|
|
33
|
-
notValid: boolean;
|
|
34
|
-
error: string | null;
|
|
35
|
-
};
|
|
36
|
-
export declare const validateDate: (value: string) => {
|
|
37
|
-
notValid: boolean;
|
|
38
|
-
error: string | null;
|
|
39
|
-
};
|
|
40
|
-
export declare const validateFloat: Checker;
|
|
41
|
-
export declare const validateString: Checker;
|
|
42
|
-
export declare const validateSelect: (message?: string | undefined) => (value: string) => {
|
|
43
|
-
notValid: boolean;
|
|
44
|
-
error: string | null;
|
|
45
|
-
};
|
|
46
|
-
export declare const validateID: (message?: string | undefined) => (value: string) => {
|
|
47
|
-
notValid: boolean;
|
|
48
|
-
error: string | null;
|
|
49
|
-
};
|
|
50
|
-
export declare const validateCaptchaSolution: (value: string) => {
|
|
51
|
-
notValid: boolean;
|
|
52
|
-
error: string | null;
|
|
53
|
-
};
|
|
54
|
-
export declare const validateResetToken: (value: string) => {
|
|
55
|
-
notValid: boolean;
|
|
56
|
-
error: string | null;
|
|
57
|
-
};
|
|
58
|
-
export declare const validateHumanName: Validator;
|
|
59
|
-
export declare const validatePassword: Validator;
|
|
60
|
-
export declare const validateFields: ValidateFields;
|
|
61
|
-
export {};
|
|
1
|
+
import { Checker, CheckerWithOptions, FloatOptions, MessageOption, OptionalOption, StringOptions } from "./types";
|
|
2
|
+
export declare const validateEmail: CheckerWithOptions<OptionalOption>, validateOptionalDate: Checker, validateDate: Checker, validateFloat: CheckerWithOptions<FloatOptions>, validateString: CheckerWithOptions<StringOptions>, validateSelect: CheckerWithOptions<MessageOption>, validateID: CheckerWithOptions<MessageOption>, validateCaptchaSolution: Checker, validateResetToken: Checker, validateHumanName: Checker, validatePassword: Checker;
|
|
@@ -1,49 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
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
|
-
};
|
|
2
|
+
/* eslint-disable no-undefined */
|
|
13
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
4
|
+
exports.validatePassword = exports.validateHumanName = exports.validateResetToken = exports.validateCaptchaSolution = exports.validateID = exports.validateSelect = exports.validateString = exports.validateFloat = exports.validateDate = exports.validateOptionalDate = exports.validateEmail = void 0;
|
|
15
5
|
var words_1 = require("../words");
|
|
16
6
|
var validate_1 = require("./validate");
|
|
17
|
-
var validateEmail = function (_a) {
|
|
18
|
-
var optional = _a.optional;
|
|
19
|
-
return function (value) {
|
|
20
|
-
var notValid = (optional && (typeof value !== "undefined" &&
|
|
21
|
-
value !== "" &&
|
|
22
|
-
!(0, validate_1.isValidEmail)(value))) || (!optional && (typeof value === "undefined" ||
|
|
23
|
-
!(0, validate_1.isValidEmail)(value))), error = notValid ? words_1.words.EnterValidEmail : null;
|
|
24
|
-
return {
|
|
25
|
-
notValid: notValid,
|
|
26
|
-
error: error,
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
exports.validateEmail = validateEmail;
|
|
31
|
-
var validateOptionalDate = function (value) {
|
|
32
|
-
var notValid = !(typeof value === "undefined" || value === "" || value === null || ((0, validate_1.isValidDateStamp)(value))), error = notValid ? words_1.words.EnterValidDate : null;
|
|
33
|
-
return {
|
|
34
|
-
notValid: notValid,
|
|
35
|
-
error: error,
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
exports.validateOptionalDate = validateOptionalDate;
|
|
39
|
-
var validateDate = function (value) {
|
|
40
|
-
var notValid = !((typeof value !== "undefined") && (0, validate_1.isValidDateStamp)(value)), error = notValid ? words_1.words.EnterValidDate : null;
|
|
41
|
-
return {
|
|
42
|
-
notValid: notValid,
|
|
43
|
-
error: error,
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
exports.validateDate = validateDate;
|
|
47
7
|
var isInt = function (value) { return (!isNaN(value) &&
|
|
48
8
|
parseInt(String(value), 10) === value &&
|
|
49
9
|
!isNaN(parseInt(String(value), 10))); }, validateNumberRange = function (_a) {
|
|
@@ -62,8 +22,32 @@ var isInt = function (value) { return (!isNaN(value) &&
|
|
|
62
22
|
var min = _a.min, max = _a.max, integer = _a.integer;
|
|
63
23
|
var minTense = typeof min === "number" ? words_1.words.getNumberTense(min) : "", maxTense = typeof max === "number" ? words_1.words.getNumberTense(max) : "", range = ((typeof min === "number" && typeof max === "number") ? (" ".concat(words_1.words.NumberBetween, " ").concat(minTense, " ").concat(words_1.words.NumberAnd, " ").concat(maxTense)) : (typeof max === "number" ? " ".concat(words_1.words.NumberUpTo, " ").concat(maxTense) : (typeof min === "number" ? " ".concat(words_1.words.NumberGreaterThan, " ").concat(minTense) : "")));
|
|
64
24
|
return "".concat(words_1.words.NumberMustBe, " ").concat(integer ? words_1.words.NumberInteger : words_1.words.NumberFloat, " ").concat(range);
|
|
25
|
+
}, getStringTense = function (_a) {
|
|
26
|
+
var min = _a.min, max = _a.max, what = _a.what;
|
|
27
|
+
var maxTense = max ? words_1.words.getNumberTense(max) : "", minTense = min ? words_1.words.getNumberTense(min) : "", isBetween = (typeof max === "number" && typeof min === "number"), rangeError = isBetween ? "".concat(words_1.words.NumberBetween, " ").concat(minTense, " ").concat(words_1.words.NumberAnd, " ").concat(maxTense) : (typeof max === "number" ? "".concat(words_1.words.NumberUpTo, " ").concat(maxTense) : (typeof min === "number" ? "".concat(words_1.words.NumberGreaterThan, " ").concat(minTense) : ""));
|
|
28
|
+
return "".concat(what, " ").concat(words_1.words.Has, " ").concat(rangeError, " ").concat(words_1.words.Chars);
|
|
29
|
+
}, validateStringRange = function (_a) {
|
|
30
|
+
var min = _a.min, max = _a.max, value = _a.value;
|
|
31
|
+
if (typeof value !== "string") {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
var length = typeof value === "undefined" ? 0 : value.length, hasMin = typeof min === "number", hasMax = typeof max === "number";
|
|
35
|
+
return ((!hasMin || (typeof min === "number" && length >= min)) &&
|
|
36
|
+
(!hasMax || (typeof max === "number" && length <= max)));
|
|
65
37
|
};
|
|
66
|
-
var
|
|
38
|
+
var validateEmail = function (_a) {
|
|
39
|
+
var optional = _a.optional;
|
|
40
|
+
return function (value) {
|
|
41
|
+
var notValid = (optional && (typeof value !== "undefined" && value !== "" && !(0, validate_1.isValidEmail)(value))) || (!optional && (typeof value === "undefined" || !(0, validate_1.isValidEmail)(value))), error = notValid ? words_1.words.EnterValidEmail : undefined;
|
|
42
|
+
return error;
|
|
43
|
+
};
|
|
44
|
+
}, validateOptionalDate = function (value) {
|
|
45
|
+
var notValid = !(typeof value === "undefined" || value === "" || value === null || ((0, validate_1.isValidDateStamp)(value))), error = notValid ? words_1.words.EnterValidDate : undefined;
|
|
46
|
+
return error;
|
|
47
|
+
}, validateDate = function (value) {
|
|
48
|
+
var notValid = !((typeof value !== "undefined") && (0, validate_1.isValidDateStamp)(value)), error = notValid ? words_1.words.EnterValidDate : undefined;
|
|
49
|
+
return error;
|
|
50
|
+
}, validateFloat = function (props) { return function (value) {
|
|
67
51
|
var min = props.min, max = props.max, optional = props.optional, integer = props.integer, whenOptional = optional && !(typeof value === "undefined" || value === null || (validateNumberRange({
|
|
68
52
|
min: min,
|
|
69
53
|
max: max,
|
|
@@ -79,26 +63,8 @@ var validateFloat = function (props) { return function (value) {
|
|
|
79
63
|
max: max,
|
|
80
64
|
integer: integer,
|
|
81
65
|
}) : "";
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
error: error,
|
|
85
|
-
};
|
|
86
|
-
}; };
|
|
87
|
-
exports.validateFloat = validateFloat;
|
|
88
|
-
var getStringTense = function (_a) {
|
|
89
|
-
var min = _a.min, max = _a.max, what = _a.what;
|
|
90
|
-
var maxTense = max ? words_1.words.getNumberTense(max) : "", minTense = min ? words_1.words.getNumberTense(min) : "", isBetween = (typeof max === "number" && typeof min === "number"), rangeError = isBetween ? "".concat(words_1.words.NumberBetween, " ").concat(minTense, " ").concat(words_1.words.NumberAnd, " ").concat(maxTense) : (typeof max === "number" ? "".concat(words_1.words.NumberUpTo, " ").concat(maxTense) : (typeof min === "number" ? "".concat(words_1.words.NumberGreaterThan, " ").concat(minTense) : ""));
|
|
91
|
-
return "".concat(what, " ").concat(words_1.words.Has, " ").concat(rangeError, " ").concat(words_1.words.Chars);
|
|
92
|
-
}, validateStringRange = function (_a) {
|
|
93
|
-
var min = _a.min, max = _a.max, value = _a.value;
|
|
94
|
-
if (typeof value !== "string") {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
var length = typeof value === "undefined" ? 0 : value.length, hasMin = typeof min === "number", hasMax = typeof max === "number";
|
|
98
|
-
return ((!hasMin || (typeof min === "number" && length >= min)) &&
|
|
99
|
-
(!hasMax || (typeof max === "number" && length <= max)));
|
|
100
|
-
};
|
|
101
|
-
var validateString = function (props) { return function (value) {
|
|
66
|
+
return error;
|
|
67
|
+
}; }, validateString = function (props) { return function (value) {
|
|
102
68
|
var _a = props.what, what = _a === void 0 ? words_1.words.TheField : _a, min = props.min, max = props.max, optional = props.optional, whenOptional = optional && !(typeof value === "undefined" || value === null || (validateStringRange({
|
|
103
69
|
min: min,
|
|
104
70
|
max: max,
|
|
@@ -112,58 +78,33 @@ var validateString = function (props) { return function (value) {
|
|
|
112
78
|
max: max,
|
|
113
79
|
what: what,
|
|
114
80
|
}) : "";
|
|
115
|
-
return
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
var validateSelect = function (message) { return function (value) {
|
|
122
|
-
var notValid = ((typeof value === "undefined") || value === null || value === ""), error = notValid ? (typeof message === "undefined" ? words_1.words.PleaseSelect : message) : null;
|
|
123
|
-
return {
|
|
124
|
-
notValid: notValid,
|
|
125
|
-
error: error,
|
|
81
|
+
return error;
|
|
82
|
+
}; }, validateSelect = function (_a) {
|
|
83
|
+
var message = _a.message;
|
|
84
|
+
return function (value) {
|
|
85
|
+
var notValid = ((typeof value === "undefined") || value === null || value === ""), error = notValid ? (typeof message === "undefined" ? words_1.words.PleaseSelect : message) : undefined;
|
|
86
|
+
return error;
|
|
126
87
|
};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
notValid: notValid,
|
|
133
|
-
error: error,
|
|
88
|
+
}, validateID = function (_a) {
|
|
89
|
+
var message = _a.message;
|
|
90
|
+
return function (value) {
|
|
91
|
+
var notValid = !(typeof value === "number" && !isNaN(value)), error = notValid ? (typeof message === "undefined" ? words_1.words.PleaseSelect : message) : undefined;
|
|
92
|
+
return error;
|
|
134
93
|
};
|
|
135
|
-
}
|
|
136
|
-
exports.validateID = validateID;
|
|
137
|
-
var validateCaptchaSolution = function (value) {
|
|
94
|
+
}, validateCaptchaSolution = function (value) {
|
|
138
95
|
var pattern = /^\d{6}$/u, notValid = (typeof value !== "undefined" &&
|
|
139
|
-
!pattern.test(value)), error = notValid ? words_1.words.Has6Digits :
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
error: error,
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
exports.validateCaptchaSolution = validateCaptchaSolution;
|
|
146
|
-
var validateResetToken = function (value) {
|
|
96
|
+
!pattern.test(value)), error = notValid ? words_1.words.Has6Digits : undefined;
|
|
97
|
+
return error;
|
|
98
|
+
}, validateResetToken = function (value) {
|
|
147
99
|
var tokenSize = 64, notValid = (typeof value === "undefined" ||
|
|
148
|
-
String(value).length !== tokenSize), error = notValid ? words_1.words.CodeNotValid :
|
|
149
|
-
return
|
|
150
|
-
notValid: notValid,
|
|
151
|
-
error: error,
|
|
152
|
-
};
|
|
100
|
+
String(value).length !== tokenSize), error = notValid ? words_1.words.CodeNotValid : undefined;
|
|
101
|
+
return error;
|
|
153
102
|
};
|
|
154
|
-
exports.validateResetToken = validateResetToken
|
|
155
|
-
exports.validateHumanName = (0, exports.validateString)({
|
|
103
|
+
exports.validateEmail = validateEmail, exports.validateOptionalDate = validateOptionalDate, exports.validateDate = validateDate, exports.validateFloat = validateFloat, exports.validateString = validateString, exports.validateSelect = validateSelect, exports.validateID = validateID, exports.validateCaptchaSolution = validateCaptchaSolution, exports.validateResetToken = validateResetToken, exports.validateHumanName = (0, exports.validateString)({
|
|
156
104
|
min: 3,
|
|
157
105
|
max: 40,
|
|
158
|
-
})
|
|
159
|
-
exports.validatePassword = (0, exports.validateString)({
|
|
106
|
+
}), exports.validatePassword = (0, exports.validateString)({
|
|
160
107
|
min: 6,
|
|
161
108
|
max: 25,
|
|
162
109
|
});
|
|
163
|
-
var validateFields = function (fields, checker) { return (fields.reduce(function (accumulator, _a) {
|
|
164
|
-
var _b;
|
|
165
|
-
var field = _a.field, options = _a.options;
|
|
166
|
-
return (__assign(__assign({}, accumulator), (_b = {}, _b[field] = checker(options), _b)));
|
|
167
|
-
}, {})); };
|
|
168
|
-
exports.validateFields = validateFields;
|
|
169
110
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/utility/validation/common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/utility/validation/common.ts"],"names":[],"mappings":";AAAA,iCAAiC;;;AAEjC,kCAAiC;AACjC,uCAA4D;AAM5D,IACE,KAAK,GAAG,UAAC,KAAc,IAAK,OAAA,CAC1B,CAAC,KAAK,CAAC,KAAK,CAAC;IACb,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK;IACrC,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CACpC,EAJ2B,CAI3B,EACD,mB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oBAAoB,yBAWpB,QAAA,YAAY,iBASZ,QAAA,aAAa,kBA8Bb,QAAA,cAAc,mBA4Bd,QAAA,cAAc,mBASd,QAAA,UAAU,eASV,QAAA,uBAAuB,4BAWvB,QAAA,kBAAkB,uBAWlB,QAAA,iBAAiB,GAAa,IAAA,sBAAc,EAAC;IAC3C,GAAG,EAAG,CAAC;IACP,GAAG,EAAG,EAAE;CACT,CAAC,EACF,QAAA,gBAAgB,GAAa,IAAA,sBAAc,EAAC;IAC1C,GAAG,EAAG,CAAC;IACP,GAAG,EAAG,EAAE;CACT,CAAC,CAAC"}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
+
import { Checkers, Errors } from "./types";
|
|
1
2
|
export * from "./common";
|
|
2
3
|
export * from "./specific";
|
|
3
4
|
export * from "./validate";
|
|
4
|
-
export declare const extractErrorsFromCheckers: (checkers:
|
|
5
|
-
export declare const performValidateRows: (items: any, checkers: any) => {
|
|
6
|
-
notValid: true;
|
|
7
|
-
_error: string;
|
|
8
|
-
isArray: boolean;
|
|
9
|
-
arrayErrors?: undefined;
|
|
10
|
-
} | {
|
|
11
|
-
notValid: boolean;
|
|
12
|
-
arrayErrors: any;
|
|
13
|
-
isArray: boolean;
|
|
14
|
-
_error?: undefined;
|
|
15
|
-
};
|
|
5
|
+
export declare const extractErrorsFromCheckers: (checkers: Checkers) => (values: any) => Errors;
|
|
@@ -10,63 +10,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.extractErrorsFromCheckers = void 0;
|
|
14
14
|
__exportStar(require("./common"), exports);
|
|
15
15
|
__exportStar(require("./specific"), exports);
|
|
16
16
|
__exportStar(require("./validate"), exports);
|
|
17
|
-
var words_1 = require("../words");
|
|
18
|
-
var processErrors = function (_a, _b) {
|
|
19
|
-
var error = _a.error, isArray = _a.isArray, _error = _a._error, arrayErrors = _a.arrayErrors;
|
|
20
|
-
var field = _b.field, errors = _b.errors;
|
|
21
|
-
if (isArray) {
|
|
22
|
-
if (arrayErrors) {
|
|
23
|
-
errors[field] = arrayErrors;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
errors[field] = {
|
|
27
|
-
_error: _error,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
errors[field] = error;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
17
|
var extractErrorsFromCheckers = function (checkers) { return function (values) {
|
|
36
18
|
var errors = {};
|
|
37
19
|
for (var field in checkers) {
|
|
38
20
|
// @ts-expect-error It works
|
|
39
|
-
if (Object.hasOwn(checkers, field)) {
|
|
40
|
-
var checker = checkers[field],
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
field: field,
|
|
44
|
-
errors: errors,
|
|
45
|
-
});
|
|
21
|
+
if (Object.hasOwn(checkers, field) && typeof field === "string") {
|
|
22
|
+
var checker = checkers[field], error = checker(values[field], values, checkers);
|
|
23
|
+
if (typeof error !== "undefined") {
|
|
24
|
+
errors[field] = error;
|
|
46
25
|
}
|
|
47
26
|
}
|
|
48
27
|
}
|
|
49
28
|
return errors;
|
|
50
29
|
}; };
|
|
51
30
|
exports.extractErrorsFromCheckers = extractErrorsFromCheckers;
|
|
52
|
-
var performValidateRows = function (items, checkers) {
|
|
53
|
-
var notValid = typeof items === "undefined" || items.size === 0;
|
|
54
|
-
if (notValid) {
|
|
55
|
-
return {
|
|
56
|
-
notValid: notValid,
|
|
57
|
-
_error: words_1.words.AddARow,
|
|
58
|
-
isArray: true,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
var arrayErrors = items.reduce(function (previous, item, key) {
|
|
62
|
-
previous[key] = (0, exports.extractErrorsFromCheckers)(checkers)(item);
|
|
63
|
-
return previous;
|
|
64
|
-
}, []);
|
|
65
|
-
return {
|
|
66
|
-
notValid: true,
|
|
67
|
-
arrayErrors: arrayErrors,
|
|
68
|
-
isArray: true,
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
exports.performValidateRows = performValidateRows;
|
|
72
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utility/validation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utility/validation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,2CAAyB;AACzB,6CAA2B;AAC3B,6CAA2B;AAGpB,IAAM,yBAAyB,GAAG,UAAC,QAAkB,IAAK,OAAA,UAAC,MAAW;IAC3E,IAAM,MAAM,GAAY,EAAE,CAAC;IAE3B,KAAK,IAAM,KAAK,IAAI,QAAQ,EAAE;QAC9B,4BAA4B;QAC1B,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC/D,IAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,EAC7B,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;YAEnD,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;gBAChC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;aACvB;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,EAhBgE,CAgBhE,CAAC;AAhBW,QAAA,yBAAyB,6BAgBpC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare type ErrorMessage = string | undefined;
|
|
2
|
+
export declare type Checker = (value: string, values?: any, checkers?: Checkers) => ErrorMessage;
|
|
3
|
+
export declare type ComponentsOfStringVerification = {
|
|
4
|
+
max?: number;
|
|
5
|
+
min?: number;
|
|
6
|
+
value?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type ComponentsOfStringTenseVerification = {
|
|
9
|
+
max?: number;
|
|
10
|
+
min?: number;
|
|
11
|
+
what: string;
|
|
12
|
+
};
|
|
13
|
+
export declare type ComponentsOfNumberVerification = {
|
|
14
|
+
max?: number;
|
|
15
|
+
min?: number;
|
|
16
|
+
integer?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare type NumberRange = ComponentsOfNumberVerification & {
|
|
19
|
+
value: string;
|
|
20
|
+
};
|
|
21
|
+
export declare type StringOptions = {
|
|
22
|
+
min?: number;
|
|
23
|
+
max?: number;
|
|
24
|
+
what?: string;
|
|
25
|
+
optional?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare type FloatOptions = ComponentsOfNumberVerification & {
|
|
28
|
+
optional?: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare type OptionalOption = {
|
|
31
|
+
optional: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare type CheckerWithOptions<Options> = (options: Options) => Checker;
|
|
34
|
+
export declare type Checkers = {
|
|
35
|
+
[key: string]: Checker;
|
|
36
|
+
};
|
|
37
|
+
export declare type Errors = {
|
|
38
|
+
[key: string]: ErrorMessage;
|
|
39
|
+
};
|
|
40
|
+
export declare type MessageOption = {
|
|
41
|
+
message?: string;
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utility/validation/types.ts"],"names":[],"mappings":""}
|