@sankhyalabs/sankhyablocks 1.3.31-beta.6 → 1.3.31

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.
Files changed (70) hide show
  1. package/dist/cjs/{index-532bcc28.js → index-1133bc2a.js} +9 -419
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/sankhyablocks.cjs.js +2 -2
  4. package/dist/cjs/snk-application.cjs.entry.js +98 -213
  5. package/dist/cjs/snk-pesquisa.cjs.entry.js +2 -2
  6. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  7. package/dist/collection/collection-manifest.json +0 -4
  8. package/dist/collection/components/snk-application/snk-application.js +48 -165
  9. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -2
  10. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +21 -52
  11. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +3 -4
  12. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +1 -0
  13. package/dist/components/snk-application2.js +97 -213
  14. package/dist/components/snk-pesquisa2.js +1 -1
  15. package/dist/esm/{index-0b078db7.js → index-ffda6382.js} +10 -419
  16. package/dist/esm/loader.js +2 -2
  17. package/dist/esm/sankhyablocks.js +2 -2
  18. package/dist/esm/snk-application.entry.js +98 -213
  19. package/dist/esm/snk-pesquisa.entry.js +2 -2
  20. package/dist/esm/teste-pesquisa.entry.js +1 -1
  21. package/dist/sankhyablocks/{p-a8305c35.entry.js → p-2a7b4cb3.entry.js} +1 -1
  22. package/dist/sankhyablocks/{p-a670853c.entry.js → p-49fdec1f.entry.js} +1 -1
  23. package/dist/sankhyablocks/p-9bc9abe0.entry.js +69 -0
  24. package/dist/sankhyablocks/p-edcb9d8e.js +2 -0
  25. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  26. package/dist/types/components/snk-application/snk-application.d.ts +13 -90
  27. package/dist/types/components.d.ts +2 -334
  28. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +0 -2
  29. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -1
  30. package/package.json +5 -5
  31. package/react/components.d.ts +0 -4
  32. package/react/components.js +0 -4
  33. package/react/components.js.map +1 -1
  34. package/dist/cjs/snk-data-unit.cjs.entry.js +0 -189
  35. package/dist/cjs/snk-form.cjs.entry.js +0 -95
  36. package/dist/cjs/snk-grid.cjs.entry.js +0 -64
  37. package/dist/cjs/snk-taskbar.cjs.entry.js +0 -140
  38. package/dist/cjs/taskbar-elements-9d47b416.js +0 -70
  39. package/dist/collection/components/snk-data-unit/snk-data-unit.css +0 -6
  40. package/dist/collection/components/snk-data-unit/snk-data-unit.js +0 -449
  41. package/dist/collection/components/snk-form/snk-form.css +0 -3
  42. package/dist/collection/components/snk-form/snk-form.js +0 -194
  43. package/dist/collection/components/snk-grid/snk-grid.css +0 -5
  44. package/dist/collection/components/snk-grid/snk-grid.js +0 -128
  45. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +0 -65
  46. package/dist/collection/components/snk-taskbar/snk-taskbar.css +0 -3
  47. package/dist/collection/components/snk-taskbar/snk-taskbar.js +0 -252
  48. package/dist/components/snk-data-unit.d.ts +0 -11
  49. package/dist/components/snk-data-unit.js +0 -213
  50. package/dist/components/snk-form.d.ts +0 -11
  51. package/dist/components/snk-form.js +0 -121
  52. package/dist/components/snk-grid.d.ts +0 -11
  53. package/dist/components/snk-grid.js +0 -88
  54. package/dist/components/snk-taskbar.d.ts +0 -11
  55. package/dist/components/snk-taskbar.js +0 -6
  56. package/dist/components/snk-taskbar2.js +0 -221
  57. package/dist/esm/snk-data-unit.entry.js +0 -185
  58. package/dist/esm/snk-form.entry.js +0 -91
  59. package/dist/esm/snk-grid.entry.js +0 -60
  60. package/dist/esm/snk-taskbar.entry.js +0 -136
  61. package/dist/esm/taskbar-elements-3ba30bf4.js +0 -68
  62. package/dist/sankhyablocks/p-3cb106f7.entry.js +0 -69
  63. package/dist/sankhyablocks/p-3fce3190.entry.js +0 -1
  64. package/dist/sankhyablocks/p-560fdf54.entry.js +0 -1
  65. package/dist/sankhyablocks/p-574764bf.js +0 -1
  66. package/dist/sankhyablocks/p-8f7b9a85.entry.js +0 -1
  67. package/dist/sankhyablocks/p-9c225717.entry.js +0 -1
  68. package/dist/sankhyablocks/p-a45dba1a.js +0 -2
  69. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +0 -25
  70. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +0 -45
