@iankibetsh/shframework 4.4.2 → 4.4.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/dist/library.mjs.css +52 -52
- package/dist/library.js +10 -6
- package/dist/library.mjs +11 -7
- package/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
|
|
2
|
-
.
|
|
3
|
-
|
|
4
|
-
width: 100%;
|
|
5
|
-
align-items: center;
|
|
6
|
-
padding: 0 0.25rem;
|
|
2
|
+
.colored-toast.swal2-icon-success {
|
|
3
|
+
background-color: #a5dc86 !important;
|
|
7
4
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
align-self: center;
|
|
12
|
-
outline: none !important;
|
|
13
|
-
padding: 0.4rem;
|
|
14
|
-
border-right: 1px solid #0003;
|
|
5
|
+
|
|
6
|
+
.colored-toast.swal2-icon-error {
|
|
7
|
+
background-color: #f27474 !important;
|
|
15
8
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
align-self: center;
|
|
20
|
-
outline: none;
|
|
21
|
-
margin-bottom: 0;
|
|
22
|
-
padding: 0.4rem;
|
|
9
|
+
|
|
10
|
+
.colored-toast.swal2-icon-warning {
|
|
11
|
+
background-color: #f8bb86 !important;
|
|
23
12
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
height: 2rem;
|
|
13
|
+
|
|
14
|
+
.colored-toast.swal2-icon-info {
|
|
15
|
+
background-color: #3fc3ee !important;
|
|
28
16
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
32
|
}
|
|
33
33
|
|
|
34
34
|
.permissions-main {
|
|
@@ -63,36 +63,36 @@
|
|
|
63
63
|
flex-grow: 1;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
.
|
|
71
|
-
background-color: #f27474 !important;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.colored-toast.swal2-icon-warning {
|
|
75
|
-
background-color: #f8bb86 !important;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.colored-toast.swal2-icon-info {
|
|
79
|
-
background-color: #3fc3ee !important;
|
|
66
|
+
.sh-phone{
|
|
67
|
+
display: flex;
|
|
68
|
+
width: 100%;
|
|
69
|
+
align-items: center;
|
|
70
|
+
padding: 0 0.25rem;
|
|
80
71
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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;
|
|
84
79
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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;
|
|
88
87
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
.sh-phone img{
|
|
89
|
+
padding: 0.125rem;
|
|
90
|
+
width: 2rem;
|
|
91
|
+
height: 2rem;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
.phone-number::placeholder{
|
|
94
|
+
font-weight: 300;
|
|
95
|
+
opacity: 0.5;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.sh-selected-item{
|
package/dist/library.js
CHANGED
|
@@ -2151,7 +2151,7 @@ const fetchRemoteData = ()=>{
|
|
|
2151
2151
|
};
|
|
2152
2152
|
shApis.doGet(props.url, data).then(res => {
|
|
2153
2153
|
suggestions.value = res.data.data ?? res.data;
|
|
2154
|
-
initializeExisting();
|
|
2154
|
+
initializeExisting(props.modelValue);
|
|
2155
2155
|
}).catch(res => {
|
|
2156
2156
|
console.log(res);
|
|
2157
2157
|
});
|
|
@@ -2170,12 +2170,11 @@ const hideDropDown = ()=>{
|
|
|
2170
2170
|
}
|
|
2171
2171
|
};
|
|
2172
2172
|
|
|
2173
|
-
const initializeExisting = ()=>{
|
|
2174
|
-
|
|
2175
|
-
if(props.modelValue && suggestions.value){
|
|
2173
|
+
const initializeExisting = (currentValue)=>{
|
|
2174
|
+
if(currentValue && suggestions.value){
|
|
2176
2175
|
if(props.allowMultiple){
|
|
2177
2176
|
let selected = [];
|
|
2178
|
-
|
|
2177
|
+
currentValue.forEach(id=>{
|
|
2179
2178
|
let found = suggestions.value.find(sgt=>{
|
|
2180
2179
|
return sgt.id === id
|
|
2181
2180
|
});
|
|
@@ -2186,7 +2185,7 @@ const initializeExisting = ()=>{
|
|
|
2186
2185
|
selectedSuggestions.value = selected;
|
|
2187
2186
|
} else {
|
|
2188
2187
|
let found = suggestions.value.find(sgt=>{
|
|
2189
|
-
return sgt.id ===
|
|
2188
|
+
return sgt.id === currentValue
|
|
2190
2189
|
});
|
|
2191
2190
|
if(found){
|
|
2192
2191
|
selectedSuggestions.value = [found];
|
|
@@ -2194,6 +2193,11 @@ const initializeExisting = ()=>{
|
|
|
2194
2193
|
}
|
|
2195
2194
|
}
|
|
2196
2195
|
};
|
|
2196
|
+
vue.watch(()=>props.modelValue, (newValue)=>{
|
|
2197
|
+
if(newValue) {
|
|
2198
|
+
initializeExisting(newValue);
|
|
2199
|
+
}
|
|
2200
|
+
});
|
|
2197
2201
|
|
|
2198
2202
|
return (_ctx, _cache) => {
|
|
2199
2203
|
return (vue.unref(id))
|
package/dist/library.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import moment from 'moment';
|
|
|
3
3
|
import Swal from 'sweetalert2';
|
|
4
4
|
import { Modal, Offcanvas } from 'bootstrap';
|
|
5
5
|
import NProgress from 'nprogress';
|
|
6
|
-
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, unref, createBlock, resolveDynamicComponent, normalizeClass, resolveComponent,
|
|
6
|
+
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, watch, unref, createBlock, resolveDynamicComponent, normalizeClass, resolveComponent, inject, mergeProps, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps, withCtx, vModelCheckbox, shallowRef, pushScopeId, popScopeId, markRaw, computed, isRef } from 'vue';
|
|
7
7
|
import _ from 'lodash';
|
|
8
8
|
import { defineStore, storeToRefs } from 'pinia';
|
|
9
9
|
import { useRoute, useRouter } from 'vue-router';
|
|
@@ -2139,7 +2139,7 @@ const fetchRemoteData = ()=>{
|
|
|
2139
2139
|
};
|
|
2140
2140
|
shApis.doGet(props.url, data).then(res => {
|
|
2141
2141
|
suggestions.value = res.data.data ?? res.data;
|
|
2142
|
-
initializeExisting();
|
|
2142
|
+
initializeExisting(props.modelValue);
|
|
2143
2143
|
}).catch(res => {
|
|
2144
2144
|
console.log(res);
|
|
2145
2145
|
});
|
|
@@ -2158,12 +2158,11 @@ const hideDropDown = ()=>{
|
|
|
2158
2158
|
}
|
|
2159
2159
|
};
|
|
2160
2160
|
|
|
2161
|
-
const initializeExisting = ()=>{
|
|
2162
|
-
|
|
2163
|
-
if(props.modelValue && suggestions.value){
|
|
2161
|
+
const initializeExisting = (currentValue)=>{
|
|
2162
|
+
if(currentValue && suggestions.value){
|
|
2164
2163
|
if(props.allowMultiple){
|
|
2165
2164
|
let selected = [];
|
|
2166
|
-
|
|
2165
|
+
currentValue.forEach(id=>{
|
|
2167
2166
|
let found = suggestions.value.find(sgt=>{
|
|
2168
2167
|
return sgt.id === id
|
|
2169
2168
|
});
|
|
@@ -2174,7 +2173,7 @@ const initializeExisting = ()=>{
|
|
|
2174
2173
|
selectedSuggestions.value = selected;
|
|
2175
2174
|
} else {
|
|
2176
2175
|
let found = suggestions.value.find(sgt=>{
|
|
2177
|
-
return sgt.id ===
|
|
2176
|
+
return sgt.id === currentValue
|
|
2178
2177
|
});
|
|
2179
2178
|
if(found){
|
|
2180
2179
|
selectedSuggestions.value = [found];
|
|
@@ -2182,6 +2181,11 @@ const initializeExisting = ()=>{
|
|
|
2182
2181
|
}
|
|
2183
2182
|
}
|
|
2184
2183
|
};
|
|
2184
|
+
watch(()=>props.modelValue, (newValue)=>{
|
|
2185
|
+
if(newValue) {
|
|
2186
|
+
initializeExisting(newValue);
|
|
2187
|
+
}
|
|
2188
|
+
});
|
|
2185
2189
|
|
|
2186
2190
|
return (_ctx, _cache) => {
|
|
2187
2191
|
return (unref(id))
|