From aaceb44ef9dd248624b422deab00fd4e85386f76 Mon Sep 17 00:00:00 2001 From: "D.Thomas" Date: Tue, 7 Jul 2020 10:21:22 +0200 Subject: [PATCH] fix #5 --- dist/js/tool.js | 1032 +++++++++++----------- dist/mix-manifest.json | 2 +- resources/js/components/DefaultField.vue | 13 +- resources/js/components/PanelItem.vue | 14 +- 4 files changed, 528 insertions(+), 533 deletions(-) diff --git a/dist/js/tool.js b/dist/js/tool.js index c8c49a1..c530efb 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -65,335 +65,7 @@ /************************************************************************/ /******/ ({ -/***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/components/DefaultField.vue": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_laravel_nova__ = __webpack_require__("./node_modules/laravel-nova/dist/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_laravel_nova___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_laravel_nova__); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - - - -/* harmony default export */ __webpack_exports__["default"] = ({ - mixins: [__WEBPACK_IMPORTED_MODULE_0_laravel_nova__["HandlesValidationErrors"]], - - props: { - field: { type: Object, required: true }, - fieldName: { type: String }, - showHelpText: { type: Boolean, default: true }, - showErrors: { type: Boolean, default: true }, - fullWidthContent: { type: Boolean, default: false } - }, - - mounted: function mounted() { - // If field has a size, this allows to use flex on card - if (this.hasSize) { - this.$parent.$parent.$el.classList.add('flex-wrap'); - this.$parent.$parent.$el.classList.add('flex'); - if (document.getElementsByClassName('relationship-tabs-panel')) { - console.log(document.getElementsByClassName('relationship-tabs-panel')); - this.$parent.$el.classList.add('flex'); - this.$parent.$parent.$parent.$parent.$el.classList.add('flex'); - } else { - console.log('t'); - } - } else { - console.log('h'); - } - - if (this.getRemoveBottomBorder === true) { - this.$el.children[0].classList.add('remove-bottom-border'); - } else if (this.getRemoveBottomBorder === false) { - this.$el.children[0].classList.remove('remove-bottom-border'); - } - }, - - - computed: { - /** - * Return the label that should be used for the field. - */ - fieldLabel: function fieldLabel() { - // If the field name is purposefully an empty string, then let's show it as such - if (this.fieldName === '') { - return ''; - } - - return this.fieldName || this.field.name || this.field.singularLabel; - }, - - - /** - * Return the classes that should be used for the field content. - */ - fieldClasses: function fieldClasses() { - return this.fullWidthContent ? this.field.stacked ? 'w-full' : 'w-4/5' : this.hasSize ? 'w-full' : 'w-1/2'; - }, - - - /** - * Return the size that should be used for the field container. - */ - elementSize: function elementSize() { - return this.field.size || 'w-full'; - }, - - - /** - * Return if the field has a size - */ - hasSize: function hasSize() { - return this.field.size !== undefined; - }, - - - /** - * Return if we must to remove or not the bottom border field - */ - getRemoveBottomBorder: function getRemoveBottomBorder() { - return this.field.removeBottomBorder || null; - } - } -}); - -/***/ }), - -/***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/components/Detail/HeadingField.vue": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: ['resource', 'resourceName', 'resourceId', 'field'], - - mounted: function mounted() { - this.$el.classList.add('w-full'); - }, - - - computed: { - fieldValue: function fieldValue() { - if (this.field.value === '' || this.field.value === null || this.field.value === undefined) { - return false; - } - - return String(this.field.value); - }, - shouldDisplayAsHtml: function shouldDisplayAsHtml() { - return this.field.asHtml; - } - } -}); - -/***/ }), - -/***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/components/Form/HeadingField.vue": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: { - resourceName: { - type: String, - require: true - }, - field: { - type: Object, - require: true - } - }, - - created: function created() { - this.field.fill = function () {}; - }, - mounted: function mounted() { - this.$el.classList.add('w-full'); - }, - - - computed: { - classes: function classes() { - return ['bg-20', 'remove-last-margin-bottom', 'leading-normal', 'w-full', 'py-4', 'px-8']; - }, - - shouldDisplayAsHtml: function shouldDisplayAsHtml() { - return this.field.asHtml || false; - } - } -}); - -/***/ }), - -/***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/components/PanelItem.vue": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: { - field: { - type: Object, - required: true - }, - fieldName: { - type: String, - default: '' - } - }, - mounted: function mounted() { - // If field has a size, this allows to use flex on card - if (this.hasSize) { - this.$parent.$parent.$el.classList.add('flex-wrap'); - this.$parent.$parent.$el.classList.add('flex'); - if (document.getElementsByClassName('relationship-tabs-panel')) { - console.log(document.getElementsByClassName('relationship-tabs-panel')); - console.log(this.$parent.$parent.$el); - document.getElementsByClassName('relationship-tabs-panel').item(0).classList.add('w-full'); - this.$parent.$el.parentElement.classList.add('flex'); - } else { - console.log('t'); - } - } else { - console.log('h'); - } - if (this.getRemoveBottomBorder === true) { - this.$el.children[0].classList.add('remove-bottom-border'); - } else if (this.getRemoveBottomBorder === false) { - this.$el.children[0].classList.remove('remove-bottom-border'); - } - }, - - computed: { - label: function label() { - return this.fieldName || this.field.name; - }, - fieldValue: function fieldValue() { - if (this.field.value === '' || this.field.value === null || this.field.value === undefined) { - return false; - } - - return String(this.field.value); - }, - shouldDisplayAsHtml: function shouldDisplayAsHtml() { - return this.field.asHtml; - }, - fieldClasses: function fieldClasses() { - return this.fullWidthContent ? this.field.stacked ? 'w-full' : 'w-4/5' : this.hasSize ? 'w-full' : 'w-3/4'; - }, - - - /** - * Return the size that should be used for the field container. - */ - elementSize: function elementSize() { - return this.field.size || 'w-full'; - }, - - - /** - * Return if the field has a size - */ - hasSize: function hasSize() { - return this.field.size !== undefined; - }, - getRemoveBottomBorder: function getRemoveBottomBorder() { - return this.field.removeBottomBorder || null; - } - } -}); - -/***/ }), - -/***/ "./node_modules/laravel-nova/dist/index.js": +/***/ "../../node_modules/laravel-nova/dist/index.js": /***/ (function(module, exports, __webpack_require__) { (function webpackUniversalModuleDefinition(root, factory) { @@ -27554,248 +27226,574 @@ if (hadRuntime) { return iteratorMethod.call(iterable); } - if (typeof iterable.next === "function") { - return iterable; + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } } + }, - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); } + return thrown; + } + } - next.value = undefined; - next.done = true; + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, - return next; - }; + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; - return next.next = next; + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; } + + return ContinueSentinel; } + }; +})( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function() { return this })() || Function("return this")() +); - // Return an iterator with no values. - return { next: doneResult }; - } - runtime.values = values; - function doneResult() { - return { value: undefined, done: true }; - } +/***/ }) +/******/ ]); +}); - Context.prototype = { - constructor: Context, +/***/ }), - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; +/***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/components/DefaultField.vue": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - this.method = "next"; - this.arg = undefined; +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_laravel_nova__ = __webpack_require__("../../node_modules/laravel-nova/dist/index.js"); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_laravel_nova___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_laravel_nova__); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// - this.tryEntries.forEach(resetTryEntry); - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined; - } + +/* harmony default export */ __webpack_exports__["default"] = ({ + mixins: [__WEBPACK_IMPORTED_MODULE_0_laravel_nova__["HandlesValidationErrors"]], + + props: { + field: { type: Object, required: true }, + fieldName: { type: String }, + showHelpText: { type: Boolean, default: true }, + showErrors: { type: Boolean, default: true }, + fullWidthContent: { type: Boolean, default: false } + }, + + mounted: function mounted() { + // If field has a size, this allows to use flex on card + if (this.hasSize) { + this.$parent.$parent.$el.classList.add('flex-wrap'); + this.$parent.$parent.$el.classList.add('flex'); + // Use for eminiarts/nova-tabs package + if (document.getElementsByClassName('relationship-tabs-panel')) { + var tabs = document.getElementsByClassName('relationship-tabs-panel'); + for (var i = 0; i < tabs.length; i++) { + tabs.item(i).className += " w-full"; + } + this.$parent.$el.parentElement.classList.add('flex'); + } + } + + if (this.getRemoveBottomBorder === true) { + this.$el.children[0].classList.add('remove-bottom-border'); + } else if (this.getRemoveBottomBorder === false) { + this.$el.children[0].classList.remove('remove-bottom-border'); } - } }, - stop: function() { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } + computed: { + /** + * Return the label that should be used for the field. + */ + fieldLabel: function fieldLabel() { + // If the field name is purposefully an empty string, then let's show it as such + if (this.fieldName === '') { + return ''; + } - return this.rval; - }, + return this.fieldName || this.field.name || this.field.singularLabel; + }, - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; + /** + * Return the classes that should be used for the field content. + */ + fieldClasses: function fieldClasses() { + return this.fullWidthContent ? this.field.stacked ? 'w-full' : 'w-4/5' : this.hasSize ? 'w-full' : 'w-1/2'; + }, - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } - return !! caught; - } + /** + * Return the size that should be used for the field container. + */ + elementSize: function elementSize() { + return this.field.size || 'w-full'; + }, - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); + /** + * Return if the field has a size + */ + hasSize: function hasSize() { + return this.field.size !== undefined; + }, + + + /** + * Return if we must to remove or not the bottom border field + */ + getRemoveBottomBorder: function getRemoveBottomBorder() { + return this.field.removeBottomBorder || null; } + } +}); - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/components/Detail/HeadingField.vue": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } +/* harmony default export */ __webpack_exports__["default"] = ({ + props: ['resource', 'resourceName', 'resourceId', 'field'], - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } + mounted: function mounted() { + this.$el.classList.add('w-full'); + }, - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error("try statement without catch or finally"); - } - } + computed: { + fieldValue: function fieldValue() { + if (this.field.value === '' || this.field.value === null || this.field.value === undefined) { + return false; } - }, - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } + return String(this.field.value); + }, + shouldDisplayAsHtml: function shouldDisplayAsHtml() { + return this.field.asHtml; + } + } +}); - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } +/***/ }), - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; +/***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/components/Form/HeadingField.vue": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +// +// +// +// +// +// +// +// - return this.complete(record); +/* harmony default export */ __webpack_exports__["default"] = ({ + props: { + resourceName: { + type: String, + require: true }, + field: { + type: Object, + require: true + } + }, - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } + created: function created() { + this.field.fill = function () {}; + }, + mounted: function mounted() { + this.$el.classList.add('w-full'); + }, - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - return ContinueSentinel; + computed: { + classes: function classes() { + return ['bg-20', 'remove-last-margin-bottom', 'leading-normal', 'w-full', 'py-4', 'px-8']; }, - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; + shouldDisplayAsHtml: function shouldDisplayAsHtml() { + return this.field.asHtml || false; + } + } +}); + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]],\"plugins\":[\"transform-object-rest-spread\",[\"transform-runtime\",{\"polyfill\":false,\"helpers\":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/components/PanelItem.vue": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + props: { + field: { + type: Object, + required: true + }, + fieldName: { + type: String, + default: '' } - } }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; + mounted: function mounted() { + // If field has a size, this allows to use flex on card + if (this.hasSize) { + this.$parent.$parent.$el.classList.add('flex-wrap'); + this.$parent.$parent.$el.classList.add('flex'); + // Use for eminiarts/nova-tabs package + if (document.getElementsByClassName('relationship-tabs-panel')) { + var tabs = document.getElementsByClassName('relationship-tabs-panel'); + for (var i = 0; i < tabs.length; i++) { + tabs.item(i).className += " w-full"; + } + this.$parent.$el.parentElement.classList.add('flex'); + } } - } - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); + if (this.getRemoveBottomBorder === true) { + this.$el.children[0].classList.add('remove-bottom-border'); + } else if (this.getRemoveBottomBorder === false) { + this.$el.children[0].classList.remove('remove-bottom-border'); + } }, - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; + computed: { + label: function label() { + return this.fieldName || this.field.name; + }, + fieldValue: function fieldValue() { + if (this.field.value === '' || this.field.value === null || this.field.value === undefined) { + return false; + } - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } + return String(this.field.value); + }, + shouldDisplayAsHtml: function shouldDisplayAsHtml() { + return this.field.asHtml; + }, + fieldClasses: function fieldClasses() { + return this.fullWidthContent ? this.field.stacked ? 'w-full' : 'w-4/5' : this.hasSize ? 'w-full' : 'w-3/4'; + }, - return ContinueSentinel; - } - }; -})( - // In sloppy mode, unbound `this` refers to the global object, fallback to - // Function constructor if we're in global strict mode. That is sadly a form - // of indirect eval which violates Content Security Policy. - (function() { return this })() || Function("return this")() -); + + /** + * Return the size that should be used for the field container. + */ + elementSize: function elementSize() { + return this.field.size || 'w-full'; + }, -/***/ }) -/******/ ]); + /** + * Return if the field has a size + */ + hasSize: function hasSize() { + return this.field.size !== undefined; + }, + getRemoveBottomBorder: function getRemoveBottomBorder() { + return this.field.removeBottomBorder || null; + } + } }); /***/ }), diff --git a/dist/mix-manifest.json b/dist/mix-manifest.json index 0c9c123..30c8f79 100644 --- a/dist/mix-manifest.json +++ b/dist/mix-manifest.json @@ -1,4 +1,4 @@ { - "/js/tool.js": "/js/tool.js?id=30a9915bef925fb659fa", + "/js/tool.js": "/js/tool.js?id=9b5a432a3ff88b000809", "/css/tool.css": "/css/tool.css?id=d41d8cd98f00b204e980" } \ No newline at end of file diff --git a/resources/js/components/DefaultField.vue b/resources/js/components/DefaultField.vue index 264ab2c..06b13bd 100644 --- a/resources/js/components/DefaultField.vue +++ b/resources/js/components/DefaultField.vue @@ -52,15 +52,14 @@ if(this.hasSize) { this.$parent.$parent.$el.classList.add('flex-wrap') this.$parent.$parent.$el.classList.add('flex') + // Use for eminiarts/nova-tabs package if(document.getElementsByClassName('relationship-tabs-panel')){ - console.log(document.getElementsByClassName('relationship-tabs-panel')) - this.$parent.$el.classList.add('flex') - this.$parent.$parent.$parent.$parent.$el.classList.add('flex') - }else{ - console.log('t'); + var tabs = document.getElementsByClassName('relationship-tabs-panel') + for(var i = 0; i < tabs.length; i++) { + tabs.item(i).className += " w-full" + } + this.$parent.$el.parentElement.classList.add('flex') } - }else{ - console.log('h'); } if(this.getRemoveBottomBorder === true){ diff --git a/resources/js/components/PanelItem.vue b/resources/js/components/PanelItem.vue index 7c6cfae..d4eb143 100644 --- a/resources/js/components/PanelItem.vue +++ b/resources/js/components/PanelItem.vue @@ -39,18 +39,16 @@ if (this.hasSize) { this.$parent.$parent.$el.classList.add('flex-wrap') this.$parent.$parent.$el.classList.add('flex') + // Use for eminiarts/nova-tabs package if(document.getElementsByClassName('relationship-tabs-panel')){ - console.log(document.getElementsByClassName('relationship-tabs-panel')) - console.log(this.$parent.$parent.$el) - document.getElementsByClassName('relationship-tabs-panel') - .item(0).classList.add('w-full') + var tabs = document.getElementsByClassName('relationship-tabs-panel') + for(var i = 0; i < tabs.length; i++) { + tabs.item(i).className += " w-full" + } this.$parent.$el.parentElement.classList.add('flex') - }else{ - console.log('t'); } - }else{ - console.log('h'); } + if(this.getRemoveBottomBorder === true){ this.$el.children[0].classList.add('remove-bottom-border') } else if(this.getRemoveBottomBorder === false){