@@ -23,11 +23,7 @@ function _interopNamespace(e) {
23
23
  const NAMESPACE = 'sankhyablocks';
24
24
 
25
25
  let scopeId;
26
- let contentRef;
27
26
  let hostTagName;
28
- let useNativeShadowDom = false;
29
- let checkSlotFallbackVisibility = false;
30
- let checkSlotRelocate = false;
31
27
  let isSvgMode = false;
32
28
  let queuePending = false;
33
29
  const win = typeof window !== 'undefined' ? window : {};
@@ -161,8 +157,6 @@ const isComplexType = (o) => {
161
157
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
162
158
  const h = (nodeName, vnodeData, ...children) => {
163
159
  let child = null;
164
- let key = null;
165
- let slotName = null;
166
160
  let simple = false;
167
161
  let lastSimple = false;
168
162
  const vNodeChildren = [];
@@ -190,13 +184,6 @@ const h = (nodeName, vnodeData, ...children) => {
190
184
  };
191
185
  walk(children);
192
186
  if (vnodeData) {
193
- // normalize class / classname attributes
194
- if (vnodeData.key) {
195
- key = vnodeData.key;
196
- }
197
- if (vnodeData.name) {
198
- slotName = vnodeData.name;
199
- }
200
187
  {
201
188
  const classData = vnodeData.className || vnodeData.class;
202
189
  if (classData) {
@@ -214,12 +201,6 @@ const h = (nodeName, vnodeData, ...children) => {
214
201
  if (vNodeChildren.length > 0) {
215
202
  vnode.$children$ = vNodeChildren;
216
203
  }
217
- {
218
- vnode.$key$ = key;
219
- }
220
- {
221
- vnode.$name$ = slotName;
222
- }
223
204
  return vnode;
224
205
  };
225
206
  const newVNode = (tag, text) => {
@@ -233,12 +214,6 @@ const newVNode = (tag, text) => {
233
214
  {
234
215
  vnode.$attrs$ = null;
235
216
  }
236
- {
237
- vnode.$key$ = null;
238
- }
239
- {
240
- vnode.$name$ = null;
241
- }
242
217
  return vnode;
243
218
  };
244
219
  const Host = {};
@@ -262,8 +237,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
262
237
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
263
238
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
264
239
  }
265
- else if (memberName === 'key')
266
- ;
267
240
  else if (memberName === 'ref') {
268
241
  // minifier will clean this up
269
242
  if (newValue) {
@@ -376,36 +349,13 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
376
349
  let i = 0;
377
350
  let elm;
378
351
  let childNode;
379
- let oldVNode;
380
- if (!useNativeShadowDom) {
381
- // remember for later we need to check to relocate nodes
382
- checkSlotRelocate = true;
383
- if (newVNode.$tag$ === 'slot') {
384
- if (scopeId) {
385
- // scoped css needs to add its scoped id to the parent element
386
- parentElm.classList.add(scopeId + '-s');
387
- }
388
- newVNode.$flags$ |= newVNode.$children$
389
- ? // slot element has fallback content
390
- 2 /* isSlotFallback */
391
- : // slot element does not have fallback content
392
- 1 /* isSlotReference */;
393
- }
394
- }
395
352
  if (newVNode.$text$ !== null) {
396
353
  // create text node
397
354
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
398
355
  }
399
- else if (newVNode.$flags$ & 1 /* isSlotReference */) {
400
- // create a slot reference node
401
- elm = newVNode.$elm$ =
402
- doc.createTextNode('');
403
- }
404
356
  else {
405
357
  // create element
406
- elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
407
- ? 'slot-fb'
408
- : newVNode.$tag$));
358
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
409
359
  // add css classes, attrs, props, listeners, etc.
410
360
  {
411
361
  updateElement(null, newVNode, isSvgMode);
@@ -418,7 +368,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
418
368
  if (newVNode.$children$) {
419
369
  for (i = 0; i < newVNode.$children$.length; ++i) {
420
370
  // create the node
421
- childNode = createElm(oldParentVNode, newVNode, i, elm);
371
+ childNode = createElm(oldParentVNode, newVNode, i);
422
372
  // return node could have been null
423
373
  if (childNode) {
424
374
  // append our new node
@@ -427,62 +377,20 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
427
377
  }
428
378
  }
429
379
  }
430
- {
431
- elm['s-hn'] = hostTagName;
432
- if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
433
- // remember the content reference comment
434
- elm['s-sr'] = true;
435
- // remember the content reference comment
436
- elm['s-cr'] = contentRef;
437
- // remember the slot name, or empty string for default slot
438
- elm['s-sn'] = newVNode.$name$ || '';
439
- // check if we've got an old vnode for this slot
440
- oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
441
- if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
442
- // we've got an old slot vnode and the wrapper is being replaced
443
- // so let's move the old slot content back to it's original location
444
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
445
- }
446
- }
447
- }
448
380
  return elm;
449
381
  };
450
- const putBackInOriginalLocation = (parentElm, recursive) => {
451
- plt.$flags$ |= 1 /* isTmpDisconnected */;
452
- const oldSlotChildNodes = parentElm.childNodes;
453
- for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
454
- const childNode = oldSlotChildNodes[i];
455
- if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
456
- // // this child node in the old element is from another component
457
- // // remove this node from the old slot's parent
458
- // childNode.remove();
459
- // and relocate it back to it's original location
460
- parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
461
- // remove the old original location comment entirely
462
- // later on the patch function will know what to do
463
- // and move this to the correct spot in need be
464
- childNode['s-ol'].remove();
465
- childNode['s-ol'] = undefined;
466
- checkSlotRelocate = true;
467
- }
468
- if (recursive) {
469
- putBackInOriginalLocation(childNode, recursive);
470
- }
471
- }
472
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
473
- };
474
382
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
475
- let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
383
+ let containerElm = (parentElm);
476
384
  let childNode;
477
385
  if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
478
386
  containerElm = containerElm.shadowRoot;
479
387
  }
480
388
  for (; startIdx <= endIdx; ++startIdx) {
481
389
  if (vnodes[startIdx]) {
482
- childNode = createElm(null, parentVNode, startIdx, parentElm);
390
+ childNode = createElm(null, parentVNode, startIdx);
483
391
  if (childNode) {
484
392
  vnodes[startIdx].$elm$ = childNode;
485
- containerElm.insertBefore(childNode, referenceNode(before) );
393
+ containerElm.insertBefore(childNode, before);
486
394
  }
487
395
  }
488
396
  }
@@ -492,20 +400,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
492
400
  if ((vnode = vnodes[startIdx])) {
493
401
  elm = vnode.$elm$;
494
402
  callNodeRefs(vnode);
495
- {
496
- // we're removing this element
497
- // so it's possible we need to show slot fallback content now
498
- checkSlotFallbackVisibility = true;
499
- if (elm['s-ol']) {
500
- // remove the original location comment
501
- elm['s-ol'].remove();
502
- }
503
- else {
504
- // it's possible that child nodes of the node
505
- // that's being removed are slot nodes
506
- putBackInOriginalLocation(elm, true);
507
- }
508
- }
509
403
  // remove the vnode's element from the dom
510
404
  elm.remove();
511
405
  }
@@ -514,8 +408,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
514
408
  const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
515
409
  let oldStartIdx = 0;
516
410
  let newStartIdx = 0;
517
- let idxInOld = 0;
518
- let i = 0;
519
411
  let oldEndIdx = oldCh.length - 1;
520
412
  let oldStartVnode = oldCh[0];
521
413
  let oldEndVnode = oldCh[oldEndIdx];
@@ -523,7 +415,6 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
523
415
  let newStartVnode = newCh[0];
524
416
  let newEndVnode = newCh[newEndIdx];
525
417
  let node;
526
- let elmToMove;
527
418
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
528
419
  if (oldStartVnode == null) {
529
420
  // Vnode might have been moved left
@@ -549,56 +440,26 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
549
440
  newEndVnode = newCh[--newEndIdx];
550
441
  }
551
442
  else if (isSameVnode(oldStartVnode, newEndVnode)) {
552
- // Vnode moved right
553
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
554
- putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
555
- }
556
443
  patch(oldStartVnode, newEndVnode);
557
444
  parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
558
445
  oldStartVnode = oldCh[++oldStartIdx];
559
446
  newEndVnode = newCh[--newEndIdx];
560
447
  }
561
448
  else if (isSameVnode(oldEndVnode, newStartVnode)) {
562
- // Vnode moved left
563
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
564
- putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
565
- }
566
449
  patch(oldEndVnode, newStartVnode);
567
450
  parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
568
451
  oldEndVnode = oldCh[--oldEndIdx];
569
452
  newStartVnode = newCh[++newStartIdx];
570
453
  }
