vue-laravel-crud 1.5.3 → 1.5.5
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 +47 -22
- package/dist/vue-laravel-crud.min.js +4 -4
- package/dist/vue-laravel-crud.ssr.js +228 -129
- package/package.json +1 -1
- package/src/vue-laravel-crud.vue +314 -275
|
@@ -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-44f025cd]:last-child,\ntr td[data-v-44f025cd]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-44f025cd] {\n display: flex;\n justify-content: center; }\n\n.crud-header[data-v-44f025cd] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-44f025cd] .crud-title[data-v-44f025cd] {\n margin: 0; }\n .crud-header[data-v-44f025cd] .crud-search[data-v-44f025cd] {\n max-width: 15rem; }\n .crud-header[data-v-44f025cd] .crud-search[data-v-44f025cd] .btn[data-v-44f025cd] {\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-44f025cd] .crud-search[data-v-44f025cd] .btn[data-v-44f025cd].open[data-v-44f025cd] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-44f025cd] .table-options[data-v-44f025cd] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-44f025cd] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-44f025cd] {\n table-layout: auto; }\n .table[data-v-44f025cd] tbody[data-v-44f025cd] td[data-v-44f025cd] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-44f025cd] tbody[data-v-44f025cd] td[data-v-44f025cd]::-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: {
|
|
@@ -13111,13 +13165,13 @@ n(css, {});function normalizeComponent (
|
|
|
13111
13165
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
13112
13166
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13113
13167
|
case 0:
|
|
13114
|
-
if (
|
|
13115
|
-
if (
|
|
13168
|
+
if (id || index) {
|
|
13169
|
+
if (id) {
|
|
13116
13170
|
itemIndex = _this13.items.findIndex(function (item) {
|
|
13117
13171
|
return item.id == _this13.item.id;
|
|
13118
13172
|
});
|
|
13119
13173
|
} else {
|
|
13120
|
-
itemIndex =
|
|
13174
|
+
itemIndex = index;
|
|
13121
13175
|
}
|
|
13122
13176
|
|
|
13123
13177
|
// Assuming this.items is an array
|
|
@@ -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,180 @@ 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 = 11;
|
|
13395
|
+
break;
|
|
13396
|
+
}
|
|
13397
|
+
column = _this19.columns[i];
|
|
13398
|
+
if (!(typeof column.options === 'function')) {
|
|
13399
|
+
_context6.next = 8;
|
|
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
|
+
case 8:
|
|
13410
|
+
i++;
|
|
13411
|
+
_context6.next = 1;
|
|
13412
|
+
break;
|
|
13413
|
+
case 11:
|
|
13414
|
+
_this19.optionsLoaded = true;
|
|
13415
|
+
case 12:
|
|
13416
|
+
case "end":
|
|
13417
|
+
return _context6.stop();
|
|
13418
|
+
}
|
|
13419
|
+
}, _callee6);
|
|
13420
|
+
}))();
|
|
13421
|
+
},
|
|
13422
|
+
saveItem: function saveItem() {
|
|
13423
|
+
var _arguments4 = arguments,
|
|
13424
|
+
_this20 = this;
|
|
13425
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
13426
|
+
var event, validation_result, validation_error_message, formData;
|
|
13427
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
13428
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
13326
13429
|
case 0:
|
|
13327
13430
|
event = _arguments4.length > 0 && _arguments4[0] !== undefined ? _arguments4[0] : null;
|
|
13328
|
-
|
|
13329
|
-
if (!
|
|
13330
|
-
|
|
13431
|
+
_this20.loading = true;
|
|
13432
|
+
if (!_this20.validate) {
|
|
13433
|
+
_context7.next = 10;
|
|
13331
13434
|
break;
|
|
13332
13435
|
}
|
|
13333
13436
|
validation_result = true;
|
|
13334
|
-
validation_error_message =
|
|
13437
|
+
validation_error_message = _this20.messageDefaultValidationError;
|
|
13335
13438
|
if (validation_result) {
|
|
13336
|
-
|
|
13439
|
+
_context7.next = 8;
|
|
13337
13440
|
break;
|
|
13338
13441
|
}
|
|
13339
|
-
|
|
13340
|
-
return
|
|
13442
|
+
_this20.toastError(validation_error_message);
|
|
13443
|
+
return _context7.abrupt("return");
|
|
13341
13444
|
case 8:
|
|
13342
|
-
|
|
13445
|
+
_context7.next = 11;
|
|
13343
13446
|
break;
|
|
13344
13447
|
case 10:
|
|
13345
13448
|
if (event) event.preventDefault();
|
|
13346
13449
|
case 11:
|
|
13347
|
-
if (!
|
|
13348
|
-
|
|
13450
|
+
if (!_this20.useVuexORM) {
|
|
13451
|
+
_context7.next = 13;
|
|
13349
13452
|
break;
|
|
13350
13453
|
}
|
|
13351
|
-
return
|
|
13454
|
+
return _context7.abrupt("return", _this20.saveItemVuex(event));
|
|
13352
13455
|
case 13:
|
|
13353
|
-
if (
|
|
13354
|
-
|
|
13456
|
+
if (_this20.ajax) {
|
|
13457
|
+
_context7.next = 15;
|
|
13355
13458
|
break;
|
|
13356
13459
|
}
|
|
13357
|
-
return
|
|
13460
|
+
return _context7.abrupt("return", _this20.saveItemLocal(event));
|
|
13358
13461
|
case 15:
|
|
13359
|
-
if (
|
|
13360
|
-
axios.put(
|
|
13361
|
-
if (
|
|
13362
|
-
|
|
13462
|
+
if (_this20.item.id) {
|
|
13463
|
+
axios.put(_this20.apiUrl + "/" + _this20.modelName + "/" + _this20.item.id, _this20.item).then(function (response) {
|
|
13464
|
+
if (_this20.hideModalAfterSave || _this20.hideModalAfterUpdate) {
|
|
13465
|
+
_this20.$bvModal.hide("modal-form-item-" + _this20.modelName);
|
|
13363
13466
|
}
|
|
13364
13467
|
var itemSv = response.data;
|
|
13365
|
-
var itemIndex =
|
|
13366
|
-
return item.id ==
|
|
13468
|
+
var itemIndex = _this20.items.findIndex(function (item) {
|
|
13469
|
+
return item.id == _this20.item.id;
|
|
13367
13470
|
});
|
|
13368
|
-
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
if (
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
item:
|
|
13471
|
+
_this20.items[itemIndex] = itemSv;
|
|
13472
|
+
_this20.item = itemSv;
|
|
13473
|
+
_this20.loading = false;
|
|
13474
|
+
if (_this20.refreshAfterSave) _this20.refresh();
|
|
13475
|
+
_this20.toastSuccess("Elemento Modificado");
|
|
13476
|
+
_this20.$emit("itemSaved", {
|
|
13477
|
+
item: _this20.item
|
|
13375
13478
|
});
|
|
13376
|
-
|
|
13377
|
-
item:
|
|
13479
|
+
_this20.$emit("itemUpdated", {
|
|
13480
|
+
item: _this20.item
|
|
13378
13481
|
});
|
|
13379
13482
|
}).catch(function (error) {
|
|
13380
|
-
|
|
13381
|
-
|
|
13483
|
+
_this20.toastError(error);
|
|
13484
|
+
_this20.loading = false;
|
|
13382
13485
|
});
|
|
13383
13486
|
} else {
|
|
13384
|
-
if (
|
|
13487
|
+
if (_this20.createMultipart) {
|
|
13385
13488
|
formData = new FormData();
|
|
13386
|
-
Object.keys(
|
|
13387
|
-
if (
|
|
13388
|
-
var files =
|
|
13489
|
+
Object.keys(_this20.item).forEach(function (key) {
|
|
13490
|
+
if (_this20.item[key][0] && _this20.item[key][0].name) {
|
|
13491
|
+
var files = _this20.item[key];
|
|
13389
13492
|
for (var x = 0; x < files.length; x++) {
|
|
13390
|
-
formData.append(key + "[]",
|
|
13493
|
+
formData.append(key + "[]", _this20.item[key][x], _this20.item[key][x].name);
|
|
13391
13494
|
}
|
|
13392
|
-
} else formData.append(key,
|
|
13495
|
+
} else formData.append(key, _this20.item[key]);
|
|
13393
13496
|
});
|
|
13394
|
-
axios.post(
|
|
13395
|
-
|
|
13396
|
-
if (
|
|
13397
|
-
|
|
13497
|
+
axios.post(_this20.apiUrl + "/" + _this20.modelName, formData).then(function (response) {
|
|
13498
|
+
_this20.loading = false;
|
|
13499
|
+
if (_this20.hideModalAfterSave || _this20.hideModalAfterCreate) {
|
|
13500
|
+
_this20.$bvModal.hide("modal-form-item-" + _this20.modelName);
|
|
13398
13501
|
}
|
|
13399
13502
|
if (response.data.success) {
|
|
13400
13503
|
if (response.data.message) {
|
|
13401
|
-
|
|
13504
|
+
_this20.toastSuccess(response.data.message);
|
|
13402
13505
|
}
|
|
13403
13506
|
return;
|
|
13404
13507
|
}
|
|
13405
13508
|
var itemSv = response.data;
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
if (
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
item:
|
|
13509
|
+
_this20.items.push(itemSv);
|
|
13510
|
+
_this20.item = itemSv;
|
|
13511
|
+
if (_this20.refreshAfterSave) _this20.refresh();
|
|
13512
|
+
_this20.toastSuccess("Elemento Creado");
|
|
13513
|
+
_this20.$emit("itemSaved", {
|
|
13514
|
+
item: _this20.item
|
|
13412
13515
|
});
|
|
13413
|
-
|
|
13414
|
-
item:
|
|
13516
|
+
_this20.$emit("itemCreated", {
|
|
13517
|
+
item: _this20.item
|
|
13415
13518
|
});
|
|
13416
13519
|
}).catch(function (error) {
|
|
13417
|
-
|
|
13418
|
-
|
|
13520
|
+
_this20.toastError(error);
|
|
13521
|
+
_this20.loading = false;
|
|
13419
13522
|
});
|
|
13420
13523
|
} else {
|
|
13421
|
-
axios.post(
|
|
13422
|
-
|
|
13423
|
-
if (
|
|
13424
|
-
|
|
13524
|
+
axios.post(_this20.apiUrl + "/" + _this20.modelName, _this20.item).then(function (response) {
|
|
13525
|
+
_this20.loading = false;
|
|
13526
|
+
if (_this20.hideModalAfterSave || _this20.hideModalAfterUpdate) {
|
|
13527
|
+
_this20.$bvModal.hide("modal-form-item-" + _this20.modelName);
|
|
13425
13528
|
}
|
|
13426
13529
|
if (response.data.success) {
|
|
13427
13530
|
if (response.data.message) {
|
|
13428
|
-
|
|
13531
|
+
_this20.toastSuccess(response.data.message);
|
|
13429
13532
|
}
|
|
13430
13533
|
return;
|
|
13431
13534
|
}
|
|
13432
13535
|
var itemSv = response.data;
|
|
13433
|
-
|
|
13434
|
-
|
|
13435
|
-
if (
|
|
13436
|
-
|
|
13437
|
-
|
|
13438
|
-
item:
|
|
13536
|
+
_this20.items.push(itemSv);
|
|
13537
|
+
_this20.item = itemSv;
|
|
13538
|
+
if (_this20.refreshAfterSave) _this20.refresh();
|
|
13539
|
+
_this20.toastSuccess("Elemento Creado");
|
|
13540
|
+
_this20.$emit("itemSaved", {
|
|
13541
|
+
item: _this20.item
|
|
13439
13542
|
});
|
|
13440
|
-
|
|
13441
|
-
item:
|
|
13543
|
+
_this20.$emit("itemCreated", {
|
|
13544
|
+
item: _this20.item
|
|
13442
13545
|
});
|
|
13443
13546
|
}).catch(function (error) {
|
|
13444
|
-
|
|
13445
|
-
|
|
13547
|
+
_this20.toastError(error);
|
|
13548
|
+
_this20.loading = false;
|
|
13446
13549
|
});
|
|
13447
13550
|
}
|
|
13448
13551
|
}
|
|
13449
13552
|
if (event) event.preventDefault();
|
|
13450
13553
|
case 17:
|
|
13451
13554
|
case "end":
|
|
13452
|
-
return
|
|
13555
|
+
return _context7.stop();
|
|
13453
13556
|
}
|
|
13454
|
-
},
|
|
13557
|
+
}, _callee7);
|
|
13455
13558
|
}))();
|
|
13456
13559
|
},
|
|
13457
13560
|
clearItems: function clearItems() {
|
|
@@ -13510,11 +13613,11 @@ n(css, {});function normalizeComponent (
|
|
|
13510
13613
|
});
|
|
13511
13614
|
},
|
|
13512
13615
|
onChangeFilter: function onChangeFilter(event) {
|
|
13513
|
-
var
|
|
13616
|
+
var _this21 = this;
|
|
13514
13617
|
this.forceRecomputeCounter++;
|
|
13515
13618
|
console.debug("Filters debug ", this.finalFilters, this.internalFilter, this.internalFilters, this.filter, this.filters);
|
|
13516
13619
|
setTimeout(function () {
|
|
13517
|
-
|
|
13620
|
+
_this21.refresh();
|
|
13518
13621
|
}, 1);
|
|
13519
13622
|
},
|
|
13520
13623
|
onPaginationChange: function onPaginationChange(page) {
|
|
@@ -13635,9 +13738,7 @@ var _sfc_render = function render() {
|
|
|
13635
13738
|
}
|
|
13636
13739
|
})], 1)])]) : column.type == 'state' ? _c('div', {
|
|
13637
13740
|
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', {
|
|
13741
|
+
}, [_c('label', [_vm._v(_vm._s(column.label))]), _vm.optionsLoaded ? _c('select', {
|
|
13641
13742
|
directives: [{
|
|
13642
13743
|
name: "model",
|
|
13643
13744
|
rawName: "v-model",
|
|
@@ -13669,11 +13770,9 @@ var _sfc_render = function render() {
|
|
|
13669
13770
|
"value": option.id ? option.id : option.value
|
|
13670
13771
|
}
|
|
13671
13772
|
}, [_vm._v(" " + _vm._s(option.text ? option.text : option.label ? option.label : "") + " ")]);
|
|
13672
|
-
})], 2)]) : column.type == 'array' ? _c('div', {
|
|
13773
|
+
})], 2) : _vm._e()]) : column.type == 'array' ? _c('div', {
|
|
13673
13774
|
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', {
|
|
13775
|
+
}, [_c('label', [_vm._v(_vm._s(column.label))]), _vm.optionsLoaded ? _c('select', {
|
|
13677
13776
|
directives: [{
|
|
13678
13777
|
name: "model",
|
|
13679
13778
|
rawName: "v-model",
|
|
@@ -13705,7 +13804,7 @@ var _sfc_render = function render() {
|
|
|
13705
13804
|
"value": option.id ? option.id : option.value
|
|
13706
13805
|
}
|
|
13707
13806
|
}, [_vm._v(" " + _vm._s(option.text ? option.text : option.label ? option.label : "") + " ")]);
|
|
13708
|
-
}) : _vm._e()], 2)]) : _c('div', {
|
|
13807
|
+
}) : _vm._e()], 2) : _vm._e()]) : _c('div', {
|
|
13709
13808
|
staticClass: "form-group"
|
|
13710
13809
|
}, [_c('label', [_vm._v(_vm._s(column.label))]), _c('input', {
|
|
13711
13810
|
directives: [{
|
|
@@ -13901,7 +14000,7 @@ var _sfc_render = function render() {
|
|
|
13901
14000
|
callback: function callback($$v) {
|
|
13902
14001
|
_vm.$set(_vm.internalFilterByProp(column.prop + '_from'), "value", $$v);
|
|
13903
14002
|
},
|
|
13904
|
-
expression: "internalFilterByProp(column.prop + '_from').value\n
|
|
14003
|
+
expression: "internalFilterByProp(column.prop + '_from').value\n "
|
|
13905
14004
|
}
|
|
13906
14005
|
})], 1), _c('div', {
|
|
13907
14006
|
staticClass: "col-6"
|
|
@@ -13918,9 +14017,9 @@ var _sfc_render = function render() {
|
|
|
13918
14017
|
callback: function callback($$v) {
|
|
13919
14018
|
_vm.$set(_vm.internalFilterByProp(column.prop + '_to'), "value", $$v);
|
|
13920
14019
|
},
|
|
13921
|
-
expression: "internalFilterByProp(column.prop + '_to').value\n
|
|
14020
|
+
expression: "internalFilterByProp(column.prop + '_to').value\n "
|
|
13922
14021
|
}
|
|
13923
|
-
})], 1)]) : column.type == 'state' ? _c('select', {
|
|
14022
|
+
})], 1)]) : column.type == 'state' && _vm.optionsLoaded ? _c('select', {
|
|
13924
14023
|
directives: [{
|
|
13925
14024
|
name: "model",
|
|
13926
14025
|
rawName: "v-model",
|
|
@@ -13955,7 +14054,7 @@ var _sfc_render = function render() {
|
|
|
13955
14054
|
"value": option.id
|
|
13956
14055
|
}
|
|
13957
14056
|
}, [_vm._v(" " + _vm._s(option.text ? option.text : option.label ? option.label : "") + " ")]);
|
|
13958
|
-
})], 2) : column.type == 'array' ? _c('select', {
|
|
14057
|
+
})], 2) : column.type == 'array' && _vm.optionsLoaded ? _c('select', {
|
|
13959
14058
|
directives: [{
|
|
13960
14059
|
name: "model",
|
|
13961
14060
|
rawName: "v-model",
|
|
@@ -14112,7 +14211,7 @@ var _sfc_render = function render() {
|
|
|
14112
14211
|
},
|
|
14113
14212
|
expression: "item.selected"
|
|
14114
14213
|
}
|
|
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)) + " ")])];
|
|
14214
|
+
})], 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
14215
|
}, {
|
|
14117
14216
|
"item": item,
|
|
14118
14217
|
"index": index,
|
|
@@ -14265,7 +14364,7 @@ var _sfc_render = function render() {
|
|
|
14265
14364
|
attrs: {
|
|
14266
14365
|
"variant": "danger"
|
|
14267
14366
|
}
|
|
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)) + " ")])];
|
|
14367
|
+
}, [_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
14368
|
}, {
|
|
14270
14369
|
"item": item,
|
|
14271
14370
|
"index": index,
|
|
@@ -14460,7 +14559,7 @@ var _sfc_render = function render() {
|
|
|
14460
14559
|
}) : _vm._e()], 2)], 1);
|
|
14461
14560
|
};
|
|
14462
14561
|
var _sfc_staticRenderFns = [];
|
|
14463
|
-
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "
|
|
14562
|
+
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "44f025cd", null, null);
|
|
14464
14563
|
var component$1 = __component__.exports;// Import vue component
|
|
14465
14564
|
|
|
14466
14565
|
// Default export is installable instance of component.
|