x25 17.4.39 → 17.4.41
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/InputTemplate.d.ts +2 -1
- package/Inputs/InputTemplate.js +2 -2
- package/Inputs/InputTemplate.js.map +1 -1
- package/Inputs/NumericInput.d.ts +1 -0
- package/Inputs/NumericInput.js +2 -2
- package/Inputs/NumericInput.js.map +1 -1
- package/Inputs/NumericTemplate.d.ts +1 -0
- package/Inputs/NumericTemplate.js +2 -2
- package/Inputs/NumericTemplate.js.map +1 -1
- package/Inputs/Selects/Simple.d.ts +1 -1
- package/Inputs/Selects/Simple.js +3 -3
- package/Inputs/Selects/Simple.js.map +1 -1
- package/Inputs/SimpleInput.d.ts +2 -1
- package/Inputs/SimpleInput.js +3 -3
- package/Inputs/SimpleInput.js.map +1 -1
- package/Inputs/SimpleTextarea.d.ts +3 -3
- package/Inputs/SimpleTextarea.js.map +1 -1
- package/Inputs/TextareaTemplate.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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,aAAa,GAAG,UAAC,EAIL;QAHvB,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,UAAU,gBAAA,EAAE,QAAQ,cAAA,EAChE,WAAW,iBAAA,EAAE,IAAI,UAAA,EAAE,QAAQ,cAAA,EAAE,KAAK,WAAA,EAAE,YAAY,kBAAA,EAAE,QAAQ,cAAA,EAC1D,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,EAC5D,WAAW,GAAG,iCAA0B,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAE,CAAC;IAErE,OAAO,CACL,uCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,UAAG,WAAW,YAAS,EAAE;YAClD,YAAY,EAAE,OAAO,IAAI,KAAK;SAC/B,CAAC;QACA,yCACE,SAAS,EAAE,UAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,sBAAsB,0CAAuC,EACzF,OAAO,EAAE,KAAK,CAAC,IAAI,IAClB,KAAK,CACA;QACR,uCAAK,SAAS,EAAE,UAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,uBAAoB;YAC/D,oDACM,KAAK,kBACG,KAAK,EACjB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,UAAU,IAAI,QAAQ,EAChC,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,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"}
|
package/Inputs/NumericInput.d.ts
CHANGED
package/Inputs/NumericInput.js
CHANGED
|
@@ -9,7 +9,7 @@ var react_1 = __importDefault(require("react"));
|
|
|
9
9
|
var utility_1 = require("../utility");
|
|
10
10
|
var common_1 = require("./common");
|
|
11
11
|
var NumericInput = function (props) {
|
|
12
|
-
var _a = props.precision, precision = _a === void 0 ? 2 : _a, customClass = props.customClass, input = props.input, label = props.label, currency = props.currency, tabIndex = props.tabIndex, onRegisterRef = props.onRegisterRef, _b = props.formatValue, formatValue = _b === void 0 ? utility_1.formatZeroValue : _b, size = props.size, placeholder = props.placeholder, _c = props.meta, submitting = _c.submitting, touched = _c.touched, error = _c.error, _d = react_1.default.useState(props.input.value), value = _d[0], setValue = _d[1], noCurrency = (typeof currency === "undefined" || currency === false), valueToShow = formatValue(value, props.optional), updateValue = function (targetValue) {
|
|
12
|
+
var _a = props.precision, precision = _a === void 0 ? 2 : _a, customClass = props.customClass, input = props.input, label = props.label, disabled = props.disabled, currency = props.currency, tabIndex = props.tabIndex, onRegisterRef = props.onRegisterRef, _b = props.formatValue, formatValue = _b === void 0 ? utility_1.formatZeroValue : _b, size = props.size, placeholder = props.placeholder, _c = props.meta, submitting = _c.submitting, touched = _c.touched, error = _c.error, _d = react_1.default.useState(props.input.value), value = _d[0], setValue = _d[1], noCurrency = (typeof currency === "undefined" || currency === false), valueToShow = formatValue(value, props.optional), updateValue = function (targetValue) {
|
|
13
13
|
setValue(targetValue);
|
|
14
14
|
var valueToStore = targetValue;
|
|
15
15
|
if ((0, common_1.isFloat)((0, common_1.floatToEnglishComma)(targetValue))) {
|
|
@@ -27,7 +27,7 @@ var NumericInput = function (props) {
|
|
|
27
27
|
updateValue(targetValue);
|
|
28
28
|
}, inputComponent = (react_1.default.createElement("input", { "aria-label": label, autoFocus: props.autoFocus, className: (0, classnames_1.default)("form-control ".concat(customClass || ""), {
|
|
29
29
|
"is-invalid": touched && error,
|
|
30
|
-
}), disabled: submitting, id: input.name, inputMode: "decimal", maxLength: size, onBlur: handleBlur, onChange: handleChange, onKeyDown: props.onKeyDown, placeholder: placeholder || label, ref: onRegisterRef, tabIndex: tabIndex, type: "text", value: valueToShow }));
|
|
30
|
+
}), disabled: submitting || disabled, id: input.name, inputMode: "decimal", maxLength: size, onBlur: handleBlur, onChange: handleChange, onKeyDown: props.onKeyDown, placeholder: placeholder || label, ref: onRegisterRef, tabIndex: tabIndex, type: "text", value: valueToShow }));
|
|
31
31
|
react_1.default.useEffect(function () {
|
|
32
32
|
if ((0, common_1.isFloat)(input.value) || input.value === "") {
|
|
33
33
|
updateValue(input.value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumericInput.js","sourceRoot":"","sources":["../../src/Inputs/NumericInput.tsx"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"NumericInput.js","sourceRoot":"","sources":["../../src/Inputs/NumericInput.tsx"],"names":[],"mappings":";;;;;;AA2BA,0DAAoC;AACpC,gDAA0B;AAC1B,sCAA6C;AAE7C,mCAAgG;AAEzF,IACL,YAAY,GAAG,UAAC,KAAwB;IAGlC,IAAA,KAGE,KAAK,UAHM,EAAb,SAAS,mBAAG,CAAC,KAAA,EACb,WAAW,GAET,KAAK,YAFI,EAAE,KAAK,GAEhB,KAAK,MAFW,EAAE,KAAK,GAEvB,KAAK,MAFkB,EAAE,QAAQ,GAEjC,KAAK,SAF4B,EAAE,QAAQ,GAE3C,KAAK,SAFsC,EAAE,QAAQ,GAErD,KAAK,SAFgD,EAAE,aAAa,GAEpE,KAAK,cAF+D,EAAE,KAEtE,KAAK,YAF8F,EAA7B,WAAW,mBAAG,yBAAe,KAAA,EACrG,IAAI,GACF,KAAK,KADH,EAAE,WAAW,GACf,KAAK,YADU,EAAE,KACjB,KAAK,KADgD,EAA5B,UAAU,gBAAA,EAAE,OAAO,aAAA,EAAE,KAAK,WAAA,EAGvD,KAAoB,eAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAApD,KAAK,QAAA,EAAE,QAAQ,QAAA,EAEhB,UAAU,GAAG,CAAC,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,KAAK,CAAC,EACpE,WAAW,GAAG,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,EAEhD,WAAW,GAAG,UAAC,WAAgB;QAC7B,QAAQ,CAAC,WAAW,CAAC,CAAC;QAEtB,IAAI,YAAY,GAAG,WAAW,CAAC;QAE/B,IAAI,IAAA,gBAAO,EAAC,IAAA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AAK,CAAC,KAAK,CAAC,CAAC;SAC1B;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAElB,IAAI,UAAU,EAAE;QACd,OAAO,cAAc,CAAC;KACvB;IAED,OAAO,CACL,uCAAK,SAAS,EAAC,aAAa;QACzB,cAAc;QACf,uCAAK,SAAS,EAAC,oBAAoB;YACjC,wCAAM,SAAS,EAAC,kBAAkB,IAC/B,QAAQ,CACJ,CACH,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAnFF,QAAA,YAAY,gBAmFV"}
|
|
@@ -9,7 +9,7 @@ var react_1 = __importDefault(require("react"));
|
|
|
9
9
|
var utility_1 = require("../utility");
|
|
10
10
|
var common_1 = require("./common");
|
|
11
11
|
var NumericTemplate = function (props) {
|
|
12
|
-
var _a = props.precision, precision = _a === void 0 ? 2 : _a, input = props.input, right = props.right, tabIndex = props.tabIndex, divClass = props.divClass, label = props.label, onRegisterRef = props.onRegisterRef, _b = props.meta, submitting = _b.submitting, touched = _b.touched, error = _b.error, _c = props.formatValue, formatValue = _c === void 0 ? utility_1.formatZeroValue : _c, type = props.type, autoFocus = props.autoFocus, inputClass = props.inputClass, placeholder = props.placeholder, left = props.left, size = props.size, _d = react_1.default.useState(props.input.value), value = _d[0], setValue = _d[1], valueToShow = formatValue(value, props.optional), updateValue = function (targetValue) {
|
|
12
|
+
var _a = props.precision, precision = _a === void 0 ? 2 : _a, input = props.input, right = props.right, tabIndex = props.tabIndex, divClass = props.divClass, label = props.label, onRegisterRef = props.onRegisterRef, _b = props.meta, submitting = _b.submitting, touched = _b.touched, error = _b.error, _c = props.formatValue, formatValue = _c === void 0 ? utility_1.formatZeroValue : _c, type = props.type, autoFocus = props.autoFocus, inputClass = props.inputClass, placeholder = props.placeholder, left = props.left, size = props.size, disabled = props.disabled, _d = react_1.default.useState(props.input.value), value = _d[0], setValue = _d[1], valueToShow = formatValue(value, props.optional), updateValue = function (targetValue) {
|
|
13
13
|
setValue(targetValue);
|
|
14
14
|
var valueToStore = targetValue;
|
|
15
15
|
if ((0, common_1.isFloat)((0, common_1.floatToEnglishComma)(targetValue))) {
|
|
@@ -36,7 +36,7 @@ var NumericTemplate = function (props) {
|
|
|
36
36
|
}) },
|
|
37
37
|
react_1.default.createElement("label", { className: "".concat(left ? "".concat(left, " align-self-center") : "col-md-4 text-md-end", " form-control-label align-self-center"), htmlFor: input.name }, label),
|
|
38
38
|
react_1.default.createElement("div", { className: right ? "".concat(right, " align-self-center") : "col-md-8 align-self-center" },
|
|
39
|
-
react_1.default.createElement("input", { "aria-label": label, autoFocus: autoFocus, className: classForInput, disabled: submitting, id: input.name, inputMode: "decimal", maxLength: size, onBlur: handleBlur, onChange: handleChange, onKeyDown: props.onKeyDown, placeholder: placeholder, ref: onRegisterRef, tabIndex: tabIndex, type: type, value: valueToShow }),
|
|
39
|
+
react_1.default.createElement("input", { "aria-label": label, autoFocus: autoFocus, className: classForInput, disabled: submitting || disabled, id: input.name, inputMode: "decimal", maxLength: size, onBlur: handleBlur, onChange: handleChange, onKeyDown: props.onKeyDown, placeholder: placeholder, ref: onRegisterRef, tabIndex: tabIndex, type: type, value: valueToShow }),
|
|
40
40
|
react_1.default.createElement("div", { className: "invalid-feedback" }, touched && error ? (react_1.default.createElement("span", null, error)) : null))));
|
|
41
41
|
};
|
|
42
42
|
exports.NumericTemplate = NumericTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumericTemplate.js","sourceRoot":"","sources":["../../src/Inputs/NumericTemplate.tsx"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"NumericTemplate.js","sourceRoot":"","sources":["../../src/Inputs/NumericTemplate.tsx"],"names":[],"mappings":";;;;;;AA+BA,0DAAoC;AACpC,gDAA0B;AAC1B,sCAA6C;AAG7C,mCAAgG;AAEzF,IACL,eAAe,GAAG,UAAC,KAAwB;IAGrC,IAAA,KAKE,KAAK,UALM,EAAb,SAAS,mBAAG,CAAC,KAA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,QAAQ,EAChC,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,SAAS,EAAC,SAAS,EACnB,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,WAAW,GAClB;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;AA1FF,QAAA,eAAe,mBA0Fb"}
|
|
@@ -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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J,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,EAGR;gBAFL,KAAC,QAAS,EAAE,KAAK,SAAA,EACjB,KAAC,OAAQ,EAAE,IAAI,SAAA;YACL,OAAA,CACV,0CAAQ,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAC7B,IAAI,CACE,CACV;QAJW,CAIX,CAAC,CACK,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
|
package/Inputs/SimpleInput.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare type SimpleInputPropTypes = {
|
|
3
|
+
readonly disabled?: boolean;
|
|
3
4
|
readonly autoFocus?: boolean;
|
|
4
5
|
readonly customClass?: any;
|
|
5
6
|
readonly input: any;
|
|
@@ -15,4 +16,4 @@ export declare type SimpleInputPropTypes = {
|
|
|
15
16
|
};
|
|
16
17
|
readonly placeholder?: string;
|
|
17
18
|
};
|
|
18
|
-
export declare const SimpleInput: ({ customClass, input, label, autoFocus, tabIndex, placeholder, theType, inputRef, autoComplete, meta: { submitting, touched, error }, }: SimpleInputPropTypes) => JSX.Element;
|
|
19
|
+
export declare const SimpleInput: ({ customClass, input, label, autoFocus, tabIndex, placeholder, theType, inputRef, autoComplete, disabled, meta: { submitting, touched, error }, }: SimpleInputPropTypes) => JSX.Element;
|
package/Inputs/SimpleInput.js
CHANGED
|
@@ -15,13 +15,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.SimpleInput = void 0;
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
18
|
var classnames_1 = __importDefault(require("classnames"));
|
|
19
|
+
var react_1 = __importDefault(require("react"));
|
|
20
20
|
var SimpleInput = function (_a) {
|
|
21
|
-
var customClass = _a.customClass, input = _a.input, label = _a.label, autoFocus = _a.autoFocus, tabIndex = _a.tabIndex, placeholder = _a.placeholder, theType = _a.theType, inputRef = _a.inputRef, autoComplete = _a.autoComplete, _b = _a.meta, submitting = _b.submitting, touched = _b.touched, error = _b.error;
|
|
21
|
+
var customClass = _a.customClass, input = _a.input, label = _a.label, autoFocus = _a.autoFocus, tabIndex = _a.tabIndex, placeholder = _a.placeholder, theType = _a.theType, inputRef = _a.inputRef, autoComplete = _a.autoComplete, disabled = _a.disabled, _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: autoComplete, autoFocus: autoFocus, className: (0, classnames_1.default)("form-control ".concat(customClass || ""), {
|
|
23
23
|
"is-invalid": touched && error,
|
|
24
|
-
}), disabled: submitting, id: input.name, placeholder: placeholder || label, ref: inputRef ? inputRef : null, tabIndex: tabIndex, type: theType })));
|
|
24
|
+
}), disabled: submitting || disabled, id: input.name, placeholder: placeholder || label, ref: inputRef ? inputRef : null, 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":";;;;;;;;;;;;;;;;;AAkBA,0DAAoC;AACpC,gDAA0B;AAEnB,IAAM,WAAW,GAAG,UAAC,EAIL;QAHrB,WAAW,iBAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAA,EAAE,QAAQ,cAAA,EAAE,WAAW,iBAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA,EAC9E,YAAY,kBAAA,EAAE,QAAQ,cAAA,EACtB,YAAoC,EAA5B,UAAU,gBAAA,EAAE,OAAO,aAAA,EAAE,KAAK,WAAA;IACR,OAAA,CAC1B,oDACM,KAAK,kBACG,KAAK,EACjB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,IAAA,oBAAU,EAAC,uBAAgB,WAAW,IAAI,EAAE,CAAE,EAAE;YACzD,YAAY,EAAE,OAAO,IAAI,KAAK;SAC/B,CAAC,EAAE,QAAQ,EAAE,UAAU,IAAI,QAAQ,EACpC,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,WAAW,EAAE,WAAW,IAAI,KAAK,EACjC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAC/B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,OAAO,IAAI,CACpB;AAd2B,CAc3B,CAAC;AAlBW,QAAA,WAAW,eAkBtB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare type
|
|
2
|
+
declare type TextareaPropTypes = {
|
|
3
3
|
readonly autoFocus?: boolean;
|
|
4
|
+
readonly disabled?: boolean;
|
|
4
5
|
readonly input: any;
|
|
5
6
|
readonly label: string;
|
|
6
7
|
readonly placeholder: string;
|
|
7
8
|
readonly inputClass?: string;
|
|
8
9
|
readonly tabIndex?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
10
|
readonly rows?: string;
|
|
11
11
|
readonly meta: {
|
|
12
12
|
touched: boolean;
|
|
@@ -15,5 +15,5 @@ declare type InputTemplatePropTypes = {
|
|
|
15
15
|
};
|
|
16
16
|
readonly onRegisterRef?: (callback: (node: any) => void) => void;
|
|
17
17
|
};
|
|
18
|
-
export declare const SimpleTextarea: ({ disabled, input, label, onRegisterRef, autoFocus, inputClass, placeholder, tabIndex, rows, meta: { submitting, touched, error }, }:
|
|
18
|
+
export declare const SimpleTextarea: ({ disabled, input, label, onRegisterRef, autoFocus, inputClass, placeholder, tabIndex, rows, meta: { submitting, touched, error }, }: TextareaPropTypes) => JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleTextarea.js","sourceRoot":"","sources":["../../src/Inputs/SimpleTextarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgBA,gDAA0B;AAEnB,IAAM,cAAc,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"SimpleTextarea.js","sourceRoot":"","sources":["../../src/Inputs/SimpleTextarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgBA,gDAA0B;AAEnB,IAAM,cAAc,GAAG,UAAC,EAIX;QAHlB,QAAQ,cAAA,EACR,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,QAAQ,IAAI,UAAU,EAChC,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;AAxBW,QAAA,cAAc,kBAwBzB"}
|
package/package.json
CHANGED