@iankibetsh/shframework 1.8.7 → 1.9.0
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 +467 -241
- package/dist/library.mjs +435 -227
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -14,6 +14,24 @@ var bootstrap = require('bootstrap');
|
|
|
14
14
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
16
|
|
|
17
|
+
function _interopNamespace(e) {
|
|
18
|
+
if (e && e.__esModule) return e;
|
|
19
|
+
var n = Object.create(null);
|
|
20
|
+
if (e) {
|
|
21
|
+
Object.keys(e).forEach(function (k) {
|
|
22
|
+
if (k !== 'default') {
|
|
23
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
24
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return e[k]; }
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
n["default"] = e;
|
|
32
|
+
return Object.freeze(n);
|
|
33
|
+
}
|
|
34
|
+
|
|
17
35
|
var Axios__default = /*#__PURE__*/_interopDefaultLegacy(Axios);
|
|
18
36
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
19
37
|
var Swal__default = /*#__PURE__*/_interopDefaultLegacy(Swal);
|
|
@@ -359,6 +377,7 @@ const updateSession = () =>{
|
|
|
359
377
|
ShStorage.setItem('last_activity', timeNow);
|
|
360
378
|
};
|
|
361
379
|
|
|
380
|
+
const graphQlEndpoint = 'sh-ql';
|
|
362
381
|
let apiUrl = undefined.VITE_APP_API_URL;
|
|
363
382
|
// eslint-disable-next-line no-undef
|
|
364
383
|
if (process.env.NODE_ENV === 'production') {
|
|
@@ -394,10 +413,24 @@ function doPost (endPoint, data) {
|
|
|
394
413
|
}
|
|
395
414
|
)
|
|
396
415
|
}
|
|
416
|
+
function graphQlQuery(query) {
|
|
417
|
+
const data = {
|
|
418
|
+
query
|
|
419
|
+
};
|
|
420
|
+
return doGet(graphQlEndpoint,data)
|
|
421
|
+
}
|
|
422
|
+
function graphQlMutate(mutation) {
|
|
423
|
+
const data = {
|
|
424
|
+
query: `mutation ${mutation}`
|
|
425
|
+
};
|
|
426
|
+
return doPost(graphQlEndpoint,data)
|
|
427
|
+
}
|
|
397
428
|
|
|
398
429
|
var shApis = {
|
|
399
430
|
doGet,
|
|
400
|
-
doPost
|
|
431
|
+
doPost,
|
|
432
|
+
graphQlQuery,
|
|
433
|
+
graphQlMutate
|
|
401
434
|
};
|
|
402
435
|
|
|
403
436
|
const countries = [
|
|
@@ -1873,7 +1906,7 @@ const countries = [
|
|
|
1873
1906
|
}
|
|
1874
1907
|
];
|
|
1875
1908
|
|
|
1876
|
-
var script$
|
|
1909
|
+
var script$w = {
|
|
1877
1910
|
name: 'PhoneInput',
|
|
1878
1911
|
props: ['modelValue', 'country_code'],
|
|
1879
1912
|
data () {
|
|
@@ -1943,19 +1976,19 @@ var script$s = {
|
|
|
1943
1976
|
}
|
|
1944
1977
|
};
|
|
1945
1978
|
|
|
1946
|
-
const _hoisted_1$
|
|
1947
|
-
const _hoisted_2$
|
|
1979
|
+
const _hoisted_1$o = { class: "sh-phone mb-3" };
|
|
1980
|
+
const _hoisted_2$f = {
|
|
1948
1981
|
key: 0,
|
|
1949
1982
|
style: {"display":"contents"}
|
|
1950
1983
|
};
|
|
1951
|
-
const _hoisted_3$
|
|
1952
|
-
const _hoisted_4$
|
|
1984
|
+
const _hoisted_3$e = ["src"];
|
|
1985
|
+
const _hoisted_4$e = ["value"];
|
|
1953
1986
|
|
|
1954
|
-
function render$
|
|
1955
|
-
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1987
|
+
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1988
|
+
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
|
|
1956
1989
|
($data.selectedCountry)
|
|
1957
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
1958
|
-
vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$
|
|
1990
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$f, [
|
|
1991
|
+
vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$e),
|
|
1959
1992
|
vue.createTextVNode(" " + vue.toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
|
|
1960
1993
|
]))
|
|
1961
1994
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -1968,7 +2001,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1968
2001
|
return (vue.openBlock(), vue.createElementBlock("option", {
|
|
1969
2002
|
value: country,
|
|
1970
2003
|
key: country.dialCode
|
|
1971
|
-
}, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$
|
|
2004
|
+
}, vue.toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$e))
|
|
1972
2005
|
}), 128 /* KEYED_FRAGMENT */))
|
|
1973
2006
|
], 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
|
|
1974
2007
|
[vue.vModelSelect, $data.selectedCountry]
|
|
@@ -1986,16 +2019,16 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1986
2019
|
]))
|
|
1987
2020
|
}
|
|
1988
2021
|
|
|
1989
|
-
script$
|
|
1990
|
-
script$
|
|
2022
|
+
script$w.render = render$5;
|
|
2023
|
+
script$w.__file = "src/lib/components/form-components/PhoneInput.vue";
|
|
1991
2024
|
|
|
1992
|
-
const _hoisted_1$
|
|
2025
|
+
const _hoisted_1$n = {
|
|
1993
2026
|
key: 0,
|
|
1994
2027
|
class: "dropdown sh-suggest"
|
|
1995
2028
|
};
|
|
1996
|
-
const _hoisted_2$
|
|
1997
|
-
const _hoisted_3$
|
|
1998
|
-
const _hoisted_4$
|
|
2029
|
+
const _hoisted_2$e = ["id"];
|
|
2030
|
+
const _hoisted_3$d = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2031
|
+
const _hoisted_4$d = ["onClick"];
|
|
1999
2032
|
const _hoisted_5$a = ["id"];
|
|
2000
2033
|
const _hoisted_6$9 = ["id", "aria-labelledby"];
|
|
2001
2034
|
const _hoisted_7$7 = { key: 0 };
|
|
@@ -2010,7 +2043,7 @@ const _hoisted_10$5 = {
|
|
|
2010
2043
|
};
|
|
2011
2044
|
|
|
2012
2045
|
|
|
2013
|
-
var script$
|
|
2046
|
+
var script$v = {
|
|
2014
2047
|
__name: 'ShSuggest',
|
|
2015
2048
|
props: ['fillSelects','modelValue'],
|
|
2016
2049
|
emits: ['update:modelValue'],
|
|
@@ -2091,7 +2124,7 @@ function filterData(e){
|
|
|
2091
2124
|
|
|
2092
2125
|
return (_ctx, _cache) => {
|
|
2093
2126
|
return (vue.unref(id))
|
|
2094
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2127
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
|
|
2095
2128
|
vue.createElementVNode("div", {
|
|
2096
2129
|
id: vue.unref(id),
|
|
2097
2130
|
"data-bs-toggle": "dropdown",
|
|
@@ -2100,14 +2133,14 @@ return (_ctx, _cache) => {
|
|
|
2100
2133
|
}, [
|
|
2101
2134
|
vue.createElementVNode("div", null, [
|
|
2102
2135
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(selectedSuggestions), (sgt) => {
|
|
2103
|
-
return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_3$
|
|
2136
|
+
return (vue.openBlock(), vue.createElementBlock("h5", _hoisted_3$d, [
|
|
2104
2137
|
vue.createTextVNode(vue.toDisplayString(sgt.name) + " ", 1 /* TEXT */),
|
|
2105
2138
|
vue.createElementVNode("button", {
|
|
2106
2139
|
onClick: $event => (removeSuggestion(sgt.id)),
|
|
2107
2140
|
type: "button",
|
|
2108
2141
|
class: "btn-close border-start border-1 ms-1",
|
|
2109
2142
|
"aria-label": "Close"
|
|
2110
|
-
}, null, 8 /* PROPS */, _hoisted_4$
|
|
2143
|
+
}, null, 8 /* PROPS */, _hoisted_4$d)
|
|
2111
2144
|
]))
|
|
2112
2145
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
2113
2146
|
]),
|
|
@@ -2118,7 +2151,7 @@ return (_ctx, _cache) => {
|
|
|
2118
2151
|
onInput: filterData,
|
|
2119
2152
|
class: "flex-fill h-100 sh-suggestion-input"
|
|
2120
2153
|
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$a)
|
|
2121
|
-
], 8 /* PROPS */, _hoisted_2$
|
|
2154
|
+
], 8 /* PROPS */, _hoisted_2$e),
|
|
2122
2155
|
vue.createElementVNode("ul", {
|
|
2123
2156
|
class: "dropdown-menu w-100",
|
|
2124
2157
|
id: 'dropwdown_section' + vue.unref(id),
|
|
@@ -2151,15 +2184,15 @@ return (_ctx, _cache) => {
|
|
|
2151
2184
|
|
|
2152
2185
|
};
|
|
2153
2186
|
|
|
2154
|
-
script$
|
|
2155
|
-
script$
|
|
2187
|
+
script$v.__scopeId = "data-v-71cc9569";
|
|
2188
|
+
script$v.__file = "src/lib/components/form-components/ShSuggest.vue";
|
|
2156
2189
|
|
|
2157
|
-
var script$
|
|
2190
|
+
var script$u = {
|
|
2158
2191
|
name: 'ShForm',
|
|
2159
2192
|
components: {
|
|
2160
|
-
PhoneInput: script$
|
|
2161
|
-
ShSuggest: script$
|
|
2162
|
-
ShPhone: script$
|
|
2193
|
+
PhoneInput: script$w,
|
|
2194
|
+
ShSuggest: script$v,
|
|
2195
|
+
ShPhone: script$w
|
|
2163
2196
|
},
|
|
2164
2197
|
props: [
|
|
2165
2198
|
'action',
|
|
@@ -2481,17 +2514,17 @@ var script$q = {
|
|
|
2481
2514
|
}
|
|
2482
2515
|
};
|
|
2483
2516
|
|
|
2484
|
-
const _hoisted_1$
|
|
2485
|
-
const _hoisted_2$
|
|
2517
|
+
const _hoisted_1$m = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
|
|
2518
|
+
const _hoisted_2$d = {
|
|
2486
2519
|
ref: "ShAutoForm",
|
|
2487
2520
|
class: "sh-form"
|
|
2488
2521
|
};
|
|
2489
|
-
const _hoisted_3$
|
|
2522
|
+
const _hoisted_3$c = {
|
|
2490
2523
|
key: 0,
|
|
2491
2524
|
class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
|
|
2492
2525
|
role: "alert"
|
|
2493
2526
|
};
|
|
2494
|
-
const _hoisted_4$
|
|
2527
|
+
const _hoisted_4$c = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
|
|
2495
2528
|
const _hoisted_5$9 = { key: 0 };
|
|
2496
2529
|
const _hoisted_6$8 = { key: 1 };
|
|
2497
2530
|
const _hoisted_7$6 = { class: "row" };
|
|
@@ -2537,18 +2570,18 @@ const _hoisted_24$1 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
|
2537
2570
|
"aria-hidden": "true"
|
|
2538
2571
|
}, null, -1 /* HOISTED */);
|
|
2539
2572
|
|
|
2540
|
-
function render$
|
|
2573
|
+
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2541
2574
|
const _component_phone_input = vue.resolveComponent("phone-input");
|
|
2542
2575
|
const _component_ShSuggest = vue.resolveComponent("ShSuggest");
|
|
2543
2576
|
|
|
2544
2577
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
2545
|
-
_hoisted_1$
|
|
2546
|
-
vue.createElementVNode("form", _hoisted_2$
|
|
2578
|
+
_hoisted_1$m,
|
|
2579
|
+
vue.createElementVNode("form", _hoisted_2$d, [
|
|
2547
2580
|
vue.createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
|
|
2548
2581
|
vue.createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
|
|
2549
2582
|
(_ctx.form_status == 3)
|
|
2550
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
2551
|
-
_hoisted_4$
|
|
2583
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$c, [
|
|
2584
|
+
_hoisted_4$c,
|
|
2552
2585
|
(_ctx.errorText)
|
|
2553
2586
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$9, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2554
2587
|
: (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$8, "Unexpected Error Occurred")),
|
|
@@ -2748,10 +2781,10 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2748
2781
|
], 64 /* STABLE_FRAGMENT */))
|
|
2749
2782
|
}
|
|
2750
2783
|
|
|
2751
|
-
script$
|
|
2752
|
-
script$
|
|
2784
|
+
script$u.render = render$4;
|
|
2785
|
+
script$u.__file = "src/lib/components/ShForm.vue";
|
|
2753
2786
|
|
|
2754
|
-
var script$
|
|
2787
|
+
var script$t = {
|
|
2755
2788
|
__name: 'EmailInput',
|
|
2756
2789
|
props: ['modelValue','label'],
|
|
2757
2790
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -2791,12 +2824,12 @@ return (_ctx, _cache) => {
|
|
|
2791
2824
|
|
|
2792
2825
|
};
|
|
2793
2826
|
|
|
2794
|
-
script$
|
|
2827
|
+
script$t.__file = "src/lib/components/form-components/EmailInput.vue";
|
|
2795
2828
|
|
|
2796
|
-
const _hoisted_1$
|
|
2829
|
+
const _hoisted_1$l = ["min", "max"];
|
|
2797
2830
|
|
|
2798
2831
|
|
|
2799
|
-
var script$
|
|
2832
|
+
var script$s = {
|
|
2800
2833
|
__name: 'NumberInput',
|
|
2801
2834
|
props: ['modelValue','label','min','max'],
|
|
2802
2835
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -2830,7 +2863,7 @@ return (_ctx, _cache) => {
|
|
|
2830
2863
|
onChange: modelValueUpdated,
|
|
2831
2864
|
onKeydown: modelValueUpdated,
|
|
2832
2865
|
onUpdated: modelValueUpdated
|
|
2833
|
-
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$
|
|
2866
|
+
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$l)), [
|
|
2834
2867
|
[vue.vModelText, inputModel.value]
|
|
2835
2868
|
])
|
|
2836
2869
|
}
|
|
@@ -2838,9 +2871,9 @@ return (_ctx, _cache) => {
|
|
|
2838
2871
|
|
|
2839
2872
|
};
|
|
2840
2873
|
|
|
2841
|
-
script$
|
|
2874
|
+
script$s.__file = "src/lib/components/form-components/NumberInput.vue";
|
|
2842
2875
|
|
|
2843
|
-
var script$
|
|
2876
|
+
var script$r = {
|
|
2844
2877
|
__name: 'TextInput',
|
|
2845
2878
|
props: ['modelValue','label','isInvalid'],
|
|
2846
2879
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -2882,9 +2915,9 @@ return (_ctx, _cache) => {
|
|
|
2882
2915
|
|
|
2883
2916
|
};
|
|
2884
2917
|
|
|
2885
|
-
script$
|
|
2918
|
+
script$r.__file = "src/lib/components/form-components/TextInput.vue";
|
|
2886
2919
|
|
|
2887
|
-
var script$
|
|
2920
|
+
var script$q = {
|
|
2888
2921
|
__name: 'TextAreaInput',
|
|
2889
2922
|
props: ['modelValue','label'],
|
|
2890
2923
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -2924,12 +2957,12 @@ return (_ctx, _cache) => {
|
|
|
2924
2957
|
|
|
2925
2958
|
};
|
|
2926
2959
|
|
|
2927
|
-
script$
|
|
2960
|
+
script$q.__file = "src/lib/components/form-components/TextAreaInput.vue";
|
|
2928
2961
|
|
|
2929
|
-
const _hoisted_1$
|
|
2962
|
+
const _hoisted_1$k = ["value"];
|
|
2930
2963
|
|
|
2931
2964
|
|
|
2932
|
-
var script$
|
|
2965
|
+
var script$p = {
|
|
2933
2966
|
__name: 'SelectInput',
|
|
2934
2967
|
props: ['modelValue','label','data','dataUrl'],
|
|
2935
2968
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -2984,7 +3017,7 @@ return (_ctx, _cache) => {
|
|
|
2984
3017
|
return (vue.openBlock(), vue.createElementBlock("option", {
|
|
2985
3018
|
key: option.id,
|
|
2986
3019
|
value: option.id
|
|
2987
|
-
}, vue.toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$
|
|
3020
|
+
}, vue.toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$k))
|
|
2988
3021
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2989
3022
|
], 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
|
|
2990
3023
|
[vue.vModelSelect, inputModel.value]
|
|
@@ -2994,9 +3027,9 @@ return (_ctx, _cache) => {
|
|
|
2994
3027
|
|
|
2995
3028
|
};
|
|
2996
3029
|
|
|
2997
|
-
script$
|
|
3030
|
+
script$p.__file = "src/lib/components/form-components/SelectInput.vue";
|
|
2998
3031
|
|
|
2999
|
-
var script$
|
|
3032
|
+
var script$o = {
|
|
3000
3033
|
__name: 'PasswordInput',
|
|
3001
3034
|
props: ['modelValue','label'],
|
|
3002
3035
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3032,12 +3065,12 @@ return (_ctx, _cache) => {
|
|
|
3032
3065
|
|
|
3033
3066
|
};
|
|
3034
3067
|
|
|
3035
|
-
script$
|
|
3068
|
+
script$o.__file = "src/lib/components/form-components/PasswordInput.vue";
|
|
3036
3069
|
|
|
3037
|
-
const _hoisted_1$
|
|
3038
|
-
const _hoisted_2$
|
|
3039
|
-
const _hoisted_3$
|
|
3040
|
-
const _hoisted_4$
|
|
3070
|
+
const _hoisted_1$j = /*#__PURE__*/vue.createElementVNode("div", null, null, -1 /* HOISTED */);
|
|
3071
|
+
const _hoisted_2$c = ["onUpdate:modelValue"];
|
|
3072
|
+
const _hoisted_3$b = ["innerHTML"];
|
|
3073
|
+
const _hoisted_4$b = ["innerHTML"];
|
|
3041
3074
|
const _hoisted_5$8 = ["innerHTML"];
|
|
3042
3075
|
const _hoisted_6$7 = ["disabled"];
|
|
3043
3076
|
const _hoisted_7$5 = {
|
|
@@ -3049,7 +3082,7 @@ const _hoisted_7$5 = {
|
|
|
3049
3082
|
const _hoisted_8$4 = { key: 1 };
|
|
3050
3083
|
|
|
3051
3084
|
|
|
3052
|
-
var script$
|
|
3085
|
+
var script$n = {
|
|
3053
3086
|
__name: 'ShAutoForm',
|
|
3054
3087
|
props: [
|
|
3055
3088
|
'action','successCallback','retainDataAfterSubmission',
|
|
@@ -3061,7 +3094,7 @@ var script$j = {
|
|
|
3061
3094
|
'textAreas',
|
|
3062
3095
|
'currentData',
|
|
3063
3096
|
'emails',
|
|
3064
|
-
'phones','numbers','selects','dates'
|
|
3097
|
+
'phones','numbers','selects','dates','gqlMutation'
|
|
3065
3098
|
],
|
|
3066
3099
|
emits: ['success'],
|
|
3067
3100
|
setup(__props, { emit }) {
|
|
@@ -3082,13 +3115,13 @@ const getFieldComponent = (fieldObj)=>{
|
|
|
3082
3115
|
const defaultPhones = ['phone'];
|
|
3083
3116
|
const defaultEmails = ['email'];
|
|
3084
3117
|
const formComponents = vue.inject('formComponents');
|
|
3085
|
-
const TextComponent = formComponents.text ?? script$
|
|
3086
|
-
const TextAreaComponent = formComponents.textArea ?? script$
|
|
3087
|
-
const EmailComponent = formComponents.email ?? script$
|
|
3088
|
-
const PhoneComponent = formComponents.phone ?? script$
|
|
3089
|
-
const NumberComponent = formComponents.number ?? script$
|
|
3090
|
-
const SelectComponent = formComponents.select ?? script$
|
|
3091
|
-
const PasswordComponent = formComponents.password ?? script$
|
|
3118
|
+
const TextComponent = formComponents.text ?? script$r;
|
|
3119
|
+
const TextAreaComponent = formComponents.textArea ?? script$q;
|
|
3120
|
+
const EmailComponent = formComponents.email ?? script$t;
|
|
3121
|
+
const PhoneComponent = formComponents.phone ?? script$w;
|
|
3122
|
+
const NumberComponent = formComponents.number ?? script$s;
|
|
3123
|
+
const SelectComponent = formComponents.select ?? script$p;
|
|
3124
|
+
const PasswordComponent = formComponents.password ?? script$o;
|
|
3092
3125
|
if(props.customComponents && props.customComponents[field]) {
|
|
3093
3126
|
return props.customComponents[field]
|
|
3094
3127
|
}
|
|
@@ -3100,16 +3133,16 @@ const getFieldComponent = (fieldObj)=>{
|
|
|
3100
3133
|
}
|
|
3101
3134
|
else
|
|
3102
3135
|
if((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)){
|
|
3103
|
-
return formComponents.textArea ?? script$
|
|
3136
|
+
return formComponents.textArea ?? script$q
|
|
3104
3137
|
} else
|
|
3105
3138
|
if((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)){
|
|
3106
|
-
return formComponents.email ?? script$
|
|
3139
|
+
return formComponents.email ?? script$t
|
|
3107
3140
|
} else
|
|
3108
3141
|
if((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)){
|
|
3109
|
-
return formComponents.phone ?? script$
|
|
3142
|
+
return formComponents.phone ?? script$w
|
|
3110
3143
|
} else
|
|
3111
3144
|
if((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)){
|
|
3112
|
-
return formComponents.number ?? script$
|
|
3145
|
+
return formComponents.number ?? script$s
|
|
3113
3146
|
}
|
|
3114
3147
|
// else
|
|
3115
3148
|
// if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
|
|
@@ -3118,7 +3151,7 @@ const getFieldComponent = (fieldObj)=>{
|
|
|
3118
3151
|
// if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
|
|
3119
3152
|
// return formComponents.date ?? DateInput
|
|
3120
3153
|
// }
|
|
3121
|
-
return formComponents.text ?? script$
|
|
3154
|
+
return formComponents.text ?? script$r
|
|
3122
3155
|
};
|
|
3123
3156
|
const shFormElementClasses = vue.ref(null);
|
|
3124
3157
|
shFormElementClasses.value = vue.inject('shFormElementClasses');
|
|
@@ -3156,30 +3189,54 @@ const submitForm = e => {
|
|
|
3156
3189
|
e.preventDefault();
|
|
3157
3190
|
loading.value = true;
|
|
3158
3191
|
const data = {};
|
|
3159
|
-
formFields.value.map(field=>
|
|
3160
|
-
|
|
3161
|
-
loading.value = false;
|
|
3162
|
-
emit('formSubmitted',res.data);
|
|
3163
|
-
emit('success',res.data);
|
|
3164
|
-
props.successMessage && shRepo.showToast(props.successMessage);
|
|
3165
|
-
props.successCallback && props.successCallback(res.data);
|
|
3166
|
-
!props.retainDataAfterSubmission && formFields.value.map(field=>field.value = null);
|
|
3167
|
-
closeModal();
|
|
3168
|
-
}).catch(reason=>{
|
|
3169
|
-
console.log(reason);
|
|
3170
|
-
loading.value = false;
|
|
3171
|
-
const httpStatus = reason.response ? reason.response.status:0;
|
|
3172
|
-
formError.value = httpStatus === 422 ? formError.value = null:reason.message ?? null;
|
|
3173
|
-
let httpErrors = {};
|
|
3174
|
-
httpStatus === 422 && typeof reason.response.data.errors === 'object' && (httpErrors = reason.response.data.errors);
|
|
3175
|
-
if(httpErrors && reason.response){
|
|
3176
|
-
Object.keys(httpErrors).map(key=>validationErrors.value[key] = typeof httpErrors[key] === 'string' ? httpErrors[key]:httpErrors[key][0]);
|
|
3177
|
-
}
|
|
3178
|
-
(httpStatus !== 422 && formError.value) && shRepo.showToast(formError.value,'error');
|
|
3179
|
-
validationErrors.value;
|
|
3192
|
+
formFields.value.map(field=>{
|
|
3193
|
+
data[field.field] = field.value;
|
|
3180
3194
|
});
|
|
3195
|
+
if(props.gqlMutation) {
|
|
3196
|
+
let args = `(`;
|
|
3197
|
+
let selectFields = Object.keys(data);
|
|
3198
|
+
selectFields.forEach(key=>{
|
|
3199
|
+
if(data[key]) {
|
|
3200
|
+
args +=`${key}: "${data[key]}",`;
|
|
3201
|
+
}
|
|
3202
|
+
});
|
|
3203
|
+
args+=`)`;
|
|
3204
|
+
args = args.replace(',)',')');
|
|
3205
|
+
if(args == '()') {
|
|
3206
|
+
args = '';
|
|
3207
|
+
}
|
|
3208
|
+
const mutation = `{\n${props.gqlMutation} ${args} {\n${selectFields.join(`\n`)}\n}\n}`;
|
|
3209
|
+
console.log(mutation);
|
|
3210
|
+
shApis.graphQlMutate(mutation).then(res=>handleSuccessRequest(res)).catch(reason=>handlefailedRequest(reason));
|
|
3211
|
+
} else {
|
|
3212
|
+
shApis.doPost(props.action,data).then(res=>handleSuccessRequest(res)).catch(reason=>handlefailedRequest(reason));
|
|
3213
|
+
}
|
|
3181
3214
|
return false
|
|
3182
3215
|
};
|
|
3216
|
+
|
|
3217
|
+
const handleSuccessRequest = res=>{
|
|
3218
|
+
loading.value = false;
|
|
3219
|
+
emit('formSubmitted',res.data);
|
|
3220
|
+
emit('success',res.data);
|
|
3221
|
+
props.successMessage && shRepo.showToast(props.successMessage);
|
|
3222
|
+
props.successCallback && props.successCallback(res.data);
|
|
3223
|
+
!props.retainDataAfterSubmission && formFields.value.map(field=>field.value = null);
|
|
3224
|
+
closeModal();
|
|
3225
|
+
};
|
|
3226
|
+
|
|
3227
|
+
const handlefailedRequest = reason=>{
|
|
3228
|
+
console.log(reason);
|
|
3229
|
+
loading.value = false;
|
|
3230
|
+
const httpStatus = reason.response ? reason.response.status:0;
|
|
3231
|
+
formError.value = httpStatus === 422 ? formError.value = null:reason.message ?? null;
|
|
3232
|
+
let httpErrors = {};
|
|
3233
|
+
httpStatus === 422 && typeof reason.response.data.errors === 'object' && (httpErrors = reason.response.data.errors);
|
|
3234
|
+
if(httpErrors && reason.response){
|
|
3235
|
+
Object.keys(httpErrors).map(key=>validationErrors.value[key] = typeof httpErrors[key] === 'string' ? httpErrors[key]:httpErrors[key][0]);
|
|
3236
|
+
}
|
|
3237
|
+
(httpStatus !== 422 && formError.value) && shRepo.showToast(formError.value,'error');
|
|
3238
|
+
validationErrors.value;
|
|
3239
|
+
};
|
|
3183
3240
|
const submitBtnWidth = vue.ref(null);
|
|
3184
3241
|
const setExistingData = (existingData)=>{
|
|
3185
3242
|
if (props.currentData) {
|
|
@@ -3232,7 +3289,7 @@ vue.onMounted((ev)=>{
|
|
|
3232
3289
|
|
|
3233
3290
|
return (_ctx, _cache) => {
|
|
3234
3291
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
3235
|
-
_hoisted_1$
|
|
3292
|
+
_hoisted_1$j,
|
|
3236
3293
|
vue.createElementVNode("form", {
|
|
3237
3294
|
class: vue.normalizeClass([__props.formClass, "sh-form"]),
|
|
3238
3295
|
ref_key: "shAutoForm",
|
|
@@ -3249,7 +3306,7 @@ return (_ctx, _cache) => {
|
|
|
3249
3306
|
key: 0,
|
|
3250
3307
|
type: "hidden",
|
|
3251
3308
|
"onUpdate:modelValue": $event => ((formFields.value[index].value) = $event)
|
|
3252
|
-
}, null, 8 /* PROPS */, _hoisted_2$
|
|
3309
|
+
}, null, 8 /* PROPS */, _hoisted_2$c)), [
|
|
3253
3310
|
[vue.vModelText, formFields.value[index].value]
|
|
3254
3311
|
])
|
|
3255
3312
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
@@ -3258,7 +3315,7 @@ return (_ctx, _cache) => {
|
|
|
3258
3315
|
key: 0,
|
|
3259
3316
|
class: vue.normalizeClass(getElementClass('formLabel')),
|
|
3260
3317
|
innerHTML: field.label
|
|
3261
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_3$
|
|
3318
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_3$b))
|
|
3262
3319
|
: vue.createCommentVNode("v-if", true),
|
|
3263
3320
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps(getComponentProps(field), {
|
|
3264
3321
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
@@ -3272,7 +3329,7 @@ return (_ctx, _cache) => {
|
|
|
3272
3329
|
key: 1,
|
|
3273
3330
|
class: vue.normalizeClass(getElementClass('formLabel')),
|
|
3274
3331
|
innerHTML: field.label
|
|
3275
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_4$
|
|
3332
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_4$b))
|
|
3276
3333
|
: vue.createCommentVNode("v-if", true),
|
|
3277
3334
|
(field.helper)
|
|
3278
3335
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -3315,12 +3372,12 @@ return (_ctx, _cache) => {
|
|
|
3315
3372
|
|
|
3316
3373
|
};
|
|
3317
3374
|
|
|
3318
|
-
script$
|
|
3375
|
+
script$n.__file = "src/lib/components/ShAutoForm.vue";
|
|
3319
3376
|
|
|
3320
|
-
const _hoisted_1$
|
|
3321
|
-
const _hoisted_2$
|
|
3377
|
+
const _hoisted_1$i = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
|
|
3378
|
+
const _hoisted_2$b = { class: "dropdown" };
|
|
3322
3379
|
|
|
3323
|
-
var script$
|
|
3380
|
+
var script$m = {
|
|
3324
3381
|
__name: 'ShDropDownForm',
|
|
3325
3382
|
props: ['action',
|
|
3326
3383
|
'classes',
|
|
@@ -3350,8 +3407,8 @@ const dropdownId = 'rand' + (Math.random() + 1).toString(36).substring(2);
|
|
|
3350
3407
|
|
|
3351
3408
|
return (_ctx, _cache) => {
|
|
3352
3409
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
3353
|
-
_hoisted_1$
|
|
3354
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3410
|
+
_hoisted_1$i,
|
|
3411
|
+
vue.createElementVNode("div", _hoisted_2$b, [
|
|
3355
3412
|
vue.createElementVNode("a", {
|
|
3356
3413
|
class: vue.normalizeClass(vue.unref(btnClass)),
|
|
3357
3414
|
href: "#",
|
|
@@ -3367,7 +3424,7 @@ return (_ctx, _cache) => {
|
|
|
3367
3424
|
class: "dropdown-menu px-2 py-1",
|
|
3368
3425
|
"aria-labelledby": dropdownId
|
|
3369
3426
|
}, [
|
|
3370
|
-
vue.createVNode(script$
|
|
3427
|
+
vue.createVNode(script$u, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
|
|
3371
3428
|
])
|
|
3372
3429
|
])
|
|
3373
3430
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -3376,12 +3433,12 @@ return (_ctx, _cache) => {
|
|
|
3376
3433
|
|
|
3377
3434
|
};
|
|
3378
3435
|
|
|
3379
|
-
script$
|
|
3436
|
+
script$m.__file = "src/lib/components/ShDropDownForm.vue";
|
|
3380
3437
|
|
|
3381
|
-
const _hoisted_1$
|
|
3382
|
-
const _hoisted_2$
|
|
3383
|
-
const _hoisted_3$
|
|
3384
|
-
const _hoisted_4$
|
|
3438
|
+
const _hoisted_1$h = ["id"];
|
|
3439
|
+
const _hoisted_2$a = { class: "modal-content" };
|
|
3440
|
+
const _hoisted_3$a = { class: "modal-header" };
|
|
3441
|
+
const _hoisted_4$a = { class: "modal-title" };
|
|
3385
3442
|
const _hoisted_5$7 = /*#__PURE__*/vue.createElementVNode("button", {
|
|
3386
3443
|
class: "btn btn-danger btn-sm",
|
|
3387
3444
|
"data-bs-dismiss": "modal",
|
|
@@ -3390,7 +3447,7 @@ const _hoisted_5$7 = /*#__PURE__*/vue.createElementVNode("button", {
|
|
|
3390
3447
|
const _hoisted_6$6 = { class: "modal-body" };
|
|
3391
3448
|
const _hoisted_7$4 = { class: "section" };
|
|
3392
3449
|
|
|
3393
|
-
var script$
|
|
3450
|
+
var script$l = {
|
|
3394
3451
|
__name: 'ShModal',
|
|
3395
3452
|
props: {
|
|
3396
3453
|
modalId: {
|
|
@@ -3427,9 +3484,9 @@ return (_ctx, _cache) => {
|
|
|
3427
3484
|
vue.createElementVNode("div", {
|
|
3428
3485
|
class: vue.normalizeClass(["modal-dialog", `modal-${__props.modalSize}`])
|
|
3429
3486
|
}, [
|
|
3430
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3431
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3432
|
-
vue.createElementVNode("h3", _hoisted_4$
|
|
3487
|
+
vue.createElementVNode("div", _hoisted_2$a, [
|
|
3488
|
+
vue.createElementVNode("div", _hoisted_3$a, [
|
|
3489
|
+
vue.createElementVNode("h3", _hoisted_4$a, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
|
|
3433
3490
|
_hoisted_5$7
|
|
3434
3491
|
]),
|
|
3435
3492
|
vue.createElementVNode("div", _hoisted_6$6, [
|
|
@@ -3439,17 +3496,17 @@ return (_ctx, _cache) => {
|
|
|
3439
3496
|
])
|
|
3440
3497
|
])
|
|
3441
3498
|
], 2 /* CLASS */)
|
|
3442
|
-
], 8 /* PROPS */, _hoisted_1$
|
|
3499
|
+
], 8 /* PROPS */, _hoisted_1$h))
|
|
3443
3500
|
}
|
|
3444
3501
|
}
|
|
3445
3502
|
|
|
3446
3503
|
};
|
|
3447
3504
|
|
|
3448
|
-
script$
|
|
3505
|
+
script$l.__file = "src/lib/components/ShModal.vue";
|
|
3449
3506
|
|
|
3450
|
-
const _hoisted_1$
|
|
3507
|
+
const _hoisted_1$g = ["href"];
|
|
3451
3508
|
|
|
3452
|
-
var script$
|
|
3509
|
+
var script$k = {
|
|
3453
3510
|
__name: 'ShModalForm',
|
|
3454
3511
|
props: ['action',
|
|
3455
3512
|
'classes',
|
|
@@ -3488,13 +3545,13 @@ return (_ctx, _cache) => {
|
|
|
3488
3545
|
"data-bs-toggle": "modal"
|
|
3489
3546
|
}, [
|
|
3490
3547
|
vue.renderSlot(_ctx.$slots, "default")
|
|
3491
|
-
], 10 /* CLASS, PROPS */, _hoisted_1$
|
|
3492
|
-
vue.createVNode(script$
|
|
3548
|
+
], 10 /* CLASS, PROPS */, _hoisted_1$g),
|
|
3549
|
+
vue.createVNode(script$l, {
|
|
3493
3550
|
"modal-id": modalId,
|
|
3494
3551
|
"modal-title": __props.modalTitle
|
|
3495
3552
|
}, {
|
|
3496
3553
|
default: vue.withCtx(() => [
|
|
3497
|
-
vue.createVNode(script$
|
|
3554
|
+
vue.createVNode(script$u, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
|
|
3498
3555
|
]),
|
|
3499
3556
|
_: 1 /* STABLE */
|
|
3500
3557
|
}, 8 /* PROPS */, ["modal-title"])
|
|
@@ -3504,11 +3561,11 @@ return (_ctx, _cache) => {
|
|
|
3504
3561
|
|
|
3505
3562
|
};
|
|
3506
3563
|
|
|
3507
|
-
script$
|
|
3564
|
+
script$k.__file = "src/lib/components/ShModalForm.vue";
|
|
3508
3565
|
|
|
3509
|
-
const _hoisted_1$
|
|
3566
|
+
const _hoisted_1$f = ["href"];
|
|
3510
3567
|
|
|
3511
|
-
var script$
|
|
3568
|
+
var script$j = {
|
|
3512
3569
|
__name: 'ShModalFormAuto',
|
|
3513
3570
|
props: ['action',
|
|
3514
3571
|
'classes',
|
|
@@ -3548,13 +3605,13 @@ return (_ctx, _cache) => {
|
|
|
3548
3605
|
"data-bs-toggle": "modal"
|
|
3549
3606
|
}, [
|
|
3550
3607
|
vue.renderSlot(_ctx.$slots, "default")
|
|
3551
|
-
], 10 /* CLASS, PROPS */, _hoisted_1$
|
|
3552
|
-
vue.createVNode(script$
|
|
3608
|
+
], 10 /* CLASS, PROPS */, _hoisted_1$f),
|
|
3609
|
+
vue.createVNode(script$l, {
|
|
3553
3610
|
"modal-id": modalId,
|
|
3554
3611
|
"modal-title": __props.modalTitle
|
|
3555
3612
|
}, {
|
|
3556
3613
|
default: vue.withCtx(() => [
|
|
3557
|
-
vue.createVNode(script$
|
|
3614
|
+
vue.createVNode(script$n, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
|
|
3558
3615
|
]),
|
|
3559
3616
|
_: 1 /* STABLE */
|
|
3560
3617
|
}, 8 /* PROPS */, ["modal-title"])
|
|
@@ -3564,17 +3621,17 @@ return (_ctx, _cache) => {
|
|
|
3564
3621
|
|
|
3565
3622
|
};
|
|
3566
3623
|
|
|
3567
|
-
script$
|
|
3624
|
+
script$j.__file = "src/lib/components/ShModalFormAuto.vue";
|
|
3568
3625
|
|
|
3569
|
-
const _hoisted_1$
|
|
3570
|
-
const _hoisted_2$
|
|
3571
|
-
const _hoisted_3$
|
|
3626
|
+
const _hoisted_1$e = ["id"];
|
|
3627
|
+
const _hoisted_2$9 = { class: "offcanvas-header" };
|
|
3628
|
+
const _hoisted_3$9 = {
|
|
3572
3629
|
class: "offcanvas-title",
|
|
3573
3630
|
id: "offcanvasScrollingLabel"
|
|
3574
3631
|
};
|
|
3575
|
-
const _hoisted_4$
|
|
3632
|
+
const _hoisted_4$9 = { class: "offcanvas-body" };
|
|
3576
3633
|
|
|
3577
|
-
var script$
|
|
3634
|
+
var script$i = {
|
|
3578
3635
|
__name: 'ShCanvas',
|
|
3579
3636
|
props: {
|
|
3580
3637
|
canvasId: {
|
|
@@ -3619,8 +3676,8 @@ return (_ctx, _cache) => {
|
|
|
3619
3676
|
id: __props.canvasId,
|
|
3620
3677
|
"aria-labelledby": "offcanvasScrollingLabel"
|
|
3621
3678
|
}, [
|
|
3622
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3623
|
-
vue.createElementVNode("h5", _hoisted_3$
|
|
3679
|
+
vue.createElementVNode("div", _hoisted_2$9, [
|
|
3680
|
+
vue.createElementVNode("h5", _hoisted_3$9, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
|
|
3624
3681
|
vue.createElementVNode("button", {
|
|
3625
3682
|
type: "button",
|
|
3626
3683
|
ref: "closecanvas",
|
|
@@ -3630,18 +3687,18 @@ return (_ctx, _cache) => {
|
|
|
3630
3687
|
"aria-label": "Close"
|
|
3631
3688
|
}, null, 512 /* NEED_PATCH */)
|
|
3632
3689
|
]),
|
|
3633
|
-
vue.createElementVNode("div", _hoisted_4$
|
|
3690
|
+
vue.createElementVNode("div", _hoisted_4$9, [
|
|
3634
3691
|
vue.renderSlot(_ctx.$slots, "default")
|
|
3635
3692
|
])
|
|
3636
|
-
], 10 /* CLASS, PROPS */, _hoisted_1$
|
|
3693
|
+
], 10 /* CLASS, PROPS */, _hoisted_1$e))
|
|
3637
3694
|
}
|
|
3638
3695
|
}
|
|
3639
3696
|
|
|
3640
3697
|
};
|
|
3641
3698
|
|
|
3642
|
-
script$
|
|
3699
|
+
script$i.__file = "src/lib/components/ShCanvas.vue";
|
|
3643
3700
|
|
|
3644
|
-
var script$
|
|
3701
|
+
var script$h = {
|
|
3645
3702
|
name: 'Pagination',
|
|
3646
3703
|
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle'],
|
|
3647
3704
|
data () {
|
|
@@ -3712,12 +3769,12 @@ var script$d = {
|
|
|
3712
3769
|
}
|
|
3713
3770
|
};
|
|
3714
3771
|
|
|
3715
|
-
const _hoisted_1$
|
|
3716
|
-
const _hoisted_2$
|
|
3717
|
-
const _hoisted_3$
|
|
3718
|
-
const _hoisted_4$
|
|
3772
|
+
const _hoisted_1$d = { key: 0 };
|
|
3773
|
+
const _hoisted_2$8 = { class: "record_count_body mb-3" };
|
|
3774
|
+
const _hoisted_3$8 = /*#__PURE__*/vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
|
|
3775
|
+
const _hoisted_4$8 = /*#__PURE__*/vue.createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
|
|
3719
3776
|
const _hoisted_9$4 = [
|
|
3720
|
-
_hoisted_4$
|
|
3777
|
+
_hoisted_4$8
|
|
3721
3778
|
];
|
|
3722
3779
|
const _hoisted_10$3 = { class: "record_counts" };
|
|
3723
3780
|
const _hoisted_11$2 = {
|
|
@@ -3760,11 +3817,11 @@ const _hoisted_23$1 = {
|
|
|
3760
3817
|
class: "spinner-border"
|
|
3761
3818
|
};
|
|
3762
3819
|
|
|
3763
|
-
function render$
|
|
3820
|
+
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3764
3821
|
return ($props.paginationStyle !== 'loadMore')
|
|
3765
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3766
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3767
|
-
_hoisted_3$
|
|
3822
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
|
|
3823
|
+
vue.createElementVNode("div", _hoisted_2$8, [
|
|
3824
|
+
_hoisted_3$8,
|
|
3768
3825
|
vue.createTextVNode(" "),
|
|
3769
3826
|
vue.withDirectives(vue.createElementVNode("select", {
|
|
3770
3827
|
class: "select_per_page",
|
|
@@ -3837,17 +3894,17 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3837
3894
|
]))
|
|
3838
3895
|
}
|
|
3839
3896
|
|
|
3840
|
-
script$
|
|
3841
|
-
script$
|
|
3897
|
+
script$h.render = render$3;
|
|
3898
|
+
script$h.__file = "src/lib/components/list_templates/Pagination.vue";
|
|
3842
3899
|
|
|
3843
|
-
const _hoisted_1$
|
|
3900
|
+
const _hoisted_1$c = /*#__PURE__*/vue.createElementVNode("span", {
|
|
3844
3901
|
class: "spinner-border spinner-border-sm me-1",
|
|
3845
3902
|
role: "status",
|
|
3846
3903
|
"aria-hidden": "true"
|
|
3847
3904
|
}, null, -1 /* HOISTED */);
|
|
3848
3905
|
|
|
3849
3906
|
|
|
3850
|
-
var script$
|
|
3907
|
+
var script$g = {
|
|
3851
3908
|
__name: 'ShConfirmAction',
|
|
3852
3909
|
props: {
|
|
3853
3910
|
data: Object,
|
|
@@ -3920,7 +3977,7 @@ return (_ctx, _cache) => {
|
|
|
3920
3977
|
}, [
|
|
3921
3978
|
(processing.value)
|
|
3922
3979
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
3923
|
-
_hoisted_1$
|
|
3980
|
+
_hoisted_1$c,
|
|
3924
3981
|
vue.createElementVNode("span", null, vue.toDisplayString(__props.loadingMessage), 1 /* TEXT */)
|
|
3925
3982
|
], 64 /* STABLE_FRAGMENT */))
|
|
3926
3983
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -3933,15 +3990,15 @@ return (_ctx, _cache) => {
|
|
|
3933
3990
|
|
|
3934
3991
|
};
|
|
3935
3992
|
|
|
3936
|
-
script$
|
|
3993
|
+
script$g.__file = "src/lib/components/ShConfirmAction.vue";
|
|
3937
3994
|
|
|
3938
|
-
const _hoisted_1$
|
|
3995
|
+
const _hoisted_1$b = /*#__PURE__*/vue.createElementVNode("span", {
|
|
3939
3996
|
class: "spinner-border spinner-border-sm me-1",
|
|
3940
3997
|
role: "status",
|
|
3941
3998
|
"aria-hidden": "true"
|
|
3942
3999
|
}, null, -1 /* HOISTED */);
|
|
3943
4000
|
|
|
3944
|
-
var script$
|
|
4001
|
+
var script$f = {
|
|
3945
4002
|
__name: 'ShSilentAction',
|
|
3946
4003
|
props: {
|
|
3947
4004
|
data: Object,
|
|
@@ -4016,7 +4073,7 @@ return (_ctx, _cache) => {
|
|
|
4016
4073
|
}, [
|
|
4017
4074
|
(processing.value)
|
|
4018
4075
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4019
|
-
_hoisted_1$
|
|
4076
|
+
_hoisted_1$b,
|
|
4020
4077
|
vue.createElementVNode("span", null, vue.toDisplayString(__props.loadingMessage), 1 /* TEXT */)
|
|
4021
4078
|
], 64 /* STABLE_FRAGMENT */))
|
|
4022
4079
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -4029,9 +4086,9 @@ return (_ctx, _cache) => {
|
|
|
4029
4086
|
|
|
4030
4087
|
};
|
|
4031
4088
|
|
|
4032
|
-
script$
|
|
4089
|
+
script$f.__file = "src/lib/components/ShSilentAction.vue";
|
|
4033
4090
|
|
|
4034
|
-
var script$
|
|
4091
|
+
var script$e = {
|
|
4035
4092
|
name: 'sh-table',
|
|
4036
4093
|
props: ['endPoint', 'headers','query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle'],
|
|
4037
4094
|
inject: ['channel'],
|
|
@@ -4221,7 +4278,8 @@ var script$a = {
|
|
|
4221
4278
|
order_method: this.order_method,
|
|
4222
4279
|
per_page: this.per_page,
|
|
4223
4280
|
page: this.page,
|
|
4224
|
-
filter_value: this.filter_value
|
|
4281
|
+
filter_value: this.filter_value,
|
|
4282
|
+
paginated: true
|
|
4225
4283
|
};
|
|
4226
4284
|
if (this.pagination_data) {
|
|
4227
4285
|
this.pagination_data.loading = 1;
|
|
@@ -4285,10 +4343,10 @@ var script$a = {
|
|
|
4285
4343
|
this.reloadData();
|
|
4286
4344
|
},
|
|
4287
4345
|
components: {
|
|
4288
|
-
ShSilentAction: script$
|
|
4289
|
-
ShConfirmAction: script$
|
|
4290
|
-
ShCanvas: script$
|
|
4291
|
-
pagination: script$
|
|
4346
|
+
ShSilentAction: script$f,
|
|
4347
|
+
ShConfirmAction: script$g,
|
|
4348
|
+
ShCanvas: script$i,
|
|
4349
|
+
pagination: script$h
|
|
4292
4350
|
},
|
|
4293
4351
|
computed: {
|
|
4294
4352
|
windowWidth: function () {
|
|
@@ -4306,13 +4364,13 @@ var script$a = {
|
|
|
4306
4364
|
}
|
|
4307
4365
|
};
|
|
4308
4366
|
|
|
4309
|
-
const _hoisted_1$
|
|
4310
|
-
const _hoisted_2$
|
|
4367
|
+
const _hoisted_1$a = { class: "auto-table mt-2" };
|
|
4368
|
+
const _hoisted_2$7 = {
|
|
4311
4369
|
key: 0,
|
|
4312
4370
|
class: "col-md-4 mb-2"
|
|
4313
4371
|
};
|
|
4314
|
-
const _hoisted_3$
|
|
4315
|
-
const _hoisted_4$
|
|
4372
|
+
const _hoisted_3$7 = ["disabled"];
|
|
4373
|
+
const _hoisted_4$7 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
|
|
4316
4374
|
const _hoisted_5$6 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
4317
4375
|
class: "spinner-border spinner-border-sm",
|
|
4318
4376
|
role: "status",
|
|
@@ -4462,16 +4520,16 @@ const _hoisted_63 = { key: 0 };
|
|
|
4462
4520
|
const _hoisted_64 = ["href"];
|
|
4463
4521
|
const _hoisted_65 = ["title", "onClick"];
|
|
4464
4522
|
|
|
4465
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4523
|
+
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4466
4524
|
const _component_router_link = vue.resolveComponent("router-link");
|
|
4467
4525
|
const _component_sh_confirm_action = vue.resolveComponent("sh-confirm-action");
|
|
4468
4526
|
const _component_sh_silent_action = vue.resolveComponent("sh-silent-action");
|
|
4469
4527
|
const _component_pagination = vue.resolveComponent("pagination");
|
|
4470
4528
|
const _component_sh_canvas = vue.resolveComponent("sh-canvas");
|
|
4471
4529
|
|
|
4472
|
-
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4530
|
+
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
|
|
4473
4531
|
($props.hasDownload)
|
|
4474
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
4532
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
|
|
4475
4533
|
vue.createElementVNode("button", {
|
|
4476
4534
|
disabled: $data.downloading,
|
|
4477
4535
|
class: "btn btn-warning btn-sm",
|
|
@@ -4479,14 +4537,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4479
4537
|
}, [
|
|
4480
4538
|
(!$data.downloading)
|
|
4481
4539
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4482
|
-
_hoisted_4$
|
|
4540
|
+
_hoisted_4$7,
|
|
4483
4541
|
vue.createTextVNode(" Export ")
|
|
4484
4542
|
], 64 /* STABLE_FRAGMENT */))
|
|
4485
4543
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
4486
4544
|
_hoisted_5$6,
|
|
4487
4545
|
_hoisted_6$5
|
|
4488
4546
|
], 64 /* STABLE_FRAGMENT */))
|
|
4489
|
-
], 8 /* PROPS */, _hoisted_3$
|
|
4547
|
+
], 8 /* PROPS */, _hoisted_3$7)
|
|
4490
4548
|
]))
|
|
4491
4549
|
: vue.createCommentVNode("v-if", true),
|
|
4492
4550
|
(!$props.hideSearch)
|
|
@@ -4922,10 +4980,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4922
4980
|
]))
|
|
4923
4981
|
}
|
|
4924
4982
|
|
|
4925
|
-
script$
|
|
4926
|
-
script$
|
|
4983
|
+
script$e.render = render$2;
|
|
4984
|
+
script$e.__file = "src/lib/components/ShTable.vue";
|
|
4927
4985
|
|
|
4928
|
-
var script$
|
|
4986
|
+
var script$d = {
|
|
4929
4987
|
__name: 'ShTabs',
|
|
4930
4988
|
props: {
|
|
4931
4989
|
tabs: {
|
|
@@ -5070,22 +5128,22 @@ return (_ctx, _cache) => {
|
|
|
5070
5128
|
|
|
5071
5129
|
};
|
|
5072
5130
|
|
|
5073
|
-
script$
|
|
5131
|
+
script$d.__file = "src/lib/components/ShTabs.vue";
|
|
5074
5132
|
|
|
5075
|
-
const _hoisted_1$
|
|
5133
|
+
const _hoisted_1$9 = {
|
|
5076
5134
|
class: "nav nav-tabs",
|
|
5077
5135
|
role: "tablist"
|
|
5078
5136
|
};
|
|
5079
|
-
const _hoisted_2$
|
|
5137
|
+
const _hoisted_2$6 = {
|
|
5080
5138
|
class: "nav-item",
|
|
5081
5139
|
role: "presentation"
|
|
5082
5140
|
};
|
|
5083
|
-
const _hoisted_3$
|
|
5084
|
-
const _hoisted_4$
|
|
5141
|
+
const _hoisted_3$6 = ["onClick"];
|
|
5142
|
+
const _hoisted_4$6 = /*#__PURE__*/vue.createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
|
|
5085
5143
|
const _hoisted_5$5 = { class: "sh_tab_count" };
|
|
5086
5144
|
const _hoisted_6$4 = { class: "tab-content" };
|
|
5087
5145
|
|
|
5088
|
-
var script$
|
|
5146
|
+
var script$c = {
|
|
5089
5147
|
__name: 'ShDynamicTabs',
|
|
5090
5148
|
props: ['tabs','data'],
|
|
5091
5149
|
setup(__props) {
|
|
@@ -5110,9 +5168,9 @@ function setTab(tab){
|
|
|
5110
5168
|
|
|
5111
5169
|
return (_ctx, _cache) => {
|
|
5112
5170
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
5113
|
-
vue.createElementVNode("ul", _hoisted_1$
|
|
5171
|
+
vue.createElementVNode("ul", _hoisted_1$9, [
|
|
5114
5172
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tabs), (tab) => {
|
|
5115
|
-
return (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$
|
|
5173
|
+
return (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$6, [
|
|
5116
5174
|
vue.createElementVNode("button", {
|
|
5117
5175
|
onClick: $event => (setTab(tab)),
|
|
5118
5176
|
class: vue.normalizeClass(["nav-link", vue.unref(currentTab) === tab ? 'active':''])
|
|
@@ -5120,11 +5178,11 @@ return (_ctx, _cache) => {
|
|
|
5120
5178
|
vue.createTextVNode(vue.toDisplayString(tab.label) + " ", 1 /* TEXT */),
|
|
5121
5179
|
(tab.count || tab.tabCount)
|
|
5122
5180
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
5123
|
-
_hoisted_4$
|
|
5181
|
+
_hoisted_4$6,
|
|
5124
5182
|
vue.createElementVNode("sup", _hoisted_5$5, vue.toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
|
|
5125
5183
|
], 64 /* STABLE_FRAGMENT */))
|
|
5126
5184
|
: vue.createCommentVNode("v-if", true)
|
|
5127
|
-
], 10 /* CLASS, PROPS */, _hoisted_3$
|
|
5185
|
+
], 10 /* CLASS, PROPS */, _hoisted_3$6)
|
|
5128
5186
|
]))
|
|
5129
5187
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
5130
5188
|
]),
|
|
@@ -5139,12 +5197,12 @@ return (_ctx, _cache) => {
|
|
|
5139
5197
|
|
|
5140
5198
|
};
|
|
5141
5199
|
|
|
5142
|
-
script$
|
|
5200
|
+
script$c.__file = "src/lib/components/ShDynamicTabs.vue";
|
|
5143
5201
|
|
|
5144
|
-
const _hoisted_1$
|
|
5202
|
+
const _hoisted_1$8 = ["href"];
|
|
5145
5203
|
|
|
5146
5204
|
|
|
5147
|
-
var script$
|
|
5205
|
+
var script$b = {
|
|
5148
5206
|
__name: 'ShModalBtn',
|
|
5149
5207
|
props: {
|
|
5150
5208
|
modalId: {
|
|
@@ -5161,18 +5219,18 @@ return (_ctx, _cache) => {
|
|
|
5161
5219
|
"data-bs-toggle": "modal"
|
|
5162
5220
|
}, [
|
|
5163
5221
|
vue.renderSlot(_ctx.$slots, "default")
|
|
5164
|
-
], 8 /* PROPS */, _hoisted_1$
|
|
5222
|
+
], 8 /* PROPS */, _hoisted_1$8))
|
|
5165
5223
|
}
|
|
5166
5224
|
}
|
|
5167
5225
|
|
|
5168
5226
|
};
|
|
5169
5227
|
|
|
5170
|
-
script$
|
|
5228
|
+
script$b.__file = "src/lib/components/ShModalBtn.vue";
|
|
5171
5229
|
|
|
5172
|
-
const _hoisted_1$
|
|
5230
|
+
const _hoisted_1$7 = ["href"];
|
|
5173
5231
|
|
|
5174
5232
|
|
|
5175
|
-
var script$
|
|
5233
|
+
var script$a = {
|
|
5176
5234
|
__name: 'ShCanvasBtn',
|
|
5177
5235
|
props: {
|
|
5178
5236
|
canvasId: {
|
|
@@ -5190,13 +5248,13 @@ return (_ctx, _cache) => {
|
|
|
5190
5248
|
"data-bs-toggle": "offcanvas"
|
|
5191
5249
|
}, [
|
|
5192
5250
|
vue.renderSlot(_ctx.$slots, "default")
|
|
5193
|
-
], 8 /* PROPS */, _hoisted_1$
|
|
5251
|
+
], 8 /* PROPS */, _hoisted_1$7))
|
|
5194
5252
|
}
|
|
5195
5253
|
}
|
|
5196
5254
|
|
|
5197
5255
|
};
|
|
5198
5256
|
|
|
5199
|
-
script$
|
|
5257
|
+
script$a.__file = "src/lib/components/ShCanvasBtn.vue";
|
|
5200
5258
|
|
|
5201
5259
|
const useUserStore = pinia.defineStore('user-store', {
|
|
5202
5260
|
state: () => ({
|
|
@@ -5295,18 +5353,18 @@ const useUserStore = pinia.defineStore('user-store', {
|
|
|
5295
5353
|
});
|
|
5296
5354
|
|
|
5297
5355
|
const _withScopeId$1 = n => (vue.pushScopeId("data-v-0d4fa0ac"),n=n(),vue.popScopeId(),n);
|
|
5298
|
-
const _hoisted_1$
|
|
5299
|
-
const _hoisted_2$
|
|
5356
|
+
const _hoisted_1$6 = { class: "row permissions-main d-flex" };
|
|
5357
|
+
const _hoisted_2$5 = {
|
|
5300
5358
|
id: "permissions-nav",
|
|
5301
5359
|
class: "col-md-3 d-flex align-items-center py-4"
|
|
5302
5360
|
};
|
|
5303
|
-
const _hoisted_3$
|
|
5361
|
+
const _hoisted_3$5 = {
|
|
5304
5362
|
key: 0,
|
|
5305
5363
|
class: "mx-auto"
|
|
5306
5364
|
};
|
|
5307
|
-
const _hoisted_4$
|
|
5365
|
+
const _hoisted_4$5 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/vue.createElementVNode("span", { class: "spinner-grow mx-auto" }, null, -1 /* HOISTED */));
|
|
5308
5366
|
const _hoisted_5$4 = [
|
|
5309
|
-
_hoisted_4$
|
|
5367
|
+
_hoisted_4$5
|
|
5310
5368
|
];
|
|
5311
5369
|
const _hoisted_6$3 = {
|
|
5312
5370
|
key: 1,
|
|
@@ -5335,7 +5393,7 @@ const _hoisted_17 = { class: "col-md-3" };
|
|
|
5335
5393
|
const _hoisted_18 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/vue.createElementVNode("i", { class: "bi-check" }, null, -1 /* HOISTED */));
|
|
5336
5394
|
|
|
5337
5395
|
|
|
5338
|
-
var script$
|
|
5396
|
+
var script$9 = {
|
|
5339
5397
|
__name: 'ManagePermissions',
|
|
5340
5398
|
emits: ['success'],
|
|
5341
5399
|
setup(__props, { emit }) {
|
|
@@ -5439,10 +5497,10 @@ const getPermissionStyle = permission => {
|
|
|
5439
5497
|
};
|
|
5440
5498
|
|
|
5441
5499
|
return (_ctx, _cache) => {
|
|
5442
|
-
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5443
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5500
|
+
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
|
|
5501
|
+
vue.createElementVNode("div", _hoisted_2$5, [
|
|
5444
5502
|
(loadingModules.value)
|
|
5445
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
5503
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, _hoisted_5$4))
|
|
5446
5504
|
: (vue.openBlock(), vue.createElementBlock("ul", _hoisted_6$3, [
|
|
5447
5505
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(modules.value, (module) => {
|
|
5448
5506
|
return (vue.openBlock(), vue.createElementBlock("li", {
|
|
@@ -5493,7 +5551,7 @@ return (_ctx, _cache) => {
|
|
|
5493
5551
|
(permissionsChanged.value)
|
|
5494
5552
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
|
|
5495
5553
|
vue.createElementVNode("div", _hoisted_17, [
|
|
5496
|
-
vue.createVNode(script$
|
|
5554
|
+
vue.createVNode(script$f, {
|
|
5497
5555
|
onSuccess: permissionsUpdated,
|
|
5498
5556
|
url: `sh-departments/department/permissions/${vue.unref(departmentId)}/${selectedModule.value}`,
|
|
5499
5557
|
data: {permissions: selectedPermissions.value},
|
|
@@ -5517,14 +5575,167 @@ return (_ctx, _cache) => {
|
|
|
5517
5575
|
|
|
5518
5576
|
};
|
|
5519
5577
|
|
|
5520
|
-
script$
|
|
5521
|
-
script$
|
|
5578
|
+
script$9.__scopeId = "data-v-0d4fa0ac";
|
|
5579
|
+
script$9.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
|
|
5580
|
+
|
|
5581
|
+
const _hoisted_1$5 = { class: "alert alert-info" };
|
|
5582
|
+
const _hoisted_2$4 = /*#__PURE__*/vue.createElementVNode("span", { class: "spinner-border" }, null, -1 /* HOISTED */);
|
|
5583
|
+
const _hoisted_3$4 = /*#__PURE__*/vue.createElementVNode("span", null, "Loading", -1 /* HOISTED */);
|
|
5584
|
+
const _hoisted_4$4 = [
|
|
5585
|
+
_hoisted_2$4,
|
|
5586
|
+
_hoisted_3$4
|
|
5587
|
+
];
|
|
5588
|
+
|
|
5589
|
+
function render$1(_ctx, _cache) {
|
|
5590
|
+
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, _hoisted_4$4))
|
|
5591
|
+
}
|
|
5592
|
+
|
|
5593
|
+
const script$8 = {};
|
|
5594
|
+
|
|
5595
|
+
|
|
5596
|
+
script$8.render = render$1;
|
|
5597
|
+
script$8.__file = "src/lib/components/popups/etc/PopupLoading.vue";
|
|
5598
|
+
|
|
5599
|
+
function render(_ctx, _cache) {
|
|
5600
|
+
return (vue.openBlock(), vue.createElementBlock("h5", null, "Error loading popup"))
|
|
5601
|
+
}
|
|
5602
|
+
|
|
5603
|
+
const script$7 = {};
|
|
5604
|
+
|
|
5605
|
+
|
|
5606
|
+
script$7.render = render;
|
|
5607
|
+
script$7.__file = "src/lib/components/popups/etc/ErrorLoadingPopup.vue";
|
|
5608
|
+
|
|
5609
|
+
var script$6 = {
|
|
5610
|
+
__name: 'Popups',
|
|
5611
|
+
setup(__props) {
|
|
5612
|
+
|
|
5613
|
+
const route = vueRouter.useRoute();
|
|
5614
|
+
const popUp = vue.ref(route.meta.popUp);
|
|
5615
|
+
const modalId = ___default["default"].uniqueId('modal_');
|
|
5616
|
+
const canvasId = ___default["default"].uniqueId('canvas_');
|
|
5617
|
+
let PopupComponent = vue.ref(null);
|
|
5618
|
+
vue.ref(null);
|
|
5619
|
+
const router = vueRouter.useRouter();
|
|
5620
|
+
const position = vue.ref(null);
|
|
5621
|
+
const size = vue.ref(null);
|
|
5622
|
+
const AsyncComp =vue.ref(null);
|
|
5623
|
+
vue.watch(() => route.query.popup, pop => {
|
|
5624
|
+
popUp.value = pop;
|
|
5625
|
+
position.value = route.query.position ?? route.query.side;
|
|
5626
|
+
size.value = route.query.size;
|
|
5627
|
+
if (popUp.value) {
|
|
5628
|
+
loadPopupComponent();
|
|
5629
|
+
setTimeout(() => {
|
|
5630
|
+
initPopup();
|
|
5631
|
+
}, 100);
|
|
5632
|
+
} else {
|
|
5633
|
+
//no pop up, check if we have any unclosed backdrop
|
|
5634
|
+
setTimeout(() => {
|
|
5635
|
+
closeOrphanedBackdrops();
|
|
5636
|
+
}, 100);
|
|
5637
|
+
}
|
|
5638
|
+
});
|
|
5639
|
+
const loadPopupComponent = ()=>{
|
|
5640
|
+
const component = route.query.comp || '';
|
|
5641
|
+
PopupComponent.value = vue.defineAsyncComponent({
|
|
5642
|
+
// the loader function
|
|
5643
|
+
loader: () => (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(/* @vite-ignore */ `/src/views/popups/${component}Popup.vue`),
|
|
5644
|
+
|
|
5645
|
+
// A component to use while the async component is loading
|
|
5646
|
+
loadingComponent: script$8,
|
|
5647
|
+
// Delay before showing the loading component. Default: 200ms.
|
|
5648
|
+
delay: 200,
|
|
5649
|
+
|
|
5650
|
+
// A component to use if the load fails
|
|
5651
|
+
errorComponent: script$7,
|
|
5652
|
+
// The error component will be displayed if a timeout is
|
|
5653
|
+
// provided and exceeded. Default: Infinity.
|
|
5654
|
+
timeout: 3000
|
|
5655
|
+
});
|
|
5656
|
+
};
|
|
5657
|
+
const closeOrphanedBackdrops = () => {
|
|
5658
|
+
const offCanvasBackdrop = document.querySelector('.offcanvas-backdrop');
|
|
5659
|
+
if (offCanvasBackdrop) {
|
|
5660
|
+
if (!document.querySelector('.offcanvas.show')) {
|
|
5661
|
+
offCanvasBackdrop.remove();
|
|
5662
|
+
}
|
|
5663
|
+
}
|
|
5664
|
+
const modalBackdrop = document.querySelector('.modal-backdrop');
|
|
5665
|
+
if (modalBackdrop) {
|
|
5666
|
+
if (!document.querySelector('.modal.show')) {
|
|
5667
|
+
modalBackdrop.remove();
|
|
5668
|
+
}
|
|
5669
|
+
}
|
|
5670
|
+
};
|
|
5671
|
+
const initPopup = () => {
|
|
5672
|
+
if (popUp.value === 'modal') {
|
|
5673
|
+
// modalButton.value.click()
|
|
5674
|
+
const modal = document.getElementById(modalId);
|
|
5675
|
+
const bsModal = new bootstrap.Modal(modal, {});
|
|
5676
|
+
bsModal.show();
|
|
5677
|
+
modal.addEventListener('hidden.bs.modal', event => {
|
|
5678
|
+
event.target.id === modalId && goBack();
|
|
5679
|
+
});
|
|
5680
|
+
} else if (['offcanvas', 'canvas', 'offCanvas'].includes(popUp.value)) {
|
|
5681
|
+
const offCanvas = document.getElementById(canvasId);
|
|
5682
|
+
const bsOffCanvas = new bootstrap.Offcanvas(offCanvas, {});
|
|
5683
|
+
bsOffCanvas.show();
|
|
5684
|
+
offCanvas.addEventListener('hidden.bs.offcanvas', event => {
|
|
5685
|
+
event.target.id === canvasId && goBack();
|
|
5686
|
+
});
|
|
5687
|
+
}
|
|
5688
|
+
};
|
|
5689
|
+
const goBack = () => {
|
|
5690
|
+
if (route.matched.length) {
|
|
5691
|
+
let backUrl = route.path;
|
|
5692
|
+
// const params = route.params
|
|
5693
|
+
// Object.keys(params).map(key => backUrl = backUrl.replace(`:${key}`,params[key]))
|
|
5694
|
+
router.push(backUrl);
|
|
5695
|
+
}
|
|
5696
|
+
};
|
|
5697
|
+
|
|
5698
|
+
return (_ctx, _cache) => {
|
|
5699
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
5700
|
+
(popUp.value === 'modal')
|
|
5701
|
+
? (vue.openBlock(), vue.createBlock(script$l, {
|
|
5702
|
+
key: 0,
|
|
5703
|
+
"modal-id": vue.unref(modalId),
|
|
5704
|
+
"modal-size": size.value
|
|
5705
|
+
}, {
|
|
5706
|
+
default: vue.withCtx(() => [
|
|
5707
|
+
vue.createVNode(vue.unref(PopupComponent))
|
|
5708
|
+
]),
|
|
5709
|
+
_: 1 /* STABLE */
|
|
5710
|
+
}, 8 /* PROPS */, ["modal-id", "modal-size"]))
|
|
5711
|
+
: vue.createCommentVNode("v-if", true),
|
|
5712
|
+
(['offcanvas','canvas','offCanvas'].includes(popUp.value))
|
|
5713
|
+
? (vue.openBlock(), vue.createBlock(script$i, {
|
|
5714
|
+
key: 1,
|
|
5715
|
+
"canvas-id": vue.unref(canvasId),
|
|
5716
|
+
"canvas-size": size.value,
|
|
5717
|
+
position: position.value
|
|
5718
|
+
}, {
|
|
5719
|
+
default: vue.withCtx(() => [
|
|
5720
|
+
vue.createVNode(vue.unref(PopupComponent)),
|
|
5721
|
+
vue.createVNode(vue.unref(AsyncComp))
|
|
5722
|
+
]),
|
|
5723
|
+
_: 1 /* STABLE */
|
|
5724
|
+
}, 8 /* PROPS */, ["canvas-id", "canvas-size", "position"]))
|
|
5725
|
+
: vue.createCommentVNode("v-if", true)
|
|
5726
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
5727
|
+
}
|
|
5728
|
+
}
|
|
5729
|
+
|
|
5730
|
+
};
|
|
5731
|
+
|
|
5732
|
+
script$6.__file = "src/lib/components/popups/Popups.vue";
|
|
5522
5733
|
|
|
5523
5734
|
const _hoisted_1$4 = ["href"];
|
|
5524
5735
|
|
|
5525
5736
|
|
|
5526
|
-
var script$
|
|
5527
|
-
__name: '
|
|
5737
|
+
var script$5 = {
|
|
5738
|
+
__name: 'RoutePopups',
|
|
5528
5739
|
setup(__props) {
|
|
5529
5740
|
|
|
5530
5741
|
const route = vueRouter.useRoute();
|
|
@@ -5536,13 +5747,11 @@ vue.ref(null);
|
|
|
5536
5747
|
const router = vueRouter.useRouter();
|
|
5537
5748
|
const position = vue.ref(null);
|
|
5538
5749
|
const size = vue.ref(null);
|
|
5539
|
-
const popups = [];
|
|
5540
|
-
const popupPaths = [];
|
|
5541
5750
|
vue.watch(() => route.meta, meta => {
|
|
5542
5751
|
popUp.value = meta.popUp ?? meta.popup;
|
|
5543
5752
|
if (popUp.value) {
|
|
5544
5753
|
// popups.push(meta)
|
|
5545
|
-
!popupPaths.includes(route.path) && popupPaths.push(route.path) && popups.push(meta)
|
|
5754
|
+
// !popupPaths.includes(route.path) && popupPaths.push(route.path) && popups.push(meta)
|
|
5546
5755
|
position.value = meta.position ?? meta.side;
|
|
5547
5756
|
size.value = meta.size;
|
|
5548
5757
|
componentView.value = vue.markRaw(route.matched[route.matched.length - 1].components.default);
|
|
@@ -5606,7 +5815,7 @@ return (_ctx, _cache) => {
|
|
|
5606
5815
|
class: "d-none"
|
|
5607
5816
|
}, "Open Modal", 8 /* PROPS */, _hoisted_1$4),
|
|
5608
5817
|
(popUp.value === 'modal')
|
|
5609
|
-
? (vue.openBlock(), vue.createBlock(script$
|
|
5818
|
+
? (vue.openBlock(), vue.createBlock(script$l, {
|
|
5610
5819
|
key: 0,
|
|
5611
5820
|
"modal-id": vue.unref(modalId),
|
|
5612
5821
|
"modal-size": size.value
|
|
@@ -5618,7 +5827,7 @@ return (_ctx, _cache) => {
|
|
|
5618
5827
|
}, 8 /* PROPS */, ["modal-id", "modal-size"]))
|
|
5619
5828
|
: vue.createCommentVNode("v-if", true),
|
|
5620
5829
|
(['offcanvas','canvas','offCanvas'].includes(popUp.value))
|
|
5621
|
-
? (vue.openBlock(), vue.createBlock(script$
|
|
5830
|
+
? (vue.openBlock(), vue.createBlock(script$i, {
|
|
5622
5831
|
key: 1,
|
|
5623
5832
|
"canvas-id": vue.unref(canvasId),
|
|
5624
5833
|
"canvas-size": size.value,
|
|
@@ -5636,6 +5845,23 @@ return (_ctx, _cache) => {
|
|
|
5636
5845
|
|
|
5637
5846
|
};
|
|
5638
5847
|
|
|
5848
|
+
script$5.__file = "src/lib/components/popups/RoutePopups.vue";
|
|
5849
|
+
|
|
5850
|
+
var script$4 = {
|
|
5851
|
+
__name: 'ShPopups',
|
|
5852
|
+
setup(__props) {
|
|
5853
|
+
|
|
5854
|
+
|
|
5855
|
+
return (_ctx, _cache) => {
|
|
5856
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
5857
|
+
vue.createVNode(script$6),
|
|
5858
|
+
vue.createVNode(script$5)
|
|
5859
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
5860
|
+
}
|
|
5861
|
+
}
|
|
5862
|
+
|
|
5863
|
+
};
|
|
5864
|
+
|
|
5639
5865
|
script$4.__file = "src/lib/components/ShPopups.vue";
|
|
5640
5866
|
|
|
5641
5867
|
const _hoisted_1$3 = { class: "sh-range" };
|
|
@@ -5852,7 +6078,7 @@ return (_ctx, _cache) => {
|
|
|
5852
6078
|
_hoisted_5$2,
|
|
5853
6079
|
vue.createTextVNode(" ADD DEPARTMENT")
|
|
5854
6080
|
], 512 /* NEED_PATCH */),
|
|
5855
|
-
vue.createVNode(script$
|
|
6081
|
+
vue.createVNode(script$e, {
|
|
5856
6082
|
headers: ['id','name','description', 'created_at'],
|
|
5857
6083
|
"end-point": "sh-departments/list",
|
|
5858
6084
|
actions: {
|
|
@@ -5866,12 +6092,12 @@ return (_ctx, _cache) => {
|
|
|
5866
6092
|
]
|
|
5867
6093
|
}
|
|
5868
6094
|
}),
|
|
5869
|
-
vue.createVNode(script$
|
|
6095
|
+
vue.createVNode(script$l, {
|
|
5870
6096
|
"modal-id": "sh-department_modal",
|
|
5871
6097
|
"modal-title": "Department Form"
|
|
5872
6098
|
}, {
|
|
5873
6099
|
default: vue.withCtx(() => [
|
|
5874
|
-
vue.createVNode(script$
|
|
6100
|
+
vue.createVNode(script$u, {
|
|
5875
6101
|
"success-callback": "departmentAdded",
|
|
5876
6102
|
onDepartmentAdded: departmentAdded,
|
|
5877
6103
|
action: "admin/departments/store",
|
|
@@ -6005,7 +6231,7 @@ return (_ctx, _cache) => {
|
|
|
6005
6231
|
vue.createElementVNode("div", _hoisted_2$1, [
|
|
6006
6232
|
_hoisted_3$1,
|
|
6007
6233
|
vue.createElementVNode("h5", null, "Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */),
|
|
6008
|
-
vue.createVNode(script$
|
|
6234
|
+
vue.createVNode(script$e, {
|
|
6009
6235
|
actions: {
|
|
6010
6236
|
label: 'Actions',
|
|
6011
6237
|
actions: [
|
|
@@ -6025,12 +6251,12 @@ return (_ctx, _cache) => {
|
|
|
6025
6251
|
headers: ['id',showModule,'created_at'],
|
|
6026
6252
|
"end-point": 'admin/departments/department/list-modules/' + id.value
|
|
6027
6253
|
}, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
|
|
6028
|
-
vue.createVNode(script$
|
|
6254
|
+
vue.createVNode(script$l, {
|
|
6029
6255
|
"modal-id": "addModule",
|
|
6030
6256
|
"modal-title": "Add Module Department"
|
|
6031
6257
|
}, {
|
|
6032
6258
|
default: vue.withCtx(() => [
|
|
6033
|
-
vue.createVNode(script$
|
|
6259
|
+
vue.createVNode(script$u, {
|
|
6034
6260
|
"reload-select-items": vue.unref(reload),
|
|
6035
6261
|
"success-callback": moduleAdded,
|
|
6036
6262
|
"fill-selects": {
|
|
@@ -6052,7 +6278,7 @@ return (_ctx, _cache) => {
|
|
|
6052
6278
|
ref: permissionCanvasBtn,
|
|
6053
6279
|
"data-bs-toggle": "offcanvas"
|
|
6054
6280
|
}, null, 512 /* NEED_PATCH */),
|
|
6055
|
-
vue.createVNode(script$
|
|
6281
|
+
vue.createVNode(script$i, {
|
|
6056
6282
|
"canvas-id": "permissionsCanvas",
|
|
6057
6283
|
position: "end enlarged",
|
|
6058
6284
|
"canvas-title": "Module Permissions"
|
|
@@ -6167,7 +6393,7 @@ return (_ctx, _cache) => {
|
|
|
6167
6393
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
6168
6394
|
(section.value === 'login')
|
|
6169
6395
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
6170
|
-
vue.createVNode(script$
|
|
6396
|
+
vue.createVNode(script$u, {
|
|
6171
6397
|
class: "sh-login-form",
|
|
6172
6398
|
fields: ['email','password'],
|
|
6173
6399
|
"action-label": "Login",
|
|
@@ -6192,7 +6418,7 @@ return (_ctx, _cache) => {
|
|
|
6192
6418
|
(vue.unref(registerSubTitle))
|
|
6193
6419
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
|
|
6194
6420
|
: vue.createCommentVNode("v-if", true),
|
|
6195
|
-
vue.createVNode(script$
|
|
6421
|
+
vue.createVNode(script$u, {
|
|
6196
6422
|
class: "sh-login-form",
|
|
6197
6423
|
fields: vue.unref(registrationFields),
|
|
6198
6424
|
"action-label": "Sign Up",
|
|
@@ -6239,7 +6465,7 @@ const ShFrontend = {
|
|
|
6239
6465
|
const registerTitle = options.registerTitle ?? 'Create a new account';
|
|
6240
6466
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
6241
6467
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
6242
|
-
options.formTextInput ?? script$
|
|
6468
|
+
options.formTextInput ?? script$r;
|
|
6243
6469
|
const loginUrl = options.loginUrl ?? `/login`;
|
|
6244
6470
|
const redirectLogin = options.redirectLogin ?? `/`;
|
|
6245
6471
|
const redirectRegister = options.redirectRegister ?? `/`;
|
|
@@ -6272,7 +6498,7 @@ const ShFrontend = {
|
|
|
6272
6498
|
});
|
|
6273
6499
|
options.router.addRoute({
|
|
6274
6500
|
path: '/sh-departments/manage-permissions/:id',
|
|
6275
|
-
component: script$
|
|
6501
|
+
component: script$9
|
|
6276
6502
|
});
|
|
6277
6503
|
}
|
|
6278
6504
|
//filter unwanted config items from options to be put in local storage
|
|
@@ -6285,25 +6511,25 @@ const ShFrontend = {
|
|
|
6285
6511
|
};
|
|
6286
6512
|
|
|
6287
6513
|
exports.Countries = countries;
|
|
6288
|
-
exports.ManagePermissions = script$
|
|
6289
|
-
exports.ShAutoForm = script$
|
|
6290
|
-
exports.ShCanvas = script$
|
|
6291
|
-
exports.ShCanvasBtn = script$
|
|
6292
|
-
exports.ShConfirmAction = script$
|
|
6293
|
-
exports.ShDropDownForm = script$
|
|
6294
|
-
exports.ShDynamicTabs = script$
|
|
6295
|
-
exports.ShForm = script$
|
|
6514
|
+
exports.ManagePermissions = script$9;
|
|
6515
|
+
exports.ShAutoForm = script$n;
|
|
6516
|
+
exports.ShCanvas = script$i;
|
|
6517
|
+
exports.ShCanvasBtn = script$a;
|
|
6518
|
+
exports.ShConfirmAction = script$g;
|
|
6519
|
+
exports.ShDropDownForm = script$m;
|
|
6520
|
+
exports.ShDynamicTabs = script$c;
|
|
6521
|
+
exports.ShForm = script$u;
|
|
6296
6522
|
exports.ShFrontend = ShFrontend;
|
|
6297
|
-
exports.ShModal = script$
|
|
6298
|
-
exports.ShModalBtn = script$
|
|
6299
|
-
exports.ShModalForm = script$
|
|
6300
|
-
exports.ShModalFormAuto = script$
|
|
6301
|
-
exports.ShPhone = script$
|
|
6523
|
+
exports.ShModal = script$l;
|
|
6524
|
+
exports.ShModalBtn = script$b;
|
|
6525
|
+
exports.ShModalForm = script$k;
|
|
6526
|
+
exports.ShModalFormAuto = script$j;
|
|
6527
|
+
exports.ShPhone = script$w;
|
|
6302
6528
|
exports.ShPopups = script$4;
|
|
6303
6529
|
exports.ShRange = script$3;
|
|
6304
|
-
exports.ShSilentAction = script$
|
|
6305
|
-
exports.ShTable = script$
|
|
6306
|
-
exports.ShTabs = script$
|
|
6530
|
+
exports.ShSilentAction = script$f;
|
|
6531
|
+
exports.ShTable = script$e;
|
|
6532
|
+
exports.ShTabs = script$d;
|
|
6307
6533
|
exports.shApis = shApis;
|
|
6308
6534
|
exports.shRepo = shRepo;
|
|
6309
6535
|
exports.shStorage = ShStorage;
|