@iankibetsh/shframework 4.4.2 → 4.4.4
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 +32 -32
- package/dist/library.js +20 -7
- package/dist/library.mjs +21 -8
- package/package.json +1 -1
|
@@ -31,38 +31,6 @@
|
|
|
31
31
|
opacity: 0.5;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.permissions-main {
|
|
35
|
-
background: #edeff2;
|
|
36
|
-
}
|
|
37
|
-
.permissions-main div#permissions-nav {
|
|
38
|
-
padding: 0;
|
|
39
|
-
}
|
|
40
|
-
.permissions-main div#permissions-nav ul {
|
|
41
|
-
padding-left: 0;
|
|
42
|
-
max-height: 400px;
|
|
43
|
-
overflow-y: auto;
|
|
44
|
-
}
|
|
45
|
-
.permissions-main div#permissions-nav ul li.active {
|
|
46
|
-
border-right: none !important;
|
|
47
|
-
position: relative;
|
|
48
|
-
top: 0;
|
|
49
|
-
left: 0;
|
|
50
|
-
background: #88b3b370;
|
|
51
|
-
border-radius: 10px;
|
|
52
|
-
}
|
|
53
|
-
.permissions-main div#permissions-nav ul li {
|
|
54
|
-
list-style: none;
|
|
55
|
-
padding-inline-start: 10px;
|
|
56
|
-
display: flex;
|
|
57
|
-
gap: 5px;
|
|
58
|
-
}
|
|
59
|
-
.permissions-main div#permissions-nav ul li label {
|
|
60
|
-
padding: 8px 0;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
height: 100%;
|
|
63
|
-
flex-grow: 1;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
34
|
.colored-toast.swal2-icon-success {
|
|
67
35
|
background-color: #a5dc86 !important;
|
|
68
36
|
}
|
|
@@ -111,6 +79,38 @@
|
|
|
111
79
|
margin-right: 0.255em;
|
|
112
80
|
}
|
|
113
81
|
|
|
82
|
+
.permissions-main {
|
|
83
|
+
background: #edeff2;
|
|
84
|
+
}
|
|
85
|
+
.permissions-main div#permissions-nav {
|
|
86
|
+
padding: 0;
|
|
87
|
+
}
|
|
88
|
+
.permissions-main div#permissions-nav ul {
|
|
89
|
+
padding-left: 0;
|
|
90
|
+
max-height: 400px;
|
|
91
|
+
overflow-y: auto;
|
|
92
|
+
}
|
|
93
|
+
.permissions-main div#permissions-nav ul li.active {
|
|
94
|
+
border-right: none !important;
|
|
95
|
+
position: relative;
|
|
96
|
+
top: 0;
|
|
97
|
+
left: 0;
|
|
98
|
+
background: #88b3b370;
|
|
99
|
+
border-radius: 10px;
|
|
100
|
+
}
|
|
101
|
+
.permissions-main div#permissions-nav ul li {
|
|
102
|
+
list-style: none;
|
|
103
|
+
padding-inline-start: 10px;
|
|
104
|
+
display: flex;
|
|
105
|
+
gap: 5px;
|
|
106
|
+
}
|
|
107
|
+
.permissions-main div#permissions-nav ul li label {
|
|
108
|
+
padding: 8px 0;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
height: 100%;
|
|
111
|
+
flex-grow: 1;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
114
|
.callout{
|
|
115
115
|
--bs-link-color-rgb: 110,168,254;
|
|
116
116
|
--bs-code-color: #e685b5;
|
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))
|
|
@@ -4896,7 +4900,16 @@ const __default__ = {
|
|
|
4896
4900
|
},
|
|
4897
4901
|
replaceLinkUrl: function (path, obj){
|
|
4898
4902
|
if (typeof path === 'object') {
|
|
4899
|
-
|
|
4903
|
+
// check path,link or url
|
|
4904
|
+
if (path.link) {
|
|
4905
|
+
path = path.link;
|
|
4906
|
+
} else if (path.url) {
|
|
4907
|
+
path = path.url;
|
|
4908
|
+
} else if(path.path){
|
|
4909
|
+
path = path.path;
|
|
4910
|
+
} else {
|
|
4911
|
+
path = '';
|
|
4912
|
+
}
|
|
4900
4913
|
}
|
|
4901
4914
|
var matches = path.match(/\{(.*?)\}/g);
|
|
4902
4915
|
matches && matches.forEach(key => {
|
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))
|
|
@@ -4884,7 +4888,16 @@ const __default__ = {
|
|
|
4884
4888
|
},
|
|
4885
4889
|
replaceLinkUrl: function (path, obj){
|
|
4886
4890
|
if (typeof path === 'object') {
|
|
4887
|
-
|
|
4891
|
+
// check path,link or url
|
|
4892
|
+
if (path.link) {
|
|
4893
|
+
path = path.link;
|
|
4894
|
+
} else if (path.url) {
|
|
4895
|
+
path = path.url;
|
|
4896
|
+
} else if(path.path){
|
|
4897
|
+
path = path.path;
|
|
4898
|
+
} else {
|
|
4899
|
+
path = '';
|
|
4900
|
+
}
|
|
4888
4901
|
}
|
|
4889
4902
|
var matches = path.match(/\{(.*?)\}/g);
|
|
4890
4903
|
matches && matches.forEach(key => {
|