mayoiga 0.1.2 → 0.1.5
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/README.md +55 -35
- package/dist/component.d.ts +1 -1
- package/dist/component.test.js +62 -3
- package/dist/index.d.ts +19 -4
- package/dist/index.js +11 -7
- package/dist/index.test.js +5 -2
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +92 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/{images/icons.png → icons.png} +0 -0
- package/docs/assets/{images/icons@2x.png → icons@2x.png} +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1414 -0
- package/docs/assets/{images/widgets.png → widgets.png} +0 -0
- package/docs/assets/{images/widgets@2x.png → widgets@2x.png} +0 -0
- package/docs/index.html +40 -248
- package/docs/modules.html +4 -0
- package/package.json +21 -19
- package/src/component.test.tsx +127 -14
- package/src/component.tsx +9 -5
- package/src/index.test.tsx +19 -17
- package/src/index.ts +64 -35
- package/yarn.lock +537 -550
- package/docs/assets/css/main.css +0 -2328
- package/docs/assets/js/main.js +0 -1
- package/docs/assets/js/search.js +0 -3
- package/docs/globals.html +0 -185
- package/docs/modules/_actions_.html +0 -398
- package/docs/modules/_forms_.html +0 -362
- package/docs/modules/_index_.html +0 -170
- package/docs/modules/_inputprotocol_.html +0 -319
- package/docs/modules/_mayoiga_.html +0 -783
- package/docs/modules/_reducer_.html +0 -417
|
File without changes
|
|
File without changes
|
package/docs/index.html
CHANGED
|
@@ -1,249 +1,41 @@
|
|
|
1
|
-
<!
|
|
2
|
-
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
</
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
41
|
-
<input type="checkbox" id="tsd-filter-externals" checked />
|
|
42
|
-
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
|
43
|
-
<input type="checkbox" id="tsd-filter-only-exported" />
|
|
44
|
-
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="tsd-page-title">
|
|
53
|
-
<div class="container">
|
|
54
|
-
<ul class="tsd-breadcrumb">
|
|
55
|
-
<li>
|
|
56
|
-
<a href="globals.html">Globals</a>
|
|
57
|
-
</li>
|
|
58
|
-
</ul>
|
|
59
|
-
<h1> Mayoiga</h1>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</header>
|
|
63
|
-
<div class="container container-main">
|
|
64
|
-
<div class="row">
|
|
65
|
-
<div class="col-8 col-content">
|
|
66
|
-
<div class="tsd-panel tsd-typography">
|
|
67
|
-
<a href="#mayoiga" id="mayoiga" style="color: inherit; text-decoration: none;">
|
|
68
|
-
<h1>Mayoiga</h1>
|
|
69
|
-
</a>
|
|
70
|
-
<p>The React Hook based form library. Of course it is TypeScript friendly.</p>
|
|
71
|
-
<a href="#supported-functionality" id="supported-functionality" style="color: inherit; text-decoration: none;">
|
|
72
|
-
<h2>Supported functionality</h2>
|
|
73
|
-
</a>
|
|
74
|
-
<ul>
|
|
75
|
-
<li>TypeScript oriented</li>
|
|
76
|
-
<li>Form level validation</li>
|
|
77
|
-
<li>Submit level validation</li>
|
|
78
|
-
<li>Less learning cost</li>
|
|
79
|
-
<li>Cooperate with any component library (Bootstarap, MaterialDesign, ant-design or whatever )</li>
|
|
80
|
-
</ul>
|
|
81
|
-
<p>With less boilerplate code!!</p>
|
|
82
|
-
<p>You can see more working demo <a href="example/src/demo-app.tsx">under the example directory</a> .</p>
|
|
83
|
-
<a href="#how-to-use" id="how-to-use" style="color: inherit; text-decoration: none;">
|
|
84
|
-
<h2>How to use</h2>
|
|
85
|
-
</a>
|
|
86
|
-
<a href="#api-you-should-see" id="api-you-should-see" style="color: inherit; text-decoration: none;">
|
|
87
|
-
<h3>API you should see</h3>
|
|
88
|
-
</a>
|
|
89
|
-
<p>There are only two functions which you should know to use Mayoiga.</p>
|
|
90
|
-
<ul>
|
|
91
|
-
<li><a href="https://hachibeedi.github.io/mayoiga/modules/_mayoiga_.html#useform">useForm</a></li>
|
|
92
|
-
<li><a href="https://hachibeedi.github.io/mayoiga/modules/_mayoiga_.html#createformscope">createFormScope</a></li>
|
|
93
|
-
</ul>
|
|
94
|
-
<p>And if you would like to bring it to production, you need to know how to about <a href="https://hachibeedi.github.io/mayoiga/modules/_inputprotocol_.html#inputprotocol">InputProtocol</a>.
|
|
95
|
-
To know about that, <code>mayoiga/lib/forms</code> can be a good example.</p>
|
|
96
|
-
<p>There is a short article which explains Mayoiga <a href="https://dev.to/hachibeedi/react-use-form-type-safe-react-hooks-based-form-utility-4k5h">https://dev.to/hachibeedi/react-use-form-type-safe-react-hooks-based-form-utility-4k5h</a>.</p>
|
|
97
|
-
<a href="#minimum-example" id="minimum-example" style="color: inherit; text-decoration: none;">
|
|
98
|
-
<h3>Minimum example:</h3>
|
|
99
|
-
</a>
|
|
100
|
-
<pre><code class="language-typeScript">
|
|
101
|
-
import * as React from 'react';
|
|
102
|
-
import {FC} from 'react';
|
|
103
|
-
|
|
104
|
-
import {useForm, createFormScope} from 'mayoiga';
|
|
105
|
-
import {Input, NumberInput} from 'mayoiga/lib/forms';
|
|
106
|
-
|
|
107
|
-
const required = (target: string) => (target.length === 0 ? 'required' : undefined);
|
|
108
|
-
|
|
109
|
-
const between = (min: number, max: number) => (target: number) => {
|
|
110
|
-
if (target < min) {
|
|
111
|
-
return `more than ${min}`;
|
|
112
|
-
}
|
|
113
|
-
if (target > max) {
|
|
114
|
-
return `less than ${max}`;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const choice = function<T>(...candidates: Array<T>) {
|
|
119
|
-
return (target: T) => (candidates.includes(target) ? undefined : 'You should choose from the candidates.');
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
const INITIAL_FORM_STATE = {
|
|
123
|
-
name: '',
|
|
124
|
-
age: 13,
|
|
125
|
-
seed: 'fish',
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
const {context, scope} = createFormScope<typeof INITIAL_FORM_STATE>();
|
|
129
|
-
|
|
130
|
-
const DemoForm = scope(props => {
|
|
131
|
-
const {Form, Field} = useForm(context);
|
|
132
|
-
return (
|
|
133
|
-
<Form onSubmit={value => console.log(value)}>
|
|
134
|
-
<Field name="name" component={Input} validations={[required]} />
|
|
135
|
-
<Field name="age" component={NumberInput} validations={[between(5, 20)]} />
|
|
136
|
-
<Field name="seed" component={Input} validations={[choice('fish', 'squid', 'octopus')]} />
|
|
137
|
-
|
|
138
|
-
<button disabled={!props.touched || Object.values(props.errors).some(e => !!e.length)}>submit</button>
|
|
139
|
-
</Form>
|
|
140
|
-
);
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
export default function DemoApp() {
|
|
144
|
-
return <DemoForm initialState={INITIAL_FORM_STATE} onSubmit={value => alert(`submit ${JSON.stringify(value)}`)} />;
|
|
145
|
-
}
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>mayoiga</title><meta name="description" content="Documentation for mayoiga"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">mayoiga</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>mayoiga </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><div class="tsd-panel tsd-typography"><p><a href="https://github.com/hachibeeDI/mayoiga/actions/workflows/checker.yml"><img src="https://github.com/hachibeeDI/mayoiga/actions/workflows/checker.yml/badge.svg" alt="Lint Check"></a></p>
|
|
2
|
+
|
|
3
|
+
<a href="#mayoiga" id="mayoiga" style="color: inherit; text-decoration: none;">
|
|
4
|
+
<h1>Mayoiga</h1>
|
|
5
|
+
</a>
|
|
6
|
+
<p>Fully typed form state management system for React.</p>
|
|
7
|
+
<p>No magic, ref free. It's built for complicated form state management.</p>
|
|
8
|
+
|
|
9
|
+
<a href="#feature" id="feature" style="color: inherit; text-decoration: none;">
|
|
10
|
+
<h2>Feature</h2>
|
|
11
|
+
</a>
|
|
12
|
+
<p>Support strong typed form state.
|
|
13
|
+
Every form should have two kind of types:</p>
|
|
14
|
+
<ol>
|
|
15
|
+
<li>form state before validation</li>
|
|
16
|
+
<li>state after validation succeed</li>
|
|
17
|
+
</ol>
|
|
18
|
+
<p>i.e. before validation, a field named "bio" might be nullable (<code>{bio: null | string}</code>) but it must not empty to submit (<code>{bio: zod.string().nonempty()}</code>).</p>
|
|
19
|
+
<p>Also considers:</p>
|
|
20
|
+
<ul>
|
|
21
|
+
<li>No ref, DOM free</li>
|
|
22
|
+
<li>High performance, high tuning possibility<ul>
|
|
23
|
+
<li>Mayoiga uses "external state and selector" pattern. You can built your own form if you known what you would like to</li>
|
|
24
|
+
</ul>
|
|
25
|
+
</li>
|
|
26
|
+
</ul>
|
|
27
|
+
|
|
28
|
+
<a href="#features-does-not-support" id="features-does-not-support" style="color: inherit; text-decoration: none;">
|
|
29
|
+
<h2>Features does not support</h2>
|
|
30
|
+
</a>
|
|
31
|
+
<ul>
|
|
32
|
+
<li>Short coding</li>
|
|
33
|
+
</ul>
|
|
34
|
+
<p>It's not a library for short coding or copy and paste template.</p>
|
|
35
|
+
|
|
36
|
+
<a href="#quickstart" id="quickstart" style="color: inherit; text-decoration: none;">
|
|
37
|
+
<h3>Quickstart</h3>
|
|
38
|
+
</a>
|
|
39
|
+
<pre><code class="language-typeScript"><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">schema</span><span class="hl-1"> = </span><span class="hl-3">zod</span><span class="hl-1">.</span><span class="hl-4">object</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-3">name:</span><span class="hl-1"> </span><span class="hl-3">zod</span><span class="hl-1">.</span><span class="hl-4">string</span><span class="hl-1">(),</span><br/><span class="hl-1"> </span><span class="hl-3">age:</span><span class="hl-1"> </span><span class="hl-3">zod</span><br/><span class="hl-1"> .</span><span class="hl-4">string</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-4">transform</span><span class="hl-1">((</span><span class="hl-3">val</span><span class="hl-1">) </span><span class="hl-0">=></span><span class="hl-1"> </span><span class="hl-5">Number</span><span class="hl-1">(</span><span class="hl-3">val</span><span class="hl-1">))</span><br/><span class="hl-1"> .</span><span class="hl-4">refine</span><span class="hl-1">((</span><span class="hl-3">val</span><span class="hl-1">) </span><span class="hl-0">=></span><span class="hl-1"> (</span><span class="hl-5">Number</span><span class="hl-1">.</span><span class="hl-4">isNaN</span><span class="hl-1">(</span><span class="hl-3">val</span><span class="hl-1">) ? </span><span class="hl-6">0</span><span class="hl-1"> : </span><span class="hl-3">val</span><span class="hl-1">)),</span><br/><span class="hl-1"> </span><span class="hl-3">marked:</span><span class="hl-1"> </span><span class="hl-3">zod</span><span class="hl-1">.</span><span class="hl-4">literal</span><span class="hl-1">(</span><span class="hl-0">true</span><span class="hl-1">),</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-0">type</span><span class="hl-1"> </span><span class="hl-5">BeforeValidation</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-3">name</span><span class="hl-1">: </span><span class="hl-5">string</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">age</span><span class="hl-1">: </span><span class="hl-5">string</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">marked</span><span class="hl-1">: </span><span class="hl-5">boolean</span><span class="hl-1">;</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-0">const</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">components</span><span class="hl-1">: {</span><span class="hl-2">Field</span><span class="hl-1">, </span><span class="hl-2">Slicer</span><span class="hl-1">},</span><br/><span class="hl-1"> </span><span class="hl-2">handleSubmit</span><span class="hl-1">,</span><br/><span class="hl-1">} = </span><span class="hl-4">createFormHook</span><span class="hl-1">({</span><span class="hl-3">name:</span><span class="hl-7">'test'</span><span class="hl-1">, </span><span class="hl-3">age:</span><span class="hl-1"> </span><span class="hl-7">'42'</span><span class="hl-1">, </span><span class="hl-3">marked:</span><span class="hl-1"> </span><span class="hl-0">false</span><span class="hl-1">} </span><span class="hl-8">as</span><span class="hl-1"> </span><span class="hl-5">BeforeValidation</span><span class="hl-1">, </span><span class="hl-3">schema</span><span class="hl-1">);</span><br/><br/><span class="hl-0">function</span><span class="hl-1"> </span><span class="hl-4">App</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">submitHandler</span><span class="hl-1"> = </span><span class="hl-4">handleSubmit</span><span class="hl-1">((</span><span class="hl-3">e</span><span class="hl-1">) </span><span class="hl-0">=></span><span class="hl-1"> (</span><span class="hl-3">result</span><span class="hl-1">) </span><span class="hl-0">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">if</span><span class="hl-1"> (</span><span class="hl-3">result</span><span class="hl-1">.</span><span class="hl-3">error</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-8">return</span><span class="hl-1"> </span><span class="hl-4">alert</span><span class="hl-1">(</span><span class="hl-7">'Err!'</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-4">log</span><span class="hl-1">(</span><span class="hl-3">result</span><span class="hl-1">.</span><span class="hl-3">data</span><span class="hl-1">); </span><span class="hl-9">/*</span><br/><span class="hl-9"> {</span><br/><span class="hl-9"> name: 'test',</span><br/><span class="hl-9"> age: 42, <- age is typed "number" before validation because of definition</span><br/><span class="hl-9"> marked: true, <- have to be "true", not as boolean. it's power of zod</span><br/><span class="hl-9"> }</span><br/><span class="hl-9"> */</span><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-8">return</span><span class="hl-1"> (</span><br/><span class="hl-1"> <</span><span class="hl-3">form</span><span class="hl-1"> </span><span class="hl-3">onSubmit</span><span class="hl-1">={</span><span class="hl-4">handleSubmit</span><span class="hl-1">(</span><span class="hl-3">onSubmit</span><span class="hl-1">)}></span><br/><span class="hl-1"> <</span><span class="hl-3">Field</span><span class="hl-1"> </span><span class="hl-3">name</span><span class="hl-1">=</span><span class="hl-7">"name"</span><span class="hl-1">>{(tool) => <input {...</span><span class="hl-3">tool</span><span class="hl-1">} />}</</span><span class="hl-3">Field</span><span class="hl-1">></span><br/><span class="hl-1"> <</span><span class="hl-3">Field</span><span class="hl-1"> </span><span class="hl-3">name</span><span class="hl-1">=</span><span class="hl-7">"age"</span><span class="hl-1">>{(tool) => <input {...</span><span class="hl-3">tool</span><span class="hl-1">} />}</</span><span class="hl-3">Field</span><span class="hl-1">></span><br/><span class="hl-1"> <</span><span class="hl-3">Field</span><span class="hl-1"> </span><span class="hl-3">name</span><span class="hl-1">=</span><span class="hl-7">"marked"</span><span class="hl-1">>{(tool) => <input {...</span><span class="hl-3">tool</span><span class="hl-1">} />}</</span><span class="hl-3">Field</span><span class="hl-1">></span><br/><span class="hl-1"> <</span><span class="hl-3">input</span><span class="hl-1"> </span><span class="hl-3">type</span><span class="hl-1">=</span><span class="hl-7">"submit"</span><span class="hl-1"> /></span><br/><span class="hl-1"> </</span><span class="hl-3">form</span><span class="hl-1">></span><br/><span class="hl-1"> );</span><br/><span class="hl-1">}</span><br/>
|
|
146
40
|
</code></pre>
|
|
147
|
-
|
|
148
|
-
</div>
|
|
149
|
-
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
150
|
-
<nav class="tsd-navigation primary">
|
|
151
|
-
<ul>
|
|
152
|
-
<li class="globals ">
|
|
153
|
-
<a href="globals.html"><em>Globals</em></a>
|
|
154
|
-
</li>
|
|
155
|
-
<li class=" tsd-kind-external-module">
|
|
156
|
-
<a href="modules/_actions_.html">"actions"</a>
|
|
157
|
-
</li>
|
|
158
|
-
<li class=" tsd-kind-external-module">
|
|
159
|
-
<a href="modules/_forms_.html">"forms"</a>
|
|
160
|
-
</li>
|
|
161
|
-
<li class=" tsd-kind-external-module">
|
|
162
|
-
<a href="modules/_index_.html">"index"</a>
|
|
163
|
-
</li>
|
|
164
|
-
<li class=" tsd-kind-external-module">
|
|
165
|
-
<a href="modules/_inputprotocol_.html">"input<wbr>Protocol"</a>
|
|
166
|
-
</li>
|
|
167
|
-
<li class=" tsd-kind-external-module">
|
|
168
|
-
<a href="modules/_mayoiga_.html">"mayoiga"</a>
|
|
169
|
-
</li>
|
|
170
|
-
<li class=" tsd-kind-external-module">
|
|
171
|
-
<a href="modules/_reducer_.html">"reducer"</a>
|
|
172
|
-
</li>
|
|
173
|
-
</ul>
|
|
174
|
-
</nav>
|
|
175
|
-
<nav class="tsd-navigation secondary menu-sticky">
|
|
176
|
-
<ul class="before-current">
|
|
177
|
-
</ul>
|
|
178
|
-
</nav>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
<footer class="with-border-bottom">
|
|
183
|
-
<div class="container">
|
|
184
|
-
<h2>Legend</h2>
|
|
185
|
-
<div class="tsd-legend-group">
|
|
186
|
-
<ul class="tsd-legend">
|
|
187
|
-
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
|
|
188
|
-
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
|
|
189
|
-
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
190
|
-
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
191
|
-
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
192
|
-
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
|
|
193
|
-
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
194
|
-
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li>
|
|
195
|
-
</ul>
|
|
196
|
-
<ul class="tsd-legend">
|
|
197
|
-
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
|
|
198
|
-
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
|
|
199
|
-
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
|
|
200
|
-
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
|
|
201
|
-
</ul>
|
|
202
|
-
<ul class="tsd-legend">
|
|
203
|
-
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
|
|
204
|
-
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
|
|
205
|
-
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
|
|
206
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
|
207
|
-
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
|
|
208
|
-
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
|
|
209
|
-
</ul>
|
|
210
|
-
<ul class="tsd-legend">
|
|
211
|
-
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
212
|
-
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
|
|
213
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
|
214
|
-
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
|
|
215
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
|
216
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
|
|
217
|
-
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
|
|
218
|
-
</ul>
|
|
219
|
-
<ul class="tsd-legend">
|
|
220
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
|
|
221
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
|
|
222
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
|
|
223
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
|
|
224
|
-
</ul>
|
|
225
|
-
<ul class="tsd-legend">
|
|
226
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
|
|
227
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
|
|
228
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
|
|
229
|
-
</ul>
|
|
230
|
-
<ul class="tsd-legend">
|
|
231
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
|
|
232
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
|
|
233
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
|
|
234
|
-
</ul>
|
|
235
|
-
<ul class="tsd-legend">
|
|
236
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
|
|
237
|
-
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
|
|
238
|
-
</ul>
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
</footer>
|
|
242
|
-
<div class="container tsd-generator">
|
|
243
|
-
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
|
244
|
-
</div>
|
|
245
|
-
<div class="overlay"></div>
|
|
246
|
-
<script src="assets/js/main.js"></script>
|
|
247
|
-
<script>if (location.protocol == 'file:') document.write('<script src="assets/js/search.js"><' + '/script>');</script>
|
|
248
|
-
</body>
|
|
249
|
-
</html>
|
|
41
|
+
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#Controller" class="tsd-kind-icon">Controller</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#FieldProps" class="tsd-kind-icon">Field<wbr/>Props</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#FullFormState" class="tsd-kind-icon">Full<wbr/>Form<wbr/>State</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#HandleChangeAction" class="tsd-kind-icon">Handle<wbr/>Change<wbr/>Action</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#SliceProps" class="tsd-kind-icon">Slice<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#StateRestriction" class="tsd-kind-icon">State<wbr/>Restriction</a></li><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#createFormHook" class="tsd-kind-icon">create<wbr/>Form<wbr/>Hook</a></li><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#useFormSlice" class="tsd-kind-icon">use<wbr/>Form<wbr/>Slice</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>mayoiga</title><meta name="description" content="Documentation for mayoiga"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">mayoiga</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>mayoiga </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Type aliases</h3><ul class="tsd-index-list"><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#Controller" class="tsd-kind-icon">Controller</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#FieldProps" class="tsd-kind-icon">Field<wbr/>Props</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#FullFormState" class="tsd-kind-icon">Full<wbr/>Form<wbr/>State</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#HandleChangeAction" class="tsd-kind-icon">Handle<wbr/>Change<wbr/>Action</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#SliceProps" class="tsd-kind-icon">Slice<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#StateRestriction" class="tsd-kind-icon">State<wbr/>Restriction</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#createFormHook" class="tsd-kind-icon">create<wbr/>Form<wbr/>Hook</a></li><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#useFormSlice" class="tsd-kind-icon">use<wbr/>Form<wbr/>Slice</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Type aliases</h2><section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter"><a id="Controller" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Controller<a href="#Controller" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Controller<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>actions<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ActionsCanBePublic</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>components<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>Field<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>Slicer<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>useInitialize<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>useSelector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L194">index.ts:194</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
+
<p>Restricted type interface of the form store
|
|
3
|
+
TODO: more restriction</p>
|
|
4
|
+
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>State<span class="tsd-signature-symbol">: </span><a href="modules.html#StateRestriction" class="tsd-signature-type" data-tsd-kind="Type alias">StateRestriction</a></h4></li></ul><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>actions<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ActionsCanBePublic</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span></h5></li><li class="tsd-parameter"><h5>components<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>Field<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>Slicer<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span></h5><ul class="tsd-parameters"><li class="tsd-parameter"><h5>Field<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">Field<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>props<span class="tsd-signature-symbol">: </span><a href="modules.html#FieldProps" class="tsd-signature-type" data-tsd-kind="Type alias">FieldProps</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ReactElement</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L200">index.ts:200</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>Name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>props: <a href="modules.html#FieldProps" class="tsd-signature-type" data-tsd-kind="Type alias">FieldProps</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ReactElement</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li></ul></li><li class="tsd-parameter"><h5>Slicer<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">Slicer<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Selected</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>props<span class="tsd-signature-symbol">: </span><a href="modules.html#SliceProps" class="tsd-signature-type" data-tsd-kind="Type alias">SliceProps</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Selected</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ReactElement</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L201">index.ts:201</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>Selected<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">readonly </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>props: <a href="modules.html#SliceProps" class="tsd-signature-type" data-tsd-kind="Type alias">SliceProps</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Selected</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ReactElement</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>use<wbr/>Initialize<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon">use<wbr/>Initialize<span class="tsd-signature-symbol">(</span>initialValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L195">index.ts:195</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>initialValue: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li><li class="tsd-parameter"><h5>use<wbr/>Selector<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">use<wbr/>Selector<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>selector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>state<span class="tsd-signature-symbol">: </span><a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span>, isEqual<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span>prev<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span>, current<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L196">index.ts:196</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>R</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>selector: <span class="tsd-signature-symbol">(</span>state<span class="tsd-signature-symbol">: </span><a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>state<span class="tsd-signature-symbol">: </span><a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>state: <a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> isEqual: <span class="tsd-signature-symbol">(</span>prev<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span>, current<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>prev<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span>, current<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>prev: <span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></h5></li><li><h5>current: <span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter"><a id="FieldProps" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Field<wbr/>Props<a href="#FieldProps" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Field<wbr/>Props<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">; </span>children<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L26">index.ts:26</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>State<span class="tsd-signature-symbol">: </span><a href="modules.html#StateRestriction" class="tsd-signature-type" data-tsd-kind="Type alias">StateRestriction</a></h4></li><li><h4>Name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">keyof </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span></h4></li></ul><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span></h5></li><li class="tsd-parameter"><h5>children<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon">children<span class="tsd-signature-symbol">(</span>tool<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">; </span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">; </span>onChange<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span>, errorMessage<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ReactNode</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L28">index.ts:28</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>tool: <span class="tsd-signature-symbol">{ </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">; </span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">; </span>onChange<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span></h5><ul class="tsd-parameters"><li class="tsd-parameter"><h5>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span></h5></li><li class="tsd-parameter"><h5>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span></h5></li><li class="tsd-parameter"><h5>on<wbr/>Change<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon">on<wbr/>Change<span class="tsd-signature-symbol">(</span>this<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span>, name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-signature tsd-kind-icon">on<wbr/>Change<span class="tsd-signature-symbol">(</span>this<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span>, e<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ChangeEvent</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L32">index.ts:32</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>this: <span class="tsd-signature-type">void</span></h5></li><li><h5>name: <span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span></h5></li><li><h5>value: <span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L33">index.ts:33</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>this: <span class="tsd-signature-type">void</span></h5></li><li><h5>e: <span class="tsd-signature-type">ChangeEvent</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><h5>value: <span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span></h5></li><li><h5>errorMessage: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ReactNode</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter"><a id="FullFormState" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Full<wbr/>Form<wbr/>State<a href="#FullFormState" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Full<wbr/>Form<wbr/>State<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">FormStatus</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span>errors<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FormErrors</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L22">index.ts:22</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>State<span class="tsd-signature-symbol">: </span><a href="modules.html#StateRestriction" class="tsd-signature-type" data-tsd-kind="Type alias">StateRestriction</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter"><a id="HandleChangeAction" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Handle<wbr/>Change<wbr/>Action<a href="#HandleChangeAction" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Handle<wbr/>Change<wbr/>Action<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L24">index.ts:24</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>State<span class="tsd-signature-symbol">: </span><a href="modules.html#StateRestriction" class="tsd-signature-type" data-tsd-kind="Type alias">StateRestriction</a></h4></li><li><h4>R = <span class="tsd-signature-type">void</span></h4></li></ul><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>Name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">keyof </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span></h5></li><li><h5>value: <span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Name</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">R</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter"><a id="SliceProps" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Slice<wbr/>Props<a href="#SliceProps" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Slice<wbr/>Props<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Selected</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>children<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>selector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L40">index.ts:40</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>State<span class="tsd-signature-symbol">: </span><a href="modules.html#StateRestriction" class="tsd-signature-type" data-tsd-kind="Type alias">StateRestriction</a></h4></li><li><h4>Selected<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ReadonlyArray</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></h4></li></ul><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>children<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon">children<span class="tsd-signature-symbol">(</span>tool<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>handleChange<span class="tsd-signature-symbol">: </span><a href="modules.html#HandleChangeAction" class="tsd-signature-type" data-tsd-kind="Type alias">HandleChangeAction</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> }</span>, <span class="tsd-signature-symbol">...</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Readonly</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Selected</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ReactNode</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L42">index.ts:42</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>tool: <span class="tsd-signature-symbol">{ </span>handleChange<span class="tsd-signature-symbol">: </span><a href="modules.html#HandleChangeAction" class="tsd-signature-type" data-tsd-kind="Type alias">HandleChangeAction</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> }</span></h5><ul class="tsd-parameters"><li class="tsd-parameter"><h5>handle<wbr/>Change<span class="tsd-signature-symbol">: </span><a href="modules.html#HandleChangeAction" class="tsd-signature-type" data-tsd-kind="Type alias">HandleChangeAction</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span></h5></li></ul></li><li><h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>value: <span class="tsd-signature-type">Readonly</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Selected</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ReactNode</span></h4></li></ul></li><li class="tsd-parameter"><h5>selector<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon">selector<span class="tsd-signature-symbol">(</span>s<span class="tsd-signature-symbol">: </span><a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Selected</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L41">index.ts:41</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>s: <a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">Selected</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="StateRestriction" class="tsd-anchor"></a><h3 class="tsd-anchor-link">State<wbr/>Restriction<a href="#StateRestriction" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">State<wbr/>Restriction<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L11">index.ts:11</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter"><a id="createFormHook" class="tsd-anchor"></a><h3 class="tsd-anchor-link">create<wbr/>Form<wbr/>Hook<a href="#createFormHook" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">create<wbr/>Form<wbr/>Hook<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">StateBeforeValidation</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Schema</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>initialState<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">StateBeforeValidation</span>, schema<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Schema</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FormHook</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">StateBeforeValidation</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Schema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L222">index.ts:222</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>StateBeforeValidation</h4></li><li><h4>Schema<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ZodType</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Schema</span><span class="tsd-signature-symbol">></span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>initialState: <span class="tsd-signature-type" data-tsd-kind="Type parameter">StateBeforeValidation</span></h5></li><li><h5>schema: <span class="tsd-signature-type" data-tsd-kind="Type parameter">Schema</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">FormHook</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">StateBeforeValidation</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Schema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter"><a id="useFormSlice" class="tsd-anchor"></a><h3 class="tsd-anchor-link">use<wbr/>Form<wbr/>Slice<a href="#useFormSlice" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">use<wbr/>Form<wbr/>Slice<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Sliced</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>formController<span class="tsd-signature-symbol">: </span><a href="modules.html#Controller" class="tsd-signature-type" data-tsd-kind="Type alias">Controller</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span>, selector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>s<span class="tsd-signature-symbol">: </span><a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Sliced</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">readonly </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Sliced</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">ActionsCanBePublic</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/hachibeeDI/mayoiga/blob/1927b5f/src/index.ts#L305">index.ts:305</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>State<span class="tsd-signature-symbol">: </span><a href="modules.html#StateRestriction" class="tsd-signature-type" data-tsd-kind="Type alias">StateRestriction</a></h4></li><li><h4>Sliced</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>formController: <a href="modules.html#Controller" class="tsd-signature-type" data-tsd-kind="Type alias">Controller</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span></h5></li><li><h5>selector: <span class="tsd-signature-symbol">(</span>s<span class="tsd-signature-symbol">: </span><a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Sliced</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>s<span class="tsd-signature-symbol">: </span><a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Sliced</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>s: <a href="modules.html#FullFormState" class="tsd-signature-type" data-tsd-kind="Type alias">FullFormState</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">Sliced</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">readonly </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Sliced</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">ActionsCanBePublic</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">State</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">]</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#Controller" class="tsd-kind-icon">Controller</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#FieldProps" class="tsd-kind-icon">Field<wbr/>Props</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#FullFormState" class="tsd-kind-icon">Full<wbr/>Form<wbr/>State</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#HandleChangeAction" class="tsd-kind-icon">Handle<wbr/>Change<wbr/>Action</a></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="modules.html#SliceProps" class="tsd-kind-icon">Slice<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#StateRestriction" class="tsd-kind-icon">State<wbr/>Restriction</a></li><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#createFormHook" class="tsd-kind-icon">create<wbr/>Form<wbr/>Hook</a></li><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#useFormSlice" class="tsd-kind-icon">use<wbr/>Form<wbr/>Slice</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mayoiga",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Type safe hook based form library for React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
"test": "vitest run",
|
|
16
16
|
"prebuild": "npm run clean",
|
|
17
17
|
"build": "tsc",
|
|
18
|
-
"check:
|
|
18
|
+
"check:type": "tsc --noEmit",
|
|
19
|
+
"check:style": "prettier --check 'src/**/*.{js,ts,jsx,tsx}'",
|
|
19
20
|
"check:lint": "eslint 'src/**/*.{ts,tsx}'",
|
|
20
|
-
"check-all": "npm run check:style && npm run check:lint && npm run build --noEmit && npm run test",
|
|
21
|
-
"fix-all": "npm run check:style --write && npm run check:lint --fix",
|
|
21
|
+
"check-all": "npm run check:type && npm run check:style && npm run check:lint && npm run build --noEmit && npm run test",
|
|
22
|
+
"fix-all": "npm run check:style -- --write && npm run check:lint -- --fix",
|
|
22
23
|
"prepublish": "npm run check-all && npm run build"
|
|
23
24
|
},
|
|
24
25
|
"repository": {
|
|
@@ -45,23 +46,24 @@
|
|
|
45
46
|
"nozuchi": "^0.0.3"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@testing-library/react": "^13.
|
|
49
|
-
"@testing-library/user-event": "^14.
|
|
49
|
+
"@testing-library/react": "^13.4.0",
|
|
50
|
+
"@testing-library/user-event": "^14.4.3",
|
|
50
51
|
"@types/node": "^17.0.23",
|
|
51
|
-
"@types/react": "^18.0.
|
|
52
|
+
"@types/react": "^18.0.19",
|
|
52
53
|
"@types/use-sync-external-store": "^0.0.3",
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
54
|
-
"@typescript-eslint/parser": "^5.
|
|
55
|
-
"eslint": "^8.
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
|
55
|
+
"@typescript-eslint/parser": "^5.36.2",
|
|
56
|
+
"eslint": "^8.23.0",
|
|
56
57
|
"eslint-plugin-import": "^2.26.0",
|
|
57
|
-
"eslint-plugin-testing-library": "^5.3
|
|
58
|
-
"jsdom": "^
|
|
59
|
-
"prettier": "^2.
|
|
60
|
-
"react": "^18.
|
|
61
|
-
"react-dom": "^18.
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
58
|
+
"eslint-plugin-testing-library": "^5.6.3",
|
|
59
|
+
"jsdom": "^20.0.0",
|
|
60
|
+
"prettier": "^2.7.1",
|
|
61
|
+
"react": "^18.2.0",
|
|
62
|
+
"react-dom": "^18.2.0",
|
|
63
|
+
"typedoc": "^0.23.14",
|
|
64
|
+
"typescript": "^4.8.3",
|
|
65
|
+
"use-sync-external-store": "^1.2.0",
|
|
66
|
+
"vitest": "^0.23.2",
|
|
67
|
+
"zod": "^3.19.1"
|
|
66
68
|
}
|
|
67
69
|
}
|