(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("react"));
	else if(typeof define === 'function' && define.amd)
		define(["react"], factory);
	else if(typeof exports === 'object')
		exports["dazzler_core"] = factory(require("react"));
	else
		root["dazzler_core"] = factory(root["React"]);
})(window, function(__WEBPACK_EXTERNAL_MODULE_react__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// install a JSONP callback for chunk loading
/******/ 	function webpackJsonpCallback(data) {
/******/ 		var chunkIds = data[0];
/******/ 		var moreModules = data[1];
/******/ 		var executeModules = data[2];
/******/
/******/ 		// add "moreModules" to the modules object,
/******/ 		// then flag all "chunkIds" as loaded and fire callback
/******/ 		var moduleId, chunkId, i = 0, resolves = [];
/******/ 		for(;i < chunkIds.length; i++) {
/******/ 			chunkId = chunkIds[i];
/******/ 			if(installedChunks[chunkId]) {
/******/ 				resolves.push(installedChunks[chunkId][0]);
/******/ 			}
/******/ 			installedChunks[chunkId] = 0;
/******/ 		}
/******/ 		for(moduleId in moreModules) {
/******/ 			if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ 				modules[moduleId] = moreModules[moduleId];
/******/ 			}
/******/ 		}
/******/ 		if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ 		while(resolves.length) {
/******/ 			resolves.shift()();
/******/ 		}
/******/
/******/ 		// add entry modules from loaded chunk to deferred list
/******/ 		deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ 		// run deferred modules when all chunks ready
/******/ 		return checkDeferredModules();
/******/ 	};
/******/ 	function checkDeferredModules() {
/******/ 		var result;
/******/ 		for(var i = 0; i < deferredModules.length; i++) {
/******/ 			var deferredModule = deferredModules[i];
/******/ 			var fulfilled = true;
/******/ 			for(var j = 1; j < deferredModule.length; j++) {
/******/ 				var depId = deferredModule[j];
/******/ 				if(installedChunks[depId] !== 0) fulfilled = false;
/******/ 			}
/******/ 			if(fulfilled) {
/******/ 				deferredModules.splice(i--, 1);
/******/ 				result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ 			}
/******/ 		}
/******/
/******/ 		return result;
/******/ 	}
/******/
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// object to store loaded and loading chunks
/******/ 	// undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ 	// Promise = chunk loading, 0 = chunk loaded
/******/ 	var installedChunks = {
/******/ 		"core": 0
/******/ 	};
/******/
/******/ 	var deferredModules = [];
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	var jsonpArray = window["webpackJsonpdazzler_name_"] = window["webpackJsonpdazzler_name_"] || [];
/******/ 	var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ 	jsonpArray.push = webpackJsonpCallback;
/******/ 	jsonpArray = jsonpArray.slice();
/******/ 	for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ 	var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ 	// add entry module to deferred list
/******/ 	deferredModules.push([3,"commons"]);
/******/ 	// run deferred modules when ready
/******/ 	return checkDeferredModules();
/******/ })
/************************************************************************/
/******/ ({

/***/ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/core/scss/index.scss":
/*!***********************************************************************************************************************************************************************!*\
  !*** ./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/core/scss/index.scss ***!
  \***********************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "./src/core/js/components/Button.jsx":
/*!*******************************************!*\
  !*** ./src/core/js/components/Button.jsx ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Button; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../commons/js */ "./src/commons/js/index.js");
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }





/**
 * A button to click on!
 *
 * :CSS: ``dazzler-core-button``
 *
 * @example
 *
 *     from dazzler.system import Page, Trigger
 *     from dazzler.components import core
 *
 *     button = core.Button('Click me', identity='btn')
 *
 *     page = Page(
 *         __name__,
 *         core.Container([button, core.Container(identity="output")])
 *     )
 *
 *     @page.binding(Trigger('btn', 'clicks'))
 *     async def on_click(ctx):
 *         await ctx.set_aspect('output', f'Clicked {ctx.trigger.value}')
 */

var Button =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Button, _React$Component);

  function Button() {
    _classCallCheck(this, Button);

    return _possibleConstructorReturn(this, _getPrototypeOf(Button).apply(this, arguments));
  }

  _createClass(Button, [{
    key: "shouldComponentUpdate",
    value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
      return !(this.props.clicks < nextProps.clicks);
    }
  }, {
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          label = _this$props.label,
          identity = _this$props.identity,
          id = _this$props.id,
          class_name = _this$props.class_name,
          preset = _this$props.preset,
          style = _this$props.style,
          disabled = _this$props.disabled,
          size = _this$props.size;
      var css = Object(_commons_js__WEBPACK_IMPORTED_MODULE_3__["collectTruePropKeys"])(this.props, ['rounded', 'circle', 'bordered']);

      if (preset) {
        css.push(preset);
      } else {
        css.push('default');
      }

      if (size) {
        css.push(size);
      }

      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", {
        className: Object(ramda__WEBPACK_IMPORTED_MODULE_2__["join"])(' ', Object(ramda__WEBPACK_IMPORTED_MODULE_2__["concat"])(css, [class_name])),
        id: id || identity,
        style: style,
        disabled: disabled,
        onClick: function onClick() {
          return _this.props.updateAspects({
            clicks: _this.props.clicks + 1
          });
        }
      }, label);
    }
  }]);

  return Button;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Button.defaultProps = {
  clicks: 0,
  bordered: true
};
Button.propTypes = {
  /**
   * Text or component to display.
   */
  label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node.isRequired,

  /**
   * The number of times the button was clicked.
   */
  clicks: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * Class name to give the button.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style object to give to the Button.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * DOM id, otherwise the identity is used.
   */
  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Preset style colors to apply.
   */
  preset: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['primary', 'secondary', 'danger', 'warning', 'success']),

  /**
   * Disable the button.
   */
  disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Round the edges.
   */
  rounded: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Circle button
   */
  circle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Add a border
   */
  bordered: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * The size of the button.
   */
  size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['tiny', 'small', 'medium', 'large', 'larger', 'x-large', 'xx-large']),

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/CheckList.jsx":
/*!**********************************************!*\
  !*** ./src/core/js/components/CheckList.jsx ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return CheckList; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }




/**
 * A list of labels with options, the values aspect get all selected options.
 */

var CheckList =
/*#__PURE__*/
function (_React$Component) {
  _inherits(CheckList, _React$Component);

  function CheckList() {
    _classCallCheck(this, CheckList);

    return _possibleConstructorReturn(this, _getPrototypeOf(CheckList).apply(this, arguments));
  }

  _createClass(CheckList, [{
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          options = _this$props.options,
          identity = _this$props.identity,
          class_name = _this$props.class_name,
          id = _this$props.id,
          labels_class_name = _this$props.labels_class_name,
          inputs_class_name = _this$props.inputs_class_name,
          style = _this$props.style,
          labels_style = _this$props.labels_style,
          options_style = _this$props.options_style;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: class_name,
        id: id || identity,
        style: style
      }, options.map(function (_ref) {
        var label = _ref.label,
            value = _ref.value,
            title = _ref.title,
            label_class_name = _ref.label_class_name,
            input_class_name = _ref.input_class_name;
        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", {
          title: title,
          key: "".concat(identity, "-opt-").concat(value),
          className: label_class_name || labels_class_name,
          style: labels_style
        }, label, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", {
          type: "checkbox",
          className: input_class_name || inputs_class_name,
          style: options_style,
          onChange: function onChange(e) {
            return _this.props.updateAspects({
              values: e.target.checked ? Object(ramda__WEBPACK_IMPORTED_MODULE_2__["concat"])(_this.props.values, [value]) : _this.props.values.filter(function (v) {
                return v !== value;
              })
            });
          }
        }));
      }));
    }
  }]);

  return CheckList;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


