"use strict"; 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; } // Nestable Demo // ============================================================= var NestableDemo = /*#__PURE__*/ function () { function NestableDemo() { _classCallCheck(this, NestableDemo); this.init(); } _createClass(NestableDemo, [{ key: "init", value: function init() { // event handlers this.handleNestable(); } }, { key: "handleNestable", value: function handleNestable() { var _this = this; $('#nestable01').on('change', this.output); $('#nestable02').on('change', this.output); // build nestable from json data this.getData().done(function (data) { var items = ''; $.each(data, function (index, item) { items += _this.buildItem(item); }); $('#nestable03').children().html(items).parent().nestable().on('change', _this.output); }); } }, { key: "getData", value: function getData() { return $.getJSON('assets/data/nestable.json'); } }, { key: "buildItem", value: function buildItem(item) { var _this2 = this; var html = "