@iankibetsh/shframework 4.6.7 → 4.6.8
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 +40 -6
- package/dist/library.mjs +40 -6
- package/package.json +2 -2
|
@@ -1,36 +1,4 @@
|
|
|
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
|
-
|
|
34
2
|
.colored-toast.swal2-icon-success {
|
|
35
3
|
background-color: #a5dc86 !important;
|
|
36
4
|
}
|
|
@@ -63,6 +31,38 @@
|
|
|
63
31
|
color: white;
|
|
64
32
|
}
|
|
65
33
|
|
|
34
|
+
.sh-phone{
|
|
35
|
+
display: flex;
|
|
36
|
+
width: 100%;
|
|
37
|
+
align-items: center;
|
|
38
|
+
padding: 0 0.25rem;
|
|
39
|
+
}
|
|
40
|
+
.phone-country{
|
|
41
|
+
width: 2rem;
|
|
42
|
+
border: none;
|
|
43
|
+
align-self: center;
|
|
44
|
+
outline: none !important;
|
|
45
|
+
padding: 0.4rem;
|
|
46
|
+
border-right: 1px solid #0003;
|
|
47
|
+
}
|
|
48
|
+
.phone-number{
|
|
49
|
+
width: calc(100% - 2.2rem);
|
|
50
|
+
border: none;
|
|
51
|
+
align-self: center;
|
|
52
|
+
outline: none;
|
|
53
|
+
margin-bottom: 0;
|
|
54
|
+
padding: 0.4rem;
|
|
55
|
+
}
|
|
56
|
+
.sh-phone img{
|
|
57
|
+
padding: 0.125rem;
|
|
58
|
+
width: 2rem;
|
|
59
|
+
height: 2rem;
|
|
60
|
+
}
|
|
61
|
+
.phone-number::placeholder{
|
|
62
|
+
font-weight: 300;
|
|
63
|
+
opacity: 0.5;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
.permissions-main {
|
|
67
67
|
background: #edeff2;
|
|
68
68
|
}
|
package/dist/library.js
CHANGED
|
@@ -3613,7 +3613,7 @@ return (_ctx, _cache) => {
|
|
|
3613
3613
|
: vue.createCommentVNode("v-if", true)
|
|
3614
3614
|
], 2 /* CLASS */))
|
|
3615
3615
|
: vue.createCommentVNode("v-if", true),
|
|
3616
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps(getComponentProps(field), {
|
|
3616
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps({ ref_for: true }, getComponentProps(field), {
|
|
3617
3617
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
3618
3618
|
onClick: $event => (fieldChanged(field.field)),
|
|
3619
3619
|
"onUpdate:modelValue": [$event => (fieldChanged(field.field)), $event => ((formFields.value[index].value) = $event)],
|
|
@@ -5742,7 +5742,8 @@ return (_ctx, _cache) => {
|
|
|
5742
5742
|
(_ctx.selectedRecord)
|
|
5743
5743
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(action.canvasComponent), vue.mergeProps({
|
|
5744
5744
|
key: 0,
|
|
5745
|
-
onRecordUpdated: _ctx.reloadData
|
|
5745
|
+
onRecordUpdated: _ctx.reloadData,
|
|
5746
|
+
ref_for: true
|
|
5746
5747
|
}, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
|
|
5747
5748
|
: vue.createCommentVNode("v-if", true)
|
|
5748
5749
|
]),
|
|
@@ -7193,10 +7194,43 @@ script.__file = "src/lib/components/core/auth/ShAuth.vue";
|
|
|
7193
7194
|
|
|
7194
7195
|
var isAllowedTo = {
|
|
7195
7196
|
mounted(el, binding) {
|
|
7196
|
-
const {user} = pinia.storeToRefs(useUserStore());
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7197
|
+
const { user } = pinia.storeToRefs(useUserStore());
|
|
7198
|
+
el.permission = binding.value;
|
|
7199
|
+
if (!user.value.isAllowedTo(binding.value)) {
|
|
7200
|
+
// store a reference to the parent node and next sibling
|
|
7201
|
+
el.parentNodeRef = el.parentNode;
|
|
7202
|
+
el.nextSiblingRef = el.nextSibling;
|
|
7203
|
+
// create a comment node
|
|
7204
|
+
el.commentNode = document.createComment(`v-if-user-can`);
|
|
7205
|
+
// replace element with comment node
|
|
7206
|
+
el.parentNode.replaceChild(el.commentNode, el);
|
|
7207
|
+
}
|
|
7208
|
+
},
|
|
7209
|
+
updated(el, binding) {
|
|
7210
|
+
const { user } = pinia.storeToRefs(useUserStore());
|
|
7211
|
+
if (!user.value.isAllowedTo(binding.value)) {
|
|
7212
|
+
// if the element is not already replaced, replace it with comment node
|
|
7213
|
+
if (el.parentNode) {
|
|
7214
|
+
el.parentNodeRef = el.parentNode;
|
|
7215
|
+
el.nextSiblingRef = el.nextSibling;
|
|
7216
|
+
if (!el.commentNode) {
|
|
7217
|
+
el.commentNode = document.createComment(`v-if-user-can`);
|
|
7218
|
+
}
|
|
7219
|
+
el.parentNode.replaceChild(el.commentNode, el);
|
|
7220
|
+
}
|
|
7221
|
+
} else {
|
|
7222
|
+
// if the comment node is present, replace it with the original element
|
|
7223
|
+
if (el.commentNode && el.parentNodeRef) {
|
|
7224
|
+
if (el.nextSiblingRef) {
|
|
7225
|
+
el.parentNodeRef.insertBefore(el, el.nextSiblingRef);
|
|
7226
|
+
} else {
|
|
7227
|
+
el.parentNodeRef.appendChild(el);
|
|
7228
|
+
}
|
|
7229
|
+
// remove the comment node from the parent node
|
|
7230
|
+
el.parentNodeRef.removeChild(el.commentNode);
|
|
7231
|
+
// remove the reference to the comment node
|
|
7232
|
+
el.commentNode = null;
|
|
7233
|
+
}
|
|
7200
7234
|
}
|
|
7201
7235
|
}
|
|
7202
7236
|
};
|
package/dist/library.mjs
CHANGED
|
@@ -3601,7 +3601,7 @@ return (_ctx, _cache) => {
|
|
|
3601
3601
|
: createCommentVNode("v-if", true)
|
|
3602
3602
|
], 2 /* CLASS */))
|
|
3603
3603
|
: createCommentVNode("v-if", true),
|
|
3604
|
-
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps(getComponentProps(field), {
|
|
3604
|
+
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps({ ref_for: true }, getComponentProps(field), {
|
|
3605
3605
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
3606
3606
|
onClick: $event => (fieldChanged(field.field)),
|
|
3607
3607
|
"onUpdate:modelValue": [$event => (fieldChanged(field.field)), $event => ((formFields.value[index].value) = $event)],
|
|
@@ -5730,7 +5730,8 @@ return (_ctx, _cache) => {
|
|
|
5730
5730
|
(_ctx.selectedRecord)
|
|
5731
5731
|
? (openBlock(), createBlock(resolveDynamicComponent(action.canvasComponent), mergeProps({
|
|
5732
5732
|
key: 0,
|
|
5733
|
-
onRecordUpdated: _ctx.reloadData
|
|
5733
|
+
onRecordUpdated: _ctx.reloadData,
|
|
5734
|
+
ref_for: true
|
|
5734
5735
|
}, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
|
|
5735
5736
|
: createCommentVNode("v-if", true)
|
|
5736
5737
|
]),
|
|
@@ -7181,10 +7182,43 @@ script.__file = "src/lib/components/core/auth/ShAuth.vue";
|
|
|
7181
7182
|
|
|
7182
7183
|
var isAllowedTo = {
|
|
7183
7184
|
mounted(el, binding) {
|
|
7184
|
-
const {user} = storeToRefs(useUserStore());
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7185
|
+
const { user } = storeToRefs(useUserStore());
|
|
7186
|
+
el.permission = binding.value;
|
|
7187
|
+
if (!user.value.isAllowedTo(binding.value)) {
|
|
7188
|
+
// store a reference to the parent node and next sibling
|
|
7189
|
+
el.parentNodeRef = el.parentNode;
|
|
7190
|
+
el.nextSiblingRef = el.nextSibling;
|
|
7191
|
+
// create a comment node
|
|
7192
|
+
el.commentNode = document.createComment(`v-if-user-can`);
|
|
7193
|
+
// replace element with comment node
|
|
7194
|
+
el.parentNode.replaceChild(el.commentNode, el);
|
|
7195
|
+
}
|
|
7196
|
+
},
|
|
7197
|
+
updated(el, binding) {
|
|
7198
|
+
const { user } = storeToRefs(useUserStore());
|
|
7199
|
+
if (!user.value.isAllowedTo(binding.value)) {
|
|
7200
|
+
// if the element is not already replaced, replace it with comment node
|
|
7201
|
+
if (el.parentNode) {
|
|
7202
|
+
el.parentNodeRef = el.parentNode;
|
|
7203
|
+
el.nextSiblingRef = el.nextSibling;
|
|
7204
|
+
if (!el.commentNode) {
|
|
7205
|
+
el.commentNode = document.createComment(`v-if-user-can`);
|
|
7206
|
+
}
|
|
7207
|
+
el.parentNode.replaceChild(el.commentNode, el);
|
|
7208
|
+
}
|
|
7209
|
+
} else {
|
|
7210
|
+
// if the comment node is present, replace it with the original element
|
|
7211
|
+
if (el.commentNode && el.parentNodeRef) {
|
|
7212
|
+
if (el.nextSiblingRef) {
|
|
7213
|
+
el.parentNodeRef.insertBefore(el, el.nextSiblingRef);
|
|
7214
|
+
} else {
|
|
7215
|
+
el.parentNodeRef.appendChild(el);
|
|
7216
|
+
}
|
|
7217
|
+
// remove the comment node from the parent node
|
|
7218
|
+
el.parentNodeRef.removeChild(el.commentNode);
|
|
7219
|
+
// remove the reference to the comment node
|
|
7220
|
+
el.commentNode = null;
|
|
7221
|
+
}
|
|
7188
7222
|
}
|
|
7189
7223
|
}
|
|
7190
7224
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iankibetsh/shframework",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.8",
|
|
4
4
|
"description": "Vue library for handling laravel backend",
|
|
5
5
|
"main": "dist/library.js",
|
|
6
6
|
"module": "dist/library.mjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"nprogress": "^0.2.0",
|
|
31
31
|
"pinia": "^2.0.22",
|
|
32
32
|
"sweetalert2": "^11.10.5",
|
|
33
|
-
"vue": "^3.
|
|
33
|
+
"vue": "^3.4.27"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@vitejs/plugin-vue": "^3.2.0",
|