indicator-ui 0.0.103 → 0.0.105
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/dist/index.css +0 -490
- package/dist/index.css.map +1 -1
- package/dist/index.js +82 -98
- package/dist/index.js.map +1 -1
- package/dist/types/src/ui/FormBuilder/schemes/index.d.ts +1 -1
- package/dist/types/src/ui/InputFields/FlexField/types/FlexFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/InputField/types/InputFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/InputField/ui/InputField.d.ts +1 -1
- package/dist/types/src/ui/InputFields/InputFieldWrapper/types/InputFieldWrapperTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/InputFieldWrapper/ui/InputFieldWrapper.d.ts +1 -1
- package/dist/types/src/ui/InputFields/RadioField/types/RadioFieldItemTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/RadioField/types/RadioFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/RadioField/ui/RadioField.d.ts +1 -1
- package/dist/types/src/ui/InputFields/RadioField/ui/RadioFieldItem.d.ts +1 -1
- package/dist/types/src/ui/InputFields/SelectField/types/SelectFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/SwitcherField/types/SwitcherFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/SwitcherField/ui/SwitcherField.d.ts +1 -1
- package/dist/types/src/ui/InputFields/TextareaField/types/TextareaFieldTypes.d.ts +0 -1
- package/dist/types/src/ui/InputFields/TextareaField/ui/TextareaField.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3166,22 +3166,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3166
3166
|
|
|
3167
3167
|
/***/ }),
|
|
3168
3168
|
|
|
3169
|
-
/***/ "./src/ui/InputFields/InputField/styles/InputField.module.scss":
|
|
3170
|
-
/*!*********************************************************************!*\
|
|
3171
|
-
!*** ./src/ui/InputFields/InputField/styles/InputField.module.scss ***!
|
|
3172
|
-
\*********************************************************************/
|
|
3173
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3174
|
-
|
|
3175
|
-
"use strict";
|
|
3176
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3177
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3178
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3179
|
-
/* harmony export */ });
|
|
3180
|
-
// extracted by mini-css-extract-plugin
|
|
3181
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"flexField":"InputField-module__flexField___aNE6o","inputField":"InputField-module__inputField___mzakH","placeholder":"InputField-module__placeholder___ybb3Y","icon":"InputField-module__icon___xR6jG","textSupport":"InputField-module__textSupport___njpRn","userPic":"InputField-module__userPic___OQ_q0","help":"InputField-module__help___uSjvq","dropdown":"InputField-module__dropdown___QQuFp","dropdownReverse":"InputField-module__dropdownReverse___Nfb9Z","button":"InputField-module__button___jm0td","red":"InputField-module__red___euINw","gray":"InputField-module__gray___GGFcb","pointer":"InputField-module__pointer___Ij_hP","focus":"InputField-module__focus___xpWhB","isError":"InputField-module__isError___x2fXo","disabled":"InputField-module__disabled___hH7HA","inputFieldWrapper":"InputField-module__inputFieldWrapper___ao9Rs","labelText":"InputField-module__labelText___Fxxc3","required":"InputField-module__required___p4MLk","hintText":"InputField-module__hintText___LC2Oq","hintError":"InputField-module__hintError___LrJWr","helperLink":"InputField-module__helperLink___A_6Ua","selectField":"InputField-module__selectField___ED0Q3","modalWindow":"InputField-module__modalWindow___JplNC","selectModalWindow":"InputField-module__selectModalWindow___Dg52i","show-animation":"InputField-module__show-animation___z7gvz","selectFieldOptionsItem":"InputField-module__selectFieldOptionsItem___HBdJA","label":"InputField-module__label___Wlb6C","active":"InputField-module__active___RcF6w","switcherField":"InputField-module__switcherField___Qezr0","radioFieldItem":"InputField-module__radioFieldItem___c6OMz","checkbox":"InputField-module__checkbox___KcnRp","textareaField":"InputField-module__textareaField___iuYg7","offFocus":"InputField-module__offFocus___FeRXp"});
|
|
3182
|
-
|
|
3183
|
-
/***/ }),
|
|
3184
|
-
|
|
3185
3169
|
/***/ "./src/ui/InputFields/RadioField/styles/RadioField.module.scss":
|
|
3186
3170
|
/*!*********************************************************************!*\
|
|
3187
3171
|
!*** ./src/ui/InputFields/RadioField/styles/RadioField.module.scss ***!
|
|
@@ -8513,11 +8497,11 @@ const getValidateFunResponse = (value, fun) => {
|
|
|
8513
8497
|
}
|
|
8514
8498
|
else if (typeof res === 'string') {
|
|
8515
8499
|
if (res === '')
|
|
8516
|
-
return { status: true, message:
|
|
8500
|
+
return { status: true, message: undefined };
|
|
8517
8501
|
else
|
|
8518
8502
|
return { status: false, message: res };
|
|
8519
8503
|
}
|
|
8520
|
-
return { status: res, message:
|
|
8504
|
+
return { status: res, message: undefined };
|
|
8521
8505
|
};
|
|
8522
8506
|
const getValidateFun = ({ validationProps, keyWay, getValue, schemeRequired, addError, removeError, }) => {
|
|
8523
8507
|
return () => {
|
|
@@ -8542,6 +8526,7 @@ const getValidateFun = ({ validationProps, keyWay, getValue, schemeRequired, add
|
|
|
8542
8526
|
if (message == null && typeof required === 'string') {
|
|
8543
8527
|
message = required;
|
|
8544
8528
|
}
|
|
8529
|
+
``;
|
|
8545
8530
|
addError(keyWay, message);
|
|
8546
8531
|
}
|
|
8547
8532
|
};
|
|
@@ -8912,7 +8897,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8912
8897
|
|
|
8913
8898
|
|
|
8914
8899
|
|
|
8915
|
-
const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, type, onChange, onFocus, onBlur, onClick, mask = /.*/, required = false, disabled = false, isError = false, placeholder, notInput = false, icon, help, dropdown, userPic, textSupport, dropdownState = false, offFocus = false, button, unmask, blocks, pattern, onDropdownClick, buttonState = 'gray', onButtonClick,
|
|
8900
|
+
const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, type, onChange, onFocus, onBlur, onClick, mask = /.*/, required = false, disabled = false, isError = false, placeholder, notInput = false, icon, help, dropdown, userPic, textSupport, dropdownState = false, offFocus = false, button, unmask, blocks, pattern, onDropdownClick, buttonState = 'gray', onButtonClick,
|
|
8901
|
+
// className = FlexFieldStyle,
|
|
8902
|
+
}, ref) => {
|
|
8916
8903
|
const [isFocus, setIsFocus] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
|
8917
8904
|
const handleChange = (newValue) => {
|
|
8918
8905
|
onChange && onChange(newValue);
|
|
@@ -8927,22 +8914,22 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8927
8914
|
};
|
|
8928
8915
|
const getInput = () => {
|
|
8929
8916
|
if (notInput) {
|
|
8930
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8917
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.inputField, { [_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.placeholder]: !value && placeholder }), children: value || placeholder }));
|
|
8931
8918
|
}
|
|
8932
8919
|
let validValue = typeof value === 'string' ? value : '';
|
|
8933
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_imask__WEBPACK_IMPORTED_MODULE_2__.IMaskInput, { value: validValue, type: type, mask: mask, required: required, disabled: disabled, placeholder: placeholder, onAccept: handleChange, onFocus: handleFocus, onBlur: handleBlur, unmask: unmask, blocks: blocks, pattern: pattern, className:
|
|
8920
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_imask__WEBPACK_IMPORTED_MODULE_2__.IMaskInput, { value: validValue, type: type, mask: mask, required: required, disabled: disabled, placeholder: placeholder, onAccept: handleChange, onFocus: handleFocus, onBlur: handleBlur, unmask: unmask, blocks: blocks, pattern: pattern, className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.inputField });
|
|
8934
8921
|
};
|
|
8935
8922
|
const getIcon = () => {
|
|
8936
|
-
return icon ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className:
|
|
8923
|
+
return icon ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.icon, children: icon }) : undefined;
|
|
8937
8924
|
};
|
|
8938
8925
|
const getTextSupport = () => {
|
|
8939
8926
|
if (!textSupport)
|
|
8940
8927
|
return undefined;
|
|
8941
8928
|
if (typeof textSupport === "boolean") {
|
|
8942
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
8929
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.textSupport, children: "+7" });
|
|
8943
8930
|
}
|
|
8944
8931
|
else if (typeof textSupport === "string") {
|
|
8945
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
8932
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.textSupport, children: textSupport });
|
|
8946
8933
|
}
|
|
8947
8934
|
else {
|
|
8948
8935
|
return textSupport;
|
|
@@ -8950,7 +8937,7 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8950
8937
|
};
|
|
8951
8938
|
const getUserPic = () => {
|
|
8952
8939
|
if (typeof userPic === "string") {
|
|
8953
|
-
return userPic && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: userPic, className:
|
|
8940
|
+
return userPic && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: userPic, className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.userPic });
|
|
8954
8941
|
}
|
|
8955
8942
|
return userPic;
|
|
8956
8943
|
};
|
|
@@ -8958,7 +8945,7 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8958
8945
|
if (!help)
|
|
8959
8946
|
return undefined;
|
|
8960
8947
|
if (typeof help === "boolean") {
|
|
8961
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className:
|
|
8948
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.help, children: isError ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.AlertCircleSVG, {}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.HelpCircleSVG, {}) });
|
|
8962
8949
|
}
|
|
8963
8950
|
else {
|
|
8964
8951
|
return help;
|
|
@@ -8968,7 +8955,7 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8968
8955
|
if (!dropdown)
|
|
8969
8956
|
return undefined;
|
|
8970
8957
|
const dropdownIcon = typeof dropdown === "boolean" ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.ChevronDownSVG, {}) : dropdown;
|
|
8971
|
-
let dropdownClassName = typeof dropdownState === 'string' ? dropdownState : (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8958
|
+
let dropdownClassName = typeof dropdownState === 'string' ? dropdownState : (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.dropdown, { [_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.dropdownReverse]: dropdownState });
|
|
8972
8959
|
if (onDropdownClick !== undefined) {
|
|
8973
8960
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { onClick: onDropdownClick, className: dropdownClassName, children: dropdownIcon });
|
|
8974
8961
|
}
|
|
@@ -8980,9 +8967,9 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8980
8967
|
const buttonIcon = typeof button === "boolean" ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets__WEBPACK_IMPORTED_MODULE_4__.XCloseSVG, {}) : button;
|
|
8981
8968
|
let buttonClassName;
|
|
8982
8969
|
if (['red', 'gray'].includes(buttonState)) {
|
|
8983
|
-
buttonClassName = (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8984
|
-
[
|
|
8985
|
-
[
|
|
8970
|
+
buttonClassName = (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.button, {
|
|
8971
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.gray]: buttonState === 'gray',
|
|
8972
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.red]: buttonState === 'red'
|
|
8986
8973
|
});
|
|
8987
8974
|
}
|
|
8988
8975
|
else if (typeof buttonState === "string") {
|
|
@@ -8993,11 +8980,11 @@ const FlexField = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ value, ty
|
|
|
8993
8980
|
}
|
|
8994
8981
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { onClick: onButtonClick, className: buttonClassName, children: buttonIcon });
|
|
8995
8982
|
};
|
|
8996
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { ref: ref, onClick: onClick, className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8997
|
-
[
|
|
8998
|
-
[
|
|
8999
|
-
[
|
|
9000
|
-
[
|
|
8983
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { ref: ref, onClick: onClick, className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.flexField, {
|
|
8984
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.isError]: isError,
|
|
8985
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.disabled]: disabled,
|
|
8986
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.focus]: isFocus && !offFocus,
|
|
8987
|
+
[_styles__WEBPACK_IMPORTED_MODULE_5__.FlexFieldStyle.pointer]: !!onClick,
|
|
9001
8988
|
}), children: [getIcon(), getTextSupport(), getUserPic(), getInput(), getHelp(), getDropdown(), getButton()] }));
|
|
9002
8989
|
});
|
|
9003
8990
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FlexField);
|
|
@@ -9085,18 +9072,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9085
9072
|
|
|
9086
9073
|
|
|
9087
9074
|
|
|
9088
|
-
function InputFieldWrapper({ children, labelText, hintText, isErrorHintText, helperLink, isError, viewRequired,
|
|
9075
|
+
function InputFieldWrapper({ children, labelText, hintText, isErrorHintText, helperLink, isError, viewRequired,
|
|
9076
|
+
// className = InputFieldWrapperStyle,
|
|
9077
|
+
}) {
|
|
9089
9078
|
const getLabelContent = () => {
|
|
9090
9079
|
if (labelText) {
|
|
9091
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className:
|
|
9080
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("label", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.labelText, children: [labelText, viewRequired && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.required, children: "*" })] }));
|
|
9092
9081
|
}
|
|
9093
9082
|
return undefined;
|
|
9094
9083
|
};
|
|
9095
9084
|
const getHintContent = () => {
|
|
9096
9085
|
if (isError && isErrorHintText)
|
|
9097
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
9086
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.hintError, children: isErrorHintText });
|
|
9098
9087
|
if (hintText)
|
|
9099
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
9088
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.hintText, children: hintText });
|
|
9100
9089
|
return undefined;
|
|
9101
9090
|
};
|
|
9102
9091
|
const getHelperLinkContent = () => {
|
|
@@ -9104,19 +9093,19 @@ function InputFieldWrapper({ children, labelText, hintText, isErrorHintText, hel
|
|
|
9104
9093
|
if ('element' in helperLink)
|
|
9105
9094
|
return helperLink.element;
|
|
9106
9095
|
if ('href' in helperLink) {
|
|
9107
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: helperLink.href, className:
|
|
9096
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: helperLink.href, className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.helperLink, children: helperLink.text });
|
|
9108
9097
|
}
|
|
9109
9098
|
if ('onClick' in helperLink) {
|
|
9110
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { onClick: helperLink.onClick, className:
|
|
9099
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { onClick: helperLink.onClick, className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.helperLink, children: helperLink.text });
|
|
9111
9100
|
}
|
|
9112
9101
|
else {
|
|
9113
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className:
|
|
9102
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.helperLink, children: helperLink.text });
|
|
9114
9103
|
}
|
|
9115
9104
|
}
|
|
9116
9105
|
return undefined;
|
|
9117
9106
|
};
|
|
9118
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
9119
|
-
[
|
|
9107
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.inputFieldWrapper, {
|
|
9108
|
+
[_styles__WEBPACK_IMPORTED_MODULE_2__.InputFieldWrapperStyle.isError]: isError,
|
|
9120
9109
|
}), children: [getLabelContent(), children, getHintContent(), getHelperLinkContent()] }));
|
|
9121
9110
|
}
|
|
9122
9111
|
|
|
@@ -9140,23 +9129,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9140
9129
|
|
|
9141
9130
|
|
|
9142
9131
|
|
|
9143
|
-
/***/ }),
|
|
9144
|
-
|
|
9145
|
-
/***/ "./src/ui/InputFields/InputField/styles/index.ts":
|
|
9146
|
-
/*!*******************************************************!*\
|
|
9147
|
-
!*** ./src/ui/InputFields/InputField/styles/index.ts ***!
|
|
9148
|
-
\*******************************************************/
|
|
9149
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9150
|
-
|
|
9151
|
-
"use strict";
|
|
9152
|
-
__webpack_require__.r(__webpack_exports__);
|
|
9153
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9154
|
-
/* harmony export */ InputFieldStyle: () => (/* reexport safe */ _InputField_module_scss__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
9155
|
-
/* harmony export */ });
|
|
9156
|
-
/* harmony import */ var _InputField_module_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InputField.module.scss */ "./src/ui/InputFields/InputField/styles/InputField.module.scss");
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
9132
|
/***/ }),
|
|
9161
9133
|
|
|
9162
9134
|
/***/ "./src/ui/InputFields/InputField/types/InputFieldTypes.ts":
|
|
@@ -9199,29 +9171,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9199
9171
|
/* harmony export */ });
|
|
9200
9172
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
9201
9173
|
/* harmony import */ var _InputFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../InputFields */ "./src/ui/InputFields/index.ts");
|
|
9202
|
-
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/InputField/styles/index.ts");
|
|
9203
9174
|
|
|
9204
9175
|
|
|
9205
|
-
|
|
9206
|
-
|
|
9176
|
+
function InputField({ type, offWrapper,
|
|
9177
|
+
// className = InputFieldStyle,
|
|
9178
|
+
...props }) {
|
|
9207
9179
|
const getField = () => {
|
|
9208
9180
|
switch (type) {
|
|
9209
9181
|
case 'select':
|
|
9210
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.SelectField, { ...props
|
|
9182
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.SelectField, { ...props });
|
|
9211
9183
|
case 'radio':
|
|
9212
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.RadioField, { ...props
|
|
9184
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.RadioField, { ...props });
|
|
9213
9185
|
case 'switcher':
|
|
9214
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.SwitcherField, { ...props
|
|
9186
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.SwitcherField, { ...props });
|
|
9215
9187
|
case 'textarea':
|
|
9216
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.TextareaField, { ...props
|
|
9188
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.TextareaField, { ...props });
|
|
9217
9189
|
default:
|
|
9218
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.FlexField, { ...props, type: type
|
|
9190
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.FlexField, { ...props, type: type });
|
|
9219
9191
|
}
|
|
9220
9192
|
};
|
|
9221
9193
|
if (offWrapper) {
|
|
9222
9194
|
return getField();
|
|
9223
9195
|
}
|
|
9224
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.InputFieldWrapper, { ...props, viewRequired: props.viewRequired !== undefined ? props.viewRequired : props.required,
|
|
9196
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InputFields__WEBPACK_IMPORTED_MODULE_1__.InputFieldWrapper, { ...props, viewRequired: props.viewRequired !== undefined ? props.viewRequired : props.required, children: getField() }));
|
|
9225
9197
|
}
|
|
9226
9198
|
|
|
9227
9199
|
|
|
@@ -9319,14 +9291,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9319
9291
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
9320
9292
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
9321
9293
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
9322
|
-
/* harmony import */ var
|
|
9323
|
-
/* harmony import */ var _RadioFieldItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RadioFieldItem */ "./src/ui/InputFields/RadioField/ui/RadioFieldItem.tsx");
|
|
9294
|
+
/* harmony import */ var _RadioFieldItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RadioFieldItem */ "./src/ui/InputFields/RadioField/ui/RadioFieldItem.tsx");
|
|
9324
9295
|
'use client';
|
|
9325
9296
|
|
|
9326
9297
|
|
|
9327
9298
|
|
|
9328
|
-
|
|
9329
|
-
|
|
9299
|
+
function RadioField({ value, onChange, options = [], required = false, multiple = true, disabled = false,
|
|
9300
|
+
// className = RadioFieldStyle,
|
|
9301
|
+
}) {
|
|
9330
9302
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
9331
9303
|
if (required && options[0] && (value === undefined || Array.isArray(value) && value.length === 0)) {
|
|
9332
9304
|
onChange && onChange(options[0].value);
|
|
@@ -9378,7 +9350,7 @@ function RadioField({ value, onChange, options = [], required = false, multiple
|
|
|
9378
9350
|
return JSON.stringify(value) === JSON.stringify(option.value);
|
|
9379
9351
|
}
|
|
9380
9352
|
};
|
|
9381
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: options.map((item, idx) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
9353
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: options.map((item, idx) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_RadioFieldItem__WEBPACK_IMPORTED_MODULE_2__["default"], { option: item, onClick: () => handleChange(item), active: isActive(item), disabled: disabled }, idx)) }));
|
|
9382
9354
|
}
|
|
9383
9355
|
|
|
9384
9356
|
|
|
@@ -9399,16 +9371,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9399
9371
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
9400
9372
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
9401
9373
|
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
|
|
9374
|
+
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/RadioField/styles/index.ts");
|
|
9402
9375
|
|
|
9403
9376
|
|
|
9404
9377
|
|
|
9405
|
-
|
|
9378
|
+
|
|
9379
|
+
function RadioFieldItem({ option, onClick, active = false, disabled = false,
|
|
9380
|
+
// className,
|
|
9381
|
+
}) {
|
|
9406
9382
|
if (option.component) {
|
|
9407
9383
|
return react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(option.component, { onClick: onClick, active: active, disabled: disabled });
|
|
9408
9384
|
}
|
|
9409
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: onClick, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(
|
|
9410
|
-
[
|
|
9411
|
-
}), children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className:
|
|
9385
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { onClick: onClick, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(_styles__WEBPACK_IMPORTED_MODULE_3__.RadioFieldStyle.radioFieldItem, {
|
|
9386
|
+
[_styles__WEBPACK_IMPORTED_MODULE_3__.RadioFieldStyle.active]: active,
|
|
9387
|
+
}), children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_3__.RadioFieldStyle.checkbox }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: _styles__WEBPACK_IMPORTED_MODULE_3__.RadioFieldStyle.label, children: option.label })] }));
|
|
9412
9388
|
}
|
|
9413
9389
|
|
|
9414
9390
|
|
|
@@ -9602,11 +9578,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9602
9578
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
9603
9579
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
9604
9580
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
9605
|
-
/* harmony import */ var
|
|
9606
|
-
/* harmony import */ var
|
|
9607
|
-
/* harmony import */ var
|
|
9608
|
-
/* harmony import */ var
|
|
9609
|
-
/* harmony import */ var
|
|
9581
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/ui */ "./src/ui/index.ts");
|
|
9582
|
+
/* harmony import */ var _FlexField__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../FlexField */ "./src/ui/InputFields/FlexField/index.ts");
|
|
9583
|
+
/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../lib */ "./src/ui/InputFields/SelectField/lib/index.ts");
|
|
9584
|
+
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/SelectField/styles/index.ts");
|
|
9585
|
+
/* harmony import */ var _SelectModalWindow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SelectModalWindow */ "./src/ui/InputFields/SelectField/ui/SelectModalWindow.tsx");
|
|
9610
9586
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config */ "./src/ui/InputFields/SelectField/config/index.ts");
|
|
9611
9587
|
|
|
9612
9588
|
|
|
@@ -9670,7 +9646,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
9670
9646
|
};
|
|
9671
9647
|
const getViewField = () => {
|
|
9672
9648
|
if (searching !== undefined) {
|
|
9673
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
9649
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FlexField__WEBPACK_IMPORTED_MODULE_3__.FlexField, { value: isFocus ? searchingString : (0,_lib__WEBPACK_IMPORTED_MODULE_4__.getStringValue)(value, optionsCacheRef.current), onChange: (searchString) => {
|
|
9674
9650
|
if (isFocus) {
|
|
9675
9651
|
setSearchingString(searchString);
|
|
9676
9652
|
if (searchingTimeoutRef.current != null) {
|
|
@@ -9689,7 +9665,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
9689
9665
|
// onBlur && onBlur()
|
|
9690
9666
|
}, onDropdownClick: () => setIsShowModalWindow(prevState => !prevState), isError: isError, placeholder: placeholder, dropdown: true, dropdownState: isShowModalWindow, ref: inputRef, ...props });
|
|
9691
9667
|
}
|
|
9692
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
9668
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FlexField__WEBPACK_IMPORTED_MODULE_3__.FlexField, { value: (0,_lib__WEBPACK_IMPORTED_MODULE_4__.getStringValue)(value, optionsCacheRef.current), isError: isError, disabled: disabled, placeholder: placeholder, notInput: true, onClick: () => setIsShowModalWindow(prevState => !prevState), dropdown: true, dropdownState: isShowModalWindow, ref: inputRef, ...props });
|
|
9693
9669
|
};
|
|
9694
9670
|
const processLoadMoreOptions = async () => {
|
|
9695
9671
|
if (requestPromiseRef.current)
|
|
@@ -9723,11 +9699,11 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
|
|
|
9723
9699
|
processLoadMoreOptions();
|
|
9724
9700
|
}
|
|
9725
9701
|
};
|
|
9726
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className:
|
|
9702
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_5__.SelectFieldStyle.selectField, children: [getViewField(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_2__.ModalWindowWrapper, { isShow: isShowModalWindow, setIsShow: (newValue) => {
|
|
9727
9703
|
if (newValue === false && onBlur)
|
|
9728
9704
|
onBlur();
|
|
9729
9705
|
setIsShowModalWindow(newValue);
|
|
9730
|
-
}, additionElements: [inputRef.current], className:
|
|
9706
|
+
}, additionElements: [inputRef.current], className: _styles__WEBPACK_IMPORTED_MODULE_5__.SelectFieldStyle.modalWindow, children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_SelectModalWindow__WEBPACK_IMPORTED_MODULE_6__["default"], { value: value, options: optionsState, onChange: handleChange, afterElement: selectModalWindowAfterElement, show: isShowModalWindow, onScrollToBottom: onScrollToBottom }) })] }));
|
|
9731
9707
|
}
|
|
9732
9708
|
|
|
9733
9709
|
|
|
@@ -9909,24 +9885,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9909
9885
|
|
|
9910
9886
|
|
|
9911
9887
|
|
|
9912
|
-
function SwitcherField({ value, onChange, children, disabled = false, switcherWrapper,
|
|
9888
|
+
function SwitcherField({ value, onChange, children, disabled = false, switcherWrapper,
|
|
9889
|
+
// className = SwitcherFieldStyle
|
|
9890
|
+
}) {
|
|
9913
9891
|
const handleChange = () => {
|
|
9914
9892
|
onChange && onChange(!value);
|
|
9915
9893
|
};
|
|
9916
|
-
const Switcher = ({ value,
|
|
9917
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { disabled: disabled, onClick: handleChange, className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(
|
|
9918
|
-
[
|
|
9894
|
+
const Switcher = ({ value, disabled }) => {
|
|
9895
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { disabled: disabled, onClick: handleChange, className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(_styles__WEBPACK_IMPORTED_MODULE_3__.SwitcherFieldStyle.switcherField, {
|
|
9896
|
+
[_styles__WEBPACK_IMPORTED_MODULE_3__.SwitcherFieldStyle.active]: !!value,
|
|
9919
9897
|
}), children: children }));
|
|
9920
9898
|
};
|
|
9921
9899
|
if (switcherWrapper !== undefined) {
|
|
9922
9900
|
return react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(switcherWrapper, {
|
|
9923
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Switcher, {
|
|
9901
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Switcher, { value: value,
|
|
9902
|
+
// className={className}
|
|
9903
|
+
disabled: disabled }),
|
|
9924
9904
|
value: value,
|
|
9925
9905
|
onChange: onChange,
|
|
9926
9906
|
disabled: disabled
|
|
9927
9907
|
});
|
|
9928
9908
|
}
|
|
9929
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Switcher, {
|
|
9909
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Switcher, { value: value,
|
|
9910
|
+
// className={className}
|
|
9911
|
+
disabled: disabled });
|
|
9930
9912
|
}
|
|
9931
9913
|
|
|
9932
9914
|
|
|
@@ -10012,14 +9994,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10012
9994
|
|
|
10013
9995
|
|
|
10014
9996
|
|
|
10015
|
-
function TextareaField({ value, name, placeholder, onChange, required = false, disabled = false, isError = false, offFocus = false, additionStyles,
|
|
9997
|
+
function TextareaField({ value, name, placeholder, onChange, required = false, disabled = false, isError = false, offFocus = false, additionStyles,
|
|
9998
|
+
// className = TextareaFieldStyle,
|
|
9999
|
+
}) {
|
|
10016
10000
|
const handleOnChange = (e) => {
|
|
10017
10001
|
e.preventDefault();
|
|
10018
10002
|
onChange && onChange(e.target.value);
|
|
10019
10003
|
};
|
|
10020
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { name: name, placeholder: placeholder, value: value || '', onChange: handleOnChange, required: required, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
10021
|
-
[
|
|
10022
|
-
[
|
|
10004
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { name: name, placeholder: placeholder, value: value || '', onChange: handleOnChange, required: required, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.textareaField, {
|
|
10005
|
+
[_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.isError]: isError,
|
|
10006
|
+
[_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.offFocus]: offFocus,
|
|
10023
10007
|
}, additionStyles) }));
|
|
10024
10008
|
}
|
|
10025
10009
|
|