@iankibetsh/shframework 4.4.6 → 4.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/library.js +87 -46
- package/dist/library.mjs +87 -46
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -2059,7 +2059,7 @@ const _hoisted_9$7 = {
|
|
|
2059
2059
|
key: 1,
|
|
2060
2060
|
class: "dropdown-item sh-suggest-no-results"
|
|
2061
2061
|
};
|
|
2062
|
-
const _hoisted_10$
|
|
2062
|
+
const _hoisted_10$7 = {
|
|
2063
2063
|
key: 2,
|
|
2064
2064
|
class: "dropdown-item sh-suggest-no-input"
|
|
2065
2065
|
};
|
|
@@ -2261,7 +2261,7 @@ return (_ctx, _cache) => {
|
|
|
2261
2261
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2262
2262
|
: (vue.unref(searchText))
|
|
2263
2263
|
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_9$7, " No results found "))
|
|
2264
|
-
: (vue.openBlock(), vue.createElementBlock("li", _hoisted_10$
|
|
2264
|
+
: (vue.openBlock(), vue.createElementBlock("li", _hoisted_10$7, " Type to search... "))
|
|
2265
2265
|
], 8 /* PROPS */, _hoisted_7$8)
|
|
2266
2266
|
]))
|
|
2267
2267
|
: vue.createCommentVNode("v-if", true)
|
|
@@ -2618,8 +2618,8 @@ const _hoisted_6$8 = { key: 1 };
|
|
|
2618
2618
|
const _hoisted_7$7 = { class: "row" };
|
|
2619
2619
|
const _hoisted_8$6 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2620
2620
|
const _hoisted_9$6 = { class: "col-md-12" };
|
|
2621
|
-
const _hoisted_10$
|
|
2622
|
-
const _hoisted_11$
|
|
2621
|
+
const _hoisted_10$6 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
2622
|
+
const _hoisted_11$6 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2623
2623
|
const _hoisted_12$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2624
2624
|
const _hoisted_13$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2625
2625
|
const _hoisted_14$4 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
|
|
@@ -2714,7 +2714,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2714
2714
|
ref: 'file_'+field,
|
|
2715
2715
|
onChange: $event => ($options.handleFileUpload(field)),
|
|
2716
2716
|
type: "file"
|
|
2717
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$
|
|
2717
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$6))
|
|
2718
2718
|
: vue.createCommentVNode("v-if", true),
|
|
2719
2719
|
($options.getFieldType(field) === 'numeric')
|
|
2720
2720
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
@@ -2726,7 +2726,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2726
2726
|
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2727
2727
|
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2728
2728
|
type: "number"
|
|
2729
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$
|
|
2729
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$6)), [
|
|
2730
2730
|
[vue.vModelText, _ctx.form_elements[field]]
|
|
2731
2731
|
])
|
|
2732
2732
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -3204,12 +3204,12 @@ const _hoisted_6$7 = {
|
|
|
3204
3204
|
const _hoisted_7$6 = /*#__PURE__*/vue.createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* HOISTED */);
|
|
3205
3205
|
const _hoisted_8$5 = /*#__PURE__*/vue.createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* HOISTED */);
|
|
3206
3206
|
const _hoisted_9$5 = /*#__PURE__*/vue.createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* HOISTED */);
|
|
3207
|
-
const _hoisted_10$
|
|
3207
|
+
const _hoisted_10$5 = [
|
|
3208
3208
|
_hoisted_7$6,
|
|
3209
3209
|
_hoisted_8$5,
|
|
3210
3210
|
_hoisted_9$5
|
|
3211
3211
|
];
|
|
3212
|
-
const _hoisted_11$
|
|
3212
|
+
const _hoisted_11$5 = ["innerHTML"];
|
|
3213
3213
|
const _hoisted_12$3 = ["disabled"];
|
|
3214
3214
|
const _hoisted_13$3 = {
|
|
3215
3215
|
key: 0,
|
|
@@ -3497,14 +3497,14 @@ return (_ctx, _cache) => {
|
|
|
3497
3497
|
}, null, 10 /* CLASS, PROPS */, _hoisted_5$8))
|
|
3498
3498
|
: vue.createCommentVNode("v-if", true),
|
|
3499
3499
|
(vue.unref(isFloating))
|
|
3500
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$7, [..._hoisted_10$
|
|
3500
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$7, [..._hoisted_10$5]))
|
|
3501
3501
|
: vue.createCommentVNode("v-if", true),
|
|
3502
3502
|
(field.helper)
|
|
3503
3503
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3504
3504
|
key: 3,
|
|
3505
3505
|
class: vue.normalizeClass(getElementClass('helperText')),
|
|
3506
3506
|
innerHTML: field.helper
|
|
3507
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_11$
|
|
3507
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_11$5))
|
|
3508
3508
|
: vue.createCommentVNode("v-if", true),
|
|
3509
3509
|
(validationErrors.value[field.field])
|
|
3510
3510
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -4097,8 +4097,8 @@ const _hoisted_9$4 = {
|
|
|
4097
4097
|
key: 1,
|
|
4098
4098
|
class: "page-link"
|
|
4099
4099
|
};
|
|
4100
|
-
const _hoisted_10$
|
|
4101
|
-
const _hoisted_11$
|
|
4100
|
+
const _hoisted_10$4 = ["onClick"];
|
|
4101
|
+
const _hoisted_11$4 = { key: 1 };
|
|
4102
4102
|
const _hoisted_12$2 = {
|
|
4103
4103
|
key: 0,
|
|
4104
4104
|
class: "text-center"
|
|
@@ -4167,7 +4167,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4167
4167
|
key: 2,
|
|
4168
4168
|
onClick: $event => ($options.changeTableKey('page',page)),
|
|
4169
4169
|
class: "page-link"
|
|
4170
|
-
}, vue.toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$
|
|
4170
|
+
}, vue.toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$4))
|
|
4171
4171
|
], 2 /* CLASS */))
|
|
4172
4172
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4173
4173
|
vue.createElementVNode("li", {
|
|
@@ -4182,7 +4182,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4182
4182
|
]))
|
|
4183
4183
|
: vue.createCommentVNode("v-if", true)
|
|
4184
4184
|
]))
|
|
4185
|
-
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$
|
|
4185
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$4, [
|
|
4186
4186
|
(this.pagination_data.loading === 1 && $props.loadMore && $props.hideLoadMore)
|
|
4187
4187
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$2, [..._hoisted_14$2]))
|
|
4188
4188
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -4419,8 +4419,8 @@ const _hoisted_6$4 = {
|
|
|
4419
4419
|
const _hoisted_7$3 = { class: "sh-range-preset" };
|
|
4420
4420
|
const _hoisted_8$3 = ["onClick"];
|
|
4421
4421
|
const _hoisted_9$3 = { class: "border-top" };
|
|
4422
|
-
const _hoisted_10$
|
|
4423
|
-
const _hoisted_11$
|
|
4422
|
+
const _hoisted_10$3 = { class: "dropdown-item d-flex flex-column" };
|
|
4423
|
+
const _hoisted_11$3 = /*#__PURE__*/vue.createElementVNode("span", null, "Custom", -1 /* HOISTED */);
|
|
4424
4424
|
|
|
4425
4425
|
|
|
4426
4426
|
|
|
@@ -4556,8 +4556,8 @@ return (_ctx, _cache) => {
|
|
|
4556
4556
|
]),
|
|
4557
4557
|
vue.createElementVNode("ul", null, [
|
|
4558
4558
|
vue.createElementVNode("li", _hoisted_9$3, [
|
|
4559
|
-
vue.createElementVNode("div", _hoisted_10$
|
|
4560
|
-
_hoisted_11$
|
|
4559
|
+
vue.createElementVNode("div", _hoisted_10$3, [
|
|
4560
|
+
_hoisted_11$3,
|
|
4561
4561
|
vue.createElementVNode("div", null, [
|
|
4562
4562
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
4563
4563
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((customFrom).value = $event)),
|
|
@@ -4609,13 +4609,13 @@ const _hoisted_7$2 = {
|
|
|
4609
4609
|
key: 1,
|
|
4610
4610
|
class: "row"
|
|
4611
4611
|
};
|
|
4612
|
-
const _hoisted_8$2 = { class: "col-12 mb-3 d-flex justify-content-
|
|
4612
|
+
const _hoisted_8$2 = { class: "col-12 mb-3 d-flex justify-content-between flex-column flex-md-row flex-lg-row" };
|
|
4613
4613
|
const _hoisted_9$2 = ["placeholder"];
|
|
4614
|
-
const _hoisted_10$
|
|
4614
|
+
const _hoisted_10$2 = {
|
|
4615
4615
|
key: 0,
|
|
4616
4616
|
class: "input-group-text exact_checkbox"
|
|
4617
4617
|
};
|
|
4618
|
-
const _hoisted_11$
|
|
4618
|
+
const _hoisted_11$2 = /*#__PURE__*/vue.createElementVNode("span", { class: "ms-1" }, "Exact", -1 /* HOISTED */);
|
|
4619
4619
|
const _hoisted_12$1 = {
|
|
4620
4620
|
key: 0,
|
|
4621
4621
|
class: "sh-range-selector"
|
|
@@ -5103,7 +5103,7 @@ return (_ctx, _cache) => {
|
|
|
5103
5103
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, [
|
|
5104
5104
|
vue.createElementVNode("div", _hoisted_8$2, [
|
|
5105
5105
|
vue.createElementVNode("div", {
|
|
5106
|
-
class: vue.normalizeClass(["sh-search-bar input-group", __props.hasRange ? '
|
|
5106
|
+
class: vue.normalizeClass(["sh-search-bar input-group", __props.hasRange ? 'me-2':''])
|
|
5107
5107
|
}, [
|
|
5108
5108
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
5109
5109
|
onKeydown: _cache[1] || (_cache[1] = (...args) => (_ctx.userTyping && _ctx.userTyping(...args))),
|
|
@@ -5117,7 +5117,7 @@ return (_ctx, _cache) => {
|
|
|
5117
5117
|
[vue.vModelText, _ctx.filter_value]
|
|
5118
5118
|
]),
|
|
5119
5119
|
(_ctx.filter_value.length > 1)
|
|
5120
|
-
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_10$
|
|
5120
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_10$2, [
|
|
5121
5121
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
5122
5122
|
onChange: _cache[5] || (_cache[5] = (...args) => (_ctx.reloadData && _ctx.reloadData(...args))),
|
|
5123
5123
|
value: true,
|
|
@@ -5126,7 +5126,7 @@ return (_ctx, _cache) => {
|
|
|
5126
5126
|
}, null, 544 /* NEED_HYDRATION, NEED_PATCH */), [
|
|
5127
5127
|
[vue.vModelCheckbox, _ctx.exactMatch]
|
|
5128
5128
|
]),
|
|
5129
|
-
_hoisted_11$
|
|
5129
|
+
_hoisted_11$2
|
|
5130
5130
|
]))
|
|
5131
5131
|
: vue.createCommentVNode("v-if", true)
|
|
5132
5132
|
], 2 /* CLASS */),
|
|
@@ -5854,8 +5854,8 @@ const _hoisted_9$1 = {
|
|
|
5854
5854
|
id: "permissions-content",
|
|
5855
5855
|
class: "col-md-9 py-4 px-4"
|
|
5856
5856
|
};
|
|
5857
|
-
const _hoisted_10 = { class: "p-2 rounded-2 bg-white h-100" };
|
|
5858
|
-
const _hoisted_11 = {
|
|
5857
|
+
const _hoisted_10$1 = { class: "p-2 rounded-2 bg-white h-100" };
|
|
5858
|
+
const _hoisted_11$1 = {
|
|
5859
5859
|
key: 0,
|
|
5860
5860
|
class: "alert alert-info"
|
|
5861
5861
|
};
|
|
@@ -6000,9 +6000,9 @@ return (_ctx, _cache) => {
|
|
|
6000
6000
|
]))
|
|
6001
6001
|
]),
|
|
6002
6002
|
vue.createElementVNode("div", _hoisted_9$1, [
|
|
6003
|
-
vue.createElementVNode("div", _hoisted_10, [
|
|
6003
|
+
vue.createElementVNode("div", _hoisted_10$1, [
|
|
6004
6004
|
(loading.value)
|
|
6005
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, " loading ... "))
|
|
6005
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, " loading ... "))
|
|
6006
6006
|
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
|
|
6007
6007
|
vue.createElementVNode("div", _hoisted_13, [
|
|
6008
6008
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(modulePermissions.value, (permissions) => {
|
|
@@ -6655,24 +6655,30 @@ const _hoisted_1 = {
|
|
|
6655
6655
|
};
|
|
6656
6656
|
const _hoisted_2 = {
|
|
6657
6657
|
key: 0,
|
|
6658
|
-
class: "sh-
|
|
6658
|
+
class: "sh-forgot-section",
|
|
6659
|
+
style: {"min-width":"400px"}
|
|
6659
6660
|
};
|
|
6660
6661
|
const _hoisted_3 = { class: "sh-auth-footer" };
|
|
6661
|
-
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("
|
|
6662
|
-
const _hoisted_5 =
|
|
6663
|
-
const _hoisted_6 = {
|
|
6662
|
+
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("i", { class: "bi bi-arrow-left" }, null, -1 /* HOISTED */));
|
|
6663
|
+
const _hoisted_5 = {
|
|
6664
6664
|
key: 1,
|
|
6665
|
+
class: "sh-login-section"
|
|
6666
|
+
};
|
|
6667
|
+
const _hoisted_6 = { class: "sh-auth-footer" };
|
|
6668
|
+
const _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/vue.createElementVNode("strong", { class: "bi-dot" }, null, -1 /* HOISTED */));
|
|
6669
|
+
const _hoisted_8 = {
|
|
6670
|
+
key: 2,
|
|
6665
6671
|
class: "sh-register-section"
|
|
6666
6672
|
};
|
|
6667
|
-
const
|
|
6673
|
+
const _hoisted_9 = {
|
|
6668
6674
|
key: 0,
|
|
6669
6675
|
class: "sh-register-title"
|
|
6670
6676
|
};
|
|
6671
|
-
const
|
|
6677
|
+
const _hoisted_10 = {
|
|
6672
6678
|
key: 1,
|
|
6673
6679
|
class: "sh-register-link"
|
|
6674
6680
|
};
|
|
6675
|
-
const
|
|
6681
|
+
const _hoisted_11 = { class: "sh-auth-footer" };
|
|
6676
6682
|
|
|
6677
6683
|
var script = {
|
|
6678
6684
|
__name: 'ShAuth',
|
|
@@ -6684,6 +6690,7 @@ userStore.setUser();
|
|
|
6684
6690
|
const {user} = pinia.storeToRefs(userStore);
|
|
6685
6691
|
const section = vue.ref('login');
|
|
6686
6692
|
const registerEndpoint = vue.inject('registerEndpoint');
|
|
6693
|
+
const forgotEndpoint = vue.inject('forgotEndpoint');
|
|
6687
6694
|
const loginEndpoint = vue.inject('loginEndpoint');
|
|
6688
6695
|
const registrationFields = vue.inject('registrationFields');
|
|
6689
6696
|
const registerTitle = vue.inject('registerTitle');
|
|
@@ -6694,7 +6701,12 @@ function goToSection(newSection){
|
|
|
6694
6701
|
section.value = newSection;
|
|
6695
6702
|
}
|
|
6696
6703
|
vue.watch(user,(newUser) => {
|
|
6697
|
-
if(newUser.value) {
|
|
6704
|
+
if(newUser.value && redirectLogin) {
|
|
6705
|
+
router.push(redirectLogin);
|
|
6706
|
+
}
|
|
6707
|
+
});
|
|
6708
|
+
vue.onMounted(()=>{
|
|
6709
|
+
if(user.value && redirectLogin){
|
|
6698
6710
|
router.push(redirectLogin);
|
|
6699
6711
|
}
|
|
6700
6712
|
});
|
|
@@ -6704,6 +6716,10 @@ function loginSuccessful(res){
|
|
|
6704
6716
|
window.location.href = redirectLogin;
|
|
6705
6717
|
}
|
|
6706
6718
|
|
|
6719
|
+
const forgotSuccessful = ()=>{
|
|
6720
|
+
shRepo.showToast('Reset link sent to your email');
|
|
6721
|
+
};
|
|
6722
|
+
|
|
6707
6723
|
return (_ctx, _cache) => {
|
|
6708
6724
|
return (vue.unref(user))
|
|
6709
6725
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
@@ -6711,8 +6727,28 @@ return (_ctx, _cache) => {
|
|
|
6711
6727
|
vue.createElementVNode("strong", null, vue.toDisplayString(vue.unref(user).name), 1 /* TEXT */)
|
|
6712
6728
|
]))
|
|
6713
6729
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
6714
|
-
(section.value === '
|
|
6730
|
+
(section.value === 'forgot')
|
|
6715
6731
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
6732
|
+
vue.createVNode(script$u, {
|
|
6733
|
+
class: "sh-login-form",
|
|
6734
|
+
fields: ['email'],
|
|
6735
|
+
"action-label": "Send Reset Link",
|
|
6736
|
+
action: vue.unref(forgotEndpoint),
|
|
6737
|
+
"success-callback": forgotSuccessful
|
|
6738
|
+
}, null, 8 /* PROPS */, ["action"]),
|
|
6739
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
6740
|
+
vue.createElementVNode("strong", {
|
|
6741
|
+
onClick: _cache[0] || (_cache[0] = $event => (goToSection('login'))),
|
|
6742
|
+
class: "sh-register-link text-primary"
|
|
6743
|
+
}, [
|
|
6744
|
+
_hoisted_4,
|
|
6745
|
+
vue.createTextVNode(" Back to Login ")
|
|
6746
|
+
])
|
|
6747
|
+
])
|
|
6748
|
+
]))
|
|
6749
|
+
: vue.createCommentVNode("v-if", true),
|
|
6750
|
+
(section.value === 'login')
|
|
6751
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
6716
6752
|
vue.createVNode(script$u, {
|
|
6717
6753
|
class: "sh-login-form",
|
|
6718
6754
|
fields: ['email','password'],
|
|
@@ -6720,23 +6756,26 @@ return (_ctx, _cache) => {
|
|
|
6720
6756
|
action: vue.unref(loginEndpoint),
|
|
6721
6757
|
"success-callback": loginSuccessful
|
|
6722
6758
|
}, null, 8 /* PROPS */, ["action"]),
|
|
6723
|
-
vue.createElementVNode("div",
|
|
6724
|
-
|
|
6725
|
-
|
|
6759
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
6760
|
+
vue.createElementVNode("strong", {
|
|
6761
|
+
class: "sh-forgot-link text-primary",
|
|
6762
|
+
onClick: _cache[1] || (_cache[1] = $event => (goToSection('forgot')))
|
|
6763
|
+
}, "Forgotten password?"),
|
|
6764
|
+
_hoisted_7,
|
|
6726
6765
|
vue.createElementVNode("strong", {
|
|
6727
|
-
onClick: _cache[
|
|
6766
|
+
onClick: _cache[2] || (_cache[2] = $event => (goToSection('register'))),
|
|
6728
6767
|
class: "sh-register-link text-primary"
|
|
6729
6768
|
}, "Sign Up")
|
|
6730
6769
|
])
|
|
6731
6770
|
]))
|
|
6732
6771
|
: vue.createCommentVNode("v-if", true),
|
|
6733
6772
|
(section.value === 'register')
|
|
6734
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
6773
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
6735
6774
|
(vue.unref(registerTitle))
|
|
6736
|
-
? (vue.openBlock(), vue.createElementBlock("h3",
|
|
6775
|
+
? (vue.openBlock(), vue.createElementBlock("h3", _hoisted_9, vue.toDisplayString(vue.unref(registerTitle)), 1 /* TEXT */))
|
|
6737
6776
|
: vue.createCommentVNode("v-if", true),
|
|
6738
6777
|
(vue.unref(registerSubTitle))
|
|
6739
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
6778
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_10, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
|
|
6740
6779
|
: vue.createCommentVNode("v-if", true),
|
|
6741
6780
|
vue.createVNode(script$u, {
|
|
6742
6781
|
class: "sh-login-form",
|
|
@@ -6745,9 +6784,9 @@ return (_ctx, _cache) => {
|
|
|
6745
6784
|
action: vue.unref(registerEndpoint),
|
|
6746
6785
|
"success-callback": loginSuccessful
|
|
6747
6786
|
}, null, 8 /* PROPS */, ["fields", "action"]),
|
|
6748
|
-
vue.createElementVNode("div",
|
|
6787
|
+
vue.createElementVNode("div", _hoisted_11, [
|
|
6749
6788
|
vue.createElementVNode("strong", {
|
|
6750
|
-
onClick: _cache[
|
|
6789
|
+
onClick: _cache[3] || (_cache[3] = $event => (goToSection('login'))),
|
|
6751
6790
|
class: "sh-register-link text-primary"
|
|
6752
6791
|
}, "Already have an account?")
|
|
6753
6792
|
])
|
|
@@ -6782,6 +6821,7 @@ const ShFrontend = {
|
|
|
6782
6821
|
const swalPosition = options.swalPosition ?? 'top-end';
|
|
6783
6822
|
const loginEndpoint = options.loginEndpoint ?? 'auth/login';
|
|
6784
6823
|
const registerEndpoint = options.registerEndpoint ?? 'auth/register';
|
|
6824
|
+
const forgotEndpoint = options.forgotEndpoint ?? 'auth/forgot-password';
|
|
6785
6825
|
const registerTitle = options.registerTitle ?? 'Create a new account';
|
|
6786
6826
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
6787
6827
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
@@ -6804,6 +6844,7 @@ const ShFrontend = {
|
|
|
6804
6844
|
app.provide('loginUrl', loginUrl);
|
|
6805
6845
|
app.provide('shFormElementClasses',defaultFormElementClasses);
|
|
6806
6846
|
app.provide('noRecordsComponent',noRecordsComponent);
|
|
6847
|
+
app.provide('forgotEndpoint',forgotEndpoint);
|
|
6807
6848
|
window.swalPosition = swalPosition;
|
|
6808
6849
|
if(options.router) {
|
|
6809
6850
|
options.router.addRoute({
|
package/dist/library.mjs
CHANGED
|
@@ -2047,7 +2047,7 @@ const _hoisted_9$7 = {
|
|
|
2047
2047
|
key: 1,
|
|
2048
2048
|
class: "dropdown-item sh-suggest-no-results"
|
|
2049
2049
|
};
|
|
2050
|
-
const _hoisted_10$
|
|
2050
|
+
const _hoisted_10$7 = {
|
|
2051
2051
|
key: 2,
|
|
2052
2052
|
class: "dropdown-item sh-suggest-no-input"
|
|
2053
2053
|
};
|
|
@@ -2249,7 +2249,7 @@ return (_ctx, _cache) => {
|
|
|
2249
2249
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2250
2250
|
: (unref(searchText))
|
|
2251
2251
|
? (openBlock(), createElementBlock("li", _hoisted_9$7, " No results found "))
|
|
2252
|
-
: (openBlock(), createElementBlock("li", _hoisted_10$
|
|
2252
|
+
: (openBlock(), createElementBlock("li", _hoisted_10$7, " Type to search... "))
|
|
2253
2253
|
], 8 /* PROPS */, _hoisted_7$8)
|
|
2254
2254
|
]))
|
|
2255
2255
|
: createCommentVNode("v-if", true)
|
|
@@ -2606,8 +2606,8 @@ const _hoisted_6$8 = { key: 1 };
|
|
|
2606
2606
|
const _hoisted_7$7 = { class: "row" };
|
|
2607
2607
|
const _hoisted_8$6 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2608
2608
|
const _hoisted_9$6 = { class: "col-md-12" };
|
|
2609
|
-
const _hoisted_10$
|
|
2610
|
-
const _hoisted_11$
|
|
2609
|
+
const _hoisted_10$6 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
2610
|
+
const _hoisted_11$6 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2611
2611
|
const _hoisted_12$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2612
2612
|
const _hoisted_13$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2613
2613
|
const _hoisted_14$4 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
|
|
@@ -2702,7 +2702,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2702
2702
|
ref: 'file_'+field,
|
|
2703
2703
|
onChange: $event => ($options.handleFileUpload(field)),
|
|
2704
2704
|
type: "file"
|
|
2705
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$
|
|
2705
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$6))
|
|
2706
2706
|
: createCommentVNode("v-if", true),
|
|
2707
2707
|
($options.getFieldType(field) === 'numeric')
|
|
2708
2708
|
? withDirectives((openBlock(), createElementBlock("input", {
|
|
@@ -2714,7 +2714,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2714
2714
|
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2715
2715
|
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
|
|
2716
2716
|
type: "number"
|
|
2717
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$
|
|
2717
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$6)), [
|
|
2718
2718
|
[vModelText, _ctx.form_elements[field]]
|
|
2719
2719
|
])
|
|
2720
2720
|
: createCommentVNode("v-if", true),
|
|
@@ -3192,12 +3192,12 @@ const _hoisted_6$7 = {
|
|
|
3192
3192
|
const _hoisted_7$6 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* HOISTED */);
|
|
3193
3193
|
const _hoisted_8$5 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* HOISTED */);
|
|
3194
3194
|
const _hoisted_9$5 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* HOISTED */);
|
|
3195
|
-
const _hoisted_10$
|
|
3195
|
+
const _hoisted_10$5 = [
|
|
3196
3196
|
_hoisted_7$6,
|
|
3197
3197
|
_hoisted_8$5,
|
|
3198
3198
|
_hoisted_9$5
|
|
3199
3199
|
];
|
|
3200
|
-
const _hoisted_11$
|
|
3200
|
+
const _hoisted_11$5 = ["innerHTML"];
|
|
3201
3201
|
const _hoisted_12$3 = ["disabled"];
|
|
3202
3202
|
const _hoisted_13$3 = {
|
|
3203
3203
|
key: 0,
|
|
@@ -3485,14 +3485,14 @@ return (_ctx, _cache) => {
|
|
|
3485
3485
|
}, null, 10 /* CLASS, PROPS */, _hoisted_5$8))
|
|
3486
3486
|
: createCommentVNode("v-if", true),
|
|
3487
3487
|
(unref(isFloating))
|
|
3488
|
-
? (openBlock(), createElementBlock("div", _hoisted_6$7, [..._hoisted_10$
|
|
3488
|
+
? (openBlock(), createElementBlock("div", _hoisted_6$7, [..._hoisted_10$5]))
|
|
3489
3489
|
: createCommentVNode("v-if", true),
|
|
3490
3490
|
(field.helper)
|
|
3491
3491
|
? (openBlock(), createElementBlock("div", {
|
|
3492
3492
|
key: 3,
|
|
3493
3493
|
class: normalizeClass(getElementClass('helperText')),
|
|
3494
3494
|
innerHTML: field.helper
|
|
3495
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_11$
|
|
3495
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_11$5))
|
|
3496
3496
|
: createCommentVNode("v-if", true),
|
|
3497
3497
|
(validationErrors.value[field.field])
|
|
3498
3498
|
? (openBlock(), createElementBlock("div", {
|
|
@@ -4085,8 +4085,8 @@ const _hoisted_9$4 = {
|
|
|
4085
4085
|
key: 1,
|
|
4086
4086
|
class: "page-link"
|
|
4087
4087
|
};
|
|
4088
|
-
const _hoisted_10$
|
|
4089
|
-
const _hoisted_11$
|
|
4088
|
+
const _hoisted_10$4 = ["onClick"];
|
|
4089
|
+
const _hoisted_11$4 = { key: 1 };
|
|
4090
4090
|
const _hoisted_12$2 = {
|
|
4091
4091
|
key: 0,
|
|
4092
4092
|
class: "text-center"
|
|
@@ -4155,7 +4155,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4155
4155
|
key: 2,
|
|
4156
4156
|
onClick: $event => ($options.changeTableKey('page',page)),
|
|
4157
4157
|
class: "page-link"
|
|
4158
|
-
}, toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$
|
|
4158
|
+
}, toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$4))
|
|
4159
4159
|
], 2 /* CLASS */))
|
|
4160
4160
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4161
4161
|
createElementVNode("li", {
|
|
@@ -4170,7 +4170,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4170
4170
|
]))
|
|
4171
4171
|
: createCommentVNode("v-if", true)
|
|
4172
4172
|
]))
|
|
4173
|
-
: (openBlock(), createElementBlock("div", _hoisted_11$
|
|
4173
|
+
: (openBlock(), createElementBlock("div", _hoisted_11$4, [
|
|
4174
4174
|
(this.pagination_data.loading === 1 && $props.loadMore && $props.hideLoadMore)
|
|
4175
4175
|
? (openBlock(), createElementBlock("div", _hoisted_12$2, [..._hoisted_14$2]))
|
|
4176
4176
|
: createCommentVNode("v-if", true),
|
|
@@ -4407,8 +4407,8 @@ const _hoisted_6$4 = {
|
|
|
4407
4407
|
const _hoisted_7$3 = { class: "sh-range-preset" };
|
|
4408
4408
|
const _hoisted_8$3 = ["onClick"];
|
|
4409
4409
|
const _hoisted_9$3 = { class: "border-top" };
|
|
4410
|
-
const _hoisted_10$
|
|
4411
|
-
const _hoisted_11$
|
|
4410
|
+
const _hoisted_10$3 = { class: "dropdown-item d-flex flex-column" };
|
|
4411
|
+
const _hoisted_11$3 = /*#__PURE__*/createElementVNode("span", null, "Custom", -1 /* HOISTED */);
|
|
4412
4412
|
|
|
4413
4413
|
|
|
4414
4414
|
|
|
@@ -4544,8 +4544,8 @@ return (_ctx, _cache) => {
|
|
|
4544
4544
|
]),
|
|
4545
4545
|
createElementVNode("ul", null, [
|
|
4546
4546
|
createElementVNode("li", _hoisted_9$3, [
|
|
4547
|
-
createElementVNode("div", _hoisted_10$
|
|
4548
|
-
_hoisted_11$
|
|
4547
|
+
createElementVNode("div", _hoisted_10$3, [
|
|
4548
|
+
_hoisted_11$3,
|
|
4549
4549
|
createElementVNode("div", null, [
|
|
4550
4550
|
withDirectives(createElementVNode("input", {
|
|
4551
4551
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((customFrom).value = $event)),
|
|
@@ -4597,13 +4597,13 @@ const _hoisted_7$2 = {
|
|
|
4597
4597
|
key: 1,
|
|
4598
4598
|
class: "row"
|
|
4599
4599
|
};
|
|
4600
|
-
const _hoisted_8$2 = { class: "col-12 mb-3 d-flex justify-content-
|
|
4600
|
+
const _hoisted_8$2 = { class: "col-12 mb-3 d-flex justify-content-between flex-column flex-md-row flex-lg-row" };
|
|
4601
4601
|
const _hoisted_9$2 = ["placeholder"];
|
|
4602
|
-
const _hoisted_10$
|
|
4602
|
+
const _hoisted_10$2 = {
|
|
4603
4603
|
key: 0,
|
|
4604
4604
|
class: "input-group-text exact_checkbox"
|
|
4605
4605
|
};
|
|
4606
|
-
const _hoisted_11$
|
|
4606
|
+
const _hoisted_11$2 = /*#__PURE__*/createElementVNode("span", { class: "ms-1" }, "Exact", -1 /* HOISTED */);
|
|
4607
4607
|
const _hoisted_12$1 = {
|
|
4608
4608
|
key: 0,
|
|
4609
4609
|
class: "sh-range-selector"
|
|
@@ -5091,7 +5091,7 @@ return (_ctx, _cache) => {
|
|
|
5091
5091
|
? (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
5092
5092
|
createElementVNode("div", _hoisted_8$2, [
|
|
5093
5093
|
createElementVNode("div", {
|
|
5094
|
-
class: normalizeClass(["sh-search-bar input-group", __props.hasRange ? '
|
|
5094
|
+
class: normalizeClass(["sh-search-bar input-group", __props.hasRange ? 'me-2':''])
|
|
5095
5095
|
}, [
|
|
5096
5096
|
withDirectives(createElementVNode("input", {
|
|
5097
5097
|
onKeydown: _cache[1] || (_cache[1] = (...args) => (_ctx.userTyping && _ctx.userTyping(...args))),
|
|
@@ -5105,7 +5105,7 @@ return (_ctx, _cache) => {
|
|
|
5105
5105
|
[vModelText, _ctx.filter_value]
|
|
5106
5106
|
]),
|
|
5107
5107
|
(_ctx.filter_value.length > 1)
|
|
5108
|
-
? (openBlock(), createElementBlock("span", _hoisted_10$
|
|
5108
|
+
? (openBlock(), createElementBlock("span", _hoisted_10$2, [
|
|
5109
5109
|
withDirectives(createElementVNode("input", {
|
|
5110
5110
|
onChange: _cache[5] || (_cache[5] = (...args) => (_ctx.reloadData && _ctx.reloadData(...args))),
|
|
5111
5111
|
value: true,
|
|
@@ -5114,7 +5114,7 @@ return (_ctx, _cache) => {
|
|
|
5114
5114
|
}, null, 544 /* NEED_HYDRATION, NEED_PATCH */), [
|
|
5115
5115
|
[vModelCheckbox, _ctx.exactMatch]
|
|
5116
5116
|
]),
|
|
5117
|
-
_hoisted_11$
|
|
5117
|
+
_hoisted_11$2
|
|
5118
5118
|
]))
|
|
5119
5119
|
: createCommentVNode("v-if", true)
|
|
5120
5120
|
], 2 /* CLASS */),
|
|
@@ -5842,8 +5842,8 @@ const _hoisted_9$1 = {
|
|
|
5842
5842
|
id: "permissions-content",
|
|
5843
5843
|
class: "col-md-9 py-4 px-4"
|
|
5844
5844
|
};
|
|
5845
|
-
const _hoisted_10 = { class: "p-2 rounded-2 bg-white h-100" };
|
|
5846
|
-
const _hoisted_11 = {
|
|
5845
|
+
const _hoisted_10$1 = { class: "p-2 rounded-2 bg-white h-100" };
|
|
5846
|
+
const _hoisted_11$1 = {
|
|
5847
5847
|
key: 0,
|
|
5848
5848
|
class: "alert alert-info"
|
|
5849
5849
|
};
|
|
@@ -5988,9 +5988,9 @@ return (_ctx, _cache) => {
|
|
|
5988
5988
|
]))
|
|
5989
5989
|
]),
|
|
5990
5990
|
createElementVNode("div", _hoisted_9$1, [
|
|
5991
|
-
createElementVNode("div", _hoisted_10, [
|
|
5991
|
+
createElementVNode("div", _hoisted_10$1, [
|
|
5992
5992
|
(loading.value)
|
|
5993
|
-
? (openBlock(), createElementBlock("div", _hoisted_11, " loading ... "))
|
|
5993
|
+
? (openBlock(), createElementBlock("div", _hoisted_11$1, " loading ... "))
|
|
5994
5994
|
: (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
5995
5995
|
createElementVNode("div", _hoisted_13, [
|
|
5996
5996
|
(openBlock(true), createElementBlock(Fragment, null, renderList(modulePermissions.value, (permissions) => {
|
|
@@ -6643,24 +6643,30 @@ const _hoisted_1 = {
|
|
|
6643
6643
|
};
|
|
6644
6644
|
const _hoisted_2 = {
|
|
6645
6645
|
key: 0,
|
|
6646
|
-
class: "sh-
|
|
6646
|
+
class: "sh-forgot-section",
|
|
6647
|
+
style: {"min-width":"400px"}
|
|
6647
6648
|
};
|
|
6648
6649
|
const _hoisted_3 = { class: "sh-auth-footer" };
|
|
6649
|
-
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("
|
|
6650
|
-
const _hoisted_5 =
|
|
6651
|
-
const _hoisted_6 = {
|
|
6650
|
+
const _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("i", { class: "bi bi-arrow-left" }, null, -1 /* HOISTED */));
|
|
6651
|
+
const _hoisted_5 = {
|
|
6652
6652
|
key: 1,
|
|
6653
|
+
class: "sh-login-section"
|
|
6654
|
+
};
|
|
6655
|
+
const _hoisted_6 = { class: "sh-auth-footer" };
|
|
6656
|
+
const _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("strong", { class: "bi-dot" }, null, -1 /* HOISTED */));
|
|
6657
|
+
const _hoisted_8 = {
|
|
6658
|
+
key: 2,
|
|
6653
6659
|
class: "sh-register-section"
|
|
6654
6660
|
};
|
|
6655
|
-
const
|
|
6661
|
+
const _hoisted_9 = {
|
|
6656
6662
|
key: 0,
|
|
6657
6663
|
class: "sh-register-title"
|
|
6658
6664
|
};
|
|
6659
|
-
const
|
|
6665
|
+
const _hoisted_10 = {
|
|
6660
6666
|
key: 1,
|
|
6661
6667
|
class: "sh-register-link"
|
|
6662
6668
|
};
|
|
6663
|
-
const
|
|
6669
|
+
const _hoisted_11 = { class: "sh-auth-footer" };
|
|
6664
6670
|
|
|
6665
6671
|
var script = {
|
|
6666
6672
|
__name: 'ShAuth',
|
|
@@ -6672,6 +6678,7 @@ userStore.setUser();
|
|
|
6672
6678
|
const {user} = storeToRefs(userStore);
|
|
6673
6679
|
const section = ref('login');
|
|
6674
6680
|
const registerEndpoint = inject('registerEndpoint');
|
|
6681
|
+
const forgotEndpoint = inject('forgotEndpoint');
|
|
6675
6682
|
const loginEndpoint = inject('loginEndpoint');
|
|
6676
6683
|
const registrationFields = inject('registrationFields');
|
|
6677
6684
|
const registerTitle = inject('registerTitle');
|
|
@@ -6682,7 +6689,12 @@ function goToSection(newSection){
|
|
|
6682
6689
|
section.value = newSection;
|
|
6683
6690
|
}
|
|
6684
6691
|
watch(user,(newUser) => {
|
|
6685
|
-
if(newUser.value) {
|
|
6692
|
+
if(newUser.value && redirectLogin) {
|
|
6693
|
+
router.push(redirectLogin);
|
|
6694
|
+
}
|
|
6695
|
+
});
|
|
6696
|
+
onMounted(()=>{
|
|
6697
|
+
if(user.value && redirectLogin){
|
|
6686
6698
|
router.push(redirectLogin);
|
|
6687
6699
|
}
|
|
6688
6700
|
});
|
|
@@ -6692,6 +6704,10 @@ function loginSuccessful(res){
|
|
|
6692
6704
|
window.location.href = redirectLogin;
|
|
6693
6705
|
}
|
|
6694
6706
|
|
|
6707
|
+
const forgotSuccessful = ()=>{
|
|
6708
|
+
shRepo.showToast('Reset link sent to your email');
|
|
6709
|
+
};
|
|
6710
|
+
|
|
6695
6711
|
return (_ctx, _cache) => {
|
|
6696
6712
|
return (unref(user))
|
|
6697
6713
|
? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -6699,8 +6715,28 @@ return (_ctx, _cache) => {
|
|
|
6699
6715
|
createElementVNode("strong", null, toDisplayString(unref(user).name), 1 /* TEXT */)
|
|
6700
6716
|
]))
|
|
6701
6717
|
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
6702
|
-
(section.value === '
|
|
6718
|
+
(section.value === 'forgot')
|
|
6703
6719
|
? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
6720
|
+
createVNode(script$u, {
|
|
6721
|
+
class: "sh-login-form",
|
|
6722
|
+
fields: ['email'],
|
|
6723
|
+
"action-label": "Send Reset Link",
|
|
6724
|
+
action: unref(forgotEndpoint),
|
|
6725
|
+
"success-callback": forgotSuccessful
|
|
6726
|
+
}, null, 8 /* PROPS */, ["action"]),
|
|
6727
|
+
createElementVNode("div", _hoisted_3, [
|
|
6728
|
+
createElementVNode("strong", {
|
|
6729
|
+
onClick: _cache[0] || (_cache[0] = $event => (goToSection('login'))),
|
|
6730
|
+
class: "sh-register-link text-primary"
|
|
6731
|
+
}, [
|
|
6732
|
+
_hoisted_4,
|
|
6733
|
+
createTextVNode(" Back to Login ")
|
|
6734
|
+
])
|
|
6735
|
+
])
|
|
6736
|
+
]))
|
|
6737
|
+
: createCommentVNode("v-if", true),
|
|
6738
|
+
(section.value === 'login')
|
|
6739
|
+
? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
6704
6740
|
createVNode(script$u, {
|
|
6705
6741
|
class: "sh-login-form",
|
|
6706
6742
|
fields: ['email','password'],
|
|
@@ -6708,23 +6744,26 @@ return (_ctx, _cache) => {
|
|
|
6708
6744
|
action: unref(loginEndpoint),
|
|
6709
6745
|
"success-callback": loginSuccessful
|
|
6710
6746
|
}, null, 8 /* PROPS */, ["action"]),
|
|
6711
|
-
createElementVNode("div",
|
|
6712
|
-
|
|
6713
|
-
|
|
6747
|
+
createElementVNode("div", _hoisted_6, [
|
|
6748
|
+
createElementVNode("strong", {
|
|
6749
|
+
class: "sh-forgot-link text-primary",
|
|
6750
|
+
onClick: _cache[1] || (_cache[1] = $event => (goToSection('forgot')))
|
|
6751
|
+
}, "Forgotten password?"),
|
|
6752
|
+
_hoisted_7,
|
|
6714
6753
|
createElementVNode("strong", {
|
|
6715
|
-
onClick: _cache[
|
|
6754
|
+
onClick: _cache[2] || (_cache[2] = $event => (goToSection('register'))),
|
|
6716
6755
|
class: "sh-register-link text-primary"
|
|
6717
6756
|
}, "Sign Up")
|
|
6718
6757
|
])
|
|
6719
6758
|
]))
|
|
6720
6759
|
: createCommentVNode("v-if", true),
|
|
6721
6760
|
(section.value === 'register')
|
|
6722
|
-
? (openBlock(), createElementBlock("div",
|
|
6761
|
+
? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
6723
6762
|
(unref(registerTitle))
|
|
6724
|
-
? (openBlock(), createElementBlock("h3",
|
|
6763
|
+
? (openBlock(), createElementBlock("h3", _hoisted_9, toDisplayString(unref(registerTitle)), 1 /* TEXT */))
|
|
6725
6764
|
: createCommentVNode("v-if", true),
|
|
6726
6765
|
(unref(registerSubTitle))
|
|
6727
|
-
? (openBlock(), createElementBlock("span",
|
|
6766
|
+
? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
|
|
6728
6767
|
: createCommentVNode("v-if", true),
|
|
6729
6768
|
createVNode(script$u, {
|
|
6730
6769
|
class: "sh-login-form",
|
|
@@ -6733,9 +6772,9 @@ return (_ctx, _cache) => {
|
|
|
6733
6772
|
action: unref(registerEndpoint),
|
|
6734
6773
|
"success-callback": loginSuccessful
|
|
6735
6774
|
}, null, 8 /* PROPS */, ["fields", "action"]),
|
|
6736
|
-
createElementVNode("div",
|
|
6775
|
+
createElementVNode("div", _hoisted_11, [
|
|
6737
6776
|
createElementVNode("strong", {
|
|
6738
|
-
onClick: _cache[
|
|
6777
|
+
onClick: _cache[3] || (_cache[3] = $event => (goToSection('login'))),
|
|
6739
6778
|
class: "sh-register-link text-primary"
|
|
6740
6779
|
}, "Already have an account?")
|
|
6741
6780
|
])
|
|
@@ -6770,6 +6809,7 @@ const ShFrontend = {
|
|
|
6770
6809
|
const swalPosition = options.swalPosition ?? 'top-end';
|
|
6771
6810
|
const loginEndpoint = options.loginEndpoint ?? 'auth/login';
|
|
6772
6811
|
const registerEndpoint = options.registerEndpoint ?? 'auth/register';
|
|
6812
|
+
const forgotEndpoint = options.forgotEndpoint ?? 'auth/forgot-password';
|
|
6773
6813
|
const registerTitle = options.registerTitle ?? 'Create a new account';
|
|
6774
6814
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
6775
6815
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
@@ -6792,6 +6832,7 @@ const ShFrontend = {
|
|
|
6792
6832
|
app.provide('loginUrl', loginUrl);
|
|
6793
6833
|
app.provide('shFormElementClasses',defaultFormElementClasses);
|
|
6794
6834
|
app.provide('noRecordsComponent',noRecordsComponent);
|
|
6835
|
+
app.provide('forgotEndpoint',forgotEndpoint);
|
|
6795
6836
|
window.swalPosition = swalPosition;
|
|
6796
6837
|
if(options.router) {
|
|
6797
6838
|
options.router.addRoute({
|