vue-laravel-crud 1.5.4 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-laravel-crud.esm.js +45 -19
- package/dist/vue-laravel-crud.min.js +4 -4
- package/dist/vue-laravel-crud.ssr.js +226 -126
- package/package.json +1 -1
- package/src/vue-laravel-crud.vue +313 -272
|
@@ -25,6 +25,27 @@
|
|
|
25
25
|
return _arr;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
function ownKeys(object, enumerableOnly) {
|
|
29
|
+
var keys = Object.keys(object);
|
|
30
|
+
if (Object.getOwnPropertySymbols) {
|
|
31
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
32
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
33
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
34
|
+
})), keys.push.apply(keys, symbols);
|
|
35
|
+
}
|
|
36
|
+
return keys;
|
|
37
|
+
}
|
|
38
|
+
function _objectSpread2(target) {
|
|
39
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
40
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
41
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
42
|
+
_defineProperty$1(target, key, source[key]);
|
|
43
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
44
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return target;
|
|
48
|
+
}
|
|
28
49
|
function _regeneratorRuntime() {
|
|
29
50
|
_regeneratorRuntime = function () {
|
|
30
51
|
return exports;
|
|
@@ -365,6 +386,20 @@ function _asyncToGenerator(fn) {
|
|
|
365
386
|
});
|
|
366
387
|
};
|
|
367
388
|
}
|
|
389
|
+
function _defineProperty$1(obj, key, value) {
|
|
390
|
+
key = _toPropertyKey(key);
|
|
391
|
+
if (key in obj) {
|
|
392
|
+
Object.defineProperty(obj, key, {
|
|
393
|
+
value: value,
|
|
394
|
+
enumerable: true,
|
|
395
|
+
configurable: true,
|
|
396
|
+
writable: true
|
|
397
|
+
});
|
|
398
|
+
} else {
|
|
399
|
+
obj[key] = value;
|
|
400
|
+
}
|
|
401
|
+
return obj;
|
|
402
|
+
}
|
|
368
403
|
function _slicedToArray(arr, i) {
|
|
369
404
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
370
405
|
}
|
|
@@ -398,6 +433,20 @@ function _nonIterableSpread$1() {
|
|
|
398
433
|
}
|
|
399
434
|
function _nonIterableRest() {
|
|
400
435
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
436
|
+
}
|
|
437
|
+
function _toPrimitive(input, hint) {
|
|
438
|
+
if (typeof input !== "object" || input === null) return input;
|
|
439
|
+
var prim = input[Symbol.toPrimitive];
|
|
440
|
+
if (prim !== undefined) {
|
|
441
|
+
var res = prim.call(input, hint || "default");
|
|
442
|
+
if (typeof res !== "object") return res;
|
|
443
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
444
|
+
}
|
|
445
|
+
return (hint === "string" ? String : Number)(input);
|
|
446
|
+
}
|
|
447
|
+
function _toPropertyKey(arg) {
|
|
448
|
+
var key = _toPrimitive(arg, "string");
|
|
449
|
+
return typeof key === "symbol" ? key : String(key);
|
|
401
450
|
}var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
402
451
|
|
|
403
452
|
function getDefaultExportFromCjs (x) {
|
|
@@ -12248,7 +12297,7 @@ var vueInfiniteLoading = {
|
|
|
12248
12297
|
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i});},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){var i=n(6);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0, n(3).default)("6223ff68",i,!0,{});},function(t,e,n){var i=n(8);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0, n(3).default)("27f0e51f",i,!0,{});},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var a=(o=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),r=i.sources.map((function(t){return "/*# sourceURL="+i.sourceRoot+t+" */"}));return [n].concat(r).concat([a]).join("\n")}var o;return [n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},a=0;a<this.length;a++){var r=this[a][0];"number"==typeof r&&(i[r]=!0);}for(a=0;a<t.length;a++){var o=t[a];"number"==typeof o[0]&&i[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o));}},e};},function(t,e,n){function i(t,e){for(var n=[],i={},a=0;a<e.length;a++){var r=e[a],o=r[0],s={id:t+":"+a,css:r[1],media:r[2],sourceMap:r[3]};i[o]?i[o].parts.push(s):n.push(i[o]={id:o,parts:[s]});}return n}n.r(e),n.d(e,"default",(function(){return f}));var a="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!a)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var r={},o=a&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,d=!1,c=function(){},u=null,p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(t,e,n,a){d=n,u=a||{};var o=i(t,e);return b(o),function(e){for(var n=[],a=0;a<o.length;a++){var s=o[a];(l=r[s.id]).refs--,n.push(l);}e?b(o=i(t,e)):o=[];for(a=0;a<n.length;a++){var l;if(0===(l=n[a]).refs){for(var d=0;d<l.parts.length;d++)l.parts[d]();delete r[l.id];}}}}function b(t){for(var e=0;e<t.length;e++){var n=t[e],i=r[n.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](n.parts[a]);for(;a<n.parts.length;a++)i.parts.push(m(n.parts[a]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length);}else {var o=[];for(a=0;a<n.parts.length;a++)o.push(m(n.parts[a]));r[n.id]={id:n.id,refs:1,parts:o};}}}function h(){var t=document.createElement("style");return t.type="text/css",o.appendChild(t),t}function m(t){var e,n,i=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(i){if(d)return c;i.parentNode.removeChild(i);}if(p){var a=l++;i=s||(s=h()),e=w.bind(null,i,a,!1),n=w.bind(null,i,a,!0);}else i=h(),e=y.bind(null,i),n=function(){i.parentNode.removeChild(i);};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i);}else n();}}var g,v=(g=[],function(t,e){return g[t]=e,g.filter(Boolean).join("\n")});function w(t,e,n,i){var a=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=v(e,a);else {var r=document.createTextNode(a),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(r,o[e]):t.appendChild(r);}}function y(t,e){var n=e.css,i=e.media,a=e.sourceMap;if(i&&t.setAttribute("media",i),u.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),a&&(n+="\n/*# sourceURL="+a.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else {for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n));}}},function(t,e){function n(e){return "function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n;},function(t,e,n){n.r(e);var i=n(0),a=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}));}(r);e.default=a.a;},function(t,e,n){(t.exports=n(2)(!1)).push([t.i,'.loading-wave-dots[data-v-46b20d22]{position:relative}.loading-wave-dots[data-v-46b20d22] .wave-item{position:absolute;top:50%;left:50%;display:inline-block;margin-top:-4px;width:8px;height:8px;border-radius:50%;-webkit-animation:loading-wave-dots-data-v-46b20d22 linear 2.8s infinite;animation:loading-wave-dots-data-v-46b20d22 linear 2.8s infinite}.loading-wave-dots[data-v-46b20d22] .wave-item:first-child{margin-left:-36px}.loading-wave-dots[data-v-46b20d22] .wave-item:nth-child(2){margin-left:-20px;-webkit-animation-delay:.14s;animation-delay:.14s}.loading-wave-dots[data-v-46b20d22] .wave-item:nth-child(3){margin-left:-4px;-webkit-animation-delay:.28s;animation-delay:.28s}.loading-wave-dots[data-v-46b20d22] .wave-item:nth-child(4){margin-left:12px;-webkit-animation-delay:.42s;animation-delay:.42s}.loading-wave-dots[data-v-46b20d22] .wave-item:last-child{margin-left:28px;-webkit-animation-delay:.56s;animation-delay:.56s}@-webkit-keyframes loading-wave-dots-data-v-46b20d22{0%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}10%{-webkit-transform:translateY(-6px);transform:translateY(-6px);background:#999}20%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}to{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}}@keyframes loading-wave-dots-data-v-46b20d22{0%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}10%{-webkit-transform:translateY(-6px);transform:translateY(-6px);background:#999}20%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}to{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}}.loading-circles[data-v-46b20d22] .circle-item{width:5px;height:5px;-webkit-animation:loading-circles-data-v-46b20d22 linear .75s infinite;animation:loading-circles-data-v-46b20d22 linear .75s infinite}.loading-circles[data-v-46b20d22] .circle-item:first-child{margin-top:-14.5px;margin-left:-2.5px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(2){margin-top:-11.26px;margin-left:6.26px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(3){margin-top:-2.5px;margin-left:9.5px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(4){margin-top:6.26px;margin-left:6.26px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(5){margin-top:9.5px;margin-left:-2.5px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(6){margin-top:6.26px;margin-left:-11.26px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(7){margin-top:-2.5px;margin-left:-14.5px}.loading-circles[data-v-46b20d22] .circle-item:last-child{margin-top:-11.26px;margin-left:-11.26px}@-webkit-keyframes loading-circles-data-v-46b20d22{0%{background:#dfdfdf}90%{background:#505050}to{background:#dfdfdf}}@keyframes loading-circles-data-v-46b20d22{0%{background:#dfdfdf}90%{background:#505050}to{background:#dfdfdf}}.loading-bubbles[data-v-46b20d22] .bubble-item{background:#666;-webkit-animation:loading-bubbles-data-v-46b20d22 linear .75s infinite;animation:loading-bubbles-data-v-46b20d22 linear .75s infinite}.loading-bubbles[data-v-46b20d22] .bubble-item:first-child{margin-top:-12.5px;margin-left:-.5px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(2){margin-top:-9.26px;margin-left:8.26px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(3){margin-top:-.5px;margin-left:11.5px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(4){margin-top:8.26px;margin-left:8.26px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(5){margin-top:11.5px;margin-left:-.5px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(6){margin-top:8.26px;margin-left:-9.26px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(7){margin-top:-.5px;margin-left:-12.5px}.loading-bubbles[data-v-46b20d22] .bubble-item:last-child{margin-top:-9.26px;margin-left:-9.26px}@-webkit-keyframes loading-bubbles-data-v-46b20d22{0%{width:1px;height:1px;box-shadow:0 0 0 3px #666}90%{width:1px;height:1px;box-shadow:0 0 0 0 #666}to{width:1px;height:1px;box-shadow:0 0 0 3px #666}}@keyframes loading-bubbles-data-v-46b20d22{0%{width:1px;height:1px;box-shadow:0 0 0 3px #666}90%{width:1px;height:1px;box-shadow:0 0 0 0 #666}to{width:1px;height:1px;box-shadow:0 0 0 3px #666}}.loading-default[data-v-46b20d22]{position:relative;border:1px solid #999;-webkit-animation:loading-rotating-data-v-46b20d22 ease 1.5s infinite;animation:loading-rotating-data-v-46b20d22 ease 1.5s infinite}.loading-default[data-v-46b20d22]:before{content:"";position:absolute;display:block;top:0;left:50%;margin-top:-3px;margin-left:-3px;width:6px;height:6px;background-color:#999;border-radius:50%}.loading-spiral[data-v-46b20d22]{border:2px solid #777;border-right-color:transparent;-webkit-animation:loading-rotating-data-v-46b20d22 linear .85s infinite;animation:loading-rotating-data-v-46b20d22 linear .85s infinite}@-webkit-keyframes loading-rotating-data-v-46b20d22{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loading-rotating-data-v-46b20d22{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loading-bubbles[data-v-46b20d22],.loading-circles[data-v-46b20d22]{position:relative}.loading-bubbles[data-v-46b20d22] .bubble-item,.loading-circles[data-v-46b20d22] .circle-item{position:absolute;top:50%;left:50%;display:inline-block;border-radius:50%}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(2),.loading-circles[data-v-46b20d22] .circle-item:nth-child(2){-webkit-animation-delay:93ms;animation-delay:93ms}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(3),.loading-circles[data-v-46b20d22] .circle-item:nth-child(3){-webkit-animation-delay:.186s;animation-delay:.186s}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(4),.loading-circles[data-v-46b20d22] .circle-item:nth-child(4){-webkit-animation-delay:.279s;animation-delay:.279s}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(5),.loading-circles[data-v-46b20d22] .circle-item:nth-child(5){-webkit-animation-delay:.372s;animation-delay:.372s}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(6),.loading-circles[data-v-46b20d22] .circle-item:nth-child(6){-webkit-animation-delay:.465s;animation-delay:.465s}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(7),.loading-circles[data-v-46b20d22] .circle-item:nth-child(7){-webkit-animation-delay:.558s;animation-delay:.558s}.loading-bubbles[data-v-46b20d22] .bubble-item:last-child,.loading-circles[data-v-46b20d22] .circle-item:last-child{-webkit-animation-delay:.651s;animation-delay:.651s}',""]);},function(t,e,n){n.r(e);var i=n(1),a=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}));}(r);e.default=a.a;},function(t,e,n){(t.exports=n(2)(!1)).push([t.i,".infinite-loading-container[data-v-644ea9c9]{clear:both;text-align:center}.infinite-loading-container[data-v-644ea9c9] [class^=loading-]{display:inline-block;margin:5px 0;width:28px;height:28px;font-size:28px;line-height:28px;border-radius:50%}.btn-try-infinite[data-v-644ea9c9]{margin-top:5px;padding:5px 10px;color:#999;font-size:14px;line-height:1;background:transparent;border:1px solid #ccc;border-radius:3px;outline:none;cursor:pointer}.btn-try-infinite[data-v-644ea9c9]:not(:active):hover{opacity:.8}",""]);},function(t,e,n){n.r(e);var i={throttleLimit:50,loopCheckTimeout:1e3,loopCheckMaxCalls:10},a=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){return t={passive:!0},!0}});window.addEventListener("testpassive",e,e),window.remove("testpassive",e,e);}catch(t){}return t}(),r={STATE_CHANGER:["emit `loaded` and `complete` event through component instance of `$refs` may cause error, so it will be deprecated soon, please use the `$state` argument instead (`$state` just the special `$event` variable):","\ntemplate:",'<infinite-loading @infinite="infiniteHandler"></infinite-loading>',"\nscript:\n...\ninfiniteHandler($state) {\n ajax('https://www.example.com/api/news')\n .then((res) => {\n if (res.data.length) {\n $state.loaded();\n } else {\n $state.complete();\n }\n });\n}\n...","","more details: https://github.com/PeachScript/vue-infinite-loading/issues/57#issuecomment-324370549"].join("\n"),INFINITE_EVENT:"`:on-infinite` property will be deprecated soon, please use `@infinite` event instead.",IDENTIFIER:"the `reset` event will be deprecated soon, please reset this component by change the `identifier` property."},o={INFINITE_LOOP:["executed the callback function more than ".concat(i.loopCheckMaxCalls," times for a short time, it looks like searched a wrong scroll wrapper that doest not has fixed height or maximum height, please check it. If you want to force to set a element as scroll wrapper ranther than automatic searching, you can do this:"),'\n\x3c!-- add a special attribute for the real scroll wrapper --\x3e\n<div infinite-wrapper>\n ...\n \x3c!-- set force-use-infinite-wrapper --\x3e\n <infinite-loading force-use-infinite-wrapper></infinite-loading>\n</div>\nor\n<div class="infinite-wrapper">\n ...\n \x3c!-- set force-use-infinite-wrapper as css selector of the real scroll wrapper --\x3e\n <infinite-loading force-use-infinite-wrapper=".infinite-wrapper"></infinite-loading>\n</div>\n ',"more details: https://github.com/PeachScript/vue-infinite-loading/issues/55#issuecomment-316934169"].join("\n")},s={READY:0,LOADING:1,COMPLETE:2,ERROR:3},l={color:"#666",fontSize:"14px",padding:"10px 0"},d={mode:"development",props:{spinner:"default",distance:100,forceUseInfiniteWrapper:!1},system:i,slots:{noResults:"No results :(",noMore:"No more data :)",error:"Opps, something went wrong :(",errorBtnText:"Retry",spinner:""},WARNINGS:r,ERRORS:o,STATUS:s},c=n(4),u=n.n(c),p={BUBBLES:{render:function(t){return t("span",{attrs:{class:"loading-bubbles"}},Array.apply(Array,Array(8)).map((function(){return t("span",{attrs:{class:"bubble-item"}})})))}},CIRCLES:{render:function(t){return t("span",{attrs:{class:"loading-circles"}},Array.apply(Array,Array(8)).map((function(){return t("span",{attrs:{class:"circle-item"}})})))}},DEFAULT:{render:function(t){return t("i",{attrs:{class:"loading-default"}})}},SPIRAL:{render:function(t){return t("i",{attrs:{class:"loading-spiral"}})}},WAVEDOTS:{render:function(t){return t("span",{attrs:{class:"loading-wave-dots"}},Array.apply(Array,Array(5)).map((function(){return t("span",{attrs:{class:"wave-item"}})})))}}};function f(t,e,n,i,a,r,o,s){var l,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=n,d._compiled=!0),i&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o);},d._ssrRegister=l):a&&(l=s?function(){a.call(this,this.$root.$options.shadowRoot);}:a),l)if(d.functional){d._injectStyles=l;var c=d.render;d.render=function(t,e){return l.call(e),c(t,e)};}else {var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,l):[l];}return {exports:t,options:d}}var b=f({name:"Spinner",computed:{spinnerView:function(){return p[(this.$attrs.spinner||"").toUpperCase()]||this.spinnerInConfig},spinnerInConfig:function(){return d.slots.spinner&&"string"==typeof d.slots.spinner?{render:function(){return this._v(d.slots.spinner)}}:"object"===u()(d.slots.spinner)?d.slots.spinner:p[d.props.spinner.toUpperCase()]||p.DEFAULT}}},(function(){var t=this.$createElement;return (this._self._c||t)(this.spinnerView,{tag:"component"})}),[],!1,(function(t){var e=n(5);e.__inject__&&e.__inject__(t);}),"46b20d22",null).exports;function h(t){"production"!==d.mode&&console.warn("[Vue-infinite-loading warn]: ".concat(t));}function m(t){console.error("[Vue-infinite-loading error]: ".concat(t));}var g={timers:[],caches:[],throttle:function(t){var e=this;-1===this.caches.indexOf(t)&&(this.caches.push(t),this.timers.push(setTimeout((function(){t(),e.caches.splice(e.caches.indexOf(t),1),e.timers.shift();}),d.system.throttleLimit)));},reset:function(){this.timers.forEach((function(t){clearTimeout(t);})),this.timers.length=0,this.caches=[];}},v={isChecked:!1,timer:null,times:0,track:function(){var t=this;this.times+=1,clearTimeout(this.timer),this.timer=setTimeout((function(){t.isChecked=!0;}),d.system.loopCheckTimeout),this.times>d.system.loopCheckMaxCalls&&(m(o.INFINITE_LOOP),this.isChecked=!0);}},w={key:"_infiniteScrollHeight",getScrollElm:function(t){return t===window?document.documentElement:t},save:function(t){var e=this.getScrollElm(t);e[this.key]=e.scrollHeight;},restore:function(t){var e=this.getScrollElm(t);"number"==typeof e[this.key]&&(e.scrollTop=e.scrollHeight-e[this.key]+e.scrollTop),this.remove(e);},remove:function(t){void 0!==t[this.key]&&delete t[this.key];}};function y(t){return t.replace(/[A-Z]/g,(function(t){return "-".concat(t.toLowerCase())}))}function x(t){return t.offsetWidth+t.offsetHeight>0}var k=f({name:"InfiniteLoading",data:function(){return {scrollParent:null,scrollHandler:null,isFirstLoad:!0,status:s.READY,slots:d.slots}},components:{Spinner:b},computed:{isShowSpinner:function(){return this.status===s.LOADING},isShowError:function(){return this.status===s.ERROR},isShowNoResults:function(){return this.status===s.COMPLETE&&this.isFirstLoad},isShowNoMore:function(){return this.status===s.COMPLETE&&!this.isFirstLoad},slotStyles:function(){var t=this,e={};return Object.keys(d.slots).forEach((function(n){var i=y(n);(!t.$slots[i]&&!d.slots[n].render||t.$slots[i]&&!t.$slots[i][0].tag)&&(e[n]=l);})),e}},props:{distance:{type:Number,default:d.props.distance},spinner:String,direction:{type:String,default:"bottom"},forceUseInfiniteWrapper:{type:[Boolean,String],default:d.props.forceUseInfiniteWrapper},identifier:{default:+new Date},onInfinite:Function},watch:{identifier:function(){this.stateChanger.reset();}},mounted:function(){var t=this;this.$watch("forceUseInfiniteWrapper",(function(){t.scrollParent=t.getScrollParent();}),{immediate:!0}),this.scrollHandler=function(e){t.status===s.READY&&(e&&e.constructor===Event&&x(t.$el)?g.throttle(t.attemptLoad):t.attemptLoad());},setTimeout((function(){t.scrollHandler(),t.scrollParent.addEventListener("scroll",t.scrollHandler,a);}),1),this.$on("$InfiniteLoading:loaded",(function(e){t.isFirstLoad=!1,"top"===t.direction&&t.$nextTick((function(){w.restore(t.scrollParent);})),t.status===s.LOADING&&t.$nextTick(t.attemptLoad.bind(null,!0)),e&&e.target===t||h(r.STATE_CHANGER);})),this.$on("$InfiniteLoading:complete",(function(e){t.status=s.COMPLETE,t.$nextTick((function(){t.$forceUpdate();})),t.scrollParent.removeEventListener("scroll",t.scrollHandler,a),e&&e.target===t||h(r.STATE_CHANGER);})),this.$on("$InfiniteLoading:reset",(function(e){t.status=s.READY,t.isFirstLoad=!0,w.remove(t.scrollParent),t.scrollParent.addEventListener("scroll",t.scrollHandler,a),setTimeout((function(){g.reset(),t.scrollHandler();}),1),e&&e.target===t||h(r.IDENTIFIER);})),this.stateChanger={loaded:function(){t.$emit("$InfiniteLoading:loaded",{target:t});},complete:function(){t.$emit("$InfiniteLoading:complete",{target:t});},reset:function(){t.$emit("$InfiniteLoading:reset",{target:t});},error:function(){t.status=s.ERROR,g.reset();}},this.onInfinite&&h(r.INFINITE_EVENT);},deactivated:function(){this.status===s.LOADING&&(this.status=s.READY),this.scrollParent.removeEventListener("scroll",this.scrollHandler,a);},activated:function(){this.scrollParent.addEventListener("scroll",this.scrollHandler,a);},methods:{attemptLoad:function(t){var e=this;this.status!==s.COMPLETE&&x(this.$el)&&this.getCurrentDistance()<=this.distance?(this.status=s.LOADING,"top"===this.direction&&this.$nextTick((function(){w.save(e.scrollParent);})),"function"==typeof this.onInfinite?this.onInfinite.call(null,this.stateChanger):this.$emit("infinite",this.stateChanger),!t||this.forceUseInfiniteWrapper||v.isChecked||v.track()):this.status===s.LOADING&&(this.status=s.READY);},getCurrentDistance:function(){var t;"top"===this.direction?t="number"==typeof this.scrollParent.scrollTop?this.scrollParent.scrollTop:this.scrollParent.pageYOffset:t=this.$el.getBoundingClientRect().top-(this.scrollParent===window?window.innerHeight:this.scrollParent.getBoundingClientRect().bottom);return t},getScrollParent:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$el;return "string"==typeof this.forceUseInfiniteWrapper&&(t=document.querySelector(this.forceUseInfiniteWrapper)),t||("BODY"===e.tagName?t=window:!this.forceUseInfiniteWrapper&&["scroll","auto"].indexOf(getComputedStyle(e).overflowY)>-1?t=e:(e.hasAttribute("infinite-wrapper")||e.hasAttribute("data-infinite-wrapper"))&&(t=e)),t||this.getScrollParent(e.parentNode)}},destroyed:function(){!this.status!==s.COMPLETE&&(g.reset(),w.remove(this.scrollParent),this.scrollParent.removeEventListener("scroll",this.scrollHandler,a));}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"infinite-loading-container"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowSpinner,expression:"isShowSpinner"}],staticClass:"infinite-status-prompt",style:t.slotStyles.spinner},[t._t("spinner",[n("spinner",{attrs:{spinner:t.spinner}})])],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowNoResults,expression:"isShowNoResults"}],staticClass:"infinite-status-prompt",style:t.slotStyles.noResults},[t._t("no-results",[t.slots.noResults.render?n(t.slots.noResults,{tag:"component"}):[t._v(t._s(t.slots.noResults))]])],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowNoMore,expression:"isShowNoMore"}],staticClass:"infinite-status-prompt",style:t.slotStyles.noMore},[t._t("no-more",[t.slots.noMore.render?n(t.slots.noMore,{tag:"component"}):[t._v(t._s(t.slots.noMore))]])],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowError,expression:"isShowError"}],staticClass:"infinite-status-prompt",style:t.slotStyles.error},[t._t("error",[t.slots.error.render?n(t.slots.error,{tag:"component",attrs:{trigger:t.attemptLoad}}):[t._v("\n "+t._s(t.slots.error)+"\n "),n("br"),t._v(" "),n("button",{staticClass:"btn-try-infinite",domProps:{textContent:t._s(t.slots.errorBtnText)},on:{click:t.attemptLoad}})]],{trigger:t.attemptLoad})],2)])}),[],!1,(function(t){var e=n(7);e.__inject__&&e.__inject__(t);}),"644ea9c9",null).exports;function E(t){d.mode=t.config.productionTip?"development":"production";}Object.defineProperty(k,"install",{configurable:!1,enumerable:!1,value:function(t,e){Object.assign(d.props,e&&e.props),Object.assign(d.slots,e&&e.slots),Object.assign(d.system,e&&e.system),t.component("infinite-loading",k),E(t);}}),"undefined"!=typeof window&&window.Vue&&(window.Vue.component("infinite-loading",k),E(window.Vue));e.default=k;}])}));
|
|
12249
12298
|
} (vueInfiniteLoading));
|
|
12250
12299
|
|
|
12251
|
-
var InfiniteLoading = /*@__PURE__*/getDefaultExportFromCjs(vueInfiniteLoadingExports);var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}var css = "tr td[data-v-
|
|
12300
|
+
var InfiniteLoading = /*@__PURE__*/getDefaultExportFromCjs(vueInfiniteLoadingExports);var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}var css = "tr td[data-v-72049f4e]:last-child,\ntr td[data-v-72049f4e]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-72049f4e] {\n display: flex;\n justify-content: center; }\n\n.crud-header[data-v-72049f4e] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-72049f4e] .crud-title[data-v-72049f4e] {\n margin: 0; }\n .crud-header[data-v-72049f4e] .crud-search[data-v-72049f4e] {\n max-width: 15rem; }\n .crud-header[data-v-72049f4e] .crud-search[data-v-72049f4e] .btn[data-v-72049f4e] {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem; }\n .crud-header[data-v-72049f4e] .crud-search[data-v-72049f4e] .btn[data-v-72049f4e].open[data-v-72049f4e] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-72049f4e] .table-options[data-v-72049f4e] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-72049f4e] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-72049f4e] {\n table-layout: auto; }\n .table[data-v-72049f4e] tbody[data-v-72049f4e] td[data-v-72049f4e] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-72049f4e] tbody[data-v-72049f4e] td[data-v-72049f4e]::-webkit-scrollbar {\n display: none; } }\n";
|
|
12252
12301
|
n(css, {});function normalizeComponent (
|
|
12253
12302
|
scriptExports,
|
|
12254
12303
|
render,
|
|
@@ -12376,7 +12425,8 @@ n(css, {});function normalizeComponent (
|
|
|
12376
12425
|
MODE_CARDS: 2,
|
|
12377
12426
|
MODE_CUSTOM: 3
|
|
12378
12427
|
},
|
|
12379
|
-
infiniteScrollKey: 1
|
|
12428
|
+
infiniteScrollKey: 1,
|
|
12429
|
+
optionsLoaded: false
|
|
12380
12430
|
};
|
|
12381
12431
|
},
|
|
12382
12432
|
watch: {
|
|
@@ -12693,6 +12743,7 @@ n(css, {});function normalizeComponent (
|
|
|
12693
12743
|
this.items = this.models;
|
|
12694
12744
|
this.pagination.total = this.items.length;
|
|
12695
12745
|
}
|
|
12746
|
+
this.loadOptions();
|
|
12696
12747
|
},
|
|
12697
12748
|
computed: {
|
|
12698
12749
|
itemValue: function itemValue() {
|
|
@@ -12731,6 +12782,9 @@ n(css, {});function normalizeComponent (
|
|
|
12731
12782
|
return inf.column == prop;
|
|
12732
12783
|
});
|
|
12733
12784
|
};
|
|
12785
|
+
},
|
|
12786
|
+
columnOptions: function columnOptions() {
|
|
12787
|
+
return function (column) {};
|
|
12734
12788
|
}
|
|
12735
12789
|
},
|
|
12736
12790
|
methods: {
|
|
@@ -13181,6 +13235,9 @@ n(css, {});function normalizeComponent (
|
|
|
13181
13235
|
order: v[_this15.orderProp]
|
|
13182
13236
|
});
|
|
13183
13237
|
});
|
|
13238
|
+
if (!this.ajax) {
|
|
13239
|
+
return;
|
|
13240
|
+
}
|
|
13184
13241
|
axios.post(this.apiUrl + "/" + this.modelName + "/sort", {
|
|
13185
13242
|
order: order
|
|
13186
13243
|
}).then(function (response) {
|
|
@@ -13196,18 +13253,26 @@ n(css, {});function normalizeComponent (
|
|
|
13196
13253
|
}
|
|
13197
13254
|
},
|
|
13198
13255
|
getArrayValue: function getArrayValue(value, displayProp) {
|
|
13256
|
+
var _this16 = this;
|
|
13257
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
13199
13258
|
if (!Array.isArray(value)) return "N/A";
|
|
13259
|
+
var values = [];
|
|
13260
|
+
var valuesFinal = [];
|
|
13200
13261
|
if (value.length > 0) {
|
|
13201
13262
|
if (_typeof$1(value[0]) === "object" && displayProp) {
|
|
13202
|
-
|
|
13263
|
+
values = value.map(function (vv) {
|
|
13203
13264
|
return vv[displayProp];
|
|
13204
|
-
})
|
|
13265
|
+
});
|
|
13205
13266
|
} else {
|
|
13206
|
-
|
|
13267
|
+
values = value.join(",");
|
|
13207
13268
|
}
|
|
13208
13269
|
} else {
|
|
13209
13270
|
return "";
|
|
13210
13271
|
}
|
|
13272
|
+
values.forEach(function (val) {
|
|
13273
|
+
valuesFinal.push(_this16.getStateValue(val, options));
|
|
13274
|
+
});
|
|
13275
|
+
return values.join(",");
|
|
13211
13276
|
},
|
|
13212
13277
|
getStateValue: function getStateValue(value, options) {
|
|
13213
13278
|
if (!options) {
|
|
@@ -13227,22 +13292,22 @@ n(css, {});function normalizeComponent (
|
|
|
13227
13292
|
return ops.join(", ");
|
|
13228
13293
|
},
|
|
13229
13294
|
saveItemVuex: function saveItemVuex() {
|
|
13230
|
-
var
|
|
13295
|
+
var _this17 = this;
|
|
13231
13296
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
13232
13297
|
var jsondata, result, create;
|
|
13233
13298
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
13234
13299
|
while (1) switch (_context4.prev = _context4.next) {
|
|
13235
13300
|
case 0:
|
|
13236
|
-
console.debug("save item 1",
|
|
13237
|
-
jsondata =
|
|
13238
|
-
console.debug("save item 2",
|
|
13301
|
+
console.debug("save item 1", _this17.item);
|
|
13302
|
+
jsondata = _this17.item.$toJson();
|
|
13303
|
+
console.debug("save item 2", _this17.item, jsondata);
|
|
13239
13304
|
create = false;
|
|
13240
|
-
if (!
|
|
13305
|
+
if (!_this17.item.id) {
|
|
13241
13306
|
_context4.next = 12;
|
|
13242
13307
|
break;
|
|
13243
13308
|
}
|
|
13244
13309
|
_context4.next = 8;
|
|
13245
|
-
return
|
|
13310
|
+
return _this17.model.api().put('/' + _this17.item.id, jsondata);
|
|
13246
13311
|
case 8:
|
|
13247
13312
|
result = _context4.sent;
|
|
13248
13313
|
create = false;
|
|
@@ -13250,7 +13315,7 @@ n(css, {});function normalizeComponent (
|
|
|
13250
13315
|
break;
|
|
13251
13316
|
case 12:
|
|
13252
13317
|
_context4.next = 14;
|
|
13253
|
-
return
|
|
13318
|
+
return _this17.model.api().post('', jsondata);
|
|
13254
13319
|
case 14:
|
|
13255
13320
|
result = _context4.sent;
|
|
13256
13321
|
create = true;
|
|
@@ -13260,16 +13325,16 @@ n(css, {});function normalizeComponent (
|
|
|
13260
13325
|
_context4.next = 21;
|
|
13261
13326
|
break;
|
|
13262
13327
|
}
|
|
13263
|
-
|
|
13264
|
-
|
|
13328
|
+
_this17.toastError(result.response.data.error);
|
|
13329
|
+
_this17.loading = false;
|
|
13265
13330
|
return _context4.abrupt("return");
|
|
13266
13331
|
case 21:
|
|
13267
13332
|
result.save();
|
|
13268
|
-
if (
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
if (
|
|
13272
|
-
|
|
13333
|
+
if (_this17.refreshAfterSave) _this17.refresh();
|
|
13334
|
+
_this17.loading = false;
|
|
13335
|
+
_this17.toastSuccess("Elemento Modificado");
|
|
13336
|
+
if (_this17.hideModalAfterSave || create && _this17.hideModalAfterCreate || !create && _this17.hideModalAfterUpdate) {
|
|
13337
|
+
_this17.$bvModal.hide("modal-form-item-" + _this17.modelName);
|
|
13273
13338
|
}
|
|
13274
13339
|
case 26:
|
|
13275
13340
|
case "end":
|
|
@@ -13279,36 +13344,36 @@ n(css, {});function normalizeComponent (
|
|
|
13279
13344
|
}))();
|
|
13280
13345
|
},
|
|
13281
13346
|
saveItemLocal: function saveItemLocal() {
|
|
13282
|
-
var
|
|
13347
|
+
var _this18 = this;
|
|
13283
13348
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
13284
13349
|
var itemSave, itemIndex;
|
|
13285
13350
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
13286
13351
|
while (1) switch (_context5.prev = _context5.next) {
|
|
13287
13352
|
case 0:
|
|
13288
|
-
itemSave = JSON.parse(JSON.stringify(
|
|
13289
|
-
if (
|
|
13290
|
-
if (
|
|
13291
|
-
itemIndex =
|
|
13292
|
-
return item.id ==
|
|
13353
|
+
itemSave = JSON.parse(JSON.stringify(_this18.item));
|
|
13354
|
+
if (_this18.item.id || _this18.item.index) {
|
|
13355
|
+
if (_this18.item.id) {
|
|
13356
|
+
itemIndex = _this18.items.findIndex(function (item) {
|
|
13357
|
+
return item.id == _this18.item.id;
|
|
13293
13358
|
});
|
|
13294
13359
|
} else {
|
|
13295
|
-
itemIndex =
|
|
13296
|
-
return item.index ==
|
|
13360
|
+
itemIndex = _this18.items.findIndex(function (item) {
|
|
13361
|
+
return item.index == _this18.item.index;
|
|
13297
13362
|
});
|
|
13298
13363
|
}
|
|
13299
|
-
|
|
13300
|
-
if (
|
|
13301
|
-
|
|
13364
|
+
_this18.items[itemIndex] = itemSave;
|
|
13365
|
+
if (_this18.hideModalAfterSave || _this18.hideModalAfterUpdate) {
|
|
13366
|
+
_this18.$bvModal.hide("modal-form-item-" + _this18.modelName);
|
|
13302
13367
|
}
|
|
13303
13368
|
} else {
|
|
13304
|
-
itemSave.index =
|
|
13305
|
-
|
|
13306
|
-
if (
|
|
13307
|
-
|
|
13369
|
+
itemSave.index = _this18.items.length + 1;
|
|
13370
|
+
_this18.items.push(itemSave);
|
|
13371
|
+
if (_this18.hideModalAfterSave || _this18.hideModalAfterCreate) {
|
|
13372
|
+
_this18.$bvModal.hide("modal-form-item-" + _this18.modelName);
|
|
13308
13373
|
}
|
|
13309
13374
|
}
|
|
13310
|
-
|
|
13311
|
-
|
|
13375
|
+
_this18.toastSuccess("Elemento Modificado");
|
|
13376
|
+
_this18.loading = false;
|
|
13312
13377
|
case 5:
|
|
13313
13378
|
case "end":
|
|
13314
13379
|
return _context5.stop();
|
|
@@ -13316,142 +13381,181 @@ n(css, {});function normalizeComponent (
|
|
|
13316
13381
|
}, _callee5);
|
|
13317
13382
|
}))();
|
|
13318
13383
|
},
|
|
13319
|
-
|
|
13320
|
-
var
|
|
13321
|
-
_this18 = this;
|
|
13384
|
+
loadOptions: function loadOptions() {
|
|
13385
|
+
var _this19 = this;
|
|
13322
13386
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
13323
|
-
var
|
|
13387
|
+
var i, column, options;
|
|
13324
13388
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
13325
13389
|
while (1) switch (_context6.prev = _context6.next) {
|
|
13390
|
+
case 0:
|
|
13391
|
+
i = 0;
|
|
13392
|
+
case 1:
|
|
13393
|
+
if (!(i < _this19.columns.length)) {
|
|
13394
|
+
_context6.next = 12;
|
|
13395
|
+
break;
|
|
13396
|
+
}
|
|
13397
|
+
column = _this19.columns[i];
|
|
13398
|
+
if (!(column.options instanceof Promise)) {
|
|
13399
|
+
_context6.next = 9;
|
|
13400
|
+
break;
|
|
13401
|
+
}
|
|
13402
|
+
_context6.next = 6;
|
|
13403
|
+
return column.options;
|
|
13404
|
+
case 6:
|
|
13405
|
+
options = _context6.sent;
|
|
13406
|
+
_this19.$set(_this19.columns, i, _objectSpread2(_objectSpread2({}, column), {}, {
|
|
13407
|
+
options: options
|
|
13408
|
+
}));
|
|
13409
|
+
console.debug("Options promise", _this19.columns);
|
|
13410
|
+
case 9:
|
|
13411
|
+
i++;
|
|
13412
|
+
_context6.next = 1;
|
|
13413
|
+
break;
|
|
13414
|
+
case 12:
|
|
13415
|
+
_this19.optionsLoaded = true;
|
|
13416
|
+
case 13:
|
|
13417
|
+
case "end":
|
|
13418
|
+
return _context6.stop();
|
|
13419
|
+
}
|
|
13420
|
+
}, _callee6);
|
|
13421
|
+
}))();
|
|
13422
|
+
},
|
|
13423
|
+
saveItem: function saveItem() {
|
|
13424
|
+
var _arguments4 = arguments,
|
|
13425
|
+
_this20 = this;
|
|
13426
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
13427
|
+
var event, validation_result, validation_error_message, formData;
|
|
13428
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
13429
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
13326
13430
|
case 0:
|
|
13327
13431
|
event = _arguments4.length > 0 && _arguments4[0] !== undefined ? _arguments4[0] : null;
|
|
13328
|
-
|
|
13329
|
-
if (!
|
|
13330
|
-
|
|
13432
|
+
_this20.loading = true;
|
|
13433
|
+
if (!_this20.validate) {
|
|
13434
|
+
_context7.next = 10;
|
|
13331
13435
|
break;
|
|
13332
13436
|
}
|
|
13333
13437
|
validation_result = true;
|
|
13334
|
-
validation_error_message =
|
|
13438
|
+
validation_error_message = _this20.messageDefaultValidationError;
|
|
13335
13439
|
if (validation_result) {
|
|
13336
|
-
|
|
13440
|
+
_context7.next = 8;
|
|
13337
13441
|
break;
|
|
13338
13442
|
}
|
|
13339
|
-
|
|
13340
|
-
return
|
|
13443
|
+
_this20.toastError(validation_error_message);
|
|
13444
|
+
return _context7.abrupt("return");
|
|
13341
13445
|
case 8:
|
|
13342
|
-
|
|
13446
|
+
_context7.next = 11;
|
|
13343
13447
|
break;
|
|
13344
13448
|
case 10:
|
|
13345
13449
|
if (event) event.preventDefault();
|
|
13346
13450
|
case 11:
|
|
13347
|
-
if (!
|
|
13348
|
-
|
|
13451
|
+
if (!_this20.useVuexORM) {
|
|
13452
|
+
_context7.next = 13;
|
|
13349
13453
|
break;
|
|
13350
13454
|
}
|
|
13351
|
-
return
|
|
13455
|
+
return _context7.abrupt("return", _this20.saveItemVuex(event));
|
|
13352
13456
|
case 13:
|
|
13353
|
-
if (
|
|
13354
|
-
|
|
13457
|
+
if (_this20.ajax) {
|
|
13458
|
+
_context7.next = 15;
|
|
13355
13459
|
break;
|
|
13356
13460
|
}
|
|
13357
|
-
return
|
|
13461
|
+
return _context7.abrupt("return", _this20.saveItemLocal(event));
|
|
13358
13462
|
case 15:
|
|
13359
|
-
if (
|
|
13360
|
-
axios.put(
|
|
13361
|
-
if (
|
|
13362
|
-
|
|
13463
|
+
if (_this20.item.id) {
|
|
13464
|
+
axios.put(_this20.apiUrl + "/" + _this20.modelName + "/" + _this20.item.id, _this20.item).then(function (response) {
|
|
13465
|
+
if (_this20.hideModalAfterSave || _this20.hideModalAfterUpdate) {
|
|
13466
|
+
_this20.$bvModal.hide("modal-form-item-" + _this20.modelName);
|
|
13363
13467
|
}
|
|
13364
13468
|
var itemSv = response.data;
|
|
13365
|
-
var itemIndex =
|
|
13366
|
-
return item.id ==
|
|
13469
|
+
var itemIndex = _this20.items.findIndex(function (item) {
|
|
13470
|
+
return item.id == _this20.item.id;
|
|
13367
13471
|
});
|
|
13368
|
-
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
if (
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
item:
|
|
13472
|
+
_this20.items[itemIndex] = itemSv;
|
|
13473
|
+
_this20.item = itemSv;
|
|
13474
|
+
_this20.loading = false;
|
|
13475
|
+
if (_this20.refreshAfterSave) _this20.refresh();
|
|
13476
|
+
_this20.toastSuccess("Elemento Modificado");
|
|
13477
|
+
_this20.$emit("itemSaved", {
|
|
13478
|
+
item: _this20.item
|
|
13375
13479
|
});
|
|
13376
|
-
|
|
13377
|
-
item:
|
|
13480
|
+
_this20.$emit("itemUpdated", {
|
|
13481
|
+
item: _this20.item
|
|
13378
13482
|
});
|
|
13379
13483
|
}).catch(function (error) {
|
|
13380
|
-
|
|
13381
|
-
|
|
13484
|
+
_this20.toastError(error);
|
|
13485
|
+
_this20.loading = false;
|
|
13382
13486
|
});
|
|
13383
13487
|
} else {
|
|
13384
|
-
if (
|
|
13488
|
+
if (_this20.createMultipart) {
|
|
13385
13489
|
formData = new FormData();
|
|
13386
|
-
Object.keys(
|
|
13387
|
-
if (
|
|
13388
|
-
var files =
|
|
13490
|
+
Object.keys(_this20.item).forEach(function (key) {
|
|
13491
|
+
if (_this20.item[key][0] && _this20.item[key][0].name) {
|
|
13492
|
+
var files = _this20.item[key];
|
|
13389
13493
|
for (var x = 0; x < files.length; x++) {
|
|
13390
|
-
formData.append(key + "[]",
|
|
13494
|
+
formData.append(key + "[]", _this20.item[key][x], _this20.item[key][x].name);
|
|
13391
13495
|
}
|
|
13392
|
-
} else formData.append(key,
|
|
13496
|
+
} else formData.append(key, _this20.item[key]);
|
|
13393
13497
|
});
|
|
13394
|
-
axios.post(
|
|
13395
|
-
|
|
13396
|
-
if (
|
|
13397
|
-
|
|
13498
|
+
axios.post(_this20.apiUrl + "/" + _this20.modelName, formData).then(function (response) {
|
|
13499
|
+
_this20.loading = false;
|
|
13500
|
+
if (_this20.hideModalAfterSave || _this20.hideModalAfterCreate) {
|
|
13501
|
+
_this20.$bvModal.hide("modal-form-item-" + _this20.modelName);
|
|
13398
13502
|
}
|
|
13399
13503
|
if (response.data.success) {
|
|
13400
13504
|
if (response.data.message) {
|
|
13401
|
-
|
|
13505
|
+
_this20.toastSuccess(response.data.message);
|
|
13402
13506
|
}
|
|
13403
13507
|
return;
|
|
13404
13508
|
}
|
|
13405
13509
|
var itemSv = response.data;
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
if (
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
item:
|
|
13510
|
+
_this20.items.push(itemSv);
|
|
13511
|
+
_this20.item = itemSv;
|
|
13512
|
+
if (_this20.refreshAfterSave) _this20.refresh();
|
|
13513
|
+
_this20.toastSuccess("Elemento Creado");
|
|
13514
|
+
_this20.$emit("itemSaved", {
|
|
13515
|
+
item: _this20.item
|
|
13412
13516
|
});
|
|
13413
|
-
|
|
13414
|
-
item:
|
|
13517
|
+
_this20.$emit("itemCreated", {
|
|
13518
|
+
item: _this20.item
|
|
13415
13519
|
});
|
|
13416
13520
|
}).catch(function (error) {
|
|
13417
|
-
|
|
13418
|
-
|
|
13521
|
+
_this20.toastError(error);
|
|
13522
|
+
_this20.loading = false;
|
|
13419
13523
|
});
|
|
13420
13524
|
} else {
|
|
13421
|
-
axios.post(
|
|
13422
|
-
|
|
13423
|
-
if (
|
|
13424
|
-
|
|
13525
|
+
axios.post(_this20.apiUrl + "/" + _this20.modelName, _this20.item).then(function (response) {
|
|
13526
|
+
_this20.loading = false;
|
|
13527
|
+
if (_this20.hideModalAfterSave || _this20.hideModalAfterUpdate) {
|
|
13528
|
+
_this20.$bvModal.hide("modal-form-item-" + _this20.modelName);
|
|
13425
13529
|
}
|
|
13426
13530
|
if (response.data.success) {
|
|
13427
13531
|
if (response.data.message) {
|
|
13428
|
-
|
|
13532
|
+
_this20.toastSuccess(response.data.message);
|
|
13429
13533
|
}
|
|
13430
13534
|
return;
|
|
13431
13535
|
}
|
|
13432
13536
|
var itemSv = response.data;
|
|
13433
|
-
|
|
13434
|
-
|
|
13435
|
-
if (
|
|
13436
|
-
|
|
13437
|
-
|
|
13438
|
-
item:
|
|
13537
|
+
_this20.items.push(itemSv);
|
|
13538
|
+
_this20.item = itemSv;
|
|
13539
|
+
if (_this20.refreshAfterSave) _this20.refresh();
|
|
13540
|
+
_this20.toastSuccess("Elemento Creado");
|
|
13541
|
+
_this20.$emit("itemSaved", {
|
|
13542
|
+
item: _this20.item
|
|
13439
13543
|
});
|
|
13440
|
-
|
|
13441
|
-
item:
|
|
13544
|
+
_this20.$emit("itemCreated", {
|
|
13545
|
+
item: _this20.item
|
|
13442
13546
|
});
|
|
13443
13547
|
}).catch(function (error) {
|
|
13444
|
-
|
|
13445
|
-
|
|
13548
|
+
_this20.toastError(error);
|
|
13549
|
+
_this20.loading = false;
|
|
13446
13550
|
});
|
|
13447
13551
|
}
|
|
13448
13552
|
}
|
|
13449
13553
|
if (event) event.preventDefault();
|
|
13450
13554
|
case 17:
|
|
13451
13555
|
case "end":
|
|
13452
|
-
return
|
|
13556
|
+
return _context7.stop();
|
|
13453
13557
|
}
|
|
13454
|
-
},
|
|
13558
|
+
}, _callee7);
|
|
13455
13559
|
}))();
|
|
13456
13560
|
},
|
|
13457
13561
|
clearItems: function clearItems() {
|
|
@@ -13510,11 +13614,11 @@ n(css, {});function normalizeComponent (
|
|
|
13510
13614
|
});
|
|
13511
13615
|
},
|
|
13512
13616
|
onChangeFilter: function onChangeFilter(event) {
|
|
13513
|
-
var
|
|
13617
|
+
var _this21 = this;
|
|
13514
13618
|
this.forceRecomputeCounter++;
|
|
13515
13619
|
console.debug("Filters debug ", this.finalFilters, this.internalFilter, this.internalFilters, this.filter, this.filters);
|
|
13516
13620
|
setTimeout(function () {
|
|
13517
|
-
|
|
13621
|
+
_this21.refresh();
|
|
13518
13622
|
}, 1);
|
|
13519
13623
|
},
|
|
13520
13624
|
onPaginationChange: function onPaginationChange(page) {
|
|
@@ -13635,9 +13739,7 @@ var _sfc_render = function render() {
|
|
|
13635
13739
|
}
|
|
13636
13740
|
})], 1)])]) : column.type == 'state' ? _c('div', {
|
|
13637
13741
|
staticClass: "form-group"
|
|
13638
|
-
}, [_c('label', [_vm._v(_vm._s(column.label))]), _c('
|
|
13639
|
-
staticClass: "d-none"
|
|
13640
|
-
}, [_vm._v(_vm._s(column.options))]), _c('select', {
|
|
13742
|
+
}, [_c('label', [_vm._v(_vm._s(column.label))]), _vm.optionsLoaded ? _c('select', {
|
|
13641
13743
|
directives: [{
|
|
13642
13744
|
name: "model",
|
|
13643
13745
|
rawName: "v-model",
|
|
@@ -13669,11 +13771,9 @@ var _sfc_render = function render() {
|
|
|
13669
13771
|
"value": option.id ? option.id : option.value
|
|
13670
13772
|
}
|
|
13671
13773
|
}, [_vm._v(" " + _vm._s(option.text ? option.text : option.label ? option.label : "") + " ")]);
|
|
13672
|
-
})], 2)]) : column.type == 'array' ? _c('div', {
|
|
13774
|
+
})], 2) : _vm._e()]) : column.type == 'array' ? _c('div', {
|
|
13673
13775
|
staticClass: "form-group"
|
|
13674
|
-
}, [_c('label', [_vm._v(_vm._s(column.label))]), _c('
|
|
13675
|
-
staticClass: "d-none"
|
|
13676
|
-
}, [_vm._v(_vm._s(column.options))]), _c('select', {
|
|
13776
|
+
}, [_c('label', [_vm._v(_vm._s(column.label))]), _vm.optionsLoaded ? _c('select', {
|
|
13677
13777
|
directives: [{
|
|
13678
13778
|
name: "model",
|
|
13679
13779
|
rawName: "v-model",
|
|
@@ -13705,7 +13805,7 @@ var _sfc_render = function render() {
|
|
|
13705
13805
|
"value": option.id ? option.id : option.value
|
|
13706
13806
|
}
|
|
13707
13807
|
}, [_vm._v(" " + _vm._s(option.text ? option.text : option.label ? option.label : "") + " ")]);
|
|
13708
|
-
}) : _vm._e()], 2)]) : _c('div', {
|
|
13808
|
+
}) : _vm._e()], 2) : _vm._e()]) : _c('div', {
|
|
13709
13809
|
staticClass: "form-group"
|
|
13710
13810
|
}, [_c('label', [_vm._v(_vm._s(column.label))]), _c('input', {
|
|
13711
13811
|
directives: [{
|
|
@@ -13901,7 +14001,7 @@ var _sfc_render = function render() {
|
|
|
13901
14001
|
callback: function callback($$v) {
|
|
13902
14002
|
_vm.$set(_vm.internalFilterByProp(column.prop + '_from'), "value", $$v);
|
|
13903
14003
|
},
|
|
13904
|
-
expression: "internalFilterByProp(column.prop + '_from').value\n
|
|
14004
|
+
expression: "internalFilterByProp(column.prop + '_from').value\n "
|
|
13905
14005
|
}
|
|
13906
14006
|
})], 1), _c('div', {
|
|
13907
14007
|
staticClass: "col-6"
|
|
@@ -13918,9 +14018,9 @@ var _sfc_render = function render() {
|
|
|
13918
14018
|
callback: function callback($$v) {
|
|
13919
14019
|
_vm.$set(_vm.internalFilterByProp(column.prop + '_to'), "value", $$v);
|
|
13920
14020
|
},
|
|
13921
|
-
expression: "internalFilterByProp(column.prop + '_to').value\n
|
|
14021
|
+
expression: "internalFilterByProp(column.prop + '_to').value\n "
|
|
13922
14022
|
}
|
|
13923
|
-
})], 1)]) : column.type == 'state' ? _c('select', {
|
|
14023
|
+
})], 1)]) : column.type == 'state' && _vm.optionsLoaded ? _c('select', {
|
|
13924
14024
|
directives: [{
|
|
13925
14025
|
name: "model",
|
|
13926
14026
|
rawName: "v-model",
|
|
@@ -13955,7 +14055,7 @@ var _sfc_render = function render() {
|
|
|
13955
14055
|
"value": option.id
|
|
13956
14056
|
}
|
|
13957
14057
|
}, [_vm._v(" " + _vm._s(option.text ? option.text : option.label ? option.label : "") + " ")]);
|
|
13958
|
-
})], 2) : column.type == 'array' ? _c('select', {
|
|
14058
|
+
})], 2) : column.type == 'array' && _vm.optionsLoaded ? _c('select', {
|
|
13959
14059
|
directives: [{
|
|
13960
14060
|
name: "model",
|
|
13961
14061
|
rawName: "v-model",
|
|
@@ -14112,7 +14212,7 @@ var _sfc_render = function render() {
|
|
|
14112
14212
|
},
|
|
14113
14213
|
expression: "item.selected"
|
|
14114
14214
|
}
|
|
14115
|
-
})], 1) : column.type == 'state' ? _c('span', [_vm._v(" " + _vm._s(_vm.getStateValue(_vm.itemValue(column, item), column.options)) + " ")]) : column.type == 'array' ? _c('span', [_vm._v(" " + _vm._s(_vm.getArrayValue(_vm.itemValue(column, item), column.displayProp)) + " ")]) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, item)) + " ")])];
|
|
14215
|
+
})], 1) : column.type == 'state' && _vm.optionsLoaded ? _c('span', [_vm._v(" " + _vm._s(_vm.getStateValue(_vm.itemValue(column, item), column.options)) + " ")]) : column.type == 'array' && _vm.optionsLoaded ? _c('span', [_vm._v(" " + _vm._s(_vm.getArrayValue(_vm.itemValue(column, item), column.displayProp, column.options)) + " ")]) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, item)) + " ")])];
|
|
14116
14216
|
}, {
|
|
14117
14217
|
"item": item,
|
|
14118
14218
|
"index": index,
|
|
@@ -14265,7 +14365,7 @@ var _sfc_render = function render() {
|
|
|
14265
14365
|
attrs: {
|
|
14266
14366
|
"variant": "danger"
|
|
14267
14367
|
}
|
|
14268
|
-
}, [_c('b-icon-x-circle')], 1) : _vm._e()], 1) : column.type == 'date' ? _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, item)) + " ")]) : column.type == 'state' ? _c('span', [_vm._v(" " + _vm._s(_vm.getStateValue(_vm.itemValue(column, item), column.options)) + " ")]) : column.type == 'array' ? _c('span', [_vm._v(" " + _vm._s(_vm.getArrayValue(_vm.itemValue(column, item), column.displayProp)) + " ")]) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, item)) + " ")])];
|
|
14368
|
+
}, [_c('b-icon-x-circle')], 1) : _vm._e()], 1) : column.type == 'date' ? _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, item)) + " ")]) : column.type == 'state' ? _c('span', [_vm._v(" " + _vm._s(_vm.getStateValue(_vm.itemValue(column, item), column.options)) + " ")]) : column.type == 'array' ? _c('span', [_vm._v(" " + _vm._s(_vm.getArrayValue(_vm.itemValue(column, item), column.displayProp, column.options)) + " ")]) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, item)) + " ")])];
|
|
14269
14369
|
}, {
|
|
14270
14370
|
"item": item,
|
|
14271
14371
|
"index": index,
|
|
@@ -14460,7 +14560,7 @@ var _sfc_render = function render() {
|
|
|
14460
14560
|
}) : _vm._e()], 2)], 1);
|
|
14461
14561
|
};
|
|
14462
14562
|
var _sfc_staticRenderFns = [];
|
|
14463
|
-
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "
|
|
14563
|
+
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "72049f4e", null, null);
|
|
14464
14564
|
var component$1 = __component__.exports;// Import vue component
|
|
14465
14565
|
|
|
14466
14566
|
// Default export is installable instance of component.
|