CheckList.defaultProps = {
  values: []
};
CheckList.propTypes = {
  /**
   * Items in the checklist with labels, values and elements attributes.
   */
  options: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
    label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
    value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]),
    title: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
    label_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
    input_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string
  })).isRequired,

  /**
   * Checked values
   */
  values: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number])),

  /**
   * Style object of the container.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Class name of the container.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Global class name to give to labels.
   */
  labels_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Global labels style objects.
   */
  labels_style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Global options class name.
   */
  options_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Global style object of options.
   */
  options_style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Html id of the component, otherwise the identity is used.
   */
  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Container.jsx":
/*!**********************************************!*\
  !*** ./src/core/js/components/Container.jsx ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Container; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * Virtual div
 *
 * :CSS:
 *
 *     ``dazzler-core-container``.
 *     - ``scroll``
 *     - ``flex``
 *     - ``row``
 *     - ``column``
 *     - ``btn``
 */

var Container =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Container, _React$Component);

  function Container() {
    _classCallCheck(this, Container);

    return _possibleConstructorReturn(this, _getPrototypeOf(Container).apply(this, arguments));
  }

  _createClass(Container, [{
    key: "shouldComponentUpdate",
    value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
      // Ignore virtual n_clicks don't need a re-render of
      // the whole children.
      return !(this.props.clicks < nextProps.clicks);
    }
  }, {
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          id = _this$props.id,
          class_name = _this$props.class_name,
          style = _this$props.style,
          children = _this$props.children,
          title = _this$props.title,
          identity = _this$props.identity,
          draggable = _this$props.draggable;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        id: id || identity,
        className: class_name,
        style: style,
        title: title,
        draggable: draggable,
        onClick: function onClick(e) {
          e.stopPropagation();

          _this.props.updateAspects({
            clicks: _this.props.clicks + 1
          });
        }
      }, children);
    }
  }]);

  return Container;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Container.defaultProps = {
  clicks: 0
};
Container.propTypes = {
  children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,
  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,
  title: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  draggable: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Number of times the container was clicked.
   */
  clicks: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/DataList.jsx":
/*!*********************************************!*\
  !*** ./src/core/js/components/DataList.jsx ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DataList; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * A html datalist (select with autocomplete).
 */

var DataList =
/*#__PURE__*/
function (_React$Component) {
  _inherits(DataList, _React$Component);

  function DataList() {
    _classCallCheck(this, DataList);

    return _possibleConstructorReturn(this, _getPrototypeOf(DataList).apply(this, arguments));
  }

  _createClass(DataList, [{
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          class_name = _this$props.class_name,
          id = _this$props.id,
          identity = _this$props.identity,
          value = _this$props.value,
          options = _this$props.options,
          title = _this$props.title;
      var list_id = "datalist-".concat(identity);
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: class_name,
        id: id || identity,
        title: title
      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", {
        list: list_id,
        onChange: function onChange(e) {
          var value = e.target.value;
          var data_value = options.reduce(function (data, option) {
            return option.label === value ? option.value : data;
          }, null);

          _this.props.updateAspects({
            value: value,
            data_value: data_value
          });
        },
        value: value
      }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("datalist", {
        id: list_id
      }, options.map(function (option) {
        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("option", {
          value: option.label
        });
      })));
    }
  }]);

  return DataList;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


DataList.defaultProps = {};
DataList.propTypes = {
  /**
   * Options of the datalist.
   */
  options: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
    value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.any,
    label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string
  })).isRequired,

  /**
   * Unique id for the component.
   */
  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * CSS class.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Value of the text input.
   */
  value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * The value of the selected option if found.
   */
  data_value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.any,

  /**
   * Tooltip.
   */
  title: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Form.jsx":
/*!*****************************************!*\
  !*** ./src/core/js/components/Form.jsx ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Form; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * A form element with auto fields.
 *
 * :CSS:
 *
 *     ``dazzler-core-form``
 *     - ``form-header``
 *     - ``form-body``
 *     - ``form-field``
 *     - ``field-error``
 *     - ``form-label``
 *     - ``form-input``
 *     - ``form-footer``
 *     - ``form-submit``
 */

var Form =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Form, _React$Component);

  function Form() {
    _classCallCheck(this, Form);

    return _possibleConstructorReturn(this, _getPrototypeOf(Form).apply(this, arguments));
  }

  _createClass(Form, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          identity = _this$props.identity,
          class_name = _this$props.class_name,
          style = _this$props.style,
          action = _this$props.action,
          method = _this$props.method,
          target = _this$props.target,
          auto_complete = _this$props.auto_complete,
          name = _this$props.name,
          header = _this$props.header,
          fields = _this$props.fields,
          body = _this$props.body,
          footer = _this$props.footer,
          errors = _this$props.errors,
          include_submit = _this$props.include_submit,
          submit_label = _this$props.submit_label;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("form", {
        id: identity,
        className: class_name,
        style: style,
        action: action,
        method: method,
        target: target,
        autoComplete: auto_complete,
        name: name
      }, header && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "form-header"
      }, header), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "form-body"
      }, fields && fields.map(function (_ref) {
        var label = _ref.label,
            type = _ref.type,
            name = _ref.name,
            component = _ref.component;
        var error = errors[name];
        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
          className: 'form-field' + (error ? ' field-error' : ''),
          key: "form-".concat(identity, "-").concat(name)
        }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", {
          className: "form-label"
        }, label, component || react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", {
          name: name,
          type: type,
          className: 'form-input'
        })), error && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
          className: "form-error"
        }, error));
      }), body), footer && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "form-footer"
      }, footer), include_submit && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", {
        type: "submit",
        className: "form-submit"
      }, submit_label));
    }
  }]);

  return Form;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Form.defaultProps = {
  include_submit: true,
  submit_label: 'Submit',
  errors: {}
};
Form.propTypes = {
  /**
   * Fields of the form, either provide a component or a type for the input.
   */
  fields: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
    label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,
    name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,
    type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
    component: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node
  })),

  /**
   * Render on top of the form (CSS: form-header)
   */
  header: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Render in the middle of the form, after the fields. (CSS: form-body)
   */
  body: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Render at the bottom of the form (CSS: form-footer)
   */
  footer: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Url to submit the form.
   */
  action: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Http method to submit the form.
   */
  method: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['get', 'post']),

  /**
   * How will the response display.
   */
  target: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['_blank', '_self', '_parent', '_top']),

  /**
   * Name of the form.
   */
  name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Specifies auto complete for the form.
   */
  auto_complete: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['on', 'off']),

  /**
   * How the data is encode before submit.
   */
  enctype: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']),

  /**
   * Character encoding for submission.
   */
  accept_charset: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Specify the form should be validated on submission.
   */
  no_validate: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * CSS class of the form element.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style object of the form element.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Errors to show with the fields. Keys are name.
   */
  errors: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Include a submit button on the form.
   */
  include_submit: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Label of the submit button.
   */
  submit_label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Grid.jsx":
