@iankibetsh/shframework 0.1.0 → 0.1.5
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/dist/library.mjs.css +0 -28
- package/dist/library.js +17 -20
- package/dist/library.mjs +15 -18
- package/package.json +7 -6
|
@@ -31,34 +31,6 @@
|
|
|
31
31
|
opacity: 0.5;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.nav.nav-tabs .nav-item .nav-link{
|
|
35
|
-
color: unset;
|
|
36
|
-
border: none!important;
|
|
37
|
-
padding: .75rem 1rem;
|
|
38
|
-
margin: 0;
|
|
39
|
-
font-size: 1.25rem;
|
|
40
|
-
}
|
|
41
|
-
.active.nav-link {
|
|
42
|
-
/*color: #8b8f9a !important;*/
|
|
43
|
-
color: var(--s-primary) !important;
|
|
44
|
-
background-color: transparent !important;
|
|
45
|
-
border-color: #dee2e6 #dee2e6 #fff;
|
|
46
|
-
}
|
|
47
|
-
.active.nav-link{
|
|
48
|
-
position: relative;
|
|
49
|
-
}
|
|
50
|
-
.nav.nav-tabs .nav-item .active.nav-link:before {
|
|
51
|
-
content: "";
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 2px;
|
|
54
|
-
/*background-color: #ffc107;*/
|
|
55
|
-
background-color: var(--s-primary);
|
|
56
|
-
position: absolute;
|
|
57
|
-
bottom: 0;
|
|
58
|
-
left: 50%;
|
|
59
|
-
transform: translateX(-50%);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
34
|
.single-mobile-req{
|
|
63
35
|
border: 1px solid #eeeeee;
|
|
64
36
|
border-radius: 0.25rem;
|
package/dist/library.js
CHANGED
|
@@ -2622,7 +2622,7 @@ var helpers = {
|
|
|
2622
2622
|
|
|
2623
2623
|
var script$1 = {
|
|
2624
2624
|
name: 'sh-table',
|
|
2625
|
-
props: ['
|
|
2625
|
+
props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'mobile_view', 'hideSearch', 'custom_template', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields'],
|
|
2626
2626
|
inject: ['channel', 'global'],
|
|
2627
2627
|
data () {
|
|
2628
2628
|
return {
|
|
@@ -2746,7 +2746,7 @@ var script$1 = {
|
|
|
2746
2746
|
titles: headers,
|
|
2747
2747
|
export: 1
|
|
2748
2748
|
};
|
|
2749
|
-
apis.doPost(this.
|
|
2749
|
+
apis.doPost(this.endPoint, data).then(res => {
|
|
2750
2750
|
this.downloading = false;
|
|
2751
2751
|
if (res.data.file) {
|
|
2752
2752
|
const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
|
|
@@ -2776,7 +2776,7 @@ var script$1 = {
|
|
|
2776
2776
|
if (this.pagination_data) {
|
|
2777
2777
|
this.pagination_data.loading = 1;
|
|
2778
2778
|
}
|
|
2779
|
-
apis.doGet(this.
|
|
2779
|
+
apis.doGet(this.endPoint, data).then(req => {
|
|
2780
2780
|
this.loading = 'done';
|
|
2781
2781
|
const response = req.data.data;
|
|
2782
2782
|
this.pagination_data = {
|
|
@@ -2804,7 +2804,7 @@ var script$1 = {
|
|
|
2804
2804
|
this.records = response.data;
|
|
2805
2805
|
}
|
|
2806
2806
|
}).catch(reason => {
|
|
2807
|
-
const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.
|
|
2807
|
+
const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.endPoint})`;
|
|
2808
2808
|
this.loading_error = error;
|
|
2809
2809
|
this.loading = 'error';
|
|
2810
2810
|
});
|
|
@@ -3254,8 +3254,7 @@ script$1.__file = "src/views/ShTable.vue";
|
|
|
3254
3254
|
|
|
3255
3255
|
var script = {
|
|
3256
3256
|
name: 'ShTabs',
|
|
3257
|
-
props: ['tabs', '
|
|
3258
|
-
inject: ['global'],
|
|
3257
|
+
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts'],
|
|
3259
3258
|
data () {
|
|
3260
3259
|
return {
|
|
3261
3260
|
currentTab: ''
|
|
@@ -3264,18 +3263,17 @@ var script = {
|
|
|
3264
3263
|
watch: {
|
|
3265
3264
|
refreshStatus: function (state) {
|
|
3266
3265
|
if (state === 0) {
|
|
3267
|
-
if (this.
|
|
3268
|
-
this.setTabCounts(this.
|
|
3266
|
+
if (this.tabCounts) {
|
|
3267
|
+
this.setTabCounts(this.tabCounts);
|
|
3269
3268
|
}
|
|
3270
3269
|
}
|
|
3271
3270
|
},
|
|
3272
|
-
|
|
3271
|
+
tabCounts: function () {
|
|
3273
3272
|
this.resetTabCounts();
|
|
3274
3273
|
}
|
|
3275
3274
|
},
|
|
3276
3275
|
computed: {
|
|
3277
3276
|
refreshStatus () {
|
|
3278
|
-
return this.global.state.refetch
|
|
3279
3277
|
}
|
|
3280
3278
|
},
|
|
3281
3279
|
mounted () {
|
|
@@ -3298,8 +3296,8 @@ var script = {
|
|
|
3298
3296
|
} else {
|
|
3299
3297
|
this.currentTab = arr[arr.length - 1];
|
|
3300
3298
|
}
|
|
3301
|
-
if (this.
|
|
3302
|
-
this.setTabCounts(this.
|
|
3299
|
+
if (this.tabCounts) {
|
|
3300
|
+
this.setTabCounts(this.tabCounts);
|
|
3303
3301
|
}
|
|
3304
3302
|
},
|
|
3305
3303
|
tabExistsInUrl: function () {
|
|
@@ -3348,7 +3346,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3348
3346
|
vue.createVNode(_component_router_link, {
|
|
3349
3347
|
"active-class": 'active',
|
|
3350
3348
|
class: "nav-link text-capitalize",
|
|
3351
|
-
to: $props.
|
|
3349
|
+
to: $props.baseUrl+'/tab/'+tab,
|
|
3352
3350
|
role: "tab",
|
|
3353
3351
|
id: 'sh_tab_' + tab
|
|
3354
3352
|
}, {
|
|
@@ -3363,15 +3361,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3363
3361
|
vue.createElementVNode("div", _hoisted_3, [
|
|
3364
3362
|
vue.createVNode(_component_router_view, {
|
|
3365
3363
|
current_tab: $data.currentTab,
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
}, null, 8 /* PROPS */, ["current_tab", "
|
|
3364
|
+
sharedData: $props.sharedData,
|
|
3365
|
+
tabCounts: $props.tabCounts
|
|
3366
|
+
}, null, 8 /* PROPS */, ["current_tab", "sharedData", "tabCounts"])
|
|
3369
3367
|
])
|
|
3370
3368
|
]))
|
|
3371
3369
|
}
|
|
3372
3370
|
|
|
3373
3371
|
script.render = render;
|
|
3374
|
-
script.__scopeId = "data-v-3628b6a6";
|
|
3375
3372
|
script.__file = "src/views/ShTabs.vue";
|
|
3376
3373
|
|
|
3377
3374
|
const useUserStore = pinia.defineStore('user-store', {
|
|
@@ -3453,7 +3450,7 @@ exports.ShModal = script$3;
|
|
|
3453
3450
|
exports.ShPhone = script$6;
|
|
3454
3451
|
exports.ShTable = script$1;
|
|
3455
3452
|
exports.ShTabs = script;
|
|
3456
|
-
exports.
|
|
3457
|
-
exports.
|
|
3458
|
-
exports.
|
|
3453
|
+
exports.shApis = apis;
|
|
3454
|
+
exports.shRepo = helpers;
|
|
3455
|
+
exports.shStorage = shstorage;
|
|
3459
3456
|
exports.useUserStore = useUserStore;
|
package/dist/library.mjs
CHANGED
|
@@ -2611,7 +2611,7 @@ var helpers = {
|
|
|
2611
2611
|
|
|
2612
2612
|
var script$1 = {
|
|
2613
2613
|
name: 'sh-table',
|
|
2614
|
-
props: ['
|
|
2614
|
+
props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'mobile_view', 'hideSearch', 'custom_template', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields'],
|
|
2615
2615
|
inject: ['channel', 'global'],
|
|
2616
2616
|
data () {
|
|
2617
2617
|
return {
|
|
@@ -2735,7 +2735,7 @@ var script$1 = {
|
|
|
2735
2735
|
titles: headers,
|
|
2736
2736
|
export: 1
|
|
2737
2737
|
};
|
|
2738
|
-
apis.doPost(this.
|
|
2738
|
+
apis.doPost(this.endPoint, data).then(res => {
|
|
2739
2739
|
this.downloading = false;
|
|
2740
2740
|
if (res.data.file) {
|
|
2741
2741
|
const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
|
|
@@ -2765,7 +2765,7 @@ var script$1 = {
|
|
|
2765
2765
|
if (this.pagination_data) {
|
|
2766
2766
|
this.pagination_data.loading = 1;
|
|
2767
2767
|
}
|
|
2768
|
-
apis.doGet(this.
|
|
2768
|
+
apis.doGet(this.endPoint, data).then(req => {
|
|
2769
2769
|
this.loading = 'done';
|
|
2770
2770
|
const response = req.data.data;
|
|
2771
2771
|
this.pagination_data = {
|
|
@@ -2793,7 +2793,7 @@ var script$1 = {
|
|
|
2793
2793
|
this.records = response.data;
|
|
2794
2794
|
}
|
|
2795
2795
|
}).catch(reason => {
|
|
2796
|
-
const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.
|
|
2796
|
+
const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.endPoint})`;
|
|
2797
2797
|
this.loading_error = error;
|
|
2798
2798
|
this.loading = 'error';
|
|
2799
2799
|
});
|
|
@@ -3243,8 +3243,7 @@ script$1.__file = "src/views/ShTable.vue";
|
|
|
3243
3243
|
|
|
3244
3244
|
var script = {
|
|
3245
3245
|
name: 'ShTabs',
|
|
3246
|
-
props: ['tabs', '
|
|
3247
|
-
inject: ['global'],
|
|
3246
|
+
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts'],
|
|
3248
3247
|
data () {
|
|
3249
3248
|
return {
|
|
3250
3249
|
currentTab: ''
|
|
@@ -3253,18 +3252,17 @@ var script = {
|
|
|
3253
3252
|
watch: {
|
|
3254
3253
|
refreshStatus: function (state) {
|
|
3255
3254
|
if (state === 0) {
|
|
3256
|
-
if (this.
|
|
3257
|
-
this.setTabCounts(this.
|
|
3255
|
+
if (this.tabCounts) {
|
|
3256
|
+
this.setTabCounts(this.tabCounts);
|
|
3258
3257
|
}
|
|
3259
3258
|
}
|
|
3260
3259
|
},
|
|
3261
|
-
|
|
3260
|
+
tabCounts: function () {
|
|
3262
3261
|
this.resetTabCounts();
|
|
3263
3262
|
}
|
|
3264
3263
|
},
|
|
3265
3264
|
computed: {
|
|
3266
3265
|
refreshStatus () {
|
|
3267
|
-
return this.global.state.refetch
|
|
3268
3266
|
}
|
|
3269
3267
|
},
|
|
3270
3268
|
mounted () {
|
|
@@ -3287,8 +3285,8 @@ var script = {
|
|
|
3287
3285
|
} else {
|
|
3288
3286
|
this.currentTab = arr[arr.length - 1];
|
|
3289
3287
|
}
|
|
3290
|
-
if (this.
|
|
3291
|
-
this.setTabCounts(this.
|
|
3288
|
+
if (this.tabCounts) {
|
|
3289
|
+
this.setTabCounts(this.tabCounts);
|
|
3292
3290
|
}
|
|
3293
3291
|
},
|
|
3294
3292
|
tabExistsInUrl: function () {
|
|
@@ -3337,7 +3335,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3337
3335
|
createVNode(_component_router_link, {
|
|
3338
3336
|
"active-class": 'active',
|
|
3339
3337
|
class: "nav-link text-capitalize",
|
|
3340
|
-
to: $props.
|
|
3338
|
+
to: $props.baseUrl+'/tab/'+tab,
|
|
3341
3339
|
role: "tab",
|
|
3342
3340
|
id: 'sh_tab_' + tab
|
|
3343
3341
|
}, {
|
|
@@ -3352,15 +3350,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3352
3350
|
createElementVNode("div", _hoisted_3, [
|
|
3353
3351
|
createVNode(_component_router_view, {
|
|
3354
3352
|
current_tab: $data.currentTab,
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
}, null, 8 /* PROPS */, ["current_tab", "
|
|
3353
|
+
sharedData: $props.sharedData,
|
|
3354
|
+
tabCounts: $props.tabCounts
|
|
3355
|
+
}, null, 8 /* PROPS */, ["current_tab", "sharedData", "tabCounts"])
|
|
3358
3356
|
])
|
|
3359
3357
|
]))
|
|
3360
3358
|
}
|
|
3361
3359
|
|
|
3362
3360
|
script.render = render;
|
|
3363
|
-
script.__scopeId = "data-v-3628b6a6";
|
|
3364
3361
|
script.__file = "src/views/ShTabs.vue";
|
|
3365
3362
|
|
|
3366
3363
|
const useUserStore = defineStore('user-store', {
|
|
@@ -3436,4 +3433,4 @@ const useUserStore = defineStore('user-store', {
|
|
|
3436
3433
|
}
|
|
3437
3434
|
});
|
|
3438
3435
|
|
|
3439
|
-
export { script$4 as ShCanvas, script$5 as ShForm, script$3 as ShModal, script$6 as ShPhone, script$1 as ShTable, script as ShTabs, apis, helpers, shstorage, useUserStore };
|
|
3436
|
+
export { script$4 as ShCanvas, script$5 as ShForm, script$3 as ShModal, script$6 as ShPhone, script$1 as ShTable, script as ShTabs, apis as shApis, helpers as shRepo, shstorage as shStorage, useUserStore };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iankibetsh/shframework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Vue library for handling laravel backend",
|
|
5
5
|
"main": "dist/library.js",
|
|
6
6
|
"module": "dist/library.mjs",
|
|
@@ -9,25 +9,26 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
-
"build": "rollup -c"
|
|
12
|
+
"build": "rollup -c",
|
|
13
|
+
"docs:dev": "vuepress dev docs",
|
|
14
|
+
"docs:build": "vuepress build docs"
|
|
13
15
|
},
|
|
14
16
|
"keywords": [],
|
|
15
17
|
"author": "",
|
|
16
18
|
"license": "ISC",
|
|
17
19
|
"peerDependencies": {
|
|
18
20
|
"axios": "^0.27.2",
|
|
19
|
-
"bootstrap": "^5.1.3",
|
|
20
21
|
"moment": "^2.29.3",
|
|
21
22
|
"nprogress": "^0.2.0",
|
|
22
23
|
"pinia": "^2.0.13",
|
|
23
24
|
"sweetalert2": "^11.4.14",
|
|
24
|
-
"vue": "^3.2.
|
|
25
|
-
"vue-router": "^4.0.14"
|
|
25
|
+
"vue": "^3.2.37"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"rollup": "^2.75.7",
|
|
29
29
|
"rollup-plugin-css-only": "^3.1.0",
|
|
30
30
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
31
|
-
"rollup-plugin-vue": "^6.0.0"
|
|
31
|
+
"rollup-plugin-vue": "^6.0.0",
|
|
32
|
+
"vuepress": "^2.0.0-beta.48"
|
|
32
33
|
}
|
|
33
34
|
}
|