{"version":3,"sources":["webpack:///js/plugin--disable-on-submit--80ae754625e8b0db448a.js","webpack:///./project/client/src/core/components/disable-on-submit/disable-on-submit.js"],"names":["webpackJsonpHort","/tool/node_modules/babel-loader/lib/index.js??ref--7-0!/tool/node_modules/eslint-loader/index.js!/tool/project/client/src/core/components/disable-on-submit/disable-on-submit.js","module","exports","__webpack_require__","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","_debug","_debug2","obj","__esModule","default","log","DisableOnSubmit","element","options","this","$element","$","$submitButton","watch","event","attr","addClass","on","onSubmit","bind","off","removeAttr","removeClass","DEFAULTS"],"mappings":"AAAAA,kBAAkB,8BAEZC,mLACA,SAAUC,EAAQC,EAASC,GAEjC,YAeA,SAASC,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAZhHC,OAAOC,eAAeP,EAAS,cAC3BQ,OAAO,GAGX,IAAIC,GAAe,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,SAAWF,KAAYA,EAAWG,UAAW,GAAMZ,OAAOC,eAAeI,EAAQI,EAAWI,IAAKJ,IAAiB,MAAO,UAAUX,EAAagB,EAAYC,GAAiJ,MAA9HD,IAAYV,EAAiBN,EAAYkB,UAAWF,GAAiBC,GAAaX,EAAiBN,EAAaiB,GAAqBjB,MCZhiBmB,EAAAtB,EAAA,4IDgBIuB,EAEJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,IAFlDF,GCb/BK,GAAM,EAAAJ,EAAAG,SADQ,sCAKdE,EDoBgB,WCnBlB,QAAAA,GAAYC,EAASC,GAAS7B,EAAA8B,KAAAH,GAC1BG,KAAKF,QAAUA,EACfE,KAAKD,QAAUA,EACfC,KAAKC,SAAWC,EAAEJ,GAClBE,KAAKG,cAAgBD,EAAE,kBAAmBJ,GAC1CF,EAAI,kBAAmBE,EAASC,GAChCC,KAAKI,QD8CT,MArBA3B,GAAaoB,IACTV,IAAK,WACLX,MAAO,SCxBF6B,GACQL,KAAKC,QAClBD,MAAKG,cACAG,KAAK,WAAW,YAChBC,SAhBU,oBDyCfpB,IAAK,QACLX,MAAO,WCtBPwB,KAAKC,SAASO,GAAG,yBAA0BR,KAAKS,SAASC,KAAKV,OAC9DJ,EAAI,QAASI,KAAKF,YD0BlBX,IAAK,UACLX,MAAO,WCvBPwB,KAAKC,SAASU,IAAI,oBAClBX,KAAKG,cACAS,WAAW,YACXC,YA5BU,iBA6BfjB,EAAI,UAAWI,KAAKF,aD0BjBD,ICtBXA,GAAgBiB,YD2BhB9C,EAAQ2B,QCzBOE","file":"js/plugin--disable-on-submit--80ae754625e8b0db448a.js","sourcesContent":["webpackJsonpHort([\"plugin--disable-on-submit\"],{\n\n/***/ \"/tool/node_modules/babel-loader/lib/index.js??ref--7-0!/tool/node_modules/eslint-loader/index.js!/tool/project/client/src/core/components/disable-on-submit/disable-on-submit.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _debug = __webpack_require__(\"/tool/node_modules/babel-loader/lib/index.js??ref--7-0!/tool/node_modules/eslint-loader/index.js!/tool/node_modules/debug/src/browser.js\");\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar MODULE_NAME = 'app.core/modules/disable-on-submit';\nvar log = (0, _debug2.default)(MODULE_NAME);\n\nvar PROGRESS_CLASS = 'is-submitting';\n\nvar DisableOnSubmit = function () {\n function DisableOnSubmit(element, options) {\n _classCallCheck(this, DisableOnSubmit);\n\n this.element = element;\n this.options = options;\n this.$element = $(element);\n this.$submitButton = $('[type=\"submit\"]', element);\n log('DisableOnSubmit', element, options);\n this.watch();\n }\n\n _createClass(DisableOnSubmit, [{\n key: 'onSubmit',\n value: function onSubmit(event) {\n var form = this.$element;\n this.$submitButton.attr('disabled', 'disabled').addClass(PROGRESS_CLASS);\n }\n }, {\n key: 'watch',\n value: function watch() {\n this.$element.on('submit.disableonsubmit', this.onSubmit.bind(this));\n log('bound', this.element);\n }\n }, {\n key: 'unwatch',\n value: function unwatch() {\n this.$element.off('.disableonsubmit');\n this.$submitButton.removeAttr('disabled').removeClass(PROGRESS_CLASS);\n log('unbound', this.element);\n }\n }]);\n\n return DisableOnSubmit;\n}();\n\nDisableOnSubmit.DEFAULTS = {};\n\nexports.default = DisableOnSubmit;\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// js/plugin--disable-on-submit--80ae754625e8b0db448a.js","import debug from \"debug\";\r\n\r\nconst MODULE_NAME = 'app.core/modules/disable-on-submit';\r\nconst log = debug(MODULE_NAME);\r\n\r\nconst PROGRESS_CLASS = 'is-submitting';\r\n\r\nclass DisableOnSubmit {\r\n constructor(element, options) {\r\n this.element = element;\r\n this.options = options;\r\n this.$element = $(element);\r\n this.$submitButton = $('[type=\"submit\"]', element);\r\n log('DisableOnSubmit', element, options);\r\n this.watch();\r\n }\r\n\r\n onSubmit(event) {\r\n const form = this.$element;\r\n this.$submitButton\r\n .attr('disabled','disabled')\r\n .addClass(PROGRESS_CLASS);\r\n }\r\n\r\n watch() {\r\n this.$element.on('submit.disableonsubmit', this.onSubmit.bind(this));\r\n log('bound', this.element);\r\n }\r\n\r\n unwatch() {\r\n this.$element.off('.disableonsubmit');\r\n this.$submitButton\r\n .removeAttr('disabled')\r\n .removeClass(PROGRESS_CLASS);\r\n log('unbound', this.element);\r\n }\r\n}\r\n\r\nDisableOnSubmit.DEFAULTS = {};\r\n\r\nexport default DisableOnSubmit;\r\n\n\n\n// WEBPACK FOOTER //\n// ./project/client/src/core/components/disable-on-submit/disable-on-submit.js"],"sourceRoot":""}