react-input-material 0.0.411 → 0.0.414
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/FileInput.js +1 -1
- package/components/GenericInput.js +1 -1
- package/components/GenericInput.module.css +2 -1
- package/components/GenericInput.tsx +4 -4
- package/components/Inputs.js +1 -1
- package/components/Inputs.tsx +7 -5
- package/components/Interval.js +1 -1
- package/components/RequireableCheckbox.js +1 -1
- package/index.js +1 -1
- package/package.json +4 -4
- package/testHelper.js +1 -1
- package/type.d.ts +15 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-input-material",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.414",
|
|
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",
|
|
@@ -342,14 +342,14 @@
|
|
|
342
342
|
"aliases": {
|
|
343
343
|
"#": "Remove unneeded optional dependencies.",
|
|
344
344
|
"#1": "Triggers error in debug mode:",
|
|
345
|
-
"#2": "
|
|
346
|
-
"#3": "
|
|
345
|
+
"#2": "@tinymce/tinymce-react$: false",
|
|
346
|
+
"#3": "ace-builds$: false",
|
|
347
347
|
"#4": "react-ace$: false",
|
|
348
348
|
"#5": "react-useanimations$: false",
|
|
349
349
|
"#6": "react-useanimations/lib/lock$: false",
|
|
350
350
|
"#7": "react-useanimations/lib/plusToX$: false",
|
|
351
|
-
"ace-builds$": "./components/Dummy",
|
|
352
351
|
"@tinymce/tinymce-react$": "./components/Dummy",
|
|
352
|
+
"ace-builds$": "./components/Dummy",
|
|
353
353
|
"react-ace$": "./components/Dummy",
|
|
354
354
|
"react-useanimations$": "./components/Dummy",
|
|
355
355
|
"react-useanimations/lib/lock$": "./components/Dummy",
|
package/testHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';if(typeof module!=='undefined'&&module!==null&&eval('typeof require')!=='undefined'&&eval('require')!==null&&'main'in eval('require')&&eval('typeof require.main')!=='undefined'&&eval('require.main')!==null){var ORIGINAL_MAIN_MODULE=module;if(module!==eval('require.main')&&'paths'in module&&'paths'in eval('require.main')&&typeof __dirname!=='undefined'&&__dirname!==null)module.paths=eval('require.main.paths').concat(module.paths.filter(function(path){return eval('require.main.paths').includes(path)}))};if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("clientnode"),require("react-dom"),require("react-dom/client"),require("react-dom/test-utils"));else if("function"==typeof define&&define.amd)define(["clientnode","react-dom","react-dom/client","react-dom/test-utils"],t);else{var
|
|
1
|
+
'use strict';if(typeof module!=='undefined'&&module!==null&&eval('typeof require')!=='undefined'&&eval('require')!==null&&'main'in eval('require')&&eval('typeof require.main')!=='undefined'&&eval('require.main')!==null){var ORIGINAL_MAIN_MODULE=module;if(module!==eval('require.main')&&'paths'in module&&'paths'in eval('require.main')&&typeof __dirname!=='undefined'&&__dirname!==null)module.paths=eval('require.main.paths').concat(module.paths.filter(function(path){return eval('require.main.paths').includes(path)}))};if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("clientnode"),require("react"),require("react-dom"),require("react-dom/client"),require("react-dom/test-utils"));else if("function"==typeof define&&define.amd)define(["clientnode","react","react-dom","react-dom/client","react-dom/test-utils"],t);else{var r="object"==typeof exports?t(require("clientnode"),require("react"),require("react-dom"),require("react-dom/client"),require("react-dom/test-utils")):t(e.clientnode,e.react,e["react-dom"],e["react-dom/client"],e["react-dom/test-utils"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(e,t,r,n,o){return function(){"use strict";var c={3:function(t){t.exports=e},2:function(e){e.exports=t},41:function(e){e.exports=r},42:function(e){e.exports=n},43:function(e){e.exports=o}},i={};function u(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return c[e](r,r.exports,u),r.exports}u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){u.r(a),u.d(a,{prepareTestEnvironment:function(){return c}});var e=u(3),t=u(2),r=u(41),n=u(42),o=u(43);e.globalContext.IS_REACT_ACT_ENVIRONMENT=!0;var c=function(e,c){var i=null,u={container:null,render:function(e,t){var n,c;return void 0===t&&(t=!0),(0,o.act)((function(){i?t?(0,r.flushSync)((function(){return i.render(e)})):i.render(e):console.error('You call "render" outside a testing context.')})),null!=(n=u.container)&&null!=(c=n.childNodes)&&c.length?u.container.childNodes[0]:u.container},runHook:function(e,n,c){void 0===n&&(n=[]),void 0===c&&(c=!0);var u={},a=function(t){var r=t.parameters;return u.result=e.apply(void 0,r),null},l=function(){for(var e=arguments.length,n=new Array(e),u=0;u<e;u++)n[u]=arguments[u];var l=(0,t.createElement)(a,{parameters:n});(0,o.act)((function(){i?c?(0,r.flushSync)((function(){return i.render(l)})):i.render(l):console.error('You call "render" outside a testing context.')}))};return l.apply(void 0,n),{result:u,render:l}}};return e((function(){u.container=document.createElement("div"),u.container.setAttribute("class","test-wrapper"),document.body.appendChild(u.container),i||(0,o.act)((function(){i=(0,n.createRoot)(u.container)}))})),c((function(){i&&(0,o.act)((function(){i.unmount(),i=null})),u.container.remove(),u.container=null})),u};a.default=c}(),a}()}));
|
package/type.d.ts
CHANGED
|
@@ -21,9 +21,16 @@ export declare type DummyProps = Mapping<unknown> & {
|
|
|
21
21
|
export interface GenericEvent<T = unknown> extends SyntheticEvent {
|
|
22
22
|
detail?: T;
|
|
23
23
|
}
|
|
24
|
+
export interface TestHookResult<R = unknown, P extends Array<unknown> = Array<unknown>> {
|
|
25
|
+
result: {
|
|
26
|
+
result: R;
|
|
27
|
+
};
|
|
28
|
+
render: (...parameters: P) => void;
|
|
29
|
+
}
|
|
24
30
|
export interface TestEnvironment {
|
|
25
31
|
container: HTMLDivElement | null;
|
|
26
32
|
render: <T = HTMLElement>(component: ReactElement) => null | T;
|
|
33
|
+
runHook: <R = unknown, P extends Array<unknown> = Array<unknown>>(hook: (...parameters: P) => R, parameters: P, flush: boolean) => TestHookResult<R, P>;
|
|
27
34
|
}
|
|
28
35
|
export interface CursorState {
|
|
29
36
|
end: number;
|
|
@@ -418,12 +425,17 @@ export interface InputsPropertiesItem<T, TS = unknown> {
|
|
|
418
425
|
};
|
|
419
426
|
value?: null | T;
|
|
420
427
|
}
|
|
421
|
-
export interface
|
|
428
|
+
export interface InputsCreateOptions<T, IP> {
|
|
422
429
|
index: number;
|
|
423
430
|
properties: IP;
|
|
424
|
-
prototype: Partial<P>;
|
|
425
431
|
values: Array<null | T | undefined> | null;
|
|
426
432
|
}
|
|
433
|
+
export interface InputsCreateItemOptions<T, P extends InputsPropertiesItem<T>, IP> extends InputsCreateOptions<T, IP> {
|
|
434
|
+
item: Partial<P>;
|
|
435
|
+
}
|
|
436
|
+
export interface InputsCreatePrototypeOptions<T, P extends InputsPropertiesItem<T>, IP> extends InputsCreateItemOptions<T, P, IP> {
|
|
437
|
+
lastValue: null | T | undefined;
|
|
438
|
+
}
|
|
427
439
|
export interface InputsModelState extends ModelState {
|
|
428
440
|
invalidMaximumNumber: boolean;
|
|
429
441
|
invalidMinimumNumber: boolean;
|
|
@@ -443,6 +455,7 @@ export interface InputsProperties<T = unknown, P extends InputsPropertiesItem<T>
|
|
|
443
455
|
addIcon: IconOptions;
|
|
444
456
|
removeIcon: IconOptions;
|
|
445
457
|
children: (options: InputsChildrenOptions<T, P, this>) => ReactElement;
|
|
458
|
+
createItem: (options: InputsCreateItemOptions<T, P, this>) => P;
|
|
446
459
|
createPrototype: (options: InputsCreatePrototypeOptions<T, P, this>) => P;
|
|
447
460
|
maximumNumber: number;
|
|
448
461
|
minimumNumber: number;
|