profectus-docs/assets/api_modules_util_vue.md.6083a625.js

1 line
21 KiB
JavaScript

import{_ as e,c as t,o as r,a}from"./app.54d5a277.js";const b='{"title":"Module: util/vue","description":"","frontmatter":{},"headers":[{"level":2,"title":"Type aliases","slug":"type-aliases"},{"level":3,"title":"PropTypes","slug":"proptypes"},{"level":3,"title":"VueFeature","slug":"vuefeature"},{"level":2,"title":"Functions","slug":"functions"},{"level":3,"title":"coerceComponent","slug":"coercecomponent"},{"level":3,"title":"computeComponent","slug":"computecomponent"},{"level":3,"title":"computeOptionalComponent","slug":"computeoptionalcomponent"},{"level":3,"title":"isCoercableComponent","slug":"iscoercablecomponent"},{"level":3,"title":"processedPropType","slug":"processedproptype"},{"level":3,"title":"render","slug":"render"},{"level":3,"title":"renderCol","slug":"rendercol"},{"level":3,"title":"renderRow","slug":"renderrow"},{"level":3,"title":"setRefValue","slug":"setrefvalue"},{"level":3,"title":"setupHoldToClick","slug":"setupholdtoclick"},{"level":3,"title":"unwrapRef","slug":"unwrapref"},{"level":3,"title":"wrapRef","slug":"wrapref"}],"relativePath":"api/modules/util/vue.md"}',d={},o=a('<h1 id="module-util-vue" tabindex="-1">Module: util/vue <a class="header-anchor" href="#module-util-vue" aria-hidden="true">#</a></h1><h2 id="type-aliases" tabindex="-1">Type aliases <a class="header-anchor" href="#type-aliases" aria-hidden="true">#</a></h2><h3 id="proptypes" tabindex="-1">PropTypes <a class="header-anchor" href="#proptypes" aria-hidden="true">#</a></h3><p>\u01AC <strong>PropTypes</strong>: typeof <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" target="_blank" rel="noopener noreferrer"><code>Boolean</code></a> | typeof <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" target="_blank" rel="noopener noreferrer"><code>String</code></a> | typeof <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" target="_blank" rel="noopener noreferrer"><code>Number</code></a> | typeof <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" target="_blank" rel="noopener noreferrer"><code>Function</code></a> | typeof <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" target="_blank" rel="noopener noreferrer"><code>Object</code></a> | typeof <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" target="_blank" rel="noopener noreferrer"><code>Array</code></a></p><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L160" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:160</a></p><hr><h3 id="vuefeature" tabindex="-1">VueFeature <a class="header-anchor" href="#vuefeature" aria-hidden="true">#</a></h3><p>\u01AC <strong>VueFeature</strong>: <code>Object</code></p><h4 id="type-declaration" tabindex="-1">Type declaration <a class="header-anchor" href="#type-declaration" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>[Component]</code></td><td style="text-align:left;"><a href="./../features/feature.html#genericcomponent"><code>GenericComponent</code></a></td></tr><tr><td style="text-align:left;"><code>[GatherProps]</code></td><td style="text-align:left;">() =&gt; <code>Record</code>&lt;<code>string</code>, <code>unknown</code>&gt;</td></tr></tbody></table><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L49" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:49</a></p><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-hidden="true">#</a></h2><h3 id="coercecomponent" tabindex="-1">coerceComponent <a class="header-anchor" href="#coercecomponent" aria-hidden="true">#</a></h3><p>\u25B8 <strong>coerceComponent</strong>(<code>component</code>, <code>defaultWrapper?</code>): <code>DefineComponent</code></p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Default value</th></tr></thead><tbody><tr><td style="text-align:left;"><code>component</code></td><td style="text-align:left;"><a href="./../features/feature.html#coercablecomponent"><code>CoercableComponent</code></a></td><td style="text-align:left;"><code>undefined</code></td></tr><tr><td style="text-align:left;"><code>defaultWrapper</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;"><code>&quot;span&quot;</code></td></tr></tbody></table><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-hidden="true">#</a></h4><p><code>DefineComponent</code></p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L28" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:28</a></p><hr><h3 id="computecomponent" tabindex="-1">computeComponent <a class="header-anchor" href="#computecomponent" aria-hidden="true">#</a></h3><p>\u25B8 <strong>computeComponent</strong>(<code>component</code>, <code>defaultWrapper?</code>): <code>ShallowRef</code>&lt;<code>Component</code> | <a href="./../features/feature.html#jsxfunction"><code>JSXFunction</code></a> | <code>&quot;&quot;</code>&gt;</p><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Default value</th></tr></thead><tbody><tr><td style="text-align:left;"><code>component</code></td><td style="text-align:left;"><code>Ref</code>&lt;<a href="./computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<a href="./../features/feature.html#coercablecomponent"><code>CoercableComponent</code></a>&gt;&gt;</td><td style="text-align:left;"><code>undefined</code></td></tr><tr><td style="text-align:left;"><code>defaultWrapper</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;"><code>&quot;div&quot;</code></td></tr></tbody></table><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-hidden="true">#</a></h4><p><code>ShallowRef</code>&lt;<code>Component</code> | <a href="./../features/feature.html#jsxfunction"><code>JSXFunction</code></a> | <code>&quot;&quot;</code>&gt;</p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L122" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:122</a></p><hr><h3 id="computeoptionalcomponent" tabindex="-1">computeOptionalComponent <a class="header-anchor" href="#computeoptionalcomponent" aria-hidden="true">#</a></h3><p>\u25B8 <strong>computeOptionalComponent</strong>(<code>component</code>, <code>defaultWrapper?</code>): <code>ShallowRef</code>&lt;<code>Component</code> | <a href="./../features/feature.html#jsxfunction"><code>JSXFunction</code></a> | <code>&quot;&quot;</code> | <code>null</code>&gt;</p><h4 id="parameters-2" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-2" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Default value</th></tr></thead><tbody><tr><td style="text-align:left;"><code>component</code></td><td style="text-align:left;"><code>Ref</code>&lt;<a href="./computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>undefined</code> | <a href="./../features/feature.html#coercablecomponent"><code>CoercableComponent</code></a>&gt;&gt;</td><td style="text-align:left;"><code>undefined</code></td></tr><tr><td style="text-align:left;"><code>defaultWrapper</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;"><code>&quot;div&quot;</code></td></tr></tbody></table><h4 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-hidden="true">#</a></h4><p><code>ShallowRef</code>&lt;<code>Component</code> | <a href="./../features/feature.html#jsxfunction"><code>JSXFunction</code></a> | <code>&quot;&quot;</code> | <code>null</code>&gt;</p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L132" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:132</a></p><hr><h3 id="iscoercablecomponent" tabindex="-1">isCoercableComponent <a class="header-anchor" href="#iscoercablecomponent" aria-hidden="true">#</a></h3><p>\u25B8 <strong>isCoercableComponent</strong>(<code>component</code>): <code>component</code> is <a href="./../features/feature.html#coercablecomponent"><code>CoercableComponent</code></a></p><h4 id="parameters-3" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-3" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>component</code></td><td style="text-align:left;"><code>unknown</code></td></tr></tbody></table><h4 id="returns-3" tabindex="-1">Returns <a class="header-anchor" href="#returns-3" aria-hidden="true">#</a></h4><p><code>component</code> is <a href="./../features/feature.html#coercablecomponent"><code>CoercableComponent</code></a></p><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L73" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:73</a></p><hr><h3 id="processedproptype" tabindex="-1">processedPropType <a class="header-anchor" href="#processedproptype" aria-hidden="true">#</a></h3><p>\u25B8 <strong>processedPropType</strong>&lt;<code>T</code>&gt;(...<code>types</code>): <code>PropType</code>&lt;<a href="./computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>T</code>&gt;&gt;</p><h4 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td></tr></tbody></table><h4 id="parameters-4" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-4" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>...types</code></td><td style="text-align:left;"><a href="./vue.html#proptypes"><code>PropTypes</code></a>[]</td></tr></tbody></table><h4 id="returns-4" tabindex="-1">Returns <a class="header-anchor" href="#returns-4" aria-hidden="true">#</a></h4><p><code>PropType</code>&lt;<a href="./computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>T</code>&gt;&gt;</p><h4 id="defined-in-6" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-6" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L169" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:169</a></p><hr><h3 id="render" tabindex="-1">render <a class="header-anchor" href="#render" aria-hidden="true">#</a></h3><p>\u25B8 <strong>render</strong>(<code>object</code>): <code>JSX.Element</code> | <code>DefineComponent</code></p><h4 id="parameters-5" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-5" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>object</code></td><td style="text-align:left;"><a href="./../features/feature.html#coercablecomponent"><code>CoercableComponent</code></a> | <a href="./vue.html#vuefeature"><code>VueFeature</code></a></td></tr></tbody></table><h4 id="returns-5" tabindex="-1">Returns <a class="header-anchor" href="#returns-5" aria-hidden="true">#</a></h4><p><code>JSX.Element</code> | <code>DefineComponent</code></p><h4 id="defined-in-7" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-7" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L54" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:54</a></p><hr><h3 id="rendercol" tabindex="-1">renderCol <a class="header-anchor" href="#rendercol" aria-hidden="true">#</a></h3><p>\u25B8 <strong>renderCol</strong>(...<code>objects</code>): <code>JSX.Element</code></p><h4 id="parameters-6" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-6" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>...objects</code></td><td style="text-align:left;">(<a href="./../features/feature.html#coercablecomponent"><code>CoercableComponent</code></a> | <a href="./vue.html#vuefeature"><code>VueFeature</code></a>)[]</td></tr></tbody></table><h4 id="returns-6" tabindex="-1">Returns <a class="header-anchor" href="#returns-6" aria-hidden="true">#</a></h4><p><code>JSX.Element</code></p><h4 id="defined-in-8" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-8" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L69" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:69</a></p><hr><h3 id="renderrow" tabindex="-1">renderRow <a class="header-anchor" href="#renderrow" aria-hidden="true">#</a></h3><p>\u25B8 <strong>renderRow</strong>(...<code>objects</code>): <code>JSX.Element</code></p><h4 id="parameters-7" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-7" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>...objects</code></td><td style="text-align:left;">(<a href="./../features/feature.html#coercablecomponent"><code>CoercableComponent</code></a> | <a href="./vue.html#vuefeature"><code>VueFeature</code></a>)[]</td></tr></tbody></table><h4 id="returns-7" tabindex="-1">Returns <a class="header-anchor" href="#returns-7" aria-hidden="true">#</a></h4><p><code>JSX.Element</code></p><h4 id="defined-in-9" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-9" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L65" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:65</a></p><hr><h3 id="setrefvalue" tabindex="-1">setRefValue <a class="header-anchor" href="#setrefvalue" aria-hidden="true">#</a></h3><p>\u25B8 <strong>setRefValue</strong>&lt;<code>T</code>&gt;(<code>ref</code>, <code>value</code>): <code>void</code></p><h4 id="type-parameters-1" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-1" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td></tr></tbody></table><h4 id="parameters-8" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-8" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>ref</code></td><td style="text-align:left;"><code>Ref</code>&lt;<code>T</code> | <code>Ref</code>&lt;<code>T</code>&gt;&gt;</td></tr><tr><td style="text-align:left;"><code>value</code></td><td style="text-align:left;"><code>T</code></td></tr></tbody></table><h4 id="returns-8" tabindex="-1">Returns <a class="header-anchor" href="#returns-8" aria-hidden="true">#</a></h4><p><code>void</code></p><h4 id="defined-in-10" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-10" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L152" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:152</a></p><hr><h3 id="setupholdtoclick" tabindex="-1">setupHoldToClick <a class="header-anchor" href="#setupholdtoclick" aria-hidden="true">#</a></h3><p>\u25B8 <strong>setupHoldToClick</strong>(<code>onClick?</code>, <code>onHold?</code>): <code>Object</code></p><h4 id="parameters-9" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-9" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>onClick?</code></td><td style="text-align:left;"><code>Ref</code>&lt;<code>undefined</code> | <code>VoidFunction</code>&gt;</td></tr><tr><td style="text-align:left;"><code>onHold?</code></td><td style="text-align:left;"><code>Ref</code>&lt;<code>undefined</code> | <code>VoidFunction</code>&gt;</td></tr></tbody></table><h4 id="returns-9" tabindex="-1">Returns <a class="header-anchor" href="#returns-9" aria-hidden="true">#</a></h4><p><code>Object</code></p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>handleHolding</code></td><td style="text-align:left;"><code>VoidFunction</code></td></tr><tr><td style="text-align:left;"><code>start</code></td><td style="text-align:left;"><code>VoidFunction</code></td></tr><tr><td style="text-align:left;"><code>stop</code></td><td style="text-align:left;"><code>VoidFunction</code></td></tr></tbody></table><h4 id="defined-in-11" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-11" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L88" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:88</a></p><hr><h3 id="unwrapref" tabindex="-1">unwrapRef <a class="header-anchor" href="#unwrapref" aria-hidden="true">#</a></h3><p>\u25B8 <strong>unwrapRef</strong>&lt;<code>T</code>&gt;(<code>ref</code>): <code>T</code></p><h4 id="type-parameters-2" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-2" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td></tr></tbody></table><h4 id="parameters-10" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-10" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>ref</code></td><td style="text-align:left;"><code>Ref</code>&lt;<a href="./computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>T</code>&gt;&gt;</td></tr></tbody></table><h4 id="returns-10" tabindex="-1">Returns <a class="header-anchor" href="#returns-10" aria-hidden="true">#</a></h4><p><code>T</code></p><h4 id="defined-in-12" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-12" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L148" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:148</a></p><hr><h3 id="wrapref" tabindex="-1">wrapRef <a class="header-anchor" href="#wrapref" aria-hidden="true">#</a></h3><p>\u25B8 <strong>wrapRef</strong>&lt;<code>T</code>&gt;(<code>ref</code>): <code>ComputedRef</code>&lt;<code>T</code>&gt;</p><h4 id="type-parameters-3" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-3" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td></tr></tbody></table><h4 id="parameters-11" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-11" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>ref</code></td><td style="text-align:left;"><code>Ref</code>&lt;<a href="./computed.html#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>T</code>&gt;&gt;</td></tr></tbody></table><h4 id="returns-11" tabindex="-1">Returns <a class="header-anchor" href="#returns-11" aria-hidden="true">#</a></h4><p><code>ComputedRef</code>&lt;<code>T</code>&gt;</p><h4 id="defined-in-13" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-13" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/305946e/src/util/vue.tsx#L144" target="_blank" rel="noopener noreferrer">profectus/src/util/vue.tsx:144</a></p>',130),n=[o];function l(c,s,i,h,p,f){return r(),t("div",null,n)}var g=e(d,[["render",l]]);export{b as __pageData,g as default};