brew-js-react 0.7.2 → 0.7.3

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/dialog.d.ts CHANGED
@@ -230,4 +230,4 @@ export function openDialog<P extends DialogOptions<any, any>>(props: P): Promise
230
230
  /**
231
231
  * Renders a dialog declaratively.
232
232
  */
233
- export function Dialog<T, V = T>(props: DialogProps<T, V>): JSX.Element;
233
+ export function Dialog<T, V = T>(props: DialogProps<T, V>): React.ReactElement;
@@ -1,4 +1,4 @@
1
- /*! brew-js-react v0.7.2 | (c) misonou | https://misonou.github.io */
1
+ /*! brew-js-react v0.7.3 | (c) misonou | https://misonou.github.io */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
4
  module.exports = factory(require("zeta-dom"), require("brew-js"), require("react"), require("react-dom"), require("zeta-dom-react"), require("waterpipe"), require("jquery"));
@@ -626,8 +626,7 @@ onAppInit(function () {
626
626
  (function updateViewRecursive(next) {
627
627
  each(next.children, function (i, v) {
628
628
  e.waitFor(new Promise(function (resolve) {
629
- v.onRender = resolve;
630
- v.forceUpdate();
629
+ v.forceUpdate(resolve);
631
630
  }).then(function () {
632
631
  updateViewRecursive(v);
633
632
  }));
@@ -792,7 +791,6 @@ definePrototype(ViewContainer, Component, {
792
791
  if (self.context.active) {
793
792
  self.updateView();
794
793
  }
795
- self.onRender();
796
794
  return self.views;
797
795
  },
798
796
  updateView: function updateView() {
@@ -843,10 +841,12 @@ definePrototype(ViewContainer, Component, {
843
841
  }, true);
844
842
  return animateOut(element, 'show').then(function () {
845
843
  self.views[0] = null;
846
- self.forceUpdate();
844
+ return new Promise(function (resolve) {
845
+ self.forceUpdate(resolve);
846
+ });
847
847
  });
848
848
  });
849
- always(promise, delay).then(function () {
849
+ always(promise || delay(), function () {
850
850
  app_app.emit('pageenter', element, {
851
851
  pathname: context.page.path,
852
852
  view: V
@@ -884,7 +884,7 @@ definePrototype(ViewContainer, Component, {
884
884
  }) || props.defaultView;
885
885
  }
886
886
  });
887
- fill(ViewContainer.prototype, 'abort onRender setActive setPage unmountView', noop);
887
+ fill(ViewContainer.prototype, 'abort setActive setPage unmountView', noop);
888
888
  function normalizePart(value, part) {
889
889
  return isUndefinedOrNull(value) || value === '' || value === part ? '' : value[0] === part ? value : part + value;
890
890
  }