@iankibetsh/shframework 1.5.8 → 1.6.0

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
@@ -3568,7 +3568,7 @@ script$a.__file = "src/lib/components/ShCanvas.vue";
3568
3568
 
3569
3569
  var script$9 = {
3570
3570
  name: 'Pagination',
3571
- props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
3571
+ props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle'],
3572
3572
  data () {
3573
3573
  return {
3574
3574
  current_page: this.pagination_data.current,
@@ -3682,7 +3682,7 @@ const _hoisted_22$1 = {
3682
3682
  };
3683
3683
 
3684
3684
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3685
- return (!$props.loadMore)
3685
+ return ($props.paginationStyle !== 'loadMore')
3686
3686
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
3687
3687
  vue.createElementVNode("div", _hoisted_2$6, [
3688
3688
  _hoisted_3$6,
@@ -3951,13 +3951,13 @@ script$7.__file = "src/lib/components/ShSilentAction.vue";
3951
3951
 
3952
3952
  var script$6 = {
3953
3953
  name: 'sh-table',
3954
- props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds'],
3954
+ props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle'],
3955
3955
  inject: ['channel'],
3956
3956
  data () {
3957
3957
  return {
3958
3958
  order_by: '',
3959
3959
  order_method: '',
3960
- per_page: this.pageCount ? this.pageCount : 30,
3960
+ per_page: shRepo.getShConfig('tablePerPage',10),
3961
3961
  page: 1,
3962
3962
  filter_value: '',
3963
3963
  loading: 'loading',
@@ -3971,7 +3971,8 @@ var script$6 = {
3971
3971
  appUrl: window.VITE_APP_API_URL,
3972
3972
  hasCanvas: 0,
3973
3973
  selectedRecord: null,
3974
- timeOut: null
3974
+ timeOut: null,
3975
+ pageStyle: this.paginationStyle ?? shRepo.getShConfig('tablePaginationStyle','loadMore')
3975
3976
  }
3976
3977
  },
3977
3978
  mounted () {
@@ -4557,7 +4558,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4557
4558
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4558
4559
  (!act.validator || act.validator(record))
4559
4560
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4560
- (act.type === 'confirmAction')
4561
+ (['confirmAction','confirmaction','confirm-action','confirm'].includes(act.type))
4561
4562
  ? (vue.openBlock(), vue.createBlock(_component_sh_confirm_action, {
4562
4563
  key: 0,
4563
4564
  onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
@@ -4578,7 +4579,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4578
4579
  ]),
4579
4580
  _: 2 /* DYNAMIC */
4580
4581
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
4581
- : (act.type === 'silentAction')
4582
+ : (['silentAction','silentaction','silent-action','silent'].includes(act.type))
4582
4583
  ? (vue.openBlock(), vue.createBlock(_component_sh_silent_action, {
4583
4584
  key: 1,
4584
4585
  onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
@@ -4797,8 +4798,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4797
4798
  "hide-count": $props.hideCount,
4798
4799
  pagination_data: $data.pagination_data,
4799
4800
  onChangeKey: $options.changeKey,
4800
- "load-more": "1"
4801
- }, null, 8 /* PROPS */, ["onLoadMoreRecords", "hide-load-more", "hide-count", "pagination_data", "onChangeKey"]))
4801
+ "pagination-style": $data.pageStyle
4802
+ }, null, 8 /* PROPS */, ["onLoadMoreRecords", "hide-load-more", "hide-count", "pagination_data", "onChangeKey", "pagination-style"]))
4802
4803
  : vue.createCommentVNode("v-if", true),
4803
4804
  ($props.actions)
4804
4805
  ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 7 }, vue.renderList($props.actions.actions, (action) => {
@@ -5816,7 +5817,7 @@ const ShFrontend = {
5816
5817
  //filter unwanted config items from options to be put in local storage
5817
5818
  const removeKeys = ['formTextInput','router','shFormElementClasses'];
5818
5819
  const allowKeys = [];
5819
- Object.keys(options).map(key=> ((typeof options[key] !== 'string' && !allowKeys.includes(key)) || removeKeys.includes(key)) && delete options[key]);
5820
+ Object.keys(options).map(key=> ((!['string','integer','number'].includes(typeof options[key]) && !allowKeys.includes(key)) || removeKeys.includes(key)) && delete options[key]);
5820
5821
 
5821
5822
  ShStorage.setItem('ShConfig',options);
5822
5823
  }
package/dist/library.mjs CHANGED
@@ -3555,7 +3555,7 @@ script$a.__file = "src/lib/components/ShCanvas.vue";
3555
3555
 
3556
3556
  var script$9 = {
3557
3557
  name: 'Pagination',
3558
- props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
3558
+ props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle'],
3559
3559
  data () {
3560
3560
  return {
3561
3561
  current_page: this.pagination_data.current,
@@ -3669,7 +3669,7 @@ const _hoisted_22$1 = {
3669
3669
  };
3670
3670
 
3671
3671
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3672
- return (!$props.loadMore)
3672
+ return ($props.paginationStyle !== 'loadMore')
3673
3673
  ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
3674
3674
  createElementVNode("div", _hoisted_2$6, [
3675
3675
  _hoisted_3$6,
@@ -3938,13 +3938,13 @@ script$7.__file = "src/lib/components/ShSilentAction.vue";
3938
3938
 
3939
3939
  var script$6 = {
3940
3940
  name: 'sh-table',
3941
- props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds'],
3941
+ props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle'],
3942
3942
  inject: ['channel'],
3943
3943
  data () {
3944
3944
  return {
3945
3945
  order_by: '',
3946
3946
  order_method: '',
3947
- per_page: this.pageCount ? this.pageCount : 30,
3947
+ per_page: shRepo.getShConfig('tablePerPage',10),
3948
3948
  page: 1,
3949
3949
  filter_value: '',
3950
3950
  loading: 'loading',
@@ -3958,7 +3958,8 @@ var script$6 = {
3958
3958
  appUrl: window.VITE_APP_API_URL,
3959
3959
  hasCanvas: 0,
3960
3960
  selectedRecord: null,
3961
- timeOut: null
3961
+ timeOut: null,
3962
+ pageStyle: this.paginationStyle ?? shRepo.getShConfig('tablePaginationStyle','loadMore')
3962
3963
  }
3963
3964
  },
3964
3965
  mounted () {
@@ -4544,7 +4545,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4544
4545
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4545
4546
  (!act.validator || act.validator(record))
4546
4547
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4547
- (act.type === 'confirmAction')
4548
+ (['confirmAction','confirmaction','confirm-action','confirm'].includes(act.type))
4548
4549
  ? (openBlock(), createBlock(_component_sh_confirm_action, {
4549
4550
  key: 0,
4550
4551
  onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
@@ -4565,7 +4566,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4565
4566
  ]),
4566
4567
  _: 2 /* DYNAMIC */
4567
4568
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
4568
- : (act.type === 'silentAction')
4569
+ : (['silentAction','silentaction','silent-action','silent'].includes(act.type))
4569
4570
  ? (openBlock(), createBlock(_component_sh_silent_action, {
4570
4571
  key: 1,
4571
4572
  onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
@@ -4784,8 +4785,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4784
4785
  "hide-count": $props.hideCount,
4785
4786
  pagination_data: $data.pagination_data,
4786
4787
  onChangeKey: $options.changeKey,
4787
- "load-more": "1"
4788
- }, null, 8 /* PROPS */, ["onLoadMoreRecords", "hide-load-more", "hide-count", "pagination_data", "onChangeKey"]))
4788
+ "pagination-style": $data.pageStyle
4789
+ }, null, 8 /* PROPS */, ["onLoadMoreRecords", "hide-load-more", "hide-count", "pagination_data", "onChangeKey", "pagination-style"]))
4789
4790
  : createCommentVNode("v-if", true),
4790
4791
  ($props.actions)
4791
4792
  ? (openBlock(true), createElementBlock(Fragment, { key: 7 }, renderList($props.actions.actions, (action) => {
@@ -5803,7 +5804,7 @@ const ShFrontend = {
5803
5804
  //filter unwanted config items from options to be put in local storage
5804
5805
  const removeKeys = ['formTextInput','router','shFormElementClasses'];
5805
5806
  const allowKeys = [];
5806
- Object.keys(options).map(key=> ((typeof options[key] !== 'string' && !allowKeys.includes(key)) || removeKeys.includes(key)) && delete options[key]);
5807
+ Object.keys(options).map(key=> ((!['string','integer','number'].includes(typeof options[key]) && !allowKeys.includes(key)) || removeKeys.includes(key)) && delete options[key]);
5807
5808
 
5808
5809
  ShStorage.setItem('ShConfig',options);
5809
5810
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "1.5.8",
3
+ "version": "1.6.0",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",