dash-button-web 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.
Files changed (32) hide show
  1. package/dist/cjs/dash-button.cjs.entry.js +74 -31
  2. package/dist/cjs/dash-button.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-87d4993d.js → index-bc7ebbee.js} +25 -1
  4. package/dist/cjs/index-bc7ebbee.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/web-compnont.cjs.js +2 -2
  7. package/dist/collection/components/my-component/dash-button.css +224 -0
  8. package/dist/collection/components/my-component/dash-button.js +75 -31
  9. package/dist/collection/components/my-component/dash-button.js.map +1 -1
  10. package/dist/components/dash-button.js +75 -31
  11. package/dist/components/dash-button.js.map +1 -1
  12. package/dist/esm/dash-button.entry.js +74 -31
  13. package/dist/esm/dash-button.entry.js.map +1 -1
  14. package/dist/esm/{index-e3df5eaf.js → index-51aa24d3.js} +25 -1
  15. package/dist/esm/index-51aa24d3.js.map +1 -0
  16. package/dist/esm/loader.js +3 -3
  17. package/dist/esm/web-compnont.js +3 -3
  18. package/dist/types/components/my-component/dash-button.d.ts +17 -2
  19. package/dist/types/components.d.ts +1 -1
  20. package/dist/web-compnont/p-06623215.js +3 -0
  21. package/dist/web-compnont/p-06623215.js.map +1 -0
  22. package/dist/web-compnont/{p-2e8505f3.entry.js → p-55f91c48.entry.js} +3 -3
  23. package/dist/web-compnont/p-55f91c48.entry.js.map +1 -0
  24. package/dist/web-compnont/web-compnont.esm.js +1 -1
  25. package/dist/web-compnont/web-compnont.esm.js.map +1 -1
  26. package/package.json +1 -1
  27. package/readme.md +18 -0
  28. package/dist/cjs/index-87d4993d.js.map +0 -1
  29. package/dist/esm/index-e3df5eaf.js.map +0 -1
  30. package/dist/web-compnont/p-2e8505f3.entry.js.map +0 -1
  31. package/dist/web-compnont/p-c1ec12fe.js +0 -3
  32. package/dist/web-compnont/p-c1ec12fe.js.map +0 -1
@@ -365,6 +365,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
365
365
  }
366
366
  else if (memberName === 'key')
367
367
  ;
368
+ else if (memberName === 'ref') {
369
+ // minifier will clean this up
370
+ if (newValue) {
371
+ newValue(elm);
372
+ }
373
+ }
368
374
  else if ((!isProp ) &&
369
375
  memberName[0] === 'o' &&
370
376
  memberName[1] === 'n') {
@@ -597,6 +603,7 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
597
603
  const vnode = vnodes[index];
598
604
  if (vnode) {
599
605
  const elm = vnode.$elm$;
606
+ nullifyVNodeRefs(vnode);
600
607
  if (elm) {
601
608
  // remove the vnode's element from the dom
602
609
  elm.remove();
@@ -905,6 +912,19 @@ const patch = (oldVNode, newVNode, isInitialRender = false) => {
905
912
  elm.data = text;
906
913
  }
907
914
  };
915
+ /**
916
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
917
+ * them with `null`. This signals that the DOM element corresponding to the VDom
918
+ * node has been removed from the DOM.
919
+ *
920
+ * @param vNode a virtual DOM node
921
+ */
922
+ const nullifyVNodeRefs = (vNode) => {
923
+ {
924
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
925
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
926
+ }
927
+ };
908
928
  /**
909
929
  * The main entry point for Stencil's virtual DOM-based rendering engine
910
930
  *
@@ -1137,7 +1157,11 @@ const postUpdateComponent = (hostRef) => {
1137
1157
  const tagName = hostRef.$cmpMeta$.$tagName$;
1138
1158
  const elm = hostRef.$hostElement$;
1139
1159
  const endPostUpdate = createTime('postUpdate', tagName);
1160
+ const instance = hostRef.$lazyInstance$ ;
1140
1161
  const ancestorComponent = hostRef.$ancestorComponent$;
1162
+ {
1163
+ safeCall(instance, 'componentDidRender');
1164
+ }
1141
1165
  if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1142
1166
  hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1143
1167
  {
@@ -1763,4 +1787,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1763
1787
 
1764
1788
  export { bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1765
1789
 
1766
- //# sourceMappingURL=index-e3df5eaf.js.map
1790
+ //# sourceMappingURL=index-51aa24d3.js.map