@iankibetsh/shframework 1.2.8 → 1.2.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.
@@ -1,36 +1,4 @@
1
1
 
2
- .colored-toast.swal2-icon-success {
3
- background-color: #a5dc86 !important;
4
- }
5
-
6
- .colored-toast.swal2-icon-error {
7
- background-color: #f27474 !important;
8
- }
9
-
10
- .colored-toast.swal2-icon-warning {
11
- background-color: #f8bb86 !important;
12
- }
13
-
14
- .colored-toast.swal2-icon-info {
15
- background-color: #3fc3ee !important;
16
- }
17
-
18
- .colored-toast.swal2-icon-question {
19
- background-color: #87adbd !important;
20
- }
21
-
22
- .colored-toast .swal2-title {
23
- color: white;
24
- }
25
-
26
- .colored-toast .swal2-close {
27
- color: white;
28
- }
29
-
30
- .colored-toast .swal2-html-container {
31
- color: white;
32
- }
33
-
34
2
  .sh-phone{
35
3
  display: flex;
36
4
  width: 100%;
@@ -63,19 +31,36 @@
63
31
  opacity: 0.5;
64
32
  }
65
33
 
66
- .sh-selected-item{
67
- line-height: unset!important;
34
+ .colored-toast.swal2-icon-success {
35
+ background-color: #a5dc86 !important;
68
36
  }
69
- .sh-suggestion-input{
70
- padding: 0.375rem 0.75rem;
37
+
38
+ .colored-toast.swal2-icon-error {
39
+ background-color: #f27474 !important;
71
40
  }
72
- .sh-suggest{
73
- margin-bottom: 1rem;
41
+
42
+ .colored-toast.swal2-icon-warning {
43
+ background-color: #f8bb86 !important;
74
44
  }
75
- .sh-suggest-control::after{
76
- margin-top: auto;
77
- margin-bottom: auto;
78
- margin-right: 0.255em;
45
+
46
+ .colored-toast.swal2-icon-info {
47
+ background-color: #3fc3ee !important;
48
+ }
49
+
50
+ .colored-toast.swal2-icon-question {
51
+ background-color: #87adbd !important;
52
+ }
53
+
54
+ .colored-toast .swal2-title {
55
+ color: white;
56
+ }
57
+
58
+ .colored-toast .swal2-close {
59
+ color: white;
60
+ }
61
+
62
+ .colored-toast .swal2-html-container {
63
+ color: white;
79
64
  }
80
65
 
81
66
  :root {
@@ -99,6 +84,21 @@
99
84
  }
100
85
  }
101
86
 
87
+ .sh-selected-item{
88
+ line-height: unset!important;
89
+ }
90
+ .sh-suggestion-input{
91
+ padding: 0.375rem 0.75rem;
92
+ }
93
+ .sh-suggest{
94
+ margin-bottom: 1rem;
95
+ }
96
+ .sh-suggest-control::after{
97
+ margin-top: auto;
98
+ margin-bottom: auto;
99
+ margin-right: 0.255em;
100
+ }
101
+
102
102
  .sh-forgot-link, .sh-register-link{
103
103
  cursor: pointer;
104
104
  }
package/dist/library.js CHANGED
@@ -8,6 +8,7 @@ var Swal = require('sweetalert2');
8
8
  var NProgress = require('nprogress');
9
9
  var vue = require('vue');
10
10
  var Editor = require('@tinymce/tinymce-vue');
11
+ require('lodash');
11
12
  var pinia = require('pinia');
12
13
  var vueRouter = require('vue-router');
13
14
 
@@ -2827,10 +2828,48 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2827
2828
  script$e.render = render$5;
2828
2829
  script$e.__file = "src/lib/components/ShForm.vue";
2829
2830
 
2831
+ var script$d = {
2832
+ __name: 'TextInput',
2833
+ props: ['modelValue','label'],
2834
+ emits: ['update:modelValue','clearValidationErrors'],
2835
+ setup(__props, { emit }) {
2836
+
2837
+ const props = __props;
2838
+
2839
+
2840
+
2841
+ const inputModel = vue.ref(null);
2842
+
2843
+ const modelValueUpdated = (e) => {
2844
+ emit('clearValidationErrors');
2845
+ emit('update:modelValue',inputModel);
2846
+ };
2847
+ vue.onMounted(()=>{
2848
+ props.modelValue && (inputModel.value = props.modelValue);
2849
+ });
2850
+
2851
+
2852
+ return (_ctx, _cache) => {
2853
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
2854
+ type: "text",
2855
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((inputModel).value = $event)),
2856
+ onChange: modelValueUpdated,
2857
+ onKeydown: modelValueUpdated,
2858
+ onUpdated: modelValueUpdated
2859
+ }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
2860
+ [vue.vModelText, inputModel.value]
2861
+ ])
2862
+ }
2863
+ }
2864
+
2865
+ };
2866
+
2867
+ script$d.__file = "src/lib/components/form-components/TextInput.vue";
2868
+
2830
2869
  const _hoisted_1$b = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
