dash-button-web 0.0.4 → 0.0.6

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 (30) hide show
  1. package/dist/cjs/dash-button.cjs.entry.js +105 -32
  2. package/dist/cjs/dash-button.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-d91975cd.js → index-991e75df.js} +13 -13
  4. package/dist/cjs/index-991e75df.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 +10 -0
  8. package/dist/collection/components/my-component/dash-button.js +140 -30
  9. package/dist/collection/components/my-component/dash-button.js.map +1 -1
  10. package/dist/components/dash-button.js +108 -32
  11. package/dist/components/dash-button.js.map +1 -1
  12. package/dist/esm/dash-button.entry.js +105 -32
  13. package/dist/esm/dash-button.entry.js.map +1 -1
  14. package/dist/esm/{index-1c7e21da.js → index-8310c457.js} +13 -13
  15. package/dist/{web-compnont/p-aa686508.js.map → esm/index-8310c457.js.map} +1 -1
  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 +6 -2
  19. package/dist/types/components.d.ts +4 -0
  20. package/dist/web-compnont/{p-ccad140c.entry.js → p-392f1e3f.entry.js} +3 -3
  21. package/dist/web-compnont/p-392f1e3f.entry.js.map +1 -0
  22. package/dist/web-compnont/p-4bd42d49.js +3 -0
  23. package/dist/web-compnont/p-4bd42d49.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/dist/cjs/index-d91975cd.js.map +0 -1
  28. package/dist/esm/index-1c7e21da.js.map +0 -1
  29. package/dist/web-compnont/p-aa686508.js +0 -3
  30. package/dist/web-compnont/p-ccad140c.entry.js.map +0 -1
@@ -980,6 +980,16 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
980
980
  // 2. If all functions added to the queue are asynchronous they'll all be
981
981
  // called in order after `dispatchHooks` exits.
982
982
  let maybePromise;
983
+ if (isInitialLoad) {
984
+ {
985
+ // If `componentWillLoad` returns a `Promise` then we want to wait on
986
+ // whatever's going on in that `Promise` before we launch into
987
+ // rendering the component, doing other lifecycle stuff, etc. So
988
+ // in that case we assign the returned promise to the variable we
989
+ // declared above to hold a possible 'queueing' Promise
990
+ maybePromise = safeCall(instance, 'componentWillLoad');
991
+ }
992
+ }
983
993
  endSchedule();
984
994
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
985
995
  };
@@ -1102,11 +1112,7 @@ const postUpdateComponent = (hostRef) => {
1102
1112
  const tagName = hostRef.$cmpMeta$.$tagName$;
1103
1113
  const elm = hostRef.$hostElement$;
1104
1114
  const endPostUpdate = createTime('postUpdate', tagName);
1105
- const instance = hostRef.$lazyInstance$ ;
1106
1115
  const ancestorComponent = hostRef.$ancestorComponent$;
1107
- {
1108
- safeCall(instance, 'componentDidRender');
1109
- }
1110
1116
  if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1111
1117
  hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1112
1118
  {
@@ -1379,7 +1385,6 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1379
1385
  hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1380
1386
  }
1381
1387
  endNewInstance();
1382
- fireConnectedCallback(hostRef.$lazyInstance$);
1383
1388
  }
1384
1389
  if (Cstr.style) {
1385
1390
  // this component has styles but we haven't registered them yet
@@ -1409,9 +1414,6 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1409
1414
  }
1410
1415
  };
1411
1416
  const fireConnectedCallback = (instance) => {
1412
- {
1413
- safeCall(instance, 'connectedCallback');
1414
- }
1415
1417
  };
1416
1418
  const connectedCallback = (elm) => {
1417
1419
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
@@ -1453,11 +1455,9 @@ const connectedCallback = (elm) => {
1453
1455
  }
1454
1456
  else {
1455
1457
  // fire off connectedCallback() on component instance
1456
- if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
1457
- fireConnectedCallback(hostRef.$lazyInstance$);
1458
- }
1458
+ if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
1459
1459
  else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
1460
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1460
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1461
1461
  }
1462
1462
  }
1463
1463
  endConnected();
@@ -1738,4 +1738,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1738
1738
 
1739
1739
  export { bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1740
1740
 
1741
- //# sourceMappingURL=index-1c7e21da.js.map
1741
+ //# sourceMappingURL=index-8310c457.js.map