/*!*****************************************!*\
  !*** ./src/core/js/components/Grid.jsx ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Grid; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../commons/js */ "./src/commons/js/index.js");
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }




/**
 * Render a list in a grid with a number of ``columns``.
 *
 * :CSS:
 *
 *     ``dazzler-core-grid``
 *     - ``grid-row``
 *     - ``grid-cell``
 *
 * @example
 *
 *     from dazzler.components import core
 *
 *     grid = core.Grid([1, 2, 3, 4], 2)
 */

var Grid =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Grid, _React$Component);

  function Grid() {
    _classCallCheck(this, Grid);

    return _possibleConstructorReturn(this, _getPrototypeOf(Grid).apply(this, arguments));
  }

  _createClass(Grid, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          identity = _this$props.identity,
          class_name = _this$props.class_name,
          children = _this$props.children,
          columns = _this$props.columns;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        id: identity,
        className: class_name
      }, Object(_commons_js__WEBPACK_IMPORTED_MODULE_2__["chunk"])(children, columns).map(function (row, y) {
        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
          key: "".concat(identity, "-row-").concat(y),
          className: 'grid-row'
        }, row.map(function (cell, x) {
          return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
            key: "".concat(identity, "-cell-").concat(y, "-").concat(x),
            className: 'grid-cell'
          }, cell);
        }));
      }));
    }
  }]);

  return Grid;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Grid.defaultProps = {};
Grid.propTypes = {
  /**
   * Children to render in a grid.
   */
  children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node).isRequired,

  /**
   * Number of columns
   */
  columns: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Html.jsx":
/*!*****************************************!*\
  !*** ./src/core/js/components/Html.jsx ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Html; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../commons/js */ "./src/commons/js/index.js");
function _typeof(obj) { 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 _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }

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; }

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 prepareType(obj) {
  switch (Object(ramda__WEBPACK_IMPORTED_MODULE_2__["type"])(obj)) {
    case 'String':
    case 'Number':
    case 'Boolean':
    case 'Null':
      return obj;

    case 'Array':
      return obj.map(prepareType).filter(function (e) {
        return Object(ramda__WEBPACK_IMPORTED_MODULE_2__["type"])(e) !== 'Undefined';
      });

    case 'Object':
      return Object(ramda__WEBPACK_IMPORTED_MODULE_2__["map"])(prepareObject, obj);

    default:
      return;
  }
}

function prepareObject(obj) {
  var payload = {};

  for (var k in obj) {
    // noinspection JSUnfilteredForInLoop
    if (!k.startsWith('_')) {
      // noinspection JSUnfilteredForInLoop
      payload[Object(_commons_js__WEBPACK_IMPORTED_MODULE_3__["camelToSnakeCase"])(k)] = prepareType(obj[k]);
    }
  }

  return payload;
}
/**
 * Html tag wrapper, give any props as ``attributes``.
 * Listen to events with the readonly event aspect containing the
 * latest event fired.
 */


var Html =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Html, _React$Component);

  function Html(props) {
    var _this;

    _classCallCheck(this, Html);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(Html).call(this, props));
    _this.onEvent = _this.onEvent.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(Html, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      if (this.props.events) {
        this.props.events.forEach(function (e) {
          _this2.element.addEventListener(e, _this2.onEvent);
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      var _this3 = this;

      if (this.props.events) {
        this.props.events.forEach(function (e) {
          _this3.element.removeEventListener(e, _this3.onEvent);
        });
      }
    }
  }, {
    key: "onEvent",
    value: function onEvent(e) {
      this.props.updateAspects({
        event: _objectSpread({
          name: e.name
        }, prepareObject(e))
      });
    }
  }, {
    key: "shouldComponentUpdate",
    value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
      // Ignore virtual event don't need a re-render of
      // the whole children.
      return !(this.props.event !== nextProps.event);
    }
  }, {
    key: "render",
    value: function render() {
      var _this4 = this;

      var _this$props = this.props,
          tag = _this$props.tag,
          id = _this$props.id,
          class_name = _this$props.class_name,
          attributes = _this$props.attributes,
          identity = _this$props.identity,
          children = _this$props.children;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(tag, _objectSpread({
        id: id || identity,
        className: class_name,
        children: children
      }, attributes, {
        ref: function ref(r) {
          return _this4.element = r;
        }
      }));
    }
  }]);

  return Html;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Html.defaultProps = {};
Html.propTypes = {
  /**
   * Tag name of the component.
   */
  tag: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,

  /**
   * Children of the html tag.
   */
  children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Id of the element in DOM.
   */
  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Class of the element.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Any other html attributes relevant to the html tag
   */
  attributes: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Events to subscribe.
   */
  events: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array,

  /**
   * Last event fired.
   */
  event: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Image.jsx":
/*!******************************************!*\
  !*** ./src/core/js/components/Image.jsx ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Image; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../commons/js */ "./src/commons/js/index.js");
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }





/**
 * An image.
 *
 * :CSS: ``dazzler-core-image``
 */

