gauge-page-header 0.0.294 → 0.0.295
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/dist/cjs/eswat2-io_2.cjs.entry.js +1 -1
- package/dist/cjs/gauge-page-header.cjs.js +2 -2
- package/dist/cjs/{index-8471f9e3.js → index-79bdde2d.js} +181 -41
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/eswat2-io/eswat2-io.js +12 -11
- package/dist/collection/components/gauge-page-header/gauge-page-header.js +34 -63
- package/dist/esm/eswat2-io_2.entry.js +1 -1
- package/dist/esm/gauge-page-header.js +2 -2
- package/dist/esm/{index-31bc8c6f.js → index-9d7d1142.js} +181 -41
- package/dist/esm/loader.js +2 -2
- package/dist/gauge-page-header/gauge-page-header.esm.js +1 -1
- package/dist/gauge-page-header/{p-b54a9190.entry.js → p-9c93d966.entry.js} +1 -1
- package/dist/gauge-page-header/{p-bc9f7c28.js → p-b7bab051.js} +0 -0
- package/loader/package.json +1 -0
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-79bdde2d.js');
|
|
6
6
|
|
|
7
7
|
const eswat2IoCss = "a{position:absolute;top:8px;right:8px;color:var(--clrs-gray)}:hover{fill:var(--clrs-navy)}";
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-79bdde2d.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
6
|
+
Stencil Client Patch Browser v2.18.0 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('gauge-page-header.cjs.js', document.baseURI).href));
|
|
@@ -62,7 +62,7 @@ const uniqueTime = (key, measureText) => {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
const rootAppliedStyles = new WeakMap();
|
|
65
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
66
66
|
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
67
67
|
let style = styles.get(scopeId);
|
|
68
68
|
if (supportsConstructableStylesheets && allowCS) {
|
|
@@ -84,7 +84,7 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
84
84
|
const style = styles.get(scopeId);
|
|
85
85
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
86
86
|
// so the fallback is to always use the document for the root node in those cases
|
|
87
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
87
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
88
88
|
if (style) {
|
|
89
89
|
if (typeof style === 'string') {
|
|
90
90
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -118,7 +118,7 @@ const attachStyles = (hostRef) => {
|
|
|
118
118
|
const flags = cmpMeta.$flags$;
|
|
119
119
|
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
120
120
|
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
121
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
121
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
122
122
|
// only required when we're NOT using native shadow dom (slot)
|
|
123
123
|
// or this browser doesn't support native shadow dom
|
|
124
124
|
// and this host element was NOT created with SSR
|
|
@@ -311,7 +311,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
314
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
315
315
|
newValue = newValue === true ? '' : newValue;
|
|
316
316
|
{
|
|
317
317
|
elm.setAttribute(memberName, newValue);
|
|
@@ -326,7 +326,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
326
326
|
// if the element passed in is a shadow root, which is a document fragment
|
|
327
327
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
328
328
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
329
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
329
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
330
330
|
? newVnode.$elm$.host
|
|
331
331
|
: newVnode.$elm$;
|
|
332
332
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -344,6 +344,16 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
344
344
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
|
+
/**
|
|
348
|
+
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
349
|
+
*
|
|
350
|
+
* @param oldParentVNode the parent VNode from the previous render
|
|
351
|
+
* @param newParentVNode the parent VNode from the current render
|
|
352
|
+
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
353
|
+
* children, for which we will create a new DOM node
|
|
354
|
+
* @param parentElm the parent DOM node which our new node will be a child of
|
|
355
|
+
* @returns the newly created node
|
|
356
|
+
*/
|
|
347
357
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
348
358
|
// tslint:disable-next-line: prefer-const
|
|
349
359
|
const newVNode = newParentVNode.$children$[childIndex];
|
|
@@ -422,6 +432,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
422
432
|
}
|
|
423
433
|
}
|
|
424
434
|
};
|
|
435
|
+
/**
|
|
436
|
+
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
437
|
+
* traversing the two collections of children, identifying nodes that are
|
|
438
|
+
* conserved or changed, calling out to `patch` to make any necessary
|
|
439
|
+
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
440
|
+
*
|
|
441
|
+
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
442
|
+
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
443
|
+
* 'windows' by storing start and end indices and references to the
|
|
444
|
+
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
445
|
+
* to the entire array, but we progressively narrow the windows until there are
|
|
446
|
+
* no children left to update by doing the following:
|
|
447
|
+
*
|
|
448
|
+
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
449
|
+
* that if we have an initial array like the following we'll end up dealing
|
|
450
|
+
* only with a window bounded by the highlighted elements:
|
|
451
|
+
*
|
|
452
|
+
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
453
|
+
* ^^^^^^ ^^^^^^
|
|
454
|
+
*
|
|
455
|
+
* 2. Check to see if the elements at the head and tail positions are equal
|
|
456
|
+
* across the windows. This will basically detect elements which haven't
|
|
457
|
+
* been added, removed, or changed position, i.e. if you had the following
|
|
458
|
+
* VNode elements (represented as HTML):
|
|
459
|
+
*
|
|
460
|
+
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
461
|
+
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
462
|
+
*
|
|
463
|
+
* Then when comparing the children of the `<div>` tag we check the equality
|
|
464
|
+
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
465
|
+
* same tag in the same position, we'd be able to avoid completely
|
|
466
|
+
* re-rendering the subtree under them with a new DOM element and would just
|
|
467
|
+
* call out to `patch` to handle reconciling their children and so on.
|
|
468
|
+
*
|
|
469
|
+
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
470
|
+
* window corresponds to the element at the end of the other window. This is
|
|
471
|
+
* a heuristic which will let us identify _some_ situations in which
|
|
472
|
+
* elements have changed position, for instance it _should_ detect that the
|
|
473
|
+
* children nodes themselves have not changed but merely moved in the
|
|
474
|
+
* following example:
|
|
475
|
+
*
|
|
476
|
+
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
477
|
+
* newVNode: `<div><element-two /><element-one /></div>`
|
|
478
|
+
*
|
|
479
|
+
* If we find cases like this then we also need to move the concrete DOM
|
|
480
|
+
* elements corresponding to the moved children to write the re-order to the
|
|
481
|
+
* DOM.
|
|
482
|
+
*
|
|
483
|
+
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
484
|
+
* nodes in the old children which have the same key as the first element in
|
|
485
|
+
* our window on the new children. If we find such a node we handle calling
|
|
486
|
+
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
487
|
+
* what we find.
|
|
488
|
+
*
|
|
489
|
+
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
490
|
+
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
491
|
+
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
492
|
+
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
493
|
+
* children has collapsed we still have more nodes on the new children that
|
|
494
|
+
* we haven't dealt with yet then we need to add them, or if the new children
|
|
495
|
+
* collapse but we still have unhandled _old_ children then we need to make
|
|
496
|
+
* sure the corresponding DOM nodes are removed.
|
|
497
|
+
*
|
|
498
|
+
* @param parentElm the node into which the parent VNode is rendered
|
|
499
|
+
* @param oldCh the old children of the parent node
|
|
500
|
+
* @param newVNode the new VNode which will replace the parent
|
|
501
|
+
* @param newCh the new children of the parent node
|
|
502
|
+
*/
|
|
425
503
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
426
504
|
let oldStartIdx = 0;
|
|
427
505
|
let newStartIdx = 0;
|
|
@@ -434,7 +512,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
434
512
|
let node;
|
|
435
513
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
436
514
|
if (oldStartVnode == null) {
|
|
437
|
-
//
|
|
515
|
+
// VNode might have been moved left
|
|
438
516
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
439
517
|
}
|
|
440
518
|
else if (oldEndVnode == null) {
|
|
@@ -447,34 +525,67 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
447
525
|
newEndVnode = newCh[--newEndIdx];
|
|
448
526
|
}
|
|
449
527
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
528
|
+
// if the start nodes are the same then we should patch the new VNode
|
|
529
|
+
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
530
|
+
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
531
|
+
// since things are matched up in order.
|
|
450
532
|
patch(oldStartVnode, newStartVnode);
|
|
451
533
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
452
534
|
newStartVnode = newCh[++newStartIdx];
|
|
453
535
|
}
|
|
454
536
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
537
|
+
// likewise, if the end nodes are the same we patch new onto old and
|
|
538
|
+
// decrement our end indices, and also likewise in this case we don't
|
|
539
|
+
// need to move any DOM Nodes.
|
|
455
540
|
patch(oldEndVnode, newEndVnode);
|
|
456
541
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
457
542
|
newEndVnode = newCh[--newEndIdx];
|
|
458
543
|
}
|
|
459
544
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
460
545
|
patch(oldStartVnode, newEndVnode);
|
|
546
|
+
// We need to move the element for `oldStartVnode` into a position which
|
|
547
|
+
// will be appropriate for `newEndVnode`. For this we can use
|
|
548
|
+
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
549
|
+
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
550
|
+
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
551
|
+
//
|
|
552
|
+
// <old-start-node />
|
|
553
|
+
// <some-intervening-node />
|
|
554
|
+
// <old-end-node />
|
|
555
|
+
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
556
|
+
// <next-sibling />
|
|
557
|
+
//
|
|
558
|
+
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
559
|
+
// the node for `oldStartVnode` at the end of the children of
|
|
560
|
+
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
561
|
+
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
562
|
+
// append it to the children of the parent element.
|
|
461
563
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
462
564
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
463
565
|
newEndVnode = newCh[--newEndIdx];
|
|
464
566
|
}
|
|
465
567
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
466
568
|
patch(oldEndVnode, newStartVnode);
|
|
569
|
+
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
570
|
+
// the same node, so since we're here we know that they are not. Thus we
|
|
571
|
+
// can move the element for `oldEndVnode` _before_ the element for
|
|
572
|
+
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
573
|
+
// future.
|
|
467
574
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
468
575
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
469
576
|
newStartVnode = newCh[++newStartIdx];
|
|
470
577
|
}
|
|
471
578
|
else {
|
|
472
579
|
{
|
|
473
|
-
//
|
|
580
|
+
// We either didn't find an element in the old children that matches
|
|
581
|
+
// the key of the first new child OR the build is not using `key`
|
|
582
|
+
// attributes at all. In either case we need to create a new element
|
|
583
|
+
// for the new node.
|
|
474
584
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
475
585
|
newStartVnode = newCh[++newStartIdx];
|
|
476
586
|
}
|
|
477
587
|
if (node) {
|
|
588
|
+
// if we created a new node then handle inserting it to the DOM
|
|
478
589
|
{
|
|
479
590
|
oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
|
|
480
591
|
}
|
|
@@ -482,20 +593,49 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
482
593
|
}
|
|
483
594
|
}
|
|
484
595
|
if (oldStartIdx > oldEndIdx) {
|
|
596
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
485
597
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
486
598
|
}
|
|
487
599
|
else if (newStartIdx > newEndIdx) {
|
|
600
|
+
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
601
|
+
// in the new array, so lets remove them (which entails cleaning up the
|
|
602
|
+
// relevant DOM nodes)
|
|
488
603
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
489
604
|
}
|
|
490
605
|
};
|
|
491
|
-
|
|
606
|
+
/**
|
|
607
|
+
* Compare two VNodes to determine if they are the same
|
|
608
|
+
*
|
|
609
|
+
* **NB**: This function is an equality _heuristic_ based on the available
|
|
610
|
+
* information set on the two VNodes and can be misleading under certain
|
|
611
|
+
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
612
|
+
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
613
|
+
* checking that they have the same tag.
|
|
614
|
+
*
|
|
615
|
+
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
616
|
+
* changing order within a `children` array or something along those lines then
|
|
617
|
+
* we could obtain a false positive and then have to do needless re-rendering.
|
|
618
|
+
*
|
|
619
|
+
* @param leftVNode the first VNode to check
|
|
620
|
+
* @param rightVNode the second VNode to check
|
|
621
|
+
* @returns whether they're equal or not
|
|
622
|
+
*/
|
|
623
|
+
const isSameVnode = (leftVNode, rightVNode) => {
|
|
492
624
|
// compare if two vnode to see if they're "technically" the same
|
|
493
625
|
// need to have the same element tag, and same key to be the same
|
|
494
|
-
if (
|
|
626
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
495
627
|
return true;
|
|
496
628
|
}
|
|
497
629
|
return false;
|
|
498
630
|
};
|
|
631
|
+
/**
|
|
632
|
+
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
633
|
+
* it. This function handles flushing updates to the DOM and reconciling the
|
|
634
|
+
* children of the two nodes (if any).
|
|
635
|
+
*
|
|
636
|
+
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
637
|
+
* @param newVNode a new VNode representing an updated version of the old one
|
|
638
|
+
*/
|
|
499
639
|
const patch = (oldVNode, newVNode) => {
|
|
500
640
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
501
641
|
const oldChildren = oldVNode.$children$;
|
|
@@ -508,7 +648,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
508
648
|
// only add this to the when the compiler sees we're using an svg somewhere
|
|
509
649
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
510
650
|
}
|
|
511
|
-
// element node
|
|
512
651
|
{
|
|
513
652
|
{
|
|
514
653
|
// either this is the first render of an element OR it's an update
|
|
@@ -519,6 +658,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
519
658
|
}
|
|
520
659
|
if (oldChildren !== null && newChildren !== null) {
|
|
521
660
|
// looks like there's child vnodes for both the old and new vnodes
|
|
661
|
+
// so we need to call `updateChildren` to reconcile them
|
|
522
662
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
523
663
|
}
|
|
524
664
|
else if (newChildren !== null) {
|
|
@@ -550,7 +690,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
550
690
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
551
691
|
hostTagName = hostElm.tagName;
|
|
552
692
|
rootVnode.$tag$ = null;
|
|
553
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
693
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
554
694
|
hostRef.$vnode$ = rootVnode;
|
|
555
695
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
556
696
|
{
|
|
@@ -578,10 +718,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
578
718
|
};
|
|
579
719
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
580
720
|
{
|
|
581
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
721
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
582
722
|
}
|
|
583
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
584
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
723
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
724
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
585
725
|
return;
|
|
586
726
|
}
|
|
587
727
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -628,7 +768,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
628
768
|
}
|
|
629
769
|
else {
|
|
630
770
|
Promise.all(childrenPromises).then(postUpdate);
|
|
631
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
771
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
632
772
|
childrenPromises.length = 0;
|
|
633
773
|
}
|
|
634
774
|
}
|
|
@@ -637,10 +777,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
637
777
|
try {
|
|
638
778
|
instance = instance.render() ;
|
|
639
779
|
{
|
|
640
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
780
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
641
781
|
}
|
|
642
782
|
{
|
|
643
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
783
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
644
784
|
}
|
|
645
785
|
{
|
|
646
786
|
{
|
|
@@ -663,8 +803,8 @@ const postUpdateComponent = (hostRef) => {
|
|
|
663
803
|
const elm = hostRef.$hostElement$;
|
|
664
804
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
665
805
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
666
|
-
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
667
|
-
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
806
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
807
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
668
808
|
{
|
|
669
809
|
// DOM WRITE!
|
|
670
810
|
addHydratedFlag(elm);
|
|
@@ -687,10 +827,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
687
827
|
hostRef.$onRenderResolve$();
|
|
688
828
|
hostRef.$onRenderResolve$ = undefined;
|
|
689
829
|
}
|
|
690
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
830
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
691
831
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
692
832
|
}
|
|
693
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
833
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
694
834
|
}
|
|
695
835
|
// ( •_•)
|
|
696
836
|
// ( •_•)>⌐■-■
|
|
@@ -753,12 +893,12 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
753
893
|
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
754
894
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
755
895
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
756
|
-
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
896
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
757
897
|
// gadzooks! the property's value has changed!!
|
|
758
898
|
// set our new value!
|
|
759
899
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
760
900
|
if (instance) {
|
|
761
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
901
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
762
902
|
// looks like this value actually changed, so we've got work to do!
|
|
763
903
|
// but only if we've already rendered, otherwise just chill out
|
|
764
904
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -774,8 +914,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
774
914
|
const members = Object.entries(cmpMeta.$members$);
|
|
775
915
|
const prototype = Cstr.prototype;
|
|
776
916
|
members.map(([memberName, [memberFlags]]) => {
|
|
777
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
778
|
-
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
917
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
918
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
779
919
|
// proxyComponent - prop
|
|
780
920
|
Object.defineProperty(prototype, memberName, {
|
|
781
921
|
get() {
|
|
@@ -796,10 +936,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
796
936
|
};
|
|
797
937
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
798
938
|
// initializeComponent
|
|
799
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
939
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
800
940
|
{
|
|
801
941
|
// we haven't initialized this element yet
|
|
802
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
942
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
803
943
|
// lazy loaded components
|
|
804
944
|
// request the component's implementation to be
|
|
805
945
|
// wired up with the host element
|
|
@@ -811,7 +951,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
811
951
|
endLoad();
|
|
812
952
|
}
|
|
813
953
|
if (!Cstr.isProxied) {
|
|
814
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
954
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
815
955
|
Cstr.isProxied = true;
|
|
816
956
|
}
|
|
817
957
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -819,7 +959,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
819
959
|
// but let's keep track of when we start and stop
|
|
820
960
|
// so that the getters/setters don't incorrectly step on data
|
|
821
961
|
{
|
|
822
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
962
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
823
963
|
}
|
|
824
964
|
// construct the lazy-loaded component implementation
|
|
825
965
|
// passing the hostRef is very important during
|
|
@@ -832,7 +972,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
832
972
|
consoleError(e);
|
|
833
973
|
}
|
|
834
974
|
{
|
|
835
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
975
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
836
976
|
}
|
|
837
977
|
endNewInstance();
|
|
838
978
|
}
|
|
@@ -842,7 +982,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
842
982
|
const scopeId = getScopeId(cmpMeta);
|
|
843
983
|
if (!styles.has(scopeId)) {
|
|
844
984
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
845
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
985
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
846
986
|
endRegisterStyles();
|
|
847
987
|
}
|
|
848
988
|
}
|
|
@@ -864,13 +1004,13 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
864
1004
|
}
|
|
865
1005
|
};
|
|
866
1006
|
const connectedCallback = (elm) => {
|
|
867
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1007
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
868
1008
|
const hostRef = getHostRef(elm);
|
|
869
1009
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
870
1010
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
871
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1011
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
872
1012
|
// first time this component has connected
|
|
873
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1013
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
874
1014
|
{
|
|
875
1015
|
// find the first ancestor component (if there is one) and register
|
|
876
1016
|
// this component as one of the actively loading child components for its ancestor
|
|
@@ -890,7 +1030,7 @@ const connectedCallback = (elm) => {
|
|
|
890
1030
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
891
1031
|
if (cmpMeta.$members$) {
|
|
892
1032
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
893
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1033
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
894
1034
|
const value = elm[memberName];
|
|
895
1035
|
delete elm[memberName];
|
|
896
1036
|
elm[memberName] = value;
|
|
@@ -905,7 +1045,7 @@ const connectedCallback = (elm) => {
|
|
|
905
1045
|
}
|
|
906
1046
|
};
|
|
907
1047
|
const disconnectedCallback = (elm) => {
|
|
908
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1048
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
909
1049
|
getHostRef(elm);
|
|
910
1050
|
}
|
|
911
1051
|
};
|
|
@@ -941,7 +1081,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
941
1081
|
super(self);
|
|
942
1082
|
self = this;
|
|
943
1083
|
registerHost(self, cmpMeta);
|
|
944
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1084
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
945
1085
|
// this component is using shadow dom
|
|
946
1086
|
// and this browser supports shadow dom
|
|
947
1087
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -976,7 +1116,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
976
1116
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
977
1117
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
978
1118
|
cmpTags.push(tagName);
|
|
979
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1119
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
980
1120
|
}
|
|
981
1121
|
});
|
|
982
1122
|
});
|
|
@@ -998,7 +1138,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
998
1138
|
// Fallback appLoad event
|
|
999
1139
|
endBootstrap();
|
|
1000
1140
|
};
|
|
1001
|
-
const hostRefs = new WeakMap();
|
|
1141
|
+
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1002
1142
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1003
1143
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1004
1144
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1039,14 +1179,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1039
1179
|
return importedModule[exportName];
|
|
1040
1180
|
}, consoleError);
|
|
1041
1181
|
};
|
|
1042
|
-
const styles = new Map();
|
|
1182
|
+
const styles = /*@__PURE__*/ new Map();
|
|
1043
1183
|
const queueDomReads = [];
|
|
1044
1184
|
const queueDomWrites = [];
|
|
1045
1185
|
const queueTask = (queue, write) => (cb) => {
|
|
1046
1186
|
queue.push(cb);
|
|
1047
1187
|
if (!queuePending) {
|
|
1048
1188
|
queuePending = true;
|
|
1049
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
1189
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1050
1190
|
nextTick(flush);
|
|
1051
1191
|
}
|
|
1052
1192
|
else {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-79bdde2d.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.18.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
2
|
const url = 'https://eswat2.dev';
|
|
3
3
|
const who = 'eswat2';
|
|
4
4
|
const pawIcon = ({ hex = 'currentColor', size = 24 }) => {
|
|
5
|
-
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24" },
|
|
6
|
-
h("g", { fill: hex },
|
|
7
|
-
h("path", { d: "M8.35,3C9.53,2.83 10.78,4.12 11.14,5.9C11.5,7.67 10.85,9.25\n 9.67,9.43C8.5,9.61 7.24,8.32 6.87,6.54C6.5,4.77 7.17,3.19\n 8.35,3M15.5,3C16.69,3.19 17.35,4.77 17,6.54C16.62,8.32 15.37,9.61\n 14.19,9.43C13,9.25 12.35,7.67 12.72,5.9C13.08,4.12 14.33,2.83\n 15.5,3M3,7.6C4.14,7.11 5.69,8 6.5,9.55C7.26,11.13 7,12.79\n 5.87,13.28C4.74,13.77 3.2,12.89 2.41,11.32C1.62,9.75 1.9,8.08\n 3,7.6M21,7.6C22.1,8.08 22.38,9.75 21.59,11.32C20.8,12.89 19.26,13.77\n 18.13,13.28C17,12.79 16.74,11.13 17.5,9.55C18.31,8 19.86,7.11\n 21,7.6M19.33,18.38C19.37,19.32 18.65,20.36 17.79,20.75C16,21.57\n 13.88,19.87 11.89,19.87C9.9,19.87 7.76,21.64 6,20.75C5,20.26 4.31,18.96\n 4.44,17.88C4.62,16.39 6.41,15.59 7.47,14.5C8.88,13.09 9.88,10.44\n 11.89,10.44C13.89,10.44 14.95,13.05 16.3,14.5C17.41,15.72 19.26,16.75\n 19.33,18.38Z" })),
|
|
8
|
-
h("path", { d: "M0 0h24v24H0z", fill: "none" })));
|
|
5
|
+
return (h("svg", { width: size, height: size, viewBox: "0 0 24 24" }, h("g", { fill: hex }, h("path", { d: "M8.35,3C9.53,2.83 10.78,4.12 11.14,5.9C11.5,7.67 10.85,9.25\n 9.67,9.43C8.5,9.61 7.24,8.32 6.87,6.54C6.5,4.77 7.17,3.19\n 8.35,3M15.5,3C16.69,3.19 17.35,4.77 17,6.54C16.62,8.32 15.37,9.61\n 14.19,9.43C13,9.25 12.35,7.67 12.72,5.9C13.08,4.12 14.33,2.83\n 15.5,3M3,7.6C4.14,7.11 5.69,8 6.5,9.55C7.26,11.13 7,12.79\n 5.87,13.28C4.74,13.77 3.2,12.89 2.41,11.32C1.62,9.75 1.9,8.08\n 3,7.6M21,7.6C22.1,8.08 22.38,9.75 21.59,11.32C20.8,12.89 19.26,13.77\n 18.13,13.28C17,12.79 16.74,11.13 17.5,9.55C18.31,8 19.86,7.11\n 21,7.6M19.33,18.38C19.37,19.32 18.65,20.36 17.79,20.75C16,21.57\n 13.88,19.87 11.89,19.87C9.9,19.87 7.76,21.64 6,20.75C5,20.26 4.31,18.96\n 4.44,17.88C4.62,16.39 6.41,15.59 7.47,14.5C8.88,13.09 9.88,10.44\n 11.89,10.44C13.89,10.44 14.95,13.05 16.3,14.5C17.41,15.72 19.26,16.75\n 19.33,18.38Z" })), h("path", { d: "M0 0h24v24H0z", fill: "none" })));
|
|
9
6
|
};
|
|
10
7
|
export class Eswat2Io {
|
|
11
8
|
render() {
|
|
@@ -13,10 +10,14 @@ export class Eswat2Io {
|
|
|
13
10
|
}
|
|
14
11
|
static get is() { return "eswat2-io"; }
|
|
15
12
|
static get encapsulation() { return "shadow"; }
|
|
16
|
-
static get originalStyleUrls() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
static get originalStyleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["./eswat2-io.css"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static get styleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["eswat2-io.css"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
22
23
|
}
|