{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../demo7/src/js/pages/custom/todo/todo.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;;AAEA,2DAA2D;AAC3D,2DAA2D;;AAE3D;AACA;;AAEA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;;AAEA,oDAAoD,OAAO;AAC3D;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC","file":"js/pages/custom/todo/todo.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"../demo7/src/js/pages/custom/todo/todo.js\");\n","\"use strict\";\r\n\r\n// Class definition\r\nvar KTAppTodo = function() {\r\n // Private properties\r\n var _asideEl;\r\n var _listEl;\r\n var _viewEl;\r\n var _replyEl;\r\n var _asideOffcanvas;\r\n\r\n // Private methods\r\n var _initEditor = function(form, editor) {\r\n // init editor\r\n var options = {\r\n modules: {\r\n toolbar: {}\r\n },\r\n placeholder: 'Type message...',\r\n theme: 'snow'\r\n };\r\n\r\n if (!KTUtil.getById(editor)) {\r\n return;\r\n }\r\n\r\n // Init editor\r\n var editor = new Quill('#' + editor, options);\r\n\r\n // Customize editor\r\n var toolbar = KTUtil.find(form, '.ql-toolbar');\r\n var editor = KTUtil.find(form, '.ql-editor');\r\n\r\n if (toolbar) {\r\n KTUtil.addClass(toolbar, 'px-5 border-top-0 border-left-0 border-right-0');\r\n }\r\n\r\n if (editor) {\r\n KTUtil.addClass(editor, 'px-8');\r\n }\r\n }\r\n\r\n var _initAttachments = function(elemId) {\r\n if (!KTUtil.getById(elemId)) {\r\n return;\r\n }\r\n\r\n var id = \"#\" + elemId;\r\n var previewNode = $(id + \" .dropzone-item\");\r\n previewNode.id = \"\";\r\n var previewTemplate = previewNode.parent('.dropzone-items').html();\r\n previewNode.remove();\r\n\r\n var myDropzone = new Dropzone(id, { // Make the whole body a dropzone\r\n url: \"https://keenthemes.com/scripts/void.php\", // Set the url for your upload script location\r\n parallelUploads: 20,\r\n maxFilesize: 1, // Max filesize in MB\r\n previewTemplate: previewTemplate,\r\n previewsContainer: id + \" .dropzone-items\", // Define the container to display the previews\r\n clickable: id + \"_select\" // Define the element that should be used as click trigger to select files.\r\n });\r\n\r\n myDropzone.on(\"addedfile\", function(file) {\r\n // Hookup the start button\r\n $(document).find(id + ' .dropzone-item').css('display', '');\r\n });\r\n\r\n // Update the total progress bar\r\n myDropzone.on(\"totaluploadprogress\", function(progress) {\r\n document.querySelector(id + \" .progress-bar\").style.width = progress + \"%\";\r\n });\r\n\r\n myDropzone.on(\"sending\", function(file) {\r\n // Show the total progress bar when upload starts\r\n document.querySelector(id + \" .progress-bar\").style.opacity = \"1\";\r\n });\r\n\r\n // Hide the total progress bar when nothing's uploading anymore\r\n myDropzone.on(\"complete\", function(progress) {\r\n var thisProgressBar = id + \" .dz-complete\";\r\n setTimeout(function() {\r\n $(thisProgressBar + \" .progress-bar, \" + thisProgressBar + \" .progress\").css('opacity', '0');\r\n }, 300)\r\n });\r\n }\r\n\r\n // Public methods\r\n return {\r\n // Public functions\r\n init: function() {\r\n // Init variables\r\n _asideEl = KTUtil.getById('kt_todo_aside');\r\n _listEl = KTUtil.getById('kt_todo_list');\r\n _viewEl = KTUtil.getById('kt_todo_view');\r\n _replyEl = KTUtil.getById('kt_todo_reply');\r\n\r\n // Init handlers\r\n KTAppTodo.initAside();\r\n KTAppTodo.initList();\r\n KTAppTodo.initView();\r\n KTAppTodo.initReply();\r\n },\r\n\r\n initAside: function() {\r\n // Mobile offcanvas for mobile mode\r\n _asideOffcanvas = new KTOffcanvas(_asideEl, {\r\n overlay: true,\r\n baseClass: 'offcanvas-mobile',\r\n //closeBy: 'kt_todo_aside_close',\r\n toggleBy: 'kt_subheader_mobile_toggle'\r\n });\r\n\r\n // View list\r\n KTUtil.on(_asideEl, '.list-item[data-action=\"list\"]', 'click', function(e) {\r\n var type = KTUtil.attr(this, 'data-type');\r\n var listItemsEl = KTUtil.find(_listEl, '.kt-inbox__items');\r\n var navItemEl = this.closest('.kt-nav__item');\r\n var navItemActiveEl = KTUtil.find(_asideEl, '.kt-nav__item.kt-nav__item--active');\r\n\r\n // demo loading\r\n var loading = new KTDialog({\r\n 'type': 'loader',\r\n 'placement': 'top center',\r\n 'message': 'Loading ...'\r\n });\r\n loading.show();\r\n\r\n setTimeout(function() {\r\n loading.hide();\r\n\r\n KTUtil.css(_listEl, 'display', 'flex'); // show list\r\n KTUtil.css(_viewEl, 'display', 'none'); // hide view\r\n\r\n KTUtil.addClass(navItemEl, 'kt-nav__item--active');\r\n KTUtil.removeClass(navItemActiveEl, 'kt-nav__item--active');\r\n\r\n KTUtil.attr(listItemsEl, 'data-type', type);\r\n }, 600);\r\n });\r\n },\r\n\r\n initList: function() {\r\n // Group selection\r\n KTUtil.on(_listEl, '[data-inbox=\"group-select\"] input', 'click', function() {\r\n var messages = KTUtil.findAll(_listEl, '[data-inbox=\"message\"]');\r\n\r\n for (var i = 0, j = messages.length; i < j; i++) {\r\n var message = messages[i];\r\n var checkbox = KTUtil.find(message, '.checkbox input');\r\n checkbox.checked = this.checked;\r\n\r\n if (this.checked) {\r\n KTUtil.addClass(message, 'active');\r\n } else {\r\n KTUtil.removeClass(message, 'active');\r\n }\r\n }\r\n });\r\n\r\n // Individual selection\r\n KTUtil.on(_listEl, '[data-inbox=\"message\"] [data-inbox=\"actions\"] .checkbox input', 'click', function() {\r\n var item = this.closest('[data-inbox=\"message\"]');\r\n\r\n if (item && this.checked) {\r\n KTUtil.addClass(item, 'active');\r\n } else {\r\n KTUtil.removeClass(item, 'active');\r\n }\r\n });\r\n },\r\n\r\n initView: function() {\r\n // Back to listing\r\n KTUtil.on(_viewEl, '[data-inbox=\"back\"]', 'click', function() {\r\n // demo loading\r\n var loading = new KTDialog({\r\n 'type': 'loader',\r\n 'placement': 'top center',\r\n 'message': 'Loading ...'\r\n });\r\n\r\n loading.show();\r\n\r\n setTimeout(function() {\r\n loading.hide();\r\n\r\n KTUtil.addClass(_listEl, 'd-block');\r\n KTUtil.removeClass(_listEl, 'd-none');\r\n\r\n KTUtil.addClass(_viewEl, 'd-none');\r\n KTUtil.removeClass(_viewEl, 'd-block');\r\n }, 700);\r\n });\r\n\r\n // Expand/Collapse reply\r\n KTUtil.on(_viewEl, '[data-inbox=\"message\"]', 'click', function(e) {\r\n var message = this.closest('[data-inbox=\"message\"]');\r\n\r\n var dropdownToggleEl = KTUtil.find(this, '[data-toggle=\"dropdown\"]');\r\n var toolbarEl = KTUtil.find(this, '[data-inbox=\"toolbar\"]');\r\n\r\n // skip dropdown toggle click\r\n if (e.target === dropdownToggleEl || (dropdownToggleEl && dropdownToggleEl.contains(e.target) === true)) {\r\n return false;\r\n }\r\n\r\n // skip group actions click\r\n if (e.target === toolbarEl || (toolbarEl && toolbarEl.contains(e.target) === true)) {\r\n return false;\r\n }\r\n\r\n if (KTUtil.hasClass(message, 'toggle-on')) {\r\n KTUtil.addClass(message, 'toggle-off');\r\n KTUtil.removeClass(message, 'toggle-on');\r\n } else {\r\n KTUtil.removeClass(message, 'toggle-off');\r\n KTUtil.addClass(message, 'toggle-on');\r\n }\r\n });\r\n },\r\n\r\n initReply: function() {\r\n _initEditor(_replyEl, 'kt_todo_reply_editor');\r\n _initAttachments('kt_todo_reply_attachments');\r\n }\r\n };\r\n}();\r\n\r\n// Class Initialization\r\njQuery(document).ready(function() {\r\n KTAppTodo.init();\r\n});\r\n"],"sourceRoot":""}