var Image =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Image, _React$Component);

  function Image() {
    _classCallCheck(this, Image);

    return _possibleConstructorReturn(this, _getPrototypeOf(Image).apply(this, arguments));
  }

  _createClass(Image, [{
    key: "shouldComponentUpdate",
    value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
      return !(this.props.clicks < nextProps.clicks);
    }
  }, {
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          class_name = _this$props.class_name,
          style = _this$props.style,
          identity = _this$props.identity,
          alt = _this$props.alt,
          src = _this$props.src,
          caption = _this$props.caption,
          height = _this$props.height,
          width = _this$props.width,
          cross_origin = _this$props.cross_origin,
          decoding = _this$props.decoding,
          caption_class_name = _this$props.caption_class_name,
          caption_style = _this$props.caption_style,
          link = _this$props.link,
          link_class_name = _this$props.link_class_name,
          link_style = _this$props.link_style,
          figure_class_name = _this$props.figure_class_name,
          figure_style = _this$props.figure_style;
      var css = Object(_commons_js__WEBPACK_IMPORTED_MODULE_3__["collectTruePropKeys"])(this.props, ['rounded', 'bordered', 'circle', 'flexible', 'centered', 'padded']);
      var content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img", {
        alt: alt,
        src: src,
        height: height,
        width: width,
        crossOrigin: cross_origin,
        decoding: decoding,
        className: Object(ramda__WEBPACK_IMPORTED_MODULE_2__["join"])(' ', Object(ramda__WEBPACK_IMPORTED_MODULE_2__["concat"])(css, [class_name])),
        style: style,
        id: identity,
        onClick: function onClick() {
          return _this.props.updateAspects({
            clicks: _this.props.clicks + 1
          });
        }
      });

      if (link) {
        var linkCss = ['dazzler-core-image-link'];

        if (link_class_name) {
          linkCss.push(link_class_name);
        }

        content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
          href: link,
          style: link_style,
          className: Object(ramda__WEBPACK_IMPORTED_MODULE_2__["join"])(' ', Object(ramda__WEBPACK_IMPORTED_MODULE_2__["concat"])(css, linkCss))
        }, content);
      }

      if (caption) {
        var figCss = ['dazzler-core-figure'];
        var capCss = ['dazzler-core-caption'];

        if (figure_class_name) {
          figCss.push(figure_class_name);
        }

        if (caption_class_name) {
          capCss.push(caption_class_name);
        }

        content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("figure", {
          style: figure_style,
          className: Object(ramda__WEBPACK_IMPORTED_MODULE_2__["join"])(' ', Object(ramda__WEBPACK_IMPORTED_MODULE_2__["concat"])(css, figCss))
        }, content, caption && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("figcaption", {
          className: Object(ramda__WEBPACK_IMPORTED_MODULE_2__["join"])(' ', Object(ramda__WEBPACK_IMPORTED_MODULE_2__["concat"])(css, capCss)),
          style: caption_style
        }, caption));
      }

      return content;
    }
  }]);

  return Image;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Image.defaultProps = {
  clicks: 0
};
Image.propTypes = {
  /**
   * The source url of the image.
   */
  src: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,

  /**
   * Alt img attribute to show when the browser cannot display the image.
   */
  alt: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,

  /**
   * Height in pixel
   */
  height: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * Width in pixel
   */
  width: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * Link to another page when the image is clicked.
   */
  link: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Text to include beneath the image.
   */
  caption: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Fetch the image with CORS.
   */
  cross_origin: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['anonymous', 'use-credentials']),

  /**
   * Decoding hint for the browser
   */
  decoding: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['sync', 'async', 'auto']),

  /**
   * Preload the image before mount.
   */
  preload: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Times the image was clicked on.
   */
  clicks: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * CSS class to give to root element, (Scoped: dazzler-core-image)
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style object of the root element.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Add bordered style class
   */
  bordered: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Add rounded style class
   */
  rounded: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Add centered style class for the image to
   * appear in the horizontal middle
   */
  centered: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Take up the whole size of the parent container.
   */
  flexible: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Image is a circle
   */
  circle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Add a little padding around the image.
   */
  padded: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Style to give to the caption of the image.
   */
  caption_style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * CSS class to give to the caption of the image.
   */
  caption_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * CSS class to give to figure if caption is provided.
   */
  figure_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style object to give to figure if caption is provided.
   */
  figure_style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * CSS class to give to the link element.
   */
  link_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style object to give to the link.
   */
  link_style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Input.jsx":
/*!******************************************!*\
  !*** ./src/core/js/components/Input.jsx ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Input; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
function _typeof(obj) { 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 _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }




/**
 * Html input wrapper.
 */

var Input =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Input, _React$Component);

  function Input() {
    _classCallCheck(this, Input);

    return _possibleConstructorReturn(this, _getPrototypeOf(Input).apply(this, arguments));
  }

  _createClass(Input, [{
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          id = _this$props.id,
          class_name = _this$props.class_name,
          identity = _this$props.identity,
          type = _this$props.type,
          auto_complete = _this$props.auto_complete,
          auto_focus = _this$props.auto_focus,
          auto_save = _this$props.auto_save,
          auto_correct = _this$props.auto_correct,
          min_length = _this$props.min_length,
          max_length = _this$props.max_length;
      var omitted = ['class_name', 'id', 'identity', 'auto_complete', 'auto_focus', 'auto_save', 'auto_correct', 'min_length', 'updateAspects', 'n_blur', 'n_submit', '_name', '_package'];

      if (type === 'reset') {
        omitted.push('value');
      }

      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", _extends({
        id: id || identity,
        className: class_name,
        autoComplete: auto_complete,
        autoFocus: auto_focus,
        autoSave: auto_save,
        autoCorrect: auto_correct,
        minLength: min_length,
        maxLength: max_length
      }, Object(ramda__WEBPACK_IMPORTED_MODULE_2__["omit"])(omitted, this.props), {
        onChange: function onChange(e) {
          var payload = {};

          switch (_this.props.type) {
            case 'number':
              payload.value = Number(e.target.value);
              break;

            case 'checkbox':
              payload.checked = e.target.checked;
              break;

            default:
              payload.value = e.target.value;
          }

          _this.props.updateAspects(payload);
        },
        onBlur: function onBlur() {
          return _this.props.updateAspects({
            n_blur: _this.props.n_blur + 1
          });
        },
        onKeyUp: function onKeyUp(e) {
          if (e.key === 'Enter') {
            _this.props.updateAspects({
              n_submit: _this.props.n_submit + 1
            });
          }
        }
      }));
    }
  }]);

  return Input;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Input.defaultProps = {
  value: '',
  n_blur: 0,
  n_submit: 0,
  checked: false
};
Input.propTypes = {
  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,
  name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  required: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]),
  type: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['hidden', 'text', 'number', 'search', 'tel', 'password', 'range', 'email', 'url', 'submit', 'checkbox', 'reset']),
  placeholder: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  pattern: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  auto_complete: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  auto_focus: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  auto_save: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  auto_correct: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  n_blur: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,
  n_submit: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,
  min: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,
  min_length: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,
  max_length: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,
  max: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,
  step: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]),
  multiple: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  checked: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Interval.jsx":
/*!*********************************************!*\
  !*** ./src/core/js/components/Interval.jsx ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Interval; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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); }



/**
 * Update ``times`` aspect every interval to trigger a binding.
 */

var Interval =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Interval, _React$Component);

  function Interval(props) {
    var _this;

    _classCallCheck(this, Interval);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(Interval).call(this, props));
    _this.state = {
      intervalId: null
    };
    _this.loop = _this.loop.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(Interval, [{
    key: "componentWillMount",
    value: function componentWillMount() {
      this.startLoop();
    }
  }, {
    key: "startLoop",
    value: function startLoop() {
      var timeout = this.props.timeout;
      var intervalId = window.setInterval(this.loop, timeout);
      this.setState({
        intervalId: intervalId
      });
    }
  }, {
    key: "loop",
    value: function loop() {
      if (this.props.active) {
        this.props.updateAspects({
          times: this.props.times + 1
        });
      } else {
        window.clearInterval(this.state.intervalId);
        this.setState({
          intervalId: null
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      if (this.state.intervalId) {
        window.clearInterval(this.state.intervalId);
        this.setState({
          intervalId: null
        });
      }
    }
  }, {
    key: "componentWillReceiveProps",
    value: function componentWillReceiveProps(nextProps) {
      if (nextProps.active && !this.props.active) {
        this.startLoop();
      }
    }
  }, {
    key: "render",
    value: function render() {
      return null;
    }
  }]);

  return Interval;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Interval.defaultProps = {
  timeout: 1000,
  times: 0,
  active: true
};
Interval.propTypes = {
  /**
   * The delay between each time.
   */
  timeout: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * Number of times the interval was fired.
   */
  times: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * Enable/disable the interval loop.
   */
  active: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Link.jsx":
/*!*****************************************!*\
  !*** ./src/core/js/components/Link.jsx ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Link; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * Link to external url or other dazzler page by name.
 *
 * :CSS: ``dazzler-core-link``
 */

var Link =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Link, _React$Component);

  function Link() {
    _classCallCheck(this, Link);

    return _possibleConstructorReturn(this, _getPrototypeOf(Link).apply(this, arguments));
  }

  _createClass(Link, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          id = _this$props.id,
          class_name = _this$props.class_name,
          href = _this$props.href,
          children = _this$props.children,
          style = _this$props.style,
          page_name = _this$props.page_name,
          identity = _this$props.identity;
      var url = href;

      if (page_name) {
        url = "".concat(window.dazzler_base_url, "/dazzler/link?page=").concat(encodeURIComponent(page_name));
      }

      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
        id: id || identity,
        href: url,
        className: class_name,
        style: style
      }, children || page_name || url);
    }
  }]);

  return Link;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Link.defaultProps = {};
