profectus-docs/assets/api_modules_features_tree.md.ea396790.js

2 lines
119 KiB
JavaScript
Raw Normal View History

import{_ as t,c as e,o as d,N as l}from"./chunks/framework.0799945b.js";const h=JSON.parse('{"title":"Module: features/trees/tree","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/tree.md","lastUpdated":null}'),o={name:"api/modules/features/tree.md"},r=l('<h1 id="module-features-trees-tree" tabindex="-1">Module: features/trees/tree <a class="header-anchor" href="#module-features-trees-tree" aria-label="Permalink to &quot;Module: features/trees/tree&quot;"></a></h1><h2 id="interfaces" tabindex="-1">Interfaces <a class="header-anchor" href="#interfaces" aria-label="Permalink to &quot;Interfaces&quot;"></a></h2><h3 id="basetree" tabindex="-1">BaseTree <a class="header-anchor" href="#basetree" aria-label="Permalink to &quot;BaseTree&quot;"></a></h3><p> <strong>BaseTree</strong>: <code>Object</code></p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>[Component]</code></td><td style="text-align:left;"><a href="./feature#genericcomponent"><code>GenericComponent</code></a></td><td style="text-align:left;">The Vue component used to render this feature.</td></tr><tr><td style="text-align:left;"><code>[GatherProps]</code></td><td style="text-align:left;">() =&gt; <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a>&lt;<code>string</code>, <code>unknown</code>&gt;</td><td style="text-align:left;">A function to gather the props the vue component requires for this feature.</td></tr><tr><td style="text-align:left;"><code>id</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.</td></tr><tr><td style="text-align:left;"><code>isResetting</code></td><td style="text-align:left;"><code>Ref</code>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">A flag that is true while the reset is still propagating through the tree.</td></tr><tr><td style="text-align:left;"><code>links</code></td><td style="text-align:left;"><code>Ref</code>&lt;<a href="./links#link"><code>Link</code></a>[]&gt;</td><td style="text-align:left;">The link objects for each of the branches of the tree.</td></tr><tr><td style="text-align:left;"><code>reset</code></td><td style="text-align:left;">(<code>node</code>: <a href="./tree#generictreenode"><code>GenericTreeNode</code></a>) =&gt; <code>void</code></td><td style="text-align:left;">Cause a reset on this node and propagate it through the tree according to resetPropagation.</td></tr><tr><td style="text-align:left;"><code>resettingNode</code></td><td style="text-align:left;"><code>Ref</code>&lt;<code>null</code> | <a href="./tree#generictreenode"><code>GenericTreeNode</code></a>&gt;</td><td style="text-align:left;">A reference to the node that caused the currently propagating reset.</td></tr><tr><td style="text-align:left;"><code>type</code></td><td style="text-align:left;">typeof <a href="./tree#treetype"><code>TreeType</code></a></td><td style="text-align:left;">A symbol that helps identify features of the same type.</td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/b666e0c/src/features/trees/tree.ts#L201" target="_blank" rel="noreferrer">profectus/src/features/trees/tree.ts:201</a></p><hr><h3 id="basetreenode" tabindex="-1">BaseTreeNode <a class="header-anchor" href="#basetreenode" aria-label="Permalink to &quot;BaseTreeNode&quot;"></a></h3><p> <strong>BaseTreeNode</strong>: <code>Object</code></p><p>The properties that are added onto a processed <a href="./tree#treenodeoptions">TreeNodeOptions</a> to create an <a href="./tree#treenode">TreeNode</a>.</p><table><thea