@iankibetsh/shframework 0.2.2 → 0.2.3

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
@@ -1655,7 +1655,7 @@ var script$5 = {
1655
1655
  components: {
1656
1656
  ShPhone: script$6
1657
1657
  },
1658
- props: ['action', 'classes', 'hasTerms', 'country_code', 'submit_btn_class', 'fields', 'columns', 'placeholders', 'field_permissions', 'retain_data_after_submission', 'current_data', 'action_label', 'fill_selects', 'phones', 'successCallback', 'failed_callback', 'labels'],
1658
+ props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels'],
1659
1659
  data: function () {
1660
1660
  return {
1661
1661
  form_elements: {},
@@ -1671,14 +1671,9 @@ var script$5 = {
1671
1671
  allLabels: {}
1672
1672
  }
1673
1673
  },
1674
- computed: {
1675
- currentData () {
1676
- return this.current_data
1677
- }
1678
- },
1679
1674
  methods: {
1680
1675
  getSubmitBtnClass: function () {
1681
- const btnClass = this.submit_btn_class;
1676
+ const btnClass = this.submitBtnClass;
1682
1677
  if (!btnClass) {
1683
1678
  return 'btn btn-primary mt-2'
1684
1679
  } else {
@@ -1817,7 +1812,7 @@ var script$5 = {
1817
1812
  this.form_status = 2;
1818
1813
  Object.keys(this.form_elements).forEach(key => {
1819
1814
  this.form_errors[key] = null;
1820
- if (!this.retain_data_after_submission) {
1815
+ if (!this.retainDataAfterSubmission) {
1821
1816
  this.form_elements[key] = '';
1822
1817
  }
1823
1818
  });
@@ -1886,14 +1881,14 @@ var script$5 = {
1886
1881
  },
1887
1882
  mounted: async function () {
1888
1883
  const selectData = {};
1889
- if (this.fill_selects) {
1890
- Object.keys(this.fill_selects).forEach(key => {
1891
- if (this.fill_selects[key].data) {
1892
- selectData[key] = this.fill_selects[key].data;
1884
+ if (this.fillSelects) {
1885
+ Object.keys(this.fillSelects).forEach(key => {
1886
+ if (this.fillSelects[key].data) {
1887
+ selectData[key] = this.fillSelects[key].data;
1893
1888
  this.selectData = selectData;
1894
1889
  console.log(this.selectData);
1895
1890
  } else {
1896
- apis.doGet(this.fill_selects[key].url, { all: 1 }).then(res => {
1891
+ apis.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
1897
1892
  // selectData[key] = res.data
1898
1893
  // console.log(res)
1899
1894
  this.selectData[key] = res.data.data;
@@ -2142,7 +2137,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2142
2137
  type: "button",
2143
2138
  onClick: _cache[1] || (_cache[1] = (...args) => ($options.submitForm && $options.submitForm(...args)))
2144
2139
  }, [
2145
- vue.createTextVNode(vue.toDisplayString($props.action_label ? $props.action_label:'Submit') + " ", 1 /* TEXT */),
2140
+ vue.createTextVNode(vue.toDisplayString($props.actionLabel ? $props.actionLabel:'Submit') + " ", 1 /* TEXT */),
2146
2141
  (_ctx.form_status == 1)
2147
2142
  ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_23$2))
2148
2143
  : vue.createCommentVNode("v-if", true)
package/dist/library.mjs CHANGED
@@ -1644,7 +1644,7 @@ var script$5 = {
1644
1644
  components: {
1645
1645
  ShPhone: script$6
1646
1646
  },
1647
- props: ['action', 'classes', 'hasTerms', 'country_code', 'submit_btn_class', 'fields', 'columns', 'placeholders', 'field_permissions', 'retain_data_after_submission', 'current_data', 'action_label', 'fill_selects', 'phones', 'successCallback', 'failed_callback', 'labels'],
1647
+ props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels'],
1648
1648
  data: function () {
1649
1649
  return {
1650
1650
  form_elements: {},
@@ -1660,14 +1660,9 @@ var script$5 = {
1660
1660
  allLabels: {}
1661
1661
  }
1662
1662
  },
1663
- computed: {
1664
- currentData () {
1665
- return this.current_data
1666
- }
1667
- },
1668
1663
  methods: {
1669
1664
  getSubmitBtnClass: function () {
1670
- const btnClass = this.submit_btn_class;
1665
+ const btnClass = this.submitBtnClass;
1671
1666
  if (!btnClass) {
1672
1667
  return 'btn btn-primary mt-2'
1673
1668
  } else {
@@ -1806,7 +1801,7 @@ var script$5 = {
1806
1801
  this.form_status = 2;
1807
1802
  Object.keys(this.form_elements).forEach(key => {
1808
1803
  this.form_errors[key] = null;
1809
- if (!this.retain_data_after_submission) {
1804
+ if (!this.retainDataAfterSubmission) {
1810
1805
  this.form_elements[key] = '';
1811
1806
  }
1812
1807
  });
@@ -1875,14 +1870,14 @@ var script$5 = {
1875
1870
  },
1876
1871
  mounted: async function () {
1877
1872
  const selectData = {};
1878
- if (this.fill_selects) {
1879
- Object.keys(this.fill_selects).forEach(key => {
1880
- if (this.fill_selects[key].data) {
1881
- selectData[key] = this.fill_selects[key].data;
1873
+ if (this.fillSelects) {
1874
+ Object.keys(this.fillSelects).forEach(key => {
1875
+ if (this.fillSelects[key].data) {
1876
+ selectData[key] = this.fillSelects[key].data;
1882
1877
  this.selectData = selectData;
1883
1878
  console.log(this.selectData);
1884
1879
  } else {
1885
- apis.doGet(this.fill_selects[key].url, { all: 1 }).then(res => {
1880
+ apis.doGet(this.fillSelects[key].url, { all: 1 }).then(res => {
1886
1881
  // selectData[key] = res.data
1887
1882
  // console.log(res)
1888
1883
  this.selectData[key] = res.data.data;
@@ -2131,7 +2126,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2131
2126
  type: "button",
2132
2127
  onClick: _cache[1] || (_cache[1] = (...args) => ($options.submitForm && $options.submitForm(...args)))
2133
2128
  }, [
2134
- createTextVNode(toDisplayString($props.action_label ? $props.action_label:'Submit') + " ", 1 /* TEXT */),
2129
+ createTextVNode(toDisplayString($props.actionLabel ? $props.actionLabel:'Submit') + " ", 1 /* TEXT */),
2135
2130
  (_ctx.form_status == 1)
2136
2131
  ? (openBlock(), createElementBlock("img", _hoisted_23$2))
2137
2132
  : createCommentVNode("v-if", true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",