isobit-ui 0.0.350 → 0.0.353
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 -32
- 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.353
|
|
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,
|
|
@@ -2971,39 +3023,49 @@ var script$8 = {
|
|
|
2971
3023
|
var me = _this2;
|
|
2972
3024
|
var pa = me.$el.parentElement;
|
|
2973
3025
|
console.log(p);
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
me.$emit('loaded', {
|
|
2985
|
-
target: me,
|
|
2986
|
-
data: data
|
|
3026
|
+
return _invoke$1(function () {
|
|
3027
|
+
if (me.store) {
|
|
3028
|
+
return _await$1(window._.getStoredList(me.store), function (dd) {
|
|
3029
|
+
var _Object$keys = Object.keys(p),
|
|
3030
|
+
_Object$keys2 = _slicedToArray(_Object$keys, 1),
|
|
3031
|
+
key = _Object$keys2[0];
|
|
3032
|
+
|
|
3033
|
+
if (key) me.data2 = dd.filter(function (item) {
|
|
3034
|
+
return item[key] == p[key];
|
|
3035
|
+
});else me.data2 = dd;
|
|
2987
3036
|
});
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
if (
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3037
|
+
}
|
|
3038
|
+
}, function () {
|
|
3039
|
+
if (me.url && !pa.disabled) {
|
|
3040
|
+
if (!me.data2) me.data2 = [];
|
|
3041
|
+
if (me.filters) p = Vue.mergeDeep(p ? p : {}, me.filters); //console.log(pa.name+'.options.load '+JSON.stringify(p));
|
|
3042
|
+
|
|
3043
|
+
axios.get(me.url, {
|
|
3044
|
+
params: p
|
|
3045
|
+
}).then(function (r) {
|
|
3046
|
+
var data = r.data.data ? r.data.data : r.data;
|
|
3047
|
+
me.$emit('loaded', {
|
|
3048
|
+
target: me,
|
|
3049
|
+
data: data
|
|
3050
|
+
});
|
|
3051
|
+
me.data2 = data;
|
|
3052
|
+
if (me.store) localstore.setItem(me.store, JSON.stringify(data));
|
|
3053
|
+
me.$parent.$forceUpdate();
|
|
3054
|
+
if (nou) nou();
|
|
3055
|
+
})["catch"](function () {//r = r.response;
|
|
3056
|
+
//var e = me.$parent.$el;
|
|
3057
|
+
//var error = document.createElement("div");
|
|
3058
|
+
|
|
3059
|
+
/*error.innerHTML = r.config.method + ' ' + r.config.url + ' ' + r.status + ' (' + r.statusText + ')';
|
|
3060
|
+
error.classList.add("v-error");
|
|
3061
|
+
e.parentNode.insertBefore(error, e);*/
|
|
3062
|
+
});
|
|
3063
|
+
}
|
|
3064
|
+
}); //console.log(pa.name+'.antes de preguntar disabled options.load '+JSON.stringify(p));
|
|
3065
|
+
|
|
3001
3066
|
/*else{
|
|
3002
3067
|
console.log('no se cargara aun '+pa.name);
|
|
3003
3068
|
}*/
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
return _await$1();
|
|
3007
3069
|
} catch (e) {
|
|
3008
3070
|
return Promise.reject(e);
|
|
3009
3071
|
}
|