Link.propTypes = {
  /**
   * The link destination.
   */
  href: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Text/Component to show as link.
   */
  children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Id of the html element, othewise the identity is used.
   */
  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * CSS class of the <a> element
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style object of root <a> element
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Hovered description
   */
  title: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Name of the page to redirect to if the href is not set.
   */
  page_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Modal.jsx":
/*!******************************************!*\
  !*** ./src/core/js/components/Modal.jsx ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Modal; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * A modal overlay the page with a darkened background.
 *
 * :CSS:
 *
 *     ``dazzler-core-modal``
 *     - ``modal-overlay``
 *     - ``modal-active``
 *     - ``modal-content``
 *     - ``modal-header``
 *     - ``modal-closer``
 *     - ``modal-body``
 *     - ``modal-footer``
 */

var Modal =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Modal, _React$Component);

  function Modal() {
    _classCallCheck(this, Modal);

    return _possibleConstructorReturn(this, _getPrototypeOf(Modal).apply(this, arguments));
  }

  _createClass(Modal, [{
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          identity = _this$props.identity,
          class_name = _this$props.class_name,
          style = _this$props.style,
          active = _this$props.active,
          body = _this$props.body,
          header = _this$props.header,
          footer = _this$props.footer,
          close_button = _this$props.close_button;
      console.log(identity);
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: class_name,
        style: style,
        id: identity
      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "modal-overlay".concat(active ? ' modal-active' : ''),
        onClick: function onClick(e) {
          _this.props.updateAspects({
            active: false
          });

          e.stopPropagation();
        }
      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "modal-content",
        onClick: function onClick(e) {
          return e.stopPropagation();
        }
      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "modal-header"
      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, header), close_button && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "modal-closer",
        onClick: function onClick() {
          return _this.props.updateAspects({
            active: false
          });
        }
      }, "X")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "modal-body"
      }, body), footer && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "modal-footer"
      }, footer))));
    }
  }]);

  return Modal;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Modal.defaultProps = {
  close_button: true
};
Modal.propTypes = {
  /**
   * Main content of the modal. (css: modal-body)
   */
  body: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node.isRequired,

  /**
   * Appear before the body. (css: modal-header)
   */
  header: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Appear after the body. (css: modal-footer)
   */
  footer: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Activate the modal.
   */
  active: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Include a close button in the top right corner of the header.
   */
  close_button: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * CSS class of the modal.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style object of outer container.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/ProgressBar.jsx":
/*!************************************************!*\
  !*** ./src/core/js/components/ProgressBar.jsx ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ProgressBar; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }




/**
 * Simple progress bar support by all browsers.
 *
 * :CSS:
 *
 *     ``dazzler-core-progress-bar``
 *     - ``progress``
 *     - ``high``
 *     - ``low``
 *     - ``optimum``
 *     - ``striped``
 *     - ``rounded``
 */

var ProgressBar =
/*#__PURE__*/
function (_React$Component) {
  _inherits(ProgressBar, _React$Component);

  function ProgressBar() {
    _classCallCheck(this, ProgressBar);

    return _possibleConstructorReturn(this, _getPrototypeOf(ProgressBar).apply(this, arguments));
  }

  _createClass(ProgressBar, [{
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          identity = _this$props.identity,
          id = _this$props.id,
          class_name = _this$props.class_name,
          style = _this$props.style,
          value = _this$props.value,
          minimum = _this$props.minimum,
          maximum = _this$props.maximum,
          optimum = _this$props.optimum,
          high = _this$props.high,
          low = _this$props.low,
          striped = _this$props.striped,
          rounded = _this$props.rounded,
          progress_class_name = _this$props.progress_class_name,
          progress_text = _this$props.progress_text;
      var outerClasses = [class_name];
      var innerClasses = ['progress'];

      if (progress_class_name) {
        innerClasses.push(progress_class_name);
      }

      if (high && value >= high) {
        innerClasses.push('high');
      } else if (optimum && value >= optimum) {
        innerClasses.push('optimum');
      } else if (low && value <= low) {
        innerClasses.push('low');
      }

      if (striped) {
        innerClasses.push('striped');
      }

      if (rounded) {
        innerClasses.push('rounded');
        outerClasses.push('rounded');
      }

      var total = maximum - minimum;
      var width = value / total * 100;
      var text = '';

      if (progress_text === 'percent') {
        text = "".concat(width.toFixed(0), " %");
      }

      if (progress_text === 'value') {
        text = "".concat(value, " / ").concat(maximum);
      }

      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        id: id || identity,
        className: Object(ramda__WEBPACK_IMPORTED_MODULE_2__["join"])(' ', outerClasses),
        ref: function ref(r) {
          return _this.progress = r;
        },
        style: style,
        onClick: function onClick(e) {
          var x = e.pageX - _this.progress.offsetLeft;
          var y = e.pageY - _this.progress.offsetTop;
          var clicked = x * maximum / _this.progress.offsetWidth;

          _this.props.updateAspects({
            click: {
              x: x,
              y: y,
              value: clicked,
              timestamp: e.timeStamp
            }
          });
        }
      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: Object(ramda__WEBPACK_IMPORTED_MODULE_2__["join"])(' ', innerClasses),
        style: {
          width: "".concat(width, "%")
        }
      }, text));
    }
  }]);

  return ProgressBar;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


ProgressBar.defaultProps = {
  value: 0
};
ProgressBar.propTypes = {
  /**
   * The current numeric value. This must be between the minimum and maximum values (min attribute and max attribute) if they are specified. If unspecified or malformed, the value is 0. If specified, but not within the range given by the min attribute and max attribute, the value is equal to the nearest end of the range.
   */
  value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * The lower numeric bound of the measured range. This must be less than the maximum value (max attribute), if specified. If unspecified, the minimum value is 0
   */
  minimum: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * The upper numeric bound of the measured range. This must be greater than the minimum value (min attribute), if specified. If unspecified, the maximum value is 1.
   */
  maximum: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (min attribute), and it also must be less than the high value and maximum value (high attribute and max attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the low value is equal to the minimum value.
   */
  low: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * The lower numeric bound of the high end of the measured range. This must be less than the maximum value (max attribute), and it also must be greater than the low value and minimum value (low attribute and min attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the high value is equal to the maximum value.
   */
  high: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * This attribute indicates the optimal numeric value. It must be within the range (as defined by the min attribute and max attribute). When used with the low attribute and high attribute, it gives an indication where along the range is considered preferable. For example, if it is between the min attribute and the low attribute, then the lower range is considered preferred.
   */
  optimum: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * Id for this component, otherwise the identity is used.
   */
  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * CSS class of the outer container.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * CSS class of the inner progress container.
   */
  progress_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style of the component.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Set to show the value on the progress bar.
   */
  progress_text: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['percent', 'value']),

  /**
   * Readonly click event with the value.
   */
  click: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
    value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,
    x: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,
    y: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,
    timestamp: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number
  }),

  /**
   * Use striped style.
   */
  striped: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Use the rounded style
   */
  rounded: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/RadioList.jsx":
