react-input-material 0.0.415 → 0.0.418
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/Inputs.js +1 -1
- package/components/Interval.js +1 -1
- package/components/RequireableCheckbox.js +1 -1
- package/helper.d.ts +11 -11
- package/helper.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/testHelper.js +1 -1
- package/type.d.ts +36 -3
package/package.json
CHANGED
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,
|
|
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,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("@babel/runtime/helpers/extends"),require("clientnode"),require("react"),require("react-dom"),require("react-dom/client"),require("react-dom/test-utils"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/extends","clientnode","react","react-dom","react-dom/client","react-dom/test-utils"],r);else{var t="object"==typeof exports?r(require("@babel/runtime/helpers/extends"),require("clientnode"),require("react"),require("react-dom"),require("react-dom/client"),require("react-dom/test-utils")):r(e["@babel/runtime/helpers/extends"],e.clientnode,e.react,e["react-dom"],e["react-dom/client"],e["react-dom/test-utils"]);for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(this,(function(e,r,t,n,o,i){return function(){"use strict";var u={1:function(r){r.exports=e},3:function(e){e.exports=r},2:function(e){e.exports=t},41:function(e){e.exports=n},42:function(e){e.exports=o},43:function(e){e.exports=i}},c={};function a(e){var r=c[e];if(void 0!==r)return r.exports;var t=c[e]={exports:{}};return u[e](t,t.exports,a),t.exports}a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,{a:r}),r},a.d=function(e,r){for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return function(){a.r(l),a.d(l,{prepareTestEnvironment:function(){return c}});var e=a(1),r=a.n(e),t=a(3),n=a(2),o=a(41),i=a(42),u=a(43);t.globalContext.IS_REACT_ACT_ENVIRONMENT=!0;var c=function(e,t){var c=null,a={container:null,render:function(e,r){var t,n;return void 0===r&&(r=!0),(0,u.act)((function(){c?r?(0,o.flushSync)((function(){return c.render(e)})):c.render(e):console.error('You call "render" outside a testing context.')})),null!=(t=a.container)&&null!=(n=t.childNodes)&&n.length?a.container.childNodes[0]:a.container},runHook:function(e,t){void 0===t&&(t={});var i=r()({flush:!0,parameters:[],wrapper:null},t),a={},l=function(r){var t=r.parameters;return a.value=e.apply(void 0,t),null},d=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var d=(0,n.createElement)(l,{parameters:t});i.wrapper&&(d=(0,n.createElement)(i.wrapper.component,r()({},i.wrapper.properties||{},{children:d}))),(0,u.act)((function(){c?i.flush?(0,o.flushSync)((function(){return c.render(d)})):c.render(d):console.error('You call "render" outside a testing context.')}))};return d.apply(void 0,i.parameters),{result:a,render:d}}};return e((function(){a.container=document.createElement("div"),a.container.setAttribute("class","test-wrapper"),document.body.appendChild(a.container),c||(0,u.act)((function(){c=(0,i.createRoot)(a.container)}))})),t((function(){c&&(0,u.act)((function(){c.unmount(),c=null})),a.container.remove(),a.container=null})),a};l.default=c}(),l}()}));
|
package/type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropertyTypes from 'clientnode/property-types';
|
|
2
2
|
import { Mapping, PlainObject, RecursivePartial, ValueOf } from 'clientnode/type';
|
|
3
|
-
import { ComponentClass, FocusEvent, ForwardRefExoticComponent, FunctionComponent, HTMLProps, KeyboardEvent, MouseEvent, MutableRefObject, ReactElement, ReactNode, RefAttributes, Requireable, SyntheticEvent } from 'react';
|
|
3
|
+
import { ComponentClass, FocusEvent, ForwardRefExoticComponent, FunctionComponent, FunctionComponentElement, HTMLProps, KeyboardEvent, MouseEvent, MutableRefObject, ReactElement, ReactNode, RefAttributes, Requireable, SyntheticEvent } from 'react';
|
|
4
4
|
import CodeEditorType, { IAceEditorProps as CodeEditorProps } from 'react-ace';
|
|
5
5
|
import { EditorOptions as RawTinyMCEOptions, Editor as RichTextEditor } from 'tinymce';
|
|
6
6
|
import { ComponentAdapter, PropertiesValidationMap, StaticWebComponent as StaticBaseWebComponent, ValidationMapping } from 'web-component-wrapper/type';
|
|
@@ -21,16 +21,49 @@ export declare type DummyProps = Mapping<unknown> & {
|
|
|
21
21
|
export interface GenericEvent<T = unknown> extends SyntheticEvent {
|
|
22
22
|
detail?: T;
|
|
23
23
|
}
|
|
24
|
+
export interface TestHookWrapper<P extends Array<unknown> = Array<unknown>, WP extends {
|
|
25
|
+
children: FunctionComponentElement<{
|
|
26
|
+
parameters: P;
|
|
27
|
+
}>;
|
|
28
|
+
} = {
|
|
29
|
+
children: FunctionComponentElement<{
|
|
30
|
+
parameters: P;
|
|
31
|
+
}>;
|
|
32
|
+
}> {
|
|
33
|
+
component: FunctionComponent<WP>;
|
|
34
|
+
properties?: WP;
|
|
35
|
+
}
|
|
24
36
|
export interface TestHookResult<R = unknown, P extends Array<unknown> = Array<unknown>> {
|
|
25
37
|
result: {
|
|
26
|
-
|
|
38
|
+
value: R;
|
|
27
39
|
};
|
|
28
40
|
render: (...parameters: P) => void;
|
|
29
41
|
}
|
|
42
|
+
export interface HookOptions<P extends Array<unknown> = Array<unknown>, WP extends {
|
|
43
|
+
children: FunctionComponentElement<{
|
|
44
|
+
parameters: P;
|
|
45
|
+
}>;
|
|
46
|
+
} = {
|
|
47
|
+
children: FunctionComponentElement<{
|
|
48
|
+
parameters: P;
|
|
49
|
+
}>;
|
|
50
|
+
}> {
|
|
51
|
+
parameters: P;
|
|
52
|
+
wrapper?: null | TestHookWrapper<P, WP>;
|
|
53
|
+
flush?: boolean;
|
|
54
|
+
}
|
|
30
55
|
export interface TestEnvironment {
|
|
31
56
|
container: HTMLDivElement | null;
|
|
32
57
|
render: <T = HTMLElement>(component: ReactElement) => null | T;
|
|
33
|
-
runHook: <R = unknown, P extends Array<unknown> = Array<unknown
|
|
58
|
+
runHook: <R = unknown, P extends Array<unknown> = Array<unknown>, WP extends {
|
|
59
|
+
children: FunctionComponentElement<{
|
|
60
|
+
parameters: P;
|
|
61
|
+
}>;
|
|
62
|
+
} = {
|
|
63
|
+
children: FunctionComponentElement<{
|
|
64
|
+
parameters: P;
|
|
65
|
+
}>;
|
|
66
|
+
}>(hook: (...parameters: P) => R, options: Partial<HookOptions<P, WP>>) => TestHookResult<R, P>;
|
|
34
67
|
}
|
|
35
68
|
export interface CursorState {
|
|
36
69
|
end: number;
|