@iankibetsh/shframework 0.8.9 → 1.0.2

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 CHANGED
@@ -1766,7 +1766,7 @@ const _hoisted_1$c = {
1766
1766
  const _hoisted_2$b = ["id"];
1767
1767
  const _hoisted_3$a = { class: "badge bg-secondary m-1 sh-selected-item" };
1768
1768
  const _hoisted_4$a = ["onClick"];
1769
- const _hoisted_5$6 = ["id"];
1769
+ const _hoisted_5$7 = ["id"];
1770
1770
  const _hoisted_6$5 = ["id", "aria-labelledby"];
1771
1771
  const _hoisted_7$4 = { key: 0 };
1772
1772
  const _hoisted_8$3 = ["onClick"];
@@ -1887,7 +1887,7 @@ return (_ctx, _cache) => {
1887
1887
  onClick: filterData,
1888
1888
  onInput: filterData,
1889
1889
  class: "flex-fill h-100 sh-suggestion-input"
1890
- }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$6)
1890
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$7)
1891
1891
  ], 8 /* PROPS */, _hoisted_2$b),
1892
1892
  vue.createElementVNode("ul", {
1893
1893
  class: "dropdown-menu w-100",
@@ -2252,7 +2252,7 @@ const _hoisted_3$9 = {
2252
2252
  role: "alert"
2253
2253
  };
2254
2254
  const _hoisted_4$9 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2255
- const _hoisted_5$5 = { key: 0 };
2255
+ const _hoisted_5$6 = { key: 0 };
2256
2256
  const _hoisted_6$4 = { key: 1 };
2257
2257
  const _hoisted_7$3 = { class: "row" };
2258
2258
  const _hoisted_8$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2311,7 +2311,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2311
2311
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$9, [
2312
2312
  _hoisted_4$9,
2313
2313
  (_ctx.errorText)
2314
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$5, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2314
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$6, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2315
2315
  : (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$4, "Unexpected Error Occurred")),
2316
2316
  vue.createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2317
2317
  ]))
@@ -2595,7 +2595,7 @@ const _hoisted_1$9 = ["id"];
2595
2595
  const _hoisted_2$8 = { class: "modal-content" };
2596
2596
  const _hoisted_3$8 = { class: "modal-header" };
2597
2597
  const _hoisted_4$8 = { class: "modal-title" };