/*!**********************************************!*\
  !*** ./src/core/js/components/RadioList.jsx ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return RadioList; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * A radio button list where only a single value can be selected.
 */

var RadioList =
/*#__PURE__*/
function (_React$Component) {
  _inherits(RadioList, _React$Component);

  function RadioList() {
    _classCallCheck(this, RadioList);

    return _possibleConstructorReturn(this, _getPrototypeOf(RadioList).apply(this, arguments));
  }

  _createClass(RadioList, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this$props = this.props,
          value = _this$props.value,
          options = _this$props.options;

      if (value === undefined) {
        this.props.updateAspects({
          value: options[0].value
        });
      }
    }
  }, {
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props2 = this.props,
          identity = _this$props2.identity,
          id = _this$props2.id,
          options = _this$props2.options,
          class_name = _this$props2.class_name,
          labels_class_name = _this$props2.labels_class_name,
          labels_style = _this$props2.labels_style,
          options_class_name = _this$props2.options_class_name,
          options_style = _this$props2.options_style;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        id: id || identity,
        className: class_name
      }, options.map(function (_ref) {
        var value = _ref.value,
            label = _ref.label,
            title = _ref.title,
            label_class_name = _ref.label_class_name,
            input_class_name = _ref.input_class_name;
        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", {
          key: "".concat(identity, "-opt-").concat(value),
          className: label_class_name || labels_class_name,
          style: labels_style
        }, label, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", {
          name: identity,
          type: "radio",
          title: title,
          checked: value === _this.props.value,
          className: input_class_name || options_class_name,
          style: options_style,
          onChange: function onChange() {
            _this.props.updateAspects({
              value: value
            });
          }
        }));
      }));
    }
  }]);

  return RadioList;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


RadioList.defaultProps = {};
RadioList.propTypes = {
  /**
   * Items in the radio list with labels, values and elements attributes.
   */
  options: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
    label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
    value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]),
    title: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
    label_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
    input_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string
  })).isRequired,

  /**
   * Selected radio button.
   */
  value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number]),

  /**
   * Style object of the container.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Class name of the container.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Global class name to give to labels.
   */
  labels_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Global labels style objects.
   */
  labels_style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Global options class name.
   */
  options_class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Global style object of options.
   */
  options_style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Html id of the component, otherwise the identity is used.
   */
  id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Select.jsx":
/*!*******************************************!*\
  !*** ./src/core/js/components/Select.jsx ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Select; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * A select
 */

var Select =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Select, _React$Component);

  function Select() {
    _classCallCheck(this, Select);

    return _possibleConstructorReturn(this, _getPrototypeOf(Select).apply(this, arguments));
  }

  _createClass(Select, [{
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          options = _this$props.options,
          identity = _this$props.identity,
          multi = _this$props.multi,
          class_name = _this$props.class_name,
          placeholder = _this$props.placeholder,
          name = _this$props.name,
          disabled = _this$props.disabled;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("select", {
        className: class_name,
        id: identity,
        name: name,
        value: this.props.value,
        multiple: multi,
        disabled: disabled,
        placeholder: placeholder,
        onChange: function onChange(e) {
          var value;

          if (multi) {
            var opts = e.target.options;
            value = [];

            for (var i = 0, l = opts.length; i < l; i++) {
              if (opts[i].selected) {
                value.push(options[i].value);
              }
            }
          } else {
            value = options[e.target.selectedIndex].value;
          }

          _this.props.updateAspects({
            value: value
          });
        }
      }, options.map(function (_ref) {
        var value = _ref.value,
            label = _ref.label;
        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("option", {
          key: "".concat(identity, "-option-").concat(value),
          className: '.dazzler-core-option',
          value: value
        }, label);
      }));
    }
  }]);

  return Select;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Select.defaultProps = {};
Select.propTypes = {
  /**
   * Option of the select.
   */
  options: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
    value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
    label: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string
  })).isRequired,

  /**
   * Controls wether multiple options can be selected.
   */
  multi: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Value of the selected option(s)
   */
  value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]))]),

  /**
   * Size of the options to use instead of
   */
  size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * CSS class of the Select
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Placeholder text when the input has no value.
   */
  placeholder: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * name of the html input that will be created with the current value
   */
  name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Disable the component.
   */
  disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Slider.jsx":
/*!*******************************************!*\
  !*** ./src/core/js/components/Slider.jsx ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Slider; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../commons/js */ "./src/commons/js/index.js");
function _typeof(obj) { 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); }




/**
 * A slider with a caret contained within a min and max value.
 *
 * :CSS:
 *
 *     ``dazzler-core-slider``
 *     - ``slider-area``: The outer div of the slider.
 *     - ``slider-handle``: The drag handle
 *     - ``slider-spacer``: The space that is before the handle.
 */

var Slider =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Slider, _React$Component);

  function Slider(props) {
    var _this;

    _classCallCheck(this, Slider);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(Slider).call(this, props));
    _this.onDragStart = _this.onDragStart.bind(_assertThisInitialized(_this));
    _this.onDragEnd = _this.onDragEnd.bind(_assertThisInitialized(_this));
    _this.handleDrag = Object(_commons_js__WEBPACK_IMPORTED_MODULE_2__["debounce"])(_this.handleDrag, _this.props.debounce);
    _this.onDragOver = _this.onDragOver.bind(_assertThisInitialized(_this));
    _this.state = {
      dragging: false
    };
    _this.dragX = 0;
    return _this;
  }

  _createClass(Slider, [{
    key: "onDragStart",
    value: function onDragStart(e) {
      this.setState({
        dragging: true
      });
      e.nativeEvent.dataTransfer.setData('application/node type', this._draggable); // Put a event listener on document dragover for the time of the
      // drag, hate on you IE and Firefox.
      // Needs to be document otherwise you can only drag over anchor.

      document.addEventListener('dragover', this.onDragOver);
    }
  }, {
    key: "handleDrag",
    value: function handleDrag(pageX) {
      // Some basic math, get the position of the x relative to the root.
      // The percentage is the x / width of the root
      // then the value is equal to  minimum + percent * range width
      var _this$props = this.props,
          minimum = _this$props.minimum,
          maximum = _this$props.maximum,
          round = _this$props.round;
      var x = pageX - this._root.offsetLeft;
      var percentage = x / this._root.offsetWidth;
      var width = maximum - minimum;
      var value = minimum + percentage * width;

      if (value > maximum) {
        value = maximum;
      }

      if (value < minimum) {
        value = minimum;
      }

      if (round === 'ceil') {
        value = Math.ceil(value);
      } else if (round === 'floor') {
        value = Math.floor(value);
      }

      this.props.updateAspects({
        value: value
      });
    }
  }, {
    key: "onDragEnd",
    value: function onDragEnd() {
      this.setState({
        dragging: false
      });
      document.removeEventListener('dragover', this.onDragOver); // Handle the last event, otherwise can't get the max/min values.

      this.handleDrag(this.dragX);
    }
  }, {
    key: "onDragOver",
    value: function onDragOver(e) {
      this.handleDrag(e.pageX);
      this.dragX = e.pageX;
    }
  }, {
    key: "render",
    value: function render() {
      var _this2 = this;

      var _this$props2 = this.props,
          class_name = _this$props2.class_name,
          identity = _this$props2.identity,
          minimum = _this$props2.minimum,
          maximum = _this$props2.maximum,
          value = _this$props2.value,
          style = _this$props2.style;
      var dragging = this.state.dragging;
      var total = maximum - minimum;
      var width = (value - minimum) / total * 100;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: class_name,
        id: identity,
        style: style
      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "slider-area",
        ref: function ref(r) {
          return _this2._root = r;
        }
      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "slider-spacer",
        style: {
          width: "".concat(width, "%")
        }
      }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "slider-handle".concat(dragging ? ' dragged' : ''),
        draggable: true,
        onDragStart: this.onDragStart,
        onDragEnd: this.onDragEnd,
        ref: function ref(r) {
          return _this2._draggable = r;
        }
      })));
    }
  }]);

  return Slider;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Slider.defaultProps = {
  value: 0,
  debounce: 50
};
Slider.propTypes = {
  /**
   * Minimum (leftmost) value of the slider.
   */
  minimum: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired,

  /**
   * Maximum (rightmost) value of the slider.
   */
  maximum: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired,

  /**
   * Current value
   */
  value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * Round the value
   */
  round: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['ceil', 'floor']),

  /**
   * Time in milliseconds to wait before updating the value.
   */
  debounce: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * CSS classes to use. (Scope: dazzler-core-slider)
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style object of the root div.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Store.jsx":
/*!******************************************!*\
  !*** ./src/core/js/components/Store.jsx ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Store; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * Store data in the browser memory. Data last until the page is refreshed.
 */