571
454
  else {
572
- // createKeyToOldIdx
573
- idxInOld = -1;
574
455
  {
575
- for (i = oldStartIdx; i <= oldEndIdx; ++i) {
576
- if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
577
- idxInOld = i;
578
- break;
579
- }
580
- }
581
- }
582
- if (idxInOld >= 0) {
583
- elmToMove = oldCh[idxInOld];
584
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
585
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
586
- }
587
- else {
588
- patch(elmToMove, newStartVnode);
589
- oldCh[idxInOld] = undefined;
590
- node = elmToMove.$elm$;
591
- }
592
- newStartVnode = newCh[++newStartIdx];
593
- }
594
- else {
595
456
  // new element
596
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
457
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
597
458
  newStartVnode = newCh[++newStartIdx];
598
459
  }
599
460
  if (node) {
600
461
  {
601
- parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
462
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
602
463
  }
603
464
  }
604
465
  }
@@ -614,36 +475,19 @@ const isSameVnode = (vnode1, vnode2) => {
614
475
  // compare if two vnode to see if they're "technically" the same
615
476
  // need to have the same element tag, and same key to be the same
616
477
  if (vnode1.$tag$ === vnode2.$tag$) {
617
- if (vnode1.$tag$ === 'slot') {
618
- return vnode1.$name$ === vnode2.$name$;
619
- }
620
- {
621
- return vnode1.$key$ === vnode2.$key$;
622
- }
478
+ return true;
623
479
  }
624
480
  return false;
625
481
  };
