isobit-ui 0.2.59 → 0.2.60
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 +265 -61
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* isobit-ui v0.2.
|
|
2
|
+
* isobit-ui v0.2.59
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -197,7 +197,7 @@ function _await$4(value, then, direct) {
|
|
|
197
197
|
return then ? value.then(then) : value;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
function _invoke$
|
|
200
|
+
function _invoke$4(body, then) {
|
|
201
201
|
var result = body();
|
|
202
202
|
|
|
203
203
|
if (result && result.then) {
|
|
@@ -316,7 +316,7 @@ var script$o = {
|
|
|
316
316
|
return function () {
|
|
317
317
|
if (store != null) {
|
|
318
318
|
var datj;
|
|
319
|
-
return _invoke$
|
|
319
|
+
return _invoke$4(function () {
|
|
320
320
|
if (window._.db) return _await$4(me.getStoredList(store), function (_me$getStoredList) {
|
|
321
321
|
datj = _me$getStoredList;
|
|
322
322
|
});
|
|
@@ -1650,7 +1650,7 @@ function _await$3(value, then, direct) {
|
|
|
1650
1650
|
return then ? value.then(then) : value;
|
|
1651
1651
|
}
|
|
1652
1652
|
|
|
1653
|
-
function _invoke$
|
|
1653
|
+
function _invoke$3(body, then) {
|
|
1654
1654
|
var result = body();
|
|
1655
1655
|
|
|
1656
1656
|
if (result && result.then) {
|
|
@@ -1756,7 +1756,7 @@ var script$f = {
|
|
|
1756
1756
|
return function () {
|
|
1757
1757
|
if (store != null) {
|
|
1758
1758
|
var datj;
|
|
1759
|
-
return _invoke$
|
|
1759
|
+
return _invoke$3(function () {
|
|
1760
1760
|
if (window._.db) return _await$3(me.getStoredList(store), function (_me$getStoredList) {
|
|
1761
1761
|
datj = _me$getStoredList;
|
|
1762
1762
|
});
|
|
@@ -2047,7 +2047,7 @@ function _await$2(value, then, direct) {
|
|
|
2047
2047
|
|
|
2048
2048
|
var template = "\n\t<div v-bind:class={reflow:reflow} :key=\"'v-table-'+keyBody\" \n :style={width:width}\n class=\"v-datatable v-resize\">\n <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?'square-check':'square'\">\n <i class=\"fa fa-lg\" v-bind:class=\"selected.length?'fa-square-check':'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)\" \n v-bind:class=\"getRowClass(r,entry)\">\n\t\t\t\t\t<td v-if=\"selectable0\" width=\"18\" class=\"center\">\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)?'square-check':'square'\"><i class=\"far fa-lg\" v-bind:class=\"isSelected(r)?'fa-square-check':'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";
|
|
2049
2049
|
|
|
2050
|
-
function _invoke$
|
|
2050
|
+
function _invoke$2(body, then) {
|
|
2051
2051
|
var result = body();
|
|
2052
2052
|
|
|
2053
2053
|
if (result && result.then) {
|
|
@@ -2631,10 +2631,10 @@ var script$d = {
|
|
|
2631
2631
|
var me, store;
|
|
2632
2632
|
me = this;
|
|
2633
2633
|
store = me.store;
|
|
2634
|
-
return _invoke$
|
|
2634
|
+
return _invoke$2(function () {
|
|
2635
2635
|
if (store != null) {
|
|
2636
2636
|
var datj;
|
|
2637
|
-
return _invoke$
|
|
2637
|
+
return _invoke$2(function () {
|
|
2638
2638
|
if (window._.db) return _await$2(me.getStoredList(store), function (_me$getStoredList) {
|
|
2639
2639
|
datj = _me$getStoredList;
|
|
2640
2640
|
});
|
|
@@ -3714,17 +3714,17 @@ function _await$1(value, then, direct) {
|
|
|
3714
3714
|
return then ? value.then(then) : value;
|
|
3715
3715
|
}
|
|
3716
3716
|
|
|
3717
|
-
function _empty() {}
|
|
3717
|
+
function _empty$1() {}
|
|
3718
3718
|
|
|
3719
|
-
function _awaitIgnored(value, direct) {
|
|
3719
|
+
function _awaitIgnored$1(value, direct) {
|
|
3720
3720
|
if (!direct) {
|
|
3721
|
-
return value && value.then ? value.then(_empty) : Promise.resolve();
|
|
3721
|
+
return value && value.then ? value.then(_empty$1) : Promise.resolve();
|
|
3722
3722
|
}
|
|
3723
3723
|
}
|
|
3724
3724
|
|
|
3725
|
-
function _settle(pact, state, value) {
|
|
3725
|
+
function _settle$1(pact, state, value) {
|
|
3726
3726
|
if (!pact.s) {
|
|
3727
|
-
if (value instanceof _Pact) {
|
|
3727
|
+
if (value instanceof _Pact$1) {
|
|
3728
3728
|
if (value.s) {
|
|
3729
3729
|
if (state & 1) {
|
|
3730
3730
|
state = value.s;
|
|
@@ -3732,13 +3732,13 @@ function _settle(pact, state, value) {
|
|
|
3732
3732
|
|
|
3733
3733
|
value = value.v;
|
|
3734
3734
|
} else {
|
|
3735
|
-
value.o = _settle.bind(null, pact, state);
|
|
3735
|
+
value.o = _settle$1.bind(null, pact, state);
|
|
3736
3736
|
return;
|
|
3737
3737
|
}
|
|
3738
3738
|
}
|
|
3739
3739
|
|
|
3740
3740
|
if (value && value.then) {
|
|
3741
|
-
value.then(_settle.bind(null, pact, state), _settle.bind(null, pact, 2));
|
|
3741
|
+
value.then(_settle$1.bind(null, pact, state), _settle$1.bind(null, pact, 2));
|
|
3742
3742
|
return;
|
|
3743
3743
|
}
|
|
3744
3744
|
|
|
@@ -3752,7 +3752,7 @@ function _settle(pact, state, value) {
|
|
|
3752
3752
|
}
|
|
3753
3753
|
}
|
|
3754
3754
|
|
|
3755
|
-
var _Pact = /*#__PURE__*/function () {
|
|
3755
|
+
var _Pact$1 = /*#__PURE__*/function () {
|
|
3756
3756
|
function _Pact() {}
|
|
3757
3757
|
|
|
3758
3758
|
_Pact.prototype.then = function (onFulfilled, onRejected) {
|
|
@@ -3764,9 +3764,9 @@ var _Pact = /*#__PURE__*/function () {
|
|
|
3764
3764
|
|
|
3765
3765
|
if (callback) {
|
|
3766
3766
|
try {
|
|
3767
|
-
_settle(result, 1, callback(this.v));
|
|
3767
|
+
_settle$1(result, 1, callback(this.v));
|
|
3768
3768
|
} catch (e) {
|
|
3769
|
-
_settle(result, 2, e);
|
|
3769
|
+
_settle$1(result, 2, e);
|
|
3770
3770
|
}
|
|
3771
3771
|
|
|
3772
3772
|
return result;
|
|
@@ -3780,14 +3780,14 @@ var _Pact = /*#__PURE__*/function () {
|
|
|
3780
3780
|
var value = _this.v;
|
|
3781
3781
|
|
|
3782
3782
|
if (_this.s & 1) {
|
|
3783
|
-
_settle(result, 1, onFulfilled ? onFulfilled(value) : value);
|
|
3783
|
+
_settle$1(result, 1, onFulfilled ? onFulfilled(value) : value);
|
|
3784
3784
|
} else if (onRejected) {
|
|
3785
|
-
_settle(result, 1, onRejected(value));
|
|
3785
|
+
_settle$1(result, 1, onRejected(value));
|
|
3786
3786
|
} else {
|
|
3787
|
-
_settle(result, 2, value);
|
|
3787
|
+
_settle$1(result, 2, value);
|
|
3788
3788
|
}
|
|
3789
3789
|
} catch (e) {
|
|
3790
|
-
_settle(result, 2, e);
|
|
3790
|
+
_settle$1(result, 2, e);
|
|
3791
3791
|
}
|
|
3792
3792
|
};
|
|
3793
3793
|
|
|
@@ -3797,8 +3797,8 @@ var _Pact = /*#__PURE__*/function () {
|
|
|
3797
3797
|
return _Pact;
|
|
3798
3798
|
}();
|
|
3799
3799
|
|
|
3800
|
-
function _isSettledPact(thenable) {
|
|
3801
|
-
return thenable instanceof _Pact && thenable.s & 1;
|
|
3800
|
+
function _isSettledPact$1(thenable) {
|
|
3801
|
+
return thenable instanceof _Pact$1 && thenable.s & 1;
|
|
3802
3802
|
}
|
|
3803
3803
|
|
|
3804
3804
|
function _for(test, update, body) {
|
|
@@ -3807,7 +3807,7 @@ function _for(test, update, body) {
|
|
|
3807
3807
|
for (;;) {
|
|
3808
3808
|
var shouldContinue = test();
|
|
3809
3809
|
|
|
3810
|
-
if (_isSettledPact(shouldContinue)) {
|
|
3810
|
+
if (_isSettledPact$1(shouldContinue)) {
|
|
3811
3811
|
shouldContinue = shouldContinue.v;
|
|
3812
3812
|
}
|
|
3813
3813
|
|
|
@@ -3823,7 +3823,7 @@ function _for(test, update, body) {
|
|
|
3823
3823
|
var result = body();
|
|
3824
3824
|
|
|
3825
3825
|
if (result && result.then) {
|
|
3826
|
-
if (_isSettledPact(result)) {
|
|
3826
|
+
if (_isSettledPact$1(result)) {
|
|
3827
3827
|
result = result.s;
|
|
3828
3828
|
} else {
|
|
3829
3829
|
stage = 1;
|
|
@@ -3834,16 +3834,16 @@ function _for(test, update, body) {
|
|
|
3834
3834
|
if (update) {
|
|
3835
3835
|
var updateValue = update();
|
|
3836
3836
|
|
|
3837
|
-
if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
|
|
3837
|
+
if (updateValue && updateValue.then && !_isSettledPact$1(updateValue)) {
|
|
3838
3838
|
stage = 2;
|
|
3839
3839
|
break;
|
|
3840
3840
|
}
|
|
3841
3841
|
}
|
|
3842
3842
|
}
|
|
3843
3843
|
|
|
3844
|
-
var pact = new _Pact();
|
|
3844
|
+
var pact = new _Pact$1();
|
|
3845
3845
|
|
|
3846
|
-
var reject = _settle.bind(null, pact, 2);
|
|
3846
|
+
var reject = _settle$1.bind(null, pact, 2);
|
|
3847
3847
|
|
|
3848
3848
|
(stage === 0 ? shouldContinue.then(_resumeAfterTest) : stage === 1 ? result.then(_resumeAfterBody) : updateValue.then(_resumeAfterUpdate)).then(void 0, reject);
|
|
3849
3849
|
return pact;
|
|
@@ -3855,7 +3855,7 @@ function _for(test, update, body) {
|
|
|
3855
3855
|
if (update) {
|
|
3856
3856
|
updateValue = update();
|
|
3857
3857
|
|
|
3858
|
-
if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
|
|
3858
|
+
if (updateValue && updateValue.then && !_isSettledPact$1(updateValue)) {
|
|
3859
3859
|
updateValue.then(_resumeAfterUpdate).then(void 0, reject);
|
|
3860
3860
|
return;
|
|
3861
3861
|
}
|
|
@@ -3863,8 +3863,8 @@ function _for(test, update, body) {
|
|
|
3863
3863
|
|
|
3864
3864
|
shouldContinue = test();
|
|
3865
3865
|
|
|
3866
|
-
if (!shouldContinue || _isSettledPact(shouldContinue) && !shouldContinue.v) {
|
|
3867
|
-
_settle(pact, 1, result);
|
|
3866
|
+
if (!shouldContinue || _isSettledPact$1(shouldContinue) && !shouldContinue.v) {
|
|
3867
|
+
_settle$1(pact, 1, result);
|
|
3868
3868
|
|
|
3869
3869
|
return;
|
|
3870
3870
|
}
|
|
@@ -3876,7 +3876,7 @@ function _for(test, update, body) {
|
|
|
3876
3876
|
|
|
3877
3877
|
result = body();
|
|
3878
3878
|
|
|
3879
|
-
if (_isSettledPact(result)) {
|
|
3879
|
+
if (_isSettledPact$1(result)) {
|
|
3880
3880
|
result = result.v;
|
|
3881
3881
|
}
|
|
3882
3882
|
} while (!result || !result.then);
|
|
@@ -3894,7 +3894,7 @@ function _for(test, update, body) {
|
|
|
3894
3894
|
_resumeAfterBody(result);
|
|
3895
3895
|
}
|
|
3896
3896
|
} else {
|
|
3897
|
-
_settle(pact, 1, result);
|
|
3897
|
+
_settle$1(pact, 1, result);
|
|
3898
3898
|
}
|
|
3899
3899
|
}
|
|
3900
3900
|
|
|
@@ -3906,18 +3906,18 @@ function _for(test, update, body) {
|
|
|
3906
3906
|
_resumeAfterTest(shouldContinue);
|
|
3907
3907
|
}
|
|
3908
3908
|
} else {
|
|
3909
|
-
_settle(pact, 1, result);
|
|
3909
|
+
_settle$1(pact, 1, result);
|
|
3910
3910
|
}
|
|
3911
3911
|
}
|
|
3912
3912
|
}
|
|
3913
3913
|
|
|
3914
3914
|
function _continueIgnored(value) {
|
|
3915
3915
|
if (value && value.then) {
|
|
3916
|
-
return value.then(_empty);
|
|
3916
|
+
return value.then(_empty$1);
|
|
3917
3917
|
}
|
|
3918
3918
|
}
|
|
3919
3919
|
|
|
3920
|
-
function _invoke(body, then) {
|
|
3920
|
+
function _invoke$1(body, then) {
|
|
3921
3921
|
var result = body();
|
|
3922
3922
|
|
|
3923
3923
|
if (result && result.then) {
|
|
@@ -4046,10 +4046,10 @@ var script$7 = {
|
|
|
4046
4046
|
var pa = me.$el.parentElement;
|
|
4047
4047
|
me.data2 = me.data;
|
|
4048
4048
|
if (!me.data2) me.data2 = [];
|
|
4049
|
-
return _invoke(function () {
|
|
4049
|
+
return _invoke$1(function () {
|
|
4050
4050
|
if (me.store) {
|
|
4051
4051
|
//console.log(JSON.stringify(me.data2));
|
|
4052
|
-
return _await$1(
|
|
4052
|
+
return _await$1(_.getStoredList(me.store, p), function (storedList) {
|
|
4053
4053
|
// if(this.getParentE().name){
|
|
4054
4054
|
// console.log(this.$el.parentElement.parentElement);
|
|
4055
4055
|
// console.log(storedList);
|
|
@@ -4090,12 +4090,12 @@ var script$7 = {
|
|
|
4090
4090
|
}
|
|
4091
4091
|
}, function () {
|
|
4092
4092
|
//console.log(pa.name+'.antes de preguntar disabled options.load '+JSON.stringify(p));
|
|
4093
|
-
return _invoke(function () {
|
|
4093
|
+
return _invoke$1(function () {
|
|
4094
4094
|
if ((me.url || me.src) && !pa.disabled) {
|
|
4095
4095
|
if (!me.data2) me.data2 = [];
|
|
4096
4096
|
if (me.filters) p = window.Vue.mergeDeep(p ? p : {}, me.filters); //console.log(pa.name+'.options.load '+JSON.stringify(p));
|
|
4097
4097
|
|
|
4098
|
-
return _awaitIgnored(window.axios.get(me.url ? me.url : me.src, {
|
|
4098
|
+
return _awaitIgnored$1(window.axios.get(me.url ? me.url : me.src, {
|
|
4099
4099
|
params: p
|
|
4100
4100
|
}).then(function (r) {
|
|
4101
4101
|
var data = r.data.data ? r.data.data : r.data;
|
|
@@ -4126,7 +4126,7 @@ var script$7 = {
|
|
|
4126
4126
|
return !!me.queue.length;
|
|
4127
4127
|
}, void 0, function () {
|
|
4128
4128
|
var d = me.queue.shift();
|
|
4129
|
-
return _awaitIgnored(me.load(d[0], d[1], 1));
|
|
4129
|
+
return _awaitIgnored$1(me.load(d[0], d[1], 1));
|
|
4130
4130
|
}));
|
|
4131
4131
|
});
|
|
4132
4132
|
});
|
|
@@ -5688,6 +5688,158 @@ var __vue_component__ = /*#__PURE__*/__vue_normalize__({
|
|
|
5688
5688
|
staticRenderFns: __vue_staticRenderFns__
|
|
5689
5689
|
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
5690
5690
|
|
|
5691
|
+
function _empty() {}
|
|
5692
|
+
|
|
5693
|
+
function _awaitIgnored(value, direct) {
|
|
5694
|
+
if (!direct) {
|
|
5695
|
+
return value && value.then ? value.then(_empty) : Promise.resolve();
|
|
5696
|
+
}
|
|
5697
|
+
}
|
|
5698
|
+
|
|
5699
|
+
function _catch(body, recover) {
|
|
5700
|
+
try {
|
|
5701
|
+
var result = body();
|
|
5702
|
+
} catch (e) {
|
|
5703
|
+
return recover(e);
|
|
5704
|
+
}
|
|
5705
|
+
|
|
5706
|
+
if (result && result.then) {
|
|
5707
|
+
return result.then(void 0, recover);
|
|
5708
|
+
}
|
|
5709
|
+
|
|
5710
|
+
return result;
|
|
5711
|
+
}
|
|
5712
|
+
|
|
5713
|
+
function _settle(pact, state, value) {
|
|
5714
|
+
if (!pact.s) {
|
|
5715
|
+
if (value instanceof _Pact) {
|
|
5716
|
+
if (value.s) {
|
|
5717
|
+
if (state & 1) {
|
|
5718
|
+
state = value.s;
|
|
5719
|
+
}
|
|
5720
|
+
|
|
5721
|
+
value = value.v;
|
|
5722
|
+
} else {
|
|
5723
|
+
value.o = _settle.bind(null, pact, state);
|
|
5724
|
+
return;
|
|
5725
|
+
}
|
|
5726
|
+
}
|
|
5727
|
+
|
|
5728
|
+
if (value && value.then) {
|
|
5729
|
+
value.then(_settle.bind(null, pact, state), _settle.bind(null, pact, 2));
|
|
5730
|
+
return;
|
|
5731
|
+
}
|
|
5732
|
+
|
|
5733
|
+
pact.s = state;
|
|
5734
|
+
pact.v = value;
|
|
5735
|
+
var observer = pact.o;
|
|
5736
|
+
|
|
5737
|
+
if (observer) {
|
|
5738
|
+
observer(pact);
|
|
5739
|
+
}
|
|
5740
|
+
}
|
|
5741
|
+
}
|
|
5742
|
+
|
|
5743
|
+
var _Pact = /*#__PURE__*/function () {
|
|
5744
|
+
function _Pact() {}
|
|
5745
|
+
|
|
5746
|
+
_Pact.prototype.then = function (onFulfilled, onRejected) {
|
|
5747
|
+
var result = new _Pact();
|
|
5748
|
+
var state = this.s;
|
|
5749
|
+
|
|
5750
|
+
if (state) {
|
|
5751
|
+
var callback = state & 1 ? onFulfilled : onRejected;
|
|
5752
|
+
|
|
5753
|
+
if (callback) {
|
|
5754
|
+
try {
|
|
5755
|
+
_settle(result, 1, callback(this.v));
|
|
5756
|
+
} catch (e) {
|
|
5757
|
+
_settle(result, 2, e);
|
|
5758
|
+
}
|
|
5759
|
+
|
|
5760
|
+
return result;
|
|
5761
|
+
} else {
|
|
5762
|
+
return this;
|
|
5763
|
+
}
|
|
5764
|
+
}
|
|
5765
|
+
|
|
5766
|
+
this.o = function (_this) {
|
|
5767
|
+
try {
|
|
5768
|
+
var value = _this.v;
|
|
5769
|
+
|
|
5770
|
+
if (_this.s & 1) {
|
|
5771
|
+
_settle(result, 1, onFulfilled ? onFulfilled(value) : value);
|
|
5772
|
+
} else if (onRejected) {
|
|
5773
|
+
_settle(result, 1, onRejected(value));
|
|
5774
|
+
} else {
|
|
5775
|
+
_settle(result, 2, value);
|
|
5776
|
+
}
|
|
5777
|
+
} catch (e) {
|
|
5778
|
+
_settle(result, 2, e);
|
|
5779
|
+
}
|
|
5780
|
+
};
|
|
5781
|
+
|
|
5782
|
+
return result;
|
|
5783
|
+
};
|
|
5784
|
+
|
|
5785
|
+
return _Pact;
|
|
5786
|
+
}();
|
|
5787
|
+
|
|
5788
|
+
function _isSettledPact(thenable) {
|
|
5789
|
+
return thenable instanceof _Pact && thenable.s & 1;
|
|
5790
|
+
}
|
|
5791
|
+
|
|
5792
|
+
function _forTo(array, body, check) {
|
|
5793
|
+
var i = -1,
|
|
5794
|
+
pact,
|
|
5795
|
+
reject;
|
|
5796
|
+
|
|
5797
|
+
function _cycle(result) {
|
|
5798
|
+
try {
|
|
5799
|
+
while (++i < array.length && (!check || !check())) {
|
|
5800
|
+
result = body(i);
|
|
5801
|
+
|
|
5802
|
+
if (result && result.then) {
|
|
5803
|
+
if (_isSettledPact(result)) {
|
|
5804
|
+
result = result.v;
|
|
5805
|
+
} else {
|
|
5806
|
+
result.then(_cycle, reject || (reject = _settle.bind(null, pact = new _Pact(), 2)));
|
|
5807
|
+
return;
|
|
5808
|
+
}
|
|
5809
|
+
}
|
|
5810
|
+
}
|
|
5811
|
+
|
|
5812
|
+
if (pact) {
|
|
5813
|
+
_settle(pact, 1, result);
|
|
5814
|
+
} else {
|
|
5815
|
+
pact = result;
|
|
5816
|
+
}
|
|
5817
|
+
} catch (e) {
|
|
5818
|
+
_settle(pact || (pact = new _Pact()), 2, e);
|
|
5819
|
+
}
|
|
5820
|
+
}
|
|
5821
|
+
|
|
5822
|
+
_cycle();
|
|
5823
|
+
|
|
5824
|
+
return pact;
|
|
5825
|
+
}
|
|
5826
|
+
|
|
5827
|
+
function _forIn(target, body, check) {
|
|
5828
|
+
var keys = [];
|
|
5829
|
+
|
|
5830
|
+
for (var key in target) {
|
|
5831
|
+
keys.push(key);
|
|
5832
|
+
}
|
|
5833
|
+
|
|
5834
|
+
return _forTo(keys, function (i) {
|
|
5835
|
+
return body(keys[i]);
|
|
5836
|
+
}, check);
|
|
5837
|
+
}
|
|
5838
|
+
|
|
5839
|
+
function _continue(value, then) {
|
|
5840
|
+
return value && value.then ? value.then(then) : then(value);
|
|
5841
|
+
}
|
|
5842
|
+
|
|
5691
5843
|
function _await(value, then, direct) {
|
|
5692
5844
|
if (direct) {
|
|
5693
5845
|
return then ? then(value) : value;
|
|
@@ -5700,6 +5852,16 @@ function _await(value, then, direct) {
|
|
|
5700
5852
|
return then ? value.then(then) : value;
|
|
5701
5853
|
}
|
|
5702
5854
|
|
|
5855
|
+
function _invoke(body, then) {
|
|
5856
|
+
var result = body();
|
|
5857
|
+
|
|
5858
|
+
if (result && result.then) {
|
|
5859
|
+
return result.then(then);
|
|
5860
|
+
}
|
|
5861
|
+
|
|
5862
|
+
return then(result);
|
|
5863
|
+
}
|
|
5864
|
+
|
|
5703
5865
|
window.isMobile = 1;
|
|
5704
5866
|
if (typeof window._ == 'undefined') window._ = {};
|
|
5705
5867
|
var _$1 = window._;
|
|
@@ -6042,21 +6204,63 @@ var f = {
|
|
|
6042
6204
|
if (![].contains) Object.defineProperty(Array.prototype, 'contains', f);
|
|
6043
6205
|
if (!"".contains) Object.defineProperty(String.prototype, 'contains', f);
|
|
6044
6206
|
_$1 = Object.assign(_$1, {
|
|
6045
|
-
getStoredList: function getStoredList(store) {
|
|
6207
|
+
getStoredList: function getStoredList(store, params) {
|
|
6046
6208
|
try {
|
|
6047
|
-
var
|
|
6048
|
-
|
|
6049
|
-
objectStore = t.objectStore(store); //,d=[];
|
|
6209
|
+
var _exit3 = false;
|
|
6210
|
+
var loadedStores;
|
|
6050
6211
|
|
|
6212
|
+
try {
|
|
6213
|
+
loadedStores = JSON.parse(sessionStorage.getItem('loadedStores'));
|
|
6214
|
+
} catch (e) {
|
|
6215
|
+
loadedStores = {};
|
|
6216
|
+
}
|
|
6051
6217
|
|
|
6052
|
-
|
|
6218
|
+
return _invoke(function () {
|
|
6219
|
+
if (!loadedStores[store] && _$1.networkStatus.connected) {
|
|
6220
|
+
//await
|
|
6221
|
+
//load info to store
|
|
6222
|
+
var e = _$1.stores.filter(function (e) {
|
|
6223
|
+
return e[0] == store;
|
|
6224
|
+
});
|
|
6225
|
+
|
|
6226
|
+
console.log(params);
|
|
6227
|
+
return _await(axios$2.get(e[2]), function (data) {
|
|
6228
|
+
var objectStore = db.transaction([e[1]], "readwrite").objectStore(e[1]);
|
|
6229
|
+
data = data.data;
|
|
6230
|
+
return _await(objectStore.clear(), function () {
|
|
6231
|
+
var _exit2 = false;
|
|
6232
|
+
return _continue(_forIn(data, function (i) {
|
|
6233
|
+
return _catch(function () {
|
|
6234
|
+
return _awaitIgnored(objectStore.add(data[i]));
|
|
6235
|
+
}, function (exception) {
|
|
6236
|
+
throw exception;
|
|
6237
|
+
});
|
|
6238
|
+
}, function () {
|
|
6239
|
+
return _exit2;
|
|
6240
|
+
}), function (_result3) {
|
|
6241
|
+
if (_exit2) ;
|
|
6242
|
+
loadedStores[store] = 1;
|
|
6243
|
+
sessionStorage.setItem('loadedStores', JSON.stringify(loadedStores));
|
|
6244
|
+
});
|
|
6245
|
+
});
|
|
6246
|
+
});
|
|
6247
|
+
}
|
|
6248
|
+
}, function (_result) {
|
|
6249
|
+
if (_exit3) return _result;
|
|
6250
|
+
var p = new Promise(function (resolve) {
|
|
6251
|
+
var t = _$1.db.transaction(store),
|
|
6252
|
+
objectStore = t.objectStore(store); //,d=[];
|
|
6053
6253
|
|
|
6054
|
-
r.onsuccess = function () {
|
|
6055
|
-
resolve(r.result);
|
|
6056
|
-
}; //t.onerror = event => reject(event.target.error);
|
|
6057
6254
|
|
|
6255
|
+
var r = objectStore.getAll();
|
|
6256
|
+
|
|
6257
|
+
r.onsuccess = function () {
|
|
6258
|
+
resolve(r.result);
|
|
6259
|
+
}; //t.onerror = event => reject(event.target.error);
|
|
6260
|
+
|
|
6261
|
+
});
|
|
6262
|
+
return _await(p); //console.log(result);
|
|
6058
6263
|
});
|
|
6059
|
-
return _await(p); //console.log(result);
|
|
6060
6264
|
} catch (e) {
|
|
6061
6265
|
return Promise.reject(e);
|
|
6062
6266
|
}
|
|
@@ -6680,12 +6884,12 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6680
6884
|
this.networkStatus.connected = v;
|
|
6681
6885
|
},
|
|
6682
6886
|
cleanedFilters: function cleanedFilters() {
|
|
6683
|
-
var
|
|
6887
|
+
var _this2 = this;
|
|
6684
6888
|
|
|
6685
6889
|
if (this.$el) {
|
|
6686
6890
|
if (this.t) clearTimeout(this.t);
|
|
6687
6891
|
this.t = setTimeout(function () {
|
|
6688
|
-
|
|
6892
|
+
_this2.refresh();
|
|
6689
6893
|
}, 1200);
|
|
6690
6894
|
}
|
|
6691
6895
|
}
|
|
@@ -7436,10 +7640,10 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
7436
7640
|
},
|
|
7437
7641
|
toast: function toast(msx, callback) {
|
|
7438
7642
|
try {
|
|
7439
|
-
var
|
|
7643
|
+
var _this4 = this;
|
|
7440
7644
|
|
|
7441
7645
|
if (msx.message && !msx.duration) msx.duration = 2000;
|
|
7442
|
-
return _await(
|
|
7646
|
+
return _await(_this4.$ionic.toastController.create(msx.message ? msx : {
|
|
7443
7647
|
message: msx,
|
|
7444
7648
|
duration: 2000
|
|
7445
7649
|
}), function (toast) {
|
|
@@ -7485,9 +7689,9 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
7485
7689
|
},
|
|
7486
7690
|
sync: function sync(e) {
|
|
7487
7691
|
try {
|
|
7488
|
-
var
|
|
7692
|
+
var _this6 = this;
|
|
7489
7693
|
|
|
7490
|
-
var me =
|
|
7694
|
+
var me = _this6;
|
|
7491
7695
|
var p = me.$el;
|
|
7492
7696
|
var f = p.querySelector("form");
|
|
7493
7697
|
var action = f.getAttribute('action'); //console.log('Action='+action);
|
|
@@ -7581,15 +7785,15 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
7581
7785
|
},
|
|
7582
7786
|
save: function save() {
|
|
7583
7787
|
try {
|
|
7584
|
-
var
|
|
7788
|
+
var _this8 = this;
|
|
7585
7789
|
|
|
7586
|
-
var me =
|
|
7790
|
+
var me = _this8;
|
|
7587
7791
|
me.$forceUpdate();
|
|
7588
7792
|
var p = me.$el; //Se debe buscar si abajo esta el form
|
|
7589
7793
|
|
|
7590
7794
|
var f = p.querySelector("form");
|
|
7591
7795
|
|
|
7592
|
-
var va =
|
|
7796
|
+
var va = _this8.validate(f);
|
|
7593
7797
|
|
|
7594
7798
|
return function () {
|
|
7595
7799
|
if (va) {
|
|
@@ -7606,7 +7810,7 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
7606
7810
|
}
|
|
7607
7811
|
}
|
|
7608
7812
|
|
|
7609
|
-
var o0 =
|
|
7813
|
+
var o0 = _this8._data.data ? _this8._data.data : _this8._data.o;
|
|
7610
7814
|
var o = JSON.parse(JSON.stringify(o0));
|
|
7611
7815
|
if (me.process) o = me.process(o); //console.log('o2='+o);
|
|
7612
7816
|
|