@iankibetsh/shframework 1.2.6 → 1.2.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/dist/library.mjs.css +32 -32
- package/dist/library.js +138 -80
- package/dist/library.mjs +128 -70
- package/package.json +3 -2
|
@@ -1,36 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
.sh-phone{
|
|
3
|
-
display: flex;
|
|
4
|
-
width: 100%;
|
|
5
|
-
align-items: center;
|
|
6
|
-
padding: 0 0.25rem;
|
|
7
|
-
}
|
|
8
|
-
.phone-country{
|
|
9
|
-
width: 2rem;
|
|
10
|
-
border: none;
|
|
11
|
-
align-self: center;
|
|
12
|
-
outline: none !important;
|
|
13
|
-
padding: 0.4rem;
|
|
14
|
-
border-right: 1px solid #0003;
|
|
15
|
-
}
|
|
16
|
-
.phone-number{
|
|
17
|
-
width: calc(100% - 2.2rem);
|
|
18
|
-
border: none;
|
|
19
|
-
align-self: center;
|
|
20
|
-
outline: none;
|
|
21
|
-
margin-bottom: 0;
|
|
22
|
-
padding: 0.4rem;
|
|
23
|
-
}
|
|
24
|
-
.sh-phone img{
|
|
25
|
-
padding: 0.125rem;
|
|
26
|
-
width: 2rem;
|
|
27
|
-
height: 2rem;
|
|
28
|
-
}
|
|
29
|
-
.phone-number::placeholder{
|
|
30
|
-
font-weight: 300;
|
|
31
|
-
opacity: 0.5;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
2
|
.colored-toast.swal2-icon-success {
|
|
35
3
|
background-color: #a5dc86 !important;
|
|
36
4
|
}
|
|
@@ -63,6 +31,38 @@
|
|
|
63
31
|
color: white;
|
|
64
32
|
}
|
|
65
33
|
|
|
34
|
+
.sh-phone{
|
|
35
|
+
display: flex;
|
|
36
|
+
width: 100%;
|
|
37
|
+
align-items: center;
|
|
38
|
+
padding: 0 0.25rem;
|
|
39
|
+
}
|
|
40
|
+
.phone-country{
|
|
41
|
+
width: 2rem;
|
|
42
|
+
border: none;
|
|
43
|
+
align-self: center;
|
|
44
|
+
outline: none !important;
|
|
45
|
+
padding: 0.4rem;
|
|
46
|
+
border-right: 1px solid #0003;
|
|
47
|
+
}
|
|
48
|
+
.phone-number{
|
|
49
|
+
width: calc(100% - 2.2rem);
|
|
50
|
+
border: none;
|
|
51
|
+
align-self: center;
|
|
52
|
+
outline: none;
|
|
53
|
+
margin-bottom: 0;
|
|
54
|
+
padding: 0.4rem;
|
|
55
|
+
}
|
|
56
|
+
.sh-phone img{
|
|
57
|
+
padding: 0.125rem;
|
|
58
|
+
width: 2rem;
|
|
59
|
+
height: 2rem;
|
|
60
|
+
}
|
|
61
|
+
.phone-number::placeholder{
|
|
62
|
+
font-weight: 300;
|
|
63
|
+
opacity: 0.5;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
.sh-selected-item{
|
|
67
67
|
line-height: unset!important;
|
|
68
68
|
}
|
package/dist/library.js
CHANGED
|
@@ -169,7 +169,8 @@ const Toast = Swal__default["default"].mixin({
|
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
171
|
function getShConfig(key = null,def = '') {
|
|
172
|
-
|
|
172
|
+
|
|
173
|
+
const config = ShStorage.getItem('ShConfig') ?? {};
|
|
173
174
|
if(key) {
|
|
174
175
|
return config[key] ?? def
|
|
175
176
|
}
|
|
@@ -369,6 +370,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
369
370
|
const axios = Axios__default["default"].create({
|
|
370
371
|
baseURL: apiUrl
|
|
371
372
|
});
|
|
373
|
+
window.shAxionInstance = axios;
|
|
372
374
|
function doGet (endPoint, data) {
|
|
373
375
|
updateSession();
|
|
374
376
|
return axios.get(endPoint, {
|
|
@@ -1870,7 +1872,7 @@ const countries = [
|
|
|
1870
1872
|
}
|
|
1871
1873
|
];
|
|
1872
1874
|
|
|
1873
|
-
var script$
|
|
1875
|
+
var script$h = {
|
|
1874
1876
|
name: 'ShPhone',
|
|
1875
1877
|
props: ['modelValue', 'country_code'],
|
|
1876
1878
|
data () {
|
|
@@ -1975,10 +1977,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1975
1977
|
]))
|
|
1976
1978
|
}
|
|
1977
1979
|
|
|
1978
|
-
script$
|
|
1979
|
-
script$
|
|
1980
|
+
script$h.render = render$7;
|
|
1981
|
+
script$h.__file = "src/lib/components/form-components/ShPhone.vue";
|
|
1980
1982
|
|
|
1981
|
-
var script$
|
|
1983
|
+
var script$g = {
|
|
1982
1984
|
name: 'ShEditor',
|
|
1983
1985
|
props: ['modelValue'],
|
|
1984
1986
|
components: {
|
|
@@ -2052,8 +2054,8 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2052
2054
|
], 64 /* STABLE_FRAGMENT */))
|
|
2053
2055
|
}
|
|
2054
2056
|
|
|
2055
|
-
script$
|
|
2056
|
-
script$
|
|
2057
|
+
script$g.render = render$6;
|
|
2058
|
+
script$g.__file = "src/lib/components/form-components/ShEditor.vue";
|
|
2057
2059
|
|
|
2058
2060
|
const _hoisted_1$d = {
|
|
2059
2061
|
key: 0,
|
|
@@ -2076,7 +2078,7 @@ const _hoisted_10$3 = {
|
|
|
2076
2078
|
};
|
|
2077
2079
|
|
|
2078
2080
|
|
|
2079
|
-
var script$
|
|
2081
|
+
var script$f = {
|
|
2080
2082
|
__name: 'ShSuggest',
|
|
2081
2083
|
props: ['fillSelects','modelValue'],
|
|
2082
2084
|
emits: ['update:modelValue'],
|
|
@@ -2217,15 +2219,15 @@ return (_ctx, _cache) => {
|
|
|
2217
2219
|
|
|
2218
2220
|
};
|
|
2219
2221
|
|
|
2220
|
-
script$
|
|
2221
|
-
script$
|
|
2222
|
+
script$f.__scopeId = "data-v-71cc9569";
|
|
2223
|
+
script$f.__file = "src/lib/components/form-components/ShSuggest.vue";
|
|
2222
2224
|
|
|
2223
|
-
var script$
|
|
2225
|
+
var script$e = {
|
|
2224
2226
|
name: 'ShForm',
|
|
2225
2227
|
components: {
|
|
2226
|
-
ShSuggest: script$
|
|
2227
|
-
ShEditor: script$
|
|
2228
|
-
ShPhone: script$
|
|
2228
|
+
ShSuggest: script$f,
|
|
2229
|
+
ShEditor: script$g,
|
|
2230
|
+
ShPhone: script$h
|
|
2229
2231
|
},
|
|
2230
2232
|
props: [
|
|
2231
2233
|
'action',
|
|
@@ -2822,13 +2824,13 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2822
2824
|
], 64 /* STABLE_FRAGMENT */))
|
|
2823
2825
|
}
|
|
2824
2826
|
|
|
2825
|
-
script$
|
|
2826
|
-
script$
|
|
2827
|
+
script$e.render = render$5;
|
|
2828
|
+
script$e.__file = "src/lib/components/ShForm.vue";
|
|
2827
2829
|
|
|
2828
2830
|
const _hoisted_1$b = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
|
|
2829
2831
|
const _hoisted_2$8 = { class: "dropdown" };
|
|
2830
2832
|
|
|
2831
|
-
var script$
|
|
2833
|
+
var script$d = {
|
|
2832
2834
|
__name: 'ShDropDownForm',
|
|
2833
2835
|
props: ['action',
|
|
2834
2836
|
'classes',
|
|
@@ -2875,7 +2877,7 @@ return (_ctx, _cache) => {
|
|
|
2875
2877
|
class: "dropdown-menu px-2 py-1",
|
|
2876
2878
|
"aria-labelledby": dropdownId
|
|
2877
2879
|
}, [
|
|
2878
|
-
vue.createVNode(script$
|
|
2880
|
+
vue.createVNode(script$e, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
|
|
2879
2881
|
])
|
|
2880
2882
|
])
|
|
2881
2883
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -2884,9 +2886,9 @@ return (_ctx, _cache) => {
|
|
|
2884
2886
|
|
|
2885
2887
|
};
|
|
2886
2888
|
|
|
2887
|
-
script$
|
|
2889
|
+
script$d.__file = "src/lib/components/ShDropDownForm.vue";
|
|
2888
2890
|
|
|
2889
|
-
var script$
|
|
2891
|
+
var script$c = {
|
|
2890
2892
|
name: 'ShModal',
|
|
2891
2893
|
props: ['modalTitle', 'modalId', 'modalSize'],
|
|
2892
2894
|
components: {
|
|
@@ -2929,12 +2931,12 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2929
2931
|
], 8 /* PROPS */, _hoisted_1$a))
|
|
2930
2932
|
}
|
|
2931
2933
|
|
|
2932
|
-
script$
|
|
2933
|
-
script$
|
|
2934
|
+
script$c.render = render$4;
|
|
2935
|
+
script$c.__file = "src/lib/components/ShModal.vue";
|
|
2934
2936
|
|
|
2935
2937
|
const _hoisted_1$9 = ["href"];
|
|
2936
2938
|
|
|
2937
|
-
var script$
|
|
2939
|
+
var script$b = {
|
|
2938
2940
|
__name: 'ShModalForm',
|
|
2939
2941
|
props: ['action',
|
|
2940
2942
|
'classes',
|
|
@@ -2974,12 +2976,12 @@ return (_ctx, _cache) => {
|
|
|
2974
2976
|
}, [
|
|
2975
2977
|
vue.renderSlot(_ctx.$slots, "default")
|
|
2976
2978
|
], 10 /* CLASS, PROPS */, _hoisted_1$9),
|
|
2977
|
-
vue.createVNode(script$
|
|
2979
|
+
vue.createVNode(script$c, {
|
|
2978
2980
|
"modal-id": modalId,
|
|
2979
2981
|
"modal-title": __props.modalTitle
|
|
2980
2982
|
}, {
|
|
2981
2983
|
default: vue.withCtx(() => [
|
|
2982
|
-
vue.createVNode(script$
|
|
2984
|
+
vue.createVNode(script$e, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
|
|
2983
2985
|
]),
|
|
2984
2986
|
_: 1 /* STABLE */
|
|
2985
2987
|
}, 8 /* PROPS */, ["modal-title"])
|
|
@@ -2989,9 +2991,9 @@ return (_ctx, _cache) => {
|
|
|
2989
2991
|
|
|
2990
2992
|
};
|
|
2991
2993
|
|
|
2992
|
-
script$
|
|
2994
|
+
script$b.__file = "src/lib/components/ShModalForm.vue";
|
|
2993
2995
|
|
|
2994
|
-
var script$
|
|
2996
|
+
var script$a = {
|
|
2995
2997
|
name: 'ShCanvas',
|
|
2996
2998
|
props: ['canvasTitle', 'canvasId', 'position','canvasSize'],
|
|
2997
2999
|
components: {
|
|
@@ -3041,10 +3043,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3041
3043
|
], 10 /* CLASS, PROPS */, _hoisted_1$8))
|
|
3042
3044
|
}
|
|
3043
3045
|
|
|
3044
|
-
script$
|
|
3045
|
-
script$
|
|
3046
|
+
script$a.render = render$3;
|
|
3047
|
+
script$a.__file = "src/lib/components/ShCanvas.vue";
|
|
3046
3048
|
|
|
3047
|
-
var script$
|
|
3049
|
+
var script$9 = {
|
|
3048
3050
|
name: 'Pagination',
|
|
3049
3051
|
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
|
|
3050
3052
|
data () {
|
|
@@ -3233,8 +3235,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3233
3235
|
]))
|
|
3234
3236
|
}
|
|
3235
3237
|
|
|
3236
|
-
script$
|
|
3237
|
-
script$
|
|
3238
|
+
script$9.render = render$2;
|
|
3239
|
+
script$9.__file = "src/lib/components/list_templates/Pagination.vue";
|
|
3238
3240
|
|
|
3239
3241
|
const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
3240
3242
|
class: "spinner-border spinner-border-sm me-1",
|
|
@@ -3243,7 +3245,7 @@ const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
|
3243
3245
|
}, null, -1 /* HOISTED */);
|
|
3244
3246
|
|
|
3245
3247
|
|
|
3246
|
-
var script$
|
|
3248
|
+
var script$8 = {
|
|
3247
3249
|
__name: 'ShConfirmAction',
|
|
3248
3250
|
props: {
|
|
3249
3251
|
data: Object,
|
|
@@ -3329,7 +3331,7 @@ return (_ctx, _cache) => {
|
|
|
3329
3331
|
|
|
3330
3332
|
};
|
|
3331
3333
|
|
|
3332
|
-
script$
|
|
3334
|
+
script$8.__file = "src/lib/components/ShConfirmAction.vue";
|
|
3333
3335
|
|
|
3334
3336
|
const _hoisted_1$5 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
3335
3337
|
class: "spinner-border spinner-border-sm me-1",
|
|
@@ -3337,7 +3339,7 @@ const _hoisted_1$5 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
|
3337
3339
|
"aria-hidden": "true"
|
|
3338
3340
|
}, null, -1 /* HOISTED */);
|
|
3339
3341
|
|
|
3340
|
-
var script$
|
|
3342
|
+
var script$7 = {
|
|
3341
3343
|
__name: 'ShSilentAction',
|
|
3342
3344
|
props: {
|
|
3343
3345
|
data: Object,
|
|
@@ -3425,9 +3427,9 @@ return (_ctx, _cache) => {
|
|
|
3425
3427
|
|
|
3426
3428
|
};
|
|
3427
3429
|
|
|
3428
|
-
script$
|
|
3430
|
+
script$7.__file = "src/lib/components/ShSilentAction.vue";
|
|
3429
3431
|
|
|
3430
|
-
var script$
|
|
3432
|
+
var script$6 = {
|
|
3431
3433
|
name: 'sh-table',
|
|
3432
3434
|
props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds'],
|
|
3433
3435
|
inject: ['channel'],
|
|
@@ -3659,10 +3661,10 @@ var script$5 = {
|
|
|
3659
3661
|
this.reloadData();
|
|
3660
3662
|
},
|
|
3661
3663
|
components: {
|
|
3662
|
-
ShSilentAction: script$
|
|
3663
|
-
ShConfirmAction: script$
|
|
3664
|
-
ShCanvas: script$
|
|
3665
|
-
pagination: script$
|
|
3664
|
+
ShSilentAction: script$7,
|
|
3665
|
+
ShConfirmAction: script$8,
|
|
3666
|
+
ShCanvas: script$a,
|
|
3667
|
+
pagination: script$9
|
|
3666
3668
|
},
|
|
3667
3669
|
computed: {
|
|
3668
3670
|
windowWidth: function () {
|
|
@@ -4292,10 +4294,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4292
4294
|
]))
|
|
4293
4295
|
}
|
|
4294
4296
|
|
|
4295
|
-
script$
|
|
4296
|
-
script$
|
|
4297
|
+
script$6.render = render$1;
|
|
4298
|
+
script$6.__file = "src/lib/components/ShTable.vue";
|
|
4297
4299
|
|
|
4298
|
-
var script$
|
|
4300
|
+
var script$5 = {
|
|
4299
4301
|
name: 'ShTabs',
|
|
4300
4302
|
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive','classOne','classTwo','classes'],
|
|
4301
4303
|
data () {
|
|
@@ -4416,8 +4418,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4416
4418
|
], 64 /* STABLE_FRAGMENT */))
|
|
4417
4419
|
}
|
|
4418
4420
|
|
|
4419
|
-
script$
|
|
4420
|
-
script$
|
|
4421
|
+
script$5.render = render;
|
|
4422
|
+
script$5.__file = "src/lib/components/ShTabs.vue";
|
|
4421
4423
|
|
|
4422
4424
|
const _hoisted_1$3 = {
|
|
4423
4425
|
class: "nav nav-tabs",
|
|
@@ -4432,7 +4434,7 @@ const _hoisted_4$3 = /*#__PURE__*/vue.createElementVNode("i", { class: "d-none"
|
|
|
4432
4434
|
const _hoisted_5$3 = { class: "sh_tab_count" };
|
|
4433
4435
|
const _hoisted_6$2 = { class: "tab-content" };
|
|
4434
4436
|
|
|
4435
|
-
var script$
|
|
4437
|
+
var script$4 = {
|
|
4436
4438
|
__name: 'ShDynamicTabs',
|
|
4437
4439
|
props: ['tabs','data'],
|
|
4438
4440
|
setup(__props) {
|
|
@@ -4486,7 +4488,7 @@ return (_ctx, _cache) => {
|
|
|
4486
4488
|
|
|
4487
4489
|
};
|
|
4488
4490
|
|
|
4489
|
-
script$
|
|
4491
|
+
script$4.__file = "src/lib/components/ShDynamicTabs.vue";
|
|
4490
4492
|
|
|
4491
4493
|
const useUserStore = pinia.defineStore('user-store', {
|
|
4492
4494
|
state: () => ({
|
|
@@ -4596,7 +4598,7 @@ const _hoisted_4$2 = {
|
|
|
4596
4598
|
const _hoisted_5$2 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
|
|
4597
4599
|
|
|
4598
4600
|
|
|
4599
|
-
var script$
|
|
4601
|
+
var script$3 = {
|
|
4600
4602
|
__name: 'Departments',
|
|
4601
4603
|
setup(__props) {
|
|
4602
4604
|
|
|
@@ -4626,7 +4628,7 @@ return (_ctx, _cache) => {
|
|
|
4626
4628
|
_hoisted_5$2,
|
|
4627
4629
|
vue.createTextVNode(" ADD DEPARTMENT")
|
|
4628
4630
|
], 512 /* NEED_PATCH */),
|
|
4629
|
-
vue.createVNode(script$
|
|
4631
|
+
vue.createVNode(script$6, {
|
|
4630
4632
|
headers: ['id','name','description', 'created_at'],
|
|
4631
4633
|
"end-point": "admin/departments/list",
|
|
4632
4634
|
actions: {
|
|
@@ -4640,12 +4642,12 @@ return (_ctx, _cache) => {
|
|
|
4640
4642
|
]
|
|
4641
4643
|
}
|
|
4642
4644
|
}),
|
|
4643
|
-
vue.createVNode(script$
|
|
4645
|
+
vue.createVNode(script$c, {
|
|
4644
4646
|
"modal-id": "sh-department_modal",
|
|
4645
4647
|
"modal-title": "Department Form"
|
|
4646
4648
|
}, {
|
|
4647
4649
|
default: vue.withCtx(() => [
|
|
4648
|
-
vue.createVNode(script$
|
|
4650
|
+
vue.createVNode(script$e, {
|
|
4649
4651
|
"success-callback": "departmentAdded",
|
|
4650
4652
|
onDepartmentAdded: departmentAdded,
|
|
4651
4653
|
action: "admin/departments/store",
|
|
@@ -4662,7 +4664,7 @@ return (_ctx, _cache) => {
|
|
|
4662
4664
|
|
|
4663
4665
|
};
|
|
4664
4666
|
|
|
4665
|
-
script$
|
|
4667
|
+
script$3.__file = "src/lib/components/core/Departments/Departments.vue";
|
|
4666
4668
|
|
|
4667
4669
|
const _hoisted_1$1 = {
|
|
4668
4670
|
key: 0,
|
|
@@ -4681,7 +4683,7 @@ const _hoisted_4$1 = { class: "text-primary text-capitalize" };
|
|
|
4681
4683
|
const _hoisted_5$1 = ["value"];
|
|
4682
4684
|
const _hoisted_6$1 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
|
|
4683
4685
|
|
|
4684
|
-
var script$
|
|
4686
|
+
var script$2 = {
|
|
4685
4687
|
__name: 'Department',
|
|
4686
4688
|
setup(__props) {
|
|
4687
4689
|
|
|
@@ -4779,7 +4781,7 @@ return (_ctx, _cache) => {
|
|
|
4779
4781
|
vue.createElementVNode("div", _hoisted_2$1, [
|
|
4780
4782
|
_hoisted_3$1,
|
|
4781
4783
|
vue.createElementVNode("h5", null, "Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */),
|
|
4782
|
-
vue.createVNode(script$
|
|
4784
|
+
vue.createVNode(script$6, {
|
|
4783
4785
|
actions: {
|
|
4784
4786
|
label: 'Actions',
|
|
4785
4787
|
actions: [
|
|
@@ -4799,12 +4801,12 @@ return (_ctx, _cache) => {
|
|
|
4799
4801
|
headers: ['id',showModule,'created_at'],
|
|
4800
4802
|
"end-point": 'admin/departments/department/list-modules/' + id.value
|
|
4801
4803
|
}, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
|
|
4802
|
-
vue.createVNode(script$
|
|
4804
|
+
vue.createVNode(script$c, {
|
|
4803
4805
|
"modal-id": "addModule",
|
|
4804
4806
|
"modal-title": "Add Module Department"
|
|
4805
4807
|
}, {
|
|
4806
4808
|
default: vue.withCtx(() => [
|
|
4807
|
-
vue.createVNode(script$
|
|
4809
|
+
vue.createVNode(script$e, {
|
|
4808
4810
|
"reload-select-items": vue.unref(reload),
|
|
4809
4811
|
"success-callback": moduleAdded,
|
|
4810
4812
|
"fill-selects": {
|
|
@@ -4826,7 +4828,7 @@ return (_ctx, _cache) => {
|
|
|
4826
4828
|
ref: permissionCanvasBtn,
|
|
4827
4829
|
"data-bs-toggle": "offcanvas"
|
|
4828
4830
|
}, null, 512 /* NEED_PATCH */),
|
|
4829
|
-
vue.createVNode(script$
|
|
4831
|
+
vue.createVNode(script$a, {
|
|
4830
4832
|
"canvas-id": "permissionsCanvas",
|
|
4831
4833
|
position: "end enlarged",
|
|
4832
4834
|
"canvas-title": "Module Permissions"
|
|
@@ -4874,7 +4876,7 @@ return (_ctx, _cache) => {
|
|
|
4874
4876
|
|
|
4875
4877
|
};
|
|
4876
4878
|
|
|
4877
|
-
script$
|
|
4879
|
+
script$2.__file = "src/lib/components/core/Departments/department/Department.vue";
|
|
4878
4880
|
|
|
4879
4881
|
const _withScopeId = n => (vue.pushScopeId("data-v-2911509a"),n=n(),vue.popScopeId(),n);
|
|
4880
4882
|
const _hoisted_1 = {
|
|
@@ -4902,7 +4904,7 @@ const _hoisted_8 = {
|
|
|
4902
4904
|
};
|
|
4903
4905
|
const _hoisted_9 = { class: "sh-auth-footer" };
|
|
4904
4906
|
|
|
4905
|
-
var script = {
|
|
4907
|
+
var script$1 = {
|
|
4906
4908
|
__name: 'ShAuth',
|
|
4907
4909
|
setup(__props) {
|
|
4908
4910
|
|
|
@@ -4929,7 +4931,7 @@ vue.watch(user,(newUser) => {
|
|
|
4929
4931
|
function loginSuccessful(res){
|
|
4930
4932
|
userStore.setAccessToken(res.token);
|
|
4931
4933
|
userStore.setUser();
|
|
4932
|
-
|
|
4934
|
+
window.location.href = redirectLogin;
|
|
4933
4935
|
}
|
|
4934
4936
|
|
|
4935
4937
|
return (_ctx, _cache) => {
|
|
@@ -4941,7 +4943,7 @@ return (_ctx, _cache) => {
|
|
|
4941
4943
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
4942
4944
|
(section.value === 'login')
|
|
4943
4945
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
4944
|
-
vue.createVNode(script$
|
|
4946
|
+
vue.createVNode(script$e, {
|
|
4945
4947
|
class: "sh-login-form",
|
|
4946
4948
|
fields: ['email','password'],
|
|
4947
4949
|
"action-label": "Login",
|
|
@@ -4966,7 +4968,7 @@ return (_ctx, _cache) => {
|
|
|
4966
4968
|
(vue.unref(registerSubTitle))
|
|
4967
4969
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
|
|
4968
4970
|
: vue.createCommentVNode("v-if", true),
|
|
4969
|
-
vue.createVNode(script$
|
|
4971
|
+
vue.createVNode(script$e, {
|
|
4970
4972
|
class: "sh-login-form",
|
|
4971
4973
|
fields: vue.unref(registrationFields),
|
|
4972
4974
|
"action-label": "Sign Up",
|
|
@@ -4987,27 +4989,75 @@ return (_ctx, _cache) => {
|
|
|
4987
4989
|
|
|
4988
4990
|
};
|
|
4989
4991
|
|
|
4990
|
-
script.__scopeId = "data-v-2911509a";
|
|
4991
|
-
script.__file = "src/lib/components/core/auth/ShAuth.vue";
|
|
4992
|
+
script$1.__scopeId = "data-v-2911509a";
|
|
4993
|
+
script$1.__file = "src/lib/components/core/auth/ShAuth.vue";
|
|
4994
|
+
|
|
4995
|
+
var script = {
|
|
4996
|
+
__name: 'TextInput',
|
|
4997
|
+
props: ['modelValue','label'],
|
|
4998
|
+
emits: ['update:modelValue','clearValidationErrors'],
|
|
4999
|
+
setup(__props, { emit }) {
|
|
5000
|
+
|
|
5001
|
+
const props = __props;
|
|
5002
|
+
|
|
5003
|
+
|
|
5004
|
+
|
|
5005
|
+
const inputModel = vue.ref(null);
|
|
5006
|
+
|
|
5007
|
+
const modelValueUpdated = (e) => {
|
|
5008
|
+
emit('clearValidationErrors');
|
|
5009
|
+
emit('update:modelValue',inputModel);
|
|
5010
|
+
};
|
|
5011
|
+
vue.onMounted(()=>{
|
|
5012
|
+
props.modelValue && (inputModel.value = props.modelValue);
|
|
5013
|
+
});
|
|
5014
|
+
|
|
5015
|
+
|
|
5016
|
+
return (_ctx, _cache) => {
|
|
5017
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
5018
|
+
type: "text",
|
|
5019
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((inputModel).value = $event)),
|
|
5020
|
+
onChange: modelValueUpdated,
|
|
5021
|
+
onKeydown: modelValueUpdated,
|
|
5022
|
+
onUpdated: modelValueUpdated
|
|
5023
|
+
}, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
|
|
5024
|
+
[vue.vModelText, inputModel.value]
|
|
5025
|
+
])
|
|
5026
|
+
}
|
|
5027
|
+
}
|
|
5028
|
+
|
|
5029
|
+
};
|
|
5030
|
+
|
|
5031
|
+
script.__file = "src/lib/components/form-components/TextInput.vue";
|
|
4992
5032
|
|
|
4993
5033
|
const ShFrontend = {
|
|
4994
5034
|
install: (app, options) => {
|
|
4995
|
-
ShStorage.setItem('ShConfig',options);
|
|
4996
5035
|
if(options.sessionTimeout){
|
|
4997
5036
|
app.provide('sessionTimeout',options.sessionTimeout);
|
|
4998
5037
|
ShStorage.setItem('sessionTimeout',options.sessionTimeout);
|
|
4999
5038
|
}
|
|
5039
|
+
const shFormElements = options.shFormElementClasses ?? {};
|
|
5040
|
+
|
|
5041
|
+
const defaultFormElementClasses = {
|
|
5042
|
+
formGroup: shFormElements.formGroup ?? 'mb-2',
|
|
5043
|
+
formLabel: shFormElements.formLabel ?? 'form-label',
|
|
5044
|
+
helperText: shFormElements.helperText ?? 'form-text',
|
|
5045
|
+
actionBtn: shFormElements.actionBtn ?? 'btn btn-primary',
|
|
5046
|
+
formErrorTitle: shFormElements.formErrorTitle ?? 'alert alert-danger',
|
|
5047
|
+
invalidFeedback: shFormElements.invalidFeedback ?? 'invalid-feedback'
|
|
5048
|
+
};
|
|
5000
5049
|
const swalPosition = options.swalPosition ?? 'top-end';
|
|
5001
5050
|
const loginEndpoint = options.loginEndpoint ?? 'auth/login';
|
|
5002
5051
|
const registerEndpoint = options.registerEndpoint ?? 'auth/register';
|
|
5003
5052
|
const registerTitle = options.registerTitle ?? 'Create a new account';
|
|
5004
5053
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
5005
5054
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
5055
|
+
options.formTextInput ?? script;
|
|
5006
5056
|
const loginUrl = options.loginUrl ?? `/login`;
|
|
5007
5057
|
const redirectLogin = options.redirectLogin ?? `/`;
|
|
5008
5058
|
const redirectRegister = options.redirectRegister ?? `/`;
|
|
5009
5059
|
const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
|
|
5010
|
-
const AuthComponent = options.authComponent ?? script;
|
|
5060
|
+
const AuthComponent = options.authComponent ?? script$1;
|
|
5011
5061
|
app.provide('loginEndpoint',loginEndpoint);
|
|
5012
5062
|
app.provide('registerEndpoint', registerEndpoint);
|
|
5013
5063
|
app.provide('registrationFields', registrationFields);
|
|
@@ -5016,7 +5066,9 @@ const ShFrontend = {
|
|
|
5016
5066
|
app.provide('redirectLogin', redirectLogin);
|
|
5017
5067
|
app.provide('redirectRegister', redirectRegister);
|
|
5018
5068
|
app.provide('logoutApiEndpoint', logoutApiEndpoint);
|
|
5069
|
+
app.provide('formComponents', options.shFormComponents);
|
|
5019
5070
|
app.provide('loginUrl', loginUrl);
|
|
5071
|
+
app.provide('shFormElementClasses',defaultFormElementClasses);
|
|
5020
5072
|
window.swalPosition = swalPosition;
|
|
5021
5073
|
if(options.router) {
|
|
5022
5074
|
options.router.addRoute({
|
|
@@ -5025,28 +5077,34 @@ const ShFrontend = {
|
|
|
5025
5077
|
});
|
|
5026
5078
|
options.router.addRoute({
|
|
5027
5079
|
path: '/sh-departments',
|
|
5028
|
-
component: script$
|
|
5080
|
+
component: script$3
|
|
5029
5081
|
});
|
|
5030
5082
|
options.router.addRoute({
|
|
5031
5083
|
path: '/sh-departments/permissions/:id',
|
|
5032
|
-
component: script$
|
|
5084
|
+
component: script$2
|
|
5033
5085
|
});
|
|
5034
5086
|
}
|
|
5087
|
+
//filter unwanted config items from options to be put in local storage
|
|
5088
|
+
const removeKeys = ['formTextInput','router','shFormElementClasses'];
|
|
5089
|
+
const allowKeys = [];
|
|
5090
|
+
Object.keys(options).map(key=> ((typeof options[key] !== 'string' && !allowKeys.includes(key)) || removeKeys.includes(key)) && delete options[key]);
|
|
5091
|
+
|
|
5092
|
+
ShStorage.setItem('ShConfig',options);
|
|
5035
5093
|
}
|
|
5036
5094
|
};
|
|
5037
5095
|
|
|
5038
|
-
exports.ShCanvas = script$
|
|
5039
|
-
exports.ShConfirmAction = script$
|
|
5040
|
-
exports.ShDropDownForm = script$
|
|
5041
|
-
exports.ShDynamicTabs = script$
|
|
5042
|
-
exports.ShForm = script$
|
|
5096
|
+
exports.ShCanvas = script$a;
|
|
5097
|
+
exports.ShConfirmAction = script$8;
|
|
5098
|
+
exports.ShDropDownForm = script$d;
|
|
5099
|
+
exports.ShDynamicTabs = script$4;
|
|
5100
|
+
exports.ShForm = script$e;
|
|
5043
5101
|
exports.ShFrontend = ShFrontend;
|
|
5044
|
-
exports.ShModal = script$
|
|
5045
|
-
exports.ShModalForm = script$
|
|
5046
|
-
exports.ShPhone = script$
|
|
5047
|
-
exports.ShSilentAction = script$
|
|
5048
|
-
exports.ShTable = script$
|
|
5049
|
-
exports.ShTabs = script$
|
|
5102
|
+
exports.ShModal = script$c;
|
|
5103
|
+
exports.ShModalForm = script$b;
|
|
5104
|
+
exports.ShPhone = script$h;
|
|
5105
|
+
exports.ShSilentAction = script$7;
|
|
5106
|
+
exports.ShTable = script$6;
|
|
5107
|
+
exports.ShTabs = script$5;
|
|
5050
5108
|
exports.shApis = shApis;
|
|
5051
5109
|
exports.shRepo = shRepo;
|
|
5052
5110
|
exports.shStorage = ShStorage;
|
package/dist/library.mjs
CHANGED
|
@@ -157,7 +157,8 @@ const Toast = Swal.mixin({
|
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
function getShConfig(key = null,def = '') {
|
|
160
|
-
|
|
160
|
+
|
|
161
|
+
const config = ShStorage.getItem('ShConfig') ?? {};
|
|
161
162
|
if(key) {
|
|
162
163
|
return config[key] ?? def
|
|
163
164
|
}
|
|
@@ -357,6 +358,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
357
358
|
const axios = Axios.create({
|
|
358
359
|
baseURL: apiUrl
|
|
359
360
|
});
|
|
361
|
+
window.shAxionInstance = axios;
|
|
360
362
|
function doGet (endPoint, data) {
|
|
361
363
|
updateSession();
|
|
362
364
|
return axios.get(endPoint, {
|
|
@@ -1858,7 +1860,7 @@ const countries = [
|
|
|
1858
1860
|
}
|
|
1859
1861
|
];
|
|
1860
1862
|
|
|
1861
|
-
var script$
|
|
1863
|
+
var script$h = {
|
|
1862
1864
|
name: 'ShPhone',
|
|
1863
1865
|
props: ['modelValue', 'country_code'],
|
|
1864
1866
|
data () {
|
|
@@ -1963,10 +1965,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1963
1965
|
]))
|
|
1964
1966
|
}
|
|
1965
1967
|
|
|
1966
|
-
script$
|
|
1967
|
-
script$
|
|
1968
|
+
script$h.render = render$7;
|
|
1969
|
+
script$h.__file = "src/lib/components/form-components/ShPhone.vue";
|
|
1968
1970
|
|
|
1969
|
-
var script$
|
|
1971
|
+
var script$g = {
|
|
1970
1972
|
name: 'ShEditor',
|
|
1971
1973
|
props: ['modelValue'],
|
|
1972
1974
|
components: {
|
|
@@ -2040,8 +2042,8 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2040
2042
|
], 64 /* STABLE_FRAGMENT */))
|
|
2041
2043
|
}
|
|
2042
2044
|
|
|
2043
|
-
script$
|
|
2044
|
-
script$
|
|
2045
|
+
script$g.render = render$6;
|
|
2046
|
+
script$g.__file = "src/lib/components/form-components/ShEditor.vue";
|
|
2045
2047
|
|
|
2046
2048
|
const _hoisted_1$d = {
|
|
2047
2049
|
key: 0,
|
|
@@ -2064,7 +2066,7 @@ const _hoisted_10$3 = {
|
|
|
2064
2066
|
};
|
|
2065
2067
|
|
|
2066
2068
|
|
|
2067
|
-
var script$
|
|
2069
|
+
var script$f = {
|
|
2068
2070
|
__name: 'ShSuggest',
|
|
2069
2071
|
props: ['fillSelects','modelValue'],
|
|
2070
2072
|
emits: ['update:modelValue'],
|
|
@@ -2205,15 +2207,15 @@ return (_ctx, _cache) => {
|
|
|
2205
2207
|
|
|
2206
2208
|
};
|
|
2207
2209
|
|
|
2208
|
-
script$
|
|
2209
|
-
script$
|
|
2210
|
+
script$f.__scopeId = "data-v-71cc9569";
|
|
2211
|
+
script$f.__file = "src/lib/components/form-components/ShSuggest.vue";
|
|
2210
2212
|
|
|
2211
|
-
var script$
|
|
2213
|
+
var script$e = {
|
|
2212
2214
|
name: 'ShForm',
|
|
2213
2215
|
components: {
|
|
2214
|
-
ShSuggest: script$
|
|
2215
|
-
ShEditor: script$
|
|
2216
|
-
ShPhone: script$
|
|
2216
|
+
ShSuggest: script$f,
|
|
2217
|
+
ShEditor: script$g,
|
|
2218
|
+
ShPhone: script$h
|
|
2217
2219
|
},
|
|
2218
2220
|
props: [
|
|
2219
2221
|
'action',
|
|
@@ -2810,13 +2812,13 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2810
2812
|
], 64 /* STABLE_FRAGMENT */))
|
|
2811
2813
|
}
|
|
2812
2814
|
|
|
2813
|
-
script$
|
|
2814
|
-
script$
|
|
2815
|
+
script$e.render = render$5;
|
|
2816
|
+
script$e.__file = "src/lib/components/ShForm.vue";
|
|
2815
2817
|
|
|
2816
2818
|
const _hoisted_1$b = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
|
|
2817
2819
|
const _hoisted_2$8 = { class: "dropdown" };
|
|
2818
2820
|
|
|
2819
|
-
var script$
|
|
2821
|
+
var script$d = {
|
|
2820
2822
|
__name: 'ShDropDownForm',
|
|
2821
2823
|
props: ['action',
|
|
2822
2824
|
'classes',
|
|
@@ -2863,7 +2865,7 @@ return (_ctx, _cache) => {
|
|
|
2863
2865
|
class: "dropdown-menu px-2 py-1",
|
|
2864
2866
|
"aria-labelledby": dropdownId
|
|
2865
2867
|
}, [
|
|
2866
|
-
createVNode(script$
|
|
2868
|
+
createVNode(script$e, normalizeProps(guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
|
|
2867
2869
|
])
|
|
2868
2870
|
])
|
|
2869
2871
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -2872,9 +2874,9 @@ return (_ctx, _cache) => {
|
|
|
2872
2874
|
|
|
2873
2875
|
};
|
|
2874
2876
|
|
|
2875
|
-
script$
|
|
2877
|
+
script$d.__file = "src/lib/components/ShDropDownForm.vue";
|
|
2876
2878
|
|
|
2877
|
-
var script$
|
|
2879
|
+
var script$c = {
|
|
2878
2880
|
name: 'ShModal',
|
|
2879
2881
|
props: ['modalTitle', 'modalId', 'modalSize'],
|
|
2880
2882
|
components: {
|
|
@@ -2917,12 +2919,12 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2917
2919
|
], 8 /* PROPS */, _hoisted_1$a))
|
|
2918
2920
|
}
|
|
2919
2921
|
|
|
2920
|
-
script$
|
|
2921
|
-
script$
|
|
2922
|
+
script$c.render = render$4;
|
|
2923
|
+
script$c.__file = "src/lib/components/ShModal.vue";
|
|
2922
2924
|
|
|
2923
2925
|
const _hoisted_1$9 = ["href"];
|
|
2924
2926
|
|
|
2925
|
-
var script$
|
|
2927
|
+
var script$b = {
|
|
2926
2928
|
__name: 'ShModalForm',
|
|
2927
2929
|
props: ['action',
|
|
2928
2930
|
'classes',
|
|
@@ -2962,12 +2964,12 @@ return (_ctx, _cache) => {
|
|
|
2962
2964
|
}, [
|
|
2963
2965
|
renderSlot(_ctx.$slots, "default")
|
|
2964
2966
|
], 10 /* CLASS, PROPS */, _hoisted_1$9),
|
|
2965
|
-
createVNode(script$
|
|
2967
|
+
createVNode(script$c, {
|
|
2966
2968
|
"modal-id": modalId,
|
|
2967
2969
|
"modal-title": __props.modalTitle
|
|
2968
2970
|
}, {
|
|
2969
2971
|
default: withCtx(() => [
|
|
2970
|
-
createVNode(script$
|
|
2972
|
+
createVNode(script$e, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
|
|
2971
2973
|
]),
|
|
2972
2974
|
_: 1 /* STABLE */
|
|
2973
2975
|
}, 8 /* PROPS */, ["modal-title"])
|
|
@@ -2977,9 +2979,9 @@ return (_ctx, _cache) => {
|
|
|
2977
2979
|
|
|
2978
2980
|
};
|
|
2979
2981
|
|
|
2980
|
-
script$
|
|
2982
|
+
script$b.__file = "src/lib/components/ShModalForm.vue";
|
|
2981
2983
|
|
|
2982
|
-
var script$
|
|
2984
|
+
var script$a = {
|
|
2983
2985
|
name: 'ShCanvas',
|
|
2984
2986
|
props: ['canvasTitle', 'canvasId', 'position','canvasSize'],
|
|
2985
2987
|
components: {
|
|
@@ -3029,10 +3031,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3029
3031
|
], 10 /* CLASS, PROPS */, _hoisted_1$8))
|
|
3030
3032
|
}
|
|
3031
3033
|
|
|
3032
|
-
script$
|
|
3033
|
-
script$
|
|
3034
|
+
script$a.render = render$3;
|
|
3035
|
+
script$a.__file = "src/lib/components/ShCanvas.vue";
|
|
3034
3036
|
|
|
3035
|
-
var script$
|
|
3037
|
+
var script$9 = {
|
|
3036
3038
|
name: 'Pagination',
|
|
3037
3039
|
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
|
|
3038
3040
|
data () {
|
|
@@ -3221,8 +3223,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3221
3223
|
]))
|
|
3222
3224
|
}
|
|
3223
3225
|
|
|
3224
|
-
script$
|
|
3225
|
-
script$
|
|
3226
|
+
script$9.render = render$2;
|
|
3227
|
+
script$9.__file = "src/lib/components/list_templates/Pagination.vue";
|
|
3226
3228
|
|
|
3227
3229
|
const _hoisted_1$6 = /*#__PURE__*/createElementVNode("span", {
|
|
3228
3230
|
class: "spinner-border spinner-border-sm me-1",
|
|
@@ -3231,7 +3233,7 @@ const _hoisted_1$6 = /*#__PURE__*/createElementVNode("span", {
|
|
|
3231
3233
|
}, null, -1 /* HOISTED */);
|
|
3232
3234
|
|
|
3233
3235
|
|
|
3234
|
-
var script$
|
|
3236
|
+
var script$8 = {
|
|
3235
3237
|
__name: 'ShConfirmAction',
|
|
3236
3238
|
props: {
|
|
3237
3239
|
data: Object,
|
|
@@ -3317,7 +3319,7 @@ return (_ctx, _cache) => {
|
|
|
3317
3319
|
|
|
3318
3320
|
};
|
|
3319
3321
|
|
|
3320
|
-
script$
|
|
3322
|
+
script$8.__file = "src/lib/components/ShConfirmAction.vue";
|
|
3321
3323
|
|
|
3322
3324
|
const _hoisted_1$5 = /*#__PURE__*/createElementVNode("span", {
|
|
3323
3325
|
class: "spinner-border spinner-border-sm me-1",
|
|
@@ -3325,7 +3327,7 @@ const _hoisted_1$5 = /*#__PURE__*/createElementVNode("span", {
|
|
|
3325
3327
|
"aria-hidden": "true"
|
|
3326
3328
|
}, null, -1 /* HOISTED */);
|
|
3327
3329
|
|
|
3328
|
-
var script$
|
|
3330
|
+
var script$7 = {
|
|
3329
3331
|
__name: 'ShSilentAction',
|
|
3330
3332
|
props: {
|
|
3331
3333
|
data: Object,
|
|
@@ -3413,9 +3415,9 @@ return (_ctx, _cache) => {
|
|
|
3413
3415
|
|
|
3414
3416
|
};
|
|
3415
3417
|
|
|
3416
|
-
script$
|
|
3418
|
+
script$7.__file = "src/lib/components/ShSilentAction.vue";
|
|
3417
3419
|
|
|
3418
|
-
var script$
|
|
3420
|
+
var script$6 = {
|
|
3419
3421
|
name: 'sh-table',
|
|
3420
3422
|
props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds'],
|
|
3421
3423
|
inject: ['channel'],
|
|
@@ -3647,10 +3649,10 @@ var script$5 = {
|
|
|
3647
3649
|
this.reloadData();
|
|
3648
3650
|
},
|
|
3649
3651
|
components: {
|
|
3650
|
-
ShSilentAction: script$
|
|
3651
|
-
ShConfirmAction: script$
|
|
3652
|
-
ShCanvas: script$
|
|
3653
|
-
pagination: script$
|
|
3652
|
+
ShSilentAction: script$7,
|
|
3653
|
+
ShConfirmAction: script$8,
|
|
3654
|
+
ShCanvas: script$a,
|
|
3655
|
+
pagination: script$9
|
|
3654
3656
|
},
|
|
3655
3657
|
computed: {
|
|
3656
3658
|
windowWidth: function () {
|
|
@@ -4280,10 +4282,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4280
4282
|
]))
|
|
4281
4283
|
}
|
|
4282
4284
|
|
|
4283
|
-
script$
|
|
4284
|
-
script$
|
|
4285
|
+
script$6.render = render$1;
|
|
4286
|
+
script$6.__file = "src/lib/components/ShTable.vue";
|
|
4285
4287
|
|
|
4286
|
-
var script$
|
|
4288
|
+
var script$5 = {
|
|
4287
4289
|
name: 'ShTabs',
|
|
4288
4290
|
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive','classOne','classTwo','classes'],
|
|
4289
4291
|
data () {
|
|
@@ -4404,8 +4406,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4404
4406
|
], 64 /* STABLE_FRAGMENT */))
|
|
4405
4407
|
}
|
|
4406
4408
|
|
|
4407
|
-
script$
|
|
4408
|
-
script$
|
|
4409
|
+
script$5.render = render;
|
|
4410
|
+
script$5.__file = "src/lib/components/ShTabs.vue";
|
|
4409
4411
|
|
|
4410
4412
|
const _hoisted_1$3 = {
|
|
4411
4413
|
class: "nav nav-tabs",
|
|
@@ -4420,7 +4422,7 @@ const _hoisted_4$3 = /*#__PURE__*/createElementVNode("i", { class: "d-none" }, n
|
|
|
4420
4422
|
const _hoisted_5$3 = { class: "sh_tab_count" };
|
|
4421
4423
|
const _hoisted_6$2 = { class: "tab-content" };
|
|
4422
4424
|
|
|
4423
|
-
var script$
|
|
4425
|
+
var script$4 = {
|
|
4424
4426
|
__name: 'ShDynamicTabs',
|
|
4425
4427
|
props: ['tabs','data'],
|
|
4426
4428
|
setup(__props) {
|
|
@@ -4474,7 +4476,7 @@ return (_ctx, _cache) => {
|
|
|
4474
4476
|
|
|
4475
4477
|
};
|
|
4476
4478
|
|
|
4477
|
-
script$
|
|
4479
|
+
script$4.__file = "src/lib/components/ShDynamicTabs.vue";
|
|
4478
4480
|
|
|
4479
4481
|
const useUserStore = defineStore('user-store', {
|
|
4480
4482
|
state: () => ({
|
|
@@ -4584,7 +4586,7 @@ const _hoisted_4$2 = {
|
|
|
4584
4586
|
const _hoisted_5$2 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
|
|
4585
4587
|
|
|
4586
4588
|
|
|
4587
|
-
var script$
|
|
4589
|
+
var script$3 = {
|
|
4588
4590
|
__name: 'Departments',
|
|
4589
4591
|
setup(__props) {
|
|
4590
4592
|
|
|
@@ -4614,7 +4616,7 @@ return (_ctx, _cache) => {
|
|
|
4614
4616
|
_hoisted_5$2,
|
|
4615
4617
|
createTextVNode(" ADD DEPARTMENT")
|
|
4616
4618
|
], 512 /* NEED_PATCH */),
|
|
4617
|
-
createVNode(script$
|
|
4619
|
+
createVNode(script$6, {
|
|
4618
4620
|
headers: ['id','name','description', 'created_at'],
|
|
4619
4621
|
"end-point": "admin/departments/list",
|
|
4620
4622
|
actions: {
|
|
@@ -4628,12 +4630,12 @@ return (_ctx, _cache) => {
|
|
|
4628
4630
|
]
|
|
4629
4631
|
}
|
|
4630
4632
|
}),
|
|
4631
|
-
createVNode(script$
|
|
4633
|
+
createVNode(script$c, {
|
|
4632
4634
|
"modal-id": "sh-department_modal",
|
|
4633
4635
|
"modal-title": "Department Form"
|
|
4634
4636
|
}, {
|
|
4635
4637
|
default: withCtx(() => [
|
|
4636
|
-
createVNode(script$
|
|
4638
|
+
createVNode(script$e, {
|
|
4637
4639
|
"success-callback": "departmentAdded",
|
|
4638
4640
|
onDepartmentAdded: departmentAdded,
|
|
4639
4641
|
action: "admin/departments/store",
|
|
@@ -4650,7 +4652,7 @@ return (_ctx, _cache) => {
|
|
|
4650
4652
|
|
|
4651
4653
|
};
|
|
4652
4654
|
|
|
4653
|
-
script$
|
|
4655
|
+
script$3.__file = "src/lib/components/core/Departments/Departments.vue";
|
|
4654
4656
|
|
|
4655
4657
|
const _hoisted_1$1 = {
|
|
4656
4658
|
key: 0,
|
|
@@ -4669,7 +4671,7 @@ const _hoisted_4$1 = { class: "text-primary text-capitalize" };
|
|
|
4669
4671
|
const _hoisted_5$1 = ["value"];
|
|
4670
4672
|
const _hoisted_6$1 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
|
|
4671
4673
|
|
|
4672
|
-
var script$
|
|
4674
|
+
var script$2 = {
|
|
4673
4675
|
__name: 'Department',
|
|
4674
4676
|
setup(__props) {
|
|
4675
4677
|
|
|
@@ -4767,7 +4769,7 @@ return (_ctx, _cache) => {
|
|
|
4767
4769
|
createElementVNode("div", _hoisted_2$1, [
|
|
4768
4770
|
_hoisted_3$1,
|
|
4769
4771
|
createElementVNode("h5", null, "Department #" + toDisplayString(unref(department).id) + " - " + toDisplayString(unref(department).name) + " Allowed Modules", 1 /* TEXT */),
|
|
4770
|
-
createVNode(script$
|
|
4772
|
+
createVNode(script$6, {
|
|
4771
4773
|
actions: {
|
|
4772
4774
|
label: 'Actions',
|
|
4773
4775
|
actions: [
|
|
@@ -4787,12 +4789,12 @@ return (_ctx, _cache) => {
|
|
|
4787
4789
|
headers: ['id',showModule,'created_at'],
|
|
4788
4790
|
"end-point": 'admin/departments/department/list-modules/' + id.value
|
|
4789
4791
|
}, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
|
|
4790
|
-
createVNode(script$
|
|
4792
|
+
createVNode(script$c, {
|
|
4791
4793
|
"modal-id": "addModule",
|
|
4792
4794
|
"modal-title": "Add Module Department"
|
|
4793
4795
|
}, {
|
|
4794
4796
|
default: withCtx(() => [
|
|
4795
|
-
createVNode(script$
|
|
4797
|
+
createVNode(script$e, {
|
|
4796
4798
|
"reload-select-items": unref(reload),
|
|
4797
4799
|
"success-callback": moduleAdded,
|
|
4798
4800
|
"fill-selects": {
|
|
@@ -4814,7 +4816,7 @@ return (_ctx, _cache) => {
|
|
|
4814
4816
|
ref: permissionCanvasBtn,
|
|
4815
4817
|
"data-bs-toggle": "offcanvas"
|
|
4816
4818
|
}, null, 512 /* NEED_PATCH */),
|
|
4817
|
-
createVNode(script$
|
|
4819
|
+
createVNode(script$a, {
|
|
4818
4820
|
"canvas-id": "permissionsCanvas",
|
|
4819
4821
|
position: "end enlarged",
|
|
4820
4822
|
"canvas-title": "Module Permissions"
|
|
@@ -4862,7 +4864,7 @@ return (_ctx, _cache) => {
|
|
|
4862
4864
|
|
|
4863
4865
|
};
|
|
4864
4866
|
|
|
4865
|
-
script$
|
|
4867
|
+
script$2.__file = "src/lib/components/core/Departments/department/Department.vue";
|
|
4866
4868
|
|
|
4867
4869
|
const _withScopeId = n => (pushScopeId("data-v-2911509a"),n=n(),popScopeId(),n);
|
|
4868
4870
|
const _hoisted_1 = {
|
|
@@ -4890,7 +4892,7 @@ const _hoisted_8 = {
|
|
|
4890
4892
|
};
|
|
4891
4893
|
const _hoisted_9 = { class: "sh-auth-footer" };
|
|
4892
4894
|
|
|
4893
|
-
var script = {
|
|
4895
|
+
var script$1 = {
|
|
4894
4896
|
__name: 'ShAuth',
|
|
4895
4897
|
setup(__props) {
|
|
4896
4898
|
|
|
@@ -4917,7 +4919,7 @@ watch(user,(newUser) => {
|
|
|
4917
4919
|
function loginSuccessful(res){
|
|
4918
4920
|
userStore.setAccessToken(res.token);
|
|
4919
4921
|
userStore.setUser();
|
|
4920
|
-
|
|
4922
|
+
window.location.href = redirectLogin;
|
|
4921
4923
|
}
|
|
4922
4924
|
|
|
4923
4925
|
return (_ctx, _cache) => {
|
|
@@ -4929,7 +4931,7 @@ return (_ctx, _cache) => {
|
|
|
4929
4931
|
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4930
4932
|
(section.value === 'login')
|
|
4931
4933
|
? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
4932
|
-
createVNode(script$
|
|
4934
|
+
createVNode(script$e, {
|
|
4933
4935
|
class: "sh-login-form",
|
|
4934
4936
|
fields: ['email','password'],
|
|
4935
4937
|
"action-label": "Login",
|
|
@@ -4954,7 +4956,7 @@ return (_ctx, _cache) => {
|
|
|
4954
4956
|
(unref(registerSubTitle))
|
|
4955
4957
|
? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
|
|
4956
4958
|
: createCommentVNode("v-if", true),
|
|
4957
|
-
createVNode(script$
|
|
4959
|
+
createVNode(script$e, {
|
|
4958
4960
|
class: "sh-login-form",
|
|
4959
4961
|
fields: unref(registrationFields),
|
|
4960
4962
|
"action-label": "Sign Up",
|
|
@@ -4975,27 +4977,75 @@ return (_ctx, _cache) => {
|
|
|
4975
4977
|
|
|
4976
4978
|
};
|
|
4977
4979
|
|
|
4978
|
-
script.__scopeId = "data-v-2911509a";
|
|
4979
|
-
script.__file = "src/lib/components/core/auth/ShAuth.vue";
|
|
4980
|
+
script$1.__scopeId = "data-v-2911509a";
|
|
4981
|
+
script$1.__file = "src/lib/components/core/auth/ShAuth.vue";
|
|
4982
|
+
|
|
4983
|
+
var script = {
|
|
4984
|
+
__name: 'TextInput',
|
|
4985
|
+
props: ['modelValue','label'],
|
|
4986
|
+
emits: ['update:modelValue','clearValidationErrors'],
|
|
4987
|
+
setup(__props, { emit }) {
|
|
4988
|
+
|
|
4989
|
+
const props = __props;
|
|
4990
|
+
|
|
4991
|
+
|
|
4992
|
+
|
|
4993
|
+
const inputModel = ref(null);
|
|
4994
|
+
|
|
4995
|
+
const modelValueUpdated = (e) => {
|
|
4996
|
+
emit('clearValidationErrors');
|
|
4997
|
+
emit('update:modelValue',inputModel);
|
|
4998
|
+
};
|
|
4999
|
+
onMounted(()=>{
|
|
5000
|
+
props.modelValue && (inputModel.value = props.modelValue);
|
|
5001
|
+
});
|
|
5002
|
+
|
|
5003
|
+
|
|
5004
|
+
return (_ctx, _cache) => {
|
|
5005
|
+
return withDirectives((openBlock(), createElementBlock("input", {
|
|
5006
|
+
type: "text",
|
|
5007
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((inputModel).value = $event)),
|
|
5008
|
+
onChange: modelValueUpdated,
|
|
5009
|
+
onKeydown: modelValueUpdated,
|
|
5010
|
+
onUpdated: modelValueUpdated
|
|
5011
|
+
}, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
|
|
5012
|
+
[vModelText, inputModel.value]
|
|
5013
|
+
])
|
|
5014
|
+
}
|
|
5015
|
+
}
|
|
5016
|
+
|
|
5017
|
+
};
|
|
5018
|
+
|
|
5019
|
+
script.__file = "src/lib/components/form-components/TextInput.vue";
|
|
4980
5020
|
|
|
4981
5021
|
const ShFrontend = {
|
|
4982
5022
|
install: (app, options) => {
|
|
4983
|
-
ShStorage.setItem('ShConfig',options);
|
|
4984
5023
|
if(options.sessionTimeout){
|
|
4985
5024
|
app.provide('sessionTimeout',options.sessionTimeout);
|
|
4986
5025
|
ShStorage.setItem('sessionTimeout',options.sessionTimeout);
|
|
4987
5026
|
}
|
|
5027
|
+
const shFormElements = options.shFormElementClasses ?? {};
|
|
5028
|
+
|
|
5029
|
+
const defaultFormElementClasses = {
|
|
5030
|
+
formGroup: shFormElements.formGroup ?? 'mb-2',
|
|
5031
|
+
formLabel: shFormElements.formLabel ?? 'form-label',
|
|
5032
|
+
helperText: shFormElements.helperText ?? 'form-text',
|
|
5033
|
+
actionBtn: shFormElements.actionBtn ?? 'btn btn-primary',
|
|
5034
|
+
formErrorTitle: shFormElements.formErrorTitle ?? 'alert alert-danger',
|
|
5035
|
+
invalidFeedback: shFormElements.invalidFeedback ?? 'invalid-feedback'
|
|
5036
|
+
};
|
|
4988
5037
|
const swalPosition = options.swalPosition ?? 'top-end';
|
|
4989
5038
|
const loginEndpoint = options.loginEndpoint ?? 'auth/login';
|
|
4990
5039
|
const registerEndpoint = options.registerEndpoint ?? 'auth/register';
|
|
4991
5040
|
const registerTitle = options.registerTitle ?? 'Create a new account';
|
|
4992
5041
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
4993
5042
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
5043
|
+
options.formTextInput ?? script;
|
|
4994
5044
|
const loginUrl = options.loginUrl ?? `/login`;
|
|
4995
5045
|
const redirectLogin = options.redirectLogin ?? `/`;
|
|
4996
5046
|
const redirectRegister = options.redirectRegister ?? `/`;
|
|
4997
5047
|
const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
|
|
4998
|
-
const AuthComponent = options.authComponent ?? script;
|
|
5048
|
+
const AuthComponent = options.authComponent ?? script$1;
|
|
4999
5049
|
app.provide('loginEndpoint',loginEndpoint);
|
|
5000
5050
|
app.provide('registerEndpoint', registerEndpoint);
|
|
5001
5051
|
app.provide('registrationFields', registrationFields);
|
|
@@ -5004,7 +5054,9 @@ const ShFrontend = {
|
|
|
5004
5054
|
app.provide('redirectLogin', redirectLogin);
|
|
5005
5055
|
app.provide('redirectRegister', redirectRegister);
|
|
5006
5056
|
app.provide('logoutApiEndpoint', logoutApiEndpoint);
|
|
5057
|
+
app.provide('formComponents', options.shFormComponents);
|
|
5007
5058
|
app.provide('loginUrl', loginUrl);
|
|
5059
|
+
app.provide('shFormElementClasses',defaultFormElementClasses);
|
|
5008
5060
|
window.swalPosition = swalPosition;
|
|
5009
5061
|
if(options.router) {
|
|
5010
5062
|
options.router.addRoute({
|
|
@@ -5013,14 +5065,20 @@ const ShFrontend = {
|
|
|
5013
5065
|
});
|
|
5014
5066
|
options.router.addRoute({
|
|
5015
5067
|
path: '/sh-departments',
|
|
5016
|
-
component: script$
|
|
5068
|
+
component: script$3
|
|
5017
5069
|
});
|
|
5018
5070
|
options.router.addRoute({
|
|
5019
5071
|
path: '/sh-departments/permissions/:id',
|
|
5020
|
-
component: script$
|
|
5072
|
+
component: script$2
|
|
5021
5073
|
});
|
|
5022
5074
|
}
|
|
5075
|
+
//filter unwanted config items from options to be put in local storage
|
|
5076
|
+
const removeKeys = ['formTextInput','router','shFormElementClasses'];
|
|
5077
|
+
const allowKeys = [];
|
|
5078
|
+
Object.keys(options).map(key=> ((typeof options[key] !== 'string' && !allowKeys.includes(key)) || removeKeys.includes(key)) && delete options[key]);
|
|
5079
|
+
|
|
5080
|
+
ShStorage.setItem('ShConfig',options);
|
|
5023
5081
|
}
|
|
5024
5082
|
};
|
|
5025
5083
|
|
|
5026
|
-
export { script$
|
|
5084
|
+
export { script$a as ShCanvas, script$8 as ShConfirmAction, script$d as ShDropDownForm, script$4 as ShDynamicTabs, script$e as ShForm, ShFrontend, script$c as ShModal, script$b as ShModalForm, script$h as ShPhone, script$7 as ShSilentAction, script$6 as ShTable, script$5 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iankibetsh/shframework",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "Vue library for handling laravel backend",
|
|
5
5
|
"main": "dist/library.js",
|
|
6
6
|
"module": "dist/library.mjs",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"nprogress": "^0.2.0",
|
|
28
28
|
"pinia": "^2.0.22",
|
|
29
29
|
"sweetalert2": "^11.4.14",
|
|
30
|
-
"vue": "^3.2.37"
|
|
30
|
+
"vue": "^3.2.37",
|
|
31
|
+
"lodash": "^4.17.21"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"rollup": "^2.75.7",
|