@iankibetsh/shframework 4.4.3 → 4.4.5

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,4 +1,36 @@
1
1
 
2
+ .sh-phone{
3
+ display: flex;
4
+ width: 100%;
5
+ align-items: center;
6
+ padding: 0 0.25rem;
7
+ }
8
+ .phone-country{
9
+ width: 2rem;
10
+ border: none;
11
+ align-self: center;
12
+ outline: none !important;
13
+ padding: 0.4rem;
14
+ border-right: 1px solid #0003;
15
+ }
16
+ .phone-number{
17
+ width: calc(100% - 2.2rem);
18
+ border: none;
19
+ align-self: center;
20
+ outline: none;
21
+ margin-bottom: 0;
22
+ padding: 0.4rem;
23
+ }
24
+ .sh-phone img{
25
+ padding: 0.125rem;
26
+ width: 2rem;
27
+ height: 2rem;
28
+ }
29
+ .phone-number::placeholder{
30
+ font-weight: 300;
31
+ opacity: 0.5;
32
+ }
33
+
2
34
  .colored-toast.swal2-icon-success {
3
35
  background-color: #a5dc86 !important;
4
36
  }
@@ -63,38 +95,6 @@
63
95
  flex-grow: 1;
64
96
  }
65
97
 
66
- .sh-phone{
67
- display: flex;
68
- width: 100%;
69
- align-items: center;
70
- padding: 0 0.25rem;
71
- }
72
- .phone-country{
73
- width: 2rem;
74
- border: none;
75
- align-self: center;
76
- outline: none !important;
77
- padding: 0.4rem;
78
- border-right: 1px solid #0003;
79
- }
80
- .phone-number{
81
- width: calc(100% - 2.2rem);
82
- border: none;
83
- align-self: center;
84
- outline: none;
85
- margin-bottom: 0;
86
- padding: 0.4rem;
87
- }
88
- .sh-phone img{
89
- padding: 0.125rem;
90
- width: 2rem;
91
- height: 2rem;
92
- }
93
- .phone-number::placeholder{
94
- font-weight: 300;
95
- opacity: 0.5;
96
- }
97
-
98
98
  .sh-selected-item{
99
99
  line-height: unset!important;
100
100
  }
package/dist/library.js CHANGED
@@ -3697,7 +3697,7 @@ var script$j = {
3697
3697
  'files',
3698
3698
  'phones',
3699
3699
  'numbers',
3700
- 'customComponent','modalTitle','class','successMessage'],
3700
+ 'customComponent','modalTitle','class','successMessage', 'modalId'],
3701
3701
  emits: ['success','fieldChanged','formSubmitted','formError','modalId'],
3702
3702
  setup(__props, { emit: __emit }) {
3703
3703
 
@@ -3705,12 +3705,12 @@ const props = __props;
3705
3705
  const emit = __emit;
3706
3706
  vue.ref(props);
3707
3707
  let btnClass=props.class;
3708
- const modalId = 'rand' + (Math.random() + 1).toString(36).substring(2);
3708
+ const realModalId = props.modalId ?? 'rand' + (Math.random() + 1).toString(36).substring(2);
3709
3709
  const success = (res)=>{
3710
3710
  emit('success',res);
3711
3711
  };
3712
3712
  vue.onMounted(()=>{
3713
- emit('modalId',modalId);
3713
+ emit('modalId',realModalId);
3714
3714
  });
3715
3715
 
3716
3716
  const fieldChanged = (field, value)=>{
@@ -3729,25 +3729,26 @@ return (_ctx, _cache) => {
3729
3729
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3730
3730
  vue.createElementVNode("a", {
3731
3731
  class: vue.normalizeClass(vue.unref(btnClass)),
3732
- href: '#' + modalId,
3732
+ href: '#' + vue.unref(realModalId),
3733
3733
  "data-bs-toggle": "modal"
3734
3734
  }, [
3735
3735
  vue.renderSlot(_ctx.$slots, "default")
3736
3736
  ], 10 /* CLASS, PROPS */, _hoisted_1$g),
3737
3737
  vue.createVNode(script$k, {
3738
- "modal-id": modalId,
3738
+ "modal-id": vue.unref(realModalId),
3739
3739
  "modal-title": __props.modalTitle
3740
3740
  }, {
3741
3741
  default: vue.withCtx(() => [
3742
- vue.createVNode(script$m, vue.mergeProps({
3742
+ (vue.openBlock(), vue.createBlock(script$m, vue.mergeProps({
3743
3743
  onSuccess: success,
3744
3744
  onFieldChanged: fieldChanged,
3745
3745
  onFormSubmitted: formSubmitted,
3746
- onFormError: formError
3747
- }, props), null, 16 /* FULL_PROPS */)
3746
+ onFormError: formError,
3747
+ key: JSON.stringify(__props.currentData ?? {})
3748
+ }, props), null, 16 /* FULL_PROPS */))
3748
3749
  ]),
3749
3750
  _: 1 /* STABLE */
3750
- }, 8 /* PROPS */, ["modal-title"])
3751
+ }, 8 /* PROPS */, ["modal-id", "modal-title"])
3751
3752
  ], 64 /* STABLE_FRAGMENT */))
