Skip to content

Commit

Permalink
Merge pull request #14 from EPA-WG/develop
Browse files Browse the repository at this point in the history
0.0.14
  • Loading branch information
sashafirsov authored Feb 4, 2024
2 parents 10bb690 + a137a0e commit a706373
Show file tree
Hide file tree
Showing 44 changed files with 625 additions and 728 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ To run a local development server that serves the basic demo located in `src/dem

[git-url]: https://github.com/EPA-WG/custom-element
[github-image]: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg
[demo-url]: https://unpkg.com/@epa-wg/[email protected].13/dist/index.html
[storybook-url]: https://unpkg.com/@epa-wg/[email protected].13/storybook-static/index.html?path=/story/welcome--introduction
[coverage-image]: https://unpkg.com/@epa-wg/[email protected].13/coverage/coverage.svg
[coverage-url]: https://unpkg.com/@epa-wg/[email protected].13/coverage/lcov-report/index.html
[demo-url]: https://unpkg.com/@epa-wg/[email protected].14/dist/index.html
[storybook-url]: https://unpkg.com/@epa-wg/[email protected].14/storybook-static/index.html?path=/story/welcome--introduction
[coverage-image]: https://unpkg.com/@epa-wg/[email protected].14/coverage/coverage.svg
[coverage-url]: https://unpkg.com/@epa-wg/[email protected].14/coverage/lcov-report/index.html
32 changes: 16 additions & 16 deletions coverage/lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ <h1>All files</h1>
<div class='fl pad1y space-right2'>
<span class="strong">97.81% </span>
<span class="quiet">Statements</span>
<span class='fraction'>1344/1374</span>
<span class='fraction'>1342/1372</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">95.56% </span>
<span class="strong">95.54% </span>
<span class="quiet">Branches</span>
<span class='fraction'>194/203</span>
<span class='fraction'>193/202</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">88.23% </span>
<span class="strong">88.09% </span>
<span class="quiet">Functions</span>
<span class='fraction'>75/85</span>
<span class='fraction'>74/84</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">97.81% </span>
<span class="quiet">Lines</span>
<span class='fraction'>1344/1374</span>
<span class='fraction'>1342/1372</span>
</div>


Expand Down Expand Up @@ -80,17 +80,17 @@ <h1>All files</h1>
</thead>
<tbody><tr>
<td class="file high" data-value="src"><a href="src/index.html">src</a></td>
<td data-value="95.59" class="pic high">
<td data-value="95.57" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 95%"></div><div class="cover-empty" style="width: 5%"></div></div>
</td>
<td data-value="95.59" class="pct high">95.59%</td>
<td data-value="658" class="abs high">629/658</td>
<td data-value="94.85" class="pct high">94.85%</td>
<td data-value="175" class="abs high">166/175</td>
<td data-value="86.48" class="pct high">86.48%</td>
<td data-value="74" class="abs high">64/74</td>
<td data-value="95.59" class="pct high">95.59%</td>
<td data-value="658" class="abs high">629/658</td>
<td data-value="95.57" class="pct high">95.57%</td>
<td data-value="656" class="abs high">627/656</td>
<td data-value="94.82" class="pct high">94.82%</td>
<td data-value="174" class="abs high">165/174</td>
<td data-value="86.3" class="pct high">86.3%</td>
<td data-value="73" class="abs high">63/73</td>
<td data-value="95.57" class="pct high">95.57%</td>
<td data-value="656" class="abs high">627/656</td>
</tr>

<tr>
Expand Down Expand Up @@ -131,7 +131,7 @@ <h1>All files</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-01-20T19:37:42.131Z
at 2024-02-04T20:29:21.830Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
45 changes: 33 additions & 12 deletions coverage/lcov-report/src/custom-element.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">98.14% </span>
<span class="strong">98.17% </span>
<span class="quiet">Statements</span>
<span class='fraction'>476/485</span>
<span class='fraction'>483/492</span>
</div>


Expand All @@ -44,9 +44,9 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-


<div class='fl pad1y space-right2'>
<span class="strong">98.14% </span>
<span class="strong">98.17% </span>
<span class="quiet">Lines</span>
<span class='fraction'>476/485</span>
<span class='fraction'>483/492</span>
</div>


Expand Down Expand Up @@ -548,7 +548,14 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
<a name='L483'></a><a href='#L483'>483</a>
<a name='L484'></a><a href='#L484'>484</a>
<a name='L485'></a><a href='#L485'>485</a>
<a name='L486'></a><a href='#L486'>486</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
<a name='L486'></a><a href='#L486'>486</a>
<a name='L487'></a><a href='#L487'>487</a>
<a name='L488'></a><a href='#L488'>488</a>
<a name='L489'></a><a href='#L489'>489</a>
<a name='L490'></a><a href='#L490'>490</a>
<a name='L491'></a><a href='#L491'>491</a>
<a name='L492'></a><a href='#L492'>492</a>
<a name='L493'></a><a href='#L493'>493</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
Expand Down Expand Up @@ -694,6 +701,11 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">5x</span>
Expand Down Expand Up @@ -747,6 +759,8 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
Expand Down Expand Up @@ -1054,12 +1068,12 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
// if(!x)
// debugger
}
function
export function
xml2dom( xmlString )
{
return new DOMParser().parseFromString( xmlString, "application/xml" )
}
<span class="fstat-no" title="function not covered" > function</span>
export <span class="fstat-no" title="function not covered" >function</span>
<span class="cstat-no" title="statement not covered" >xmlString(doc){ return new XMLSerializer().serializeToString( doc ) }</span>
&nbsp;
function
Expand Down Expand Up @@ -1130,7 +1144,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
[...m].forEach(t=&gt;
{ if( t.index &gt; l )
tt.push( txt( t.input.substring( l, t.index ) ))
const v = e.ownerDocument.createElement('xsl:value-of');
const v = node.querySelector('value-of').cloneNode();
v.setAttribute('select', t[1] );
tt.push(v);
l = t.index+t[0].length;
Expand Down Expand Up @@ -1159,7 +1173,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
return tagUid(templateNode)
const sanitizeXsl = xml2dom(`&lt;xsl:stylesheet version="1.0" xmlns:xsl="${ XSL_NS_URL }" xmlns:xhtml="${ HTML_NS_URL }" xmlns:exsl="${EXSL_NS_URL}" exclude-result-prefixes="exsl" &gt;
&lt;xsl:output method="xml" /&gt;
&lt;xsl:template match="/"&gt;&lt;dce-root&gt;&lt;xsl:apply-templates select="*"/&gt;&lt;/dce-root&gt;&lt;/xsl:template&gt;
&lt;xsl:template match="/"&gt;&lt;dce-root xmlns="${ HTML_NS_URL }"&gt;&lt;xsl:apply-templates select="*"/&gt;&lt;/dce-root&gt;&lt;/xsl:template&gt;
&lt;xsl:template match="*[name()='template']"&gt;&lt;xsl:apply-templates mode="sanitize" select="*|text()"/&gt;&lt;/xsl:template&gt;
&lt;xsl:template match="*"&gt;&lt;xsl:apply-templates mode="sanitize" select="*|text()"/&gt;&lt;/xsl:template&gt;
&lt;xsl:template match="*[name()='svg']|*[name()='math']"&gt;&lt;xsl:apply-templates mode="sanitize" select="."/&gt;&lt;/xsl:template&gt;
Expand All @@ -1176,7 +1190,12 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
{
forEach$(n,'script', s=&gt; s.remove() );
const e = n.firstElementChild?.content || n.content
, asXmlNode = r =&gt; xslHtmlNs(xml2dom( '&lt;xhtml/&gt;' ).importNode(r, true));
, asXmlNode = r =&gt; {
const d = xml2dom( '&lt;xhtml/&gt;' )
, n = d.importNode(r, true);
d.replaceChild(n,d.documentElement);
return xslHtmlNs(n);
};
if( e )
{ const t = create('div');
[ ...e.childNodes ].map( c =&gt; t.append(c.cloneNode(true)) )
Expand All @@ -1187,10 +1206,12 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
, xslDom = xml2dom(
`&lt;xsl:stylesheet version="1.0"
xmlns:xsl="${ XSL_NS_URL }"
xmlns:xhtml="${ HTML_NS_URL }"
xmlns:dce="urn:schemas-epa-wg:dce"
xmlns:exsl="http://exslt.org/common"
exclude-result-prefixes="exsl"
&gt;
&lt;xsl:template match="ignore"&gt;&lt;xsl:value-of select="."/&gt;&lt;/xsl:template&gt;
&lt;xsl:template mode="payload" match="attributes"&gt;&lt;/xsl:template&gt;
&lt;xsl:template match="/"&gt;
&lt;xsl:apply-templates mode="payload" select="/datadom/attributes"/&gt;
Expand Down Expand Up @@ -1471,7 +1492,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
const transform = ()=&gt;
{
const ff = xp.map( (p,i) =&gt;
{ const f = p.transformToFragment(x, document)
{ const f = p.transformToFragment(x.ownerDocument, document)
if( !f )
<span class="branch-0 cbranch-no" title="branch not covered" > console.error( "XSLT transformation error. xsl:\n", xmlString(templateDocs[i]), '\nxml:\n', xmlString(x) );</span>
return f
Expand Down Expand Up @@ -1525,7 +1546,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> custom-
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-01-20T19:37:42.131Z
at 2024-02-04T20:29:21.830Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/src/http-request.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> http-re
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-01-20T19:37:42.131Z
at 2024-02-04T20:29:21.830Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
48 changes: 24 additions & 24 deletions coverage/lcov-report/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ <h1><a href="../index.html">All files</a> src</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">95.59% </span>
<span class="strong">95.57% </span>
<span class="quiet">Statements</span>
<span class='fraction'>629/658</span>
<span class='fraction'>627/656</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">94.85% </span>
<span class="strong">94.82% </span>
<span class="quiet">Branches</span>
<span class='fraction'>166/175</span>
<span class='fraction'>165/174</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">86.48% </span>
<span class="strong">86.3% </span>
<span class="quiet">Functions</span>
<span class='fraction'>64/74</span>
<span class='fraction'>63/73</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">95.59% </span>
<span class="strong">95.57% </span>
<span class="quiet">Lines</span>
<span class='fraction'>629/658</span>
<span class='fraction'>627/656</span>
</div>


Expand Down Expand Up @@ -80,17 +80,17 @@ <h1><a href="../index.html">All files</a> src</h1>
</thead>
<tbody><tr>
<td class="file high" data-value="custom-element.js"><a href="custom-element.js.html">custom-element.js</a></td>
<td data-value="98.14" class="pic high">
<td data-value="98.17" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 98%"></div><div class="cover-empty" style="width: 2%"></div></div>
</td>
<td data-value="98.14" class="pct high">98.14%</td>
<td data-value="485" class="abs high">476/485</td>
<td data-value="98.17" class="pct high">98.17%</td>
<td data-value="492" class="abs high">483/492</td>
<td data-value="97.05" class="pct high">97.05%</td>
<td data-value="136" class="abs high">132/136</td>
<td data-value="85.1" class="pct high">85.1%</td>
<td data-value="47" class="abs high">40/47</td>
<td data-value="98.14" class="pct high">98.14%</td>
<td data-value="485" class="abs high">476/485</td>
<td data-value="98.17" class="pct high">98.17%</td>
<td data-value="492" class="abs high">483/492</td>
</tr>

<tr>
Expand All @@ -110,17 +110,17 @@ <h1><a href="../index.html">All files</a> src</h1>

<tr>
<td class="file high" data-value="local-storage.js"><a href="local-storage.js.html">local-storage.js</a></td>
<td data-value="88.13" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 88%"></div><div class="cover-empty" style="width: 12%"></div></div>
<td data-value="86" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 86%"></div><div class="cover-empty" style="width: 14%"></div></div>
</td>
<td data-value="88.13" class="pct high">88.13%</td>
<td data-value="59" class="abs high">52/59</td>
<td data-value="71.42" class="pct medium">71.42%</td>
<td data-value="14" class="abs medium">10/14</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="88.13" class="pct high">88.13%</td>
<td data-value="59" class="abs high">52/59</td>
<td data-value="86" class="pct high">86%</td>
<td data-value="50" class="abs high">43/50</td>
<td data-value="69.23" class="pct medium">69.23%</td>
<td data-value="13" class="abs medium">9/13</td>
<td data-value="88.88" class="pct high">88.88%</td>
<td data-value="9" class="abs high">8/9</td>
<td data-value="86" class="pct high">86%</td>
<td data-value="50" class="abs high">43/50</td>
</tr>

<tr>
Expand All @@ -146,7 +146,7 @@ <h1><a href="../index.html">All files</a> src</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-01-20T19:37:42.131Z
at 2024-02-04T20:29:21.830Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
Loading

0 comments on commit a706373

Please sign in to comment.