Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@doodle/components / controls / Input / MultiEmailSelect / ActivateSuggestions.js
Size: Mime:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireWildcard(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _Icon = _interopRequireDefault(require("../../../visuals/Icon/Icon"));

var _Button = require("../../Button");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var IconActivateSuggestions = function IconActivateSuggestions(props) {
  return _react["default"].createElement("svg", props, _react["default"].createElement("defs", null, _react["default"].createElement("path", {
    id: "path-1",
    d: "M.521 54.996h54.525V.471H.521z"
  }), _react["default"].createElement("path", {
    id: "path-3",
    d: "M0 41h40V0H0z"
  }), _react["default"].createElement("path", {
    id: "path-5",
    d: "M0 53.862h54.939V0H0z"
  }), _react["default"].createElement("path", {
    d: "M5.357.492a7.994 7.994 0 0 0-4.509 3.95 7.917 7.917 0 0 0-.691 2 7.968 7.968 0 0 0 .69 5.146 8.018 8.018 0 0 0 2.163 2.658 7.923 7.923 0 0 0 2.892 1.458c1.326.356 2.737.348 4.072.044a7.189 7.189 0 0 0 3.258-1.695c.963-.885 1.65-2.051 2.014-3.304a9.35 9.35 0 0 0 .203-4.226h-7.49V9.63h4.338a3.74 3.74 0 0 1-1.594 2.459 4.55 4.55 0 0 1-1.752.692 5.194 5.194 0 0 1-1.9-.006 4.675 4.675 0 0 1-1.771-.765 4.946 4.946 0 0 1-1.825-2.444 4.82 4.82 0 0 1 .002-3.1A4.94 4.94 0 0 1 4.612 4.59a4.738 4.738 0 0 1 2.377-1.32 4.713 4.713 0 0 1 2.337.095 4.313 4.313 0 0 1 1.716 1.008c.49-.487.976-.976 1.464-1.463.257-.263.526-.514.774-.783A7.704 7.704 0 0 0 10.719.539 8.049 8.049 0 0 0 5.357.492",
    id: "path-7"
  })), _react["default"].createElement("g", {
    fill: "none",
    fillRule: "evenodd"
  }, _react["default"].createElement("g", {
    transform: "rotate(-20 182.89 -37.44)"
  }, _react["default"].createElement("mask", {
    id: "mask-2",
    fill: "#fff"
  }, _react["default"].createElement("use", null)), _react["default"].createElement("path", {
    d: "M53.532 6.53A6.059 6.059 0 0 0 47.473.47H8.094a6.059 6.059 0 0 0-6.058 6.058v29.818c0 3.346 8.77 9.562 12.117 9.562H45.39c4.686 0 8.14-3.504 8.14-8.141V6.529z",
    fill: "#3798D4",
    fillRule: "nonzero",
    mask: "url(#mask-2)",
    transform: "matrix(1 0 0 -1 0 46.38)"
  }), _react["default"].createElement("path", {
    d: "M50.503 9.558A6.059 6.059 0 0 0 44.444 3.5h-33.32a6.059 6.059 0 0 0-6.059 6.058v36.35c0 6.239-.032 6.058 7.573 6.058h31.806a6.059 6.059 0 0 0 6.059-6.058V9.558z",
    fill: "#CCD6DD",
    fillRule: "nonzero",
    mask: "url(#mask-2)",
    transform: "matrix(1 0 0 -1 0 55.467)"
  }), _react["default"].createElement("path", {
    d: "M47.473 11.073A4.543 4.543 0 0 0 42.93 6.53H6.58a4.543 4.543 0 0 0-4.544 4.544v36.35a4.543 4.543 0 0 0 4.544 4.544h36.35a4.543 4.543 0 0 0 4.543-4.544v-36.35z",
    fill: "#E1E8ED",
    fillRule: "nonzero",
    mask: "url(#mask-2)",
    transform: "matrix(1 0 0 -1 0 58.496)"
  }), _react["default"].createElement("path", {
    d: "M47.473 15.617a6.059 6.059 0 0 0-6.058-6.059H9.61a6.059 6.059 0 0 0-6.059 6.059v33.32a6.059 6.059 0 0 0 6.059 6.06h31.806a6.059 6.059 0 0 0 6.058-6.06v-33.32z",
    fill: "#B5D3EC",
    fillRule: "nonzero",
    mask: "url(#mask-2)",
    transform: "matrix(1 0 0 -1 0 64.555)"
  }), _react["default"].createElement("path", {
    d: "M44.444 18.646a6.059 6.059 0 0 0-6.058-6.058H9.609a6.059 6.059 0 0 0-6.059 6.058v30.292a6.059 6.059 0 0 0 6.059 6.058h29.284c3.346 0 5.551-2.205 5.551-5.55v-30.8z",
    fill: "#B5D3EC",
    fillRule: "nonzero",
    mask: "url(#mask-2)",
    transform: "matrix(1 0 0 -1 0 67.584)"
  }), _react["default"].createElement("path", {
    d: "M9.609 45.909c-2.555 0-2.622 2.91-1.515 4.165 1.26 1.425 3.219 1.893 6.722 1.893h2.366v3.03h-4.118c-6.01 0-11.028-3.787-11.028-8.142V6.53A6.059 6.059 0 0 1 8.094.471h3.03v45.438H9.608z",
    fill: "#3798D4",
    fillRule: "nonzero",
    mask: "url(#mask-2)",
    transform: "matrix(1 0 0 -1 0 55.467)"
  })), _react["default"].createElement("g", {
    transform: "matrix(1 0 0 -1 66 65)"
  }, _react["default"].createElement("mask", {
    id: "mask-4",
    fill: "#fff"
  }, _react["default"].createElement("use", null)), _react["default"].createElement("g", {
    mask: "url(#mask-4)"
  }, _react["default"].createElement("path", {
    d: "M6.667 18.222c0-2.516-1.244-4.555-2.778-4.555-1.535 0-2.778 2.04-2.778 4.555 0 2.517 1.243 4.557 2.778 4.557 1.534 0 2.778-2.04 2.778-4.557M38.889 18.222c0-2.516-1.243-4.555-2.778-4.555-1.534 0-2.778 2.04-2.778 4.555 0 2.517 1.244 4.557 2.778 4.557 1.535 0 2.778-2.04 2.778-4.557",
    fill: "#AF7E57",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M4.444 17.582c0 9.71 6.965 17.582 15.556 17.582s15.556-7.872 15.556-17.582S28.59 1.138 20 1.138 4.444 7.873 4.444 17.582",
    fill: "#AF7E57",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M13.333 15.944c-.613 0-1.11.51-1.11 1.14v2.277c0 .629.497 1.139 1.11 1.139.614 0 1.111-.51 1.111-1.139v-2.278c0-.63-.497-1.139-1.11-1.139M26.667 15.944c-.615 0-1.111.51-1.111 1.14v2.277c0 .629.496 1.139 1.11 1.139.615 0 1.112-.51 1.112-1.139v-2.278c0-.63-.497-1.139-1.111-1.139",
    fill: "#60352A",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M20 6.833c-4.653 0-7.063 1.209-7.163 1.259a1.153 1.153 0 0 0-.498 1.528 1.1 1.1 0 0 0 1.487.512c.056-.028 2.138-1.02 6.174-1.02 4.072 0 6.156 1.01 6.177 1.022a1.102 1.102 0 0 0 1.484-.522 1.15 1.15 0 0 0-.498-1.52c-.1-.05-2.51-1.259-7.163-1.259M21.111 12.528H18.89c-.613 0-1.111.509-1.111 1.139s.498 1.139 1.11 1.139h2.223c.615 0 1.111-.51 1.111-1.14 0-.63-.496-1.138-1.11-1.138",
    fill: "#915A34",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M20 40.596c-10.256 0-16.667-7.36-16.667-13.491 0-6.133 1.283-8.586 2.565-6.133l2.563 4.906s4.213.142 6.777 2.595c0 0-1.19-4.556 7.328-.143 0 0-.185-4.413 5.767.143 0 0 4.488-1.368 5.768-7.5.357-1.702 2.566 0 2.566 6.132S31.539 40.596 20 40.596",
    fill: "#60352A",
    fillRule: "nonzero"
  }))), _react["default"].createElement("g", {
    transform: "scale(1 -1) rotate(-10 -453.44 -527.167)"
  }, _react["default"].createElement("mask", {
    id: "mask-6",
    fill: "#fff"
  }, _react["default"].createElement("use", null)), _react["default"].createElement("g", {
    mask: "url(#mask-6)"
  }, _react["default"].createElement("path", {
    d: "M45.721 19.32c6.166-5.854 6.231-16.36 4.672-16.36-1.559 0-6.28 2.77-9.26 5.89-2.981 3.12-2.671 10.142-2.671 10.142l2.42 6.464s-1.326-.282 4.84-6.136",
    fill: "#963B22",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M41.143 19.32c6.165-5.854 6.231-16.36 4.671-16.36-1.558 0-6.28 2.77-9.26 5.89-2.98 3.12-2.67 10.142-2.67 10.142l2.42 6.464s-1.326-.282 4.839-6.136M4.578 2.992c-1.526 0-1.526 10.473 4.578 16.458 6.105 5.986 4.579 5.986 4.579 5.986l3.052-5.986s0-7.48-3.052-10.473c-3.052-2.992-7.63-5.985-9.157-5.985",
    fill: "#963B22",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M9.156 2.992c-1.526 0-1.526 10.473 4.579 16.458 6.104 5.986 4.578 5.986 4.578 5.986l3.052-5.986s0-7.48-3.052-10.473c-3.052-2.992-7.63-5.985-9.157-5.985",
    fill: "#963B22",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M10.551 26.403c-.87 3.192-3.229 5.348-5.265 4.813-2.035-.534-2.975-3.557-2.104-6.75.871-3.192 3.23-5.347 5.265-4.811 2.036.534 2.977 3.556 2.104 6.748M51.757 24.466c.871 3.193-.07 6.215-2.106 6.75-2.034.533-4.392-1.62-5.264-4.814-.872-3.193.07-6.214 2.105-6.75 2.036-.533 4.394 1.621 5.265 4.814",
    fill: "#D5AB88",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M47.308 25.435c0 14.047-8.881 23.938-19.839 23.938-10.957 0-19.839-9.891-19.839-23.938 0-14.048 8.882-22.443 19.84-22.443 10.957 0 19.838 8.395 19.838 22.443",
    fill: "#D5AB88",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M27.47 12.49c-3.694 0-6.523 1.029-6.642 1.07a1.488 1.488 0 0 0-.891 1.928 1.533 1.533 0 0 0 1.962.875c.025-.01 2.457-.88 5.57-.88 3.115 0 5.548.87 5.57.88.788.29 1.67-.106 1.963-.878a1.487 1.487 0 0 0-.891-1.924c-.12-.042-2.947-1.07-6.642-1.07",
    fill: "#DF1F32",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M28.995 19.45h-3.052c-.842 0-1.526.669-1.526 1.496 0 .828.684 1.496 1.526 1.496h3.052c.844 0 1.527-.668 1.527-1.496 0-.827-.683-1.496-1.527-1.496",
    fill: "#C1694F",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M18.313 23.938c-.842 0-1.526.67-1.526 1.497v2.992c0 .826.684 1.496 1.526 1.496s1.526-.67 1.526-1.496v-2.992c0-.828-.684-1.497-1.526-1.497M36.626 23.938c-.844 0-1.526.67-1.526 1.497v2.992c0 .826.682 1.496 1.526 1.496s1.526-.67 1.526-1.496v-2.992c0-.828-.682-1.497-1.526-1.497",
    fill: "#662113",
    fillRule: "nonzero"
  }), _react["default"].createElement("path", {
    d: "M48.834 38.9c-3.052 10.474-10.682 13.466-15.26 13.466-3.052 0-6.105-2.992-6.105-2.992s-3.053 2.992-6.104 2.992c-4.578 0-12.209-2.992-15.26-13.465C3.588 30.269 7.63 22.443 7.63 22.443c0 4.49 3.053 13.465 10.683 13.465s9.156 5.985 9.156 5.985 1.2-5.985 8.83-5.985 11.01-8.975 11.01-13.465c0 0 4.04 7.826 1.525 16.458",
    fill: "#963B22",
    fillRule: "nonzero"
  }))), _react["default"].createElement("path", {
    d: "M44.714 70.144l9.532-5.69 6.336 17.407-11.02 1.605-4.848-13.322zm11.523-2.236l5.91-2.151c.218-.08.71.073.859.482l-3.921 5.337a.333.333 0 0 1-.132.049l-1.476-.312-1.24-3.405zm1.702 4.676l1.37.346c.195.056.34-.124.34-.124-.144.18 3.859-5.19 3.859-5.19l2.278 6.258c.248.681-.09 1.127-.585 1.308l-5.578 2.03-1.684-4.628zm-3.124 3.977c.227-.72.174-1.543-.162-2.463-.327-.897-.798-1.543-1.415-1.938-.617-.397-1.264-.47-1.94-.224-.716.26-1.187.755-1.413 1.486-.226.73-.17 1.558.167 2.485.32.877.793 1.51 1.419 1.902.626.39 1.278.462 1.957.215.697-.254 1.159-.741 1.387-1.463zm-3.132-3.478c.363-.133.71-.068 1.043.193.333.262.61.697.83 1.304.213.583.27 1.078.174 1.485-.096.406-.328.677-.697.81-.357.13-.707.068-1.05-.19-.343-.257-.62-.676-.832-1.257-.208-.572-.265-1.072-.171-1.5.094-.426.328-.709.703-.845z",
    fill: "#2B67A3"
  }), _react["default"].createElement("g", {
    transform: "rotate(-20 266.767 -131.314)"
  }, _react["default"].createElement("mask", {
    id: "mask-8",
    fill: "#fff"
  }, _react["default"].createElement("use", null)), _react["default"].createElement("path", {
    d: "M5.357.492a8.049 8.049 0 0 1 5.362.047c.95.349 1.82.9 2.56 1.587-.247.27-.516.52-.773.783-.488.487-.975.976-1.464 1.463a4.313 4.313 0 0 0-1.716-1.008 4.713 4.713 0 0 0-2.337-.095c-.9.192-1.735.662-2.377 1.32a4.94 4.94 0 0 0-1.155 1.876c-.87-.674-1.739-1.35-2.609-2.023a7.994 7.994 0 0 1 4.51-3.95",
    fill: "#D84138",
    mask: "url(#mask-8)"
  }), _react["default"].createElement("path", {
    d: "M.157 6.442c.14-.694.372-1.368.691-2l2.609 2.023a4.82 4.82 0 0 0-.002 3.1c-.869.674-1.737 1.35-2.608 2.023a7.968 7.968 0 0 1-.69-5.146",
    fill: "#F1B728",
    mask: "url(#mask-8)"
  }), _react["default"].createElement("path", {
    d: "M.847 11.588c.87-.673 1.74-1.349 2.608-2.023.332.979.978 1.85 1.825 2.444.529.373 1.136.638 1.772.765a5.194 5.194 0 0 0 1.899.006 4.55 4.55 0 0 0 1.752-.692c.842.656 1.687 1.309 2.53 1.965a7.189 7.189 0 0 1-3.26 1.695c-1.334.304-2.745.312-4.071-.044a7.923 7.923 0 0 1-2.892-1.458 8.018 8.018 0 0 1-2.163-2.658",
    fill: "#339F50",
    mask: "url(#mask-8)"
  }), _react["default"].createElement("path", {
    d: "M7.959 6.523h7.49a9.35 9.35 0 0 1-.203 4.226c-.364 1.253-1.05 2.419-2.014 3.304-.842-.656-1.687-1.309-2.529-1.965a3.74 3.74 0 0 0 1.594-2.459H7.96c-.002-1.035 0-2.07-.001-3.106",
    fill: "#5473AA",
    mask: "url(#mask-8)"
  }))));
};

IconActivateSuggestions.defaultProps = {
  viewBox: "0 0 160 120",
  xmlns: "http://www.w3.org/2000/svg"
};

var ActivateSuggestions = /*#__PURE__*/function (_Component) {
  _inherits(ActivateSuggestions, _Component);

  function ActivateSuggestions() {
    var _getPrototypeOf2;

    var _this;

    _classCallCheck(this, ActivateSuggestions);

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

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

    _defineProperty(_assertThisInitialized(_this), "onSilentButtonClick", function () {
      if (_this.props.activateSuggestions.onSilentButtonClick) _this.props.activateSuggestions.onSilentButtonClick();

      _this.props.closeMenu();
    });

    return _this;
  }

  _createClass(ActivateSuggestions, [{
    key: "render",
    value: function render() {
      var activateSuggestions = this.props.activateSuggestions;
      return _react["default"].createElement("div", {
        className: "ActivateSuggestions"
      }, _react["default"].createElement(_Icon["default"], {
        icon: IconActivateSuggestions
      }), _react["default"].createElement("h2", {
        className: "u-titleS ActivateSuggestions-headline"
      }, activateSuggestions.headline), _react["default"].createElement("p", {
        className: "ActivateSuggestions-text"
      }, activateSuggestions.text), _react["default"].createElement(_Button.Button, {
        variant: "white",
        type: "button"
      }, _react["default"].createElement(_Button.ButtonLabel, null, activateSuggestions.buttonText)), _react["default"].createElement(_Button.Button, {
        onClick: this.onSilentButtonClick,
        variant: "linkBlue",
        type: "button"
      }, _react["default"].createElement(_Button.ButtonLabel, null, activateSuggestions.silentButtonText)));
    }
  }]);

  return ActivateSuggestions;
}(_react.Component);

_defineProperty(ActivateSuggestions, "propTypes", {
  closeMenu: _propTypes["default"].func.isRequired,
  activateSuggestions: _propTypes["default"].shape({
    headline: _propTypes["default"].string,
    text: _propTypes["default"].string,
    buttonText: _propTypes["default"].string,
    buttonLink: _propTypes["default"].string,
    silentButtonText: _propTypes["default"].string,
    onSilentButtonClick: _propTypes["default"].func
  }).isRequired
});

var _default = ActivateSuggestions;
exports["default"] = _default;