3752
3753
  }
3753
3754
  }
@@ -4900,7 +4901,16 @@ const __default__ = {
4900
4901
  },
4901
4902
  replaceLinkUrl: function (path, obj){
4902
4903
  if (typeof path === 'object') {
4903
- path = path.link ?? path.url;
4904
+ // check path,link or url
4905
+ if (path.link) {
4906
+ path = path.link;
4907
+ } else if (path.url) {
4908
+ path = path.url;
4909
+ } else if(path.path){
4910
+ path = path.path;
4911
+ } else {
4912
+ path = '';
4913
+ }
4904
4914
  }
4905
4915
  var matches = path.match(/\{(.*?)\}/g);
4906
4916
  matches && matches.forEach(key => {
package/dist/library.mjs CHANGED
@@ -3685,7 +3685,7 @@ var script$j = {
3685
3685
  'files',
3686
3686
  'phones',
3687
3687
  'numbers',
3688
- 'customComponent','modalTitle','class','successMessage'],
3688
+ 'customComponent','modalTitle','class','successMessage', 'modalId'],
3689
3689
  emits: ['success','fieldChanged','formSubmitted','formError','modalId'],
3690
3690
  setup(__props, { emit: __emit }) {
3691
3691
 
@@ -3693,12 +3693,12 @@ const props = __props;
3693
3693
  const emit = __emit;
3694
3694
  ref(props);
3695
3695
  let btnClass=props.class;
3696
- const modalId = 'rand' + (Math.random() + 1).toString(36).substring(2);
3696
+ const realModalId = props.modalId ?? 'rand' + (Math.random() + 1).toString(36).substring(2);
3697
3697
  const success = (res)=>{
3698
3698
  emit('success',res);
3699
3699
  };
3700
3700
  onMounted(()=>{
3701
- emit('modalId',modalId);
3701
+ emit('modalId',realModalId);
3702
3702
  });
3703
3703
 
3704
3704
  const fieldChanged = (field, value)=>{
@@ -3717,25 +3717,26 @@ return (_ctx, _cache) => {
3717
3717
  return (openBlock(), createElementBlock(Fragment, null, [
3718
3718
  createElementVNode("a", {
3719
3719
  class: normalizeClass(unref(btnClass)),
3720
- href: '#' + modalId,
3720
+ href: '#' + unref(realModalId),
3721
3721
  "data-bs-toggle": "modal"
3722
3722
  }, [
3723
3723
  renderSlot(_ctx.$slots, "default")
3724
3724
  ], 10 /* CLASS, PROPS */, _hoisted_1$g),
3725
3725
  createVNode(script$k, {
3726
- "modal-id": modalId,
3726
+ "modal-id": unref(realModalId),
3727
3727
  "modal-title": __props.modalTitle
3728
3728
  }, {
3729
3729
  default: withCtx(() => [
3730
- createVNode(script$m, mergeProps({
3730
+ (openBlock(), createBlock(script$m, mergeProps({
3731
3731
  onSuccess: success,
3732
3732
  onFieldChanged: fieldChanged,
3733
3733
  onFormSubmitted: formSubmitted,
3734
- onFormError: formError
3735
- }, props), null, 16 /* FULL_PROPS */)
3734
+ onFormError: formError,
3735
+ key: JSON.stringify(__props.currentData ?? {})
3736
+ }, props), null, 16 /* FULL_PROPS */))
3736
3737
  ]),
3737
3738
  _: 1 /* STABLE */
3738
- }, 8 /* PROPS */, ["modal-title"])
3739
+ }, 8 /* PROPS */, ["modal-id", "modal-title"])
3739
3740
  ], 64 /* STABLE_FRAGMENT */))
3740
3741
  }
3741
3742
  }
@@ -4888,7 +4889,16 @@ const __default__ = {
4888
4889
  },
4889
4890
  replaceLinkUrl: function (path, obj){
4890
4891
  if (typeof path === 'object') {
4891
- path = path.link ?? path.url;
4892
+ // check path,link or url
4893
+ if (path.link) {
4894
+ path = path.link;
4895
+ } else if (path.url) {
4896
+ path = path.url;
4897
+ } else if(path.path){
4898
+ path = path.path;
4899
+ } else {
4900
+ path = '';
4901
+ }
4892
4902
  }
4893
4903
  var matches = path.match(/\{(.*?)\}/g);
4894
4904
  matches && matches.forEach(key => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "4.4.3",
3
+ "version": "4.4.5",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",