var Store =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Store, _React$Component);

  function Store() {
    _classCallCheck(this, Store);

    return _possibleConstructorReturn(this, _getPrototypeOf(Store).apply(this, arguments));
  }

  _createClass(Store, [{
    key: "shouldComponentUpdate",
    value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
      return false;
    }
  }, {
    key: "render",
    value: function render() {
      return null;
    }
  }]);

  return Store;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Store.defaultProps = {};
Store.propTypes = {
  /**
   * Stored data.
   */
  data: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.any,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/Table.jsx":
/*!******************************************!*\
  !*** ./src/core/js/components/Table.jsx ***!
  \******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Table; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * Display data in a tabular manner (Non interactive).
 *
 * :CSS:
 *     ``dazzler-core-table``
 *     - ``table-head``
 *     - ``table-heading``
 *     - ``table-body``
 *     - ``table-row``
 *     - ``table-cell``
 *     - ``table-footer``
 */

var Table =
/*#__PURE__*/
function (_React$Component) {
  _inherits(Table, _React$Component);

  function Table() {
    _classCallCheck(this, Table);

    return _possibleConstructorReturn(this, _getPrototypeOf(Table).apply(this, arguments));
  }

  _createClass(Table, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          identity = _this$props.identity,
          class_name = _this$props.class_name,
          headers = _this$props.headers,
          rows = _this$props.rows,
          footer = _this$props.footer,
          style = _this$props.style,
          caption = _this$props.caption,
          include_row_number = _this$props.include_row_number,
          row_number_start = _this$props.row_number_start;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("table", {
        className: class_name,
        id: identity,
        style: style
      }, caption && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("caption", {
        className: 'table-title'
      }, caption), headers && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("thead", {
        className: "table-head"
      }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, include_row_number && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", {
        className: 'table-heading row-num'
      }), headers.map(function (header, i) {
        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", {
          key: "".concat(identity, "-header-").concat(i),
          className: 'table-heading'
        }, header);
      }, headers))), rows && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tbody", {
        className: 'table-body'
      }, rows.map(function (row, i) {
        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", {
          key: "".concat(identity, "-row-").concat(i),
          className: 'table-row'
        }, include_row_number && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", {
          className: 'table-cell'
        }, row_number_start + i), row.map(function (cell, j) {
          return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", {
            key: "".concat(identity, "-cell-").concat(j, "x").concat(i),
            className: 'table-cell'
          }, cell);
        }));
      })), footer && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tfoot", {
        className: "table-footer"
      }, footer));
    }
  }]);

  return Table;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


Table.defaultProps = {};
Table.propTypes = {
  /**
   * Rows of data or components to display.
   */
  rows: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node)),

  /**
   * Title of the table
   */
  caption: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Table headings
   */
  headers: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node),

  /**
   * CSS class of the table.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style of the table element.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Content of tfoot element (.table-footer)
   */
  footer: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,

  /**
   * Each row start with the row number.
   */
  include_row_number: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * The start of the row number, useful if paged.
   */
  row_number_start: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/TextArea.jsx":
/*!*********************************************!*\
  !*** ./src/core/js/components/TextArea.jsx ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextArea; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }



/**
 * Html Textarea wrapper.
 */

var TextArea =
/*#__PURE__*/
function (_React$Component) {
  _inherits(TextArea, _React$Component);

  function TextArea() {
    _classCallCheck(this, TextArea);

    return _possibleConstructorReturn(this, _getPrototypeOf(TextArea).apply(this, arguments));
  }

  _createClass(TextArea, [{
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          value = _this$props.value,
          identity = _this$props.identity,
          cols = _this$props.cols,
          rows = _this$props.rows,
          name = _this$props.name,
          required = _this$props.required;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("textarea", {
        name: name,
        id: identity,
        cols: cols,
        rows: rows,
        value: value,
        required: required,
        onChange: function onChange(e) {
          return _this.props.updateAspects({
            value: e.target.value
          });
        }
      });
    }
  }]);

  return TextArea;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


TextArea.defaultProps = {};
TextArea.propTypes = {
  /**
   * Current value of the textarea
   */
  value: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Name of the element for forms.
   */
  name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Number of columns.
   */
  cols: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * Number of rows.
   */
  rows: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   * Is it required in a form.
   */
  required: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Is it disabled ?
   */
  disabled: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Hint when no value is entered.
   */
  placeholder: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Max length of the value.
   */
  max_length: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/components/ViewPort.jsx":
/*!*********************************************!*\
  !*** ./src/core/js/components/ViewPort.jsx ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ViewPort; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
function _typeof(obj) { 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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }

function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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

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); }




/**
 * Activate a view with key.
 *
 * Standalone or tabbed.
 *
 * :CSS:
 *
 *     ``dazzler-core-view-port``
 *     - ``view-content``
 *     - ``dazzler-tab``
 *     - ``dazzler-tabs``
 *     - ``tab-active``
 */

var ViewPort =
/*#__PURE__*/
function (_React$Component) {
  _inherits(ViewPort, _React$Component);

  function ViewPort() {
    _classCallCheck(this, ViewPort);

    return _possibleConstructorReturn(this, _getPrototypeOf(ViewPort).apply(this, arguments));
  }

  _createClass(ViewPort, [{
    key: "render",
    value: function render() {
      var _this = this;

      var _this$props = this.props,
          active = _this$props.active,
          views = _this$props.views,
          class_name = _this$props.class_name,
          style = _this$props.style,
          identity = _this$props.identity,
          tabbed = _this$props.tabbed,
          tab_labels = _this$props.tab_labels,
          vertical_tabs = _this$props.vertical_tabs,
          rounded_tabs = _this$props.rounded_tabs,
          bordered = _this$props.bordered;
      return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        id: identity,
        className: class_name,
        style: style
      }, tabbed && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "dazzler-tabs".concat(vertical_tabs ? ' vertical' : '').concat(rounded_tabs ? ' rounded' : '')
      }, Object(ramda__WEBPACK_IMPORTED_MODULE_2__["keys"])(views).map(function (k) {
        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
          className: "dazzler-tab".concat(k === active ? ' tab-active' : '').concat(rounded_tabs ? ' rounded' : ''),
          key: "".concat(identity, "-tab-").concat(k),
          onClick: function onClick() {
            return _this.props.updateAspects({
              active: k
            });
          }
        }, tab_labels[k] || k);
      }), rounded_tabs && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "filler"
      })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
        className: "view-content".concat(bordered ? ' bordered' : '').concat(rounded_tabs ? ' rounded' : '')
      }, Object(ramda__WEBPACK_IMPORTED_MODULE_2__["toPairs"])(views).map(function (_ref) {
        var _ref2 = _slicedToArray(_ref, 2),
            k = _ref2[0],
            v = _ref2[1];

        return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
          className: k === active ? 'dazzler-view' : 'dazzler-view hidden',
          key: "".concat(identity, "-view-").concat(k)
        }, v);
      })));
    }
  }]);

  return ViewPort;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);


