@semcore/bulk-textarea 16.2.0-prerelease.4 → 16.2.1-prerelease.1
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/CHANGELOG.md +6 -0
- package/README.md +1 -31
- package/lib/cjs/BulkTextarea.js +28 -28
- package/lib/cjs/BulkTextarea.js.map +1 -1
- package/lib/cjs/BulkTextarea.types.js.map +1 -1
- package/lib/cjs/components/ClearAll.js +2 -2
- package/lib/cjs/components/ClearAll.js.map +1 -1
- package/lib/cjs/components/Counter.js +3 -3
- package/lib/cjs/components/Counter.js.map +1 -1
- package/lib/cjs/components/ErrorsNavigation.js +12 -12
- package/lib/cjs/components/ErrorsNavigation.js.map +1 -1
- package/lib/cjs/components/InputField/InputField.js +87 -91
- package/lib/cjs/components/InputField/InputField.js.map +1 -1
- package/lib/cjs/components/InputField/InputField.types.js.map +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/BulkTextarea.js +26 -25
- package/lib/es6/BulkTextarea.js.map +1 -1
- package/lib/es6/BulkTextarea.types.js.map +1 -1
- package/lib/es6/components/ClearAll.js +2 -2
- package/lib/es6/components/ClearAll.js.map +1 -1
- package/lib/es6/components/Counter.js +2 -2
- package/lib/es6/components/Counter.js.map +1 -1
- package/lib/es6/components/ErrorsNavigation.js +9 -9
- package/lib/es6/components/ErrorsNavigation.js.map +1 -1
- package/lib/es6/components/InputField/InputField.js +87 -90
- package/lib/es6/components/InputField/InputField.js.map +1 -1
- package/lib/es6/components/InputField/InputField.types.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/BulkTextarea.mjs +28 -24
- package/lib/esm/components/ClearAll.mjs +1 -1
- package/lib/esm/components/Counter.mjs +2 -2
- package/lib/esm/components/ErrorsNavigation.mjs +3 -3
- package/lib/esm/components/InputField/InputField.mjs +86 -85
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/types/BulkTextarea.d.ts +1 -1
- package/lib/types/BulkTextarea.types.d.ts +6 -6
- package/lib/types/components/ClearAll.d.ts +2 -2
- package/lib/types/components/Counter.d.ts +4 -4
- package/lib/types/components/ErrorsNavigation.d.ts +2 -2
- package/lib/types/components/InputField/InputField.d.ts +6 -6
- package/lib/types/components/InputField/InputField.types.d.ts +29 -29
- package/package.json +10 -10
package/lib/esm/BulkTextarea.mjs
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
4
6
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
8
|
import { createComponent, lastInteraction, assignProps, Component } from "@semcore/core";
|
|
8
|
-
import
|
|
9
|
+
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
10
|
+
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
9
11
|
import { Box } from "@semcore/flex-box";
|
|
10
|
-
import
|
|
11
|
-
import { Counter } from "./components/Counter.mjs";
|
|
12
|
+
import React from "react";
|
|
12
13
|
import { ClearAll } from "./components/ClearAll.mjs";
|
|
14
|
+
import { Counter } from "./components/Counter.mjs";
|
|
13
15
|
import { ErrorsNavigation } from "./components/ErrorsNavigation.mjs";
|
|
16
|
+
import { InputField } from "./components/InputField/InputField.mjs";
|
|
14
17
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
function _callSuper(t, o, e) {
|
|
19
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
20
|
+
}
|
|
17
21
|
var BulkTextareaRoot = /* @__PURE__ */ function(_Component) {
|
|
18
|
-
_inherits(BulkTextareaRoot2, _Component);
|
|
19
|
-
var _super = _createSuper(BulkTextareaRoot2);
|
|
20
22
|
function BulkTextareaRoot2() {
|
|
21
23
|
var _this;
|
|
22
24
|
_classCallCheck(this, BulkTextareaRoot2);
|
|
23
25
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
26
|
args[_key] = arguments[_key];
|
|
25
27
|
}
|
|
26
|
-
_this =
|
|
27
|
-
_defineProperty(
|
|
28
|
-
_defineProperty(
|
|
29
|
-
_defineProperty(
|
|
30
|
-
_defineProperty(
|
|
31
|
-
_defineProperty(
|
|
32
|
-
_defineProperty(
|
|
28
|
+
_this = _callSuper(this, BulkTextareaRoot2, [].concat(args));
|
|
29
|
+
_defineProperty(_this, "inputFieldRef", /* @__PURE__ */ React.createRef());
|
|
30
|
+
_defineProperty(_this, "clearAllButtonRef", /* @__PURE__ */ React.createRef());
|
|
31
|
+
_defineProperty(_this, "nextButtonRef", /* @__PURE__ */ React.createRef());
|
|
32
|
+
_defineProperty(_this, "prevButtonRef", /* @__PURE__ */ React.createRef());
|
|
33
|
+
_defineProperty(_this, "counterRef", /* @__PURE__ */ React.createRef());
|
|
34
|
+
_defineProperty(_this, "state", {
|
|
33
35
|
linesCount: 0,
|
|
34
36
|
isEmptyText: true,
|
|
35
37
|
errorIndex: -1,
|
|
36
38
|
highlightErrorIndex: false
|
|
37
39
|
});
|
|
38
|
-
_defineProperty(
|
|
40
|
+
_defineProperty(_this, "handleChangeLinesCount", function(linesCount) {
|
|
39
41
|
var isEmpty = !linesCount;
|
|
40
42
|
_this.setState({
|
|
41
43
|
linesCount,
|
|
@@ -47,7 +49,7 @@ var BulkTextareaRoot = /* @__PURE__ */ function(_Component) {
|
|
|
47
49
|
_this.handlers.state("normal");
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
|
-
_defineProperty(
|
|
52
|
+
_defineProperty(_this, "handleClickClearAll", function(e) {
|
|
51
53
|
var _this$inputFieldRef$c;
|
|
52
54
|
_this.handlers.showErrors(false);
|
|
53
55
|
_this.handlers.errors([]);
|
|
@@ -57,9 +59,11 @@ var BulkTextareaRoot = /* @__PURE__ */ function(_Component) {
|
|
|
57
59
|
_this.handlers.value("", e);
|
|
58
60
|
_this.handlers.state("normal");
|
|
59
61
|
var textarea = (_this$inputFieldRef$c = _this.inputFieldRef.current) === null || _this$inputFieldRef$c === void 0 ? void 0 : _this$inputFieldRef$c.querySelector('[role="textbox"]');
|
|
60
|
-
textarea instanceof HTMLDivElement
|
|
62
|
+
if (textarea instanceof HTMLDivElement) {
|
|
63
|
+
textarea.focus();
|
|
64
|
+
}
|
|
61
65
|
});
|
|
62
|
-
_defineProperty(
|
|
66
|
+
_defineProperty(_this, "handleChangeErrorIndex", function(amount) {
|
|
63
67
|
return function() {
|
|
64
68
|
var _this$asProps$errors = _this.asProps.errors, errors = _this$asProps$errors === void 0 ? [] : _this$asProps$errors;
|
|
65
69
|
var errorIndex = _this.state.errorIndex;
|
|
@@ -89,7 +93,8 @@ var BulkTextareaRoot = /* @__PURE__ */ function(_Component) {
|
|
|
89
93
|
});
|
|
90
94
|
return _this;
|
|
91
95
|
}
|
|
92
|
-
|
|
96
|
+
_inherits(BulkTextareaRoot2, _Component);
|
|
97
|
+
return _createClass(BulkTextareaRoot2, [{
|
|
93
98
|
key: "uncontrolledProps",
|
|
94
99
|
value: function uncontrolledProps() {
|
|
95
100
|
return {
|
|
@@ -138,10 +143,10 @@ var BulkTextareaRoot = /* @__PURE__ */ function(_Component) {
|
|
|
138
143
|
if (_this2.asProps.showErrors === false && (validateOn !== null && validateOn !== void 0 && validateOn.includes("blur") || validateOn !== null && validateOn !== void 0 && validateOn.includes("blurLine"))) {
|
|
139
144
|
setTimeout(function() {
|
|
140
145
|
var _this2$nextButtonRef$;
|
|
141
|
-
(_this2$nextButtonRef$ = _this2.nextButtonRef.current) === null || _this2$nextButtonRef$ === void 0
|
|
146
|
+
(_this2$nextButtonRef$ = _this2.nextButtonRef.current) === null || _this2$nextButtonRef$ === void 0 || _this2$nextButtonRef$.focus();
|
|
142
147
|
}, 250);
|
|
143
148
|
}
|
|
144
|
-
(_this2$props$onChange = (_this2$props = _this2.props).onChange) === null || _this2$props$onChange === void 0
|
|
149
|
+
(_this2$props$onChange = (_this2$props = _this2.props).onChange) === null || _this2$props$onChange === void 0 || _this2$props$onChange.call(_this2$props, value2, event);
|
|
145
150
|
},
|
|
146
151
|
showErrors,
|
|
147
152
|
validateOn,
|
|
@@ -244,7 +249,6 @@ var BulkTextareaRoot = /* @__PURE__ */ function(_Component) {
|
|
|
244
249
|
}, _ref));
|
|
245
250
|
}
|
|
246
251
|
}]);
|
|
247
|
-
return BulkTextareaRoot2;
|
|
248
252
|
}(Component);
|
|
249
253
|
_defineProperty(BulkTextareaRoot, "displayName", "BulkTextarea");
|
|
250
254
|
_defineProperty(BulkTextareaRoot, "defaultProps", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import { sstyled, assignProps } from "@semcore/core";
|
|
3
|
-
import React from "react";
|
|
4
3
|
import Button from "@semcore/button";
|
|
5
4
|
import CloseM from "@semcore/icon/Close/m";
|
|
5
|
+
import React from "react";
|
|
6
6
|
function ClearAll(props) {
|
|
7
7
|
var _ref = arguments[0], _ref2;
|
|
8
8
|
var SButton = Button;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assignProps } from "@semcore/core";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { ScreenReaderOnly } from "@semcore/flex-box";
|
|
4
2
|
import CounterKit from "@semcore/counter";
|
|
3
|
+
import { ScreenReaderOnly } from "@semcore/flex-box";
|
|
4
|
+
import React from "react";
|
|
5
5
|
function Counter(props) {
|
|
6
6
|
var _ref = arguments[0];
|
|
7
7
|
var theme = props.theme, linesCount = props.linesCount, maxLines = props.maxLines, getI18nText = props.getI18nText;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import Button from "@semcore/button";
|
|
3
2
|
import { Flex } from "@semcore/flex-box";
|
|
4
|
-
import { Text } from "@semcore/typography";
|
|
5
|
-
import ChevronUpM from "@semcore/icon/ChevronUp/m";
|
|
6
3
|
import ChevronDownM from "@semcore/icon/ChevronDown/m";
|
|
4
|
+
import ChevronUpM from "@semcore/icon/ChevronUp/m";
|
|
5
|
+
import { Text } from "@semcore/typography";
|
|
6
|
+
import React from "react";
|
|
7
7
|
function ErrorsNavigation(props) {
|
|
8
8
|
var errorIndex = props.errorIndex, errorsCount = props.errorsCount, onPrevError = props.onPrevError, onNextError = props.onNextError, size = props.size, showErrors = props.showErrors, getI18nText = props.getI18nText, disabled = props.disabled, nextButtonRef = props.nextButtonRef, prevButtonRef = props.prevButtonRef;
|
|
9
9
|
return /* @__PURE__ */ React.createElement(Flex, {
|
|
@@ -3,81 +3,84 @@ import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIt
|
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
4
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
5
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
-
import
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
8
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
9
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
9
10
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
11
|
import { sstyled, assignProps, Component } from "@semcore/core";
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { Box } from "@semcore/flex-box";
|
|
13
|
-
import Tooltip from "@semcore/tooltip";
|
|
14
12
|
import { extractAriaProps } from "@semcore/core/lib/utils/ariaProps";
|
|
15
13
|
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
14
|
+
import { Box } from "@semcore/flex-box";
|
|
15
|
+
import Tooltip from "@semcore/tooltip";
|
|
16
16
|
import DOMPurify from "dompurify";
|
|
17
|
+
import React from "react";
|
|
18
|
+
function _callSuper(t, o, e) {
|
|
19
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
20
|
+
}
|
|
17
21
|
/*!__reshadow-styles__:"./inputField.shadow.css"*/
|
|
18
22
|
var style = (
|
|
19
23
|
/*__reshadow_css_start__*/
|
|
20
24
|
(sstyled.insert(
|
|
21
25
|
/*__inner_css_start__*/
|
|
22
|
-
'.
|
|
26
|
+
'.___SInputField_4h96k_gg_>div{box-sizing:content-box;outline:0;border-radius:var(--intergalactic-control-rounded, 6px);border-color:var(--intergalactic-border-primary, #c4c7cf);border-style:solid;border-width:1px;overflow:auto;position:relative;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);word-wrap:break-word;word-break:break-word;font-family:inherit}.___SInputField_4h96k_gg_>div:empty::before{content:"1. "attr(placeholder);color:var(--intergalactic-text-placeholder, #8a8e9b);position:absolute}.___SInputField_4h96k_gg_>div:nth-child(even){color:red;counter-increment:row;margin-bottom:var(--intergalactic-spacing-1x, 4px);position:relative;word-break:break-all}.___SInputField_4h96k_gg_>div:nth-child(even)::before{content:counter(row)".";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SInputField_4h96k_gg_>div>p{counter-increment:row;margin:0 0 var(--intergalactic-spacing-1x, 4px)0;position:relative;word-break:break-all;white-space:pre-wrap;padding:0 var(--intergalactic-spacing-5x, 20px)0 var(--intergalactic-spacing-4x, 16px)}.___SInputField_4h96k_gg_>div>p:last-of-type{margin-bottom:0}.___SInputField_4h96k_gg_>div>p:not(:empty)::before{content:counter(row)".";display:inline-block;white-space:nowrap;text-align:right;color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-1x, 4px);position:absolute;left:0}.___SInputField_4h96k_gg_>div>p[data-over-max-rows=true]{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7)}.___SInputField_4h96k_gg_>div:has(p:nth-child(n+10))>p{padding-left:var(--intergalactic-spacing-6x, 24px)}.___SInputField_4h96k_gg_>div:has(p:nth-child(n+10))>p:nth-child(-n+9)::before{padding-left:var(--intergalactic-spacing-2x, 8px)}.___SInputField_4h96k_gg_>div:has(p:nth-child(n+100))>p{padding-left:var(--intergalactic-spacing-8x, 32px)}.___SInputField_4h96k_gg_>div:has(p:nth-child(n+100))>p:nth-child(-n+9)::before{padding-left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_4h96k_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+10)::before{padding-left:var(--intergalactic-spacing-2x, 8px)}.___SInputField_4h96k_gg_>div:has(p:nth-child(n+100))>p:nth-child(n+100)::before{padding-left:0}.___SInputField_4h96k_gg_.__showErrors_4h96k_gg_>div[aria-invalid]>p[aria-invalid]:after{content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBmaWxsPSIjZDEwMDJmIj48cGF0aCBkPSJNNyA2aDJ2NEg3VjZabTIgN3YtMkg3djJoMloiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYuMTUyIDEuMTcyYy43MTktMS41NjMgMi45NzctMS41NjMgMy42OTYgMGw2LjA0MyAxMy4xNDFjLjM2My43OTEtLjIyNSAxLjY4Ny0xLjEwOSAxLjY4N0gxLjIxOGMtLjg4NCAwLTEuNDcyLS44OTYtMS4xMDktMS42ODdMNi4xNTIgMS4xNzJabTcuMzc0IDEyLjgzN0w4IDEuOTkgMi40NzQgMTQuMDFoMTEuMDUyWiIvPjwvc3ZnPgo=\\ );position:absolute;right:0;top:var(--intergalactic-spacing-05x, 2px)}.___SInputField_4h96k_gg_._size_m_4h96k_gg_>div{padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);min-height:calc(var(--minRows_4h96k)*20px);max-height:calc((var(--maxRows_4h96k) - 1)*(20px + var(--intergalactic-spacing-1x, 4px)) + 18px)}.___SInputField_4h96k_gg_._size_m_4h96k_gg_>div:empty{padding-left:var(--intergalactic-spacing-8x, 32px)}.___SInputField_4h96k_gg_._size_l_4h96k_gg_>div:empty::before,.___SInputField_4h96k_gg_._size_m_4h96k_gg_>div:empty::before{left:var(--intergalactic-spacing-4x, 16px)}.___SInputField_4h96k_gg_._size_l_4h96k_gg_>div{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);min-height:calc(var(--minRows_4h96k)*24px);max-height:calc((var(--maxRows_4h96k) - 1)*(24px + var(--intergalactic-spacing-1x, 4px)) + 20px)}.___SInputField_4h96k_gg_._size_l_4h96k_gg_>div:empty{padding-left:calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-05x, 2px))}.___SInputField_4h96k_gg_._state_normal_4h96k_gg_:not(.__disabled_4h96k_gg_)>div:focus:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));border-color:var(--intergalactic-border-info-active, #006dca)}.___SInputField_4h96k_gg_._state_valid_4h96k_gg_>div{border-color:var(--intergalactic-border-success-active, #007c65)}.___SInputField_4h96k_gg_._state_valid_4h96k_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-valid, 0px 0px 0px 3px rgba(0, 159, 129, 0.5))}.___SInputField_4h96k_gg_._state_invalid_4h96k_gg_>div{border-color:var(--intergalactic-border-critical-active, #d1002f);background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(209, 0, 47, 1) 0, rgba(209, 0, 47, 1) 2px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:var(--intergalactic-control-rounded, 6px);background-repeat:repeat-y}.___SInputField_4h96k_gg_._state_invalid_4h96k_gg_>div:focus{box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SInputField_4h96k_gg_.__readonly_4h96k_gg_>div{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9)}.___SInputField_4h96k_gg_.__disabled_4h96k_gg_>div{opacity:var(--intergalactic-disabled-opacity, 0.3)}',
|
|
23
27
|
/*__inner_css_end__*/
|
|
24
|
-
"
|
|
28
|
+
"4h96k_gg_"
|
|
25
29
|
), /*__reshadow_css_end__*/
|
|
26
30
|
{
|
|
27
|
-
"__SInputField": "
|
|
28
|
-
"_showErrors": "
|
|
29
|
-
"_readonly": "
|
|
30
|
-
"_disabled": "
|
|
31
|
-
"_size_m": "
|
|
32
|
-
"--minRows": "--
|
|
33
|
-
"--maxRows": "--
|
|
34
|
-
"_size_l": "
|
|
35
|
-
"_state_normal": "
|
|
36
|
-
"_state_valid": "
|
|
37
|
-
"_state_invalid": "
|
|
31
|
+
"__SInputField": "___SInputField_4h96k_gg_",
|
|
32
|
+
"_showErrors": "__showErrors_4h96k_gg_",
|
|
33
|
+
"_readonly": "__readonly_4h96k_gg_",
|
|
34
|
+
"_disabled": "__disabled_4h96k_gg_",
|
|
35
|
+
"_size_m": "_size_m_4h96k_gg_",
|
|
36
|
+
"--minRows": "--minRows_4h96k",
|
|
37
|
+
"--maxRows": "--maxRows_4h96k",
|
|
38
|
+
"_size_l": "_size_l_4h96k_gg_",
|
|
39
|
+
"_state_normal": "_state_normal_4h96k_gg_",
|
|
40
|
+
"_state_valid": "_state_valid_4h96k_gg_",
|
|
41
|
+
"_state_invalid": "_state_invalid_4h96k_gg_"
|
|
38
42
|
})
|
|
39
43
|
);
|
|
40
44
|
var InputField = /* @__PURE__ */ function(_Component) {
|
|
41
|
-
_inherits(InputField2, _Component);
|
|
42
|
-
var _super = _createSuper(InputField2);
|
|
43
45
|
function InputField2(props) {
|
|
44
46
|
var _this;
|
|
45
47
|
_classCallCheck(this, InputField2);
|
|
46
|
-
_this =
|
|
47
|
-
_defineProperty(
|
|
48
|
-
_defineProperty(
|
|
49
|
-
_defineProperty(
|
|
50
|
-
_defineProperty(
|
|
51
|
-
_defineProperty(
|
|
52
|
-
_defineProperty(
|
|
53
|
-
_defineProperty(
|
|
54
|
-
_defineProperty(
|
|
55
|
-
_defineProperty(
|
|
56
|
-
_defineProperty(
|
|
57
|
-
_defineProperty(
|
|
58
|
-
_defineProperty(
|
|
59
|
-
_defineProperty(
|
|
60
|
-
_defineProperty(
|
|
61
|
-
_defineProperty(
|
|
62
|
-
_defineProperty(
|
|
48
|
+
_this = _callSuper(this, InputField2, [props]);
|
|
49
|
+
_defineProperty(_this, "delimiter", "\n");
|
|
50
|
+
_defineProperty(_this, "skipEmptyLines", true);
|
|
51
|
+
_defineProperty(_this, "emptyLineValue", "");
|
|
52
|
+
_defineProperty(_this, "spaceLineValue", " ");
|
|
53
|
+
_defineProperty(_this, "containerRef", /* @__PURE__ */ React.createRef());
|
|
54
|
+
_defineProperty(_this, "textarea", void 0);
|
|
55
|
+
_defineProperty(_this, "popper", null);
|
|
56
|
+
_defineProperty(_this, "setPopperTrigger", null);
|
|
57
|
+
_defineProperty(_this, "errorByInteraction", null);
|
|
58
|
+
_defineProperty(_this, "changeTriggerTimeout", 0);
|
|
59
|
+
_defineProperty(_this, "isScrolling", false);
|
|
60
|
+
_defineProperty(_this, "scrollingTimeout", 0);
|
|
61
|
+
_defineProperty(_this, "toggleErrorsPopperTimeout", 0);
|
|
62
|
+
_defineProperty(_this, "isFocusing", false);
|
|
63
|
+
_defineProperty(_this, "linesCountTimeout", 0);
|
|
64
|
+
_defineProperty(_this, "state", {
|
|
63
65
|
visibleErrorPopper: false,
|
|
64
66
|
keyboardLineIndex: -1,
|
|
65
67
|
mouseLineIndex: -1
|
|
66
68
|
});
|
|
67
|
-
_this.handlePaste = _this.handlePaste.bind(
|
|
68
|
-
_this.handleChange = _this.handleChange.bind(
|
|
69
|
-
_this.handleFocus = _this.handleFocus.bind(
|
|
70
|
-
_this.handleBlur = _this.handleBlur.bind(
|
|
71
|
-
_this.handleKeyDown = _this.handleKeyDown.bind(
|
|
72
|
-
_this.handleMouseDown = _this.handleMouseDown.bind(
|
|
73
|
-
_this.handleMouseMove = _this.handleMouseMove.bind(
|
|
74
|
-
_this.handleMouseLeave = _this.handleMouseLeave.bind(
|
|
75
|
-
_this.handleScroll = _this.handleScroll.bind(
|
|
76
|
-
_this.handleSelectAll = _this.handleSelectAll.bind(
|
|
69
|
+
_this.handlePaste = _this.handlePaste.bind(_this);
|
|
70
|
+
_this.handleChange = _this.handleChange.bind(_this);
|
|
71
|
+
_this.handleFocus = _this.handleFocus.bind(_this);
|
|
72
|
+
_this.handleBlur = _this.handleBlur.bind(_this);
|
|
73
|
+
_this.handleKeyDown = _this.handleKeyDown.bind(_this);
|
|
74
|
+
_this.handleMouseDown = _this.handleMouseDown.bind(_this);
|
|
75
|
+
_this.handleMouseMove = _this.handleMouseMove.bind(_this);
|
|
76
|
+
_this.handleMouseLeave = _this.handleMouseLeave.bind(_this);
|
|
77
|
+
_this.handleScroll = _this.handleScroll.bind(_this);
|
|
78
|
+
_this.handleSelectAll = _this.handleSelectAll.bind(_this);
|
|
77
79
|
_this.textarea = _this.createContentEditableElement(props);
|
|
78
80
|
return _this;
|
|
79
81
|
}
|
|
80
|
-
|
|
82
|
+
_inherits(InputField2, _Component);
|
|
83
|
+
return _createClass(InputField2, [{
|
|
81
84
|
key: "uncontrolledProps",
|
|
82
85
|
value: function uncontrolledProps() {
|
|
83
86
|
return {
|
|
@@ -90,7 +93,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
90
93
|
key: "componentDidMount",
|
|
91
94
|
value: function componentDidMount() {
|
|
92
95
|
var _this$containerRef$cu;
|
|
93
|
-
(_this$containerRef$cu = this.containerRef.current) === null || _this$containerRef$cu === void 0
|
|
96
|
+
(_this$containerRef$cu = this.containerRef.current) === null || _this$containerRef$cu === void 0 || _this$containerRef$cu.append(this.textarea);
|
|
94
97
|
this.handleValueOutChange();
|
|
95
98
|
}
|
|
96
99
|
}, {
|
|
@@ -279,7 +282,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
279
282
|
}
|
|
280
283
|
}, {
|
|
281
284
|
key: "handleMouseLeave",
|
|
282
|
-
value: function handleMouseLeave(
|
|
285
|
+
value: function handleMouseLeave() {
|
|
283
286
|
if (this.changeTriggerTimeout) {
|
|
284
287
|
clearTimeout(this.changeTriggerTimeout);
|
|
285
288
|
}
|
|
@@ -326,9 +329,9 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
326
329
|
textNode = lastNodeToInsert.childNodes.item(0);
|
|
327
330
|
position = ((_lastNodeToInsert$tex = lastNodeToInsert.textContent) !== null && _lastNodeToInsert$tex !== void 0 ? _lastNodeToInsert$tex : "").length;
|
|
328
331
|
} else if (focusNode instanceof HTMLParagraphElement && anchorNode instanceof HTMLParagraphElement) {
|
|
329
|
-
var _anchorNode$textConte, _anchorNode$textConte2, _focusNode$textConten, _focusNode$textConten2,
|
|
330
|
-
var before = (_anchorNode$textConte = anchorNode === null || anchorNode === void 0
|
|
331
|
-
var after = (_focusNode$textConten = focusNode === null || focusNode === void 0
|
|
332
|
+
var _anchorNode$textConte, _anchorNode$textConte2, _focusNode$textConten, _focusNode$textConten2, _firstNodeToInsert$te;
|
|
333
|
+
var before = (_anchorNode$textConte = anchorNode === null || anchorNode === void 0 || (_anchorNode$textConte2 = anchorNode.textContent) === null || _anchorNode$textConte2 === void 0 ? void 0 : _anchorNode$textConte2.substring(0, fromOffset)) !== null && _anchorNode$textConte !== void 0 ? _anchorNode$textConte : "";
|
|
334
|
+
var after = (_focusNode$textConten = focusNode === null || focusNode === void 0 || (_focusNode$textConten2 = focusNode.textContent) === null || _focusNode$textConten2 === void 0 ? void 0 : _focusNode$textConten2.substring(toOffset)) !== null && _focusNode$textConten !== void 0 ? _focusNode$textConten : "";
|
|
332
335
|
var noEmptyLineBefore = before.trim() === "" ? "" : before;
|
|
333
336
|
var noEmptyLineAfter = after.trim() === "" ? "" : after;
|
|
334
337
|
selection.deleteFromDocument();
|
|
@@ -337,7 +340,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
337
340
|
}
|
|
338
341
|
var firstNodeToInsert = listOfNodes.splice(0, 1)[0];
|
|
339
342
|
var _lastNodeToInsert = listOfNodes[listOfNodes.length - 1];
|
|
340
|
-
anchorNode.textContent =
|
|
343
|
+
anchorNode.textContent = noEmptyLineBefore + ((_firstNodeToInsert$te = firstNodeToInsert === null || firstNodeToInsert === void 0 ? void 0 : firstNodeToInsert.textContent) !== null && _firstNodeToInsert$te !== void 0 ? _firstNodeToInsert$te : "");
|
|
341
344
|
anchorNode.after.apply(anchorNode, _toConsumableArray(listOfNodes));
|
|
342
345
|
if (_lastNodeToInsert) {
|
|
343
346
|
var _lastNodeToInsert$tex2, _lastNodeToInsert$tex3;
|
|
@@ -356,8 +359,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
356
359
|
}
|
|
357
360
|
}
|
|
358
361
|
if (textNode instanceof Text) {
|
|
359
|
-
|
|
360
|
-
this.setSelection(textNode, (_position = position) !== null && _position !== void 0 ? _position : 1, (_position2 = position) !== null && _position2 !== void 0 ? _position2 : 1);
|
|
362
|
+
this.setSelection(textNode, position !== null && position !== void 0 ? position : 1, position !== null && position !== void 0 ? position : 1);
|
|
361
363
|
this.toggleErrorsPopper("keyboardLineIndex", textNode.parentNode);
|
|
362
364
|
} else {
|
|
363
365
|
var _textNode;
|
|
@@ -386,7 +388,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
386
388
|
var text = document.createTextNode(nodeText);
|
|
387
389
|
firstRow.append(text);
|
|
388
390
|
firstNode.replaceWith(firstRow);
|
|
389
|
-
selection === null || selection === void 0
|
|
391
|
+
selection === null || selection === void 0 || selection.setPosition(firstRow, nodeText.length);
|
|
390
392
|
} else if (!firstNode || firstNode instanceof HTMLBRElement && nodes.length === 1) {
|
|
391
393
|
this.textarea.textContent = "";
|
|
392
394
|
this.setState({
|
|
@@ -449,7 +451,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
449
451
|
if (showErrors && ((_this$popper = this.popper) === null || _this$popper === void 0 ? void 0 : _this$popper.current.state.elements.reference) !== trigger) {
|
|
450
452
|
if (this.shouldChangePopperTrigger(trigger)) {
|
|
451
453
|
var _this$setPopperTrigge;
|
|
452
|
-
(_this$setPopperTrigge = this.setPopperTrigger) === null || _this$setPopperTrigge === void 0
|
|
454
|
+
(_this$setPopperTrigge = this.setPopperTrigger) === null || _this$setPopperTrigge === void 0 || _this$setPopperTrigge.call(this, trigger);
|
|
453
455
|
} else {
|
|
454
456
|
this.setState({
|
|
455
457
|
visibleErrorPopper: false
|
|
@@ -458,7 +460,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
458
460
|
}
|
|
459
461
|
} else if (rowNode === null) {
|
|
460
462
|
var _this$setPopperTrigge2;
|
|
461
|
-
(_this$setPopperTrigge2 = this.setPopperTrigger) === null || _this$setPopperTrigge2 === void 0
|
|
463
|
+
(_this$setPopperTrigge2 = this.setPopperTrigger) === null || _this$setPopperTrigge2 === void 0 || _this$setPopperTrigge2.call(this, this.textarea);
|
|
462
464
|
if ((selection === null || selection === void 0 ? void 0 : selection.focusNode) === this.textarea && this.textarea.childNodes.length > 1) {
|
|
463
465
|
var nodeIndex = selection.focusOffset;
|
|
464
466
|
var emptyParagraph = this.textarea.childNodes.item(nodeIndex - 1);
|
|
@@ -479,7 +481,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
479
481
|
}
|
|
480
482
|
}, {
|
|
481
483
|
key: "handleFocus",
|
|
482
|
-
value: function handleFocus(
|
|
484
|
+
value: function handleFocus() {
|
|
483
485
|
this.isFocusing = true;
|
|
484
486
|
this.errorByInteraction = "keyboard";
|
|
485
487
|
if (this.asProps.showErrors) {
|
|
@@ -528,7 +530,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
528
530
|
var _selection$focusNode, _selectionNode$textCo, _currentNode$textCont2, _row$textContent;
|
|
529
531
|
event.preventDefault();
|
|
530
532
|
var selection = document.getSelection();
|
|
531
|
-
var selectionNode = (selection === null || selection === void 0 ? void 0 : selection.focusNode) instanceof Text ? selection.focusNode : selection === null || selection === void 0
|
|
533
|
+
var selectionNode = (selection === null || selection === void 0 ? void 0 : selection.focusNode) instanceof Text ? selection.focusNode : selection === null || selection === void 0 || (_selection$focusNode = selection.focusNode) === null || _selection$focusNode === void 0 ? void 0 : _selection$focusNode.childNodes.item(0);
|
|
532
534
|
var selectionOffset = selection === null || selection === void 0 ? void 0 : selection.focusOffset;
|
|
533
535
|
var newRowValue = "";
|
|
534
536
|
if (selectionNode instanceof Text && selectionOffset !== void 0 && selectionOffset !== ((_selectionNode$textCo = selectionNode.textContent) === null || _selectionNode$textCo === void 0 ? void 0 : _selectionNode$textCo.length)) {
|
|
@@ -597,7 +599,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
597
599
|
this.toggleErrorsPopperByKeyboard(0);
|
|
598
600
|
}
|
|
599
601
|
} else if (this.isRangeSelection()) {
|
|
600
|
-
var _currentNode$textCont4, _focusElement$parentN, _anchorElement$parent, _focusElement$parentN2
|
|
602
|
+
var _currentNode$textCont4, _focusElement$parentN, _anchorElement$parent, _focusElement$parentN2;
|
|
601
603
|
var _selection = document.getSelection();
|
|
602
604
|
var direction = this.getSelectionDirection();
|
|
603
605
|
var anchorElement = direction === "backward" ? _selection === null || _selection === void 0 ? void 0 : _selection.focusNode : _selection === null || _selection === void 0 ? void 0 : _selection.anchorNode;
|
|
@@ -622,7 +624,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
622
624
|
_this5.recalculateErrors();
|
|
623
625
|
}, 0);
|
|
624
626
|
this.toggleErrorsPopperByKeyboard(0);
|
|
625
|
-
} else if (focusElement !== anchorElement && focusElement instanceof Text && anchorElement instanceof Text && (focusElement === null || focusElement === void 0 ? void 0 : focusElement.textContent) === (focusElement === null || focusElement === void 0
|
|
627
|
+
} else if (focusElement !== anchorElement && focusElement instanceof Text && anchorElement instanceof Text && (focusElement === null || focusElement === void 0 ? void 0 : focusElement.textContent) === (focusElement === null || focusElement === void 0 || (_focusElement$parentN = focusElement.parentNode) === null || _focusElement$parentN === void 0 ? void 0 : _focusElement$parentN.textContent) && (anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.textContent) === (anchorElement === null || anchorElement === void 0 || (_anchorElement$parent = anchorElement.parentNode) === null || _anchorElement$parent === void 0 ? void 0 : _anchorElement$parent.textContent) && anchorOffset === 0 && focusOffset === (focusElement === null || focusElement === void 0 || (_focusElement$parentN2 = focusElement.parentNode) === null || _focusElement$parentN2 === void 0 || (_focusElement$parentN2 = _focusElement$parentN2.textContent) === null || _focusElement$parentN2 === void 0 ? void 0 : _focusElement$parentN2.length)) {
|
|
626
628
|
event.preventDefault();
|
|
627
629
|
var paragraphs = Array.from(this.textarea.children);
|
|
628
630
|
var _anchorParagraph = anchorElement.parentElement;
|
|
@@ -687,8 +689,8 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
687
689
|
boundary: (_this$containerRef$cu2 = this.containerRef.current) !== null && _this$containerRef$cu2 !== void 0 ? _this$containerRef$cu2 : void 0,
|
|
688
690
|
tether: false
|
|
689
691
|
}
|
|
690
|
-
}), function(
|
|
691
|
-
var popper =
|
|
692
|
+
}), function(_ref3) {
|
|
693
|
+
var popper = _ref3.popper, setTrigger = _ref3.setTrigger;
|
|
692
694
|
if (!_this6.popper) {
|
|
693
695
|
_this6.setPopperTrigger = setTrigger;
|
|
694
696
|
_this6.popper = popper;
|
|
@@ -759,7 +761,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
759
761
|
this.linesCountTimeout = window.setTimeout(function() {
|
|
760
762
|
var lines = 0;
|
|
761
763
|
var _this8$asProps = _this8.asProps, maxLines = _this8$asProps.maxLines, linesCount = _this8$asProps.linesCount;
|
|
762
|
-
_this8.textarea.childNodes.forEach(function(node
|
|
764
|
+
_this8.textarea.childNodes.forEach(function(node) {
|
|
763
765
|
if (node instanceof HTMLParagraphElement) {
|
|
764
766
|
node.dataset.overMaxRows = "false";
|
|
765
767
|
if (node.textContent !== _this8.getEmptyParagraph().textContent && node.textContent !== "") {
|
|
@@ -816,39 +818,39 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
816
818
|
}, {
|
|
817
819
|
key: "toggleErrorsPopper",
|
|
818
820
|
value: function toggleErrorsPopper(key, target, timer) {
|
|
819
|
-
var
|
|
821
|
+
var _this0 = this;
|
|
820
822
|
if (target instanceof HTMLDivElement || target instanceof HTMLParagraphElement) {
|
|
821
823
|
if (this.changeTriggerTimeout) {
|
|
822
824
|
clearTimeout(this.changeTriggerTimeout);
|
|
823
825
|
}
|
|
824
826
|
this.changeTriggerTimeout = window.setTimeout(function() {
|
|
825
|
-
var targetElement = target ===
|
|
827
|
+
var targetElement = target === _this0.textarea ? _this0.getNodeFromSelection() : target;
|
|
826
828
|
var lineIndex = -1;
|
|
827
829
|
var isInvalidRow = false;
|
|
828
830
|
if (targetElement instanceof HTMLParagraphElement) {
|
|
829
831
|
isInvalidRow = targetElement.getAttribute("aria-invalid") === "true";
|
|
830
|
-
lineIndex = Array.from(
|
|
831
|
-
} else if (targetElement ===
|
|
832
|
+
lineIndex = Array.from(_this0.textarea.childNodes).indexOf(targetElement);
|
|
833
|
+
} else if (targetElement === _this0.textarea) {
|
|
832
834
|
lineIndex = 0;
|
|
833
835
|
}
|
|
834
836
|
if (targetElement instanceof HTMLElement) {
|
|
835
|
-
|
|
837
|
+
_this0.setState(function(prevState) {
|
|
836
838
|
var newState = {
|
|
837
|
-
visibleErrorPopper:
|
|
839
|
+
visibleErrorPopper: _this0.isFocusing && Boolean(_this0.asProps.commonErrorMessage) ? true : isInvalidRow,
|
|
838
840
|
mouseLineIndex: prevState.mouseLineIndex,
|
|
839
841
|
keyboardLineIndex: prevState.keyboardLineIndex
|
|
840
842
|
};
|
|
841
|
-
if (
|
|
843
|
+
if (_this0.isFocusing || key === "mouseLineIndex" && isInvalidRow) {
|
|
842
844
|
newState[key] = lineIndex;
|
|
843
845
|
}
|
|
844
846
|
return newState;
|
|
845
847
|
}, function() {
|
|
846
|
-
|
|
847
|
-
var trigger = isInvalidRow ? targetElement :
|
|
848
|
-
if (
|
|
849
|
-
var
|
|
850
|
-
(
|
|
851
|
-
|
|
848
|
+
_this0.errorByInteraction = key === "mouseLineIndex" ? "mouse" : "keyboard";
|
|
849
|
+
var trigger = isInvalidRow ? targetElement : _this0.textarea;
|
|
850
|
+
if (_this0.shouldChangePopperTrigger(trigger)) {
|
|
851
|
+
var _this0$setPopperTrigg;
|
|
852
|
+
(_this0$setPopperTrigg = _this0.setPopperTrigger) === null || _this0$setPopperTrigg === void 0 || _this0$setPopperTrigg.call(_this0, trigger);
|
|
853
|
+
_this0.forceUpdate();
|
|
852
854
|
}
|
|
853
855
|
});
|
|
854
856
|
}
|
|
@@ -873,7 +875,7 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
873
875
|
}, {
|
|
874
876
|
key: "handleChangeErrorIndex",
|
|
875
877
|
value: function handleChangeErrorIndex(errorIndex) {
|
|
876
|
-
var _error$lineNode,
|
|
878
|
+
var _error$lineNode, _this1 = this;
|
|
877
879
|
var error = this.asProps.errors[errorIndex];
|
|
878
880
|
var childNodes = this.textarea.childNodes;
|
|
879
881
|
var node = error ? (_error$lineNode = error.lineNode) !== null && _error$lineNode !== void 0 ? _error$lineNode : childNodes.item(error.lineIndex) : null;
|
|
@@ -885,9 +887,9 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
885
887
|
setTimeout(function() {
|
|
886
888
|
var text = node.childNodes.item(0);
|
|
887
889
|
if (text instanceof Text) {
|
|
888
|
-
|
|
890
|
+
_this1.setSelection(text, 0, text.length);
|
|
889
891
|
} else {
|
|
890
|
-
|
|
892
|
+
_this1.setSelection(node, 0, 1);
|
|
891
893
|
}
|
|
892
894
|
}, 150);
|
|
893
895
|
}
|
|
@@ -918,8 +920,8 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
918
920
|
var range = document.createRange();
|
|
919
921
|
range.setStart(node, start);
|
|
920
922
|
range.setEnd(node, end);
|
|
921
|
-
selection === null || selection === void 0
|
|
922
|
-
selection === null || selection === void 0
|
|
923
|
+
selection === null || selection === void 0 || selection.removeAllRanges();
|
|
924
|
+
selection === null || selection === void 0 || selection.addRange(range);
|
|
923
925
|
var nodeToScroll = node instanceof Text ? node.parentNode : node;
|
|
924
926
|
if (nodeToScroll instanceof HTMLElement) {
|
|
925
927
|
nodeToScroll.scrollIntoView({
|
|
@@ -1061,7 +1063,6 @@ var InputField = /* @__PURE__ */ function(_Component) {
|
|
|
1061
1063
|
return null;
|
|
1062
1064
|
}
|
|
1063
1065
|
}]);
|
|
1064
|
-
return InputField2;
|
|
1065
1066
|
}(Component);
|
|
1066
1067
|
_defineProperty(InputField, "displayName", "Textarea");
|
|
1067
1068
|
_defineProperty(InputField, "style", style);
|
|
@@ -6,12 +6,12 @@ import it from "./it.json.mjs";
|
|
|
6
6
|
import ja from "./ja.json.mjs";
|
|
7
7
|
import ko from "./ko.json.mjs";
|
|
8
8
|
import nl from "./nl.json.mjs";
|
|
9
|
+
import pl from "./pl.json.mjs";
|
|
9
10
|
import pt from "./pt.json.mjs";
|
|
11
|
+
import sv from "./sv.json.mjs";
|
|
10
12
|
import tr from "./tr.json.mjs";
|
|
11
13
|
import vi from "./vi.json.mjs";
|
|
12
14
|
import zh from "./zh.json.mjs";
|
|
13
|
-
import pl from "./pl.json.mjs";
|
|
14
|
-
import sv from "./sv.json.mjs";
|
|
15
15
|
var localizedMessages = {
|
|
16
16
|
de,
|
|
17
17
|
en,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import type Button from '@semcore/button';
|
|
2
|
+
import type { Intergalactic } from '@semcore/core';
|
|
3
|
+
import type { BoxProps } from '@semcore/flex-box';
|
|
4
|
+
import type { CounterProps } from './components/Counter';
|
|
5
|
+
import type { ErrorsNavigationProps } from './components/ErrorsNavigation';
|
|
6
|
+
import type { InputFieldProps } from './components/InputField/InputField';
|
|
7
7
|
export type BulkTextareaProps<T extends string | string[]> = {
|
|
8
8
|
value?: InputFieldProps<T>['value'];
|
|
9
9
|
onChange?: InputFieldProps<T>['onBlur'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type IRootComponentProps } from '@semcore/core';
|
|
2
|
+
import type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
|
|
1
3
|
import React from 'react';
|
|
2
|
-
import { IRootComponentProps } from '@semcore/core';
|
|
3
|
-
import { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
|
|
4
4
|
export declare function ClearAll(props: IRootComponentProps & {
|
|
5
5
|
isHidden: boolean;
|
|
6
6
|
getI18nText: ReturnType<typeof useI18n>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { CounterProps as CounterPropsKit } from '@semcore/counter';
|
|
3
|
-
import
|
|
1
|
+
import type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
|
|
2
|
+
import { type CounterProps as CounterPropsKit } from '@semcore/counter';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
export type CounterProps = {
|
|
5
5
|
theme: CounterPropsKit['theme'];
|
|
6
6
|
linesCount: number;
|
|
7
7
|
maxLines: number;
|
|
8
8
|
getI18nText: ReturnType<typeof useI18n>;
|
|
9
9
|
};
|
|
10
|
-
export declare function Counter(props: CounterProps): JSX.Element;
|
|
10
|
+
export declare function Counter(props: CounterProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
|
|
3
3
|
export type ErrorsNavigationProps = {
|
|
4
4
|
errorIndex: number;
|
|
5
5
|
onPrevError: () => void;
|
|
@@ -12,4 +12,4 @@ export type ErrorsNavigationProps = {
|
|
|
12
12
|
nextButtonRef: React.RefObject<HTMLButtonElement>;
|
|
13
13
|
prevButtonRef: React.RefObject<HTMLButtonElement>;
|
|
14
14
|
};
|
|
15
|
-
export declare function ErrorsNavigation(props: ErrorsNavigationProps): JSX.Element;
|
|
15
|
+
export declare function ErrorsNavigation(props: ErrorsNavigationProps): React.JSX.Element;
|