isobit-ui 0.0.351 → 0.0.354
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/index.js +94 -34
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* isobit-ui v0.0.
|
|
2
|
+
* isobit-ui v0.0.354
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -36,6 +36,10 @@ function _typeof(obj) {
|
|
|
36
36
|
return _typeof(obj);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
function _slicedToArray(arr, i) {
|
|
40
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
function _toConsumableArray(arr) {
|
|
40
44
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
41
45
|
}
|
|
@@ -44,10 +48,44 @@ function _arrayWithoutHoles(arr) {
|
|
|
44
48
|
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
45
49
|
}
|
|
46
50
|
|
|
51
|
+
function _arrayWithHoles(arr) {
|
|
52
|
+
if (Array.isArray(arr)) return arr;
|
|
53
|
+
}
|
|
54
|
+
|
|
47
55
|
function _iterableToArray(iter) {
|
|
48
56
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
49
57
|
}
|
|
50
58
|
|
|
59
|
+
function _iterableToArrayLimit(arr, i) {
|
|
60
|
+
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
|
|
61
|
+
|
|
62
|
+
if (_i == null) return;
|
|
63
|
+
var _arr = [];
|
|
64
|
+
var _n = true;
|
|
65
|
+
var _d = false;
|
|
66
|
+
|
|
67
|
+
var _s, _e;
|
|
68
|
+
|
|
69
|
+
try {
|
|
70
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
71
|
+
_arr.push(_s.value);
|
|
72
|
+
|
|
73
|
+
if (i && _arr.length === i) break;
|
|
74
|
+
}
|
|
75
|
+
} catch (err) {
|
|
76
|
+
_d = true;
|
|
77
|
+
_e = err;
|
|
78
|
+
} finally {
|
|
79
|
+
try {
|
|
80
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
81
|
+
} finally {
|
|
82
|
+
if (_d) throw _e;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return _arr;
|
|
87
|
+
}
|
|
88
|
+
|
|
51
89
|
function _unsupportedIterableToArray(o, minLen) {
|
|
52
90
|
if (!o) return;
|
|
53
91
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -69,6 +107,10 @@ function _nonIterableSpread() {
|
|
|
69
107
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
70
108
|
}
|
|
71
109
|
|
|
110
|
+
function _nonIterableRest() {
|
|
111
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
112
|
+
}
|
|
113
|
+
|
|
72
114
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
73
115
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
74
116
|
|
|
@@ -1391,7 +1433,7 @@ function _await$2(value, then, direct) {
|
|
|
1391
1433
|
|
|
1392
1434
|
var template = "\n\t<div v-bind:class={reflow:reflow} v-bind:key=\"'v-table-'+keyBody\" class=\"v-datatable v-resize\" style=\"background-color:#dbdbdb\"><template v-if=\"active\">\n\t\t<div v-if=\"hasSlot('header')\" class=\"v-datatable-header v-widget-header ui-corner-top\"><slot name=\"header\"></slot>\n\t\t</div>\n\t\t<div v-if=\"pagination\" class=\"v-paginator v-paginator-top v-widget-header v-paginator-pages center\">\n\t\t\n\t\t<v-button value=\"|<\" v-bind:disabled=\"page<=1\" v-on:click.prevent=\"to(1)\"/><v-button value=\"<\" v-on:click.prevent=\"to(page-1)\" v-bind:disabled=\"page<=1\"/><div style=\"padding:3px 8px;display:inline-block\">\n\t\t<input type=\"number\" v-on:change=\"to(page,true)\" style=\"width:60px\" min=\"1\" v-bind:max=\"pages\" v-model=\"page\"/> / {{pages}}</div>\n\t\t<v-button value=\">\" v-on:click.prevent=\"to(page+1)\" v-bind:disabled=\"page==pages\"/><v-button v-on:click.prevent=\"to(pages)\" value=\">|\" v-bind:disabled=\"page==pages\"/>\n\t\t\t</div>\n\t\t<div v-if=\"scrollable0\" class=\"v-widget-header v-datatable-scrollable-header\" style=\"position:relative\">\n\t\t<div class=\"v-datatable-scrollable-header-box\" style=\"\"></div></div>\n\t\t<div v-bind:class=\"{'v-datatable-scrollable-body':scrollable0}\">\n\t\t<table class=\"v-table\" v-bind:style=\"{width:width}\" v-if=\"columns\">\n\t\t\t<thead>\n <tr>\n <th v-if=\"selectable0\" v-bind:width=\"getCheckColumnWidth\" >\n <span class=\"v-check\" v-on:click=\"rowSelect(null,-10)\" v-bind:data-icon=\"selected.length?'check-square':'square'\">\n <i class=\"fa fa-lg\" v-bind:class=\"selected.length?'fa-check-square':'fa-square'\"></i>\n </span>\n </th>\n <th v-bind:class=\"k['h-class']\" v-for=\"k in columns\" v-bind:width=\"k.width\" v-on:click=\"sortBy(k)\">\n <div v-html=\"k.header\"></div>\n </th>\n\t\t\t</tr>\n </thead>\n\t\t\t<tbody class=\"v-datatable-data\" v-bind:key=\"kc\">\n\t\t\t\t<tr v-for=\"(entry,r) in sortedData\" @row=\"rowCreated(entry)\" @click=\"_selectRow($event,entry,r)\" v-bind:class=\"getRowClass(r,entry)\">\n\t\t\t\t\t<td v-if=\"selectable0\" width=\"18\" >\n\t\t\t\t\t\t<span v-bind:data-index=\"r\" class=\"v-check\" v-on:click=\"rowSelect(entry,r)\"\n\t\t\t\t\t\tv-bind:data-icon=\"isSelected(r)?'check-square':'square'\"><i class=\"far fa-lg\" v-bind:class=\"isSelected(r)?'fa-check-square':'fa-square'\" ></i></span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<slot v-bind:row=\"entry\" v-bind:index=\"r+(page-1)*paginatio_\"></slot>\n\t\t\t\t</tr>\n\t\t\t\t<tr v-if=\"!sortedData||sortedData.length==0\">\n\t\t\t\t\t<td v-bind:colspan=\"columns.length+(selectable0?1:0)\">{{emptyMessage}}</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t</div>\n\t\t<div v-if=\"summary||hasSlot('summary')\" class=\"v-table-summary\" v-bind:class=\"{'v-datatable-scrollable-body':scrollable}\">\n\t\t\t<table class=\"v-table v-table-summary\"><tr>\n\t\t\t<td v-if=\"selectable0\" v-bind:width=\"getCheckColumnWidth\" ></td>\n\t\t\t<slot name=\"summary\" v-bind:data=\"sortedData\"></slot>\n\t\t\t</tr></table>\n\t\t</div>\n\t\t<div class=\"hide filters\"><slot name=\"filters\"></slot><slot name=\"columns\"></slot></div></template></div>\n";
|
|
1393
1435
|
|
|
1394
|
-
function _invoke$
|
|
1436
|
+
function _invoke$2(body, then) {
|
|
1395
1437
|
var result = body();
|
|
1396
1438
|
|
|
1397
1439
|
if (result && result.then) {
|
|
@@ -1935,7 +1977,7 @@ var script$d = {
|
|
|
1935
1977
|
return _invokeIgnored(function () {
|
|
1936
1978
|
if (storage != null) {
|
|
1937
1979
|
var datj;
|
|
1938
|
-
return _invoke$
|
|
1980
|
+
return _invoke$2(function () {
|
|
1939
1981
|
if (window._.db) {
|
|
1940
1982
|
return _await$2(me.getStoredList(storage), function (_me$getStoredList) {
|
|
1941
1983
|
datj = _me$getStoredList;
|
|
@@ -2872,6 +2914,16 @@ function _await$1(value, then, direct) {
|
|
|
2872
2914
|
return then ? value.then(then) : value;
|
|
2873
2915
|
}
|
|
2874
2916
|
|
|
2917
|
+
function _invoke$1(body, then) {
|
|
2918
|
+
var result = body();
|
|
2919
|
+
|
|
2920
|
+
if (result && result.then) {
|
|
2921
|
+
return result.then(then);
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
return then(result);
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2875
2927
|
var script$8 = {
|
|
2876
2928
|
props: {
|
|
2877
2929
|
url: String,
|
|
@@ -2970,41 +3022,49 @@ var script$8 = {
|
|
|
2970
3022
|
|
|
2971
3023
|
var me = _this2;
|
|
2972
3024
|
var pa = me.$el.parentElement;
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
}).then(function (r) {
|
|
2984
|
-
var data = r.data.data ? r.data.data : r.data;
|
|
2985
|
-
me.$emit('loaded', {
|
|
2986
|
-
target: me,
|
|
2987
|
-
data: data
|
|
3025
|
+
return _invoke$1(function () {
|
|
3026
|
+
if (me.store) {
|
|
3027
|
+
return _await$1(window._.getStoredList(me.store), function (dd) {
|
|
3028
|
+
var _ref = p ? Object.keys(p) : [],
|
|
3029
|
+
_ref2 = _slicedToArray(_ref, 1),
|
|
3030
|
+
key = _ref2[0];
|
|
3031
|
+
|
|
3032
|
+
if (key) me.data2 = dd.filter(function (item) {
|
|
3033
|
+
return item[key] == p[key];
|
|
3034
|
+
});else me.data2 = dd;
|
|
2988
3035
|
});
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
if (
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3036
|
+
}
|
|
3037
|
+
}, function () {
|
|
3038
|
+
if (me.url && !pa.disabled) {
|
|
3039
|
+
if (!me.data2) me.data2 = [];
|
|
3040
|
+
if (me.filters) p = Vue.mergeDeep(p ? p : {}, me.filters); //console.log(pa.name+'.options.load '+JSON.stringify(p));
|
|
3041
|
+
|
|
3042
|
+
axios.get(me.url, {
|
|
3043
|
+
params: p
|
|
3044
|
+
}).then(function (r) {
|
|
3045
|
+
var data = r.data.data ? r.data.data : r.data;
|
|
3046
|
+
me.$emit('loaded', {
|
|
3047
|
+
target: me,
|
|
3048
|
+
data: data
|
|
3049
|
+
});
|
|
3050
|
+
me.data2 = data;
|
|
3051
|
+
if (me.store) localstore.setItem(me.store, JSON.stringify(data));
|
|
3052
|
+
me.$parent.$forceUpdate();
|
|
3053
|
+
if (nou) nou();
|
|
3054
|
+
})["catch"](function () {//r = r.response;
|
|
3055
|
+
//var e = me.$parent.$el;
|
|
3056
|
+
//var error = document.createElement("div");
|
|
3057
|
+
|
|
3058
|
+
/*error.innerHTML = r.config.method + ' ' + r.config.url + ' ' + r.status + ' (' + r.statusText + ')';
|
|
3059
|
+
error.classList.add("v-error");
|
|
3060
|
+
e.parentNode.insertBefore(error, e);*/
|
|
3061
|
+
});
|
|
3062
|
+
}
|
|
3063
|
+
}); //console.log(pa.name+'.antes de preguntar disabled options.load '+JSON.stringify(p));
|
|
3064
|
+
|
|
3002
3065
|
/*else{
|
|
3003
3066
|
console.log('no se cargara aun '+pa.name);
|
|
3004
3067
|
}*/
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
return _await$1();
|
|
3008
3068
|
} catch (e) {
|
|
3009
3069
|
return Promise.reject(e);
|
|
3010
3070
|
}
|