From 4f1c039869bb2ee6ed501d15d20e1e2f19afc9fe Mon Sep 17 00:00:00 2001 From: Gianluca Date: Wed, 4 Dec 2019 14:13:26 +0100 Subject: [PATCH] v0.1 --- dist/js/field.js | 13452 +-------------------------------------------- 1 file changed, 1 insertion(+), 13451 deletions(-) diff --git a/dist/js/field.js b/dist/js/field.js index 967f6c2..db593a5 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,13451 +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, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // 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 = 1); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -/* globals __VUE_SSR_CONTEXT__ */ - -// IMPORTANT: Do NOT use ES2015 features in this file. -// This module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle. - -module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - functionalTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ -) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - options._compiled = true - } - - // functional template - if (functionalTemplate) { - options.functional = true - } - - // scopedId - if (scopeId) { - options._scopeId = 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 = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // for template-only hot-reload because in that case the render fn doesn't - // go through the normalizer - options._injectStyles = hook - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } -} - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(2); -module.exports = __webpack_require__(17); - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -Nova.booting(function (Vue, router, store) { - Vue.component('index-nova-gmaps-wkt', __webpack_require__(3)); - Vue.component('detail-nova-gmaps-wkt', __webpack_require__(6)); - Vue.component('form-nova-gmaps-wkt', __webpack_require__(9)); -}); - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(4) -/* template */ -var __vue_template__ = __webpack_require__(5) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "resources/js/components/IndexField.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-9e63f81a", Component.options) - } else { - hotAPI.reload("data-v-9e63f81a", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 4 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: ['resourceName', 'field'] -}); - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("span") -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-9e63f81a", module.exports) - } -} - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(7) -/* template */ -var __vue_template__ = __webpack_require__(8) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "resources/js/components/DetailField.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-0224618e", Component.options) - } else { - hotAPI.reload("data-v-0224618e", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 7 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_google_maps__ = __webpack_require__(23); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_google_maps___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_google_maps__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_wicket__ = __webpack_require__(21); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_wicket___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_wicket__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_wicket_wicket_gmap3__ = __webpack_require__(24); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_wicket_wicket_gmap3___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_wicket_wicket_gmap3__); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - - - - - // not remove - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: ['resource', 'resourceName', 'resourceId', 'field'], - - data: function data() { - return { - google: undefined, - gmap: undefined, - features: [], - base64img: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAZCAYAAADXPsWXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQwIDc5LjE2MDQ1MSwgMjAxNy8wNS8wNi0wMTowODoyMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjM2RDdCMTZGMEVCQjExRUE4MDczOTczQzYyQzVBMTg5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjM2RDdCMTcwMEVCQjExRUE4MDczOTczQzYyQzVBMTg5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MzZEN0IxNkQwRUJCMTFFQTgwNzM5NzNDNjJDNUExODkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MzZEN0IxNkUwRUJCMTFFQTgwNzM5NzNDNjJDNUExODkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5VXMcaAAABZklEQVR42pyVzysFURTHr3l+RT3PUsKejSRlx8LGxl/wspBkb8nG0lJWYvHYIUmUYuOx9mxkRVGShddIkjw/Pqfu1DSdOz/eqc9tuufM9557+94Zz+gxAdvwBL/gwwlMQ6NJiB4owTv8KXzDBYy5BAbhzvGyJjYTFeiC+5QCATWYDItsZBQIkIULOYYRWIFmZYuvcG3b71TyMvcoD+uOVQ6gzxbnYdFRd2YchynqBWXlPaX2wWPoVYovrTeicajM5UXkS0m0OWzQrszVRORWSYxDf2SuCYpKbVVETrUWYR+mrIuHYQdGldobGYbgLcYLVfiJyc9KJxUox9wn8YLnyMnhH3lWbdPUF7vwHD60SkbLf8KACbUptl7O2MVWcKjhaIDjlF28QLdLXbzxkUJkPqnNpQSBc8glibTYT6Am4CtONnHb8hWRuaweKEYESnV6yaxagSvocBUl/UMWoBXW7P1S41+AAQBLg7MOrTBxVgAAAABJRU5ErkJggg==" - }; - }, - - mounted: function mounted() { - __WEBPACK_IMPORTED_MODULE_0_google_maps__["KEY"] = this.field.apiKey; - __WEBPACK_IMPORTED_MODULE_0_google_maps__["LIBRARIES"] = ['drawing']; // 'geometry', 'places', 'encoding' - var that = this; - __WEBPACK_IMPORTED_MODULE_0_google_maps__["load"](function (google) { - that.google = google; - that.gmap = new google.maps.Map(document.getElementById(that.field.mapId), { - center: new google.maps.LatLng(that.field.lat, that.field.lng), - defaults: { - icon: that.base64img, - editable: true, - strokeColor: that.field.drawStrokeColor, - fillColor: that.field.drawFillColor, - fillOpacity: that.field.drawFillOpacity - }, - disableDefaultUI: true, - mapTypeControl: false, - mapTypeId: google.maps.MapTypeId.ROADMAP, - mapTypeControlOptions: { - position: google.maps.ControlPosition.TOP_LEFT, - style: google.maps.MapTypeControlStyle.DROPDOWN_MENU - }, - panControl: false, - streetViewControl: false, - zoom: that.field.zoom, - zoomControl: true, - zoomControlOptions: { - position: google.maps.ControlPosition.LEFT_TOP, - style: google.maps.ZoomControlStyle.SMALL - } - }); - google.maps.event.addListener(that.gmap, 'tilesloaded', function () { - if (!this.loaded) { - this.loaded = true; - that.mapIt(); - } - }); - - that.gmap.drawingManager = new google.maps.drawing.DrawingManager({ - drawingControlOptions: { - position: google.maps.ControlPosition.TOP_CENTER, - drawingModes: [] - }, - markerOptions: that.gmap.defaults, - polygonOptions: that.gmap.defaults, - polylineOptions: that.gmap.defaults, - rectangleOptions: that.gmap.defaults - }); - - that.gmap.drawingManager.setMap(that.gmap); - }); - }, - - - methods: { - setInitialValue: function setInitialValue() { - this.value = this.field.value || ''; - }, - - - /** - * Fill the given FormData object with the field's internal value. - */ - fill: function fill(formData) { - formData.append(this.field.attribute, this.value || ''); - }, - - - /** - * Update the field's internal value. - */ - handleChange: function handleChange(value) { - this.value = value; - }, - mapIt: function mapIt() { - this.value = this.field.value || ''; - if (!this.value || this.value === "") return; - - var wkt = new __WEBPACK_IMPORTED_MODULE_1_wicket__["Wkt"](); - try { - // Catch any malformed WKT strings - wkt.read(this.value); - } catch (e1) { - try { - wkt.read(this.value.replace('\n', '').replace('\r', '').replace('\t', '')); - } catch (e2) { - if (e2.name === 'WKTError') { - console.error("Invalid WKT"); - return; - } - } - } - - var obj = wkt.toObject(this.gmap.defaults); - - if (__WEBPACK_IMPORTED_MODULE_1_wicket__["isArray"](obj)) { - // Distinguish multigeometries (Arrays) from objects - for (i in obj) { - if (obj.hasOwnProperty(i) && !__WEBPACK_IMPORTED_MODULE_1_wicket__["isArray"](obj[i])) { - obj[i].setMap(this.gmap); - } - } - this.features = this.features.concat(obj); - } else { - obj.setMap(this.gmap); // Add it to the map - this.features.push(obj); - } - - obj.setEditable(false); - // center to polygon - var bound = new this.google.maps.LatLngBounds(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = obj.getPath().g[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var pos = _step.value; - - var position = new this.google.maps.LatLng(pos.lat(), pos.lng()); - bound.extend(position); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - this.gmap.fitBounds(bound); - - return obj; - } - } -}); - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("div", { staticClass: "flex border-b border-40" }, [ - _c( - "div", - { staticClass: "w-1/4 py-4" }, - [ - _vm._t("default", [ - _c("h4", { staticClass: "font-normal text-80" }, [ - _vm._v( - "\n " + _vm._s(_vm.field.name) + "\n " - ) - ]) - ]) - ], - 2 - ), - _vm._v(" "), - _c("div", { staticClass: "w-3/4 py-4" }, [ - _c("div", { - staticStyle: { width: "100%" }, - style: "height: " + _vm.field.height, - attrs: { id: _vm.field.mapId } - }) - ]) - ]) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-0224618e", module.exports) - } -} - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(10) -} -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(15) -/* template */ -var __vue_template__ = __webpack_require__(16) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = injectStyle -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "resources/js/components/FormField.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-c023248a", Component.options) - } else { - hotAPI.reload("data-v-c023248a", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -// style-loader: Adds some css to the DOM by adding a