@iankibetsh/shframework 5.3.6 → 5.3.8
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/library.js +26 -18
- package/dist/library.mjs +27 -19
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -3968,22 +3968,24 @@ return (_ctx, _cache) => {
|
|
|
3968
3968
|
}, [
|
|
3969
3969
|
vue.renderSlot(_ctx.$slots, "default")
|
|
3970
3970
|
], 10 /* CLASS, PROPS */, _hoisted_1$i),
|
|
3971
|
-
vue.
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3971
|
+
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
3972
|
+
vue.createVNode(script$p, {
|
|
3973
|
+
"modal-size": __props.modalSize,
|
|
3974
|
+
"modal-id": vue.unref(realModalId),
|
|
3975
|
+
"modal-title": __props.modalTitle
|
|
3976
|
+
}, {
|
|
3977
|
+
default: vue.withCtx(() => [
|
|
3978
|
+
(vue.openBlock(), vue.createBlock(script$q, vue.mergeProps({
|
|
3979
|
+
onSuccess: success,
|
|
3980
|
+
onFieldChanged: fieldChanged,
|
|
3981
|
+
onFormSubmitted: formSubmitted,
|
|
3982
|
+
onFormError: formError,
|
|
3983
|
+
key: JSON.stringify(__props.currentData ?? {})
|
|
3984
|
+
}, props), null, 16 /* FULL_PROPS */))
|
|
3985
|
+
]),
|
|
3986
|
+
_: 1 /* STABLE */
|
|
3987
|
+
}, 8 /* PROPS */, ["modal-size", "modal-id", "modal-title"])
|
|
3988
|
+
]))
|
|
3987
3989
|
], 64 /* STABLE_FRAGMENT */))
|
|
3988
3990
|
}
|
|
3989
3991
|
}
|
|
@@ -5207,7 +5209,8 @@ const __default__ = {
|
|
|
5207
5209
|
range: null,
|
|
5208
5210
|
from: null,
|
|
5209
5211
|
to: null,
|
|
5210
|
-
period: null
|
|
5212
|
+
period: null,
|
|
5213
|
+
lastId: null
|
|
5211
5214
|
}
|
|
5212
5215
|
},
|
|
5213
5216
|
mounted(){
|
|
@@ -5373,6 +5376,7 @@ const __default__ = {
|
|
|
5373
5376
|
from: this.from,
|
|
5374
5377
|
to: this.to,
|
|
5375
5378
|
period: this.period,
|
|
5379
|
+
lastId: this.lastId,
|
|
5376
5380
|
};
|
|
5377
5381
|
shApis.doPost(this.endPoint, data).then(res => {
|
|
5378
5382
|
this.downloading = false;
|
|
@@ -5412,7 +5416,8 @@ const __default__ = {
|
|
|
5412
5416
|
from: this.from,
|
|
5413
5417
|
to: this.to,
|
|
5414
5418
|
period: this.period,
|
|
5415
|
-
exact: this.exactMatch
|
|
5419
|
+
exact: this.exactMatch,
|
|
5420
|
+
lastId: this.lastId
|
|
5416
5421
|
};
|
|
5417
5422
|
// remove empty values
|
|
5418
5423
|
Object.keys(data).forEach(key => {
|
|
@@ -5437,6 +5442,7 @@ const __default__ = {
|
|
|
5437
5442
|
if (this.page < 2 && this.cacheKey) {
|
|
5438
5443
|
shStorage.setItem('sh_table_cache_' + this.cacheKey, response.data);
|
|
5439
5444
|
}
|
|
5445
|
+
|
|
5440
5446
|
this.pagination_data = {
|
|
5441
5447
|
current: response.current_page,
|
|
5442
5448
|
start: response.from,
|
|
@@ -5449,6 +5455,8 @@ const __default__ = {
|
|
|
5449
5455
|
if (!this.headers && response.total > 0) {
|
|
5450
5456
|
this.tableHeaders = Object.keys(response.data[0]);
|
|
5451
5457
|
}
|
|
5458
|
+
// get id value of the last record
|
|
5459
|
+
this.lastId = response.data.length > 0 ? response.data[response.data.length - 1].id : null;
|
|
5452
5460
|
if (append) {
|
|
5453
5461
|
this.records.push(...response.data);
|
|
5454
5462
|
let totalShown = response.total > response.per_page ? response.per_page * response.current_page : response.total;
|
package/dist/library.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import moment from 'moment';
|
|
|
3
3
|
import Swal from 'sweetalert2';
|
|
4
4
|
import { Modal, Offcanvas } from 'bootstrap';
|
|
5
5
|
import NProgress from 'nprogress';
|
|
6
|
-
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, watch, unref, normalizeClass, createBlock, resolveDynamicComponent, resolveComponent, inject, mergeProps, renderSlot, normalizeStyle, computed, createVNode, withCtx, vModelCheckbox, shallowRef, normalizeProps, markRaw, isRef } from 'vue';
|
|
6
|
+
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, watch, unref, normalizeClass, createBlock, resolveDynamicComponent, resolveComponent, inject, mergeProps, renderSlot, normalizeStyle, computed, Teleport, createVNode, withCtx, vModelCheckbox, shallowRef, normalizeProps, markRaw, isRef } from 'vue';
|
|
7
7
|
import _ from 'lodash';
|
|
8
8
|
import { defineStore, storeToRefs } from 'pinia';
|
|
9
9
|
import { useRoute, useRouter } from 'vue-router';
|
|
@@ -3956,22 +3956,24 @@ return (_ctx, _cache) => {
|
|
|
3956
3956
|
}, [
|
|
3957
3957
|
renderSlot(_ctx.$slots, "default")
|
|
3958
3958
|
], 10 /* CLASS, PROPS */, _hoisted_1$i),
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
(
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3959
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3960
|
+
createVNode(script$p, {
|
|
3961
|
+
"modal-size": __props.modalSize,
|
|
3962
|
+
"modal-id": unref(realModalId),
|
|
3963
|
+
"modal-title": __props.modalTitle
|
|
3964
|
+
}, {
|
|
3965
|
+
default: withCtx(() => [
|
|
3966
|
+
(openBlock(), createBlock(script$q, mergeProps({
|
|
3967
|
+
onSuccess: success,
|
|
3968
|
+
onFieldChanged: fieldChanged,
|
|
3969
|
+
onFormSubmitted: formSubmitted,
|
|
3970
|
+
onFormError: formError,
|
|
3971
|
+
key: JSON.stringify(__props.currentData ?? {})
|
|
3972
|
+
}, props), null, 16 /* FULL_PROPS */))
|
|
3973
|
+
]),
|
|
3974
|
+
_: 1 /* STABLE */
|
|
3975
|
+
}, 8 /* PROPS */, ["modal-size", "modal-id", "modal-title"])
|
|
3976
|
+
]))
|
|
3975
3977
|
], 64 /* STABLE_FRAGMENT */))
|
|
3976
3978
|
}
|
|
3977
3979
|
}
|
|
@@ -5195,7 +5197,8 @@ const __default__ = {
|
|
|
5195
5197
|
range: null,
|
|
5196
5198
|
from: null,
|
|
5197
5199
|
to: null,
|
|
5198
|
-
period: null
|
|
5200
|
+
period: null,
|
|
5201
|
+
lastId: null
|
|
5199
5202
|
}
|
|
5200
5203
|
},
|
|
5201
5204
|
mounted(){
|
|
@@ -5361,6 +5364,7 @@ const __default__ = {
|
|
|
5361
5364
|
from: this.from,
|
|
5362
5365
|
to: this.to,
|
|
5363
5366
|
period: this.period,
|
|
5367
|
+
lastId: this.lastId,
|
|
5364
5368
|
};
|
|
5365
5369
|
shApis.doPost(this.endPoint, data).then(res => {
|
|
5366
5370
|
this.downloading = false;
|
|
@@ -5400,7 +5404,8 @@ const __default__ = {
|
|
|
5400
5404
|
from: this.from,
|
|
5401
5405
|
to: this.to,
|
|
5402
5406
|
period: this.period,
|
|
5403
|
-
exact: this.exactMatch
|
|
5407
|
+
exact: this.exactMatch,
|
|
5408
|
+
lastId: this.lastId
|
|
5404
5409
|
};
|
|
5405
5410
|
// remove empty values
|
|
5406
5411
|
Object.keys(data).forEach(key => {
|
|
@@ -5425,6 +5430,7 @@ const __default__ = {
|
|
|
5425
5430
|
if (this.page < 2 && this.cacheKey) {
|
|
5426
5431
|
shStorage.setItem('sh_table_cache_' + this.cacheKey, response.data);
|
|
5427
5432
|
}
|
|
5433
|
+
|
|
5428
5434
|
this.pagination_data = {
|
|
5429
5435
|
current: response.current_page,
|
|
5430
5436
|
start: response.from,
|
|
@@ -5437,6 +5443,8 @@ const __default__ = {
|
|
|
5437
5443
|
if (!this.headers && response.total > 0) {
|
|
5438
5444
|
this.tableHeaders = Object.keys(response.data[0]);
|
|
5439
5445
|
}
|
|
5446
|
+
// get id value of the last record
|
|
5447
|
+
this.lastId = response.data.length > 0 ? response.data[response.data.length - 1].id : null;
|
|
5440
5448
|
if (append) {
|
|
5441
5449
|
this.records.push(...response.data);
|
|
5442
5450
|
let totalShown = response.total > response.per_page ? response.per_page * response.current_page : response.total;
|