How to use the @shopgate/pwa-core.UIEvents.addListener function in @shopgate/pwa-core

To help you get started, we’ve selected a few @shopgate/pwa-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shopgate / pwa / libraries / common / providers / loading / index.jsx View on Github external
constructor(props) {
    super(props);

    this.state = {
      lastUpdate: Date.now(),
      loading: new Map(),
    };

    UIEvents.addListener(this.constructor.SET, this.setLoading);
    UIEvents.addListener(this.constructor.RESET, this.resetLoading);
    UIEvents.addListener(this.constructor.UNSET, this.unsetLoading);
  }
github shopgate / pwa / libraries / common / providers / toast / index.jsx View on Github external
constructor(props) {
    super(props);

    this.state = {
      toasts: [],
    };

    UIEvents.addListener(this.constructor.ADD, this.addToast);
    UIEvents.addListener(this.constructor.FLUSH, this.flushToasts);
  }
github shopgate / pwa / libraries / ui-material / NavDrawer / index.jsx View on Github external
constructor(props) {
    super(props);

    this.contentRef = React.createRef();
    this.a11yCloseRef = React.createRef();
    this.state = {
      open: false,
    };

    UIEvents.addListener(OPEN, this.open);
    UIEvents.addListener(CLOSE, this.close);
  }
github shopgate / pwa / libraries / common / providers / toast / index.jsx View on Github external
constructor(props) {
    super(props);

    this.state = {
      toasts: [],
    };

    UIEvents.addListener(this.constructor.ADD, this.addToast);
    UIEvents.addListener(this.constructor.FLUSH, this.flushToasts);
  }
github shopgate / pwa / libraries / common / providers / loading / index.jsx View on Github external
constructor(props) {
    super(props);

    this.state = {
      lastUpdate: Date.now(),
      loading: new Map(),
    };

    UIEvents.addListener(this.constructor.SET, this.setLoading);
    UIEvents.addListener(this.constructor.RESET, this.resetLoading);
    UIEvents.addListener(this.constructor.UNSET, this.unsetLoading);
  }
github shopgate / pwa / themes / theme-ios11 / components / TabBar / index.jsx View on Github external
componentDidMount() {
    UIEvents.addListener(SHOW_TAB_BAR, this.show);
    UIEvents.addListener(HIDE_TAB_BAR, this.hide);
    updateHeightCSSProperty(this.props.isVisible);
  }
github shopgate / pwa / libraries / ui-material / NavDrawer / index.jsx View on Github external
constructor(props) {
    super(props);

    this.contentRef = React.createRef();
    this.a11yCloseRef = React.createRef();
    this.state = {
      open: false,
    };

    UIEvents.addListener(OPEN, this.open);
    UIEvents.addListener(CLOSE, this.close);
  }
github shopgate / pwa / libraries / engage / components / VideoPlayer / index.jsx View on Github external
componentDidMount() {
    UIEvents.addListener(UI_VISIBILITY_CHANGE, this.handleVisibilityChange);
  }
github shopgate / pwa / themes / theme-ios11 / components / TabBar / index.jsx View on Github external
componentDidMount() {
    UIEvents.addListener(SHOW_TAB_BAR, this.show);
    UIEvents.addListener(HIDE_TAB_BAR, this.hide);
    updateHeightCSSProperty(this.props.isVisible);
  }
github shopgate / pwa / libraries / common / providers / loading / index.jsx View on Github external
constructor(props) {
    super(props);

    this.state = {
      lastUpdate: Date.now(),
      loading: new Map(),
    };

    UIEvents.addListener(this.constructor.SET, this.setLoading);
    UIEvents.addListener(this.constructor.RESET, this.resetLoading);
    UIEvents.addListener(this.constructor.UNSET, this.unsetLoading);
  }