@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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Component } from '@semcore/core';
|
|
3
|
-
import { PopperContext } from '@semcore/popper';
|
|
4
|
-
import
|
|
2
|
+
import type { PopperContext } from '@semcore/popper';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { InputFieldProps, ErrorItem } from './InputField.types';
|
|
5
5
|
type IndexKeys = 'keyboardLineIndex' | 'mouseLineIndex';
|
|
6
6
|
type State = {
|
|
7
7
|
[key in IndexKeys]: number;
|
|
@@ -14,7 +14,7 @@ declare class InputField<T extends string | string[]> extends Component<InputFie
|
|
|
14
14
|
[key: string]: string;
|
|
15
15
|
};
|
|
16
16
|
static enhance: readonly [(props: any) => {
|
|
17
|
-
uid:
|
|
17
|
+
uid: ReturnType<typeof import("@semcore/core/lib/utils/uniqueID").useUID>;
|
|
18
18
|
}];
|
|
19
19
|
static defaultProps: {
|
|
20
20
|
defaultValue: string;
|
|
@@ -66,10 +66,10 @@ declare class InputField<T extends string | string[]> extends Component<InputFie
|
|
|
66
66
|
handleScroll(): void;
|
|
67
67
|
handleMouseDown(event: MouseEvent): void;
|
|
68
68
|
handleMouseMove(event: MouseEvent): void;
|
|
69
|
-
handleMouseLeave(
|
|
69
|
+
handleMouseLeave(): void;
|
|
70
70
|
handlePaste(event: ClipboardEvent): void;
|
|
71
71
|
handleChange(event: Event): void;
|
|
72
|
-
handleFocus(
|
|
72
|
+
handleFocus(): void;
|
|
73
73
|
handleBlur(event: Event): void;
|
|
74
74
|
handleKeyDown(event: KeyboardEvent): void;
|
|
75
75
|
render(): React.ReactNode;
|
|
@@ -21,58 +21,58 @@ export type InputFieldProps<T extends string | string[]> = {
|
|
|
21
21
|
/**
|
|
22
22
|
* Unique id
|
|
23
23
|
*/
|
|
24
|
-
id?: string;
|
|
24
|
+
'id'?: string;
|
|
25
25
|
/**
|
|
26
26
|
* Placeholder for field
|
|
27
27
|
*/
|
|
28
|
-
placeholder?: string;
|
|
28
|
+
'placeholder'?: string;
|
|
29
29
|
/**
|
|
30
30
|
* String to render in textarea. OnChanging value, it will go throw paste pipeline
|
|
31
31
|
*/
|
|
32
|
-
value: T;
|
|
32
|
+
'value': T;
|
|
33
33
|
/**
|
|
34
34
|
* This component doesn't have default onChange callback, because we think that you need only the result after every changes/fixes
|
|
35
35
|
*/
|
|
36
|
-
onBlur: (value: T, e: Event) => void;
|
|
36
|
+
'onBlur': (value: T, e: Event) => void;
|
|
37
37
|
/**
|
|
38
38
|
* Size of component
|
|
39
39
|
* @default m
|
|
40
40
|
*/
|
|
41
|
-
size: 'm' | 'l';
|
|
41
|
+
'size': 'm' | 'l';
|
|
42
42
|
/**
|
|
43
43
|
* State for show errors or valid(green) borders
|
|
44
44
|
* @default normal
|
|
45
45
|
*/
|
|
46
|
-
state: 'normal' | 'valid' | 'invalid';
|
|
46
|
+
'state': 'normal' | 'valid' | 'invalid';
|
|
47
47
|
/**
|
|
48
48
|
* Flag for disabling field
|
|
49
49
|
* @default false
|
|
50
50
|
*/
|
|
51
|
-
disabled?: boolean;
|
|
51
|
+
'disabled'?: boolean;
|
|
52
52
|
/**
|
|
53
53
|
* Flag for readonly field
|
|
54
54
|
* @default false
|
|
55
55
|
*/
|
|
56
|
-
readonly?: boolean;
|
|
56
|
+
'readonly'?: boolean;
|
|
57
57
|
/**
|
|
58
58
|
* Min rows
|
|
59
59
|
* @default 2
|
|
60
60
|
*/
|
|
61
|
-
minRows: number;
|
|
61
|
+
'minRows': number;
|
|
62
62
|
/**
|
|
63
63
|
* Max rows
|
|
64
64
|
* @default 10
|
|
65
65
|
*/
|
|
66
|
-
maxRows: number;
|
|
66
|
+
'maxRows': number;
|
|
67
67
|
/**
|
|
68
68
|
* List of available points to validate value
|
|
69
69
|
* @default blur
|
|
70
70
|
*/
|
|
71
|
-
validateOn: ('blur' | 'blurLine' | 'paste')[];
|
|
71
|
+
'validateOn': ('blur' | 'blurLine' | 'paste')[];
|
|
72
72
|
/**
|
|
73
73
|
* Function to validate line
|
|
74
74
|
*/
|
|
75
|
-
lineValidation?: (line: string, lines: string[]) => {
|
|
75
|
+
'lineValidation'?: (line: string, lines: string[]) => {
|
|
76
76
|
isValid: boolean;
|
|
77
77
|
errorMessage: string;
|
|
78
78
|
};
|
|
@@ -80,76 +80,76 @@ export type InputFieldProps<T extends string | string[]> = {
|
|
|
80
80
|
* Message for display error about whole field, not only one line.
|
|
81
81
|
* If set empty string, field will not have invalid state.
|
|
82
82
|
*/
|
|
83
|
-
commonErrorMessage: string;
|
|
83
|
+
'commonErrorMessage': string;
|
|
84
84
|
/**
|
|
85
85
|
* Delimiters (event.key) for lines
|
|
86
86
|
* @default Enter
|
|
87
87
|
*/
|
|
88
|
-
linesDelimiters?: string[];
|
|
88
|
+
'linesDelimiters'?: string[];
|
|
89
89
|
/**
|
|
90
90
|
* Count of max lines in badge
|
|
91
91
|
* @default 100
|
|
92
92
|
*/
|
|
93
|
-
maxLines: number;
|
|
93
|
+
'maxLines': number;
|
|
94
94
|
/**
|
|
95
95
|
* Paste props
|
|
96
96
|
*/
|
|
97
|
-
pasteProps: PasteProps;
|
|
97
|
+
'pasteProps': PasteProps;
|
|
98
98
|
/**
|
|
99
99
|
* Function for process line after it was blurred
|
|
100
100
|
*/
|
|
101
|
-
lineProcessing?: (line: string, lines: string[]) => string;
|
|
101
|
+
'lineProcessing'?: (line: string, lines: string[]) => string;
|
|
102
102
|
/**
|
|
103
103
|
* Internal
|
|
104
104
|
*/
|
|
105
|
-
prevError: ErrorItem;
|
|
105
|
+
'prevError': ErrorItem;
|
|
106
106
|
/**
|
|
107
107
|
* Internal
|
|
108
108
|
*/
|
|
109
|
-
currentLineIndex: number;
|
|
109
|
+
'currentLineIndex': number;
|
|
110
110
|
/**
|
|
111
111
|
* Internal
|
|
112
112
|
*/
|
|
113
|
-
linesCount: number;
|
|
113
|
+
'linesCount': number;
|
|
114
114
|
/**
|
|
115
115
|
* Internal
|
|
116
116
|
*/
|
|
117
|
-
onChangeLineIndex: (newIndex: number) => void;
|
|
117
|
+
'onChangeLineIndex': (newIndex: number) => void;
|
|
118
118
|
/**
|
|
119
119
|
* Internal
|
|
120
120
|
*/
|
|
121
|
-
onChangeLinesCount: (rowsCount: number) => void;
|
|
121
|
+
'onChangeLinesCount': (rowsCount: number) => void;
|
|
122
122
|
/**
|
|
123
123
|
* Internal
|
|
124
124
|
*/
|
|
125
|
-
showErrors: boolean;
|
|
125
|
+
'showErrors': boolean;
|
|
126
126
|
/**
|
|
127
127
|
* Internal
|
|
128
128
|
* List of errors in rows
|
|
129
129
|
*/
|
|
130
|
-
errors: ErrorItem[];
|
|
130
|
+
'errors': ErrorItem[];
|
|
131
131
|
/**
|
|
132
132
|
* Internal
|
|
133
133
|
* Select row with error
|
|
134
134
|
*/
|
|
135
|
-
errorIndex: number;
|
|
135
|
+
'errorIndex': number;
|
|
136
136
|
/**
|
|
137
137
|
* Internal
|
|
138
138
|
* Flag for select all row
|
|
139
139
|
*/
|
|
140
|
-
highlightErrorIndex: boolean;
|
|
140
|
+
'highlightErrorIndex': boolean;
|
|
141
141
|
/**
|
|
142
142
|
* Internal
|
|
143
143
|
*/
|
|
144
|
-
onErrorsChange: (errors: ErrorItem[]) => void;
|
|
144
|
+
'onErrorsChange': (errors: ErrorItem[]) => void;
|
|
145
145
|
/**
|
|
146
146
|
* Internal
|
|
147
147
|
*/
|
|
148
|
-
onShowErrorsChange: (showErrors: boolean) => void;
|
|
148
|
+
'onShowErrorsChange': (showErrors: boolean) => void;
|
|
149
149
|
/**
|
|
150
150
|
* Internal
|
|
151
151
|
*/
|
|
152
|
-
onErrorIndexChange: (errorIndex: number) => void;
|
|
152
|
+
'onErrorIndexChange': (errorIndex: number) => void;
|
|
153
153
|
/**
|
|
154
154
|
* Internal
|
|
155
155
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/bulk-textarea",
|
|
3
3
|
"description": "Semrush BulkTextarea Component",
|
|
4
|
-
"version": "16.2.
|
|
4
|
+
"version": "16.2.1-prerelease.1",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/flex-box": "16.0.
|
|
18
|
-
"@semcore/button": "16.0.
|
|
19
|
-
"@semcore/typography": "16.1.
|
|
20
|
-
"@semcore/counter": "16.0.
|
|
21
|
-
"@semcore/icon": "16.2.
|
|
22
|
-
"@semcore/popper": "16.0.
|
|
23
|
-
"@semcore/tooltip": "16.0.
|
|
17
|
+
"@semcore/flex-box": "16.0.2-prerelease.1",
|
|
18
|
+
"@semcore/button": "16.0.2-prerelease.1",
|
|
19
|
+
"@semcore/typography": "16.1.2-prerelease.1",
|
|
20
|
+
"@semcore/counter": "16.0.2-prerelease.1",
|
|
21
|
+
"@semcore/icon": "16.2.1-prerelease.1",
|
|
22
|
+
"@semcore/popper": "16.0.2-prerelease.1",
|
|
23
|
+
"@semcore/tooltip": "16.0.2-prerelease.1",
|
|
24
24
|
"dompurify": "3.2.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@semcore/base-components": "^16.0.
|
|
27
|
+
"@semcore/base-components": "^16.0.2-prerelease.1"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"directory": "semcore/bulk-textarea"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@types/react": "18.0.21",
|
|
36
35
|
"@types/dompurify": "3.2.0",
|
|
36
|
+
"@semcore/core": "16.0.0",
|
|
37
37
|
"@semcore/testing-utils": "1.0.0"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|