@iankibetsh/shframework 4.4.9 → 4.5.1
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 +8 -7
- package/dist/library.mjs +8 -7
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -3238,7 +3238,7 @@ var script$m = {
|
|
|
3238
3238
|
'phones', 'numbers', 'selects', 'dates', 'gqlMutation',
|
|
3239
3239
|
'required'
|
|
3240
3240
|
],
|
|
3241
|
-
emits: ['success', 'fieldChanged', 'formSubmitted', 'formError'],
|
|
3241
|
+
emits: ['success','preSubmit', 'fieldChanged', 'formSubmitted', 'formError'],
|
|
3242
3242
|
setup(__props, { emit: __emit }) {
|
|
3243
3243
|
|
|
3244
3244
|
const props = __props;
|
|
@@ -3357,6 +3357,7 @@ const submitForm = e => {
|
|
|
3357
3357
|
if (args == '()') {
|
|
3358
3358
|
args = '';
|
|
3359
3359
|
}
|
|
3360
|
+
emit('preSubmit', data);
|
|
3360
3361
|
const mutation = `{\n${props.gqlMutation} ${args} {\n${selectFields.join(`\n`)}\n}\n}`;
|
|
3361
3362
|
shApis.graphQlMutate(mutation).then(res => handleSuccessRequest(res)).catch(reason => handlefailedRequest(reason));
|
|
3362
3363
|
} else {
|
|
@@ -3605,9 +3606,9 @@ return (_ctx, _cache) => {
|
|
|
3605
3606
|
script$l.__file = "src/lib/components/ShDropDownForm.vue";
|
|
3606
3607
|
|
|
3607
3608
|
const _hoisted_1$h = ["id"];
|
|
3608
|
-
const _hoisted_2$9 = { class: "modal-content" };
|
|
3609
|
+
const _hoisted_2$9 = { class: "modal-content sh-modal-content" };
|
|
3609
3610
|
const _hoisted_3$9 = { class: "modal-header" };
|
|
3610
|
-
const _hoisted_4$9 = { class: "modal-title" };
|
|
3611
|
+
const _hoisted_4$9 = { class: "modal-title flex-fill" };
|
|
3611
3612
|
const _hoisted_5$7 = /*#__PURE__*/vue.createElementVNode("button", {
|
|
3612
3613
|
class: "btn btn-danger btn-sm",
|
|
3613
3614
|
"data-bs-dismiss": "modal",
|
|
@@ -3653,12 +3654,12 @@ vue.onMounted(() => {
|
|
|
3653
3654
|
|
|
3654
3655
|
return (_ctx, _cache) => {
|
|
3655
3656
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
3656
|
-
class: "modal fade",
|
|
3657
|
+
class: "modal sh-modal fade",
|
|
3657
3658
|
id: __props.modalId,
|
|
3658
3659
|
"aria-hidden": "true"
|
|
3659
3660
|
}, [
|
|
3660
3661
|
vue.createElementVNode("div", {
|
|
3661
|
-
class: vue.normalizeClass(["modal-dialog", `modal-${__props.modalSize}`])
|
|
3662
|
+
class: vue.normalizeClass(["modal-dialog sh-modal-dialog", `modal-${__props.modalSize}`])
|
|
3662
3663
|
}, [
|
|
3663
3664
|
vue.createElementVNode("div", _hoisted_2$9, [
|
|
3664
3665
|
vue.createElementVNode("div", _hoisted_3$9, [
|
|
@@ -3931,7 +3932,7 @@ const useUserStore = pinia.defineStore('user-store', {
|
|
|
3931
3932
|
} else {
|
|
3932
3933
|
permissions = this.permissions;
|
|
3933
3934
|
}
|
|
3934
|
-
return permissions
|
|
3935
|
+
return !!permissions[slug]
|
|
3935
3936
|
}
|
|
3936
3937
|
return false
|
|
3937
3938
|
};
|
|
@@ -3957,7 +3958,7 @@ const useUserStore = pinia.defineStore('user-store', {
|
|
|
3957
3958
|
} else {
|
|
3958
3959
|
permissions = this.permissions;
|
|
3959
3960
|
}
|
|
3960
|
-
return permissions
|
|
3961
|
+
return !!permissions[slug]
|
|
3961
3962
|
}
|
|
3962
3963
|
return false
|
|
3963
3964
|
};
|
package/dist/library.mjs
CHANGED
|
@@ -3226,7 +3226,7 @@ var script$m = {
|
|
|
3226
3226
|
'phones', 'numbers', 'selects', 'dates', 'gqlMutation',
|
|
3227
3227
|
'required'
|
|
3228
3228
|
],
|
|
3229
|
-
emits: ['success', 'fieldChanged', 'formSubmitted', 'formError'],
|
|
3229
|
+
emits: ['success','preSubmit', 'fieldChanged', 'formSubmitted', 'formError'],
|
|
3230
3230
|
setup(__props, { emit: __emit }) {
|
|
3231
3231
|
|
|
3232
3232
|
const props = __props;
|
|
@@ -3345,6 +3345,7 @@ const submitForm = e => {
|
|
|
3345
3345
|
if (args == '()') {
|
|
3346
3346
|
args = '';
|
|
3347
3347
|
}
|
|
3348
|
+
emit('preSubmit', data);
|
|
3348
3349
|
const mutation = `{\n${props.gqlMutation} ${args} {\n${selectFields.join(`\n`)}\n}\n}`;
|
|
3349
3350
|
shApis.graphQlMutate(mutation).then(res => handleSuccessRequest(res)).catch(reason => handlefailedRequest(reason));
|
|
3350
3351
|
} else {
|
|
@@ -3593,9 +3594,9 @@ return (_ctx, _cache) => {
|
|
|
3593
3594
|
script$l.__file = "src/lib/components/ShDropDownForm.vue";
|
|
3594
3595
|
|
|
3595
3596
|
const _hoisted_1$h = ["id"];
|
|
3596
|
-
const _hoisted_2$9 = { class: "modal-content" };
|
|
3597
|
+
const _hoisted_2$9 = { class: "modal-content sh-modal-content" };
|
|
3597
3598
|
const _hoisted_3$9 = { class: "modal-header" };
|
|
3598
|
-
const _hoisted_4$9 = { class: "modal-title" };
|
|
3599
|
+
const _hoisted_4$9 = { class: "modal-title flex-fill" };
|
|
3599
3600
|
const _hoisted_5$7 = /*#__PURE__*/createElementVNode("button", {
|
|
3600
3601
|
class: "btn btn-danger btn-sm",
|
|
3601
3602
|
"data-bs-dismiss": "modal",
|
|
@@ -3641,12 +3642,12 @@ onMounted(() => {
|
|
|
3641
3642
|
|
|
3642
3643
|
return (_ctx, _cache) => {
|
|
3643
3644
|
return (openBlock(), createElementBlock("div", {
|
|
3644
|
-
class: "modal fade",
|
|
3645
|
+
class: "modal sh-modal fade",
|
|
3645
3646
|
id: __props.modalId,
|
|
3646
3647
|
"aria-hidden": "true"
|
|
3647
3648
|
}, [
|
|
3648
3649
|
createElementVNode("div", {
|
|
3649
|
-
class: normalizeClass(["modal-dialog", `modal-${__props.modalSize}`])
|
|
3650
|
+
class: normalizeClass(["modal-dialog sh-modal-dialog", `modal-${__props.modalSize}`])
|
|
3650
3651
|
}, [
|
|
3651
3652
|
createElementVNode("div", _hoisted_2$9, [
|
|
3652
3653
|
createElementVNode("div", _hoisted_3$9, [
|
|
@@ -3919,7 +3920,7 @@ const useUserStore = defineStore('user-store', {
|
|
|
3919
3920
|
} else {
|
|
3920
3921
|
permissions = this.permissions;
|
|
3921
3922
|
}
|
|
3922
|
-
return permissions
|
|
3923
|
+
return !!permissions[slug]
|
|
3923
3924
|
}
|
|
3924
3925
|
return false
|
|
3925
3926
|
};
|
|
@@ -3945,7 +3946,7 @@ const useUserStore = defineStore('user-store', {
|
|
|
3945
3946
|
} else {
|
|
3946
3947
|
permissions = this.permissions;
|
|
3947
3948
|
}
|
|
3948
|
-
return permissions
|
|
3949
|
+
return !!permissions[slug]
|
|
3949
3950
|
}
|
|
3950
3951
|
return false
|
|
3951
3952
|
};
|