1- ( ( ) => { "use strict" ; function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var l = t [ n ] ; l . enumerable = l . enumerable || ! 1 , l . configurable = ! 0 , "value" in l && ( l . writable = ! 0 ) , Object . defineProperty ( e , l . key , l ) } } var t = new ( function ( ) { function t ( ) { ! function ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } ( this , t ) , this . els = { } } var n , l ; return n = t , ( l = [ { key :"init" , value :function ( ) { this . cacheEls ( ) , this . bindEvents ( ) , this . enableStoreDetails ( ) } } , { key :"cacheEls" , value :function ( ) { this . els . enableStoreDetails = document . getElementById ( "cc_woo_save_store_details" ) , this . els . optionalFields = document . getElementById ( "cc-optional-fields" ) } } , { key :"bindEvents" , value :function ( ) { var e = this ; this . els . enableStoreDetails . addEventListener ( "change" , ( function ( t ) { e . enableStoreDetails ( ) } ) ) } } , { key :"enableStoreDetails" , value :function ( ) { this . els . enableStoreDetails . checked ?( console . log ( this . els . optionalFields . parentElement ) , this . els . optionalFields . parentElement . style . display = "block" ) :this . els . optionalFields . parentElement . style . display = "none" } } ] ) && e ( n . prototype , l ) , t } ( ) ) ; window . onload = function ( e ) { t . init ( ) } } ) ( ) ;
1+ /*
2+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3+ * This devtool is neither made for production nor for readable output files.
4+ * It uses "eval()" calls to create a separate source file in the browser devtools.
5+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6+ * or disable the default devtool with "devtool: false".
7+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8+ */
9+ /******/ ( ( ) => { // webpackBootstrap
10+ /******/ "use strict" ;
11+ /******/ var __webpack_modules__ = ( {
12+
13+ /***/ "./app/admin.js" :
14+ /*!**********************!*\
15+ !*** ./app/admin.js ***!
16+ \**********************/
17+ /***/ ( ( __unused_webpack_module , __webpack_exports__ , __webpack_require__ ) => {
18+
19+ eval ( "__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _handleSettingsPage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./handleSettingsPage */ \"./app/handleSettingsPage.js\");\n\n\n// Handles store details.\nvar enableStoreDetails = new _handleSettingsPage__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\nwindow.onload = function (e) {\n enableStoreDetails.init();\n};\n\n//# sourceURL=webpack://constant-contact-woocommerce/./app/admin.js?" ) ;
20+
21+ /***/ } ) ,
22+
23+ /***/ "./app/handleSettingsPage.js" :
24+ /*!***********************************!*\
25+ !*** ./app/handleSettingsPage.js ***!
26+ \***********************************/
27+ /***/ ( ( __unused_webpack_module , __webpack_exports__ , __webpack_require__ ) => {
28+
29+ eval ( "__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ HandleSettingsPage)\n/* harmony export */ });\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _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, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * GuestCheckoutCapture.\n *\n * @package WebDevStudios\\CCForWoo\n * @since 1.2.0\n */\nvar HandleSettingsPage = /*#__PURE__*/function () {\n /**\n * @constructor\n *\n * @author Biplav Subedi <[email protected] >\n * @since 2.0.0\n */\n function HandleSettingsPage() {\n _classCallCheck(this, HandleSettingsPage);\n this.els = {};\n }\n\n /**\n * Init ccWoo admin JS.\n *\n * @author Biplav Subedi <[email protected] >\n * @since 2.0.0\n */\n _createClass(HandleSettingsPage, [{\n key: \"init\",\n value: function init() {\n this.cacheEls();\n this.bindEvents();\n this.enableStoreDetails();\n }\n\n /**\n * Cache some DOM elements.\n *\n * @author Biplav Subedi <[email protected] >\n * @since 2.0.0\n */\n }, {\n key: \"cacheEls\",\n value: function cacheEls() {\n this.els.enableStoreDetails = document.getElementById('cc_woo_save_store_details');\n this.els.optionalFields = document.getElementById('cc-optional-fields');\n }\n\n /**\n * Bind callbacks to events.\n *\n * @author Biplav Subedi <[email protected] >\n * @since 2.0.0\n */\n }, {\n key: \"bindEvents\",\n value: function bindEvents() {\n var _this = this;\n if (null !== this.els.enableStoreDetails) {\n this.els.enableStoreDetails.addEventListener('change', function (e) {\n _this.enableStoreDetails();\n });\n }\n }\n\n /**\n * Captures guest checkout if billing email is valid.\n *\n * @author Biplav Subedi <[email protected] >\n * @since 2.0.0\n */\n }, {\n key: \"enableStoreDetails\",\n value: function enableStoreDetails() {\n if (null !== this.els.enableStoreDetails) {\n if (this.els.enableStoreDetails.checked) {\n console.log(this.els.optionalFields.parentElement);\n this.els.optionalFields.parentElement.style.display = 'block';\n } else {\n this.els.optionalFields.parentElement.style.display = 'none';\n }\n }\n }\n }]);\n return HandleSettingsPage;\n}();\n\n\n//# sourceURL=webpack://constant-contact-woocommerce/./app/handleSettingsPage.js?" ) ; 30+
31+ /***/ } )
32+
33+ /******/ } ) ;
34+ /************************************************************************/
35+ /******/ // The module cache
36+ /******/ var __webpack_module_cache__ = { } ;
37+ /******/
38+ /******/ // The require function
39+ /******/ function __webpack_require__ ( moduleId ) {
40+ /******/ // Check if module is in cache
41+ /******/ var cachedModule = __webpack_module_cache__ [ moduleId ] ;
42+ /******/ if ( cachedModule !== undefined ) {
43+ /******/ return cachedModule . exports ;
44+ /******/ }
45+ /******/ // Create a new module (and put it into the cache)
46+ /******/ var module = __webpack_module_cache__ [ moduleId ] = {
47+ /******/ // no module.id needed
48+ /******/ // no module.loaded needed
49+ /******/ exports : { }
50+ /******/ } ;
51+ /******/
52+ /******/ // Execute the module function
53+ /******/ __webpack_modules__ [ moduleId ] ( module , module . exports , __webpack_require__ ) ;
54+ /******/
55+ /******/ // Return the exports of the module
56+ /******/ return module . exports ;
57+ /******/ }
58+ /******/
59+ /************************************************************************/
60+ /******/ /* webpack/runtime/define property getters */
61+ /******/ ( ( ) => {
62+ /******/ // define getter functions for harmony exports
63+ /******/ __webpack_require__ . d = ( exports , definition ) => {
64+ /******/ for ( var key in definition ) {
65+ /******/ if ( __webpack_require__ . o ( definition , key ) && ! __webpack_require__ . o ( exports , key ) ) {
66+ /******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
67+ /******/ }
68+ /******/ }
69+ /******/ } ;
70+ /******/ } ) ( ) ;
71+ /******/
72+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
73+ /******/ ( ( ) => {
74+ /******/ __webpack_require__ . o = ( obj , prop ) => ( Object . prototype . hasOwnProperty . call ( obj , prop ) )
75+ /******/ } ) ( ) ;
76+ /******/
77+ /******/ /* webpack/runtime/make namespace object */
78+ /******/ ( ( ) => {
79+ /******/ // define __esModule on exports
80+ /******/ __webpack_require__ . r = ( exports ) => {
81+ /******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
82+ /******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
83+ /******/ }
84+ /******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
85+ /******/ } ;
86+ /******/ } ) ( ) ;
87+ /******/
88+ /************************************************************************/
89+ /******/
90+ /******/ // startup
91+ /******/ // Load entry module and return exports
92+ /******/ // This entry module can't be inlined because the eval devtool is used.
93+ /******/ var __webpack_exports__ = __webpack_require__ ( "./app/admin.js" ) ;
94+ /******/
95+ /******/ } ) ( )
96+ ;
0 commit comments