@iankibetsh/shframework 4.7.4 → 4.7.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 +21 -5
- package/dist/library.mjs +22 -6
- package/package.json +1 -1
|
@@ -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
|
@@ -239,6 +239,22 @@ async function runPlainRequest(url, message, title, data){
|
|
|
239
239
|
allowOutsideClick: () => !Swal__default["default"].isLoading()
|
|
240
240
|
})
|
|
241
241
|
}
|
|
242
|
+
async function confirmAction(title,message){
|
|
243
|
+
if (typeof title === 'undefined') {
|
|
244
|
+
title = null;
|
|
245
|
+
}
|
|
246
|
+
return Swal__default["default"].fire({
|
|
247
|
+
title: title !== null ? title : 'Are you sure?',
|
|
248
|
+
html: message,
|
|
249
|
+
showCancelButton: true,
|
|
250
|
+
confirmButtonColor: '#32c787',
|
|
251
|
+
cancelButtonText: 'No, cancel',
|
|
252
|
+
confirmButtonText: 'Yes, Proceed!',
|
|
253
|
+
reverseButtons: true,
|
|
254
|
+
showLoaderOnConfirm: true,
|
|
255
|
+
allowOutsideClick: () => !Swal__default["default"].isLoading()
|
|
256
|
+
})
|
|
257
|
+
}
|
|
242
258
|
|
|
243
259
|
function formatDate(date, format){
|
|
244
260
|
if (!format) {
|
|
@@ -282,6 +298,7 @@ var shRepo = {
|
|
|
282
298
|
swalSuccess,
|
|
283
299
|
swalError,
|
|
284
300
|
runPlainRequest,
|
|
301
|
+
confirmAction,
|
|
285
302
|
getMenuCount,
|
|
286
303
|
setTabCounts,
|
|
287
304
|
getShConfig,
|
|
@@ -3613,7 +3630,7 @@ return (_ctx, _cache) => {
|
|
|
3613
3630
|
: vue.createCommentVNode("v-if", true)
|
|
3614
3631
|
], 2 /* CLASS */))
|
|
3615
3632
|
: vue.createCommentVNode("v-if", true),
|
|
3616
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps(
|
|
3633
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps(getComponentProps(field), {
|
|
3617
3634
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
3618
3635
|
onClick: $event => (fieldChanged(field.field)),
|
|
3619
3636
|
"onUpdate:modelValue": [$event => (fieldChanged(field.field)), $event => ((formFields.value[index].value) = $event)],
|
|
@@ -3646,6 +3663,7 @@ return (_ctx, _cache) => {
|
|
|
3646
3663
|
], 64 /* STABLE_FRAGMENT */))
|
|
3647
3664
|
], 2 /* CLASS */))
|
|
3648
3665
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
3666
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
|
3649
3667
|
vue.createElementVNode("div", {
|
|
3650
3668
|
class: vue.normalizeClass(getElementClass('formGroup'))
|
|
3651
3669
|
}, [
|
|
@@ -3663,8 +3681,7 @@ return (_ctx, _cache) => {
|
|
|
3663
3681
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14$3, "Submit"))
|
|
3664
3682
|
: vue.createCommentVNode("v-if", true)
|
|
3665
3683
|
], 14 /* CLASS, STYLE, PROPS */, _hoisted_12$5)
|
|
3666
|
-
], 2 /* CLASS */)
|
|
3667
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
3684
|
+
], 2 /* CLASS */)
|
|
3668
3685
|
], 34 /* CLASS, NEED_HYDRATION */)
|
|
3669
3686
|
], 64 /* STABLE_FRAGMENT */))
|
|
3670
3687
|
}
|
|
@@ -5742,8 +5759,7 @@ return (_ctx, _cache) => {
|
|
|
5742
5759
|
(_ctx.selectedRecord)
|
|
5743
5760
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(action.canvasComponent), vue.mergeProps({
|
|
5744
5761
|
key: 0,
|
|
5745
|
-
onRecordUpdated: _ctx.reloadData
|
|
5746
|
-
ref_for: true
|
|
5762
|
+
onRecordUpdated: _ctx.reloadData
|
|
5747
5763
|
}, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
|
|
5748
5764
|
: vue.createCommentVNode("v-if", true)
|
|
5749
5765
|
]),
|
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, watch, unref, createBlock, resolveDynamicComponent, normalizeClass, resolveComponent, inject, mergeProps,
|
|
6
|
+
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, watch, unref, createBlock, resolveDynamicComponent, normalizeClass, resolveComponent, inject, mergeProps, renderSlot, normalizeStyle, computed, createVNode, withCtx, vModelCheckbox, shallowRef, normalizeProps, pushScopeId, popScopeId, markRaw, isRef } from 'vue';
|
|
7
7
|
import _ from 'lodash';
|
|
8
8
|
import { defineStore, storeToRefs } from 'pinia';
|
|
9
9
|
import { useRoute, useRouter } from 'vue-router';
|
|
@@ -227,6 +227,22 @@ async function runPlainRequest(url, message, title, data){
|
|
|
227
227
|
allowOutsideClick: () => !Swal.isLoading()
|
|
228
228
|
})
|
|
229
229
|
}
|
|
230
|
+
async function confirmAction(title,message){
|
|
231
|
+
if (typeof title === 'undefined') {
|
|
232
|
+
title = null;
|
|
233
|
+
}
|
|
234
|
+
return Swal.fire({
|
|
235
|
+
title: title !== null ? title : 'Are you sure?',
|
|
236
|
+
html: message,
|
|
237
|
+
showCancelButton: true,
|
|
238
|
+
confirmButtonColor: '#32c787',
|
|
239
|
+
cancelButtonText: 'No, cancel',
|
|
240
|
+
confirmButtonText: 'Yes, Proceed!',
|
|
241
|
+
reverseButtons: true,
|
|
242
|
+
showLoaderOnConfirm: true,
|
|
243
|
+
allowOutsideClick: () => !Swal.isLoading()
|
|
244
|
+
})
|
|
245
|
+
}
|
|
230
246
|
|
|
231
247
|
function formatDate(date, format){
|
|
232
248
|
if (!format) {
|
|
@@ -270,6 +286,7 @@ var shRepo = {
|
|
|
270
286
|
swalSuccess,
|
|
271
287
|
swalError,
|
|
272
288
|
runPlainRequest,
|
|
289
|
+
confirmAction,
|
|
273
290
|
getMenuCount,
|
|
274
291
|
setTabCounts,
|
|
275
292
|
getShConfig,
|
|
@@ -3601,7 +3618,7 @@ return (_ctx, _cache) => {
|
|
|
3601
3618
|
: createCommentVNode("v-if", true)
|
|
3602
3619
|
], 2 /* CLASS */))
|
|
3603
3620
|
: createCommentVNode("v-if", true),
|
|
3604
|
-
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps(
|
|
3621
|
+
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps(getComponentProps(field), {
|
|
3605
3622
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
3606
3623
|
onClick: $event => (fieldChanged(field.field)),
|
|
3607
3624
|
"onUpdate:modelValue": [$event => (fieldChanged(field.field)), $event => ((formFields.value[index].value) = $event)],
|
|
@@ -3634,6 +3651,7 @@ return (_ctx, _cache) => {
|
|
|
3634
3651
|
], 64 /* STABLE_FRAGMENT */))
|
|
3635
3652
|
], 2 /* CLASS */))
|
|
3636
3653
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
3654
|
+
renderSlot(_ctx.$slots, "default"),
|
|
3637
3655
|
createElementVNode("div", {
|
|
3638
3656
|
class: normalizeClass(getElementClass('formGroup'))
|
|
3639
3657
|
}, [
|
|
@@ -3651,8 +3669,7 @@ return (_ctx, _cache) => {
|
|
|
3651
3669
|
? (openBlock(), createElementBlock("span", _hoisted_14$3, "Submit"))
|
|
3652
3670
|
: createCommentVNode("v-if", true)
|
|
3653
3671
|
], 14 /* CLASS, STYLE, PROPS */, _hoisted_12$5)
|
|
3654
|
-
], 2 /* CLASS */)
|
|
3655
|
-
renderSlot(_ctx.$slots, "default")
|
|
3672
|
+
], 2 /* CLASS */)
|
|
3656
3673
|
], 34 /* CLASS, NEED_HYDRATION */)
|
|
3657
3674
|
], 64 /* STABLE_FRAGMENT */))
|
|
3658
3675
|
}
|
|
@@ -5730,8 +5747,7 @@ return (_ctx, _cache) => {
|
|
|
5730
5747
|
(_ctx.selectedRecord)
|
|
5731
5748
|
? (openBlock(), createBlock(resolveDynamicComponent(action.canvasComponent), mergeProps({
|
|
5732
5749
|
key: 0,
|
|
5733
|
-
onRecordUpdated: _ctx.reloadData
|
|
5734
|
-
ref_for: true
|
|
5750
|
+
onRecordUpdated: _ctx.reloadData
|
|
5735
5751
|
}, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
|
|
5736
5752
|
: createCommentVNode("v-if", true)
|
|
5737
5753
|
]),
|