2831
2870
  const _hoisted_2$8 = { class: "dropdown" };
2832
2871
 
2833
- var script$d = {
2872
+ var script$c = {
2834
2873
  __name: 'ShDropDownForm',
2835
2874
  props: ['action',
2836
2875
  'classes',
@@ -2886,9 +2925,9 @@ return (_ctx, _cache) => {
2886
2925
 
2887
2926
  };
2888
2927
 
2889
- script$d.__file = "src/lib/components/ShDropDownForm.vue";
2928
+ script$c.__file = "src/lib/components/ShDropDownForm.vue";
2890
2929
 
2891
- var script$c = {
2930
+ var script$b = {
2892
2931
  name: 'ShModal',
2893
2932
  props: ['modalTitle', 'modalId', 'modalSize'],
2894
2933
  components: {
@@ -2931,12 +2970,12 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2931
2970
  ], 8 /* PROPS */, _hoisted_1$a))
2932
2971
  }
2933
2972
 
2934
- script$c.render = render$4;
2935
- script$c.__file = "src/lib/components/ShModal.vue";
2973
+ script$b.render = render$4;
2974
+ script$b.__file = "src/lib/components/ShModal.vue";
2936
2975
 
2937
2976
  const _hoisted_1$9 = ["href"];
2938
2977
 
2939
- var script$b = {
2978
+ var script$a = {
2940
2979
  __name: 'ShModalForm',
2941
2980
  props: ['action',
2942
2981
  'classes',
@@ -2976,7 +3015,7 @@ return (_ctx, _cache) => {
2976
3015
  }, [
2977
3016
  vue.renderSlot(_ctx.$slots, "default")
2978
3017
  ], 10 /* CLASS, PROPS */, _hoisted_1$9),
2979
- vue.createVNode(script$c, {
3018
+ vue.createVNode(script$b, {
2980
3019
  "modal-id": modalId,
2981
3020
  "modal-title": __props.modalTitle
2982
3021
  }, {
@@ -2991,9 +3030,9 @@ return (_ctx, _cache) => {
2991
3030
 
2992
3031
  };
2993
3032
 
2994
- script$b.__file = "src/lib/components/ShModalForm.vue";
3033
+ script$a.__file = "src/lib/components/ShModalForm.vue";
2995
3034
 
2996
- var script$a = {
3035
+ var script$9 = {
2997
3036
  name: 'ShCanvas',
2998
3037
  props: ['canvasTitle', 'canvasId', 'position','canvasSize'],
2999
3038
  components: {
@@ -3043,10 +3082,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3043
3082
  ], 10 /* CLASS, PROPS */, _hoisted_1$8))
3044
3083
  }
3045
3084
 
3046
- script$a.render = render$3;
3047
- script$a.__file = "src/lib/components/ShCanvas.vue";
3085
+ script$9.render = render$3;
3086
+ script$9.__file = "src/lib/components/ShCanvas.vue";
3048
3087
 
3049
- var script$9 = {
3088
+ var script$8 = {
3050
3089
  name: 'Pagination',
3051
3090
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
3052
3091
  data () {
@@ -3235,8 +3274,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3235
3274
  ]))
3236
3275
  }
3237
3276
 
3238
- script$9.render = render$2;
3239
- script$9.__file = "src/lib/components/list_templates/Pagination.vue";
3277
+ script$8.render = render$2;
3278
+ script$8.__file = "src/lib/components/list_templates/Pagination.vue";
3240
3279
 
3241
3280
  const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("span", {
3242
3281
  class: "spinner-border spinner-border-sm me-1",
@@ -3245,7 +3284,7 @@ const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("span", {
3245
3284
  }, null, -1 /* HOISTED */);
3246
3285
 
3247
3286
 
3248
- var script$8 = {
3287
+ var script$7 = {
3249
3288
  __name: 'ShConfirmAction',
3250
3289
  props: {
3251
3290
  data: Object,
@@ -3331,7 +3370,7 @@ return (_ctx, _cache) => {
3331
3370
 
3332
3371
  };
3333
3372
 
3334
- script$8.__file = "src/lib/components/ShConfirmAction.vue";
3373
+ script$7.__file = "src/lib/components/ShConfirmAction.vue";
3335
3374
 
3336
3375
  const _hoisted_1$5 = /*#__PURE__*/vue.createElementVNode("span", {
3337
3376
  class: "spinner-border spinner-border-sm me-1",
@@ -3339,7 +3378,7 @@ const _hoisted_1$5 = /*#__PURE__*/vue.createElementVNode("span", {
3339
3378
  "aria-hidden": "true"
3340
3379
  }, null, -1 /* HOISTED */);
3341
3380
 
3342
- var script$7 = {
3381
+ var script$6 = {
3343
3382
  __name: 'ShSilentAction',
3344
3383
  props: {
3345
3384
  data: Object,
@@ -3427,9 +3466,9 @@ return (_ctx, _cache) => {
3427
3466
 
3428
3467
  };
3429
3468
 
3430
- script$7.__file = "src/lib/components/ShSilentAction.vue";
3469
+ script$6.__file = "src/lib/components/ShSilentAction.vue";
3431
3470
 
3432
- var script$6 = {
3471
+ var script$5 = {
3433
3472
  name: 'sh-table',
3434
3473
  props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds'],
3435
3474
  inject: ['channel'],
@@ -3661,10 +3700,10 @@ var script$6 = {
3661
3700
  this.reloadData();
3662
3701
  },
3663
3702
  components: {
3664
- ShSilentAction: script$7,
3665
- ShConfirmAction: script$8,
3666
- ShCanvas: script$a,
3667
- pagination: script$9
3703
+ ShSilentAction: script$6,
3704
+ ShConfirmAction: script$7,
3705
+ ShCanvas: script$9,
3706
+ pagination: script$8
3668
3707
  },
3669
3708
  computed: {
3670
3709
  windowWidth: function () {
@@ -4294,10 +4333,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4294
4333
  ]))
4295
4334
  }
4296
4335
 
4297
- script$6.render = render$1;
4298
- script$6.__file = "src/lib/components/ShTable.vue";
4336
+ script$5.render = render$1;
4337
+ script$5.__file = "src/lib/components/ShTable.vue";
4299
4338
 
4300
- var script$5 = {
4339
+ var script$4 = {
4301
4340
  name: 'ShTabs',
4302
4341
  props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive','classOne','classTwo','classes'],
4303
4342
  data () {
@@ -4418,8 +4457,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4418
4457
  ], 64 /* STABLE_FRAGMENT */))
4419
4458
  }
4420
4459
 
4421
- script$5.render = render;
4422
- script$5.__file = "src/lib/components/ShTabs.vue";
4460
+ script$4.render = render;
4461
+ script$4.__file = "src/lib/components/ShTabs.vue";
4423
4462
 
4424
4463
  const _hoisted_1$3 = {
4425
4464
  class: "nav nav-tabs",
@@ -4434,7 +4473,7 @@ const _hoisted_4$3 = /*#__PURE__*/vue.createElementVNode("i", { class: "d-none"
4434
4473
  const _hoisted_5$3 = { class: "sh_tab_count" };
4435
4474
  const _hoisted_6$2 = { class: "tab-content" };
4436
4475
 
4437
- var script$4 = {
4476
+ var script$3 = {
4438
4477
  __name: 'ShDynamicTabs',
4439
4478
  props: ['tabs','data'],
4440
4479
  setup(__props) {
@@ -4488,7 +4527,7 @@ return (_ctx, _cache) => {
4488
4527
 
4489
4528
  };
4490
4529
 
4491
- script$4.__file = "src/lib/components/ShDynamicTabs.vue";
4530
+ script$3.__file = "src/lib/components/ShDynamicTabs.vue";
4492
4531
 
4493
4532
  const useUserStore = pinia.defineStore('user-store', {
4494
4533
  state: () => ({
@@ -4598,7 +4637,7 @@ const _hoisted_4$2 = {
4598
4637
  const _hoisted_5$2 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
4599
4638
 
4600
4639
 
4601
- var script$3 = {
4640
+ var script$2 = {
4602
4641
  __name: 'Departments',
4603
4642
  setup(__props) {
4604
4643
 
@@ -4628,7 +4667,7 @@ return (_ctx, _cache) => {
4628
4667
  _hoisted_5$2,
4629
4668
  vue.createTextVNode(" ADD DEPARTMENT")
4630
4669
  ], 512 /* NEED_PATCH */),
4631
- vue.createVNode(script$6, {
4670
+ vue.createVNode(script$5, {
4632
4671
  headers: ['id','name','description', 'created_at'],
4633
4672
  "end-point": "admin/departments/list",
4634
4673
  actions: {
@@ -4642,7 +4681,7 @@ return (_ctx, _cache) => {
4642
4681
  ]
4643
4682
  }
4644
4683
  }),
4645
- vue.createVNode(script$c, {
4684
+ vue.createVNode(script$b, {
4646
4685
  "modal-id": "sh-department_modal",
4647
4686
  "modal-title": "Department Form"
4648
4687
  }, {
@@ -4664,7 +4703,7 @@ return (_ctx, _cache) => {
4664
4703
 
4665
4704
  };
4666
4705
 
4667
- script$3.__file = "src/lib/components/core/Departments/Departments.vue";
4706
+ script$2.__file = "src/lib/components/core/Departments/Departments.vue";
4668
4707
 
4669
4708
  const _hoisted_1$1 = {
4670
4709
  key: 0,
@@ -4683,7 +4722,7 @@ const _hoisted_4$1 = { class: "text-primary text-capitalize" };
4683
4722
  const _hoisted_5$1 = ["value"];
4684
4723
  const _hoisted_6$1 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
4685
4724
 
4686
- var script$2 = {
4725
+ var script$1 = {
4687
4726
  __name: 'Department',
4688
4727
  setup(__props) {
4689
4728
 
@@ -4781,7 +4820,7 @@ return (_ctx, _cache) => {
4781
4820
  vue.createElementVNode("div", _hoisted_2$1, [
4782
4821
  _hoisted_3$1,
4783
4822
  vue.createElementVNode("h5", null, "Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */),
4784
- vue.createVNode(script$6, {
4823
+ vue.createVNode(script$5, {
4785
4824
  actions: {
4786
4825
  label: 'Actions',
4787
4826
  actions: [
@@ -4801,7 +4840,7 @@ return (_ctx, _cache) => {
4801
4840
  headers: ['id',showModule,'created_at'],
4802
4841
  "end-point": 'admin/departments/department/list-modules/' + id.value
4803
4842
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
4804
- vue.createVNode(script$c, {
4843
+ vue.createVNode(script$b, {
4805
4844
  "modal-id": "addModule",
4806
4845
  "modal-title": "Add Module Department"
4807
4846
  }, {
@@ -4828,7 +4867,7 @@ return (_ctx, _cache) => {
4828
4867
  ref: permissionCanvasBtn,
4829
4868
  "data-bs-toggle": "offcanvas"
4830
4869
  }, null, 512 /* NEED_PATCH */),
4831
- vue.createVNode(script$a, {
4870
+ vue.createVNode(script$9, {
4832
4871
  "canvas-id": "permissionsCanvas",
4833
4872
  position: "end enlarged",
4834
4873
  "canvas-title": "Module Permissions"
@@ -4876,7 +4915,7 @@ return (_ctx, _cache) => {
4876
4915
 
4877
4916
  };
4878
4917
 
4879
- script$2.__file = "src/lib/components/core/Departments/department/Department.vue";
4918
+ script$1.__file = "src/lib/components/core/Departments/department/Department.vue";
4880
4919
 
4881
4920
  const _withScopeId = n => (vue.pushScopeId("data-v-2911509a"),n=n(),vue.popScopeId(),n);
4882
4921
  const _hoisted_1 = {
@@ -4904,7 +4943,7 @@ const _hoisted_8 = {
4904
4943
  };
4905
4944
  const _hoisted_9 = { class: "sh-auth-footer" };
4906
4945
 
4907
- var script$1 = {
4946
+ var script = {
4908
4947
  __name: 'ShAuth',
4909
4948
  setup(__props) {
4910
4949
 
@@ -4989,46 +5028,8 @@ return (_ctx, _cache) => {
4989
5028
 
4990
5029
  };
4991
5030
 
4992
- script$1.__scopeId = "data-v-2911509a";
4993
- script$1.__file = "src/lib/components/core/auth/ShAuth.vue";
4994
-
4995
- var script = {
4996
- __name: 'TextInput',
4997
- props: ['modelValue','label'],
4998
- emits: ['update:modelValue','clearValidationErrors'],
4999
- setup(__props, { emit }) {
5000
-
5001
- const props = __props;
5002
-
5003
-
5004
-
5005
- const inputModel = vue.ref(null);
5006
-
5007
- const modelValueUpdated = (e) => {
5008
- emit('clearValidationErrors');
5009
- emit('update:modelValue',inputModel);
5010
- };
5011
- vue.onMounted(()=>{
5012
- props.modelValue && (inputModel.value = props.modelValue);
5013
- });
5014
-
5015
-
5016
- return (_ctx, _cache) => {
5017
- return vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
5018
- type: "text",
5019
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((inputModel).value = $event)),
5020
- onChange: modelValueUpdated,
5021
- onKeydown: modelValueUpdated,
5022
- onUpdated: modelValueUpdated
5023
- }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
5024
- [vue.vModelText, inputModel.value]
5025
- ])
5026
- }
5027
- }
5028
-
5029
- };
5030
-
5031
- script.__file = "src/lib/components/form-components/TextInput.vue";
5031
+ script.__scopeId = "data-v-2911509a";
5032
+ script.__file = "src/lib/components/core/auth/ShAuth.vue";
5032
5033
 
5033
5034
  const ShFrontend = {
5034
5035
  install: (app, options) => {
@@ -5052,12 +5053,12 @@ const ShFrontend = {
5052
5053
  const registerTitle = options.registerTitle ?? 'Create a new account';
5053
5054
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
5054
5055
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
5055
- options.formTextInput ?? script;
5056
+ options.formTextInput ?? script$d;
5056
5057
  const loginUrl = options.loginUrl ?? `/login`;
5057
5058
  const redirectLogin = options.redirectLogin ?? `/`;
5058
5059
  const redirectRegister = options.redirectRegister ?? `/`;
5059
5060
  const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
5060
- const AuthComponent = options.authComponent ?? script$1;
5061
+ const AuthComponent = options.authComponent ?? script;
5061
5062
  app.provide('loginEndpoint',loginEndpoint);
5062
5063
  app.provide('registerEndpoint', registerEndpoint);
5063
5064
  app.provide('registrationFields', registrationFields);
@@ -5077,11 +5078,11 @@ const ShFrontend = {
5077
5078
  });
5078
5079
  options.router.addRoute({
5079
5080
  path: '/sh-departments',
5080
- component: script$3
5081
+ component: script$2
5081
5082
  });
5082
5083
  options.router.addRoute({
5083
5084
  path: '/sh-departments/permissions/:id',
5084
- component: script$2
5085
+ component: script$1
5085
5086
  });
5086
5087
  }
5087
5088
  //filter unwanted config items from options to be put in local storage
@@ -5093,18 +5094,18 @@ const ShFrontend = {
5093
5094
  }
5094
5095
  };
5095
5096
 
5096
- exports.ShCanvas = script$a;
5097
- exports.ShConfirmAction = script$8;
5098
- exports.ShDropDownForm = script$d;
5099
- exports.ShDynamicTabs = script$4;
5097
+ exports.ShCanvas = script$9;
5098
+ exports.ShConfirmAction = script$7;
5099
+ exports.ShDropDownForm = script$c;
5100
+ exports.ShDynamicTabs = script$3;
5100
5101
  exports.ShForm = script$e;
5101
5102
  exports.ShFrontend = ShFrontend;
5102
- exports.ShModal = script$c;
5103
- exports.ShModalForm = script$b;
5103
+ exports.ShModal = script$b;
5104
+ exports.ShModalForm = script$a;
5104
5105
  exports.ShPhone = script$h;
5105
- exports.ShSilentAction = script$7;
5106
- exports.ShTable = script$6;
5107
- exports.ShTabs = script$5;
5106
+ exports.ShSilentAction = script$6;
5107
+ exports.ShTable = script$5;
5108
+ exports.ShTabs = script$4;
5108
5109
  exports.shApis = shApis;
5109
5110
  exports.shRepo = shRepo;
5110
5111
  exports.shStorage = ShStorage;
package/dist/library.mjs CHANGED
@@ -4,6 +4,7 @@ import Swal from 'sweetalert2';
4
4
  import NProgress from 'nprogress';
5
5
  import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, resolveDynamicComponent, renderSlot, normalizeProps, guardReactiveProps, withCtx, mergeProps, createStaticVNode, shallowRef, computed, isRef, vModelCheckbox, inject, watch, pushScopeId, popScopeId } from 'vue';
6
6
  import Editor from '@tinymce/tinymce-vue';
7
+ import 'lodash';
7
8
  import { defineStore, storeToRefs } from 'pinia';
8
9
  import { useRoute, useRouter } from 'vue-router';
9
10
 
@@ -2815,10 +2816,48 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2815
2816
  script$e.render = render$5;
2816
2817
  script$e.__file = "src/lib/components/ShForm.vue";
2817
2818
 
2819
+ var script$d = {
2820
+ __name: 'TextInput',
2821
+ props: ['modelValue','label'],
2822
+ emits: ['update:modelValue','clearValidationErrors'],
2823
+ setup(__props, { emit }) {
2824
+
2825
+ const props = __props;
2826
+
2827
+
2828
+
2829
+ const inputModel = ref(null);
2830
+
2831
+ const modelValueUpdated = (e) => {
2832
+ emit('clearValidationErrors');
2833
+ emit('update:modelValue',inputModel);
2834
+ };
2835
+ onMounted(()=>{
2836
+ props.modelValue && (inputModel.value = props.modelValue);
2837
+ });
2838
+
2839
+
2840
+ return (_ctx, _cache) => {
2841
+ return withDirectives((openBlock(), createElementBlock("input", {
2842
+ type: "text",
2843
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((inputModel).value = $event)),
2844
+ onChange: modelValueUpdated,
2845
+ onKeydown: modelValueUpdated,
2846
+ onUpdated: modelValueUpdated
2847
+ }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
2848
+ [vModelText, inputModel.value]
2849
+ ])
2850
+ }
2851
+ }
2852
+
2853
+ };
2854
+
2855
+ script$d.__file = "src/lib/components/form-components/TextInput.vue";
2856
+
2818
2857
  const _hoisted_1$b = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
2819
2858
  const _hoisted_2$8 = { class: "dropdown" };
2820
2859
 
2821
- var script$d = {
2860
+ var script$c = {
2822
2861
  __name: 'ShDropDownForm',
2823
2862
  props: ['action',
2824
2863
  'classes',
@@ -2874,9 +2913,9 @@ return (_ctx, _cache) => {
2874
2913
 
2875
2914
  };
2876
2915
 
2877
- script$d.__file = "src/lib/components/ShDropDownForm.vue";
2916
+ script$c.__file = "src/lib/components/ShDropDownForm.vue";
2878
2917
 
2879
- var script$c = {
2918
+ var script$b = {
2880
2919
  name: 'ShModal',
2881
2920
  props: ['modalTitle', 'modalId', 'modalSize'],
2882
2921
  components: {
@@ -2919,12 +2958,12 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2919
2958
  ], 8 /* PROPS */, _hoisted_1$a))
2920
2959
  }
2921
2960
 
2922
- script$c.render = render$4;
2923
- script$c.__file = "src/lib/components/ShModal.vue";
2961
+ script$b.render = render$4;
2962
+ script$b.__file = "src/lib/components/ShModal.vue";
2924
2963
 
2925
2964
  const _hoisted_1$9 = ["href"];
2926
2965
 
2927
- var script$b = {
2966
+ var script$a = {
2928
2967
  __name: 'ShModalForm',
2929
2968
  props: ['action',
2930
2969
  'classes',
@@ -2964,7 +3003,7 @@ return (_ctx, _cache) => {
2964
3003
  }, [
2965
3004
  renderSlot(_ctx.$slots, "default")
2966
3005
  ], 10 /* CLASS, PROPS */, _hoisted_1$9),
2967
- createVNode(script$c, {
3006
+ createVNode(script$b, {
2968
3007
  "modal-id": modalId,
2969
3008
  "modal-title": __props.modalTitle
2970
3009
  }, {
@@ -2979,9 +3018,9 @@ return (_ctx, _cache) => {
2979
3018
 
2980
3019
  };
2981
3020
 
2982
- script$b.__file = "src/lib/components/ShModalForm.vue";
3021
+ script$a.__file = "src/lib/components/ShModalForm.vue";
2983
3022
 
2984
- var script$a = {
3023
+ var script$9 = {
2985
3024
  name: 'ShCanvas',
2986
3025
  props: ['canvasTitle', 'canvasId', 'position','canvasSize'],
2987
3026
  components: {
@@ -3031,10 +3070,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3031
3070
  ], 10 /* CLASS, PROPS */, _hoisted_1$8))
3032
3071
  }
3033
3072
 
3034
- script$a.render = render$3;
3035
- script$a.__file = "src/lib/components/ShCanvas.vue";
3073
+ script$9.render = render$3;
3074
+ script$9.__file = "src/lib/components/ShCanvas.vue";
3036
3075
 
3037
- var script$9 = {
3076
+ var script$8 = {
3038
3077
  name: 'Pagination',
3039
3078
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
3040
3079
  data () {
@@ -3223,8 +3262,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3223
3262
  ]))
3224
3263
  }
3225
3264
 
3226
- script$9.render = render$2;
3227
- script$9.__file = "src/lib/components/list_templates/Pagination.vue";
3265
+ script$8.render = render$2;
3266
+ script$8.__file = "src/lib/components/list_templates/Pagination.vue";
3228
3267
 
3229
3268
  const _hoisted_1$6 = /*#__PURE__*/createElementVNode("span", {
3230
3269
  class: "spinner-border spinner-border-sm me-1",
@@ -3233,7 +3272,7 @@ const _hoisted_1$6 = /*#__PURE__*/createElementVNode("span", {
3233
3272
  }, null, -1 /* HOISTED */);
3234
3273
 
3235
3274
 
3236
- var script$8 = {
3275
+ var script$7 = {
3237
3276
  __name: 'ShConfirmAction',
3238
3277
  props: {
3239
3278
  data: Object,
@@ -3319,7 +3358,7 @@ return (_ctx, _cache) => {
3319
3358
 
3320
3359
  };
3321
3360
 
3322
- script$8.__file = "src/lib/components/ShConfirmAction.vue";
3361
+ script$7.__file = "src/lib/components/ShConfirmAction.vue";
3323
3362
 
3324
3363
  const _hoisted_1$5 = /*#__PURE__*/createElementVNode("span", {
3325
3364
  class: "spinner-border spinner-border-sm me-1",
@@ -3327,7 +3366,7 @@ const _hoisted_1$5 = /*#__PURE__*/createElementVNode("span", {
3327
3366
  "aria-hidden": "true"
3328
3367
  }, null, -1 /* HOISTED */);
3329
3368
 
3330
- var script$7 = {
3369
+ var script$6 = {
3331
3370
  __name: 'ShSilentAction',
3332
3371
  props: {
3333
3372
  data: Object,
@@ -3415,9 +3454,9 @@ return (_ctx, _cache) => {
3415
3454
 
3416
3455
  };
3417
3456
 
3418
- script$7.__file = "src/lib/components/ShSilentAction.vue";
3457
+ script$6.__file = "src/lib/components/ShSilentAction.vue";
3419
3458
 
3420
- var script$6 = {
3459
+ var script$5 = {
3421
3460
  name: 'sh-table',
3422
3461
  props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds'],
3423
3462
  inject: ['channel'],
@@ -3649,10 +3688,10 @@ var script$6 = {
3649
3688
  this.reloadData();
3650
3689
  },
3651
3690
  components: {
3652
- ShSilentAction: script$7,
3653
- ShConfirmAction: script$8,
3654
- ShCanvas: script$a,
3655
- pagination: script$9
3691
+ ShSilentAction: script$6,
3692
+ ShConfirmAction: script$7,
3693
+ ShCanvas: script$9,
3694
+ pagination: script$8
3656
3695
  },
3657
3696
  computed: {
3658
3697
  windowWidth: function () {
@@ -4282,10 +4321,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4282
4321
  ]))
4283
4322
  }
4284
4323
 
4285
- script$6.render = render$1;
4286
- script$6.__file = "src/lib/components/ShTable.vue";
4324
+ script$5.render = render$1;
4325
+ script$5.__file = "src/lib/components/ShTable.vue";
4287
4326
 
4288
- var script$5 = {
4327
+ var script$4 = {
4289
4328
  name: 'ShTabs',
4290
4329
  props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive','classOne','classTwo','classes'],
4291
4330
  data () {
@@ -4406,8 +4445,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4406
4445
  ], 64 /* STABLE_FRAGMENT */))
4407
4446
  }
4408
4447
 
4409
- script$5.render = render;
4410
- script$5.__file = "src/lib/components/ShTabs.vue";
4448
+ script$4.render = render;
4449
+ script$4.__file = "src/lib/components/ShTabs.vue";
4411
4450
 
4412
4451
  const _hoisted_1$3 = {
4413
4452
  class: "nav nav-tabs",
@@ -4422,7 +4461,7 @@ const _hoisted_4$3 = /*#__PURE__*/createElementVNode("i", { class: "d-none" }, n
4422
4461
  const _hoisted_5$3 = { class: "sh_tab_count" };
4423
4462
  const _hoisted_6$2 = { class: "tab-content" };
4424
4463
 
4425
- var script$4 = {
4464
+ var script$3 = {
4426
4465
  __name: 'ShDynamicTabs',
4427
4466
  props: ['tabs','data'],
4428
4467
  setup(__props) {
@@ -4476,7 +4515,7 @@ return (_ctx, _cache) => {
4476
4515
 
4477
4516
  };
4478
4517
 
4479
- script$4.__file = "src/lib/components/ShDynamicTabs.vue";
4518
+ script$3.__file = "src/lib/components/ShDynamicTabs.vue";
4480
4519
 
4481
4520
  const useUserStore = defineStore('user-store', {
4482
4521
  state: () => ({
@@ -4586,7 +4625,7 @@ const _hoisted_4$2 = {
4586
4625
  const _hoisted_5$2 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
4587
4626
 
4588
4627
 
4589
- var script$3 = {
4628
+ var script$2 = {
4590
4629
  __name: 'Departments',
4591
4630
  setup(__props) {
4592
4631
 
@@ -4616,7 +4655,7 @@ return (_ctx, _cache) => {
4616
4655
  _hoisted_5$2,
4617
4656
  createTextVNode(" ADD DEPARTMENT")
4618
4657
  ], 512 /* NEED_PATCH */),
4619
- createVNode(script$6, {
4658
+ createVNode(script$5, {
4620
4659
  headers: ['id','name','description', 'created_at'],
4621
4660
  "end-point": "admin/departments/list",
4622
4661
  actions: {
@@ -4630,7 +4669,7 @@ return (_ctx, _cache) => {
4630
4669
  ]
4631
4670
  }
4632
4671
  }),
4633
- createVNode(script$c, {
4672
+ createVNode(script$b, {
4634
4673
  "modal-id": "sh-department_modal",
4635
4674
  "modal-title": "Department Form"
4636
4675
  }, {
@@ -4652,7 +4691,7 @@ return (_ctx, _cache) => {
4652
4691
 
4653
4692
  };
4654
4693
 
4655
- script$3.__file = "src/lib/components/core/Departments/Departments.vue";
4694
+ script$2.__file = "src/lib/components/core/Departments/Departments.vue";
4656
4695
 
4657
4696
  const _hoisted_1$1 = {
4658
4697
  key: 0,
@@ -4671,7 +4710,7 @@ const _hoisted_4$1 = { class: "text-primary text-capitalize" };
4671
4710
  const _hoisted_5$1 = ["value"];
4672
4711
  const _hoisted_6$1 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
4673
4712
 
4674
- var script$2 = {
4713
+ var script$1 = {
4675
4714
  __name: 'Department',
4676
4715
  setup(__props) {
4677
4716
 
@@ -4769,7 +4808,7 @@ return (_ctx, _cache) => {
4769
4808
  createElementVNode("div", _hoisted_2$1, [
4770
4809
  _hoisted_3$1,
4771
4810
  createElementVNode("h5", null, "Department #" + toDisplayString(unref(department).id) + " - " + toDisplayString(unref(department).name) + " Allowed Modules", 1 /* TEXT */),
4772
- createVNode(script$6, {
4811
+ createVNode(script$5, {
4773
4812
  actions: {
4774
4813
  label: 'Actions',
4775
4814
  actions: [
@@ -4789,7 +4828,7 @@ return (_ctx, _cache) => {
4789
4828
  headers: ['id',showModule,'created_at'],
4790
4829
  "end-point": 'admin/departments/department/list-modules/' + id.value
4791
4830
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
4792
- createVNode(script$c, {
4831
+ createVNode(script$b, {
4793
4832
  "modal-id": "addModule",
4794
4833
  "modal-title": "Add Module Department"
4795
4834
  }, {
@@ -4816,7 +4855,7 @@ return (_ctx, _cache) => {
4816
4855
  ref: permissionCanvasBtn,
4817
4856
  "data-bs-toggle": "offcanvas"
4818
4857
  }, null, 512 /* NEED_PATCH */),
4819
- createVNode(script$a, {
4858
+ createVNode(script$9, {
4820
4859
  "canvas-id": "permissionsCanvas",
4821
4860
  position: "end enlarged",
4822
4861
  "canvas-title": "Module Permissions"
@@ -4864,7 +4903,7 @@ return (_ctx, _cache) => {
4864
4903
 
4865
4904
  };
4866
4905
 
4867
- script$2.__file = "src/lib/components/core/Departments/department/Department.vue";
4906
+ script$1.__file = "src/lib/components/core/Departments/department/Department.vue";
4868
4907
 
4869
4908
  const _withScopeId = n => (pushScopeId("data-v-2911509a"),n=n(),popScopeId(),n);
4870
4909
  const _hoisted_1 = {
@@ -4892,7 +4931,7 @@ const _hoisted_8 = {
4892
4931
  };
4893
4932
  const _hoisted_9 = { class: "sh-auth-footer" };
4894
4933
 
4895
- var script$1 = {
4934
+ var script = {
4896
4935
  __name: 'ShAuth',
4897
4936
  setup(__props) {
4898
4937
 
@@ -4977,46 +5016,8 @@ return (_ctx, _cache) => {
4977
5016
 
4978
5017
  };
4979
5018
 
4980
- script$1.__scopeId = "data-v-2911509a";
4981
- script$1.__file = "src/lib/components/core/auth/ShAuth.vue";
4982
-
4983
- var script = {
4984
- __name: 'TextInput',
4985
- props: ['modelValue','label'],
4986
- emits: ['update:modelValue','clearValidationErrors'],
4987
- setup(__props, { emit }) {
4988
-
4989
- const props = __props;
4990
-
4991
-
4992
-
4993
- const inputModel = ref(null);
4994
-
4995
- const modelValueUpdated = (e) => {
4996
- emit('clearValidationErrors');
4997
- emit('update:modelValue',inputModel);
4998
- };
4999
- onMounted(()=>{
5000
- props.modelValue && (inputModel.value = props.modelValue);
5001
- });
5002
-
5003
-
5004
- return (_ctx, _cache) => {
5005
- return withDirectives((openBlock(), createElementBlock("input", {
5006
- type: "text",
5007
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((inputModel).value = $event)),
5008
- onChange: modelValueUpdated,
5009
- onKeydown: modelValueUpdated,
5010
- onUpdated: modelValueUpdated
5011
- }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
5012
- [vModelText, inputModel.value]
5013
- ])
5014
- }
5015
- }
5016
-
5017
- };
5018
-
5019
- script.__file = "src/lib/components/form-components/TextInput.vue";
5019
+ script.__scopeId = "data-v-2911509a";
5020
+ script.__file = "src/lib/components/core/auth/ShAuth.vue";
5020
5021
 
5021
5022
  const ShFrontend = {
5022
5023
  install: (app, options) => {
@@ -5040,12 +5041,12 @@ const ShFrontend = {
5040
5041
  const registerTitle = options.registerTitle ?? 'Create a new account';
5041
5042
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
5042
5043
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
5043
- options.formTextInput ?? script;
5044
+ options.formTextInput ?? script$d;
5044
5045
  const loginUrl = options.loginUrl ?? `/login`;
5045
5046
  const redirectLogin = options.redirectLogin ?? `/`;
5046
5047
  const redirectRegister = options.redirectRegister ?? `/`;
5047
5048
  const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
5048
- const AuthComponent = options.authComponent ?? script$1;
5049
+ const AuthComponent = options.authComponent ?? script;
5049
5050
  app.provide('loginEndpoint',loginEndpoint);
5050
5051
  app.provide('registerEndpoint', registerEndpoint);
5051
5052
  app.provide('registrationFields', registrationFields);
@@ -5065,11 +5066,11 @@ const ShFrontend = {
5065
5066
  });
5066
5067
  options.router.addRoute({
5067
5068
  path: '/sh-departments',
5068
- component: script$3
5069
+ component: script$2
5069
5070
  });
5070
5071
  options.router.addRoute({
5071
5072
  path: '/sh-departments/permissions/:id',
5072
- component: script$2
5073
+ component: script$1
5073
5074
  });
5074
5075
  }
5075
5076
  //filter unwanted config items from options to be put in local storage
@@ -5081,4 +5082,4 @@ const ShFrontend = {
5081
5082
  }
5082
5083
  };
5083
5084
 
5084
- export { script$a as ShCanvas, script$8 as ShConfirmAction, script$d as ShDropDownForm, script$4 as ShDynamicTabs, script$e as ShForm, ShFrontend, script$c as ShModal, script$b as ShModalForm, script$h as ShPhone, script$7 as ShSilentAction, script$6 as ShTable, script$5 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
5085
+ export { script$9 as ShCanvas, script$7 as ShConfirmAction, script$c as ShDropDownForm, script$3 as ShDynamicTabs, script$e as ShForm, ShFrontend, script$b as ShModal, script$a as ShModalForm, script$h as ShPhone, script$6 as ShSilentAction, script$5 as ShTable, script$4 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",