@semcore/bulk-textarea 17.2.1 → 17.2.2-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 +12 -0
- package/lib/cjs/BulkTextarea.js +18 -12
- package/lib/cjs/BulkTextarea.js.map +1 -1
- package/lib/cjs/BulkTextarea.types.js.map +1 -1
- package/lib/cjs/components/ClearAll.js.map +1 -1
- package/lib/cjs/components/Counter.js.map +1 -1
- package/lib/cjs/components/ErrorsNavigation.js +5 -2
- package/lib/cjs/components/ErrorsNavigation.js.map +1 -1
- package/lib/cjs/components/InputField/History.js +46 -0
- package/lib/cjs/components/InputField/History.js.map +1 -0
- package/lib/cjs/components/InputField/InputField.js +494 -361
- package/lib/cjs/components/InputField/InputField.js.map +1 -1
- package/lib/cjs/components/InputField/inputField.shadow.css +42 -51
- package/lib/cjs/index.js.map +1 -1
- package/lib/es6/BulkTextarea.js +18 -12
- package/lib/es6/BulkTextarea.js.map +1 -1
- package/lib/es6/BulkTextarea.types.js.map +1 -1
- package/lib/es6/components/ClearAll.js.map +1 -1
- package/lib/es6/components/Counter.js.map +1 -1
- package/lib/es6/components/ErrorsNavigation.js +5 -2
- package/lib/es6/components/ErrorsNavigation.js.map +1 -1
- package/lib/es6/components/InputField/History.js +38 -0
- package/lib/es6/components/InputField/History.js.map +1 -0
- package/lib/es6/components/InputField/InputField.js +494 -361
- package/lib/es6/components/InputField/InputField.js.map +1 -1
- package/lib/es6/components/InputField/inputField.shadow.css +42 -51
- package/lib/es6/index.js.map +1 -1
- package/lib/esm/BulkTextarea.mjs +12 -5
- package/lib/esm/components/ErrorsNavigation.mjs +5 -2
- package/lib/esm/components/InputField/History.mjs +40 -0
- package/lib/esm/components/InputField/InputField.mjs +481 -358
- package/lib/esm/components/InputField/inputField.shadow.css +42 -51
- package/lib/types/BulkTextarea.d.ts +108 -2
- package/lib/types/BulkTextarea.types.d.ts +245 -147
- package/lib/types/components/ClearAll.d.ts +4 -6
- package/lib/types/components/Counter.d.ts +4 -9
- package/lib/types/components/ErrorsNavigation.d.ts +4 -14
- package/lib/types/components/InputField/History.d.ts +20 -0
- package/lib/types/components/InputField/InputField.d.ts +30 -24
- package/lib/types/index.d.ts +1 -2
- package/package.json +3 -3
- package/lib/cjs/components/InputField/InputField.types.js +0 -2
- package/lib/cjs/components/InputField/InputField.types.js.map +0 -1
- package/lib/es6/components/InputField/InputField.types.js +0 -2
- package/lib/es6/components/InputField/InputField.types.js.map +0 -1
- package/lib/types/components/InputField/InputField.types.d.ts +0 -44
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { BulkTextareaInputFieldProps } from '../../BulkTextarea.types';
|
|
2
|
-
export type PasteProps = {
|
|
3
|
-
/**
|
|
4
|
-
* @default '\n'
|
|
5
|
-
*/
|
|
6
|
-
delimiter?: string | RegExp;
|
|
7
|
-
/**
|
|
8
|
-
* @default row.trim();
|
|
9
|
-
*/
|
|
10
|
-
lineProcessing?: (line: string, lineIndex: number, totalLinesCount: number) => string;
|
|
11
|
-
/**
|
|
12
|
-
* @default true
|
|
13
|
-
*/
|
|
14
|
-
skipEmptyLines?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export type ErrorItem = {
|
|
17
|
-
lineIndex: number;
|
|
18
|
-
lineNode?: Node;
|
|
19
|
-
errorMessage: string;
|
|
20
|
-
};
|
|
21
|
-
export type InputFieldProps<T extends string | string[]> = BulkTextareaInputFieldProps<T> & Required<Pick<BulkTextareaInputFieldProps<T>, 'value' | 'onBlur' | 'size' | 'state' | 'minRows' | 'maxRows' | 'validateOn' | 'maxLines' | 'pasteProps'>> & {
|
|
22
|
-
prevError: ErrorItem;
|
|
23
|
-
currentLineIndex: number;
|
|
24
|
-
linesCount: number;
|
|
25
|
-
onChangeLineIndex: (newIndex: number) => void;
|
|
26
|
-
onChangeLinesCount: (rowsCount: number) => void;
|
|
27
|
-
showErrors: boolean;
|
|
28
|
-
/** List of errors in rows */
|
|
29
|
-
errors: ErrorItem[];
|
|
30
|
-
/** Select row with error */
|
|
31
|
-
errorIndex: number;
|
|
32
|
-
/** Flag for select all row */
|
|
33
|
-
highlightErrorIndex: boolean;
|
|
34
|
-
onErrorsChange: (errors: ErrorItem[]) => void;
|
|
35
|
-
onShowErrorsChange: (showErrors: boolean) => void;
|
|
36
|
-
onErrorIndexChange: (errorIndex: number) => void;
|
|
37
|
-
/**
|
|
38
|
-
* Return lines from textarea immediately they changed (uses mutation observer on textarea node under the hood)
|
|
39
|
-
* Throttling may be required during processing this cb
|
|
40
|
-
*/
|
|
41
|
-
onImmediatelyChange?: (lines: string[], value: string) => void;
|
|
42
|
-
} & {
|
|
43
|
-
'aria-describedby'?: string;
|
|
44
|
-
};
|