Skip to content

Commit

Permalink
Merge pull request #61 from EPA-WG/develop
Browse files Browse the repository at this point in the history
0.0.24
  • Loading branch information
sashafirsov authored Jul 22, 2024
2 parents 0abf831 + 177162d commit 78dad3d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ within template
[github-image]: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg
[npm-image]: https://img.shields.io/npm/v/@epa-wg/custom-element.svg
[npm-url]: https://npmjs.org/package/@epa-wg/custom-element
[coverage-image]: https://unpkg.com/@epa-wg/[email protected].23/coverage/src/custom-element/coverage.svg
[coverage-url]: https://unpkg.com/@epa-wg/[email protected].23/coverage/src/custom-element/index.html
[storybook-url]: https://unpkg.com/@epa-wg/[email protected].23/storybook-static/index.html?path=/story/welcome--introduction
[coverage-image]: https://unpkg.com/@epa-wg/[email protected].24/coverage/src/custom-element/coverage.svg
[coverage-url]: https://unpkg.com/@epa-wg/[email protected].24/coverage/src/custom-element/index.html
[storybook-url]: https://unpkg.com/@epa-wg/[email protected].24/storybook-static/index.html?path=/story/welcome--introduction
[sandbox-url]: https://stackblitz.com/github/EPA-WG/custom-element?file=index.html
[webcomponents-url]: https://www.webcomponents.org/element/@epa-wg/custom-element
[webcomponents-img]: https://img.shields.io/badge/webcomponents.org-published-blue.svg
Expand Down
2 changes: 1 addition & 1 deletion bin/xslDtd2Ide.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ writeFileSync( '.././ide/customData-xsl.json', JSON.stringify( vsCode, undefined
const intelliJ = {
"$schema": "http://json.schemastore.org/web-types",
"name": "@epa-wg/custom-element",
"version": "0.0.23",
"version": "0.0.24",
"js-types-syntax": "typescript",
"description-markup": "markdown",
"contributions": {
Expand Down
10 changes: 9 additions & 1 deletion custom-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,14 @@ export function assureUnique(n, id=0)
e.childNodes.length && assureUnique(e)
}
}
export function appendByDceId(parent,e,k)
{
k = 1*k;
for( let n of parent.childNodes )
if( (n.dceId ?? n.getAttribute('data-dce-id')*1) > k )
return parent.insertBefore(e,n);
parent.append(e)
}
export function merge( parent, fromArr )
{
if(!fromArr.length)
Expand Down Expand Up @@ -461,7 +469,7 @@ export function merge( parent, fromArr )
}
delete id2old[ k ]
}else
parent.append( e )
appendByDceId(parent,e,k)
}
for( let v of Object.values(id2old) )
v.remove();
Expand Down
5 changes: 2 additions & 3 deletions demo/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@
<ol>
<li> type in input field</li>
<li> delete input field content</li>
<li> observe the warning in string bellow input</li>
<li> Click Next observe the system warning in dropdown and in string bellow input</li>
<li> observe the warning in string after input</li>
<li> Click Next observe the system warning in dropdown over input</li>
</ol>
<template>
<custom-element>
Expand All @@ -197,7 +197,6 @@
<var>{//username/@validation-message}</var>
</if>
<button>Next</button>
<p>{//email-form/@validation-message}</p>
</form>
</template>
</custom-element>
Expand Down
2 changes: 1 addition & 1 deletion ide/web-types-dce.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/web-types",
"name": "@epa-wg/custom-element",
"version": "0.0.23",
"version": "0.0.24",
"js-types-syntax": "typescript",
"description-markup": "markdown",
"contributions": {
Expand Down
2 changes: 1 addition & 1 deletion ide/web-types-xsl.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/web-types",
"name": "@epa-wg/custom-element",
"version": "0.0.23",
"version": "0.0.24",
"js-types-syntax": "typescript",
"description-markup": "markdown",
"contributions": {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epa-wg/custom-element",
"version": "0.0.23",
"version": "0.0.24",
"description": "Declarative Custom Element as W3C proposal PoC with native(XSLT) based templating",
"browser": "custom-element.js",
"module": "custom-element.js",
Expand Down

0 comments on commit 78dad3d

Please sign in to comment.