x25 17.4.39 → 17.4.40
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type InputTemplatePropTypes = {
|
|
3
|
+
readonly disabled?: boolean;
|
|
3
4
|
readonly autoFocus?: boolean;
|
|
4
5
|
readonly input: any;
|
|
5
6
|
readonly label: string;
|
|
@@ -18,5 +19,5 @@ declare type InputTemplatePropTypes = {
|
|
|
18
19
|
readonly right?: string;
|
|
19
20
|
readonly inputRef?: (callback: (node: any) => void) => void;
|
|
20
21
|
};
|
|
21
|
-
export declare const InputTemplate: ({ input, theType, label, inputRef, autoFocus, inputClass, divClass, placeholder, left, tabIndex, right, autoComplete, meta: { submitting, touched, error }, }: InputTemplatePropTypes) => JSX.Element;
|
|
22
|
+
export declare const InputTemplate: ({ input, theType, label, inputRef, autoFocus, inputClass, divClass, placeholder, left, tabIndex, right, autoComplete, disabled, meta: { submitting, touched, error }, }: InputTemplatePropTypes) => JSX.Element;
|
|
22
23
|
export {};
|
package/Inputs/InputTemplate.js
CHANGED
|
@@ -18,14 +18,14 @@ exports.InputTemplate = void 0;
|
|
|
18
18
|
var classnames_1 = __importDefault(require("classnames"));
|
|
19
19
|
var react_1 = __importDefault(require("react"));
|
|
20
20
|
var InputTemplate = function (_a) {
|
|
21
|
-
var input = _a.input, theType = _a.theType, label = _a.label, inputRef = _a.inputRef, autoFocus = _a.autoFocus, inputClass = _a.inputClass, divClass = _a.divClass, placeholder = _a.placeholder, left = _a.left, tabIndex = _a.tabIndex, right = _a.right, autoComplete = _a.autoComplete, _b = _a.meta, submitting = _b.submitting, touched = _b.touched, error = _b.error;
|
|
21
|
+
var input = _a.input, theType = _a.theType, label = _a.label, inputRef = _a.inputRef, autoFocus = _a.autoFocus, inputClass = _a.inputClass, divClass = _a.divClass, placeholder = _a.placeholder, left = _a.left, tabIndex = _a.tabIndex, right = _a.right, autoComplete = _a.autoComplete, disabled = _a.disabled, _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)("".concat(classForDiv, " d-flex"), {
|
|
24
24
|
"is-invalid": touched && error,
|
|
25
25
|
}) },
|
|
26
26
|
react_1.default.createElement("label", { className: "".concat(left ? left : "col-md-4 text-md-end", " form-control-label align-self-center"), htmlFor: input.name }, label),
|
|
27
27
|
react_1.default.createElement("div", { className: "".concat(right ? right : "col-md-8", " align-self-center") },
|
|
28
|
-
react_1.default.createElement("input", __assign({}, input, { "aria-label": label, autoComplete: autoComplete, autoFocus: autoFocus, className: classForInput, disabled: submitting, id: input.name, placeholder: placeholder, ref: inputRef ? inputRef : null, tabIndex: tabIndex, type: theType })),
|
|
28
|
+
react_1.default.createElement("input", __assign({}, input, { "aria-label": label, autoComplete: autoComplete, autoFocus: autoFocus, className: classForInput, disabled: submitting || disabled, id: input.name, placeholder: placeholder, ref: inputRef ? inputRef : null, tabIndex: tabIndex, type: theType })),
|
|
29
29
|
react_1.default.createElement("div", { className: "invalid-feedback" }, touched && error ? (react_1.default.createElement("span", null, error)) : null))));
|
|
30
30
|
};
|
|
31
31
|
exports.InputTemplate = InputTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTemplate.js","sourceRoot":"","sources":["../../src/Inputs/InputTemplate.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"InputTemplate.js","sourceRoot":"","sources":["../../src/Inputs/InputTemplate.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAqBA,0DAAoC;AACpC,gDAA0B;AAEnB,IAAM,aA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E,WAAW,EAAE,WAAW,EACxC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAC/B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,OAAO,IACb;YACF,uCAAK,SAAS,EAAC,kBAAkB,IAC9B,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAClB,4CACG,KAAK,CACD,CACR,CAAC,CAAC,CAAC,IAAI,CACJ,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,aAAa,iBA2CxB"}
|
|
@@ -17,5 +17,5 @@ declare type SelectMonthPropTypes = {
|
|
|
17
17
|
submitting: boolean;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
declare const SimpleCustomSelect: ({ autoFocus, isImmutable, showEmptyOption, valueKey, nameKey, data, tabIndex, input, id, inputClass, meta: { submitting, touched, error }, }: SelectMonthPropTypes) => JSX.Element;
|
|
20
|
+
declare const SimpleCustomSelect: ({ autoFocus, isImmutable, showEmptyOption, valueKey, nameKey, data, tabIndex, input, id, inputClass, disabled, meta: { submitting, touched, error }, }: SelectMonthPropTypes) => JSX.Element;
|
|
21
21
|
export default SimpleCustomSelect;
|
package/Inputs/Selects/Simple.js
CHANGED
|
@@ -14,15 +14,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
var react_1 = __importDefault(require("react"));
|
|
18
17
|
var classnames_1 = __importDefault(require("classnames"));
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var utility_1 = require("../../utility");
|
|
20
20
|
var SimpleCustomSelect = function (_a) {
|
|
21
|
-
var autoFocus = _a.autoFocus, isImmutable = _a.isImmutable, showEmptyOption = _a.showEmptyOption, _b = _a.valueKey, valueKey = _b === void 0 ? "value" : _b, _c = _a.nameKey, nameKey = _c === void 0 ? "name" : _c, data = _a.data, tabIndex = _a.tabIndex, input = _a.input, id = _a.id, inputClass = _a.inputClass, _d = _a.meta, submitting = _d.submitting, touched = _d.touched, error = _d.error;
|
|
21
|
+
var autoFocus = _a.autoFocus, isImmutable = _a.isImmutable, showEmptyOption = _a.showEmptyOption, _b = _a.valueKey, valueKey = _b === void 0 ? "value" : _b, _c = _a.nameKey, nameKey = _c === void 0 ? "name" : _c, data = _a.data, tabIndex = _a.tabIndex, input = _a.input, id = _a.id, inputClass = _a.inputClass, disabled = _a.disabled, _d = _a.meta, submitting = _d.submitting, touched = _d.touched, error = _d.error;
|
|
22
22
|
var theClasses = (0, classnames_1.default)("custom-select ".concat(inputClass || ""), {
|
|
23
23
|
"is-invalid": touched && error,
|
|
24
24
|
}), customID = "custom-select-".concat(input.name).concat(id || "");
|
|
25
|
-
return (react_1.default.createElement("select", __assign({}, input, { autoFocus: autoFocus, className: theClasses, disabled: submitting, id: customID, tabIndex: tabIndex }),
|
|
25
|
+
return (react_1.default.createElement("select", __assign({}, input, { autoFocus: autoFocus, className: theClasses, disabled: submitting || disabled, id: customID, tabIndex: tabIndex }),
|
|
26
26
|
showEmptyOption ? react_1.default.createElement("option", { value: "" }, utility_1.words.Select) : null,
|
|
27
27
|
isImmutable ? data.map(function (current) {
|
|
28
28
|
var value = current.get(valueKey), name = current.get(nameKey);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Simple.js","sourceRoot":"","sources":["../../../src/Inputs/Selects/Simple.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,gDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"Simple.js","sourceRoot":"","sources":["../../../src/Inputs/Selects/Simple.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,0DAAoC;AACpC,gDAA0B;AAC1B,yCAAsC;AAEtC,IAAM,kBAAkB,GAAG,UAAC,EAIL;QAHrB,SAAS,eAAA,EAAE,WAAW,iB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