2598
- const _hoisted_5$4 = /*#__PURE__*/vue.createElementVNode("button", {
2598
+ const _hoisted_5$5 = /*#__PURE__*/vue.createElementVNode("button", {
2599
2599
  class: "btn btn-danger btn-sm",
2600
2600
  "data-bs-dismiss": "modal",
2601
2601
  "data-dismiss": "modal"
@@ -2615,7 +2615,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2615
2615
  vue.createElementVNode("div", _hoisted_2$8, [
2616
2616
  vue.createElementVNode("div", _hoisted_3$8, [
2617
2617
  vue.createElementVNode("h3", _hoisted_4$8, vue.toDisplayString($props.modalTitle), 1 /* TEXT */),
2618
- _hoisted_5$4
2618
+ _hoisted_5$5
2619
2619
  ]),
2620
2620
  vue.createElementVNode("div", _hoisted_6$3, [
2621
2621
  vue.createElementVNode("div", _hoisted_7$2, [
@@ -2909,7 +2909,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2909
2909
  : vue.createCommentVNode("v-if", true)
2910
2910
  ]))
2911
2911
  : (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1, [
2912
- (this.pagination_data.loading === 1)
2912
+ (this.pagination_data.loading === 1 && $props.loadMore)
2913
2913
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17$1, _hoisted_19$1))
2914
2914
  : vue.createCommentVNode("v-if", true),
2915
2915
  (!$props.hideCount)
@@ -3350,7 +3350,7 @@ const _hoisted_2$5 = {
3350
3350
  };
3351
3351
  const _hoisted_3$5 = ["disabled"];
3352
3352
  const _hoisted_4$5 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
3353
- const _hoisted_5$3 = /*#__PURE__*/vue.createElementVNode("span", {
3353
+ const _hoisted_5$4 = /*#__PURE__*/vue.createElementVNode("span", {
3354
3354
  class: "spinner-border spinner-border-sm",
3355
3355
  role: "status",
3356
3356
  "aria-hidden": "true"
@@ -3517,7 +3517,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3517
3517
  vue.createTextVNode(" Export ")
3518
3518
  ], 64 /* STABLE_FRAGMENT */))
3519
3519
  : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
3520
- _hoisted_5$3,
3520
+ _hoisted_5$4,
3521
3521
  _hoisted_6$2
3522
3522
  ], 64 /* STABLE_FRAGMENT */))
3523
3523
  ], 8 /* PROPS */, _hoisted_3$5)
@@ -4007,7 +4007,7 @@ const _hoisted_1$4 = {
4007
4007
  const _hoisted_2$4 = ["data-bs-target"];
4008
4008
  const _hoisted_3$4 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-chevron-right float-end" }, null, -1 /* HOISTED */);
4009
4009
  const _hoisted_4$4 = ["id"];
4010
- const _hoisted_5$2 = { class: "tab-content" };
4010
+ const _hoisted_5$3 = { class: "tab-content" };
4011
4011
 
4012
4012
  function render(_ctx, _cache, $props, $setup, $data, $options) {
4013
4013
  const _component_router_link = vue.resolveComponent("router-link");
@@ -4061,7 +4061,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4061
4061
  ], 10 /* CLASS, PROPS */, _hoisted_4$4)
4062
4062
  ]))
4063
4063
  : vue.createCommentVNode("v-if", true),