626
- const referenceNode = (node) => {
627
- // this node was relocated to a new location in the dom
628
- // because of some other component's slot
629
- // but we still have an html comment in place of where
630
- // it's original location was according to it's original vdom
631
- return (node && node['s-ol']) || node;
632
- };
633
- const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
634
482
  const patch = (oldVNode, newVNode) => {
635
483
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
636
484
  const oldChildren = oldVNode.$children$;
637
485
  const newChildren = newVNode.$children$;
638
- const tag = newVNode.$tag$;
639
486
  const text = newVNode.$text$;
640
- let defaultHolder;
641
487
  if (text === null) {
642
488
  // element node
643
489
  {
644
- if (tag === 'slot')
645
- ;
646
- else {
490
+ {
647
491
  // either this is the first render of an element OR it's an update
648
492
  // AND we already know it's possible it could have changed
649
493
  // this updates the element's css classes, attrs, props, listeners, etc.
@@ -668,147 +512,12 @@ const patch = (oldVNode, newVNode) => {
668
512
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
669
513
  }
670
514
  }
671
- else if ((defaultHolder = elm['s-cr'])) {
672
- // this element has slotted content
673
- defaultHolder.parentNode.textContent = text;
674
- }
675
515
  else if (oldVNode.$text$ !== text) {
676
516
  // update the text content for the text only vnode
677
517
  // and also only if the text is different than before
678
518
  elm.data = text;
679
519
  }
680
520
  };
681
- const updateFallbackSlotVisibility = (elm) => {
682
- // tslint:disable-next-line: prefer-const
683
- const childNodes = elm.childNodes;
684
- let childNode;
685
- let i;
686
- let ilen;
687
- let j;
688
- let slotNameAttr;
689
- let nodeType;
690
- for (i = 0, ilen = childNodes.length; i < ilen; i++) {
691
- childNode = childNodes[i];
692
- if (childNode.nodeType === 1 /* ElementNode */) {
693
- if (childNode['s-sr']) {
694
- // this is a slot fallback node
695
- // get the slot name for this slot reference node
696
- slotNameAttr = childNode['s-sn'];
697
- // by default always show a fallback slot node
698
- // then hide it if there are other slots in the light dom
699
- childNode.hidden = false;
700
- for (j = 0; j < ilen; j++) {
701
- nodeType = childNodes[j].nodeType;
702
- if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
703
- // this sibling node is from a different component OR is a named fallback slot node
704
- if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
705
- childNode.hidden = true;
706
- break;
707
- }
708
- }
709
- else {
710
- // this is a default fallback slot node
711
- // any element or text node (with content)
712
- // should hide the default fallback slot node
713
- if (nodeType === 1 /* ElementNode */ ||
714
- (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
715
- childNode.hidden = true;
716
- break;
717
- }
718
- }
719
- }
720
- }
721
- // keep drilling down
722
- updateFallbackSlotVisibility(childNode);
723
- }
724
- }
725
- };
726
- const relocateNodes = [];
727
- const relocateSlotContent = (elm) => {
728
- // tslint:disable-next-line: prefer-const
729
- let childNode;
730
- let node;
731
- let hostContentNodes;
732
- let slotNameAttr;
733
- let relocateNodeData;
734
- let j;
735
- let i = 0;
736
- const childNodes = elm.childNodes;
737
- const ilen = childNodes.length;
738
- for (; i < ilen; i++) {
739
- childNode = childNodes[i];
740
- if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
741
- // first got the content reference comment node
742
- // then we got it's parent, which is where all the host content is in now
743
- hostContentNodes = node.parentNode.childNodes;
744
- slotNameAttr = childNode['s-sn'];
745
- for (j = hostContentNodes.length - 1; j >= 0; j--) {
746
- node = hostContentNodes[j];
747
- if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
748
- // let's do some relocating to its new home
749
- // but never relocate a content reference node
750
- // that is suppose to always represent the original content location
751
- if (isNodeLocatedInSlot(node, slotNameAttr)) {
752
- // it's possible we've already decided to relocate this node
753
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
754
- // made some changes to slots
755
- // let's make sure we also double check
756
- // fallbacks are correctly hidden or shown
757
- checkSlotFallbackVisibility = true;
758
- node['s-sn'] = node['s-sn'] || slotNameAttr;
759
- if (relocateNodeData) {
760
- // previously we never found a slot home for this node
761
- // but turns out we did, so let's remember it now
762
- relocateNodeData.$slotRefNode$ = childNode;
763
- }
764
- else {
765
- // add to our list of nodes to relocate
766
- relocateNodes.push({
767
- $slotRefNode$: childNode,
768
- $nodeToRelocate$: node,
769
- });
770
- }
771
- if (node['s-sr']) {
772
- relocateNodes.map((relocateNode) => {
773
- if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
774
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
775
- if (relocateNodeData && !relocateNode.$slotRefNode$) {
776
- relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
777
- }
778
- }
779
- });
780
- }
781
- }
782
- else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
783
- // so far this element does not have a slot home, not setting slotRefNode on purpose
784
- // if we never find a home for this element then we'll need to hide it
785
- relocateNodes.push({
786
- $nodeToRelocate$: node,
787
- });
788
- }
789
- }
790
- }
791
- }
792
- if (childNode.nodeType === 1 /* ElementNode */) {
793
- relocateSlotContent(childNode);
794
- }
795
- }
796
- };
797
- const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
798
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
799
- if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
800
- return true;
801
- }
802
- if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
803
- return true;
804
- }
805
- return false;
806
- }
807
- if (nodeToRelocate['s-sn'] === slotNameAttr) {
808
- return true;
809
- }
810
- return slotNameAttr === '';
811
- };
812
521
  const callNodeRefs = (vNode) => {
813
522
  {
814
523
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -817,7 +526,6 @@ const callNodeRefs = (vNode) => {
817
526
  };
818
527
  const renderVdom = (hostRef, renderFnResults) => {
819
528
  const hostElm = hostRef.$hostElement$;
820
- const cmpMeta = hostRef.$cmpMeta$;
821
529
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
822
530
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
823
531
  hostTagName = hostElm.tagName;
@@ -828,90 +536,8 @@ const renderVdom = (hostRef, renderFnResults) => {
828
536
  {
829
537
  scopeId = hostElm['s-sc'];
830
538
  }
831
- {
832
- contentRef = hostElm['s-cr'];
833
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
834
- // always reset
835
- checkSlotFallbackVisibility = false;
836
- }
837
539
  // synchronous patch
838
540
  patch(oldVNode, rootVnode);
839
- {
840
- // while we're moving nodes around existing nodes, temporarily disable
841
- // the disconnectCallback from working
842
- plt.$flags$ |= 1 /* isTmpDisconnected */;
843
- if (checkSlotRelocate) {
844
- relocateSlotContent(rootVnode.$elm$);
845
- let relocateData;
846
- let nodeToRelocate;
847
- let orgLocationNode;
848
- let parentNodeRef;
849
- let insertBeforeNode;
850
- let refNode;
851
- let i = 0;
852
- for (; i < relocateNodes.length; i++) {
853
- relocateData = relocateNodes[i];
854
- nodeToRelocate = relocateData.$nodeToRelocate$;
855
- if (!nodeToRelocate['s-ol']) {
856
- // add a reference node marking this node's original location
857
- // keep a reference to this node for later lookups
858
- orgLocationNode =
859
- doc.createTextNode('');
860
- orgLocationNode['s-nr'] = nodeToRelocate;
861
- nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
862
- }
863
- }
864
- for (i = 0; i < relocateNodes.length; i++) {
865
- relocateData = relocateNodes[i];
866
- nodeToRelocate = relocateData.$nodeToRelocate$;
867
- if (relocateData.$slotRefNode$) {
868
- // by default we're just going to insert it directly
869
- // after the slot reference node
870
- parentNodeRef = relocateData.$slotRefNode$.parentNode;
871
- insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
872
- orgLocationNode = nodeToRelocate['s-ol'];
873
- while ((orgLocationNode = orgLocationNode.previousSibling)) {
874
- refNode = orgLocationNode['s-nr'];
875
- if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
876
- refNode = refNode.nextSibling;
877
- if (!refNode || !refNode['s-nr']) {
878
- insertBeforeNode = refNode;
879
- break;
880
- }
881
- }
882
- }
883
- if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
884
- nodeToRelocate.nextSibling !== insertBeforeNode) {
885
- // we've checked that it's worth while to relocate
886
- // since that the node to relocate
887
- // has a different next sibling or parent relocated
888
- if (nodeToRelocate !== insertBeforeNode) {
889
- if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
890
- // probably a component in the index.html that doesn't have it's hostname set
891
- nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
892
- }
893
- // add it back to the dom but in its new home
894
- parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
895
- }
896
- }
897
- }
898
- else {
899
- // this node doesn't have a slot home to go to, so let's hide it
900
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
901
- nodeToRelocate.hidden = true;
902
- }
903
- }
904
- }
905
- }
906
- if (checkSlotFallbackVisibility) {
907
- updateFallbackSlotVisibility(rootVnode.$elm$);
908
- }
909
- // done moving nodes around
910
- // allow the disconnect callback to work again
911
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
912
- // always reset
913
- relocateNodes.length = 0;
914
- }
915
541
  };
