@epa-wg/custom-element 0.0.23 → 0.0.24

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/README.md CHANGED
@@ -348,9 +348,9 @@ within template
348
348
  [github-image]: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg
349
349
  [npm-image]: https://img.shields.io/npm/v/@epa-wg/custom-element.svg
350
350
  [npm-url]: https://npmjs.org/package/@epa-wg/custom-element
351
- [coverage-image]: https://unpkg.com/@epa-wg/custom-element-dist@0.0.23/coverage/src/custom-element/coverage.svg
352
- [coverage-url]: https://unpkg.com/@epa-wg/custom-element-dist@0.0.23/coverage/src/custom-element/index.html
353
- [storybook-url]: https://unpkg.com/@epa-wg/custom-element-dist@0.0.23/storybook-static/index.html?path=/story/welcome--introduction
351
+ [coverage-image]: https://unpkg.com/@epa-wg/custom-element-dist@0.0.24/coverage/src/custom-element/coverage.svg
352
+ [coverage-url]: https://unpkg.com/@epa-wg/custom-element-dist@0.0.24/coverage/src/custom-element/index.html
353
+ [storybook-url]: https://unpkg.com/@epa-wg/custom-element-dist@0.0.24/storybook-static/index.html?path=/story/welcome--introduction
354
354
  [sandbox-url]: https://stackblitz.com/github/EPA-WG/custom-element?file=index.html
355
355
  [webcomponents-url]: https://www.webcomponents.org/element/@epa-wg/custom-element
356
356
  [webcomponents-img]: https://img.shields.io/badge/webcomponents.org-published-blue.svg
@@ -116,7 +116,7 @@ writeFileSync( '.././ide/customData-xsl.json', JSON.stringify( vsCode, undefined
116
116
  const intelliJ = {
117
117
  "$schema": "http://json.schemastore.org/web-types",
118
118
  "name": "@epa-wg/custom-element",
119
- "version": "0.0.23",
119
+ "version": "0.0.24",
120
120
  "js-types-syntax": "typescript",
121
121
  "description-markup": "markdown",
122
122
  "contributions": {
package/custom-element.js CHANGED
@@ -434,6 +434,14 @@ export function assureUnique(n, id=0)
434
434
  e.childNodes.length && assureUnique(e)
435
435
  }
436
436
  }
437
+ export function appendByDceId(parent,e,k)
438
+ {
439
+ k = 1*k;
440
+ for( let n of parent.childNodes )
441
+ if( (n.dceId ?? n.getAttribute('data-dce-id')*1) > k )
442
+ return parent.insertBefore(e,n);
443
+ parent.append(e)
444
+ }
437
445
  export function merge( parent, fromArr )
438
446
  {
439
447
  if(!fromArr.length)
@@ -461,7 +469,7 @@ export function merge( parent, fromArr )
461
469
  }
462
470
  delete id2old[ k ]
463
471
  }else
464
- parent.append( e )
472
+ appendByDceId(parent,e,k)
465
473
  }
466
474
  for( let v of Object.values(id2old) )
467
475
  v.remove();
package/demo/form.html CHANGED
@@ -183,8 +183,8 @@
183
183
  <ol>
184
184
  <li> type in input field</li>
185
185
  <li> delete input field content</li>
186
- <li> observe the warning in string bellow input</li>
187
- <li> Click Next observe the system warning in dropdown and in string bellow input</li>
186
+ <li> observe the warning in string after input</li>
187
+ <li> Click Next observe the system warning in dropdown over input</li>
188
188
  </ol>
189
189
  <template>
190
190
  <custom-element>
@@ -197,7 +197,6 @@
197
197
  <var>{//username/@validation-message}</var>
198
198
  </if>
199
199
  <button>Next</button>
200
- <p>{//email-form/@validation-message}</p>
201
200
  </form>
202
201
  </template>
203
202
  </custom-element>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "name": "@epa-wg/custom-element",
4
- "version": "0.0.23",
4
+ "version": "0.0.24",
5
5
  "js-types-syntax": "typescript",
6
6
  "description-markup": "markdown",
7
7
  "contributions": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "name": "@epa-wg/custom-element",
4
- "version": "0.0.23",
4
+ "version": "0.0.24",
5
5
  "js-types-syntax": "typescript",
6
6
  "description-markup": "markdown",
7
7
  "contributions": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epa-wg/custom-element",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "Declarative Custom Element as W3C proposal PoC with native(XSLT) based templating",
5
5
  "browser": "custom-element.js",
6
6
  "module": "custom-element.js",