react-input-material 0.0.352 → 0.0.356
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/components/Dummy.d.ts +9 -5
- package/components/Dummy.tsx +11 -6
- package/components/FileInput.d.ts +3 -2
- package/components/FileInput.js +1 -1
- package/components/FileInput.module.css +12 -24
- package/components/FileInput.styles.css +3 -3
- package/components/FileInput.tsx +239 -203
- package/components/GenericAnimate.d.ts +3 -0
- package/components/GenericAnimate.module.css +0 -1
- package/components/GenericAnimate.tsx +17 -10
- package/components/GenericInput.d.ts +26 -2
- package/components/GenericInput.js +1 -1
- package/components/GenericInput.module.css +32 -45
- package/components/GenericInput.styles.css +1 -1
- package/components/GenericInput.tsx +471 -348
- package/components/Inputs.d.ts +3 -3
- package/components/Inputs.js +1 -1
- package/components/Inputs.module.css +10 -9
- package/components/Inputs.styles.css +2 -2
- package/components/Inputs.tsx +20 -21
- package/components/Interval.d.ts +4 -6
- package/components/Interval.js +1 -1
- package/components/Interval.module.css +16 -15
- package/components/Interval.styles.css +2 -2
- package/components/Interval.tsx +7 -13
- package/components/RequireableCheckbox.d.ts +10 -3
- package/components/RequireableCheckbox.js +1 -1
- package/components/RequireableCheckbox.module.css +4 -4
- package/components/RequireableCheckbox.styles.css +1 -1
- package/components/RequireableCheckbox.tsx +66 -51
- package/components/WrapConfigurations.d.ts +13 -0
- package/components/WrapConfigurations.tsx +17 -5
- package/components/WrapStrict.d.ts +6 -0
- package/components/WrapStrict.tsx +7 -0
- package/components/WrapThemeProvider.d.ts +7 -5
- package/components/WrapThemeProvider.tsx +8 -5
- package/components/WrapTooltip.d.ts +4 -2
- package/components/WrapTooltip.tsx +14 -6
- package/helper.d.ts +39 -9
- package/helper.js +1 -1
- package/index.js +1 -1
- package/index.styles.css +10 -10
- package/package.json +36 -28
- package/readme.md +38 -2
- package/type.d.ts +42 -42
package/package.json
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-input-material",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"license": "CC-BY-3.0",
|
|
3
|
+
"version": "0.0.356",
|
|
5
4
|
"description": "Reusable material design based input field with support for (richt-)text, code, selections, numbers, dates and so on.",
|
|
6
|
-
"homepage": "https://torben.website/react-input-material",
|
|
7
|
-
"documentationWebsite": {
|
|
8
|
-
"languages": [
|
|
9
|
-
"deDE",
|
|
10
|
-
"enUS"
|
|
11
|
-
],
|
|
12
|
-
"tagline": "Do not refactor input fields anymore.<!--deDE:Nie wieder Eingabefelder anpassen.-->",
|
|
13
|
-
"trackingCode": "TODO"
|
|
14
|
-
},
|
|
15
5
|
"keywords": [
|
|
16
6
|
"form-field",
|
|
17
7
|
"input",
|
|
@@ -19,6 +9,17 @@
|
|
|
19
9
|
"rich-text",
|
|
20
10
|
"text"
|
|
21
11
|
],
|
|
12
|
+
"homepage": "https://torben.website/react-input-material",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"email": "info@torben.website",
|
|
15
|
+
"url": "https://github.com/thaibault/react-input-material/issues"
|
|
16
|
+
},
|
|
17
|
+
"license": "CC-BY-3.0",
|
|
18
|
+
"author": {
|
|
19
|
+
"name": "Torben Sickert",
|
|
20
|
+
"email": "info@torben.website",
|
|
21
|
+
"url": "https://torben.website"
|
|
22
|
+
},
|
|
22
23
|
"files": [
|
|
23
24
|
"components",
|
|
24
25
|
"helper.d.ts",
|
|
@@ -46,22 +47,26 @@
|
|
|
46
47
|
"clear": "weboptimizer clear && (rm *.styles.css components/*.styles.css 2>/dev/null || true)",
|
|
47
48
|
"document": "weboptimizer document",
|
|
48
49
|
"lint": "weboptimizer lint",
|
|
49
|
-
"prepare": "yarn build",
|
|
50
|
+
"prepare": "ln --force --symbolic react node_modules/@emotion/core && yarn build",
|
|
50
51
|
"serve": "weboptimizer serve",
|
|
51
52
|
"serve:minimal": "weboptimizer serve '{__reference__: \"target:minimal\"}'",
|
|
52
53
|
"start": "yarn serve",
|
|
53
54
|
"test": "weboptimizer test",
|
|
54
|
-
"test:browser": "weboptimizer test:browser",
|
|
55
|
-
"test:coverage": "weboptimizer test:coverage",
|
|
56
|
-
"test:coverage:report": "weboptimizer test:coverage:report",
|
|
55
|
+
"test:browser": "yarn clear; weboptimizer test:browser",
|
|
56
|
+
"test:coverage": "yarn clear; weboptimizer test:coverage",
|
|
57
|
+
"test:coverage:report": "yarn clear; weboptimizer test:coverage:report",
|
|
57
58
|
"update": "yarn version --patch && yarn publish",
|
|
58
59
|
"update:documentation": "documentationWebsite --log-level info",
|
|
59
60
|
"watch": "weboptimizer build --watch"
|
|
60
61
|
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz"
|
|
64
|
+
},
|
|
61
65
|
"devDependencies": {
|
|
62
66
|
"@babel/eslint-parser": "*",
|
|
63
67
|
"@babel/plugin-transform-proto-to-assign": "*",
|
|
64
68
|
"@babel/preset-react": "*",
|
|
69
|
+
"@emotion/react": "^11.7.1",
|
|
65
70
|
"@rmwc/card": "*",
|
|
66
71
|
"@rmwc/checkbox": "*",
|
|
67
72
|
"@rmwc/circular-progress": "*",
|
|
@@ -85,6 +90,7 @@
|
|
|
85
90
|
"@types/react": "*",
|
|
86
91
|
"@types/react-dom": "*",
|
|
87
92
|
"@types/react-transition-group": "*",
|
|
93
|
+
"@types/webpack-env": "*",
|
|
88
94
|
"@types/workbox-webpack-plugin": "*",
|
|
89
95
|
"@typescript-eslint/eslint-plugin": "*",
|
|
90
96
|
"@typescript-eslint/parser": "*",
|
|
@@ -103,6 +109,7 @@
|
|
|
103
109
|
"material-icons": "*",
|
|
104
110
|
"mini-css-extract-plugin": "*",
|
|
105
111
|
"object-visit": "^1.0.1",
|
|
112
|
+
"postcss": "*",
|
|
106
113
|
"postcss-import": "<=12",
|
|
107
114
|
"postcss-loader": "*",
|
|
108
115
|
"postcss-preset-env": "*",
|
|
@@ -221,10 +228,23 @@
|
|
|
221
228
|
"optional": true
|
|
222
229
|
}
|
|
223
230
|
},
|
|
231
|
+
"engines": {
|
|
232
|
+
"node": ">=17",
|
|
233
|
+
"npm": ">=7"
|
|
234
|
+
},
|
|
224
235
|
"resolutions": {
|
|
236
|
+
"@emotion/core": "@emotion/react",
|
|
225
237
|
"@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz"
|
|
226
238
|
},
|
|
227
239
|
"sideEffects": false,
|
|
240
|
+
"documentationWebsite": {
|
|
241
|
+
"languages": [
|
|
242
|
+
"deDE",
|
|
243
|
+
"enUS"
|
|
244
|
+
],
|
|
245
|
+
"tagline": "Do not refactor input fields anymore.<!--deDE:Nie wieder Eingabefelder anpassen.-->",
|
|
246
|
+
"trackingCode": "TODO"
|
|
247
|
+
},
|
|
228
248
|
"webOptimizer": {
|
|
229
249
|
"commandLine": {
|
|
230
250
|
"test": {
|
|
@@ -249,22 +269,13 @@
|
|
|
249
269
|
},
|
|
250
270
|
"injection": {
|
|
251
271
|
"entry": {
|
|
252
|
-
"__evaluate__": "2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2] === 'serve' ? ['./index.css', './playground'] : 2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2]
|
|
272
|
+
"__evaluate__": "2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2] === 'serve' ? ['./index.css', './playground'] : 2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2].startsWith('test') ? {testBundle: './test'} : {'./components/Dummy': './components/Dummy', './components/FileInput': './components/FileInput', './components/GenericAnimate': './components/GenericAnimate', './components/GenericInput': './components/GenericInput', './components/Inputs': './components/Inputs', './components/Interval': './components/Interval', './components/RequireableCheckbox': './components/RequireableCheckbox', './components/WrapConfigurations': './components/WrapConfigurations', './components/WrapThemeProvider': './components/WrapThemeProvider', './components/WrapTooltip': './components/WrapTooltip', helper: './helper', index: ['./index.css', './index.tsx'], testHelper: './testHelper'}"
|
|
253
273
|
}
|
|
254
274
|
},
|
|
255
275
|
"module": {
|
|
256
276
|
"cascadingStyleSheet": {
|
|
257
277
|
"exclude": false,
|
|
258
278
|
"options": {
|
|
259
|
-
"esModule": false,
|
|
260
|
-
"modules": {
|
|
261
|
-
"namedExport": false,
|
|
262
|
-
"localIdentName": "[local]",
|
|
263
|
-
"getLocalIdent": {
|
|
264
|
-
"__evaluate__": "(context, localIdentName, localName, options) => options.namedExport ? `${localName}ClassName` : localName"
|
|
265
|
-
},
|
|
266
|
-
"mode": "local"
|
|
267
|
-
},
|
|
268
279
|
"import": {
|
|
269
280
|
"filter": {
|
|
270
281
|
"__evaluate__": "(url) => console.log('AAA', url) || !url.includes('.css')"
|
|
@@ -328,8 +339,5 @@
|
|
|
328
339
|
}
|
|
329
340
|
}
|
|
330
341
|
}
|
|
331
|
-
},
|
|
332
|
-
"dependencies": {
|
|
333
|
-
"@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz"
|
|
334
342
|
}
|
|
335
343
|
}
|
package/readme.md
CHANGED
|
@@ -1,2 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
<!-- !/usr/bin/env markdown
|
|
2
|
+
-*- coding: utf-8 -*-
|
|
3
|
+
region header
|
|
4
|
+
Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
|
|
5
|
+
|
|
6
|
+
License
|
|
7
|
+
-------
|
|
8
|
+
|
|
9
|
+
This library written by Torben Sickert stand under a creative commons naming
|
|
10
|
+
3.0 unported license. See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
11
|
+
endregion -->
|
|
12
|
+
|
|
13
|
+
Project status
|
|
14
|
+
--------------
|
|
15
|
+
|
|
16
|
+
[](https://www.npmjs.com/package/react-input-material)
|
|
17
|
+
[](https://www.npmjs.com/package/react-input-material)
|
|
18
|
+
|
|
19
|
+
[](https://github.com/thaibault/react-input-material/actions/workflows/build.yaml)
|
|
20
|
+
[](https://github.com/thaibault/react-input-material/actions/workflows/test.yaml)
|
|
21
|
+
[](https://github.com/thaibault/react-input-material/actions/workflows/test:coverage:report.yaml)
|
|
22
|
+
[](https://github.com/thaibault/react-input-material/actions/workflows/check:types.yaml)
|
|
23
|
+
[](https://github.com/thaibault/react-input-material/actions/workflows/lint.yaml)
|
|
24
|
+
|
|
25
|
+
[](https://coveralls.io/github/thaibault/react-input-material)
|
|
26
|
+
|
|
27
|
+
<!-- Too unstable yet
|
|
28
|
+
[](https://david-dm.org/thaibault/react-input-material)
|
|
29
|
+
[](https://david-dm.org/thaibault/react-input-material?type=dev)
|
|
30
|
+
[](https://david-dm.org/thaibault/react-input-material?type=peer)
|
|
31
|
+
-->
|
|
32
|
+
[](https://torben.website/react-input-material)
|
|
33
|
+
|
|
34
|
+
Use case
|
|
35
|
+
--------
|
|
36
|
+
|
|
37
|
+
Reusable material design based input field with support for (richt-)text, code,
|
|
38
|
+
selections, numbers, dates and so on.
|
package/type.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface GenericEvent<T = unknown> extends SyntheticEvent {
|
|
|
19
19
|
}
|
|
20
20
|
export interface TestEnvironment {
|
|
21
21
|
container: HTMLDivElement | null;
|
|
22
|
-
render: (
|
|
22
|
+
render: (_component: ReactElement) => ChildNode | null;
|
|
23
23
|
}
|
|
24
24
|
export interface CursorState {
|
|
25
25
|
end: number;
|
|
@@ -98,14 +98,14 @@ export declare type DefaultBaseProperties = Omit<BaseProps, 'model'> & {
|
|
|
98
98
|
export interface TypedProperties<T = unknown> extends BaseProperties {
|
|
99
99
|
initialValue: null | T;
|
|
100
100
|
model: Model<T>;
|
|
101
|
-
onBlur: (
|
|
102
|
-
onChange: (
|
|
103
|
-
onChangeShowDeclaration: (
|
|
104
|
-
onChangeState: (
|
|
105
|
-
onChangeValue: (
|
|
106
|
-
onClick: (
|
|
107
|
-
onFocus: (
|
|
108
|
-
onTouch: (
|
|
101
|
+
onBlur: (_event: GenericEvent | undefined, _properties: this) => void;
|
|
102
|
+
onChange: (_properties: this, _event?: GenericEvent) => void;
|
|
103
|
+
onChangeShowDeclaration: (_show: boolean, _event: GenericEvent | undefined, _properties: this) => void;
|
|
104
|
+
onChangeState: (_state: ModelState, _event: GenericEvent | undefined, _properties: this) => void;
|
|
105
|
+
onChangeValue: (_value: null | T, _event: GenericEvent | undefined, _properties: this) => void;
|
|
106
|
+
onClick: (_event: MouseEvent, _properties: this) => void;
|
|
107
|
+
onFocus: (_event: FocusEvent, _properties: this) => void;
|
|
108
|
+
onTouch: (_event: GenericEvent, _properties: this) => void;
|
|
109
109
|
}
|
|
110
110
|
export declare type Properties<T = unknown> = TypedProperties<T> & CommonModel<T>;
|
|
111
111
|
export declare type Props<T = unknown> = Partial<Omit<Properties<T>, 'model'>> & {
|
|
@@ -134,11 +134,11 @@ export interface StaticWebComponent<MS = ModelState, DP = DefaultProperties> ext
|
|
|
134
134
|
export declare type StaticComponent<P = Props, MS = ModelState, DP = DefaultProperties> = Omit<ComponentClass<P>, 'propTypes'> & StaticWebComponent<MS, DP>;
|
|
135
135
|
export declare type StaticFunctionComponent<P = Props, MS = ModelState, DP = DefaultProperties> = Omit<FunctionComponent<P>, 'propTypes'> & StaticComponent<P, MS, DP>;
|
|
136
136
|
export interface InputComponent<P = Props, MS = ModelState, DP = DefaultProperties, A = ComponentAdapter<P>> extends Omit<ForwardRefExoticComponent<P>, 'propTypes'>, StaticWebComponent<MS, DP> {
|
|
137
|
-
(
|
|
137
|
+
(_props: P & RefAttributes<A>): ReactElement;
|
|
138
138
|
}
|
|
139
139
|
export declare const baseModelPropertyTypes: Mapping<ValueOf<typeof PropertyTypes>>;
|
|
140
140
|
export declare const modelStatePropertyTypes: {
|
|
141
|
-
[
|
|
141
|
+
[_key in keyof ModelState]: Requireable<boolean | symbol>;
|
|
142
142
|
};
|
|
143
143
|
export declare const modelPropertyTypes: Mapping<ValueOf<typeof PropertyTypes>>;
|
|
144
144
|
export declare const propertyTypes: Mapping<ValueOf<typeof PropertyTypes>>;
|
|
@@ -166,14 +166,14 @@ export declare const defaultCheckboxModel: CheckboxModel;
|
|
|
166
166
|
export declare const defaultCheckboxProperties: DefaultCheckboxProperties;
|
|
167
167
|
export interface FormatSpecification<T = unknown> {
|
|
168
168
|
options?: PlainObject;
|
|
169
|
-
transform?: (
|
|
169
|
+
transform?: (_value: T, _configuration: DefaultInputProperties<T>, _transformer: InputDataTransformation) => string;
|
|
170
170
|
}
|
|
171
171
|
export interface DataTransformSpecification<T = unknown, InputType = number | string> {
|
|
172
172
|
format?: {
|
|
173
173
|
final: FormatSpecification<T>;
|
|
174
174
|
intermediate?: FormatSpecification<T>;
|
|
175
175
|
};
|
|
176
|
-
parse?: (
|
|
176
|
+
parse?: (_value: InputType, _configuration: DefaultInputProperties<T>, _transformer: InputDataTransformation) => T;
|
|
177
177
|
type?: NativeInputType;
|
|
178
178
|
}
|
|
179
179
|
export declare type InputDataTransformation = {
|
|
@@ -187,7 +187,7 @@ export declare type InputDataTransformation = {
|
|
|
187
187
|
number: DataTransformSpecification<number, number>;
|
|
188
188
|
string?: DataTransformSpecification<unknown>;
|
|
189
189
|
} & {
|
|
190
|
-
[
|
|
190
|
+
[_key in Exclude<NativeInputType, 'date' | 'datetime-local' | 'time' | 'number'>]?: DataTransformSpecification<unknown>;
|
|
191
191
|
};
|
|
192
192
|
export interface InputTablePosition {
|
|
193
193
|
column: number;
|
|
@@ -207,14 +207,14 @@ export interface InputModel<T = unknown> extends Model<T> {
|
|
|
207
207
|
export interface InputValueState<T = unknown, MS = ModelState> extends ValueState<T, MS> {
|
|
208
208
|
representation?: string;
|
|
209
209
|
}
|
|
210
|
-
export declare type NativeInputType = 'date' | 'datetime-local' | 'month' | 'number' | 'range' | 'text' | 'time' | 'week';
|
|
211
|
-
export declare type GenericInputType = 'boolean' | 'currency' | 'float' | 'integer' | 'string' | NativeInputType;
|
|
210
|
+
export declare type NativeInputType = ('date' | 'datetime-local' | 'month' | 'number' | 'range' | 'text' | 'time' | 'week');
|
|
211
|
+
export declare type GenericInputType = ('boolean' | 'currency' | 'float' | 'integer' | 'string' | NativeInputType);
|
|
212
212
|
export interface InputChildrenOptions<P, T> {
|
|
213
213
|
index: number;
|
|
214
|
-
normalizedSelection: SelectProps['options'] | Array<{
|
|
214
|
+
normalizedSelection: (SelectProps['options'] | Array<{
|
|
215
215
|
label?: string;
|
|
216
216
|
value: unknown;
|
|
217
|
-
}
|
|
217
|
+
}>);
|
|
218
218
|
properties: P;
|
|
219
219
|
query: string;
|
|
220
220
|
suggestion: string;
|
|
@@ -227,9 +227,9 @@ export interface SuggestionCreatorOptions<P> {
|
|
|
227
227
|
}
|
|
228
228
|
export interface InputProperties<T = unknown> extends InputModelState, Properties<T> {
|
|
229
229
|
align: 'end' | 'start';
|
|
230
|
-
children: (
|
|
230
|
+
children: (_options: InputChildrenOptions<this, T>) => null | ReactElement;
|
|
231
231
|
cursor: CursorState;
|
|
232
|
-
editor: 'code' | 'code(css)' | 'code(script)' | 'plain' | 'text' | 'richtext(raw)' | 'richtext(simple)' | 'richtext(normal)' | 'richtext(advanced)';
|
|
232
|
+
editor: ('code' | 'code(css)' | 'code(script)' | 'plain' | 'text' | 'richtext(raw)' | 'richtext(simple)' | 'richtext(normal)' | 'richtext(advanced)');
|
|
233
233
|
editorIsActive: boolean;
|
|
234
234
|
fullWidth: boolean;
|
|
235
235
|
hidden: boolean;
|
|
@@ -243,11 +243,11 @@ export interface InputProperties<T = unknown> extends InputModelState, Propertie
|
|
|
243
243
|
minimumLengthText: string;
|
|
244
244
|
minimumText: string;
|
|
245
245
|
model: InputModel<T>;
|
|
246
|
-
onChangeEditorIsActive: (
|
|
247
|
-
onKeyDown: (
|
|
248
|
-
onKeyUp: (
|
|
249
|
-
onSelect: (
|
|
250
|
-
onSelectionChange: (
|
|
246
|
+
onChangeEditorIsActive: (_isActive: boolean, _event: MouseEvent | undefined, _properties: this) => void;
|
|
247
|
+
onKeyDown: (_event: KeyboardEvent, _properties: this) => void;
|
|
248
|
+
onKeyUp: (_event: KeyboardEvent, _properties: this) => void;
|
|
249
|
+
onSelect: (_event: GenericEvent, _properties: this) => void;
|
|
250
|
+
onSelectionChange: (_event: GenericEvent, _properties: this) => void;
|
|
251
251
|
outlined: boolean;
|
|
252
252
|
patternText: string;
|
|
253
253
|
placeholder: string;
|
|
@@ -256,7 +256,7 @@ export interface InputProperties<T = unknown> extends InputModelState, Propertie
|
|
|
256
256
|
searchSelection: boolean;
|
|
257
257
|
selectableEditor: boolean;
|
|
258
258
|
step: number;
|
|
259
|
-
suggestionCreator?: (
|
|
259
|
+
suggestionCreator?: (_options: SuggestionCreatorOptions<this>) => InputProperties['selection'] | Promise<InputProperties['selection']>;
|
|
260
260
|
suggestSelection: boolean;
|
|
261
261
|
trailingIcon: string | (IconOptions & {
|
|
262
262
|
tooltip?: string | TooltipProps;
|
|
@@ -270,7 +270,7 @@ export declare type DefaultInputProperties<T = string> = Omit<InputProps<T>, 'mo
|
|
|
270
270
|
model: InputModel<T>;
|
|
271
271
|
};
|
|
272
272
|
export declare type InputPropertyTypes<T = unknown> = {
|
|
273
|
-
[
|
|
273
|
+
[_key in keyof InputProperties<T>]: ValueOf<typeof PropertyTypes>;
|
|
274
274
|
};
|
|
275
275
|
export interface InputState<T = unknown> extends State<T> {
|
|
276
276
|
cursor: CursorState;
|
|
@@ -299,12 +299,12 @@ export interface InputAdapterWithReferences<T = unknown> extends InputAdapter<T>
|
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
301
|
export interface GenericInputComponent extends Omit<ForwardRefExoticComponent<InputProps>, 'propTypes'>, StaticWebComponent<InputModelState, DefaultInputProperties> {
|
|
302
|
-
<T = string>(
|
|
302
|
+
<T = string>(_props: InputProps<T> & RefAttributes<InputAdapter<T>>): ReactElement;
|
|
303
303
|
locales: Array<string>;
|
|
304
304
|
transformer: InputDataTransformation;
|
|
305
305
|
}
|
|
306
306
|
export declare const inputModelStatePropertyTypes: {
|
|
307
|
-
[
|
|
307
|
+
[_key in keyof InputModelState]: Requireable<boolean | symbol>;
|
|
308
308
|
};
|
|
309
309
|
export declare const inputPropertyTypes: Mapping<ValueOf<typeof PropertyTypes>>;
|
|
310
310
|
export declare const inputRenderProperties: Array<string>;
|
|
@@ -330,7 +330,7 @@ export interface FileInputModelState extends ModelState {
|
|
|
330
330
|
}
|
|
331
331
|
export interface FileInputModel extends Model<FileValue> {
|
|
332
332
|
contentTypeRegularExpressionPattern: Array<RegExp | string> | null | RegExp | string;
|
|
333
|
-
invertedContentTypeRegularExpressionPattern: Array<RegExp | string> | null | RegExp | string;
|
|
333
|
+
invertedContentTypeRegularExpressionPattern: (Array<RegExp | string> | null | RegExp | string);
|
|
334
334
|
maximumSize: number;
|
|
335
335
|
minimumSize: number;
|
|
336
336
|
fileName: InputModel<string>;
|
|
@@ -343,14 +343,14 @@ export interface FileInputChildrenOptions<P> {
|
|
|
343
343
|
value?: FileValue | null;
|
|
344
344
|
}
|
|
345
345
|
export interface FileInputProperties extends Properties<FileValue>, FileInputModelState {
|
|
346
|
-
children: (
|
|
346
|
+
children: (_options: FileInputChildrenOptions<this>) => null | ReactElement;
|
|
347
347
|
contentTypePattern: Array<RegExp | string> | null | RegExp | string;
|
|
348
348
|
contentTypePatternText: string;
|
|
349
349
|
deleteButton: ReactElement | string;
|
|
350
350
|
downloadButton: ReactElement | string;
|
|
351
351
|
editButton: ReactElement | string;
|
|
352
352
|
encoding: string;
|
|
353
|
-
generateFileNameInputProperties: (
|
|
353
|
+
generateFileNameInputProperties: (_prototype: InputProps<string>, _properties: this & {
|
|
354
354
|
value: FileValue & {
|
|
355
355
|
name: string;
|
|
356
356
|
};
|
|
@@ -375,7 +375,7 @@ export declare type DefaultFileInputProperties = Omit<FileInputProps, 'model'> &
|
|
|
375
375
|
model: FileInputModel;
|
|
376
376
|
};
|
|
377
377
|
export declare type FileInputPropertyTypes = {
|
|
378
|
-
[
|
|
378
|
+
[_key in keyof FileInputProperties]: ValueOf<typeof PropertyTypes>;
|
|
379
379
|
};
|
|
380
380
|
export interface FileInputState extends State<FileValue> {
|
|
381
381
|
modelState: FileInputModelState;
|
|
@@ -394,7 +394,7 @@ export interface FileInputAdapterWithReferences extends FileInputAdapter {
|
|
|
394
394
|
}
|
|
395
395
|
export declare type FileInputComponent = InputComponent<FileInputProps, FileInputModelState, DefaultFileInputProperties, FileInputAdapter>;
|
|
396
396
|
export declare const fileInputModelStatePropertyTypes: {
|
|
397
|
-
[
|
|
397
|
+
[_key in keyof FileInputModelState]: Requireable<boolean | symbol>;
|
|
398
398
|
};
|
|
399
399
|
export declare const fileInputPropertyTypes: Mapping<ValueOf<typeof PropertyTypes>>;
|
|
400
400
|
export declare const defaultFileInputModelState: FileInputModelState;
|
|
@@ -431,12 +431,12 @@ export interface InputsCreatePrototypeOptions<T, P extends InputsPropertiesItem<
|
|
|
431
431
|
}
|
|
432
432
|
export interface InputsProperties<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>> extends InputsModelState, Omit<Properties<Array<P>>, 'onChangeValue'> {
|
|
433
433
|
addIcon: IconOptions;
|
|
434
|
-
children: (
|
|
435
|
-
createPrototype: (
|
|
434
|
+
children: (_options: InputsChildrenOptions<T, P, this>) => ReactElement;
|
|
435
|
+
createPrototype: (_options: InputsCreatePrototypeOptions<T, P, this>) => P;
|
|
436
436
|
maximumNumber: number;
|
|
437
437
|
minimumNumber: number;
|
|
438
438
|
model: InputsModel<T, P>;
|
|
439
|
-
onChangeValue: (
|
|
439
|
+
onChangeValue: (_values: Array<null | T> | null, _event: GenericEvent | unknown, _properties: this) => void;
|
|
440
440
|
removeIcon: IconOptions;
|
|
441
441
|
value: Array<P> | null;
|
|
442
442
|
writable: boolean;
|
|
@@ -449,7 +449,7 @@ export declare type DefaultInputsProperties<T = string, P extends InputsProperti
|
|
|
449
449
|
model: InputsModel<T, P>;
|
|
450
450
|
};
|
|
451
451
|
export declare type InputsPropertyTypes<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>> = {
|
|
452
|
-
[
|
|
452
|
+
[_key in keyof InputsProperties<P>]: ValueOf<typeof PropertyTypes>;
|
|
453
453
|
};
|
|
454
454
|
export declare type InputsState<T = unknown> = State<Array<null | T | undefined>>;
|
|
455
455
|
export declare type InputsAdapter<T = unknown, P extends InputsPropertiesItem<T> = Properties<T>> = ComponentAdapter<InputsProperties<T, P>, InputsState<T>>;
|
|
@@ -457,7 +457,7 @@ export declare type InputsAdapterWithReferences<T = unknown, P extends InputsPro
|
|
|
457
457
|
references: Array<MutableRefObject<RefType>>;
|
|
458
458
|
};
|
|
459
459
|
export interface InputsComponent extends Omit<ForwardRefExoticComponent<InputsProps>, 'propTypes'>, StaticWebComponent<InputsModelState, DefaultInputsProperties> {
|
|
460
|
-
<T = string, P extends InputsPropertiesItem<T> = InputProperties<T>>(
|
|
460
|
+
<T = string, P extends InputsPropertiesItem<T> = InputProperties<T>>(_props: InputsProps<T, P> & RefAttributes<InputsAdapter<T, P>>): ReactElement;
|
|
461
461
|
}
|
|
462
462
|
export declare const inputsPropertyTypes: Mapping<ValueOf<typeof PropertyTypes>>;
|
|
463
463
|
export declare const inputsRenderProperties: Array<string>;
|
|
@@ -483,8 +483,8 @@ export interface IntervalModel {
|
|
|
483
483
|
export interface IntervalProperties extends Omit<InputProperties<number>, 'icon' | 'model' | 'onChange' | 'onChangeValue' | 'value'> {
|
|
484
484
|
icon: IconOptions;
|
|
485
485
|
model: IntervalModel;
|
|
486
|
-
onChange: (
|
|
487
|
-
onChangeValue: (
|
|
486
|
+
onChange: (_properties: this, _event?: GenericEvent) => void;
|
|
487
|
+
onChangeValue: (_value: null | IntervalValue, _event?: GenericEvent) => void;
|
|
488
488
|
value: IntervalConfiguration;
|
|
489
489
|
}
|
|
490
490
|
export declare type IntervalProps = Omit<InputProps<number>, 'icon' | 'model' | 'onChange' | 'onChangeValue' | 'value'> & Partial<{
|
|
@@ -500,7 +500,7 @@ export declare type DefaultIntervalProperties = Omit<IntervalProps, 'model'> & {
|
|
|
500
500
|
model: IntervalModel;
|
|
501
501
|
};
|
|
502
502
|
export declare type IntervalPropertyTypes = {
|
|
503
|
-
[
|
|
503
|
+
[_key in keyof IntervalProperties]: ValueOf<typeof PropertyTypes>;
|
|
504
504
|
};
|
|
505
505
|
export declare type IntervalAdapter = ComponentAdapter<IntervalProperties, {
|
|
506
506
|
value?: IntervalValue | null;
|