@iankibetsh/shframework 4.4.7 → 4.4.9
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 +90 -47
- package/dist/library.mjs +90 -47
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -1930,7 +1930,7 @@ const countries = [
|
|
|
1930
1930
|
|
|
1931
1931
|
var script$w = {
|
|
1932
1932
|
name: 'PhoneInput',
|
|
1933
|
-
props: ['modelValue', 'country_code'],
|
|
1933
|
+
props: ['modelValue', 'country_code','disabled'],
|
|
1934
1934
|
data () {
|
|
1935
1935
|
return {
|
|
1936
1936
|
input: this.modelValue,
|
|
@@ -2005,6 +2005,7 @@ const _hoisted_2$e = {
|
|
|
2005
2005
|
};
|
|
2006
2006
|
const _hoisted_3$d = ["src"];
|
|
2007
2007
|
const _hoisted_4$d = ["value"];
|
|
2008
|
+
const _hoisted_5$b = ["disabled"];
|
|
2008
2009
|
|
|
2009
2010
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2010
2011
|
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
|
|
@@ -2031,11 +2032,12 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2031
2032
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
2032
2033
|
type: "number",
|
|
2033
2034
|
class: "phone-number",
|
|
2035
|
+
disabled: $props.disabled,
|
|
2034
2036
|
"data-cy": "phone_input",
|
|
2035
2037
|
onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
|
|
2036
2038
|
placeholder: "712345678",
|
|
2037
2039
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
|
|
2038
|
-
}, null,
|
|
2040
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$b), [
|
|
2039
2041
|
[vue.vModelText, $data.input]
|
|
2040
2042
|
])
|
|
2041
2043
|
]))
|
|
@@ -2059,7 +2061,7 @@ const _hoisted_9$7 = {
|
|
|
2059
2061
|
key: 1,
|
|
2060
2062
|
class: "dropdown-item sh-suggest-no-results"
|
|
2061
2063
|
};
|
|
2062
|
-
const _hoisted_10$
|
|
2064
|
+
const _hoisted_10$7 = {
|
|
2063
2065
|
key: 2,
|
|
2064
2066
|
class: "dropdown-item sh-suggest-no-input"
|
|
2065
2067
|
};
|
|
@@ -2261,7 +2263,7 @@ return (_ctx, _cache) => {
|
|
|
2261
2263
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2262
2264
|
: (vue.unref(searchText))
|
|
2263
2265
|
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_9$7, " No results found "))
|
|
2264
|
-
: (vue.openBlock(), vue.createElementBlock("li", _hoisted_10$
|
|
2266
|
+
: (vue.openBlock(), vue.createElementBlock("li", _hoisted_10$7, " Type to search... "))
|
|
2265
2267
|
], 8 /* PROPS */, _hoisted_7$8)
|
|
2266
2268
|
]))
|
|
2267
2269
|
: vue.createCommentVNode("v-if", true)
|
|
@@ -2618,8 +2620,8 @@ const _hoisted_6$8 = { key: 1 };
|
|
|
2618
2620
|
const _hoisted_7$7 = { class: "row" };
|
|
2619
2621
|
const _hoisted_8$6 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2620
2622
|
const _hoisted_9$6 = { class: "col-md-12" };
|
|
2621
|
-
const _hoisted_10$
|
|
2622
|
-
const _hoisted_11$
|
|
2623
|
+
const _hoisted_10$6 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
2624
|
+
const _hoisted_11$6 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2623
2625
|
const _hoisted_12$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2624
2626
|
const _hoisted_13$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2625
2627
|
const _hoisted_14$4 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
|
|
@@ -2714,7 +2716,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2714
2716
|
ref: 'file_'+field,
|
|
2715
2717
|
onChange: $event => ($options.handleFileUpload(field)),
|
|
2716
2718
|
type: "file"
|
|
2717
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$
|
|
2719
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$6))
|
|
2718
2720
|
: vue.createCommentVNode("v-if", true),
|
|
2719
2721
|
($options.getFieldType(field) === 'numeric')
|
|
2720
2722
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
@@ -2726,7 +2728,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2726
2728
|
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2727
2729
|
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2728
2730
|
type: "number"
|
|
2729
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$
|
|
2731
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$6)), [
|
|
2730
2732
|
[vue.vModelText, _ctx.form_elements[field]]
|
|
2731
2733
|
])
|
|
2732
2734
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -3204,12 +3206,12 @@ const _hoisted_6$7 = {
|
|
|
3204
3206
|
const _hoisted_7$6 = /*#__PURE__*/vue.createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* HOISTED */);
|
|
3205
3207
|
const _hoisted_8$5 = /*#__PURE__*/vue.createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* HOISTED */);
|
|
3206
3208
|
const _hoisted_9$5 = /*#__PURE__*/vue.createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* HOISTED */);
|
|
3207
|
-
const _hoisted_10$
|
|
3209
|
+
const _hoisted_10$5 = [
|
|
3208
3210
|
_hoisted_7$6,
|
|
3209
3211
|
_hoisted_8$5,
|
|
3210
3212
|
_hoisted_9$5
|
|
3211
3213
|
];
|
|
3212
|
-
const _hoisted_11$
|
|
3214
|
+
const _hoisted_11$5 = ["innerHTML"];
|
|
3213
3215
|
const _hoisted_12$3 = ["disabled"];
|
|
3214
3216
|
const _hoisted_13$3 = {
|
|
3215
3217
|
key: 0,
|
|
@@ -3497,14 +3499,14 @@ return (_ctx, _cache) => {
|
|
|
3497
3499
|
}, null, 10 /* CLASS, PROPS */, _hoisted_5$8))
|
|
3498
3500
|
: vue.createCommentVNode("v-if", true),
|
|
3499
3501
|
(vue.unref(isFloating))
|
|
3500
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$7, [..._hoisted_10$
|
|
3502
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$7, [..._hoisted_10$5]))
|
|
3501
3503
|
: vue.createCommentVNode("v-if", true),
|
|
3502
3504
|
(field.helper)
|
|
3503
3505
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3504
3506
|
key: 3,
|
|
3505
3507
|
class: vue.normalizeClass(getElementClass('helperText')),
|
|
3506
3508
|
innerHTML: field.helper
|
|
3507
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_11$
|
|
3509
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_11$5))
|
|
3508
3510
|
: vue.createCommentVNode("v-if", true),
|
|
3509
3511
|
(validationErrors.value[field.field])
|
|
3510
3512
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -4097,8 +4099,8 @@ const _hoisted_9$4 = {
|
|
|
4097
4099
|
key: 1,
|
|
4098
4100
|
class: "page-link"
|
|
4099
4101
|
};
|
|
4100
|
-
const _hoisted_10$
|
|
4101
|
-
const _hoisted_11$
|
|
4102
|
+
const _hoisted_10$4 = ["onClick"];
|
|
4103
|
+
const _hoisted_11$4 = { key: 1 };
|
|
4102
4104
|
const _hoisted_12$2 = {
|
|
4103
4105
|
key: 0,
|
|
4104
4106
|
class: "text-center"
|
|
@@ -4167,7 +4169,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4167
4169
|
key: 2,
|
|
4168
4170
|
onClick: $event => ($options.changeTableKey('page',page)),
|
|
4169
4171
|
class: "page-link"
|
|
4170
|
-
}, vue.toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$
|
|
4172
|
+
}, vue.toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$4))
|
|
4171
4173
|
], 2 /* CLASS */))
|
|
4172
4174
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4173
4175
|
vue.createElementVNode("li", {
|
|
@@ -4182,7 +4184,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4182
4184
|
]))
|
|
4183
4185
|
: vue.createCommentVNode("v-if", true)
|
|
4184
4186
|
]))
|
|
4185
|
-
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$
|
|
4187
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$4, [
|
|
4186
4188
|
(this.pagination_data.loading === 1 && $props.loadMore && $props.hideLoadMore)
|
|
4187
4189
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$2, [..._hoisted_14$2]))
|
|
4188
4190
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -4419,8 +4421,8 @@ const _hoisted_6$4 = {
|
|
|
4419
4421
|
const _hoisted_7$3 = { class: "sh-range-preset" };
|
|
4420
4422
|
const _hoisted_8$3 = ["onClick"];
|
|
4421
4423
|
const _hoisted_9$3 = { class: "border-top" };
|
|
4422
|
-
const _hoisted_10$
|
|
4423
|
-
const _hoisted_11$
|
|
4424
|
+
const _hoisted_10$3 = { class: "dropdown-item d-flex flex-column" };
|
|
4425
|
+
const _hoisted_11$3 = /*#__PURE__*/vue.createElementVNode("span", null, "Custom", -1 /* HOISTED */);
|
|
4424
4426
|
|
|
4425
4427
|
|
|
4426
4428
|
|
|
@@ -4556,8 +4558,8 @@ return (_ctx, _cache) => {
|
|
|
4556
4558
|
]),
|
|
4557
4559
|
vue.createElementVNode("ul", null, [
|
|
4558
4560
|
vue.createElementVNode("li", _hoisted_9$3, [
|
|
4559
|
-
vue.createElementVNode("div", _hoisted_10$
|
|
4560
|
-
_hoisted_11$
|
|
4561
|
+
vue.createElementVNode("div", _hoisted_10$3, [
|
|
4562
|
+
_hoisted_11$3,
|
|
4561
4563
|
vue.createElementVNode("div", null, [
|
|
4562
4564
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
4563
4565
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((customFrom).value = $event)),
|
|
@@ -4609,13 +4611,13 @@ const _hoisted_7$2 = {
|
|
|
4609
4611
|
key: 1,
|
|
4610
4612
|
class: "row"
|
|
4611
4613
|
};
|
|
4612
|
-
const _hoisted_8$2 = { class: "col-12 mb-3 d-flex justify-content-between" };
|
|
4614
|
+
const _hoisted_8$2 = { class: "col-12 mb-3 d-flex justify-content-between flex-column flex-md-row flex-lg-row" };
|
|
4613
4615
|
const _hoisted_9$2 = ["placeholder"];
|
|
4614
|
-
const _hoisted_10$
|
|
4616
|
+
const _hoisted_10$2 = {
|
|
4615
4617
|
key: 0,
|
|
4616
4618
|
class: "input-group-text exact_checkbox"
|
|
4617
4619
|
};
|
|
4618
|
-
const _hoisted_11$
|
|
4620
|
+
const _hoisted_11$2 = /*#__PURE__*/vue.createElementVNode("span", { class: "ms-1" }, "Exact", -1 /* HOISTED */);
|
|
4619
4621
|
const _hoisted_12$1 = {
|
|
4620
4622
|
key: 0,
|
|
4621
4623
|
class: "sh-range-selector"
|
|
@@ -5117,7 +5119,7 @@ return (_ctx, _cache) => {
|
|
|
5117
5119
|
[vue.vModelText, _ctx.filter_value]
|
|
5118
5120
|
]),
|
|
5119
5121
|
(_ctx.filter_value.length > 1)
|
|
5120
|
-
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_10$
|
|
5122
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_10$2, [
|
|
5121
5123
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
5122
5124
|
onChange: _cache[5] || (_cache[5] = (...args) => (_ctx.reloadData && _ctx.reloadData(...args))),
|
|
5123
5125
|
value: true,
|
|
@@ -5126,7 +5128,7 @@ return (_ctx, _cache) => {
|
|
|
5126
5128
|
}, null, 544 /* NEED_HYDRATION, NEED_PATCH */), [
|
|
5127
5129
|
[vue.vModelCheckbox, _ctx.exactMatch]
|
|
5128
5130
|
]),
|
|
5129
|
-
_hoisted_11$
|
|
5131
|
+
_hoisted_11$2
|
|
5130
5132
|
]))
|
|
5131
5133
|
: vue.createCommentVNode("v-if", true)
|
|
5132
5134
|
], 2 /* CLASS */),
|
|
@@ -5854,8 +5856,8 @@ const _hoisted_9$1 = {
|
|
|
5854
5856
|
id: "permissions-content",
|
|
5855
5857
|
class: "col-md-9 py-4 px-4"
|
|
5856
5858
|
};
|
|
5857
|
-
const _hoisted_10 = { class: "p-2 rounded-2 bg-white h-100" };
|
|
5858
|
-
const _hoisted_11 = {
|
|
5859
|
+
const _hoisted_10$1 = { class: "p-2 rounded-2 bg-white h-100" };
|
|
5860
|
+
const _hoisted_11$1 = {
|
|
5859
5861
|
key: 0,
|
|
5860
5862
|
class: "alert alert-info"
|
|
5861
5863
|
};
|
|
@@ -6000,9 +6002,9 @@ return (_ctx, _cache) => {
|
|
|
6000
6002
|
]))
|
|
6001
6003
|
]),
|
|
6002
6004
|
vue.createElementVNode("div", _hoisted_9$1, [
|
|
6003
|
-
vue.createElementVNode("div", _hoisted_10, [
|
|
6005
|
+
vue.createElementVNode("div", _hoisted_10$1, [
|
|
6004
6006
|
(loading.value)
|
|
6005
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, " loading ... "))
|
|
6007
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, " loading ... "))
|
|
6006
6008
|
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
|
|
6007
6009
|
vue.createElementVNode("div", _hoisted_13, [
|
|
6008
6010
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(modulePermissions.value, (permissions) => {
|
|
@@ -6655,24 +6657,30 @@ const _hoisted_1 = {
|
|
|
6655
6657
|
};
|
|
6656
6658
|
const _hoisted_2 = {
|
|
6657
6659
|
key: 0,
|
|
6658
|
-
class: "sh-
|
|
6660
|
+
class: "sh-forgot-section",
|
|
6661
|
+
style: {"min-width":"400px"}
|
|
6659
6662
|
};
|
|
6660
6663
|
const _hoisted_3 = { class: "sh-auth-footer" };
|
|
6661
|
-
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("
|
|
6662
|
-
const _hoisted_5 =
|
|
6663
|
-
const _hoisted_6 = {
|
|
6664
|
+
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("i", { class: "bi bi-arrow-left" }, null, -1 /* HOISTED */));
|
|
6665
|
+
const _hoisted_5 = {
|
|
6664
6666
|
key: 1,
|
|
6667
|
+
class: "sh-login-section"
|
|
6668
|
+
};
|
|
6669
|
+
const _hoisted_6 = { class: "sh-auth-footer" };
|
|
6670
|
+
const _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("strong", { class: "bi-dot" }, null, -1 /* HOISTED */));
|
|
6671
|
+
const _hoisted_8 = {
|
|
6672
|
+
key: 2,
|
|
6665
6673
|
class: "sh-register-section"
|
|
6666
6674
|
};
|
|
6667
|
-
const
|
|
6675
|
+
const _hoisted_9 = {
|
|
6668
6676
|
key: 0,
|
|
6669
6677
|
class: "sh-register-title"
|
|
6670
6678
|
};
|
|
6671
|
-
const
|
|
6679
|
+
const _hoisted_10 = {
|
|
6672
6680
|
key: 1,
|
|
6673
6681
|
class: "sh-register-link"
|
|
6674
6682
|
};
|
|
6675
|
-
const
|
|
6683
|
+
const _hoisted_11 = { class: "sh-auth-footer" };
|
|
6676
6684
|
|
|
6677
6685
|
var script = {
|
|
6678
6686
|
__name: 'ShAuth',
|
|
@@ -6684,6 +6692,7 @@ userStore.setUser();
|
|
|
6684
6692
|
const {user} = pinia.storeToRefs(userStore);
|
|
6685
6693
|
const section = vue.ref('login');
|
|
6686
6694
|
const registerEndpoint = vue.inject('registerEndpoint');
|
|
6695
|
+
const forgotEndpoint = vue.inject('forgotEndpoint');
|
|
6687
6696
|
const loginEndpoint = vue.inject('loginEndpoint');
|
|
6688
6697
|
const registrationFields = vue.inject('registrationFields');
|
|
6689
6698
|
const registerTitle = vue.inject('registerTitle');
|
|
@@ -6694,7 +6703,12 @@ function goToSection(newSection){
|
|
|
6694
6703
|
section.value = newSection;
|
|
6695
6704
|
}
|
|
6696
6705
|
vue.watch(user,(newUser) => {
|
|
6697
|
-
if(newUser.value) {
|
|
6706
|
+
if(newUser.value && redirectLogin) {
|
|
6707
|
+
router.push(redirectLogin);
|
|
6708
|
+
}
|
|
6709
|
+
});
|
|
6710
|
+
vue.onMounted(()=>{
|
|
6711
|
+
if(user.value && redirectLogin){
|
|
6698
6712
|
router.push(redirectLogin);
|
|
6699
6713
|
}
|
|
6700
6714
|
});
|
|
@@ -6704,6 +6718,10 @@ function loginSuccessful(res){
|
|
|
6704
6718
|
window.location.href = redirectLogin;
|
|
6705
6719
|
}
|
|
6706
6720
|
|
|
6721
|
+
const forgotSuccessful = ()=>{
|
|
6722
|
+
shRepo.showToast('Reset link sent to your email');
|
|
6723
|
+
};
|
|
6724
|
+
|
|
6707
6725
|
return (_ctx, _cache) => {
|
|
6708
6726
|
return (vue.unref(user))
|
|
6709
6727
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -6711,8 +6729,28 @@ return (_ctx, _cache) => {
|
|
|
6711
6729
|
vue.createElementVNode("strong", null, vue.toDisplayString(vue.unref(user).name), 1 /* TEXT */)
|
|
6712
6730
|
]))
|
|
6713
6731
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
6714
|
-
(section.value === '
|
|
6732
|
+
(section.value === 'forgot')
|
|
6715
6733
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
6734
|
+
vue.createVNode(script$u, {
|
|
6735
|
+
class: "sh-login-form",
|
|
6736
|
+
fields: ['email'],
|
|
6737
|
+
"action-label": "Send Reset Link",
|
|
6738
|
+
action: vue.unref(forgotEndpoint),
|
|
6739
|
+
"success-callback": forgotSuccessful
|
|
6740
|
+
}, null, 8 /* PROPS */, ["action"]),
|
|
6741
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
6742
|
+
vue.createElementVNode("strong", {
|
|
6743
|
+
onClick: _cache[0] || (_cache[0] = $event => (goToSection('login'))),
|
|
6744
|
+
class: "sh-register-link text-primary"
|
|
6745
|
+
}, [
|
|
6746
|
+
_hoisted_4,
|
|
6747
|
+
vue.createTextVNode(" Back to Login ")
|
|
6748
|
+
])
|
|
6749
|
+
])
|
|
6750
|
+
]))
|
|
6751
|
+
: vue.createCommentVNode("v-if", true),
|
|
6752
|
+
(section.value === 'login')
|
|
6753
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
6716
6754
|
vue.createVNode(script$u, {
|
|
6717
6755
|
class: "sh-login-form",
|
|
6718
6756
|
fields: ['email','password'],
|
|
@@ -6720,23 +6758,26 @@ return (_ctx, _cache) => {
|
|
|
6720
6758
|
action: vue.unref(loginEndpoint),
|
|
6721
6759
|
"success-callback": loginSuccessful
|
|
6722
6760
|
}, null, 8 /* PROPS */, ["action"]),
|
|
6723
|
-
vue.createElementVNode("div",
|
|
6724
|
-
|
|
6725
|
-
|
|
6761
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
6762
|
+
vue.createElementVNode("strong", {
|
|
6763
|
+
class: "sh-forgot-link text-primary",
|
|
6764
|
+
onClick: _cache[1] || (_cache[1] = $event => (goToSection('forgot')))
|
|
6765
|
+
}, "Forgotten password?"),
|
|
6766
|
+
_hoisted_7,
|
|
6726
6767
|
vue.createElementVNode("strong", {
|
|
6727
|
-
onClick: _cache[
|
|
6768
|
+
onClick: _cache[2] || (_cache[2] = $event => (goToSection('register'))),
|
|
6728
6769
|
class: "sh-register-link text-primary"
|
|
6729
6770
|
}, "Sign Up")
|
|
6730
6771
|
])
|
|
6731
6772
|
]))
|
|
6732
6773
|
: vue.createCommentVNode("v-if", true),
|
|
6733
6774
|
(section.value === 'register')
|
|
6734
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
6775
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
6735
6776
|
(vue.unref(registerTitle))
|
|
6736
|
-
? (vue.openBlock(), vue.createElementBlock("h3",
|
|
6777
|
+
? (vue.openBlock(), vue.createElementBlock("h3", _hoisted_9, vue.toDisplayString(vue.unref(registerTitle)), 1 /* TEXT */))
|
|
6737
6778
|
: vue.createCommentVNode("v-if", true),
|
|
6738
6779
|
(vue.unref(registerSubTitle))
|
|
6739
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
6780
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_10, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
|
|
6740
6781
|
: vue.createCommentVNode("v-if", true),
|
|
6741
6782
|
vue.createVNode(script$u, {
|
|
6742
6783
|
class: "sh-login-form",
|
|
@@ -6745,9 +6786,9 @@ return (_ctx, _cache) => {
|
|
|
6745
6786
|
action: vue.unref(registerEndpoint),
|
|
6746
6787
|
"success-callback": loginSuccessful
|
|
6747
6788
|
}, null, 8 /* PROPS */, ["fields", "action"]),
|
|
6748
|
-
vue.createElementVNode("div",
|
|
6789
|
+
vue.createElementVNode("div", _hoisted_11, [
|
|
6749
6790
|
vue.createElementVNode("strong", {
|
|
6750
|
-
onClick: _cache[
|
|
6791
|
+
onClick: _cache[3] || (_cache[3] = $event => (goToSection('login'))),
|
|
6751
6792
|
class: "sh-register-link text-primary"
|
|
6752
6793
|
}, "Already have an account?")
|
|
6753
6794
|
])
|
|
@@ -6782,6 +6823,7 @@ const ShFrontend = {
|
|
|
6782
6823
|
const swalPosition = options.swalPosition ?? 'top-end';
|
|
6783
6824
|
const loginEndpoint = options.loginEndpoint ?? 'auth/login';
|
|
6784
6825
|
const registerEndpoint = options.registerEndpoint ?? 'auth/register';
|
|
6826
|
+
const forgotEndpoint = options.forgotEndpoint ?? 'auth/forgot-password';
|
|
6785
6827
|
const registerTitle = options.registerTitle ?? 'Create a new account';
|
|
6786
6828
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
6787
6829
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
@@ -6804,6 +6846,7 @@ const ShFrontend = {
|
|
|
6804
6846
|
app.provide('loginUrl', loginUrl);
|
|
6805
6847
|
app.provide('shFormElementClasses',defaultFormElementClasses);
|
|
6806
6848
|
app.provide('noRecordsComponent',noRecordsComponent);
|
|
6849
|
+
app.provide('forgotEndpoint',forgotEndpoint);
|
|
6807
6850
|
window.swalPosition = swalPosition;
|
|
6808
6851
|
if(options.router) {
|
|
6809
6852
|
options.router.addRoute({
|
package/dist/library.mjs
CHANGED
|
@@ -1918,7 +1918,7 @@ const countries = [
|
|
|
1918
1918
|
|
|
1919
1919
|
var script$w = {
|
|
1920
1920
|
name: 'PhoneInput',
|
|
1921
|
-
props: ['modelValue', 'country_code'],
|
|
1921
|
+
props: ['modelValue', 'country_code','disabled'],
|
|
1922
1922
|
data () {
|
|
1923
1923
|
return {
|
|
1924
1924
|
input: this.modelValue,
|
|
@@ -1993,6 +1993,7 @@ const _hoisted_2$e = {
|
|
|
1993
1993
|
};
|
|
1994
1994
|
const _hoisted_3$d = ["src"];
|
|
1995
1995
|
const _hoisted_4$d = ["value"];
|
|
1996
|
+
const _hoisted_5$b = ["disabled"];
|
|
1996
1997
|
|
|
1997
1998
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1998
1999
|
return (openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
@@ -2019,11 +2020,12 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2019
2020
|
withDirectives(createElementVNode("input", {
|
|
2020
2021
|
type: "number",
|
|
2021
2022
|
class: "phone-number",
|
|
2023
|
+
disabled: $props.disabled,
|
|
2022
2024
|
"data-cy": "phone_input",
|
|
2023
2025
|
onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
|
|
2024
2026
|
placeholder: "712345678",
|
|
2025
2027
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
|
|
2026
|
-
}, null,
|
|
2028
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$b), [
|
|
2027
2029
|
[vModelText, $data.input]
|
|
2028
2030
|
])
|
|
2029
2031
|
]))
|
|
@@ -2047,7 +2049,7 @@ const _hoisted_9$7 = {
|
|
|
2047
2049
|
key: 1,
|
|
2048
2050
|
class: "dropdown-item sh-suggest-no-results"
|
|
2049
2051
|
};
|
|
2050
|
-
const _hoisted_10$
|
|
2052
|
+
const _hoisted_10$7 = {
|
|
2051
2053
|
key: 2,
|
|
2052
2054
|
class: "dropdown-item sh-suggest-no-input"
|
|
2053
2055
|
};
|
|
@@ -2249,7 +2251,7 @@ return (_ctx, _cache) => {
|
|
|
2249
2251
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2250
2252
|
: (unref(searchText))
|
|
2251
2253
|
? (openBlock(), createElementBlock("li", _hoisted_9$7, " No results found "))
|
|
2252
|
-
: (openBlock(), createElementBlock("li", _hoisted_10$
|
|
2254
|
+
: (openBlock(), createElementBlock("li", _hoisted_10$7, " Type to search... "))
|
|
2253
2255
|
], 8 /* PROPS */, _hoisted_7$8)
|
|
2254
2256
|
]))
|
|
2255
2257
|
: createCommentVNode("v-if", true)
|
|
@@ -2606,8 +2608,8 @@ const _hoisted_6$8 = { key: 1 };
|
|
|
2606
2608
|
const _hoisted_7$7 = { class: "row" };
|
|
2607
2609
|
const _hoisted_8$6 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2608
2610
|
const _hoisted_9$6 = { class: "col-md-12" };
|
|
2609
|
-
const _hoisted_10$
|
|
2610
|
-
const _hoisted_11$
|
|
2611
|
+
const _hoisted_10$6 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
2612
|
+
const _hoisted_11$6 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2611
2613
|
const _hoisted_12$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2612
2614
|
const _hoisted_13$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2613
2615
|
const _hoisted_14$4 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
|
|
@@ -2702,7 +2704,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2702
2704
|
ref: 'file_'+field,
|
|
2703
2705
|
onChange: $event => ($options.handleFileUpload(field)),
|
|
2704
2706
|
type: "file"
|
|
2705
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$
|
|
2707
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$6))
|
|
2706
2708
|
: createCommentVNode("v-if", true),
|
|
2707
2709
|
($options.getFieldType(field) === 'numeric')
|
|
2708
2710
|
? withDirectives((openBlock(), createElementBlock("input", {
|
|
@@ -2714,7 +2716,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2714
2716
|
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2715
2717
|
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2716
2718
|
type: "number"
|
|
2717
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$
|
|
2719
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$6)), [
|
|
2718
2720
|
[vModelText, _ctx.form_elements[field]]
|
|
2719
2721
|
])
|
|
2720
2722
|
: createCommentVNode("v-if", true),
|
|
@@ -3192,12 +3194,12 @@ const _hoisted_6$7 = {
|
|
|
3192
3194
|
const _hoisted_7$6 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* HOISTED */);
|
|
3193
3195
|
const _hoisted_8$5 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* HOISTED */);
|
|
3194
3196
|
const _hoisted_9$5 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* HOISTED */);
|
|
3195
|
-
const _hoisted_10$
|
|
3197
|
+
const _hoisted_10$5 = [
|
|
3196
3198
|
_hoisted_7$6,
|
|
3197
3199
|
_hoisted_8$5,
|
|
3198
3200
|
_hoisted_9$5
|
|
3199
3201
|
];
|
|
3200
|
-
const _hoisted_11$
|
|
3202
|
+
const _hoisted_11$5 = ["innerHTML"];
|
|
3201
3203
|
const _hoisted_12$3 = ["disabled"];
|
|
3202
3204
|
const _hoisted_13$3 = {
|
|
3203
3205
|
key: 0,
|
|
@@ -3485,14 +3487,14 @@ return (_ctx, _cache) => {
|
|
|
3485
3487
|
}, null, 10 /* CLASS, PROPS */, _hoisted_5$8))
|
|
3486
3488
|
: createCommentVNode("v-if", true),
|
|
3487
3489
|
(unref(isFloating))
|
|
3488
|
-
? (openBlock(), createElementBlock("div", _hoisted_6$7, [..._hoisted_10$
|
|
3490
|
+
? (openBlock(), createElementBlock("div", _hoisted_6$7, [..._hoisted_10$5]))
|
|
3489
3491
|
: createCommentVNode("v-if", true),
|
|
3490
3492
|
(field.helper)
|
|
3491
3493
|
? (openBlock(), createElementBlock("div", {
|
|
3492
3494
|
key: 3,
|
|
3493
3495
|
class: normalizeClass(getElementClass('helperText')),
|
|
3494
3496
|
innerHTML: field.helper
|
|
3495
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_11$
|
|
3497
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_11$5))
|
|
3496
3498
|
: createCommentVNode("v-if", true),
|
|
3497
3499
|
(validationErrors.value[field.field])
|
|
3498
3500
|
? (openBlock(), createElementBlock("div", {
|
|
@@ -4085,8 +4087,8 @@ const _hoisted_9$4 = {
|
|
|
4085
4087
|
key: 1,
|
|
4086
4088
|
class: "page-link"
|
|
4087
4089
|
};
|
|
4088
|
-
const _hoisted_10$
|
|
4089
|
-
const _hoisted_11$
|
|
4090
|
+
const _hoisted_10$4 = ["onClick"];
|
|
4091
|
+
const _hoisted_11$4 = { key: 1 };
|
|
4090
4092
|
const _hoisted_12$2 = {
|
|
4091
4093
|
key: 0,
|
|
4092
4094
|
class: "text-center"
|
|
@@ -4155,7 +4157,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4155
4157
|
key: 2,
|
|
4156
4158
|
onClick: $event => ($options.changeTableKey('page',page)),
|
|
4157
4159
|
class: "page-link"
|
|
4158
|
-
}, toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$
|
|
4160
|
+
}, toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$4))
|
|
4159
4161
|
], 2 /* CLASS */))
|
|
4160
4162
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4161
4163
|
createElementVNode("li", {
|
|
@@ -4170,7 +4172,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4170
4172
|
]))
|
|
4171
4173
|
: createCommentVNode("v-if", true)
|
|
4172
4174
|
]))
|
|
4173
|
-
: (openBlock(), createElementBlock("div", _hoisted_11$
|
|
4175
|
+
: (openBlock(), createElementBlock("div", _hoisted_11$4, [
|
|
4174
4176
|
(this.pagination_data.loading === 1 && $props.loadMore && $props.hideLoadMore)
|
|
4175
4177
|
? (openBlock(), createElementBlock("div", _hoisted_12$2, [..._hoisted_14$2]))
|
|
4176
4178
|
: createCommentVNode("v-if", true),
|
|
@@ -4407,8 +4409,8 @@ const _hoisted_6$4 = {
|
|
|
4407
4409
|
const _hoisted_7$3 = { class: "sh-range-preset" };
|
|
4408
4410
|
const _hoisted_8$3 = ["onClick"];
|
|
4409
4411
|
const _hoisted_9$3 = { class: "border-top" };
|
|
4410
|
-
const _hoisted_10$
|
|
4411
|
-
const _hoisted_11$
|
|
4412
|
+
const _hoisted_10$3 = { class: "dropdown-item d-flex flex-column" };
|
|
4413
|
+
const _hoisted_11$3 = /*#__PURE__*/createElementVNode("span", null, "Custom", -1 /* HOISTED */);
|
|
4412
4414
|
|
|
4413
4415
|
|
|
4414
4416
|
|
|
@@ -4544,8 +4546,8 @@ return (_ctx, _cache) => {
|
|
|
4544
4546
|
]),
|
|
4545
4547
|
createElementVNode("ul", null, [
|
|
4546
4548
|
createElementVNode("li", _hoisted_9$3, [
|
|
4547
|
-
createElementVNode("div", _hoisted_10$
|
|
4548
|
-
_hoisted_11$
|
|
4549
|
+
createElementVNode("div", _hoisted_10$3, [
|
|
4550
|
+
_hoisted_11$3,
|
|
4549
4551
|
createElementVNode("div", null, [
|
|
4550
4552
|
withDirectives(createElementVNode("input", {
|
|
4551
4553
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((customFrom).value = $event)),
|
|
@@ -4597,13 +4599,13 @@ const _hoisted_7$2 = {
|
|
|
4597
4599
|
key: 1,
|
|
4598
4600
|
class: "row"
|
|
4599
4601
|
};
|
|
4600
|
-
const _hoisted_8$2 = { class: "col-12 mb-3 d-flex justify-content-between" };
|
|
4602
|
+
const _hoisted_8$2 = { class: "col-12 mb-3 d-flex justify-content-between flex-column flex-md-row flex-lg-row" };
|
|
4601
4603
|
const _hoisted_9$2 = ["placeholder"];
|
|
4602
|
-
const _hoisted_10$
|
|
4604
|
+
const _hoisted_10$2 = {
|
|
4603
4605
|
key: 0,
|
|
4604
4606
|
class: "input-group-text exact_checkbox"
|
|
4605
4607
|
};
|
|
4606
|
-
const _hoisted_11$
|
|
4608
|
+
const _hoisted_11$2 = /*#__PURE__*/createElementVNode("span", { class: "ms-1" }, "Exact", -1 /* HOISTED */);
|
|
4607
4609
|
const _hoisted_12$1 = {
|
|
4608
4610
|
key: 0,
|
|
4609
4611
|
class: "sh-range-selector"
|
|
@@ -5105,7 +5107,7 @@ return (_ctx, _cache) => {
|
|
|
5105
5107
|
[vModelText, _ctx.filter_value]
|
|
5106
5108
|
]),
|
|
5107
5109
|
(_ctx.filter_value.length > 1)
|
|
5108
|
-
? (openBlock(), createElementBlock("span", _hoisted_10$
|
|
5110
|
+
? (openBlock(), createElementBlock("span", _hoisted_10$2, [
|
|
5109
5111
|
withDirectives(createElementVNode("input", {
|
|
5110
5112
|
onChange: _cache[5] || (_cache[5] = (...args) => (_ctx.reloadData && _ctx.reloadData(...args))),
|
|
5111
5113
|
value: true,
|
|
@@ -5114,7 +5116,7 @@ return (_ctx, _cache) => {
|
|
|
5114
5116
|
}, null, 544 /* NEED_HYDRATION, NEED_PATCH */), [
|
|
5115
5117
|
[vModelCheckbox, _ctx.exactMatch]
|
|
5116
5118
|
]),
|
|
5117
|
-
_hoisted_11$
|
|
5119
|
+
_hoisted_11$2
|
|
5118
5120
|
]))
|
|
5119
5121
|
: createCommentVNode("v-if", true)
|
|
5120
5122
|
], 2 /* CLASS */),
|
|
@@ -5842,8 +5844,8 @@ const _hoisted_9$1 = {
|
|
|
5842
5844
|
id: "permissions-content",
|
|
5843
5845
|
class: "col-md-9 py-4 px-4"
|
|
5844
5846
|
};
|
|
5845
|
-
const _hoisted_10 = { class: "p-2 rounded-2 bg-white h-100" };
|
|
5846
|
-
const _hoisted_11 = {
|
|
5847
|
+
const _hoisted_10$1 = { class: "p-2 rounded-2 bg-white h-100" };
|
|
5848
|
+
const _hoisted_11$1 = {
|
|
5847
5849
|
key: 0,
|
|
5848
5850
|
class: "alert alert-info"
|
|
5849
5851
|
};
|
|
@@ -5988,9 +5990,9 @@ return (_ctx, _cache) => {
|
|
|
5988
5990
|
]))
|
|
5989
5991
|
]),
|
|
5990
5992
|
createElementVNode("div", _hoisted_9$1, [
|
|
5991
|
-
createElementVNode("div", _hoisted_10, [
|
|
5993
|
+
createElementVNode("div", _hoisted_10$1, [
|
|
5992
5994
|
(loading.value)
|
|
5993
|
-
? (openBlock(), createElementBlock("div", _hoisted_11, " loading ... "))
|
|
5995
|
+
? (openBlock(), createElementBlock("div", _hoisted_11$1, " loading ... "))
|
|
5994
5996
|
: (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
5995
5997
|
createElementVNode("div", _hoisted_13, [
|
|
5996
5998
|
(openBlock(true), createElementBlock(Fragment, null, renderList(modulePermissions.value, (permissions) => {
|
|
@@ -6643,24 +6645,30 @@ const _hoisted_1 = {
|
|
|
6643
6645
|
};
|
|
6644
6646
|
const _hoisted_2 = {
|
|
6645
6647
|
key: 0,
|
|
6646
|
-
class: "sh-
|
|
6648
|
+
class: "sh-forgot-section",
|
|
6649
|
+
style: {"min-width":"400px"}
|
|
6647
6650
|
};
|
|
6648
6651
|
const _hoisted_3 = { class: "sh-auth-footer" };
|
|
6649
|
-
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("
|
|
6650
|
-
const _hoisted_5 =
|
|
6651
|
-
const _hoisted_6 = {
|
|
6652
|
+
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("i", { class: "bi bi-arrow-left" }, null, -1 /* HOISTED */));
|
|
6653
|
+
const _hoisted_5 = {
|
|
6652
6654
|
key: 1,
|
|
6655
|
+
class: "sh-login-section"
|
|
6656
|
+
};
|
|
6657
|
+
const _hoisted_6 = { class: "sh-auth-footer" };
|
|
6658
|
+
const _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("strong", { class: "bi-dot" }, null, -1 /* HOISTED */));
|
|
6659
|
+
const _hoisted_8 = {
|
|
6660
|
+
key: 2,
|
|
6653
6661
|
class: "sh-register-section"
|
|
6654
6662
|
};
|
|
6655
|
-
const
|
|
6663
|
+
const _hoisted_9 = {
|
|
6656
6664
|
key: 0,
|
|
6657
6665
|
class: "sh-register-title"
|
|
6658
6666
|
};
|
|
6659
|
-
const
|
|
6667
|
+
const _hoisted_10 = {
|
|
6660
6668
|
key: 1,
|
|
6661
6669
|
class: "sh-register-link"
|
|
6662
6670
|
};
|
|
6663
|
-
const
|
|
6671
|
+
const _hoisted_11 = { class: "sh-auth-footer" };
|
|
6664
6672
|
|
|
6665
6673
|
var script = {
|
|
6666
6674
|
__name: 'ShAuth',
|
|
@@ -6672,6 +6680,7 @@ userStore.setUser();
|
|
|
6672
6680
|
const {user} = storeToRefs(userStore);
|
|
6673
6681
|
const section = ref('login');
|
|
6674
6682
|
const registerEndpoint = inject('registerEndpoint');
|
|
6683
|
+
const forgotEndpoint = inject('forgotEndpoint');
|
|
6675
6684
|
const loginEndpoint = inject('loginEndpoint');
|
|
6676
6685
|
const registrationFields = inject('registrationFields');
|
|
6677
6686
|
const registerTitle = inject('registerTitle');
|
|
@@ -6682,7 +6691,12 @@ function goToSection(newSection){
|
|
|
6682
6691
|
section.value = newSection;
|
|
6683
6692
|
}
|
|
6684
6693
|
watch(user,(newUser) => {
|
|
6685
|
-
if(newUser.value) {
|
|
6694
|
+
if(newUser.value && redirectLogin) {
|
|
6695
|
+
router.push(redirectLogin);
|
|
6696
|
+
}
|
|
6697
|
+
});
|
|
6698
|
+
onMounted(()=>{
|
|
6699
|
+
if(user.value && redirectLogin){
|
|
6686
6700
|
router.push(redirectLogin);
|
|
6687
6701
|
}
|
|
6688
6702
|
});
|
|
@@ -6692,6 +6706,10 @@ function loginSuccessful(res){
|
|
|
6692
6706
|
window.location.href = redirectLogin;
|
|
6693
6707
|
}
|
|
6694
6708
|
|
|
6709
|
+
const forgotSuccessful = ()=>{
|
|
6710
|
+
shRepo.showToast('Reset link sent to your email');
|
|
6711
|
+
};
|
|
6712
|
+
|
|
6695
6713
|
return (_ctx, _cache) => {
|
|
6696
6714
|
return (unref(user))
|
|
6697
6715
|
? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -6699,8 +6717,28 @@ return (_ctx, _cache) => {
|
|
|
6699
6717
|
createElementVNode("strong", null, toDisplayString(unref(user).name), 1 /* TEXT */)
|
|
6700
6718
|
]))
|
|
6701
6719
|
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
6702
|
-
(section.value === '
|
|
6720
|
+
(section.value === 'forgot')
|
|
6703
6721
|
? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
6722
|
+
createVNode(script$u, {
|
|
6723
|
+
class: "sh-login-form",
|
|
6724
|
+
fields: ['email'],
|
|
6725
|
+
"action-label": "Send Reset Link",
|
|
6726
|
+
action: unref(forgotEndpoint),
|
|
6727
|
+
"success-callback": forgotSuccessful
|
|
6728
|
+
}, null, 8 /* PROPS */, ["action"]),
|
|
6729
|
+
createElementVNode("div", _hoisted_3, [
|
|
6730
|
+
createElementVNode("strong", {
|
|
6731
|
+
onClick: _cache[0] || (_cache[0] = $event => (goToSection('login'))),
|
|
6732
|
+
class: "sh-register-link text-primary"
|
|
6733
|
+
}, [
|
|
6734
|
+
_hoisted_4,
|
|
6735
|
+
createTextVNode(" Back to Login ")
|
|
6736
|
+
])
|
|
6737
|
+
])
|
|
6738
|
+
]))
|
|
6739
|
+
: createCommentVNode("v-if", true),
|
|
6740
|
+
(section.value === 'login')
|
|
6741
|
+
? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
6704
6742
|
createVNode(script$u, {
|
|
6705
6743
|
class: "sh-login-form",
|
|
6706
6744
|
fields: ['email','password'],
|
|
@@ -6708,23 +6746,26 @@ return (_ctx, _cache) => {
|
|
|
6708
6746
|
action: unref(loginEndpoint),
|
|
6709
6747
|
"success-callback": loginSuccessful
|
|
6710
6748
|
}, null, 8 /* PROPS */, ["action"]),
|
|
6711
|
-
createElementVNode("div",
|
|
6712
|
-
|
|
6713
|
-
|
|
6749
|
+
createElementVNode("div", _hoisted_6, [
|
|
6750
|
+
createElementVNode("strong", {
|
|
6751
|
+
class: "sh-forgot-link text-primary",
|
|
6752
|
+
onClick: _cache[1] || (_cache[1] = $event => (goToSection('forgot')))
|
|
6753
|
+
}, "Forgotten password?"),
|
|
6754
|
+
_hoisted_7,
|
|
6714
6755
|
createElementVNode("strong", {
|
|
6715
|
-
onClick: _cache[
|
|
6756
|
+
onClick: _cache[2] || (_cache[2] = $event => (goToSection('register'))),
|
|
6716
6757
|
class: "sh-register-link text-primary"
|
|
6717
6758
|
}, "Sign Up")
|
|
6718
6759
|
])
|
|
6719
6760
|
]))
|
|
6720
6761
|
: createCommentVNode("v-if", true),
|
|
6721
6762
|
(section.value === 'register')
|
|
6722
|
-
? (openBlock(), createElementBlock("div",
|
|
6763
|
+
? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
6723
6764
|
(unref(registerTitle))
|
|
6724
|
-
? (openBlock(), createElementBlock("h3",
|
|
6765
|
+
? (openBlock(), createElementBlock("h3", _hoisted_9, toDisplayString(unref(registerTitle)), 1 /* TEXT */))
|
|
6725
6766
|
: createCommentVNode("v-if", true),
|
|
6726
6767
|
(unref(registerSubTitle))
|
|
6727
|
-
? (openBlock(), createElementBlock("span",
|
|
6768
|
+
? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
|
|
6728
6769
|
: createCommentVNode("v-if", true),
|
|
6729
6770
|
createVNode(script$u, {
|
|
6730
6771
|
class: "sh-login-form",
|
|
@@ -6733,9 +6774,9 @@ return (_ctx, _cache) => {
|
|
|
6733
6774
|
action: unref(registerEndpoint),
|
|
6734
6775
|
"success-callback": loginSuccessful
|
|
6735
6776
|
}, null, 8 /* PROPS */, ["fields", "action"]),
|
|
6736
|
-
createElementVNode("div",
|
|
6777
|
+
createElementVNode("div", _hoisted_11, [
|
|
6737
6778
|
createElementVNode("strong", {
|
|
6738
|
-
onClick: _cache[
|
|
6779
|
+
onClick: _cache[3] || (_cache[3] = $event => (goToSection('login'))),
|
|
6739
6780
|
class: "sh-register-link text-primary"
|
|
6740
6781
|
}, "Already have an account?")
|
|
6741
6782
|
])
|
|
@@ -6770,6 +6811,7 @@ const ShFrontend = {
|
|
|
6770
6811
|
const swalPosition = options.swalPosition ?? 'top-end';
|
|
6771
6812
|
const loginEndpoint = options.loginEndpoint ?? 'auth/login';
|
|
6772
6813
|
const registerEndpoint = options.registerEndpoint ?? 'auth/register';
|
|
6814
|
+
const forgotEndpoint = options.forgotEndpoint ?? 'auth/forgot-password';
|
|
6773
6815
|
const registerTitle = options.registerTitle ?? 'Create a new account';
|
|
6774
6816
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
6775
6817
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
@@ -6792,6 +6834,7 @@ const ShFrontend = {
|
|
|
6792
6834
|
app.provide('loginUrl', loginUrl);
|
|
6793
6835
|
app.provide('shFormElementClasses',defaultFormElementClasses);
|
|
6794
6836
|
app.provide('noRecordsComponent',noRecordsComponent);
|
|
6837
|
+
app.provide('forgotEndpoint',forgotEndpoint);
|
|
6795
6838
|
window.swalPosition = swalPosition;
|
|
6796
6839
|
if(options.router) {
|
|
6797
6840
|
options.router.addRoute({
|