diff --git a/package-lock.json b/package-lock.json index 9d1839b..b9ae5fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1124,17 +1124,6 @@ "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", "dev": true }, - "@tailwindcss/custom-forms": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/custom-forms/-/custom-forms-0.2.1.tgz", - "integrity": "sha512-XdP5XY6kxo3x5o50mWUyoYWxOPV16baagLoZ5uM41gh6IhXzhz/vJYzqrTb/lN58maGIKlpkxgVsQUNSsbAS3Q==", - "dev": true, - "requires": { - "lodash": "^4.17.11", - "mini-svg-data-uri": "^1.0.3", - "traverse": "^0.6.6" - } - }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", @@ -5843,12 +5832,6 @@ "mime-db": "1.44.0" } }, - "mini-svg-data-uri": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.2.3.tgz", - "integrity": "sha512-zd6KCAyXgmq6FV1mR10oKXYtvmA9vRoB6xPSTUJTbFApCtkefDnYueVR1gkof3KcdLZo1Y8mjF2DFmQMIxsHNQ==", - "dev": true - }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -9408,9 +9391,9 @@ } }, "tailwindcss": { - "version": "1.8.9", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-1.8.9.tgz", - "integrity": "sha512-VgoBxIyF+Ipf+x3eDz3tPA8A5blGBPkswA2xM6fxCmAwAmhlIr9Zk3exft44BUf3q9mxorvjCRtxBrklfPDSoQ==", + "version": "1.8.10", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-1.8.10.tgz", + "integrity": "sha512-7QkERG/cWCzsuMqHMwjOaLMVixOGLNBiXsrkssxlE1aWfkxVbGqiuMokR2162xRyaH2mBIHKxmlf1qb3DvIPqw==", "requires": { "@fullhuman/postcss-purgecss": "^2.1.2", "autoprefixer": "^9.4.5", @@ -9663,12 +9646,6 @@ "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", "dev": true }, - "traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=", - "dev": true - }, "tslib": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", diff --git a/package.json b/package.json index 15cb62d..2ad44b7 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { - "@tailwindcss/custom-forms": "^0.2.1", "cross-env": "^5.1", "laravel-mix": "^5.0.5", "laravel-mix-purgecss": "^4.2.0", @@ -21,6 +20,6 @@ }, "dependencies": { "axios": "^0.19.2", - "tailwindcss": "^1.4.6" + "tailwindcss": "^1.8.10" } } diff --git a/public/js/statamic-magiclink.js b/public/js/statamic-magiclink.js index 795ad70..f93f699 100644 --- a/public/js/statamic-magiclink.js +++ b/public/js/statamic-magiclink.js @@ -1,742 +1 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // 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 = "/"; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 0); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SendMagicLinkComponent.vue?vue&type=script&lang=js&": -/*!*********************************************************************************************************************************************************************************!*\ - !*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/SendMagicLinkComponent.vue?vue&type=script&lang=js& ***! - \*********************************************************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -/* harmony default export */ __webpack_exports__["default"] = ({ - props: { - action: String, - method: { - type: String, - required: true - } - }, - data: function data() { - return { - error: null, - errors: {}, - email: '' - }; - }, - computed: { - hasErrors: function hasErrors() { - return this.error || Object.keys(this.errors).length; - }, - payload: function payload() { - return { - email: this.email - }; - } - }, - methods: { - clearErrors: function clearErrors() { - this.error = null; - this.errors = {}; - }, - send: function send() { - var _this = this; - - this.clearErrors(); - this.$axios[this.method](this.action, this.payload).then(function (response) { - window.location = response.data.redirect; - })["catch"](function (e) { - if (e.response && e.response.status === 422) { - var _e$response$data = e.response.data, - message = _e$response$data.message, - errors = _e$response$data.errors; - _this.error = message; - _this.errors = errors; - - _this.$toast.error(message); - } else { - _this.$toast.error(__('magiclink::web.unable_to_send')); - } - }); - } - } -}); - -/***/ }), - -/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SettingsComponent.vue?vue&type=script&lang=js&": -/*!****************************************************************************************************************************************************************************!*\ - !*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/SettingsComponent.vue?vue&type=script&lang=js& ***! - \****************************************************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -/* harmony default export */ __webpack_exports__["default"] = ({ - props: { - action: String, - initialExpireTime: { - type: Number, - required: true - }, - initialIsEnabled: { - type: Boolean, - required: true - }, - indexUrl: { - type: String, - required: true - }, - method: { - type: String, - required: true - } - }, - data: function data() { - return { - error: null, - errors: {}, - isEnabled: this.initialIsEnabled, - expireTime: this.initialExpireTime - }; - }, - computed: { - hasErrors: function hasErrors() { - return this.error || Object.keys(this.errors).length; - }, - payload: function payload() { - return { - isEnabled: this.isEnabled, - expireTime: this.expireTime - }; - } - }, - methods: { - clearErrors: function clearErrors() { - this.error = null; - this.errors = {}; - }, - save: function save() { - var _this = this; - - this.clearErrors(); - this.$axios[this.method](this.action, this.payload).then(function (response) { - window.location = response.data.redirect; - })["catch"](function (e) { - if (e.response && e.response.status === 422) { - var _e$response$data = e.response.data, - message = _e$response$data.message, - errors = _e$response$data.errors; - _this.error = message; - _this.errors = errors; - - _this.$toast.error(message); - } else { - _this.$toast.error(__('magiclink::cp.unable_to_save')); - } - }); - } - }, - mounted: function mounted() { - var _this2 = this; - - this.$keys.bindGlobal(['mod+s'], function (e) { - e.preventDefault(); - - _this2.save(); - }); - } -}); - -/***/ }), - -/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SendMagicLinkComponent.vue?vue&type=template&id=56987049&": -/*!*************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/SendMagicLinkComponent.vue?vue&type=template&id=56987049& ***! - \*************************************************************************************************************************************************************************************************************************/ -/*! exports provided: render, staticRenderFns */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; }); -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "div", - [ - _c( - "publish-fields-container", - { staticClass: "p-0" }, - [ - _c("form-group", { - staticClass: "p-0", - attrs: { - handle: "email", - display: _vm.__("magiclink::web.email_address"), - errors: _vm.errors.email, - focus: true - }, - model: { - value: _vm.email, - callback: function($$v) { - _vm.email = $$v - }, - expression: "email" - } - }) - ], - 1 - ), - _vm._v(" "), - _c("div", { staticClass: "py-2 flex justify-between" }, [ - _c( - "button", - { - staticClass: "btn-primary w-full", - attrs: { type: "submit" }, - on: { click: _vm.send } - }, - [_vm._v(_vm._s(_vm.__("magiclink::web.login_magic_link")))] - ) - ]) - ], - 1 - ) -} -var staticRenderFns = [] -render._withStripped = true - - - -/***/ }), - -/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SettingsComponent.vue?vue&type=template&id=67fba83f&": -/*!********************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/SettingsComponent.vue?vue&type=template&id=67fba83f& ***! - \********************************************************************************************************************************************************************************************************************/ -/*! exports provided: render, staticRenderFns */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; }); -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "div", - [ - _c( - "publish-fields-container", - { staticClass: "card p-0 mb-3 configure-section" }, - [ - _c("form-group", { - staticClass: "toggle-fieldtype", - attrs: { - fieldtype: "toggle", - handle: "isEnabled", - display: _vm.__("magiclink::cp.settings.ml_enabled"), - instructions: _vm.__( - "magiclink::cp.settings.ml_enabled_instructions" - ) - }, - model: { - value: _vm.isEnabled, - callback: function($$v) { - _vm.isEnabled = $$v - }, - expression: "isEnabled" - } - }), - _vm._v(" "), - _c("form-group", { - staticClass: "border-b", - attrs: { - handle: "expireTime", - display: _vm.__("magiclink::cp.settings.ml_expire_time"), - errors: _vm.errors.expireTime, - instructions: _vm.__( - "magiclink::cp.settings.ml_expire_time_instructions" - ) - }, - model: { - value: _vm.expireTime, - callback: function($$v) { - _vm.expireTime = $$v - }, - expression: "expireTime" - } - }) - ], - 1 - ), - _vm._v(" "), - _c("div", { staticClass: "py-2 mt-3 border-t flex justify-between" }, [ - _c("a", { - staticClass: "btn", - attrs: { href: _vm.indexUrl }, - domProps: { textContent: _vm._s(_vm.__("Cancel")) } - }), - _vm._v(" "), - _c( - "button", - { - staticClass: "btn-primary", - attrs: { type: "submit" }, - on: { click: _vm.save } - }, - [_vm._v(_vm._s(_vm.__("Save")))] - ) - ]) - ], - 1 - ) -} -var staticRenderFns = [] -render._withStripped = true - - - -/***/ }), - -/***/ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js": -/*!********************************************************************!*\ - !*** ./node_modules/vue-loader/lib/runtime/componentNormalizer.js ***! - \********************************************************************/ -/*! 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 normalizeComponent; }); -/* globals __VUE_SSR_CONTEXT__ */ - -// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). -// This module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle. - -function normalizeComponent ( - scriptExports, - render, - staticRenderFns, - functionalTemplate, - injectStyles, - scopeId, - moduleIdentifier, /* server only */ - shadowMode /* vue-cli only */ -) { - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (render) { - options.render = render - options.staticRenderFns = staticRenderFns - options._compiled = true - } - - // functional template - if (functionalTemplate) { - options.functional = true - } - - // scopedId - if (scopeId) { - options._scopeId = 'data-v-' + scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = shadowMode - ? function () { - injectStyles.call( - this, - (options.functional ? this.parent : this).$root.$options.shadowRoot - ) - } - : injectStyles - } - - if (hook) { - if (options.functional) { - // for template-only hot-reload because in that case the render fn doesn't - // go through the normalizer - options._injectStyles = hook - // register for functional component in vue file - var originalRender = options.render - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return originalRender(h, context) - } - } else { - // inject component registration as beforeCreate hook - var existing = options.beforeCreate - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } - } - - return { - exports: scriptExports, - options: options - } -} - - -/***/ }), - -/***/ "./resources/css/statamic-magiclink.css": -/*!**********************************************!*\ - !*** ./resources/css/statamic-magiclink.css ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), - -/***/ "./resources/js/app.js": -/*!*****************************!*\ - !*** ./resources/js/app.js ***! - \*****************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _components_SendMagicLinkComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/SendMagicLinkComponent */ "./resources/js/components/SendMagicLinkComponent.vue"); -/* harmony import */ var _components_SettingsComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/SettingsComponent */ "./resources/js/components/SettingsComponent.vue"); - - -Statamic.booting(function () { - Statamic.$components.register('magiclink-settings', _components_SettingsComponent__WEBPACK_IMPORTED_MODULE_1__["default"]); - Statamic.$components.register('magiclink-send-link', _components_SendMagicLinkComponent__WEBPACK_IMPORTED_MODULE_0__["default"]); -}); - -/***/ }), - -/***/ "./resources/js/components/SendMagicLinkComponent.vue": -/*!************************************************************!*\ - !*** ./resources/js/components/SendMagicLinkComponent.vue ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _SendMagicLinkComponent_vue_vue_type_template_id_56987049___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SendMagicLinkComponent.vue?vue&type=template&id=56987049& */ "./resources/js/components/SendMagicLinkComponent.vue?vue&type=template&id=56987049&"); -/* harmony import */ var _SendMagicLinkComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SendMagicLinkComponent.vue?vue&type=script&lang=js& */ "./resources/js/components/SendMagicLinkComponent.vue?vue&type=script&lang=js&"); -/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); - - - - - -/* normalize component */ - -var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])( - _SendMagicLinkComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], - _SendMagicLinkComponent_vue_vue_type_template_id_56987049___WEBPACK_IMPORTED_MODULE_0__["render"], - _SendMagicLinkComponent_vue_vue_type_template_id_56987049___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"], - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var api; } -component.options.__file = "resources/js/components/SendMagicLinkComponent.vue" -/* harmony default export */ __webpack_exports__["default"] = (component.exports); - -/***/ }), - -/***/ "./resources/js/components/SendMagicLinkComponent.vue?vue&type=script&lang=js&": -/*!*************************************************************************************!*\ - !*** ./resources/js/components/SendMagicLinkComponent.vue?vue&type=script&lang=js& ***! - \*************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SendMagicLinkComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib??ref--4-0!../../../node_modules/vue-loader/lib??vue-loader-options!./SendMagicLinkComponent.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SendMagicLinkComponent.vue?vue&type=script&lang=js&"); -/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SendMagicLinkComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); - -/***/ }), - -/***/ "./resources/js/components/SendMagicLinkComponent.vue?vue&type=template&id=56987049&": -/*!*******************************************************************************************!*\ - !*** ./resources/js/components/SendMagicLinkComponent.vue?vue&type=template&id=56987049& ***! - \*******************************************************************************************/ -/*! exports provided: render, staticRenderFns */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SendMagicLinkComponent_vue_vue_type_template_id_56987049___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib??vue-loader-options!./SendMagicLinkComponent.vue?vue&type=template&id=56987049& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SendMagicLinkComponent.vue?vue&type=template&id=56987049&"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SendMagicLinkComponent_vue_vue_type_template_id_56987049___WEBPACK_IMPORTED_MODULE_0__["render"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SendMagicLinkComponent_vue_vue_type_template_id_56987049___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; }); - - - -/***/ }), - -/***/ "./resources/js/components/SettingsComponent.vue": -/*!*******************************************************!*\ - !*** ./resources/js/components/SettingsComponent.vue ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _SettingsComponent_vue_vue_type_template_id_67fba83f___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SettingsComponent.vue?vue&type=template&id=67fba83f& */ "./resources/js/components/SettingsComponent.vue?vue&type=template&id=67fba83f&"); -/* harmony import */ var _SettingsComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SettingsComponent.vue?vue&type=script&lang=js& */ "./resources/js/components/SettingsComponent.vue?vue&type=script&lang=js&"); -/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); - - - - - -/* normalize component */ - -var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])( - _SettingsComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], - _SettingsComponent_vue_vue_type_template_id_67fba83f___WEBPACK_IMPORTED_MODULE_0__["render"], - _SettingsComponent_vue_vue_type_template_id_67fba83f___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"], - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var api; } -component.options.__file = "resources/js/components/SettingsComponent.vue" -/* harmony default export */ __webpack_exports__["default"] = (component.exports); - -/***/ }), - -/***/ "./resources/js/components/SettingsComponent.vue?vue&type=script&lang=js&": -/*!********************************************************************************!*\ - !*** ./resources/js/components/SettingsComponent.vue?vue&type=script&lang=js& ***! - \********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SettingsComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib??ref--4-0!../../../node_modules/vue-loader/lib??vue-loader-options!./SettingsComponent.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SettingsComponent.vue?vue&type=script&lang=js&"); -/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SettingsComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); - -/***/ }), - -/***/ "./resources/js/components/SettingsComponent.vue?vue&type=template&id=67fba83f&": -/*!**************************************************************************************!*\ - !*** ./resources/js/components/SettingsComponent.vue?vue&type=template&id=67fba83f& ***! - \**************************************************************************************/ -/*! exports provided: render, staticRenderFns */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SettingsComponent_vue_vue_type_template_id_67fba83f___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib??vue-loader-options!./SettingsComponent.vue?vue&type=template&id=67fba83f& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/SettingsComponent.vue?vue&type=template&id=67fba83f&"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SettingsComponent_vue_vue_type_template_id_67fba83f___WEBPACK_IMPORTED_MODULE_0__["render"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SettingsComponent_vue_vue_type_template_id_67fba83f___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; }); - - - -/***/ }), - -/***/ 0: -/*!**************************************************************************!*\ - !*** multi ./resources/js/app.js ./resources/css/statamic-magiclink.css ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(/*! /Users/holger/code/statamic-magiclink/resources/js/app.js */"./resources/js/app.js"); -module.exports = __webpack_require__(/*! /Users/holger/code/statamic-magiclink/resources/css/statamic-magiclink.css */"./resources/css/statamic-magiclink.css"); - - -/***/ }) - -/******/ }); \ No newline at end of file +!function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=0)}([function(e,t,r){r(1),e.exports=r(2)},function(e,t,r){"use strict";r.r(t);function i(e,t,r,i,n,s,o,a){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=r,c._compiled=!0),i&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=l):n&&(l=a?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}var n=i({props:{action:String,method:{type:String,required:!0}},data:function(){return{error:null,errors:{},email:""}},computed:{hasErrors:function(){return this.error||Object.keys(this.errors).length},payload:function(){return{email:this.email}}},methods:{clearErrors:function(){this.error=null,this.errors={}},send:function(){var e=this;this.clearErrors(),this.$axios[this.method](this.action,this.payload).then((function(e){window.location=e.data.redirect})).catch((function(t){if(t.response&&422===t.response.status){var r=t.response.data,i=r.message,n=r.errors;e.error=i,e.errors=n,e.$toast.error(i)}else e.$toast.error(__("magiclink::web.unable_to_send"))}))}}},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("publish-fields-container",{staticClass:"p-0"},[r("form-group",{staticClass:"p-0",attrs:{handle:"email",display:e.__("magiclink::web.email_address"),errors:e.errors.email,focus:!0},model:{value:e.email,callback:function(t){e.email=t},expression:"email"}})],1),e._v(" "),r("div",{staticClass:"py-2 flex justify-between"},[r("button",{staticClass:"btn-primary w-full",attrs:{type:"submit"},on:{click:e.send}},[e._v(e._s(e.__("magiclink::web.login_magic_link")))])])],1)}),[],!1,null,null,null).exports,s=i({props:{action:String,initialExpireTime:{type:Number,required:!0},initialIsEnabled:{type:Boolean,required:!0},indexUrl:{type:String,required:!0},method:{type:String,required:!0}},data:function(){return{error:null,errors:{},isEnabled:this.initialIsEnabled,expireTime:this.initialExpireTime}},computed:{hasErrors:function(){return this.error||Object.keys(this.errors).length},payload:function(){return{isEnabled:this.isEnabled,expireTime:this.expireTime}}},methods:{clearErrors:function(){this.error=null,this.errors={}},save:function(){var e=this;this.clearErrors(),this.$axios[this.method](this.action,this.payload).then((function(e){window.location=e.data.redirect})).catch((function(t){if(t.response&&422===t.response.status){var r=t.response.data,i=r.message,n=r.errors;e.error=i,e.errors=n,e.$toast.error(i)}else e.$toast.error(__("magiclink::cp.unable_to_save"))}))}},mounted:function(){var e=this;this.$keys.bindGlobal(["mod+s"],(function(t){t.preventDefault(),e.save()}))}},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("publish-fields-container",{staticClass:"card p-0 mb-3 configure-section"},[r("form-group",{staticClass:"toggle-fieldtype",attrs:{fieldtype:"toggle",handle:"isEnabled",display:e.__("magiclink::cp.settings.ml_enabled"),instructions:e.__("magiclink::cp.settings.ml_enabled_instructions")},model:{value:e.isEnabled,callback:function(t){e.isEnabled=t},expression:"isEnabled"}}),e._v(" "),r("form-group",{staticClass:"border-b",attrs:{handle:"expireTime",display:e.__("magiclink::cp.settings.ml_expire_time"),errors:e.errors.expireTime,instructions:e.__("magiclink::cp.settings.ml_expire_time_instructions")},model:{value:e.expireTime,callback:function(t){e.expireTime=t},expression:"expireTime"}})],1),e._v(" "),r("div",{staticClass:"py-2 mt-3 border-t flex justify-between"},[r("a",{staticClass:"btn",attrs:{href:e.indexUrl},domProps:{textContent:e._s(e.__("Cancel"))}}),e._v(" "),r("button",{staticClass:"btn-primary",attrs:{type:"submit"},on:{click:e.save}},[e._v(e._s(e.__("Save")))])])],1)}),[],!1,null,null,null).exports;Statamic.booting((function(){Statamic.$components.register("magiclink-settings",s),Statamic.$components.register("magiclink-send-link",n)}))},function(e,t){}]); \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index 711e17d..e69de29 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,5 +0,0 @@ -module.exports = { - plugins: [ - require('@tailwindcss/custom-forms'), - ] -}