ViewPort.defaultProps = {};
ViewPort.propTypes = {
  /**
   * The view that is active.
   */
  active: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,

  /**
   * A dictionary of components to render with the active key.
   */
  views: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.objectOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node).isRequired,

  /**
   * The class name of the outer div.
   */
  class_name: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Style object of the outer div.
   */
  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,

  /**
   * Incorporate tabs before the views.
   */
  tabbed: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Labels for the tabs otherwise the tab keys will be used.
   */
  tab_labels: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.objectOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string),

  /**
   * Make the tabs vertical aligned.
   */
  vertical_tabs: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Round tab style
   */
  rounded_tabs: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   * Add a border around the viewport content (CSS bordered).
   */
  bordered: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,

  /**
   *  Unique id for this component
   */
  identity: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,

  /**
   * Update aspects on the backend.
   */
  updateAspects: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
};

/***/ }),

/***/ "./src/core/js/index.js":
/*!******************************!*\
  !*** ./src/core/js/index.js ***!
  \******************************/
/*! exports provided: Container, DataList, Html, Link, Input, Interval, Store, Select, RadioList, CheckList, ProgressBar, ViewPort, Button, Slider, Image, Modal, TextArea, Table, Grid, Form */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _scss_index_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scss/index.scss */ "./src/core/scss/index.scss");
/* harmony import */ var _scss_index_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scss_index_scss__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _components_Container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/Container */ "./src/core/js/components/Container.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return _components_Container__WEBPACK_IMPORTED_MODULE_1__["default"]; });

/* harmony import */ var _components_DataList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/DataList */ "./src/core/js/components/DataList.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataList", function() { return _components_DataList__WEBPACK_IMPORTED_MODULE_2__["default"]; });

/* harmony import */ var _components_Input__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/Input */ "./src/core/js/components/Input.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return _components_Input__WEBPACK_IMPORTED_MODULE_3__["default"]; });

/* harmony import */ var _components_Interval__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/Interval */ "./src/core/js/components/Interval.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Interval", function() { return _components_Interval__WEBPACK_IMPORTED_MODULE_4__["default"]; });

/* harmony import */ var _components_Store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/Store */ "./src/core/js/components/Store.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return _components_Store__WEBPACK_IMPORTED_MODULE_5__["default"]; });

/* harmony import */ var _components_Html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/Html */ "./src/core/js/components/Html.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Html", function() { return _components_Html__WEBPACK_IMPORTED_MODULE_6__["default"]; });

/* harmony import */ var _components_Select__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/Select */ "./src/core/js/components/Select.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Select", function() { return _components_Select__WEBPACK_IMPORTED_MODULE_7__["default"]; });

/* harmony import */ var _components_RadioList__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/RadioList */ "./src/core/js/components/RadioList.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RadioList", function() { return _components_RadioList__WEBPACK_IMPORTED_MODULE_8__["default"]; });

/* harmony import */ var _components_CheckList__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/CheckList */ "./src/core/js/components/CheckList.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CheckList", function() { return _components_CheckList__WEBPACK_IMPORTED_MODULE_9__["default"]; });

/* harmony import */ var _components_Link__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/Link */ "./src/core/js/components/Link.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return _components_Link__WEBPACK_IMPORTED_MODULE_10__["default"]; });

/* harmony import */ var _components_ProgressBar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/ProgressBar */ "./src/core/js/components/ProgressBar.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProgressBar", function() { return _components_ProgressBar__WEBPACK_IMPORTED_MODULE_11__["default"]; });

/* harmony import */ var _components_ViewPort__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./components/ViewPort */ "./src/core/js/components/ViewPort.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ViewPort", function() { return _components_ViewPort__WEBPACK_IMPORTED_MODULE_12__["default"]; });

/* harmony import */ var _components_Button__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/Button */ "./src/core/js/components/Button.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return _components_Button__WEBPACK_IMPORTED_MODULE_13__["default"]; });

/* harmony import */ var _components_Slider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/Slider */ "./src/core/js/components/Slider.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _components_Slider__WEBPACK_IMPORTED_MODULE_14__["default"]; });

/* harmony import */ var _components_Image__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./components/Image */ "./src/core/js/components/Image.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Image", function() { return _components_Image__WEBPACK_IMPORTED_MODULE_15__["default"]; });

/* harmony import */ var _components_Modal__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./components/Modal */ "./src/core/js/components/Modal.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Modal", function() { return _components_Modal__WEBPACK_IMPORTED_MODULE_16__["default"]; });

/* harmony import */ var _components_TextArea__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./components/TextArea */ "./src/core/js/components/TextArea.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextArea", function() { return _components_TextArea__WEBPACK_IMPORTED_MODULE_17__["default"]; });

/* harmony import */ var _components_Table__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./components/Table */ "./src/core/js/components/Table.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Table", function() { return _components_Table__WEBPACK_IMPORTED_MODULE_18__["default"]; });

/* harmony import */ var _components_Grid__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./components/Grid */ "./src/core/js/components/Grid.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _components_Grid__WEBPACK_IMPORTED_MODULE_19__["default"]; });

/* harmony import */ var _components_Form__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./components/Form */ "./src/core/js/components/Form.jsx");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return _components_Form__WEBPACK_IMPORTED_MODULE_20__["default"]; });
























/***/ }),

/***/ "./src/core/scss/index.scss":
/*!**********************************!*\
  !*** ./src/core/scss/index.scss ***!
  \**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/core/scss/index.scss");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 3:
/*!************************************!*\
  !*** multi ./src/core/js/index.js ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! /home/t4rk/projects/experiments/dazzler/src/core/js/index.js */"./src/core/js/index.js");


/***/ }),

/***/ "react":
/*!****************************************************************************************************!*\
  !*** external {"commonjs":"react","commonjs2":"react","amd":"react","umd":"react","root":"React"} ***!
  \****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_react__;

/***/ })

/******/ });
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64, 