isobit-ui 0.2.49 → 0.2.51
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 +31 -24
- 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.50
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1196,6 +1196,8 @@ var script$j = {
|
|
|
1196
1196
|
event.height = h; //console.log(el.children[0]);
|
|
1197
1197
|
|
|
1198
1198
|
el.children[0].dispatchEvent(event);
|
|
1199
|
+
event.$target = me;
|
|
1200
|
+
me.$emit("resize", event);
|
|
1199
1201
|
}
|
|
1200
1202
|
}
|
|
1201
1203
|
},
|
|
@@ -1937,6 +1939,13 @@ var script$e = {
|
|
|
1937
1939
|
created: function created() {
|
|
1938
1940
|
this.closed = this.closable;
|
|
1939
1941
|
},
|
|
1942
|
+
mounted: function mounted() {
|
|
1943
|
+
var me = this;
|
|
1944
|
+
me.$el.addEventListener("parentResize", function (event) {
|
|
1945
|
+
event.$target = me;
|
|
1946
|
+
me.$emit("resize", event);
|
|
1947
|
+
});
|
|
1948
|
+
},
|
|
1940
1949
|
updated: function updated() {
|
|
1941
1950
|
var me = this;
|
|
1942
1951
|
setTimeout(function () {
|
|
@@ -2037,7 +2046,7 @@ function _await$2(value, then, direct) {
|
|
|
2037
2046
|
return then ? value.then(then) : value;
|
|
2038
2047
|
}
|
|
2039
2048
|
|
|
2040
|
-
var template = "\n\t<div v-bind:class={reflow:reflow}
|
|
2049
|
+
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";
|
|
2041
2050
|
|
|
2042
2051
|
function _invoke$1(body, then) {
|
|
2043
2052
|
var result = body();
|
|
@@ -6667,44 +6676,42 @@ window.ui = _$1.ui = function (cfg) {
|
|
|
6667
6676
|
}
|
|
6668
6677
|
},
|
|
6669
6678
|
computed: {
|
|
6670
|
-
|
|
6671
|
-
return
|
|
6679
|
+
app: function app() {
|
|
6680
|
+
return _$1.app;
|
|
6672
6681
|
},
|
|
6673
6682
|
user: function user() {
|
|
6674
|
-
return
|
|
6683
|
+
return _$1.app.session;
|
|
6675
6684
|
},
|
|
6676
|
-
|
|
6677
|
-
return
|
|
6685
|
+
online: function online() {
|
|
6686
|
+
return this.app.networkStatus.connected;
|
|
6678
6687
|
},
|
|
6679
6688
|
perms: function perms() {
|
|
6680
6689
|
return this.user.perms || this.user.allcaps || {};
|
|
6681
6690
|
},
|
|
6682
|
-
rowSelectedCount: function rowSelectedCount() {
|
|
6683
|
-
var me = this; //console.log(me.$children);
|
|
6684
|
-
|
|
6685
|
-
if (!me.$children[0]) return 0;
|
|
6686
|
-
var t = me.$children[0].$children[0];
|
|
6687
|
-
return t ? t.selected.length : 0;
|
|
6688
|
-
},
|
|
6689
|
-
baseURL: function baseURL() {
|
|
6690
|
-
return Vue$1.baseURL ? Vue$1.baseURL : axios$2.defaults.baseURL;
|
|
6691
|
-
},
|
|
6692
6691
|
session: {
|
|
6693
6692
|
get: function get() {
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
if (!me._session) {
|
|
6693
|
+
if (!_$1._session) {
|
|
6697
6694
|
var s = localStorage.getItem('session');
|
|
6698
6695
|
if (s) s = JSON.parse(s);else s = {};
|
|
6699
|
-
|
|
6696
|
+
_$1._session = s;
|
|
6700
6697
|
}
|
|
6701
6698
|
|
|
6702
|
-
return
|
|
6699
|
+
return _$1._session;
|
|
6703
6700
|
},
|
|
6704
6701
|
set: function set(d) {
|
|
6705
|
-
localStorage.setItem('session', JSON.stringify(d));
|
|
6706
|
-
|
|
6702
|
+
if (!d) localStorage.removeItem('session');else localStorage.setItem('session', JSON.stringify(d));
|
|
6703
|
+
_$1._session = d;
|
|
6707
6704
|
}
|
|
6705
|
+
},
|
|
6706
|
+
rowSelectedCount: function rowSelectedCount() {
|
|
6707
|
+
var me = this; //console.log(me.$children);
|
|
6708
|
+
|
|
6709
|
+
if (!me.$children[0]) return 0;
|
|
6710
|
+
var t = me.$children[0].$children[0];
|
|
6711
|
+
return t ? t.selected.length : 0;
|
|
6712
|
+
},
|
|
6713
|
+
baseURL: function baseURL() {
|
|
6714
|
+
return Vue$1.baseURL ? Vue$1.baseURL : axios$2.defaults.baseURL;
|
|
6708
6715
|
}
|
|
6709
6716
|
},
|
|
6710
6717
|
data: function data() {
|