4064
- vue.createElementVNode("div", _hoisted_5$2, [
4064
+ vue.createElementVNode("div", _hoisted_5$3, [
4065
4065
  vue.createVNode(_component_router_view, {
4066
4066
  currentTab: $data.currentTab,
4067
4067
  sharedData: $props.sharedData,
@@ -4161,7 +4161,7 @@ const useUserStore = pinia.defineStore('user-store', {
4161
4161
  this.user = user;
4162
4162
  shApis.doGet('auth/user').then(res => {
4163
4163
  const user = res.data.user;
4164
- ShStorage.setItem('user',res.data);
4164
+ ShStorage.setItem('user',res.data.user);
4165
4165
  user.isAllowedTo = function (slug) {
4166
4166
  if (this.permissions) {
4167
4167
  let permissions = [];
@@ -4217,15 +4217,16 @@ const useUserStore = pinia.defineStore('user-store', {
4217
4217
  }
4218
4218
  });
4219
4219
 
4220
- const _hoisted_1$2 = { class: "card sh-departments-card shadow" };
4221
- const _hoisted_2$2 = { class: "card-body" };
4222
- const _hoisted_3$2 = {
4220
+ const _hoisted_1$2 = /*#__PURE__*/vue.createElementVNode("h5", null, "Departments", -1 /* HOISTED */);
4221
+ const _hoisted_2$2 = { class: "card sh-departments-card shadow" };
4222
+ const _hoisted_3$2 = { class: "card-body" };
4223
+ const _hoisted_4$2 = {
4223
4224
  "data-bs-toggle": "modal",
4224
4225
  ref: "addDeptBtn",
4225
4226
  href: "#sh-department_modal",
4226
4227
  class: "btn btn-info btn-sm"
4227
4228
  };
4228
- const _hoisted_4$2 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
4229
+ const _hoisted_5$2 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
4229
4230
 
4230
4231
 
4231
4232
  var script$2 = {
@@ -4251,13 +4252,11 @@ function departmentAdded (response) {
4251
4252
 
4252
4253
  return (_ctx, _cache) => {
4253
4254
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
4254
- (vue.openBlock(), vue.createBlock(vue.Teleport, { to: ".system-title" }, [
4255
- vue.createTextVNode("Departments")
4256
- ])),
4257
- vue.createElementVNode("div", _hoisted_1$2, [
4258
- vue.createElementVNode("div", _hoisted_2$2, [
4259
- vue.createElementVNode("a", _hoisted_3$2, [
4260
- _hoisted_4$2,
4255
+ _hoisted_1$2,
4256
+ vue.createElementVNode("div", _hoisted_2$2, [
4257
+ vue.createElementVNode("div", _hoisted_3$2, [
4258
+ vue.createElementVNode("a", _hoisted_4$2, [
4259
+ _hoisted_5$2,
4261
4260
  vue.createTextVNode(" ADD DEPARTMENT")
4262
4261
  ], 512 /* NEED_PATCH */),
4263
4262
  vue.createVNode(script$5, {
@@ -4410,9 +4409,7 @@ return (_ctx, _cache) => {
4410
4409
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
4411
4410
  vue.createElementVNode("div", _hoisted_2$1, [
4412
4411
  _hoisted_3$1,
4413
- (vue.openBlock(), vue.createBlock(vue.Teleport, { to: ".system-title" }, [
4414
- vue.createTextVNode("Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */)
4415
- ])),
4412
+ vue.createElementVNode("h5", null, "Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */),
4416
4413
  vue.createVNode(script$5, {
4417
4414
  actions: {
4418
4415
  label: 'Actions',
package/dist/library.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import Axios from 'axios';
2
2
  import moment from 'moment';
3
- import { inject, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, resolveDynamicComponent, renderSlot, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, mergeProps, Teleport, computed, isRef, vModelCheckbox, watch, pushScopeId, popScopeId } from 'vue';
3
+ import { inject, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, resolveDynamicComponent, renderSlot, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, mergeProps, computed, isRef, vModelCheckbox, watch, pushScopeId, popScopeId } from 'vue';
4
4
  import NProgress from 'nprogress';
5
5
  import Editor from '@tinymce/tinymce-vue';
6
6
  import Swal from 'sweetalert2';
@@ -1754,7 +1754,7 @@ const _hoisted_1$c = {
1754
1754
  const _hoisted_2$b = ["id"];
1755
1755
  const _hoisted_3$a = { class: "badge bg-secondary m-1 sh-selected-item" };
1756
1756
  const _hoisted_4$a = ["onClick"];
1757
- const _hoisted_5$6 = ["id"];
1757
+ const _hoisted_5$7 = ["id"];
1758
1758
  const _hoisted_6$5 = ["id", "aria-labelledby"];
1759
1759
  const _hoisted_7$4 = { key: 0 };
1760
1760
  const _hoisted_8$3 = ["onClick"];
@@ -1875,7 +1875,7 @@ return (_ctx, _cache) => {
1875
1875
  onClick: filterData,
1876
1876
  onInput: filterData,
1877
1877
  class: "flex-fill h-100 sh-suggestion-input"
1878
- }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$6)
1878
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$7)
1879
1879
  ], 8 /* PROPS */, _hoisted_2$b),
1880
1880
  createElementVNode("ul", {
1881
1881
  class: "dropdown-menu w-100",
@@ -2240,7 +2240,7 @@ const _hoisted_3$9 = {
2240
2240
  role: "alert"
2241
2241
  };
2242
2242
  const _hoisted_4$9 = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2243
- const _hoisted_5$5 = { key: 0 };
2243
+ const _hoisted_5$6 = { key: 0 };
2244
2244
  const _hoisted_6$4 = { key: 1 };
2245
2245
  const _hoisted_7$3 = { class: "row" };
2246
2246
  const _hoisted_8$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2299,7 +2299,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2299
2299
  ? (openBlock(), createElementBlock("div", _hoisted_3$9, [
2300
2300
  _hoisted_4$9,
2301
2301
  (_ctx.errorText)
2302
- ? (openBlock(), createElementBlock("span", _hoisted_5$5, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2302
+ ? (openBlock(), createElementBlock("span", _hoisted_5$6, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2303
2303
  : (openBlock(), createElementBlock("span", _hoisted_6$4, "Unexpected Error Occurred")),
2304
2304
  createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2305
2305
  ]))
@@ -2583,7 +2583,7 @@ const _hoisted_1$9 = ["id"];
2583
2583
  const _hoisted_2$8 = { class: "modal-content" };
2584
2584
  const _hoisted_3$8 = { class: "modal-header" };
2585
2585
  const _hoisted_4$8 = { class: "modal-title" };
2586
- const _hoisted_5$4 = /*#__PURE__*/createElementVNode("button", {
2586
+ const _hoisted_5$5 = /*#__PURE__*/createElementVNode("button", {
2587
2587
  class: "btn btn-danger btn-sm",
2588
2588
  "data-bs-dismiss": "modal",
2589
2589
  "data-dismiss": "modal"
@@ -2603,7 +2603,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2603
2603
  createElementVNode("div", _hoisted_2$8, [
2604
2604
  createElementVNode("div", _hoisted_3$8, [
2605
2605
  createElementVNode("h3", _hoisted_4$8, toDisplayString($props.modalTitle), 1 /* TEXT */),
2606
- _hoisted_5$4
2606
+ _hoisted_5$5
2607
2607
  ]),
2608
2608
  createElementVNode("div", _hoisted_6$3, [
2609
2609
  createElementVNode("div", _hoisted_7$2, [
@@ -2897,7 +2897,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2897
2897
  : createCommentVNode("v-if", true)
2898
2898
  ]))
2899
2899
  : (openBlock(), createElementBlock("div", _hoisted_16$1, [
2900
- (this.pagination_data.loading === 1)
2900
+ (this.pagination_data.loading === 1 && $props.loadMore)
2901
2901
  ? (openBlock(), createElementBlock("div", _hoisted_17$1, _hoisted_19$1))
2902
2902
  : createCommentVNode("v-if", true),
2903
2903
  (!$props.hideCount)
@@ -3338,7 +3338,7 @@ const _hoisted_2$5 = {
3338
3338
  };
3339
3339
  const _hoisted_3$5 = ["disabled"];
3340
3340
  const _hoisted_4$5 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
3341
- const _hoisted_5$3 = /*#__PURE__*/createElementVNode("span", {
3341
+ const _hoisted_5$4 = /*#__PURE__*/createElementVNode("span", {
3342
3342
  class: "spinner-border spinner-border-sm",
3343
3343
  role: "status",
3344
3344
  "aria-hidden": "true"
@@ -3505,7 +3505,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3505
3505
  createTextVNode(" Export ")
3506
3506
  ], 64 /* STABLE_FRAGMENT */))
3507
3507
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3508
- _hoisted_5$3,
3508
+ _hoisted_5$4,
3509
3509
  _hoisted_6$2
3510
3510
  ], 64 /* STABLE_FRAGMENT */))
3511
3511
  ], 8 /* PROPS */, _hoisted_3$5)
@@ -3995,7 +3995,7 @@ const _hoisted_1$4 = {
3995
3995
  const _hoisted_2$4 = ["data-bs-target"];
3996
3996
  const _hoisted_3$4 = /*#__PURE__*/createElementVNode("i", { class: "bi-chevron-right float-end" }, null, -1 /* HOISTED */);
3997
3997
  const _hoisted_4$4 = ["id"];
3998
- const _hoisted_5$2 = { class: "tab-content" };
3998
+ const _hoisted_5$3 = { class: "tab-content" };
3999
3999
 
4000
4000
  function render(_ctx, _cache, $props, $setup, $data, $options) {
4001
4001
  const _component_router_link = resolveComponent("router-link");
@@ -4049,7 +4049,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4049
4049
  ], 10 /* CLASS, PROPS */, _hoisted_4$4)
4050
4050
  ]))
4051
4051
  : createCommentVNode("v-if", true),
4052
- createElementVNode("div", _hoisted_5$2, [
4052
+ createElementVNode("div", _hoisted_5$3, [
4053
4053
  createVNode(_component_router_view, {
4054
4054
  currentTab: $data.currentTab,
4055
4055
  sharedData: $props.sharedData,
@@ -4149,7 +4149,7 @@ const useUserStore = defineStore('user-store', {
4149
4149
  this.user = user;
4150
4150
  shApis.doGet('auth/user').then(res => {
4151
4151
  const user = res.data.user;
4152
- ShStorage.setItem('user',res.data);
4152
+ ShStorage.setItem('user',res.data.user);
4153
4153
  user.isAllowedTo = function (slug) {
4154
4154
  if (this.permissions) {
4155
4155
  let permissions = [];
@@ -4205,15 +4205,16 @@ const useUserStore = defineStore('user-store', {
4205
4205
  }
4206
4206
  });
4207
4207
 
4208
- const _hoisted_1$2 = { class: "card sh-departments-card shadow" };
4209
- const _hoisted_2$2 = { class: "card-body" };
4210
- const _hoisted_3$2 = {
4208
+ const _hoisted_1$2 = /*#__PURE__*/createElementVNode("h5", null, "Departments", -1 /* HOISTED */);
4209
+ const _hoisted_2$2 = { class: "card sh-departments-card shadow" };
4210
+ const _hoisted_3$2 = { class: "card-body" };
4211
+ const _hoisted_4$2 = {
4211
4212
  "data-bs-toggle": "modal",
4212
4213
  ref: "addDeptBtn",
4213
4214
  href: "#sh-department_modal",
4214
4215
  class: "btn btn-info btn-sm"
4215
4216
  };
4216
- const _hoisted_4$2 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
4217
+ const _hoisted_5$2 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
4217
4218
 
4218
4219
 
4219
4220
  var script$2 = {
@@ -4239,13 +4240,11 @@ function departmentAdded (response) {
4239
4240
 
4240
4241
  return (_ctx, _cache) => {
4241
4242
  return (openBlock(), createElementBlock(Fragment, null, [
4242
- (openBlock(), createBlock(Teleport, { to: ".system-title" }, [
4243
- createTextVNode("Departments")
4244
- ])),
4245
- createElementVNode("div", _hoisted_1$2, [
4246
- createElementVNode("div", _hoisted_2$2, [
4247
- createElementVNode("a", _hoisted_3$2, [
4248
- _hoisted_4$2,
4243
+ _hoisted_1$2,
4244
+ createElementVNode("div", _hoisted_2$2, [
4245
+ createElementVNode("div", _hoisted_3$2, [
4246
+ createElementVNode("a", _hoisted_4$2, [
4247
+ _hoisted_5$2,
4249
4248
  createTextVNode(" ADD DEPARTMENT")
4250
4249
  ], 512 /* NEED_PATCH */),
4251
4250
  createVNode(script$5, {
@@ -4398,9 +4397,7 @@ return (_ctx, _cache) => {
4398
4397
  ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
4399
4398
  createElementVNode("div", _hoisted_2$1, [
4400
4399
  _hoisted_3$1,
4401
- (openBlock(), createBlock(Teleport, { to: ".system-title" }, [
4402
- createTextVNode("Department #" + toDisplayString(unref(department).id) + " - " + toDisplayString(unref(department).name) + " Allowed Modules", 1 /* TEXT */)
4403
- ])),
4400
+ createElementVNode("h5", null, "Department #" + toDisplayString(unref(department).id) + " - " + toDisplayString(unref(department).name) + " Allowed Modules", 1 /* TEXT */),
4404
4401
  createVNode(script$5, {
4405
4402
  actions: {
4406
4403
  label: 'Actions',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "0.8.9",
3
+ "version": "1.0.2",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",