isobit-ui 0.2.5 → 0.2.7

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * isobit-ui v0.2.4
2
+ * isobit-ui v0.2.6
3
3
  * (c) Erik Alarcon Pinedo
4
4
  * Released under the MIT License.
5
5
  */
@@ -2652,6 +2652,7 @@ var script$d = {
2652
2652
  var request;
2653
2653
 
2654
2654
  if (me.gql) {
2655
+ var gql = me.gql;
2655
2656
  var query = 'query{' + Object.keys(gql)[0] + '(offset:' + (me.page - 1) * pagination + ' limit:' + me.pagination + '){\ndata{' + gql[Object.keys(gql)[0]] + '}\nsize\n}\n}';
2656
2657
  request = axios.post(me.src, {
2657
2658
  query: query
@@ -2666,12 +2667,18 @@ var script$d = {
2666
2667
  if (r.data && r.data.error) {
2667
2668
  MsgBox(r.data.error);
2668
2669
  } else {
2669
- me.data = r.data.data ? r.data.data : r.data;
2670
+ var re = r.data.data ? r.data.data : r.data;
2670
2671
 
2671
- if (r.data && r.data.hasOwnProperty('size') && pagination) {
2672
- me.pages = Math.ceil(r.data.size / pagination);
2672
+ if (me.gql) {
2673
+ re = r.data[Object.keys(me.gql)[0]];
2674
+ }
2675
+
2676
+ me.data = re.data;
2677
+
2678
+ if (re && re.hasOwnProperty('size') && pagination) {
2679
+ me.pages = Math.ceil(re.size / pagination);
2673
2680
  if (me.page > me.pages) me.page = 1;
2674
- me.size = r.data.size;
2681
+ me.size = re.size;
2675
2682
  } //console.log('======');
2676
2683
  //console.log(me.data);
2677
2684
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isobit-ui",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "description": "Vue component to play videos",
6
6
  "keywords": [