@iankibetsh/shframework 0.1.2 → 0.1.6
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 +29 -27
- package/dist/library.mjs +29 -27
- package/package.json +7 -6
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
|
});
|
|
@@ -2843,13 +2843,12 @@ const _hoisted_2$1 = {
|
|
|
2843
2843
|
const _hoisted_3$1 = ["disabled"];
|
|
2844
2844
|
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */));
|
|
2845
2845
|
const _hoisted_5 = /*#__PURE__*/vue.createTextVNode(" Export ");
|
|
2846
|
-
const _hoisted_6 = {
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
};
|
|
2852
|
-
const _hoisted_7 = /*#__PURE__*/vue.createTextVNode(" Exporting ... ");
|
|
2846
|
+
const _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("span", {
|
|
2847
|
+
class: "spinner-border spinner-border-sm",
|
|
2848
|
+
role: "status",
|
|
2849
|
+
"aria-hidden": "true"
|
|
2850
|
+
}, null, -1 /* HOISTED */));
|
|
2851
|
+
const _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */));
|
|
2853
2852
|
const _hoisted_8 = {
|
|
2854
2853
|
key: 1,
|
|
2855
2854
|
class: "row"
|
|
@@ -2876,7 +2875,14 @@ const _hoisted_18 = {
|
|
|
2876
2875
|
class: "text-center"
|
|
2877
2876
|
};
|
|
2878
2877
|
const _hoisted_19 = ["colspan"];
|
|
2879
|
-
const _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("
|
|
2878
|
+
const _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
|
|
2879
|
+
/*#__PURE__*/vue.createElementVNode("div", {
|
|
2880
|
+
class: "spinner-border",
|
|
2881
|
+
role: "status"
|
|
2882
|
+
}, [
|
|
2883
|
+
/*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
2884
|
+
])
|
|
2885
|
+
], -1 /* HOISTED */));
|
|
2880
2886
|
const _hoisted_21 = [
|
|
2881
2887
|
_hoisted_20
|
|
2882
2888
|
];
|
|
@@ -2971,9 +2977,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2971
2977
|
_hoisted_5
|
|
2972
2978
|
], 64 /* STABLE_FRAGMENT */))
|
|
2973
2979
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
2974
|
-
|
|
2975
|
-
? (vue.openBlock(), vue.createElementBlock("img", _hoisted_6))
|
|
2976
|
-
: vue.createCommentVNode("v-if", true),
|
|
2980
|
+
_hoisted_6,
|
|
2977
2981
|
_hoisted_7
|
|
2978
2982
|
], 64 /* STABLE_FRAGMENT */))
|
|
2979
2983
|
], 8 /* PROPS */, _hoisted_3$1)
|
|
@@ -3254,8 +3258,7 @@ script$1.__file = "src/views/ShTable.vue";
|
|
|
3254
3258
|
|
|
3255
3259
|
var script = {
|
|
3256
3260
|
name: 'ShTabs',
|
|
3257
|
-
props: ['tabs', '
|
|
3258
|
-
inject: ['global'],
|
|
3261
|
+
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts'],
|
|
3259
3262
|
data () {
|
|
3260
3263
|
return {
|
|
3261
3264
|
currentTab: ''
|
|
@@ -3264,18 +3267,17 @@ var script = {
|
|
|
3264
3267
|
watch: {
|
|
3265
3268
|
refreshStatus: function (state) {
|
|
3266
3269
|
if (state === 0) {
|
|
3267
|
-
if (this.
|
|
3268
|
-
this.setTabCounts(this.
|
|
3270
|
+
if (this.tabCounts) {
|
|
3271
|
+
this.setTabCounts(this.tabCounts);
|
|
3269
3272
|
}
|
|
3270
3273
|
}
|
|
3271
3274
|
},
|
|
3272
|
-
|
|
3275
|
+
tabCounts: function () {
|
|
3273
3276
|
this.resetTabCounts();
|
|
3274
3277
|
}
|
|
3275
3278
|
},
|
|
3276
3279
|
computed: {
|
|
3277
3280
|
refreshStatus () {
|
|
3278
|
-
return this.global.state.refetch
|
|
3279
3281
|
}
|
|
3280
3282
|
},
|
|
3281
3283
|
mounted () {
|
|
@@ -3298,8 +3300,8 @@ var script = {
|
|
|
3298
3300
|
} else {
|
|
3299
3301
|
this.currentTab = arr[arr.length - 1];
|
|
3300
3302
|
}
|
|
3301
|
-
if (this.
|
|
3302
|
-
this.setTabCounts(this.
|
|
3303
|
+
if (this.tabCounts) {
|
|
3304
|
+
this.setTabCounts(this.tabCounts);
|
|
3303
3305
|
}
|
|
3304
3306
|
},
|
|
3305
3307
|
tabExistsInUrl: function () {
|
|
@@ -3348,7 +3350,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3348
3350
|
vue.createVNode(_component_router_link, {
|
|
3349
3351
|
"active-class": 'active',
|
|
3350
3352
|
class: "nav-link text-capitalize",
|
|
3351
|
-
to: $props.
|
|
3353
|
+
to: $props.baseUrl+'/tab/'+tab,
|
|
3352
3354
|
role: "tab",
|
|
3353
3355
|
id: 'sh_tab_' + tab
|
|
3354
3356
|
}, {
|
|
@@ -3363,9 +3365,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3363
3365
|
vue.createElementVNode("div", _hoisted_3, [
|
|
3364
3366
|
vue.createVNode(_component_router_view, {
|
|
3365
3367
|
current_tab: $data.currentTab,
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
}, null, 8 /* PROPS */, ["current_tab", "
|
|
3368
|
+
sharedData: $props.sharedData,
|
|
3369
|
+
tabCounts: $props.tabCounts
|
|
3370
|
+
}, null, 8 /* PROPS */, ["current_tab", "sharedData", "tabCounts"])
|
|
3369
3371
|
])
|
|
3370
3372
|
]))
|
|
3371
3373
|
}
|
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
|
});
|
|
@@ -2832,13 +2832,12 @@ const _hoisted_2$1 = {
|
|
|
2832
2832
|
const _hoisted_3$1 = ["disabled"];
|
|
2833
2833
|
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */));
|
|
2834
2834
|
const _hoisted_5 = /*#__PURE__*/createTextVNode(" Export ");
|
|
2835
|
-
const _hoisted_6 = {
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
};
|
|
2841
|
-
const _hoisted_7 = /*#__PURE__*/createTextVNode(" Exporting ... ");
|
|
2835
|
+
const _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("span", {
|
|
2836
|
+
class: "spinner-border spinner-border-sm",
|
|
2837
|
+
role: "status",
|
|
2838
|
+
"aria-hidden": "true"
|
|
2839
|
+
}, null, -1 /* HOISTED */));
|
|
2840
|
+
const _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */));
|
|
2842
2841
|
const _hoisted_8 = {
|
|
2843
2842
|
key: 1,
|
|
2844
2843
|
class: "row"
|
|
@@ -2865,7 +2864,14 @@ const _hoisted_18 = {
|
|
|
2865
2864
|
class: "text-center"
|
|
2866
2865
|
};
|
|
2867
2866
|
const _hoisted_19 = ["colspan"];
|
|
2868
|
-
const _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("
|
|
2867
|
+
const _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
|
|
2868
|
+
/*#__PURE__*/createElementVNode("div", {
|
|
2869
|
+
class: "spinner-border",
|
|
2870
|
+
role: "status"
|
|
2871
|
+
}, [
|
|
2872
|
+
/*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
2873
|
+
])
|
|
2874
|
+
], -1 /* HOISTED */));
|
|
2869
2875
|
const _hoisted_21 = [
|
|
2870
2876
|
_hoisted_20
|
|
2871
2877
|
];
|
|
@@ -2960,9 +2966,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2960
2966
|
_hoisted_5
|
|
2961
2967
|
], 64 /* STABLE_FRAGMENT */))
|
|
2962
2968
|
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2963
|
-
|
|
2964
|
-
? (openBlock(), createElementBlock("img", _hoisted_6))
|
|
2965
|
-
: createCommentVNode("v-if", true),
|
|
2969
|
+
_hoisted_6,
|
|
2966
2970
|
_hoisted_7
|
|
2967
2971
|
], 64 /* STABLE_FRAGMENT */))
|
|
2968
2972
|
], 8 /* PROPS */, _hoisted_3$1)
|
|
@@ -3243,8 +3247,7 @@ script$1.__file = "src/views/ShTable.vue";
|
|
|
3243
3247
|
|
|
3244
3248
|
var script = {
|
|
3245
3249
|
name: 'ShTabs',
|
|
3246
|
-
props: ['tabs', '
|
|
3247
|
-
inject: ['global'],
|
|
3250
|
+
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts'],
|
|
3248
3251
|
data () {
|
|
3249
3252
|
return {
|
|
3250
3253
|
currentTab: ''
|
|
@@ -3253,18 +3256,17 @@ var script = {
|
|
|
3253
3256
|
watch: {
|
|
3254
3257
|
refreshStatus: function (state) {
|
|
3255
3258
|
if (state === 0) {
|
|
3256
|
-
if (this.
|
|
3257
|
-
this.setTabCounts(this.
|
|
3259
|
+
if (this.tabCounts) {
|
|
3260
|
+
this.setTabCounts(this.tabCounts);
|
|
3258
3261
|
}
|
|
3259
3262
|
}
|
|
3260
3263
|
},
|
|
3261
|
-
|
|
3264
|
+
tabCounts: function () {
|
|
3262
3265
|
this.resetTabCounts();
|
|
3263
3266
|
}
|
|
3264
3267
|
},
|
|
3265
3268
|
computed: {
|
|
3266
3269
|
refreshStatus () {
|
|
3267
|
-
return this.global.state.refetch
|
|
3268
3270
|
}
|
|
3269
3271
|
},
|
|
3270
3272
|
mounted () {
|
|
@@ -3287,8 +3289,8 @@ var script = {
|
|
|
3287
3289
|
} else {
|
|
3288
3290
|
this.currentTab = arr[arr.length - 1];
|
|
3289
3291
|
}
|
|
3290
|
-
if (this.
|
|
3291
|
-
this.setTabCounts(this.
|
|
3292
|
+
if (this.tabCounts) {
|
|
3293
|
+
this.setTabCounts(this.tabCounts);
|
|
3292
3294
|
}
|
|
3293
3295
|
},
|
|
3294
3296
|
tabExistsInUrl: function () {
|
|
@@ -3337,7 +3339,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3337
3339
|
createVNode(_component_router_link, {
|
|
3338
3340
|
"active-class": 'active',
|
|
3339
3341
|
class: "nav-link text-capitalize",
|
|
3340
|
-
to: $props.
|
|
3342
|
+
to: $props.baseUrl+'/tab/'+tab,
|
|
3341
3343
|
role: "tab",
|
|
3342
3344
|
id: 'sh_tab_' + tab
|
|
3343
3345
|
}, {
|
|
@@ -3352,9 +3354,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3352
3354
|
createElementVNode("div", _hoisted_3, [
|
|
3353
3355
|
createVNode(_component_router_view, {
|
|
3354
3356
|
current_tab: $data.currentTab,
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
}, null, 8 /* PROPS */, ["current_tab", "
|
|
3357
|
+
sharedData: $props.sharedData,
|
|
3358
|
+
tabCounts: $props.tabCounts
|
|
3359
|
+
}, null, 8 /* PROPS */, ["current_tab", "sharedData", "tabCounts"])
|
|
3358
3360
|
])
|
|
3359
3361
|
]))
|
|
3360
3362
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iankibetsh/shframework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
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
|
}
|