react-input-material 0.0.402 → 0.0.405

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-input-material",
3
- "version": "0.0.402",
3
+ "version": "0.0.405",
4
4
  "description": "Reusable material design based input field with support for (richt-)text, code, selections, numbers, dates and so on.",
5
5
  "keywords": [
6
6
  "form-field",
@@ -47,7 +47,9 @@
47
47
  "clear": "weboptimizer clear && (rm *.styles.css components/*.styles.css 2>/dev/null || true)",
48
48
  "document": "weboptimizer document",
49
49
  "lint": "yarn clear && weboptimizer lint",
50
+ "patch": "for path in patches/*.patch; do target_file_path=\"$(echo \"$path\" | sed --regexp-extended 's/patches\\/([^/]+).patch$/\\1/' | sed 's:\\+:/:g')\"; source_file_path=\"$path\"; echo \"Patch file \\\"$target_file_path\\\" with \\\"$source_file_path\\\".\"; patch --forward --input \"$source_file_path\" --reject-file - \"$target_file_path\"; done; true",
50
51
  "prepare": "ln --force --symbolic react node_modules/@emotion/core && yarn build",
52
+ "postinstall": "yarn patch || true",
51
53
  "serve": "weboptimizer serve",
52
54
  "serve:minimal": "weboptimizer serve '{__reference__: \"target:minimal\"}'",
53
55
  "start": "yarn serve",
package/type.d.ts CHANGED
@@ -168,16 +168,18 @@ export declare type CheckboxComponent = InputComponent<CheckboxProps, CheckboxMo
168
168
  export declare const checkboxPropertyTypes: PropertiesValidationMap;
169
169
  export declare const defaultCheckboxModel: CheckboxModel;
170
170
  export declare const defaultCheckboxProperties: DefaultCheckboxProperties;
171
+ export declare type Transformer<T = unknown> = (value: T, configuration: DefaultInputProperties<T>, transformer: InputDataTransformation) => string;
171
172
  export interface FormatSpecification<T = unknown> {
172
173
  options?: PlainObject;
173
- transform?: (_value: T, _configuration: DefaultInputProperties<T>, _transformer: InputDataTransformation) => string;
174
+ transform?: Transformer<T>;
175
+ }
176
+ export interface FormatSpecifications<T = unknown> {
177
+ final: FormatSpecification<T>;
178
+ intermediate?: FormatSpecification<T>;
174
179
  }
175
180
  export interface DataTransformSpecification<T = unknown, InputType = number | string> {
176
- format?: {
177
- final: FormatSpecification<T>;
178
- intermediate?: FormatSpecification<T>;
179
- };
180
- parse?: (_value: InputType, _configuration: DefaultInputProperties<T>, _transformer: InputDataTransformation) => T;
181
+ format?: FormatSpecifications<T>;
182
+ parse?: (value: InputType, configuration: DefaultInputProperties<T>, transformer: InputDataTransformation) => T;
181
183
  type?: NativeInputType;
182
184
  }
183
185
  export declare type InputDataTransformation = {