@iankibetsh/shframework 4.7.8 → 4.8.0
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 +133 -97
- package/dist/library.mjs +133 -97
- package/package.json +1 -1
|
@@ -1,36 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
.colored-toast.swal2-icon-success {
|
|
3
|
-
background-color: #a5dc86 !important;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.colored-toast.swal2-icon-error {
|
|
7
|
-
background-color: #f27474 !important;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.colored-toast.swal2-icon-warning {
|
|
11
|
-
background-color: #f8bb86 !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.colored-toast.swal2-icon-info {
|
|
15
|
-
background-color: #3fc3ee !important;
|
|
16
|
-
}
|
|
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
|
-
}
|
|
33
|
-
|
|
34
2
|
.sh-phone{
|
|
35
3
|
display: flex;
|
|
36
4
|
width: 100%;
|
|
@@ -63,6 +31,38 @@
|
|
|
63
31
|
opacity: 0.5;
|
|
64
32
|
}
|
|
65
33
|
|
|
34
|
+
.colored-toast.swal2-icon-success {
|
|
35
|
+
background-color: #a5dc86 !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.colored-toast.swal2-icon-error {
|
|
39
|
+
background-color: #f27474 !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.colored-toast.swal2-icon-warning {
|
|
43
|
+
background-color: #f8bb86 !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.colored-toast.swal2-icon-info {
|
|
47
|
+
background-color: #3fc3ee !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.colored-toast.swal2-icon-question {
|
|
51
|
+
background-color: #87adbd !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.colored-toast .swal2-title {
|
|
55
|
+
color: white;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.colored-toast .swal2-close {
|
|
59
|
+
color: white;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.colored-toast .swal2-html-container {
|
|
63
|
+
color: white;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
.permissions-main {
|
|
67
67
|
background: #edeff2;
|
|
68
68
|
}
|
package/dist/library.js
CHANGED
|
@@ -3630,7 +3630,7 @@ return (_ctx, _cache) => {
|
|
|
3630
3630
|
: vue.createCommentVNode("v-if", true)
|
|
3631
3631
|
], 2 /* CLASS */))
|
|
3632
3632
|
: vue.createCommentVNode("v-if", true),
|
|
3633
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps(getComponentProps(field), {
|
|
3633
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps({ ref_for: true }, getComponentProps(field), {
|
|
3634
3634
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
3635
3635
|
onClick: $event => (fieldChanged(field.field)),
|
|
3636
3636
|
"onUpdate:modelValue": [$event => (fieldChanged(field.field)), $event => ((formFields.value[index].value) = $event)],
|
|
@@ -4866,17 +4866,18 @@ const _hoisted_22 = { class: "sh-thead" };
|
|
|
4866
4866
|
const _hoisted_23 = ["onClick"];
|
|
4867
4867
|
const _hoisted_24 = ["onClick"];
|
|
4868
4868
|
const _hoisted_25 = ["onClick"];
|
|
4869
|
-
const _hoisted_26 =
|
|
4869
|
+
const _hoisted_26 = ["onClick"];
|
|
4870
|
+
const _hoisted_27 = {
|
|
4870
4871
|
key: 0,
|
|
4871
4872
|
class: "text-capitalize"
|
|
4872
4873
|
};
|
|
4873
|
-
const
|
|
4874
|
-
const
|
|
4874
|
+
const _hoisted_28 = { class: "sh-tbody" };
|
|
4875
|
+
const _hoisted_29 = {
|
|
4875
4876
|
key: 0,
|
|
4876
4877
|
class: "text-center"
|
|
4877
4878
|
};
|
|
4878
|
-
const
|
|
4879
|
-
const
|
|
4879
|
+
const _hoisted_30 = ["colspan"];
|
|
4880
|
+
const _hoisted_31 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
|
|
4880
4881
|
/*#__PURE__*/vue.createElementVNode("div", {
|
|
4881
4882
|
class: "spinner-border",
|
|
4882
4883
|
role: "status"
|
|
@@ -4884,42 +4885,43 @@ const _hoisted_30 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
|
|
|
4884
4885
|
/*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4885
4886
|
])
|
|
4886
4887
|
], -1 /* HOISTED */);
|
|
4887
|
-
const
|
|
4888
|
-
|
|
4888
|
+
const _hoisted_32 = [
|
|
4889
|
+
_hoisted_31
|
|
4889
4890
|
];
|
|
4890
|
-
const
|
|
4891
|
+
const _hoisted_33 = {
|
|
4891
4892
|
key: 1,
|
|
4892
4893
|
class: "text-center alert alert-danger"
|
|
4893
4894
|
};
|
|
4894
|
-
const
|
|
4895
|
-
const
|
|
4895
|
+
const _hoisted_34 = ["colspan"];
|
|
4896
|
+
const _hoisted_35 = {
|
|
4896
4897
|
key: 2,
|
|
4897
4898
|
class: "text-center alert alert-info no_records"
|
|
4898
4899
|
};
|
|
4899
|
-
const
|
|
4900
|
-
const
|
|
4901
|
-
const
|
|
4902
|
-
const
|
|
4903
|
-
const
|
|
4900
|
+
const _hoisted_36 = ["colspan"];
|
|
4901
|
+
const _hoisted_37 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
|
|
4902
|
+
const _hoisted_38 = ["onClick"];
|
|
4903
|
+
const _hoisted_39 = { key: 1 };
|
|
4904
|
+
const _hoisted_40 = {
|
|
4904
4905
|
key: 2,
|
|
4905
4906
|
class: "text-success fw-bold"
|
|
4906
4907
|
};
|
|
4907
|
-
const
|
|
4908
|
-
const _hoisted_41 = ["innerHTML"];
|
|
4908
|
+
const _hoisted_41 = { key: 3 };
|
|
4909
4909
|
const _hoisted_42 = ["innerHTML"];
|
|
4910
4910
|
const _hoisted_43 = ["innerHTML"];
|
|
4911
|
-
const _hoisted_44 =
|
|
4911
|
+
const _hoisted_44 = ["innerHTML"];
|
|
4912
|
+
const _hoisted_45 = ["innerHTML"];
|
|
4913
|
+
const _hoisted_46 = {
|
|
4912
4914
|
key: 0,
|
|
4913
4915
|
style: {"white-space":"nowrap"}
|
|
4914
4916
|
};
|
|
4915
|
-
const
|
|
4916
|
-
const
|
|
4917
|
-
const
|
|
4918
|
-
const
|
|
4917
|
+
const _hoisted_47 = ["href"];
|
|
4918
|
+
const _hoisted_48 = ["title", "onClick"];
|
|
4919
|
+
const _hoisted_49 = { key: 5 };
|
|
4920
|
+
const _hoisted_50 = {
|
|
4919
4921
|
key: 0,
|
|
4920
4922
|
class: "text-center"
|
|
4921
4923
|
};
|
|
4922
|
-
const
|
|
4924
|
+
const _hoisted_51 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
|
|
4923
4925
|
/*#__PURE__*/vue.createElementVNode("div", {
|
|
4924
4926
|
class: "spinner-border",
|
|
4925
4927
|
role: "status"
|
|
@@ -4927,44 +4929,49 @@ const _hoisted_49 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
|
|
|
4927
4929
|
/*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4928
4930
|
])
|
|
4929
4931
|
], -1 /* HOISTED */);
|
|
4930
|
-
const
|
|
4931
|
-
|
|
4932
|
+
const _hoisted_52 = [
|
|
4933
|
+
_hoisted_51
|
|
4932
4934
|
];
|
|
4933
|
-
const
|
|
4934
|
-
const
|
|
4935
|
+
const _hoisted_53 = { key: 1 };
|
|
4936
|
+
const _hoisted_54 = {
|
|
4935
4937
|
key: 2,
|
|
4936
4938
|
class: "mobile-list-items"
|
|
4937
4939
|
};
|
|
4938
|
-
const
|
|
4939
|
-
const
|
|
4940
|
+
const _hoisted_55 = ["onClick"];
|
|
4941
|
+
const _hoisted_56 = {
|
|
4940
4942
|
key: 0,
|
|
4941
4943
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4942
4944
|
};
|
|
4943
|
-
const
|
|
4945
|
+
const _hoisted_57 = {
|
|
4944
4946
|
key: 1,
|
|
4945
4947
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4946
4948
|
};
|
|
4947
|
-
const
|
|
4949
|
+
const _hoisted_58 = {
|
|
4948
4950
|
key: 2,
|
|
4949
4951
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4950
4952
|
};
|
|
4951
|
-
const
|
|
4952
|
-
|
|
4953
|
+
const _hoisted_59 = {
|
|
4954
|
+
key: 3,
|
|
4955
|
+
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4956
|
+
};
|
|
4957
|
+
const _hoisted_60 = { key: 1 };
|
|
4958
|
+
const _hoisted_61 = {
|
|
4953
4959
|
key: 2,
|
|
4954
4960
|
class: "text-primary fw-bold"
|
|
4955
4961
|
};
|
|
4956
|
-
const
|
|
4957
|
-
const
|
|
4958
|
-
const
|
|
4959
|
-
const
|
|
4960
|
-
const
|
|
4961
|
-
const
|
|
4962
|
-
const
|
|
4963
|
-
const
|
|
4962
|
+
const _hoisted_62 = { key: 3 };
|
|
4963
|
+
const _hoisted_63 = ["innerHTML"];
|
|
4964
|
+
const _hoisted_64 = ["innerHTML"];
|
|
4965
|
+
const _hoisted_65 = ["innerHTML"];
|
|
4966
|
+
const _hoisted_66 = ["innerHTML"];
|
|
4967
|
+
const _hoisted_67 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
4968
|
+
const _hoisted_68 = { key: 0 };
|
|
4969
|
+
const _hoisted_69 = ["href"];
|
|
4970
|
+
const _hoisted_70 = ["title", "onClick"];
|
|
4964
4971
|
|
|
4965
4972
|
const __default__ = {
|
|
4966
4973
|
name: 'sh-table',
|
|
4967
|
-
props: ['endPoint', 'headers', 'cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange','selectedRange','noRecordsMessage'],
|
|
4974
|
+
props: ['endPoint', 'headers','disableMobileResponsive', 'cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange','selectedRange','noRecordsMessage'],
|
|
4968
4975
|
data(){
|
|
4969
4976
|
return {
|
|
4970
4977
|
order_by: '',
|
|
@@ -5391,7 +5398,7 @@ return (_ctx, _cache) => {
|
|
|
5391
5398
|
], 64 /* STABLE_FRAGMENT */))
|
|
5392
5399
|
: vue.createCommentVNode("v-if", true)
|
|
5393
5400
|
], 64 /* STABLE_FRAGMENT */))
|
|
5394
|
-
: (_ctx.windowWidth > 700)
|
|
5401
|
+
: (_ctx.windowWidth > 700 || __props.disableMobileResponsive)
|
|
5395
5402
|
? (vue.openBlock(), vue.createElementBlock("table", {
|
|
5396
5403
|
key: 4,
|
|
5397
5404
|
class: vue.normalizeClass(["table sh-table", __props.tableHover ? 'table-hover':''])
|
|
@@ -5406,47 +5413,53 @@ return (_ctx, _cache) => {
|
|
|
5406
5413
|
class: "text-capitalize",
|
|
5407
5414
|
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5408
5415
|
}, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
|
|
5409
|
-
: (typeof title === '
|
|
5416
|
+
: (typeof title === 'object')
|
|
5410
5417
|
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
5411
5418
|
key: 1,
|
|
5412
5419
|
class: "text-capitalize",
|
|
5413
|
-
onClick: $event => (_ctx.changeKey('order_by',title
|
|
5414
|
-
}, vue.toDisplayString(title
|
|
5415
|
-
: (typeof title
|
|
5420
|
+
onClick: $event => (_ctx.changeKey('order_by',title.key))
|
|
5421
|
+
}, vue.toDisplayString(title.label ?? title.key.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
|
|
5422
|
+
: (typeof title === 'function')
|
|
5416
5423
|
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
5417
5424
|
key: 2,
|
|
5418
5425
|
class: "text-capitalize",
|
|
5419
|
-
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5420
|
-
}, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
|
|
5421
|
-
:
|
|
5426
|
+
onClick: $event => (_ctx.changeKey('order_by',title(null)))
|
|
5427
|
+
}, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
|
|
5428
|
+
: (typeof title !== 'undefined')
|
|
5429
|
+
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
5430
|
+
key: 3,
|
|
5431
|
+
class: "text-capitalize",
|
|
5432
|
+
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5433
|
+
}, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_26))
|
|
5434
|
+
: vue.createCommentVNode("v-if", true)
|
|
5422
5435
|
]))
|
|
5423
5436
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5424
5437
|
(__props.actions)
|
|
5425
|
-
? (vue.openBlock(), vue.createElementBlock("th",
|
|
5438
|
+
? (vue.openBlock(), vue.createElementBlock("th", _hoisted_27, vue.toDisplayString(__props.actions.label), 1 /* TEXT */))
|
|
5426
5439
|
: vue.createCommentVNode("v-if", true)
|
|
5427
5440
|
])
|
|
5428
5441
|
]),
|
|
5429
|
-
vue.createElementVNode("tbody",
|
|
5442
|
+
vue.createElementVNode("tbody", _hoisted_28, [
|
|
5430
5443
|
(_ctx.loading === 'loading')
|
|
5431
|
-
? (vue.openBlock(), vue.createElementBlock("tr",
|
|
5444
|
+
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_29, [
|
|
5432
5445
|
vue.createElementVNode("td", {
|
|
5433
5446
|
colspan: _ctx.tableHeaders.length
|
|
5434
|
-
}, [...
|
|
5447
|
+
}, [..._hoisted_32], 8 /* PROPS */, _hoisted_30)
|
|
5435
5448
|
]))
|
|
5436
5449
|
: (_ctx.loading === 'error')
|
|
5437
|
-
? (vue.openBlock(), vue.createElementBlock("tr",
|
|
5450
|
+
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_33, [
|
|
5438
5451
|
vue.createElementVNode("td", {
|
|
5439
5452
|
colspan: _ctx.tableHeaders.length
|
|
5440
|
-
}, vue.toDisplayString(_ctx.loading_error), 9 /* TEXT, PROPS */,
|
|
5453
|
+
}, vue.toDisplayString(_ctx.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
|
|
5441
5454
|
]))
|
|
5442
5455
|
: (_ctx.records.length === 0)
|
|
5443
|
-
? (vue.openBlock(), vue.createElementBlock("tr",
|
|
5456
|
+
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_35, [
|
|
5444
5457
|
vue.createElementVNode("td", {
|
|
5445
5458
|
colspan: __props.actions ? _ctx.tableHeaders.length + 1 : _ctx.tableHeaders.length
|
|
5446
5459
|
}, [
|
|
5447
|
-
|
|
5460
|
+
_hoisted_37,
|
|
5448
5461
|
vue.createTextVNode(" No records found ")
|
|
5449
|
-
], 8 /* PROPS */,
|
|
5462
|
+
], 8 /* PROPS */, _hoisted_36)
|
|
5450
5463
|
]))
|
|
5451
5464
|
: (_ctx.loading === 'done')
|
|
5452
5465
|
? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList(_ctx.records, (record, index) => {
|
|
@@ -5466,29 +5479,39 @@ return (_ctx, _cache) => {
|
|
|
5466
5479
|
innerHTML: record[key]
|
|
5467
5480
|
}, null, 8 /* PROPS */, ["target", "to", "class", "innerHTML"]))
|
|
5468
5481
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5469
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5482
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_39, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5470
5483
|
: (_ctx.getFieldType(key) === 'money')
|
|
5471
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5484
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_40, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5472
5485
|
: (_ctx.getFieldType(key) === 'date')
|
|
5473
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5486
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_41, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5474
5487
|
: (typeof key === 'string')
|
|
5475
5488
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5476
5489
|
key: 4,
|
|
5477
5490
|
innerHTML: record[key]
|
|
5478
|
-
}, null, 8 /* PROPS */,
|
|
5491
|
+
}, null, 8 /* PROPS */, _hoisted_42))
|
|
5479
5492
|
: (typeof key === 'function')
|
|
5480
5493
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5481
5494
|
key: 5,
|
|
5482
5495
|
innerHTML: key(record, index)
|
|
5483
|
-
}, null, 8 /* PROPS */, _hoisted_42))
|
|
5484
|
-
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
5485
|
-
key: 6,
|
|
5486
|
-
innerHTML: record[key[0]]
|
|
5487
5496
|
}, null, 8 /* PROPS */, _hoisted_43))
|
|
5497
|
+
: (typeof key === 'object' && key.component)
|
|
5498
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), {
|
|
5499
|
+
key: 6,
|
|
5500
|
+
item: record
|
|
5501
|
+
}, null, 8 /* PROPS */, ["item"]))
|
|
5502
|
+
: (typeof key === 'object')
|
|
5503
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5504
|
+
key: 7,
|
|
5505
|
+
innerHTML: record[key.key ?? key.field]
|
|
5506
|
+
}, null, 8 /* PROPS */, _hoisted_44))
|
|
5507
|
+
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
5508
|
+
key: 8,
|
|
5509
|
+
innerHTML: record[key[0]]
|
|
5510
|
+
}, null, 8 /* PROPS */, _hoisted_45))
|
|
5488
5511
|
]))
|
|
5489
5512
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5490
5513
|
(__props.actions)
|
|
5491
|
-
? (vue.openBlock(), vue.createElementBlock("td",
|
|
5514
|
+
? (vue.openBlock(), vue.createElementBlock("td", _hoisted_46, [
|
|
5492
5515
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions.actions, (act) => {
|
|
5493
5516
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
5494
5517
|
key: act.path
|
|
@@ -5553,7 +5576,7 @@ return (_ctx, _cache) => {
|
|
|
5553
5576
|
}, null, 2 /* CLASS */))
|
|
5554
5577
|
: vue.createCommentVNode("v-if", true),
|
|
5555
5578
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5556
|
-
], 10 /* CLASS, PROPS */,
|
|
5579
|
+
], 10 /* CLASS, PROPS */, _hoisted_47))
|
|
5557
5580
|
: (act.emits)
|
|
5558
5581
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
5559
5582
|
key: 3,
|
|
@@ -5568,7 +5591,7 @@ return (_ctx, _cache) => {
|
|
|
5568
5591
|
}, null, 2 /* CLASS */))
|
|
5569
5592
|
: vue.createCommentVNode("v-if", true),
|
|
5570
5593
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5571
|
-
], 10 /* CLASS, PROPS */,
|
|
5594
|
+
], 10 /* CLASS, PROPS */, _hoisted_48))
|
|
5572
5595
|
: (!act.emits)
|
|
5573
5596
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
5574
5597
|
key: 4,
|
|
@@ -5596,20 +5619,20 @@ return (_ctx, _cache) => {
|
|
|
5596
5619
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5597
5620
|
]))
|
|
5598
5621
|
: vue.createCommentVNode("v-if", true)
|
|
5599
|
-
], 10 /* CLASS, PROPS */,
|
|
5622
|
+
], 10 /* CLASS, PROPS */, _hoisted_38))
|
|
5600
5623
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5601
5624
|
: vue.createCommentVNode("v-if", true)
|
|
5602
5625
|
])
|
|
5603
5626
|
], 2 /* CLASS */))
|
|
5604
|
-
: (vue.openBlock(), vue.createElementBlock("div",
|
|
5627
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_49, [
|
|
5605
5628
|
(_ctx.loading === 'loading')
|
|
5606
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5629
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [..._hoisted_52]))
|
|
5607
5630
|
: (_ctx.loading === 'error')
|
|
5608
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5631
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_53, [
|
|
5609
5632
|
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loading_error), 1 /* TEXT */)
|
|
5610
5633
|
]))
|
|
5611
5634
|
: (_ctx.loading === 'done')
|
|
5612
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5635
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_54, [
|
|
5613
5636
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.records, (record, index) => {
|
|
5614
5637
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
5615
5638
|
key: record.id,
|
|
@@ -5621,10 +5644,12 @@ return (_ctx, _cache) => {
|
|
|
5621
5644
|
key: key[0]
|
|
5622
5645
|
}, [
|
|
5623
5646
|
(typeof key === 'string' )
|
|
5624
|
-
? (vue.openBlock(), vue.createElementBlock("p",
|
|
5647
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5625
5648
|
: (typeof key === 'function')
|
|
5626
|
-
? (vue.openBlock(), vue.createElementBlock("p",
|
|
5627
|
-
: (
|
|
5649
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5650
|
+
: (typeof key === 'object')
|
|
5651
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_58, vue.toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5652
|
+
: (vue.openBlock(), vue.createElementBlock("p", _hoisted_59, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
5628
5653
|
vue.createElementVNode("span", null, [
|
|
5629
5654
|
(typeof key === 'string' && __props.links && __props.links[key])
|
|
5630
5655
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
@@ -5634,31 +5659,41 @@ return (_ctx, _cache) => {
|
|
|
5634
5659
|
innerHTML: record[key]
|
|
5635
5660
|
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
5636
5661
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5637
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5662
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5638
5663
|
: (_ctx.getFieldType(key) === 'money')
|
|
5639
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5664
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_61, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5640
5665
|
: (_ctx.getFieldType(key) === 'date')
|
|
5641
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5666
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_62, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5642
5667
|
: (typeof key === 'string')
|
|
5643
5668
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5644
5669
|
key: 4,
|
|
5645
5670
|
innerHTML: record[key]
|
|
5646
|
-
}, null, 8 /* PROPS */,
|
|
5647
|
-
: (typeof key === '
|
|
5648
|
-
? (vue.openBlock(), vue.
|
|
5671
|
+
}, null, 8 /* PROPS */, _hoisted_63))
|
|
5672
|
+
: (typeof key === 'object' && key.component)
|
|
5673
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), {
|
|
5649
5674
|
key: 5,
|
|
5650
|
-
|
|
5651
|
-
}, null, 8 /* PROPS */,
|
|
5652
|
-
: (
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5675
|
+
item: record
|
|
5676
|
+
}, null, 8 /* PROPS */, ["item"]))
|
|
5677
|
+
: (typeof key === 'object')
|
|
5678
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5679
|
+
key: 6,
|
|
5680
|
+
innerHTML: record[key.key ?? key.field]
|
|
5681
|
+
}, null, 8 /* PROPS */, _hoisted_64))
|
|
5682
|
+
: (typeof key === 'function')
|
|
5683
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5684
|
+
key: 7,
|
|
5685
|
+
innerHTML: key(record, index )
|
|
5686
|
+
}, null, 8 /* PROPS */, _hoisted_65))
|
|
5687
|
+
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
5688
|
+
key: 8,
|
|
5689
|
+
innerHTML: record[key[0]]
|
|
5690
|
+
}, null, 8 /* PROPS */, _hoisted_66))
|
|
5656
5691
|
]),
|
|
5657
|
-
|
|
5692
|
+
_hoisted_67
|
|
5658
5693
|
], 64 /* STABLE_FRAGMENT */))
|
|
5659
5694
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5660
5695
|
(__props.actions)
|
|
5661
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5696
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_68, [
|
|
5662
5697
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions.actions, (act) => {
|
|
5663
5698
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
5664
5699
|
key: act.path
|
|
@@ -5681,7 +5716,7 @@ return (_ctx, _cache) => {
|
|
|
5681
5716
|
}, null, 2 /* CLASS */))
|
|
5682
5717
|
: vue.createCommentVNode("v-if", true),
|
|
5683
5718
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5684
|
-
], 10 /* CLASS, PROPS */,
|
|
5719
|
+
], 10 /* CLASS, PROPS */, _hoisted_69))
|
|
5685
5720
|
: (act.emits)
|
|
5686
5721
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
5687
5722
|
key: 1,
|
|
@@ -5696,7 +5731,7 @@ return (_ctx, _cache) => {
|
|
|
5696
5731
|
}, null, 2 /* CLASS */))
|
|
5697
5732
|
: vue.createCommentVNode("v-if", true),
|
|
5698
5733
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5699
|
-
], 10 /* CLASS, PROPS */,
|
|
5734
|
+
], 10 /* CLASS, PROPS */, _hoisted_70))
|
|
5700
5735
|
: (!act.emits)
|
|
5701
5736
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
5702
5737
|
key: 2,
|
|
@@ -5724,7 +5759,7 @@ return (_ctx, _cache) => {
|
|
|
5724
5759
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5725
5760
|
]))
|
|
5726
5761
|
: vue.createCommentVNode("v-if", true)
|
|
5727
|
-
], 8 /* PROPS */,
|
|
5762
|
+
], 8 /* PROPS */, _hoisted_55))
|
|
5728
5763
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5729
5764
|
]))
|
|
5730
5765
|
: vue.createCommentVNode("v-if", true)
|
|
@@ -5759,7 +5794,8 @@ return (_ctx, _cache) => {
|
|
|
5759
5794
|
(_ctx.selectedRecord)
|
|
5760
5795
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(action.canvasComponent), vue.mergeProps({
|
|
5761
5796
|
key: 0,
|
|
5762
|
-
onRecordUpdated: _ctx.reloadData
|
|
5797
|
+
onRecordUpdated: _ctx.reloadData,
|
|
5798
|
+
ref_for: true
|
|
5763
5799
|
}, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
|
|
5764
5800
|
: vue.createCommentVNode("v-if", true)
|
|
5765
5801
|
]),
|
package/dist/library.mjs
CHANGED
|
@@ -3618,7 +3618,7 @@ return (_ctx, _cache) => {
|
|
|
3618
3618
|
: createCommentVNode("v-if", true)
|
|
3619
3619
|
], 2 /* CLASS */))
|
|
3620
3620
|
: createCommentVNode("v-if", true),
|
|
3621
|
-
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps(getComponentProps(field), {
|
|
3621
|
+
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps({ ref_for: true }, getComponentProps(field), {
|
|
3622
3622
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
3623
3623
|
onClick: $event => (fieldChanged(field.field)),
|
|
3624
3624
|
"onUpdate:modelValue": [$event => (fieldChanged(field.field)), $event => ((formFields.value[index].value) = $event)],
|
|
@@ -4854,17 +4854,18 @@ const _hoisted_22 = { class: "sh-thead" };
|
|
|
4854
4854
|
const _hoisted_23 = ["onClick"];
|
|
4855
4855
|
const _hoisted_24 = ["onClick"];
|
|
4856
4856
|
const _hoisted_25 = ["onClick"];
|
|
4857
|
-
const _hoisted_26 =
|
|
4857
|
+
const _hoisted_26 = ["onClick"];
|
|
4858
|
+
const _hoisted_27 = {
|
|
4858
4859
|
key: 0,
|
|
4859
4860
|
class: "text-capitalize"
|
|
4860
4861
|
};
|
|
4861
|
-
const
|
|
4862
|
-
const
|
|
4862
|
+
const _hoisted_28 = { class: "sh-tbody" };
|
|
4863
|
+
const _hoisted_29 = {
|
|
4863
4864
|
key: 0,
|
|
4864
4865
|
class: "text-center"
|
|
4865
4866
|
};
|
|
4866
|
-
const
|
|
4867
|
-
const
|
|
4867
|
+
const _hoisted_30 = ["colspan"];
|
|
4868
|
+
const _hoisted_31 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
|
|
4868
4869
|
/*#__PURE__*/createElementVNode("div", {
|
|
4869
4870
|
class: "spinner-border",
|
|
4870
4871
|
role: "status"
|
|
@@ -4872,42 +4873,43 @@ const _hoisted_30 = /*#__PURE__*/createElementVNode("div", { class: "text-center
|
|
|
4872
4873
|
/*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4873
4874
|
])
|
|
4874
4875
|
], -1 /* HOISTED */);
|
|
4875
|
-
const
|
|
4876
|
-
|
|
4876
|
+
const _hoisted_32 = [
|
|
4877
|
+
_hoisted_31
|
|
4877
4878
|
];
|
|
4878
|
-
const
|
|
4879
|
+
const _hoisted_33 = {
|
|
4879
4880
|
key: 1,
|
|
4880
4881
|
class: "text-center alert alert-danger"
|
|
4881
4882
|
};
|
|
4882
|
-
const
|
|
4883
|
-
const
|
|
4883
|
+
const _hoisted_34 = ["colspan"];
|
|
4884
|
+
const _hoisted_35 = {
|
|
4884
4885
|
key: 2,
|
|
4885
4886
|
class: "text-center alert alert-info no_records"
|
|
4886
4887
|
};
|
|
4887
|
-
const
|
|
4888
|
-
const
|
|
4889
|
-
const
|
|
4890
|
-
const
|
|
4891
|
-
const
|
|
4888
|
+
const _hoisted_36 = ["colspan"];
|
|
4889
|
+
const _hoisted_37 = /*#__PURE__*/createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
|
|
4890
|
+
const _hoisted_38 = ["onClick"];
|
|
4891
|
+
const _hoisted_39 = { key: 1 };
|
|
4892
|
+
const _hoisted_40 = {
|
|
4892
4893
|
key: 2,
|
|
4893
4894
|
class: "text-success fw-bold"
|
|
4894
4895
|
};
|
|
4895
|
-
const
|
|
4896
|
-
const _hoisted_41 = ["innerHTML"];
|
|
4896
|
+
const _hoisted_41 = { key: 3 };
|
|
4897
4897
|
const _hoisted_42 = ["innerHTML"];
|
|
4898
4898
|
const _hoisted_43 = ["innerHTML"];
|
|
4899
|
-
const _hoisted_44 =
|
|
4899
|
+
const _hoisted_44 = ["innerHTML"];
|
|
4900
|
+
const _hoisted_45 = ["innerHTML"];
|
|
4901
|
+
const _hoisted_46 = {
|
|
4900
4902
|
key: 0,
|
|
4901
4903
|
style: {"white-space":"nowrap"}
|
|
4902
4904
|
};
|
|
4903
|
-
const
|
|
4904
|
-
const
|
|
4905
|
-
const
|
|
4906
|
-
const
|
|
4905
|
+
const _hoisted_47 = ["href"];
|
|
4906
|
+
const _hoisted_48 = ["title", "onClick"];
|
|
4907
|
+
const _hoisted_49 = { key: 5 };
|
|
4908
|
+
const _hoisted_50 = {
|
|
4907
4909
|
key: 0,
|
|
4908
4910
|
class: "text-center"
|
|
4909
4911
|
};
|
|
4910
|
-
const
|
|
4912
|
+
const _hoisted_51 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
|
|
4911
4913
|
/*#__PURE__*/createElementVNode("div", {
|
|
4912
4914
|
class: "spinner-border",
|
|
4913
4915
|
role: "status"
|
|
@@ -4915,44 +4917,49 @@ const _hoisted_49 = /*#__PURE__*/createElementVNode("div", { class: "text-center
|
|
|
4915
4917
|
/*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4916
4918
|
])
|
|
4917
4919
|
], -1 /* HOISTED */);
|
|
4918
|
-
const
|
|
4919
|
-
|
|
4920
|
+
const _hoisted_52 = [
|
|
4921
|
+
_hoisted_51
|
|
4920
4922
|
];
|
|
4921
|
-
const
|
|
4922
|
-
const
|
|
4923
|
+
const _hoisted_53 = { key: 1 };
|
|
4924
|
+
const _hoisted_54 = {
|
|
4923
4925
|
key: 2,
|
|
4924
4926
|
class: "mobile-list-items"
|
|
4925
4927
|
};
|
|
4926
|
-
const
|
|
4927
|
-
const
|
|
4928
|
+
const _hoisted_55 = ["onClick"];
|
|
4929
|
+
const _hoisted_56 = {
|
|
4928
4930
|
key: 0,
|
|
4929
4931
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4930
4932
|
};
|
|
4931
|
-
const
|
|
4933
|
+
const _hoisted_57 = {
|
|
4932
4934
|
key: 1,
|
|
4933
4935
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4934
4936
|
};
|
|
4935
|
-
const
|
|
4937
|
+
const _hoisted_58 = {
|
|
4936
4938
|
key: 2,
|
|
4937
4939
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4938
4940
|
};
|
|
4939
|
-
const
|
|
4940
|
-
|
|
4941
|
+
const _hoisted_59 = {
|
|
4942
|
+
key: 3,
|
|
4943
|
+
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4944
|
+
};
|
|
4945
|
+
const _hoisted_60 = { key: 1 };
|
|
4946
|
+
const _hoisted_61 = {
|
|
4941
4947
|
key: 2,
|
|
4942
4948
|
class: "text-primary fw-bold"
|
|
4943
4949
|
};
|
|
4944
|
-
const
|
|
4945
|
-
const
|
|
4946
|
-
const
|
|
4947
|
-
const
|
|
4948
|
-
const
|
|
4949
|
-
const
|
|
4950
|
-
const
|
|
4951
|
-
const
|
|
4950
|
+
const _hoisted_62 = { key: 3 };
|
|
4951
|
+
const _hoisted_63 = ["innerHTML"];
|
|
4952
|
+
const _hoisted_64 = ["innerHTML"];
|
|
4953
|
+
const _hoisted_65 = ["innerHTML"];
|
|
4954
|
+
const _hoisted_66 = ["innerHTML"];
|
|
4955
|
+
const _hoisted_67 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
4956
|
+
const _hoisted_68 = { key: 0 };
|
|
4957
|
+
const _hoisted_69 = ["href"];
|
|
4958
|
+
const _hoisted_70 = ["title", "onClick"];
|
|
4952
4959
|
|
|
4953
4960
|
const __default__ = {
|
|
4954
4961
|
name: 'sh-table',
|
|
4955
|
-
props: ['endPoint', 'headers', 'cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange','selectedRange','noRecordsMessage'],
|
|
4962
|
+
props: ['endPoint', 'headers','disableMobileResponsive', 'cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange','selectedRange','noRecordsMessage'],
|
|
4956
4963
|
data(){
|
|
4957
4964
|
return {
|
|
4958
4965
|
order_by: '',
|
|
@@ -5379,7 +5386,7 @@ return (_ctx, _cache) => {
|
|
|
5379
5386
|
], 64 /* STABLE_FRAGMENT */))
|
|
5380
5387
|
: createCommentVNode("v-if", true)
|
|
5381
5388
|
], 64 /* STABLE_FRAGMENT */))
|
|
5382
|
-
: (_ctx.windowWidth > 700)
|
|
5389
|
+
: (_ctx.windowWidth > 700 || __props.disableMobileResponsive)
|
|
5383
5390
|
? (openBlock(), createElementBlock("table", {
|
|
5384
5391
|
key: 4,
|
|
5385
5392
|
class: normalizeClass(["table sh-table", __props.tableHover ? 'table-hover':''])
|
|
@@ -5394,47 +5401,53 @@ return (_ctx, _cache) => {
|
|
|
5394
5401
|
class: "text-capitalize",
|
|
5395
5402
|
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5396
5403
|
}, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
|
|
5397
|
-
: (typeof title === '
|
|
5404
|
+
: (typeof title === 'object')
|
|
5398
5405
|
? (openBlock(), createElementBlock("a", {
|
|
5399
5406
|
key: 1,
|
|
5400
5407
|
class: "text-capitalize",
|
|
5401
|
-
onClick: $event => (_ctx.changeKey('order_by',title
|
|
5402
|
-
}, toDisplayString(title
|
|
5403
|
-
: (typeof title
|
|
5408
|
+
onClick: $event => (_ctx.changeKey('order_by',title.key))
|
|
5409
|
+
}, toDisplayString(title.label ?? title.key.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
|
|
5410
|
+
: (typeof title === 'function')
|
|
5404
5411
|
? (openBlock(), createElementBlock("a", {
|
|
5405
5412
|
key: 2,
|
|
5406
5413
|
class: "text-capitalize",
|
|
5407
|
-
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5408
|
-
}, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
|
|
5409
|
-
:
|
|
5414
|
+
onClick: $event => (_ctx.changeKey('order_by',title(null)))
|
|
5415
|
+
}, toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
|
|
5416
|
+
: (typeof title !== 'undefined')
|
|
5417
|
+
? (openBlock(), createElementBlock("a", {
|
|
5418
|
+
key: 3,
|
|
5419
|
+
class: "text-capitalize",
|
|
5420
|
+
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5421
|
+
}, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_26))
|
|
5422
|
+
: createCommentVNode("v-if", true)
|
|
5410
5423
|
]))
|
|
5411
5424
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5412
5425
|
(__props.actions)
|
|
5413
|
-
? (openBlock(), createElementBlock("th",
|
|
5426
|
+
? (openBlock(), createElementBlock("th", _hoisted_27, toDisplayString(__props.actions.label), 1 /* TEXT */))
|
|
5414
5427
|
: createCommentVNode("v-if", true)
|
|
5415
5428
|
])
|
|
5416
5429
|
]),
|
|
5417
|
-
createElementVNode("tbody",
|
|
5430
|
+
createElementVNode("tbody", _hoisted_28, [
|
|
5418
5431
|
(_ctx.loading === 'loading')
|
|
5419
|
-
? (openBlock(), createElementBlock("tr",
|
|
5432
|
+
? (openBlock(), createElementBlock("tr", _hoisted_29, [
|
|
5420
5433
|
createElementVNode("td", {
|
|
5421
5434
|
colspan: _ctx.tableHeaders.length
|
|
5422
|
-
}, [...
|
|
5435
|
+
}, [..._hoisted_32], 8 /* PROPS */, _hoisted_30)
|
|
5423
5436
|
]))
|
|
5424
5437
|
: (_ctx.loading === 'error')
|
|
5425
|
-
? (openBlock(), createElementBlock("tr",
|
|
5438
|
+
? (openBlock(), createElementBlock("tr", _hoisted_33, [
|
|
5426
5439
|
createElementVNode("td", {
|
|
5427
5440
|
colspan: _ctx.tableHeaders.length
|
|
5428
|
-
}, toDisplayString(_ctx.loading_error), 9 /* TEXT, PROPS */,
|
|
5441
|
+
}, toDisplayString(_ctx.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
|
|
5429
5442
|
]))
|
|
5430
5443
|
: (_ctx.records.length === 0)
|
|
5431
|
-
? (openBlock(), createElementBlock("tr",
|
|
5444
|
+
? (openBlock(), createElementBlock("tr", _hoisted_35, [
|
|
5432
5445
|
createElementVNode("td", {
|
|
5433
5446
|
colspan: __props.actions ? _ctx.tableHeaders.length + 1 : _ctx.tableHeaders.length
|
|
5434
5447
|
}, [
|
|
5435
|
-
|
|
5448
|
+
_hoisted_37,
|
|
5436
5449
|
createTextVNode(" No records found ")
|
|
5437
|
-
], 8 /* PROPS */,
|
|
5450
|
+
], 8 /* PROPS */, _hoisted_36)
|
|
5438
5451
|
]))
|
|
5439
5452
|
: (_ctx.loading === 'done')
|
|
5440
5453
|
? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(_ctx.records, (record, index) => {
|
|
@@ -5454,29 +5467,39 @@ return (_ctx, _cache) => {
|
|
|
5454
5467
|
innerHTML: record[key]
|
|
5455
5468
|
}, null, 8 /* PROPS */, ["target", "to", "class", "innerHTML"]))
|
|
5456
5469
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5457
|
-
? (openBlock(), createElementBlock("span",
|
|
5470
|
+
? (openBlock(), createElementBlock("span", _hoisted_39, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5458
5471
|
: (_ctx.getFieldType(key) === 'money')
|
|
5459
|
-
? (openBlock(), createElementBlock("span",
|
|
5472
|
+
? (openBlock(), createElementBlock("span", _hoisted_40, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5460
5473
|
: (_ctx.getFieldType(key) === 'date')
|
|
5461
|
-
? (openBlock(), createElementBlock("span",
|
|
5474
|
+
? (openBlock(), createElementBlock("span", _hoisted_41, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5462
5475
|
: (typeof key === 'string')
|
|
5463
5476
|
? (openBlock(), createElementBlock("span", {
|
|
5464
5477
|
key: 4,
|
|
5465
5478
|
innerHTML: record[key]
|
|
5466
|
-
}, null, 8 /* PROPS */,
|
|
5479
|
+
}, null, 8 /* PROPS */, _hoisted_42))
|
|
5467
5480
|
: (typeof key === 'function')
|
|
5468
5481
|
? (openBlock(), createElementBlock("span", {
|
|
5469
5482
|
key: 5,
|
|
5470
5483
|
innerHTML: key(record, index)
|
|
5471
|
-
}, null, 8 /* PROPS */, _hoisted_42))
|
|
5472
|
-
: (openBlock(), createElementBlock("span", {
|
|
5473
|
-
key: 6,
|
|
5474
|
-
innerHTML: record[key[0]]
|
|
5475
5484
|
}, null, 8 /* PROPS */, _hoisted_43))
|
|
5485
|
+
: (typeof key === 'object' && key.component)
|
|
5486
|
+
? (openBlock(), createBlock(resolveDynamicComponent(key.component), {
|
|
5487
|
+
key: 6,
|
|
5488
|
+
item: record
|
|
5489
|
+
}, null, 8 /* PROPS */, ["item"]))
|
|
5490
|
+
: (typeof key === 'object')
|
|
5491
|
+
? (openBlock(), createElementBlock("span", {
|
|
5492
|
+
key: 7,
|
|
5493
|
+
innerHTML: record[key.key ?? key.field]
|
|
5494
|
+
}, null, 8 /* PROPS */, _hoisted_44))
|
|
5495
|
+
: (openBlock(), createElementBlock("span", {
|
|
5496
|
+
key: 8,
|
|
5497
|
+
innerHTML: record[key[0]]
|
|
5498
|
+
}, null, 8 /* PROPS */, _hoisted_45))
|
|
5476
5499
|
]))
|
|
5477
5500
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5478
5501
|
(__props.actions)
|
|
5479
|
-
? (openBlock(), createElementBlock("td",
|
|
5502
|
+
? (openBlock(), createElementBlock("td", _hoisted_46, [
|
|
5480
5503
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions.actions, (act) => {
|
|
5481
5504
|
return (openBlock(), createElementBlock(Fragment, {
|
|
5482
5505
|
key: act.path
|
|
@@ -5541,7 +5564,7 @@ return (_ctx, _cache) => {
|
|
|
5541
5564
|
}, null, 2 /* CLASS */))
|
|
5542
5565
|
: createCommentVNode("v-if", true),
|
|
5543
5566
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5544
|
-
], 10 /* CLASS, PROPS */,
|
|
5567
|
+
], 10 /* CLASS, PROPS */, _hoisted_47))
|
|
5545
5568
|
: (act.emits)
|
|
5546
5569
|
? (openBlock(), createElementBlock("button", {
|
|
5547
5570
|
key: 3,
|
|
@@ -5556,7 +5579,7 @@ return (_ctx, _cache) => {
|
|
|
5556
5579
|
}, null, 2 /* CLASS */))
|
|
5557
5580
|
: createCommentVNode("v-if", true),
|
|
5558
5581
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5559
|
-
], 10 /* CLASS, PROPS */,
|
|
5582
|
+
], 10 /* CLASS, PROPS */, _hoisted_48))
|
|
5560
5583
|
: (!act.emits)
|
|
5561
5584
|
? (openBlock(), createBlock(_component_router_link, {
|
|
5562
5585
|
key: 4,
|
|
@@ -5584,20 +5607,20 @@ return (_ctx, _cache) => {
|
|
|
5584
5607
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5585
5608
|
]))
|
|
5586
5609
|
: createCommentVNode("v-if", true)
|
|
5587
|
-
], 10 /* CLASS, PROPS */,
|
|
5610
|
+
], 10 /* CLASS, PROPS */, _hoisted_38))
|
|
5588
5611
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5589
5612
|
: createCommentVNode("v-if", true)
|
|
5590
5613
|
])
|
|
5591
5614
|
], 2 /* CLASS */))
|
|
5592
|
-
: (openBlock(), createElementBlock("div",
|
|
5615
|
+
: (openBlock(), createElementBlock("div", _hoisted_49, [
|
|
5593
5616
|
(_ctx.loading === 'loading')
|
|
5594
|
-
? (openBlock(), createElementBlock("div",
|
|
5617
|
+
? (openBlock(), createElementBlock("div", _hoisted_50, [..._hoisted_52]))
|
|
5595
5618
|
: (_ctx.loading === 'error')
|
|
5596
|
-
? (openBlock(), createElementBlock("div",
|
|
5619
|
+
? (openBlock(), createElementBlock("div", _hoisted_53, [
|
|
5597
5620
|
createElementVNode("span", null, toDisplayString(_ctx.loading_error), 1 /* TEXT */)
|
|
5598
5621
|
]))
|
|
5599
5622
|
: (_ctx.loading === 'done')
|
|
5600
|
-
? (openBlock(), createElementBlock("div",
|
|
5623
|
+
? (openBlock(), createElementBlock("div", _hoisted_54, [
|
|
5601
5624
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.records, (record, index) => {
|
|
5602
5625
|
return (openBlock(), createElementBlock("div", {
|
|
5603
5626
|
key: record.id,
|
|
@@ -5609,10 +5632,12 @@ return (_ctx, _cache) => {
|
|
|
5609
5632
|
key: key[0]
|
|
5610
5633
|
}, [
|
|
5611
5634
|
(typeof key === 'string' )
|
|
5612
|
-
? (openBlock(), createElementBlock("p",
|
|
5635
|
+
? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5613
5636
|
: (typeof key === 'function')
|
|
5614
|
-
? (openBlock(), createElementBlock("p",
|
|
5615
|
-
: (
|
|
5637
|
+
? (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5638
|
+
: (typeof key === 'object')
|
|
5639
|
+
? (openBlock(), createElementBlock("p", _hoisted_58, toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5640
|
+
: (openBlock(), createElementBlock("p", _hoisted_59, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
5616
5641
|
createElementVNode("span", null, [
|
|
5617
5642
|
(typeof key === 'string' && __props.links && __props.links[key])
|
|
5618
5643
|
? (openBlock(), createBlock(_component_router_link, {
|
|
@@ -5622,31 +5647,41 @@ return (_ctx, _cache) => {
|
|
|
5622
5647
|
innerHTML: record[key]
|
|
5623
5648
|
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
5624
5649
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5625
|
-
? (openBlock(), createElementBlock("span",
|
|
5650
|
+
? (openBlock(), createElementBlock("span", _hoisted_60, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5626
5651
|
: (_ctx.getFieldType(key) === 'money')
|
|
5627
|
-
? (openBlock(), createElementBlock("span",
|
|
5652
|
+
? (openBlock(), createElementBlock("span", _hoisted_61, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5628
5653
|
: (_ctx.getFieldType(key) === 'date')
|
|
5629
|
-
? (openBlock(), createElementBlock("span",
|
|
5654
|
+
? (openBlock(), createElementBlock("span", _hoisted_62, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5630
5655
|
: (typeof key === 'string')
|
|
5631
5656
|
? (openBlock(), createElementBlock("span", {
|
|
5632
5657
|
key: 4,
|
|
5633
5658
|
innerHTML: record[key]
|
|
5634
|
-
}, null, 8 /* PROPS */,
|
|
5635
|
-
: (typeof key === '
|
|
5636
|
-
? (openBlock(),
|
|
5659
|
+
}, null, 8 /* PROPS */, _hoisted_63))
|
|
5660
|
+
: (typeof key === 'object' && key.component)
|
|
5661
|
+
? (openBlock(), createBlock(resolveDynamicComponent(key.component), {
|
|
5637
5662
|
key: 5,
|
|
5638
|
-
|
|
5639
|
-
}, null, 8 /* PROPS */,
|
|
5640
|
-
: (
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5663
|
+
item: record
|
|
5664
|
+
}, null, 8 /* PROPS */, ["item"]))
|
|
5665
|
+
: (typeof key === 'object')
|
|
5666
|
+
? (openBlock(), createElementBlock("span", {
|
|
5667
|
+
key: 6,
|
|
5668
|
+
innerHTML: record[key.key ?? key.field]
|
|
5669
|
+
}, null, 8 /* PROPS */, _hoisted_64))
|
|
5670
|
+
: (typeof key === 'function')
|
|
5671
|
+
? (openBlock(), createElementBlock("span", {
|
|
5672
|
+
key: 7,
|
|
5673
|
+
innerHTML: key(record, index )
|
|
5674
|
+
}, null, 8 /* PROPS */, _hoisted_65))
|
|
5675
|
+
: (openBlock(), createElementBlock("span", {
|
|
5676
|
+
key: 8,
|
|
5677
|
+
innerHTML: record[key[0]]
|
|
5678
|
+
}, null, 8 /* PROPS */, _hoisted_66))
|
|
5644
5679
|
]),
|
|
5645
|
-
|
|
5680
|
+
_hoisted_67
|
|
5646
5681
|
], 64 /* STABLE_FRAGMENT */))
|
|
5647
5682
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5648
5683
|
(__props.actions)
|
|
5649
|
-
? (openBlock(), createElementBlock("div",
|
|
5684
|
+
? (openBlock(), createElementBlock("div", _hoisted_68, [
|
|
5650
5685
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions.actions, (act) => {
|
|
5651
5686
|
return (openBlock(), createElementBlock(Fragment, {
|
|
5652
5687
|
key: act.path
|
|
@@ -5669,7 +5704,7 @@ return (_ctx, _cache) => {
|
|
|
5669
5704
|
}, null, 2 /* CLASS */))
|
|
5670
5705
|
: createCommentVNode("v-if", true),
|
|
5671
5706
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5672
|
-
], 10 /* CLASS, PROPS */,
|
|
5707
|
+
], 10 /* CLASS, PROPS */, _hoisted_69))
|
|
5673
5708
|
: (act.emits)
|
|
5674
5709
|
? (openBlock(), createElementBlock("button", {
|
|
5675
5710
|
key: 1,
|
|
@@ -5684,7 +5719,7 @@ return (_ctx, _cache) => {
|
|
|
5684
5719
|
}, null, 2 /* CLASS */))
|
|
5685
5720
|
: createCommentVNode("v-if", true),
|
|
5686
5721
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5687
|
-
], 10 /* CLASS, PROPS */,
|
|
5722
|
+
], 10 /* CLASS, PROPS */, _hoisted_70))
|
|
5688
5723
|
: (!act.emits)
|
|
5689
5724
|
? (openBlock(), createBlock(_component_router_link, {
|
|
5690
5725
|
key: 2,
|
|
@@ -5712,7 +5747,7 @@ return (_ctx, _cache) => {
|
|
|
5712
5747
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5713
5748
|
]))
|
|
5714
5749
|
: createCommentVNode("v-if", true)
|
|
5715
|
-
], 8 /* PROPS */,
|
|
5750
|
+
], 8 /* PROPS */, _hoisted_55))
|
|
5716
5751
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5717
5752
|
]))
|
|
5718
5753
|
: createCommentVNode("v-if", true)
|
|
@@ -5747,7 +5782,8 @@ return (_ctx, _cache) => {
|
|
|
5747
5782
|
(_ctx.selectedRecord)
|
|
5748
5783
|
? (openBlock(), createBlock(resolveDynamicComponent(action.canvasComponent), mergeProps({
|
|
5749
5784
|
key: 0,
|
|
5750
|
-
onRecordUpdated: _ctx.reloadData
|
|
5785
|
+
onRecordUpdated: _ctx.reloadData,
|
|
5786
|
+
ref_for: true
|
|
5751
5787
|
}, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
|
|
5752
5788
|
: createCommentVNode("v-if", true)
|
|
5753
5789
|
]),
|