@twobirds/microcomponents 0.0.3 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MicroComponentProposal_draft.md +1 -1
- package/README.md +43 -58
- package/dist/microcomponents.d.ts +218 -2
- package/dist/microcomponents.d.ts.map +1 -1
- package/dist/microcomponents.js +237 -43
- package/dist/microcomponents.min.js +7 -6
- package/dist/microcomponents.ts +391 -201
- package/jsdoc.conf.json +19 -0
- package/microcomponents_usage.md +56 -24
- package/microcomponents_why.md +25 -0
- package/package.json +13 -2
- package/public/docs/assets/highlight.css +14 -14
- package/public/docs/assets/search.js +1 -1
- package/public/docs/classes/microcomponents.MC.html +179 -41
- package/public/docs/classes/microcomponents_es3.MC.html +12 -12
- package/public/docs/functions/microcomponents_es3.__isEmpty.html +1 -1
- package/public/docs/index.html +15 -59
- package/public/docs/interfaces/microcomponents.HTMLElementMc.html +2 -2
- package/public/docs/modules/microcomponents.html +1 -1
- package/public/jsdoc/es3/files.html +216 -0
- package/public/jsdoc/es3/index.html +210 -0
- package/public/jsdoc/es3/symbols/_global_.html +368 -0
- package/public/jsdoc/es3/symbols/src/build_microcomponents.es3.js.html +104 -0
- package/public/jsdoc/es5+/files.html +218 -0
- package/public/jsdoc/es5+/index.html +218 -0
- package/public/jsdoc/es5+/symbols/MC.html +621 -0
- package/public/jsdoc/es5+/symbols/_global_.html +720 -0
- package/public/jsdoc/es5+/symbols/microcomponents.MC.html +323 -0
- package/public/jsdoc/es5+/symbols/src/build_microcomponents.js.html +375 -0
- package/src/microcomponents.ts +391 -201
|
@@ -16,12 +16,25 @@
|
|
|
16
16
|
<li><a href="../modules/microcomponents.html">microcomponents</a></li>
|
|
17
17
|
<li><a href="microcomponents.MC.html">MC</a></li></ul>
|
|
18
18
|
<h1>Class MC</h1></div>
|
|
19
|
+
<section class="tsd-panel tsd-comment">
|
|
20
|
+
<div class="tsd-comment tsd-typography"><p>Manages microcomponents (MCs) attached to DOM elements, allowing for the
|
|
21
|
+
addition, removal, and traversal of microcomponents across siblings, parents,
|
|
22
|
+
children, and descendants.</p>
|
|
23
|
+
<p>This class provides an API for interacting with microcomponents on DOM elements.
|
|
24
|
+
Public microcomponents are stored on the <code>_mc</code> attribute of the DOM element, while
|
|
25
|
+
private microcomponents are managed internally.</p>
|
|
26
|
+
|
|
27
|
+
<h3>Example</h3><pre><code class="language-javascript"><br/><span class="hl-2">// create the micro component class</span><br/><span class="hl-3">class</span><span class="hl-4"> </span><span class="hl-5">MyMC</span><span class="hl-4"> </span><span class="hl-3">extends</span><span class="hl-4"> </span><span class="hl-5">MC</span><span class="hl-4">{</span><br/><br/><span class="hl-4">&</span><span class="hl-6">nbsp</span><span class="hl-4">;</span><span class="hl-3">constructor</span><span class="hl-4">( </span><span class="hl-6">target</span><span class="hl-4"> ){</span><br/><span class="hl-4">&</span><span class="hl-6">nbsp</span><span class="hl-4">;&</span><span class="hl-6">nbsp</span><span class="hl-4">;</span><span class="hl-3">super</span><span class="hl-4">( </span><span class="hl-6">target</span><span class="hl-4"> );</span><br/><span class="hl-4">&</span><span class="hl-6">nbsp</span><span class="hl-4">;&</span><span class="hl-6">nbsp</span><span class="hl-4">;</span><span class="hl-3">this</span><span class="hl-4">.</span><span class="hl-6">target</span><span class="hl-4"> = </span><span class="hl-6">target</span><span class="hl-4">;</span><br/><span class="hl-4">&</span><span class="hl-6">nbsp</span><span class="hl-4">;}</span><br/><span class="hl-4">}</span><br/><br/><span class="hl-3">const</span><span class="hl-4"> </span><span class="hl-7">element</span><span class="hl-4"> = </span><span class="hl-6">document</span><span class="hl-4">.</span><span class="hl-8">querySelector</span><span class="hl-4">(</span><span class="hl-9">'div'</span><span class="hl-4">)</span><br/><br/><span class="hl-2">// Add the top level microcomponent to the target element</span><br/><span class="hl-3">let</span><span class="hl-4"> </span><span class="hl-6">mcc</span><span class="hl-4"> = </span><span class="hl-7">MC</span><span class="hl-4">.</span><span class="hl-8">add</span><span class="hl-4">(</span><br/><span class="hl-4">&</span><span class="hl-6">nbsp</span><span class="hl-4">;</span><span class="hl-6">element</span><span class="hl-4">,</span><br/><span class="hl-4">&</span><span class="hl-6">nbsp</span><span class="hl-4">;</span><span class="hl-9">'myMC'</span><span class="hl-4">,</span><br/><span class="hl-4">&</span><span class="hl-6">nbsp</span><span class="hl-4">;</span><span class="hl-3">new</span><span class="hl-4"> </span><span class="hl-8">MyMC</span><span class="hl-4">( </span><span class="hl-6">element</span><span class="hl-4"> )</span><br/><span class="hl-4">);</span><br/><br/><span class="hl-2">// Add an inner (private) microcomponent to mcc</span><br/><span class="hl-3">let</span><span class="hl-4"> </span><span class="hl-6">mcc</span><span class="hl-4">.add(</span><br/><span class="hl-4">&</span><span class="hl-6">nbsp</span><span class="hl-4">;</span><span class="hl-9">'myInnerMC'</span><span class="hl-4">,</span><br/><span class="hl-4">&</span><span class="hl-6">nbsp</span><span class="hl-4">;</span><span class="hl-3">new</span><span class="hl-4"> </span><span class="hl-8">MyMC</span><span class="hl-4">( </span><span class="hl-6">element</span><span class="hl-4"> )</span><br/><span class="hl-4">);</span><br/><br/><span class="hl-6">console</span><span class="hl-4">.</span><span class="hl-8">log</span><span class="hl-4">( </span><span class="hl-6">element</span><span class="hl-4">.</span><span class="hl-6">_mc</span><span class="hl-4"> );</span><br/><span class="hl-2">// { 'myMC': { target: (element) } }</span><br/><br/><span class="hl-6">console</span><span class="hl-4">.</span><span class="hl-8">log</span><span class="hl-4">( </span><span class="hl-6">element</span><span class="hl-4">.</span><span class="hl-6">_mc</span><span class="hl-4">.</span><span class="hl-6">myMC</span><span class="hl-4"> );</span><br/><span class="hl-2">// { target: (element) }</span><br/><br/><span class="hl-6">console</span><span class="hl-4">.</span><span class="hl-8">log</span><span class="hl-4">( </span><span class="hl-6">mcc</span><span class="hl-4">.</span><span class="hl-8">siblings</span><span class="hl-4">() );</span><br/><span class="hl-2">// [ { target: (element) } ]</span><br/>
|
|
28
|
+
</code></pre>
|
|
29
|
+
|
|
30
|
+
<h3>Name</h3><p>MC</p>
|
|
31
|
+
</div></section>
|
|
19
32
|
<section class="tsd-panel tsd-hierarchy">
|
|
20
33
|
<h4>Hierarchy</h4>
|
|
21
34
|
<ul class="tsd-hierarchy">
|
|
22
35
|
<li><span class="target">MC</span></li></ul></section><aside class="tsd-sources">
|
|
23
36
|
<ul>
|
|
24
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
37
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L113">src/microcomponents.ts:113</a></li></ul></aside>
|
|
25
38
|
<section class="tsd-panel-group tsd-index-group">
|
|
26
39
|
<section class="tsd-panel tsd-index-panel">
|
|
27
40
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -59,16 +72,18 @@
|
|
|
59
72
|
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
|
|
60
73
|
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
|
61
74
|
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
|
62
|
-
<li class="tsd-signature tsd-anchor-link" id="constructor.new_MC">new MC<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">
|
|
75
|
+
<li class="tsd-signature tsd-anchor-link" id="constructor.new_MC">new MC<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span><br/><span> </span>[key: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="microcomponents.MC.html" class="tsd-signature-type" data-tsd-kind="Class">MC</a><a href="#constructor.new_MC" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
63
76
|
<li class="tsd-description">
|
|
77
|
+
<div class="tsd-comment tsd-typography"><p>Constructs an MC instance with a target DOM element.</p>
|
|
78
|
+
</div>
|
|
64
79
|
<div class="tsd-parameters">
|
|
65
80
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
66
81
|
<ul class="tsd-parameter-list">
|
|
67
82
|
<li>
|
|
68
|
-
<h5>target: <span class="tsd-signature-type">
|
|
83
|
+
<h5>target: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span><br/><span> </span>[key: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = undefined</span></h5></li></ul></div>
|
|
69
84
|
<h4 class="tsd-returns-title">Returns <a href="microcomponents.MC.html" class="tsd-signature-type" data-tsd-kind="Class">MC</a></h4><aside class="tsd-sources">
|
|
70
85
|
<ul>
|
|
71
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
86
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L128">src/microcomponents.ts:128</a></li></ul></aside></li></ul></section></section>
|
|
72
87
|
<section class="tsd-panel-group tsd-member-group">
|
|
73
88
|
<h2>Properties</h2>
|
|
74
89
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="_mc" class="tsd-anchor"></a>
|
|
@@ -80,7 +95,7 @@
|
|
|
80
95
|
<li class="tsd-parameter-index-signature">
|
|
81
96
|
<h5><span class="tsd-signature-symbol">[</span>key: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">any</span></h5></li></ul></div><aside class="tsd-sources">
|
|
82
97
|
<ul>
|
|
83
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
98
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L119">src/microcomponents.ts:119</a></li></ul></aside></section>
|
|
84
99
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="privateMCs" class="tsd-anchor"></a>
|
|
85
100
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>privateMCs</span><a href="#privateMCs" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
86
101
|
<div class="tsd-signature">privateMCs<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span>[key: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></div>
|
|
@@ -90,88 +105,155 @@
|
|
|
90
105
|
<li class="tsd-parameter-index-signature">
|
|
91
106
|
<h5><span class="tsd-signature-symbol">[</span>key: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">any</span></h5></li></ul></div><aside class="tsd-sources">
|
|
92
107
|
<ul>
|
|
93
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
108
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L117">src/microcomponents.ts:117</a></li></ul></aside></section>
|
|
94
109
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="target" class="tsd-anchor"></a>
|
|
95
110
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>target</span><a href="#target" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
96
|
-
<div class="tsd-signature">target<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">
|
|
111
|
+
<div class="tsd-signature">target<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span><br/><span> </span>[key: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources">
|
|
97
112
|
<ul>
|
|
98
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
113
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L115">src/microcomponents.ts:115</a></li></ul></aside></section>
|
|
99
114
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="debug" class="tsd-anchor"></a>
|
|
100
115
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>debug</span><a href="#debug" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
101
116
|
<div class="tsd-signature">debug<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources">
|
|
102
117
|
<ul>
|
|
103
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
118
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L121">src/microcomponents.ts:121</a></li></ul></aside></section></section>
|
|
104
119
|
<section class="tsd-panel-group tsd-member-group">
|
|
105
120
|
<h2>Methods</h2>
|
|
106
121
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="add" class="tsd-anchor"></a>
|
|
107
122
|
<h3 class="tsd-anchor-link"><span>add</span><a href="#add" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
108
123
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
109
|
-
<li class="tsd-signature tsd-anchor-link" id="add.add-1">add<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, element<span class="tsd-signature-symbol"
|
|
124
|
+
<li class="tsd-signature tsd-anchor-link" id="add.add-1">add<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, element<span class="tsd-signature-symbol">??: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><a href="#add.add-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
110
125
|
<li class="tsd-description">
|
|
126
|
+
<div class="tsd-comment tsd-typography"><p>adds a microcomponent to the private collection.</p>
|
|
127
|
+
|
|
128
|
+
<h3>Name</h3><p>add</p>
|
|
129
|
+
|
|
130
|
+
<h3>Instance</h3>
|
|
131
|
+
<h3>Function</h3>
|
|
132
|
+
<h3>Returns</h3><p>The added microcomponent.</p>
|
|
133
|
+
|
|
134
|
+
<h3>Example</h3><pre><code class="language-ts"><span class="hl-3">const</span><span class="hl-4"> </span><span class="hl-7">privateComp</span><span class="hl-4"> = </span><span class="hl-3">this</span><span class="hl-4">.</span><span class="hl-8">add</span><span class="hl-4">(</span><span class="hl-9">'privateComponent'</span><span class="hl-4">, {});</span>
|
|
135
|
+
</code></pre>
|
|
136
|
+
</div>
|
|
111
137
|
<div class="tsd-parameters">
|
|
112
138
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
113
139
|
<ul class="tsd-parameter-list">
|
|
114
140
|
<li>
|
|
115
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> key: <span class="tsd-signature-type">string</span></h5
|
|
141
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> key: <span class="tsd-signature-type">string</span></h5>
|
|
142
|
+
<div class="tsd-comment tsd-typography"><p>The key to identify the microcomponent.</p>
|
|
143
|
+
</div></li>
|
|
116
144
|
<li>
|
|
117
|
-
<h5>element: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = {}</span></h5
|
|
145
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> element: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = {}</span></h5>
|
|
146
|
+
<div class="tsd-comment tsd-typography"><p>The microcomponent to add.</p>
|
|
147
|
+
</div></li></ul></div>
|
|
118
148
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><aside class="tsd-sources">
|
|
119
149
|
<ul>
|
|
120
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
150
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L280">src/microcomponents.ts:280</a></li></ul></aside></li></ul></section>
|
|
121
151
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="children" class="tsd-anchor"></a>
|
|
122
152
|
<h3 class="tsd-anchor-link"><span>children</span><a href="#children" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
123
153
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
124
154
|
<li class="tsd-signature tsd-anchor-link" id="children.children-1">children<span class="tsd-signature-symbol">(</span>search<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><a href="#children.children-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
125
155
|
<li class="tsd-description">
|
|
156
|
+
<div class="tsd-comment tsd-typography"><p>retrieves nearest child _mc DOM nodes, gets their matching microcomponents, and stops there.</p>
|
|
157
|
+
|
|
158
|
+
<h3>Name</h3><p>children</p>
|
|
159
|
+
|
|
160
|
+
<h3>Instance</h3>
|
|
161
|
+
<h3>Function</h3>
|
|
162
|
+
<h3>Returns</h3><p>An array of matching child microcomponents.</p>
|
|
163
|
+
|
|
164
|
+
<h3>Example</h3><pre><code class="language-ts"><span class="hl-3">const</span><span class="hl-4"> </span><span class="hl-7">children</span><span class="hl-4"> = </span><span class="hl-6">mcInstance</span><span class="hl-4">.</span><span class="hl-8">children</span><span class="hl-4">(</span><span class="hl-9">'childComponent'</span><span class="hl-4">);</span>
|
|
165
|
+
</code></pre>
|
|
166
|
+
</div>
|
|
126
167
|
<div class="tsd-parameters">
|
|
127
168
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
128
169
|
<ul class="tsd-parameter-list">
|
|
129
170
|
<li>
|
|
130
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5
|
|
171
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5>
|
|
172
|
+
<div class="tsd-comment tsd-typography"><p>The key of the specific microcomponent.</p>
|
|
173
|
+
</div></li></ul></div>
|
|
131
174
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
132
175
|
<ul>
|
|
133
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
176
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L366">src/microcomponents.ts:366</a></li></ul></aside></li></ul></section>
|
|
134
177
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="descendants" class="tsd-anchor"></a>
|
|
135
178
|
<h3 class="tsd-anchor-link"><span>descendants</span><a href="#descendants" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
136
179
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
137
180
|
<li class="tsd-signature tsd-anchor-link" id="descendants.descendants-1">descendants<span class="tsd-signature-symbol">(</span>search<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><a href="#descendants.descendants-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
138
181
|
<li class="tsd-description">
|
|
182
|
+
<div class="tsd-comment tsd-typography"><p>retrieves all decendant _mc DOM nodes and gets their matching microcomponents.</p>
|
|
183
|
+
|
|
184
|
+
<h3>Name</h3><p>children</p>
|
|
185
|
+
|
|
186
|
+
<h3>Instance</h3>
|
|
187
|
+
<h3>Function</h3>
|
|
188
|
+
<h3>Returns</h3><p>An array of matching descendant microcomponents.</p>
|
|
189
|
+
|
|
190
|
+
<h3>Example</h3><pre><code class="language-ts"><span class="hl-3">const</span><span class="hl-4"> </span><span class="hl-7">descendants</span><span class="hl-4"> = </span><span class="hl-6">mcInstance</span><span class="hl-4">.</span><span class="hl-8">descendants</span><span class="hl-4">(</span><span class="hl-9">'descendantComponent'</span><span class="hl-4">);</span>
|
|
191
|
+
</code></pre>
|
|
192
|
+
</div>
|
|
139
193
|
<div class="tsd-parameters">
|
|
140
194
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
141
195
|
<ul class="tsd-parameter-list">
|
|
142
196
|
<li>
|
|
143
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5
|
|
197
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5>
|
|
198
|
+
<div class="tsd-comment tsd-typography"><p>The key of the specific microcomponent.</p>
|
|
199
|
+
</div></li></ul></div>
|
|
144
200
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
145
201
|
<ul>
|
|
146
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
202
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L387">src/microcomponents.ts:387</a></li></ul></aside></li></ul></section>
|
|
147
203
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="getMicroComponents" class="tsd-anchor"></a>
|
|
148
204
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>get<wbr/>Micro<wbr/>Components</span><a href="#getMicroComponents" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
149
205
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
150
206
|
<li class="tsd-signature tsd-anchor-link" id="getMicroComponents.getMicroComponents-1">get<wbr/>Micro<wbr/>Components<span class="tsd-signature-symbol">(</span>elements<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span>, search<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><a href="#getMicroComponents.getMicroComponents-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
151
|
-
<li class="tsd-description">
|
|
207
|
+
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
|
|
208
|
+
<div class="tsd-comment tsd-typography"><p>returns top level microcomponents from a list of HTMLElements.</p>
|
|
209
|
+
|
|
210
|
+
<h3>Name</h3><p>getMicroComponents</p>
|
|
211
|
+
|
|
212
|
+
<h3>Instance</h3>
|
|
213
|
+
<h3>Function</h3><ul>
|
|
214
|
+
<li></li>
|
|
215
|
+
</ul>
|
|
216
|
+
|
|
217
|
+
<h3>Returns</h3><p>An array of microcomponents.</p>
|
|
218
|
+
</div>
|
|
152
219
|
<div class="tsd-parameters">
|
|
153
220
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
154
221
|
<ul class="tsd-parameter-list">
|
|
155
222
|
<li>
|
|
156
|
-
<h5>elements: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5
|
|
223
|
+
<h5>elements: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
224
|
+
<div class="tsd-comment tsd-typography"><p>The elements to search for microcomponents.
|
|
225
|
+
*</p>
|
|
226
|
+
</div></li>
|
|
157
227
|
<li>
|
|
158
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5
|
|
228
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5>
|
|
229
|
+
<div class="tsd-comment tsd-typography"><p>The key of the specific microcomponent.
|
|
230
|
+
*</p>
|
|
231
|
+
</div></li></ul></div>
|
|
159
232
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
160
233
|
<ul>
|
|
161
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
234
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L202">src/microcomponents.ts:202</a></li></ul></aside></li></ul></section>
|
|
162
235
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="isDOM" class="tsd-anchor"></a>
|
|
163
236
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>isDOM</span><a href="#isDOM" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
164
237
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
165
238
|
<li class="tsd-signature tsd-anchor-link" id="isDOM.isDOM-1">isDOM<span class="tsd-signature-symbol">(</span>element<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isDOM.isDOM-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
166
|
-
<li class="tsd-description">
|
|
239
|
+
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
|
|
240
|
+
<div class="tsd-comment tsd-typography"><p>returns true if the element is an instance of HTMLElement.</p>
|
|
241
|
+
|
|
242
|
+
<h3>Instance</h3>
|
|
243
|
+
<h3>Function</h3>
|
|
244
|
+
<h3>Name</h3><p>isDOM</p>
|
|
245
|
+
|
|
246
|
+
<h3>Returns</h3></div>
|
|
167
247
|
<div class="tsd-parameters">
|
|
168
248
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
169
249
|
<ul class="tsd-parameter-list">
|
|
170
250
|
<li>
|
|
171
|
-
<h5>element: <span class="tsd-signature-type">any</span></h5
|
|
251
|
+
<h5>element: <span class="tsd-signature-type">any</span></h5>
|
|
252
|
+
<div class="tsd-comment tsd-typography"><p>The element to check.</p>
|
|
253
|
+
</div></li></ul></div>
|
|
172
254
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
173
255
|
<ul>
|
|
174
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
256
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L265">src/microcomponents.ts:265</a></li></ul></aside></li></ul></section>
|
|
175
257
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="parent" class="tsd-anchor"></a>
|
|
176
258
|
<h3 class="tsd-anchor-link"><span>parent</span><a href="#parent" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
177
259
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -184,63 +266,119 @@
|
|
|
184
266
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5></li></ul></div>
|
|
185
267
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
186
268
|
<ul>
|
|
187
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
269
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L336">src/microcomponents.ts:336</a></li></ul></aside></li></ul></section>
|
|
188
270
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="parents" class="tsd-anchor"></a>
|
|
189
271
|
<h3 class="tsd-anchor-link"><span>parents</span><a href="#parents" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
190
272
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
191
273
|
<li class="tsd-signature tsd-anchor-link" id="parents.parents-1">parents<span class="tsd-signature-symbol">(</span>search<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><a href="#parents.parents-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
192
274
|
<li class="tsd-description">
|
|
275
|
+
<div class="tsd-comment tsd-typography"><p>retrieves the first ancestor DOM node with a matching microcomponent.</p>
|
|
276
|
+
|
|
277
|
+
<h3>Name</h3><p>parents</p>
|
|
278
|
+
|
|
279
|
+
<h3>Instance</h3>
|
|
280
|
+
<h3>Function</h3>
|
|
281
|
+
<h3>Returns</h3><p>An array of matching ancestor microcomponents.</p>
|
|
282
|
+
|
|
283
|
+
<h3>Example</h3><pre><code class="language-ts"><span class="hl-3">const</span><span class="hl-4"> </span><span class="hl-7">parents</span><span class="hl-4"> = </span><span class="hl-6">mcInstance</span><span class="hl-4">.</span><span class="hl-8">parents</span><span class="hl-4">(</span><span class="hl-9">'ancestorComponent'</span><span class="hl-4">);</span>
|
|
284
|
+
</code></pre>
|
|
285
|
+
</div>
|
|
193
286
|
<div class="tsd-parameters">
|
|
194
287
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
195
288
|
<ul class="tsd-parameter-list">
|
|
196
289
|
<li>
|
|
197
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5
|
|
290
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5>
|
|
291
|
+
<div class="tsd-comment tsd-typography"><p>The key of the specific microcomponent.</p>
|
|
292
|
+
</div></li></ul></div>
|
|
198
293
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
199
294
|
<ul>
|
|
200
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
295
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L351">src/microcomponents.ts:351</a></li></ul></aside></li></ul></section>
|
|
201
296
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="remove" class="tsd-anchor"></a>
|
|
202
297
|
<h3 class="tsd-anchor-link"><span>remove</span><a href="#remove" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
203
298
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
204
|
-
<li class="tsd-signature tsd-anchor-link" id="remove.remove-1">remove<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol"
|
|
299
|
+
<li class="tsd-signature tsd-anchor-link" id="remove.remove-1">remove<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#remove.remove-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
205
300
|
<li class="tsd-description">
|
|
301
|
+
<div class="tsd-comment tsd-typography"><p>removes a microcomponent from the private collection.</p>
|
|
302
|
+
|
|
303
|
+
<h3>Name</h3><p>remove</p>
|
|
304
|
+
|
|
305
|
+
<h3>Instance</h3>
|
|
306
|
+
<h3>Function</h3>
|
|
307
|
+
<h3>Example</h3><pre><code class="language-ts"><span class="hl-3">this</span><span class="hl-4">.</span><span class="hl-8">remove</span><span class="hl-4">(</span><span class="hl-9">'privateComponent'</span><span class="hl-4">);</span>
|
|
308
|
+
</code></pre>
|
|
309
|
+
</div>
|
|
206
310
|
<div class="tsd-parameters">
|
|
207
311
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
208
312
|
<ul class="tsd-parameter-list">
|
|
209
313
|
<li>
|
|
210
|
-
<h5>key: <span class="tsd-signature-type">string</span></h5
|
|
314
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> key: <span class="tsd-signature-type">string</span></h5>
|
|
315
|
+
<div class="tsd-comment tsd-typography"><p>The key to identify the microcomponent.</p>
|
|
316
|
+
</div></li></ul></div>
|
|
211
317
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
212
318
|
<ul>
|
|
213
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
319
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L296">src/microcomponents.ts:296</a></li></ul></aside></li></ul></section>
|
|
214
320
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="siblings" class="tsd-anchor"></a>
|
|
215
321
|
<h3 class="tsd-anchor-link"><span>siblings</span><a href="#siblings" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
216
322
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
217
323
|
<li class="tsd-signature tsd-anchor-link" id="siblings.siblings-1">siblings<span class="tsd-signature-symbol">(</span>search<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><a href="#siblings.siblings-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
218
324
|
<li class="tsd-description">
|
|
325
|
+
<div class="tsd-comment tsd-typography"><p>removes a microcomponent from the private collection.</p>
|
|
326
|
+
|
|
327
|
+
<h3>Name</h3><p>siblings</p>
|
|
328
|
+
|
|
329
|
+
<h3>Instance</h3>
|
|
330
|
+
<h3>Function</h3><ul>
|
|
331
|
+
<li></li>
|
|
332
|
+
</ul>
|
|
333
|
+
|
|
334
|
+
<h3>Returns</h3><p>An array of matching sibling microcomponents.
|
|
335
|
+
*</p>
|
|
336
|
+
|
|
337
|
+
<h3>Example</h3><pre><code class="language-ts"><span class="hl-4">* </span><span class="hl-3">const</span><span class="hl-4"> </span><span class="hl-7">siblings</span><span class="hl-4"> = </span><span class="hl-3">this</span><span class="hl-4">.</span><span class="hl-8">siblings</span><span class="hl-4">(</span><span class="hl-9">'siblingComponent'</span><span class="hl-4">);</span>
|
|
338
|
+
</code></pre>
|
|
339
|
+
</div>
|
|
219
340
|
<div class="tsd-parameters">
|
|
220
341
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
221
342
|
<ul class="tsd-parameter-list">
|
|
222
343
|
<li>
|
|
223
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5
|
|
344
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5>
|
|
345
|
+
<div class="tsd-comment tsd-typography"><p>The key of the specific microcomponent.
|
|
346
|
+
*</p>
|
|
347
|
+
</div></li></ul></div>
|
|
224
348
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
225
349
|
<ul>
|
|
226
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
350
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L312">src/microcomponents.ts:312</a></li></ul></aside></li></ul></section>
|
|
227
351
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="traverseNodes" class="tsd-anchor"></a>
|
|
228
352
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>traverse<wbr/>Nodes</span><a href="#traverseNodes" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
229
353
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
230
|
-
<li class="tsd-signature tsd-anchor-link" id="traverseNodes.traverseNodes-1">traverse<wbr/>Nodes<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Node</span>, search<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, firstonly<span class="tsd-signature-symbol"
|
|
231
|
-
<li class="tsd-description">
|
|
354
|
+
<li class="tsd-signature tsd-anchor-link" id="traverseNodes.traverseNodes-1">traverse<wbr/>Nodes<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Node</span>, search<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, firstonly<span class="tsd-signature-symbol">??: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><a href="#traverseNodes.traverseNodes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
355
|
+
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
|
|
356
|
+
<div class="tsd-comment tsd-typography"><p>returns ancestor MCs</p>
|
|
357
|
+
|
|
358
|
+
<h3>Name</h3><p>traverseNodes</p>
|
|
359
|
+
|
|
360
|
+
<h3>Instance</h3>
|
|
361
|
+
<h3>Function</h3>
|
|
362
|
+
<h3>Returns</h3><p>An array of matching microcomponents.</p>
|
|
363
|
+
</div>
|
|
232
364
|
<div class="tsd-parameters">
|
|
233
365
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
234
366
|
<ul class="tsd-parameter-list">
|
|
235
367
|
<li>
|
|
236
|
-
<h5>node: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Node</span></h5
|
|
368
|
+
<h5>node: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Node</span></h5>
|
|
369
|
+
<div class="tsd-comment tsd-typography"><p>The starting DOM node.</p>
|
|
370
|
+
</div></li>
|
|
237
371
|
<li>
|
|
238
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5
|
|
372
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5>
|
|
373
|
+
<div class="tsd-comment tsd-typography"><p>The key of the specific microcomponent.</p>
|
|
374
|
+
</div></li>
|
|
239
375
|
<li>
|
|
240
|
-
<h5>firstonly: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5
|
|
376
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> firstonly: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5>
|
|
377
|
+
<div class="tsd-comment tsd-typography"><p>If true, returns the first match only.</p>
|
|
378
|
+
</div></li></ul></div>
|
|
241
379
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
242
380
|
<ul>
|
|
243
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
381
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L237">src/microcomponents.ts:237</a></li></ul></aside></li></ul></section>
|
|
244
382
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="add-2" class="tsd-anchor"></a>
|
|
245
383
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>add</span><a href="#add-2" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
246
384
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -257,7 +395,7 @@
|
|
|
257
395
|
<h5>element: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = {}</span></h5></li></ul></div>
|
|
258
396
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
259
397
|
<ul>
|
|
260
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
398
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L161">src/microcomponents.ts:161</a></li></ul></aside></li></ul></section>
|
|
261
399
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="remove-2" class="tsd-anchor"></a>
|
|
262
400
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>remove</span><a href="#remove-2" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
263
401
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -272,7 +410,7 @@
|
|
|
272
410
|
<h5>key: <span class="tsd-signature-type">string</span></h5></li></ul></div>
|
|
273
411
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
274
412
|
<ul>
|
|
275
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
413
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L178">src/microcomponents.ts:178</a></li></ul></aside></li></ul></section>
|
|
276
414
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="siblings-2" class="tsd-anchor"></a>
|
|
277
415
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>siblings</span><a href="#siblings-2" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
278
416
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -287,7 +425,7 @@
|
|
|
287
425
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> search: <span class="tsd-signature-type">string</span></h5></li></ul></div>
|
|
288
426
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
289
427
|
<ul>
|
|
290
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
428
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/cb1aec4/src/microcomponents.ts#L154">src/microcomponents.ts:154</a></li></ul></aside></li></ul></section></section></div>
|
|
291
429
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
292
430
|
<div class="tsd-navigation settings">
|
|
293
431
|
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|