<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Larcohex</title><description>Kudayar Pirimbaev&apos;s personal website</description><link>https://larcohex.netlify.app/</link><item><title>Cypress mousemove event inconsistency</title><link>https://larcohex.netlify.app/posts/07-09-2022-cypress-mousemove-event-inconsistency</link><guid isPermaLink="true">https://larcohex.netlify.app/posts/07-09-2022-cypress-mousemove-event-inconsistency</guid><description>This will prevent some headache for you</description><pubDate>Wed, 07 Sep 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://www.cypress.io/&quot;&gt;Cypress&lt;/a&gt; is a great testing tool, but as always testing comes with some behaviors that you cannot predict. I have stumbled upon one recently and wanted to share.&lt;/p&gt;
&lt;p&gt;If your feature uses mouse events, to test their behavior properly, do not use methods provided by Cypress like &lt;code&gt;trigger&lt;/code&gt;. Instead find the native element and dispatch event natively.&lt;/p&gt;
&lt;p&gt;For example, if I have logic on &lt;code&gt;mousemove&lt;/code&gt; event, Cypress documentation suggests doing something like this.&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;cy&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;...&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;trigger&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;mousemove&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; x&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; y)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Visually in Cypress runner it looks fine, but under the hood mouse is immediately moved to the position with an empty event. So, if my logic uses fields &lt;code&gt;movementX&lt;/code&gt; and &lt;code&gt;movementY&lt;/code&gt; for let’s say positioning, we have a problem here - fields that are used from native event are undefined, so it would not move elements to proper places. This behavior is consistent with other Cypress commands like &lt;code&gt;click&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So to fix that, we can do something like this.&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;cy&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;...&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;then&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;element&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;  const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; mouseEvent &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt; new&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; MouseEvent&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;mousemove&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    movementX&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; x&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    movementY&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; y&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  })&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  element&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;dispatchEvent&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(mouseEvent)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;})&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;bonus&quot;&gt;Bonus&lt;/h4&gt;
&lt;p&gt;if your code checks which button is pressed on mouse, you should explicitly mention the button when dispatching events like &lt;code&gt;mousedown&lt;/code&gt; and &lt;code&gt;mouseup&lt;/code&gt; via &lt;code&gt;trigger&lt;/code&gt;, else they are also undefined. Or just use proper functions like &lt;code&gt;click&lt;/code&gt;.&lt;/p&gt;</content:encoded></item><item><title>The (al)most complete dynamic form with VeeValidate and Composition API</title><link>https://larcohex.netlify.app/posts/13-10-2021-the-almost-complete-dynamic-form-with-validation-using-vee-validate</link><guid isPermaLink="true">https://larcohex.netlify.app/posts/13-10-2021-the-almost-complete-dynamic-form-with-validation-using-vee-validate</guid><description>With validation using VeeValidate and Composition API</description><pubDate>Mon, 20 Sep 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If you tried to incorporate validation to your forms, you’ve probably stumbled upon libraries like
&lt;a href=&quot;https://vuelidate.js.org/&quot;&gt;Vuelidate&lt;/a&gt; and &lt;a href=&quot;https://vee-validate.logaretm.com/&quot;&gt;VeeValidate&lt;/a&gt; - both very powerful libraries, but currently only VeeValidate supports 3rd version of Vue in stable version. Recently I have tried to make a dynamic form with validation, and I have encountered a number of problems that are tricky to solve.&lt;/p&gt;
&lt;p&gt;Before diving in, let me list things that were required for my dynamic form:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;field validation&lt;/li&gt;
&lt;li&gt;nested fields support&lt;/li&gt;
&lt;li&gt;field array support&lt;/li&gt;
&lt;li&gt;schema update support&lt;/li&gt;
&lt;li&gt;custom input support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;real-world-example&quot;&gt;Real-world example&lt;/h2&gt;
&lt;p&gt;We are going to implement a survey for frontend developers. In the survey we’re going to ask what frameworks a user has experience with and ask some questions for selected items including experience details.&lt;/p&gt;
&lt;p&gt;The workflow will be as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;user selects frameworks&lt;/li&gt;
&lt;li&gt;for each selected framework appropriate inputs appear&lt;/li&gt;
&lt;li&gt;for each selected framework button appears that create inputs for new job experience item&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is form’s image.&lt;/p&gt;
&lt;img src=&quot;/_astro/dynamic-form.CjpeY5tV_ttkA7.webp&quot; alt=&quot;Dynamic Form Screenshot&quot; title=&quot;Dynamic Form&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1908&quot; height=&quot;997&quot;&gt;
&lt;p&gt;&lt;em&gt;NOTE: for this example I’m going to use &lt;a href=&quot;vitejs.dev/&quot;&gt;vite&lt;/a&gt; and &lt;a href=&quot;https://tailwindui.com/&quot;&gt;Tailwind UI&lt;/a&gt; (hence the looks), but it is applicable for other toolings like &lt;a href=&quot;https://cli.vuejs.org/&quot;&gt;vue-cli&lt;/a&gt; and &lt;a href=&quot;https://nuxtjs.org/&quot;&gt;nuxt&lt;/a&gt;, so don’t mind the presence of Vue SFC file extensions in imports - vite requires that they are present. Also I’m going to use &lt;a href=&quot;https://lodash.com/&quot;&gt;lodash&lt;/a&gt; functions, but you can use native functions or copy from lodash if you can’t use it.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;schema-format&quot;&gt;Schema format&lt;/h2&gt;
&lt;p&gt;Each field (NOT field array) in a schema should have:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;id&lt;/code&gt; - this will be used for recursive field component&lt;/li&gt;
&lt;li&gt;&lt;code&gt;name&lt;/code&gt; - for vee-validate to initialize schema&lt;/li&gt;
&lt;li&gt;&lt;code&gt;component&lt;/code&gt; - which component to render&lt;/li&gt;
&lt;li&gt;&lt;code&gt;label&lt;/code&gt; - to show label for input (you can use it for placeholders or have separate field for it)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rules&lt;/code&gt; - validation rules (going to use &lt;a href&gt;yup&lt;/a&gt; here)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;initialValue&lt;/code&gt; - initial value for input&lt;/li&gt;
&lt;li&gt;&lt;code&gt;options&lt;/code&gt; - options for select component&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For field array schema should have:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;label&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fields&lt;/code&gt; - list of fields for new items each having the same schema listed above&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So, in case of our example, the schema will be as following:&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; { array } &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;yup&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; schema &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  frameworks&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Which frameworks do you have experience with?&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;CheckboxGroup&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;frameworks&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; []&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; array&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;of&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;())&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;min&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Please, select one of frameworks&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    options&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; frameworks&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  data&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {}&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;data&lt;/code&gt; is going to contain generated schema for each selected framework similar to following:&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;schema&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;data &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  vue&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    opinion&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; `What is your opinion on Vue?`&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Textarea&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; `data.vue.opinion`&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    experience&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;data.experience&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Past experience&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      addLabel&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Add past experience&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      fields&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 3&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Framework&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Select&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;framework&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;vue&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          options&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; pick&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(frameworks&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; values&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;frameworks)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 4&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Title&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;TextInput&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;title&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 5&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Company&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;TextInput&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;company&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 6&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Start date (year)&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;TextInput&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;start&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 7&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;End date (year)&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;TextInput&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;end&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;          rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;      ]&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can also add any fields you want.&lt;/p&gt;
&lt;h2 id=&quot;main-page-component&quot;&gt;Main page component&lt;/h2&gt;
&lt;p&gt;The main page should contain the schema mentioned above and listen to changes in form values. If the value of &lt;code&gt;frameworks&lt;/code&gt; field changes, it should add or remove fields based on value.&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#59C2FF&quot;&gt;Form&lt;/span&gt;&lt;span style=&quot;color:#D95757&quot;&gt; @change=&amp;quot;updateSchema&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F29668&quot;&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; { ref } &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;#39;vue&amp;#39;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; { string } &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;#39;yup&amp;#39;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; isEqual &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;#39;lodash-es/isEqual&amp;#39;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; cloneDeep &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;#39;lodash-es/cloneDeep&amp;#39;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; forEach &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;#39;lodash-es/forEach&amp;#39;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; has &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;#39;lodash-es/has&amp;#39;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; updateSchema&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;values&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;isEqual&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(values&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;frameworks&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; selectedFrameworks)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        selectedFrameworks &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; values&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;frameworks&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;        const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; newSchema &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; cloneDeep&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(schema)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;        forEach&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(values&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;frameworks&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;framework&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            newSchema&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;data[framework] &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                opinion&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 2&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; `What is your opinion on &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;frameworks[framework]&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;?`&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Textarea&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; `data.&lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;framework&lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;.opinion`&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        })&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; (values&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;frameworks&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;length) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            newSchema&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;experience &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;data.experience&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Past experience&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                addLabel&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Add past experience&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                fields&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 3&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Framework&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Select&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;framework&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; values&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;frameworks[&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        options&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; pick&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(frameworks&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; values&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;frameworks)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 4&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Title&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;TextInput&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;title&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 5&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Company&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;TextInput&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;company&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 6&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;Start date (year)&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;TextInput&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;start&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        id&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; 7&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        label&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;End date (year)&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;TextInput&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;end&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                        rules&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field is required&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                ]&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        reactiveSchema&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;value &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; newSchema&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;form-component&quot;&gt;Form component&lt;/h2&gt;
&lt;p&gt;We are going to use &lt;code&gt;useForm&lt;/code&gt; in this component just for accumulating values and checking if the whole form is valid. Validation is going to be initiated in each form field instead.&lt;/p&gt;
&lt;p&gt;We are going to watch changes to form values and emit change event to update schema.&lt;/p&gt;
&lt;p&gt;Since one of the requirements for form is support of schema with any nesting depth, we are going to create a separate field component that is going to be recursive.&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#59C2FF&quot;&gt;Field&lt;/span&gt;&lt;span style=&quot;color:#D95757&quot;&gt; :field=&amp;quot;schema&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F29668&quot;&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; { useForm } &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;#39;vee-validate&amp;#39;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    props&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        schema&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            type&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; Object&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; true&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;    setup&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;        const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; { values&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; handleSubmit&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; meta } &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; useForm&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;        watch&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(values&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;newValues&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;            emit&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;#39;change&amp;#39;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; newValues)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        })&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;field-component&quot;&gt;Field component&lt;/h2&gt;
&lt;p&gt;These are the conditions for component recursion:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If current node contains &lt;code&gt;id&lt;/code&gt; - render field component&lt;/li&gt;
&lt;li&gt;If current node contains &lt;code&gt;addLabel&lt;/code&gt; - create array field and add recursion for each added item&lt;/li&gt;
&lt;li&gt;Else add recursion for each field child&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; v-if&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;hasId()&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;sm:col-span-6&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;component&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;            :is=&amp;quot;field.component&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;            v-bind&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;field&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;            v-model&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;value&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;            :error=&amp;quot;errorMessage&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;            @blur=&amp;quot;handleBlur&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;component&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; v-else-if&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;isArray()&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;h4&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; v-show&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;fields.length&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;font-medium sm:col-span-6&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;            {&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;{ field.label }&lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;h4&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;sm:col-span-6 space-y-6 divide-y&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;            &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;div&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;                v-for&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;(childField, index) in fields&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;                :key=&amp;quot;childField.key&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;                class&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;space-y-6&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;            &amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;            &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#59C2FF&quot;&gt;Field&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;                v-for&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;formField in field.fields&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;                :key=&amp;quot;formField.id&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;                :field=&amp;quot;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;                    ...formField,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;                    name:&lt;/span&gt;&lt;span style=&quot;color:#D95757&quot;&gt; `${field.name}[${index}].${formField.name}`,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;                }&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;            /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;            &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;button&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;                type&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;                class&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    inline-flex&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    items-center&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    px-4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    py-2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    border border-transparent&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    text-sm&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    font-medium&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    rounded-md&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    text-indigo-700&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    bg-indigo-100&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    hover:bg-indigo-200&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    focus:outline-none&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    focus:ring-2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    focus:ring-offset-2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                    focus:ring-indigo-500&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                &amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;                @click=&amp;quot;remove(index)&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;            &amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;                &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#59C2FF&quot;&gt;XIcon&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;-ml-1 mr-2 h-5 w-5&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; aria-hidden&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                Remove&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;            &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;sm:col-span-6&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;button&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;            type&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;            class&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                inline-flex&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                items-center&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                px-4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                py-2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                border border-transparent&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                shadow-sm&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                text-sm&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                font-medium&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                rounded-md&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                text-white&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                bg-indigo-600&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                hover:bg-indigo-700&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                focus:outline-none&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                focus:ring-2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                focus:ring-offset-2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;                focus:ring-indigo-500&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;            &amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;            @click=&amp;quot;push&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;            &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#59C2FF&quot;&gt;PlusIcon&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;-ml-1 mr-2 h-5 w-5&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; aria-hidden&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            Add&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;template&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;        v-for&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;(childField, index) in field&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;        v-else&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D95757&quot;&gt;        :key=&amp;quot;childField.id&lt;/span&gt;&lt;span style=&quot;color:#D95757&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;color:#D95757&quot;&gt; index&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#59C2FF&quot;&gt;Field&lt;/span&gt;&lt;span style=&quot;color:#D95757&quot;&gt; :field=&amp;quot;childField&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;    &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;import &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; useField&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; useFieldArray &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; from &amp;quot;vee-validate&amp;quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;import has from &amp;quot;lodash-es/has&amp;quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;import fromPairs from &amp;quot;lodash-es/fromPairs&amp;quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;import map from &amp;quot;lodash-es/map&amp;quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;import &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; PlusIcon&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; XIcon &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; from &amp;quot;@heroicons/vue/solid&amp;quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;// Don&amp;#39;t forget to import your custom components&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;export default &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    name: &lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;Field&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#5A6673;font-style:italic&quot;&gt;    // Don&amp;#39;t forget to declare your custom components&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    components: { PlusIcon&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; XIcon&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    props: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        field&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            type&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; Object&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            required&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt; true&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;    setup&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(props) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        const &lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;hasId&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; has&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(props&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;field&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;id&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        const &lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;isArray&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; has&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(props&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;field&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;addLabel&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        const result &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; { hasId&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; isArray };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;hasId&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;            const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; { value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; handleBlur&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; errorMessage } &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; useField&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                props&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;field&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;                props&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;field&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;validation&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            )&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            result&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;value &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            result&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;handleBlur &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; handleBlur&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            result&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;errorMessage &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; errorMessage&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;isArray&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;()) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;            const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; { remove&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; push&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; fields } &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; useFieldArray&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(props&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;field&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;name)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;            const&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt; getInitialValues&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;            fromPairs&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;                map&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(props&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;field&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;fields&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;field&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; [field&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; field&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;value])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            )&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            result&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#D2A6FF&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;                remove&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(index)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            result&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;                push&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;getInitialValues&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;())&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;            result&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;fields &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; fields&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;        return result;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#39BAE6&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color:#39BAE680&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;/h2&gt;
&lt;p&gt;Here are the &lt;a href=&quot;https://dynamic-form-vue.netlify.app/&quot;&gt;demo&lt;/a&gt; and &lt;a href=&quot;https://github.com/larcohex/dynamic-form&quot;&gt;source code&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title>Grouping lazy loaded routes in Vite</title><link>https://larcohex.netlify.app/posts/20-09-2021-vite-grouping-routes</link><guid isPermaLink="true">https://larcohex.netlify.app/posts/20-09-2021-vite-grouping-routes</guid><description>Because there is no post about it</description><pubDate>Wed, 13 Oct 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;If you use &lt;a href=&quot;https://vitejs.dev/&quot;&gt;vite&lt;/a&gt; long enough, you quickly realize that &lt;a href=&quot;https://next.router.vuejs.org/&quot;&gt;vue-router&lt;/a&gt; shows how to group lazy routes into chunks for webpack only. Googling this problem might lead you to this &lt;a href=&quot;https://github.com/vitejs/vite/issues/745&quot;&gt;Github issue&lt;/a&gt; which vaguely explains how to do it. Evan You, creator of &lt;a href=&quot;https://v3.vuejs.org/&quot;&gt;vue.js&lt;/a&gt;, decided that only link to the latest &lt;a href=&quot;https://vitejs.dev/guide/features.html#glob-import&quot;&gt;glob import feature&lt;/a&gt; is enough, but it took me a bit of time to understand, how to apply this feature to vue-router. so to save you some time here is how to do it.&lt;/p&gt;
&lt;h2 id=&quot;glob-import&quot;&gt;Glob Import&lt;/h2&gt;
&lt;p&gt;From the page linked in the issue, we can see that vite is able to group imports using the following syntax&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; modules &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt; import&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;meta&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;glob&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;./dir/*.js&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which returns an object with path to file as key and function that imports component as a value.&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#5A6673;font-style:italic&quot;&gt;// code produced by vite&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; modules &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;  &amp;quot;./dir/foo.js&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt; import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;./dir/foo.js&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;  &amp;quot;./dir/bar.js&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt; import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;./dir/bar.js&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will make sure that chunks are imported in parallel (basically the same as grouping in webpack). So, using this, we can group import routes like this (using glob matching &lt;a href=&quot;https://github.com/mrmlnc/fast-glob#pattern-syntax&quot;&gt;supported&lt;/a&gt; by &lt;code&gt;fast-glob&lt;/code&gt;)&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; auth &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt; import&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;meta&lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFB454&quot;&gt;glob&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;/src/views/auth/**/{Login,Signup}.vue&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which will produce something like this depending on your project folder structure.&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#5A6673;font-style:italic&quot;&gt;// code produced by vite&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; auth &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;  &amp;quot;/src/views/auth/login/Login.vue&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F29668&quot;&gt;    import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;/src/views/auth/login/Login.vue&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;  &amp;quot;/src/views/auth/signup/Signup.vue&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F29668&quot;&gt;    import&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;/src/views/auth/login/Login.vue&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To assign component to route we can do:&lt;/p&gt;
&lt;pre class=&quot;astro-code ayu-dark&quot; style=&quot;background-color:#0d1017;color:#bfbdb6;overflow-x:auto&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FF8F40&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; routes &lt;/span&gt;&lt;span style=&quot;color:#F29668&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    path&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;/login&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; auth[&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;/src/views/auth/login/Login.vue&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    path&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt; &amp;quot;/signup&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;    component&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt; auth[&lt;/span&gt;&lt;span style=&quot;color:#AAD94C&quot;&gt;&amp;quot;/src/views/auth/signup/Signup.vue&amp;quot;&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;  }&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#BFBDB6&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color:#BFBDB6B3&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded></item></channel></rss>