916
542
  const getElement = (ref) => (getHostRef(ref).$hostElement$ );
917
543
  const createEvent = (ref, name, flags) => {
@@ -968,9 +594,6 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
968
594
  promise = safeCall(instance, 'componentWillLoad');
969
595
  }
970
596
  }
971
- {
972
- promise = then(promise, () => safeCall(instance, 'componentWillRender'));
973
- }
974
597
  endSchedule();
975
598
  return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
976
599
  };
@@ -1040,9 +663,6 @@ const postUpdateComponent = (hostRef) => {
1040
663
  const endPostUpdate = createTime('postUpdate', tagName);
1041
664
  const instance = hostRef.$lazyInstance$ ;
1042
665
  const ancestorComponent = hostRef.$ancestorComponent$;
1043
- {
1044
- safeCall(instance, 'componentDidRender');
1045
- }
1046
666
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1047
667
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1048
668
  {
@@ -1132,15 +752,6 @@ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1132
752
  const parsePropertyValue = (propValue, propType) => {
1133
753
  // ensure this value is of the correct prop type
1134
754
  if (propValue != null && !isComplexType(propValue)) {
1135
- if (propType & 4 /* Boolean */) {
1136
- // per the HTML spec, any string value means it is a boolean true value
1137
- // but we'll cheat here and say that the string "false" is the boolean false
1138
- return propValue === 'false' ? false : propValue === '' || !!propValue;
1139
- }
1140
- if (propType & 2 /* Number */) {
1141
- // force it to be a number
1142
- return parseFloat(propValue);
1143
- }
1144
755
  if (propType & 1 /* String */) {
1145
756
  // could have been passed as a number or boolean
1146
757
  // but we still want it as a string
@@ -1390,15 +1001,6 @@ const connectedCallback = (elm) => {
1390
1001
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1391
1002
  // first time this component has connected
1392
1003
  hostRef.$flags$ |= 1 /* hasConnected */;
1393
- {
1394
- // initUpdate
1395
- // if the slot polyfill is required we'll need to put some nodes
1396
- // in here to act as original content anchors as we move nodes around
1397
- // host element has been connected to the DOM
1398
- if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1399
- setContentReference(elm);
1400
- }
1401
- }
1402
1004
  {
1403
1005
  // find the first ancestor component (if there is one) and register
1404
1006
  // this component as one of the actively loading child components for its ancestor
@@ -1436,17 +1038,6 @@ const connectedCallback = (elm) => {
1436
1038
  endConnected();
1437
1039
  }
1438
1040
  };
1439
- const setContentReference = (elm) => {
1440
- // only required when we're NOT using native shadow dom (slot)
1441
- // or this browser doesn't support native shadow dom
1442
- // and this host element was NOT created with SSR
1443
- // let's pick out the inner content for slot projection
1444
- // create a node to represent where the original
1445
- // content was first placed, which is useful later on
1446
- const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1447
- contentRefElm['s-cn'] = true;
1448
- elm.insertBefore(contentRefElm, elm.firstChild);
1449
- };
1450
1041
  const disconnectedCallback = (elm) => {
1451
1042
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1452
1043
  const hostRef = getHostRef(elm);
@@ -1639,7 +1230,6 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1639
1230
  exports.Host = Host;
1640
1231
  exports.bootstrapLazy = bootstrapLazy;
1641
1232
  exports.createEvent = createEvent;
1642
- exports.getElement = getElement;
1643
1233
  exports.h = h;
1644
1234
  exports.promiseResolve = promiseResolve;
1645
1235
  exports.registerInstance = registerInstance;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-532bcc28.js');
5
+ const index = require('./index-1133bc2a.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.16.1 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-form.cjs",[[2,"snk-form",{"formTitle":[1,"form-title"],"configName":[1,"config-name"],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32]}]]],["snk-grid.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32]}]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"messageBuilder":[16],"beforeSave":[16],"afterSave":[16],"autoLoad":[4,"auto-load"],"getDataUnit":[64]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application.cjs",[[2,"snk-application",{"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"buttons":[1],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]]], options);
17
+ return index.bootstrapLazy([["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application.cjs",[[2,"snk-application",{"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getResourceID":[64],"alert":[64],"error":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-532bcc28.js');
3
+ const index = require('./index-1133bc2a.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.16.1 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-form.cjs",[[2,"snk-form",{"formTitle":[1,"form-title"],"configName":[1,"config-name"],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32]}]]],["snk-grid.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32]}]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"messageBuilder":[16],"beforeSave":[16],"afterSave":[16],"autoLoad":[4,"auto-load"],"getDataUnit":[64]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application.cjs",[[2,"snk-application",{"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"buttons":[1],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]]], options);
18
+ return index.bootstrapLazy([["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application.cjs",[[2,"snk-application",{"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getResourceID":[64],"alert":[64],"error":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"saveGridConfig":[64],"executeSearch":[64],"isDebugMode":[64]}]]],["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]]], options);
19
19
  });