How to use the @babel/runtime/helpers/esm/classCallCheck function in @babel/runtime

To help you get started, we’ve selected a few @babel/runtime 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 OpenAPITools / openapi-generator / samples / client / petstore / javascript-flowtyped / lib / configuration.js View on Github external
function Configuration() {
  var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

  _classCallCheck(this, Configuration);

  if (param.apiKey) {
    this.apiKey = param.apiKey;
  }

  if (param.username) {
    this.username = param.username;
  }

  if (param.password) {
    this.password = param.password;
  }

  if (param.accessToken) {
    this.accessToken = param.accessToken;
  }
github thuanmb / react-mapbox-gl-cluster / dist / common / hoc / doZoomingOnClick.js View on Github external
function ZoomableComponent() {
      var _getPrototypeOf2;

      var _this;

      _classCallCheck(this, ZoomableComponent);

      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }

      _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ZoomableComponent)).call.apply(_getPrototypeOf2, [this].concat(args)));

      _this.onClusterClick = function (properties, lngLat, event, meta) {
        var onClusterClick = _this.props.onClusterClick;

        var map = _this.getMapInstance();

        var currentZoom = map.getZoom();
        var maxZoom = map.getMaxZoom();
        var zoom = calculateNextZoomLevel(currentZoom, maxZoom);
        map.flyTo({
github kodyl / react-flexr / index.es.js View on Github external
function HydrateSSR(props) {
    var _this;

    _classCallCheck(this, HydrateSSR);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(HydrateSSR).call(this, props));
    ssrWillHydrate();
    return _this;
  }
github kodyl / react-flexr / index.es.js View on Github external
function Grid() {
    _classCallCheck(this, Grid);

    return _possibleConstructorReturn(this, _getPrototypeOf(Grid).apply(this, arguments));
  }
github thuanmb / react-mapbox-gl-cluster / dist / components / MarkerLayer / Component.js View on Github external
function MarkerLayer() {
    var _getPrototypeOf2;

    var _this;

    _classCallCheck(this, MarkerLayer);

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(MarkerLayer)).call.apply(_getPrototypeOf2, [this].concat(args)));

    _this._disableMapDragPan = function () {
      var map = _this.getMapInstance();

      if (map) {
        map.dragPan.disable();
      }
    };

    _this._enableMapDragPan = function () {
github thuanmb / react-mapbox-gl-cluster / dist / components / ReactMapboxGlCluster / Cluster.js View on Github external
function OverridedCluster() {
    _classCallCheck(this, OverridedCluster);

    return _possibleConstructorReturn(this, _getPrototypeOf(OverridedCluster).apply(this, arguments));
  }
github thuanmb / react-mapbox-gl-cluster / dist / components / ReactMapboxGlCluster / ClusterLayer.js View on Github external
function ClusterLayer() {
    var _getPrototypeOf2;

    var _this;

    _classCallCheck(this, ClusterLayer);

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ClusterLayer)).call.apply(_getPrototypeOf2, [this].concat(args)));

    _this._clusterMarkerFactory = function (coordinates, pointCount, getLeaves) {
      var clusterClassName = _this.props.clusterClassName;
      var className = classnames('cluster-layer--cluster', clusterClassName);
      var points = getLeaves();

      var pointsProps = _this._getPointsProps(points);

      var clusterEventHandlers = extractEventHandlers(_this.props, /^onCluster(.+)$/i);
      return React.createElement(MarkerLayer, Object.assign({
github kodyl / react-flexr / index.es.js View on Github external
function Cell() {
    var _getPrototypeOf2;

    var _this;

    _classCallCheck(this, Cell);

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Cell)).call.apply(_getPrototypeOf2, [this].concat(args)));

    _defineProperty(_assertThisInitialized(_this), "state", {
      breakpoints: getInitialBreakpoints()
    });

    _defineProperty(_assertThisInitialized(_this), "handleFlexSize", function (breakpoint) {
      var _this$props = _this.props,
          grow = _this$props.grow,
          size = _this$props.size;
      return handleFlexSize({
github thuanmb / react-mapbox-gl-cluster / dist / common / hoc / detectLocationHasOverlappedPoints.js View on Github external
function LayerWithOverlappedPointComponent() {
      var _getPrototypeOf2;

      var _this;

      _classCallCheck(this, LayerWithOverlappedPointComponent);

      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }

      _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(LayerWithOverlappedPointComponent)).call.apply(_getPrototypeOf2, [this].concat(args)));

      _this.onClick = function (properties, lngLat, event, meta) {
        var onClick = _this.props.onClick;

        _this._handleClick(properties, lngLat, event, meta, onClick);
      };

      _this.onClusterClick = function (properties, lngLat, event, meta) {
        var onClusterClick = _this.props.onClusterClick;
github OpenAPITools / openapi-generator / samples / client / petstore / javascript-flowtyped / lib / api.js View on Github external
function RequiredError(field, msg) {
    var _this;

    _classCallCheck(this, RequiredError);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(RequiredError).call(this, msg));
    _this.name = "RequiredError";
    return _this;
  }