@iankibetsh/shframework 4.1.7 → 4.1.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/library.js +87 -77
- package/dist/library.mjs +88 -78
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -2033,10 +2033,10 @@ const _hoisted_1$n = {
|
|
|
2033
2033
|
const _hoisted_2$d = ["id"];
|
|
2034
2034
|
const _hoisted_3$c = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2035
2035
|
const _hoisted_4$c = ["onClick"];
|
|
2036
|
-
const _hoisted_5$
|
|
2037
|
-
const _hoisted_6$
|
|
2038
|
-
const _hoisted_7$
|
|
2039
|
-
const _hoisted_8$
|
|
2036
|
+
const _hoisted_5$a = ["id"];
|
|
2037
|
+
const _hoisted_6$9 = ["id", "aria-labelledby"];
|
|
2038
|
+
const _hoisted_7$8 = { key: 0 };
|
|
2039
|
+
const _hoisted_8$7 = ["onClick"];
|
|
2040
2040
|
const _hoisted_9$7 = {
|
|
2041
2041
|
key: 1,
|
|
2042
2042
|
class: "dropdown-item sh-suggest-no-results"
|
|
@@ -2158,7 +2158,7 @@ return (_ctx, _cache) => {
|
|
|
2158
2158
|
onInput: filterData,
|
|
2159
2159
|
onChange: filterData,
|
|
2160
2160
|
class: "flex-fill h-100 sh-suggestion-input"
|
|
2161
|
-
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$
|
|
2161
|
+
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$a)
|
|
2162
2162
|
], 8 /* PROPS */, _hoisted_2$d),
|
|
2163
2163
|
vue.createElementVNode("ul", {
|
|
2164
2164
|
class: "dropdown-menu w-100",
|
|
@@ -2171,12 +2171,12 @@ return (_ctx, _cache) => {
|
|
|
2171
2171
|
key: suggestion.id
|
|
2172
2172
|
}, [
|
|
2173
2173
|
(suggestion.name)
|
|
2174
|
-
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_7$
|
|
2174
|
+
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_7$8, [
|
|
2175
2175
|
vue.createElementVNode("a", {
|
|
2176
2176
|
onClick: $event => (addSuggestion(suggestion)),
|
|
2177
2177
|
class: vue.normalizeClass(["dropdown-item", vue.unref(selectedSuggestions).includes(suggestion) ? 'active':'']),
|
|
2178
2178
|
href: "#"
|
|
2179
|
-
}, vue.toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$
|
|
2179
|
+
}, vue.toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$7)
|
|
2180
2180
|
]))
|
|
2181
2181
|
: vue.createCommentVNode("v-if", true)
|
|
2182
2182
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -2184,7 +2184,7 @@ return (_ctx, _cache) => {
|
|
|
2184
2184
|
: (vue.unref(searchText))
|
|
2185
2185
|
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_9$7, " No results found "))
|
|
2186
2186
|
: (vue.openBlock(), vue.createElementBlock("li", _hoisted_10$6, " Type to search... "))
|
|
2187
|
-
], 8 /* PROPS */, _hoisted_6$
|
|
2187
|
+
], 8 /* PROPS */, _hoisted_6$9)
|
|
2188
2188
|
]))
|
|
2189
2189
|
: vue.createCommentVNode("v-if", true)
|
|
2190
2190
|
}
|
|
@@ -2535,10 +2535,10 @@ const _hoisted_3$b = {
|
|
|
2535
2535
|
role: "alert"
|
|
2536
2536
|
};
|
|
2537
2537
|
const _hoisted_4$b = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
|
|
2538
|
-
const _hoisted_5$
|
|
2539
|
-
const _hoisted_6$
|
|
2540
|
-
const _hoisted_7$
|
|
2541
|
-
const _hoisted_8$
|
|
2538
|
+
const _hoisted_5$9 = { key: 0 };
|
|
2539
|
+
const _hoisted_6$8 = { key: 1 };
|
|
2540
|
+
const _hoisted_7$7 = { class: "row" };
|
|
2541
|
+
const _hoisted_8$6 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2542
2542
|
const _hoisted_9$6 = { class: "col-md-12" };
|
|
2543
2543
|
const _hoisted_10$5 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
2544
2544
|
const _hoisted_11$5 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
@@ -2549,16 +2549,16 @@ const _hoisted_15$3 = ["disabled", "placeholder", "name", "onFocus", "onUpdate:m
|
|
|
2549
2549
|
const _hoisted_16$3 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2550
2550
|
const _hoisted_17$3 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2551
2551
|
const _hoisted_18$3 = ["value"];
|
|
2552
|
-
const _hoisted_19$
|
|
2552
|
+
const _hoisted_19$1 = {
|
|
2553
2553
|
key: 11,
|
|
2554
2554
|
class: "invalid-feedback"
|
|
2555
2555
|
};
|
|
2556
|
-
const _hoisted_20$
|
|
2556
|
+
const _hoisted_20$1 = {
|
|
2557
2557
|
key: 1,
|
|
2558
2558
|
class: "row"
|
|
2559
2559
|
};
|
|
2560
|
-
const _hoisted_21$
|
|
2561
|
-
const _hoisted_22$
|
|
2560
|
+
const _hoisted_21$1 = /*#__PURE__*/vue.createElementVNode("h5", null, "Confirm and Submit", -1 /* HOISTED */);
|
|
2561
|
+
const _hoisted_22$1 = /*#__PURE__*/vue.createElementVNode("p", null, [
|
|
2562
2562
|
/*#__PURE__*/vue.createTextVNode("By clicking submit, you agree to our "),
|
|
2563
2563
|
/*#__PURE__*/vue.createElementVNode("a", {
|
|
2564
2564
|
target: "_blank",
|
|
@@ -2570,9 +2570,9 @@ const _hoisted_22$2 = /*#__PURE__*/vue.createElementVNode("p", null, [
|
|
|
2570
2570
|
href: "https://hauzisha.co.ke/privacy-policy"
|
|
2571
2571
|
}, "privacy policy")
|
|
2572
2572
|
], -1 /* HOISTED */);
|
|
2573
|
-
const _hoisted_23$
|
|
2574
|
-
_hoisted_21$
|
|
2575
|
-
_hoisted_22$
|
|
2573
|
+
const _hoisted_23$1 = [
|
|
2574
|
+
_hoisted_21$1,
|
|
2575
|
+
_hoisted_22$1
|
|
2576
2576
|
];
|
|
2577
2577
|
const _hoisted_24$1 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
2578
2578
|
class: "spinner-border spinner-border-sm",
|
|
@@ -2593,8 +2593,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2593
2593
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$b, [
|
|
2594
2594
|
_hoisted_4$b,
|
|
2595
2595
|
(_ctx.errorText)
|
|
2596
|
-
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$
|
|
2597
|
-
: (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$
|
|
2596
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$9, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2597
|
+
: (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$8, "Unexpected Error Occurred")),
|
|
2598
2598
|
vue.createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
|
|
2599
2599
|
]))
|
|
2600
2600
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -2604,13 +2604,13 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2604
2604
|
}, null, 512 /* NEED_PATCH */), [
|
|
2605
2605
|
[vue.vModelText, _ctx.form_elements['id']]
|
|
2606
2606
|
]),
|
|
2607
|
-
vue.createElementVNode("div", _hoisted_7$
|
|
2607
|
+
vue.createElementVNode("div", _hoisted_7$7, [
|
|
2608
2608
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.fields, (field) => {
|
|
2609
2609
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
2610
2610
|
class: vue.normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
|
|
2611
2611
|
key: field
|
|
2612
2612
|
}, [
|
|
2613
|
-
vue.createElementVNode("label", _hoisted_8$
|
|
2613
|
+
vue.createElementVNode("label", _hoisted_8$6, vue.toDisplayString($options.getLabel(field)), 1 /* TEXT */),
|
|
2614
2614
|
vue.createElementVNode("div", _hoisted_9$6, [
|
|
2615
2615
|
($options.getFieldType(field) === 'component')
|
|
2616
2616
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.customComponent[field]), {
|
|
@@ -2763,14 +2763,14 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2763
2763
|
])
|
|
2764
2764
|
: vue.createCommentVNode("v-if", true),
|
|
2765
2765
|
(_ctx.form_errors[field] != null )
|
|
2766
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19$
|
|
2766
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19$1, vue.toDisplayString(_ctx.form_errors[field][0]), 1 /* TEXT */))
|
|
2767
2767
|
: vue.createCommentVNode("v-if", true)
|
|
2768
2768
|
])
|
|
2769
2769
|
], 2 /* CLASS */))
|
|
2770
2770
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2771
2771
|
]),
|
|
2772
2772
|
($props.hasTerms)
|
|
2773
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20$
|
|
2773
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20$1, _hoisted_23$1))
|
|
2774
2774
|
: vue.createCommentVNode("v-if", true),
|
|
2775
2775
|
(_ctx.form_status == 1)
|
|
2776
2776
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -3084,17 +3084,17 @@ const _hoisted_1$j = /*#__PURE__*/vue.createElementVNode("div", null, null, -1 /
|
|
|
3084
3084
|
const _hoisted_2$b = ["onUpdate:modelValue"];
|
|
3085
3085
|
const _hoisted_3$a = ["innerHTML"];
|
|
3086
3086
|
const _hoisted_4$a = ["innerHTML"];
|
|
3087
|
-
const _hoisted_5$
|
|
3087
|
+
const _hoisted_5$8 = {
|
|
3088
3088
|
key: 2,
|
|
3089
3089
|
class: "form-notch"
|
|
3090
3090
|
};
|
|
3091
|
-
const _hoisted_6$
|
|
3092
|
-
const _hoisted_7$
|
|
3093
|
-
const _hoisted_8$
|
|
3091
|
+
const _hoisted_6$7 = /*#__PURE__*/vue.createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* HOISTED */);
|
|
3092
|
+
const _hoisted_7$6 = /*#__PURE__*/vue.createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* HOISTED */);
|
|
3093
|
+
const _hoisted_8$5 = /*#__PURE__*/vue.createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* HOISTED */);
|
|
3094
3094
|
const _hoisted_9$5 = [
|
|
3095
|
-
_hoisted_6$
|
|
3096
|
-
_hoisted_7$
|
|
3097
|
-
_hoisted_8$
|
|
3095
|
+
_hoisted_6$7,
|
|
3096
|
+
_hoisted_7$6,
|
|
3097
|
+
_hoisted_8$5
|
|
3098
3098
|
];
|
|
3099
3099
|
const _hoisted_10$4 = ["innerHTML"];
|
|
3100
3100
|
const _hoisted_11$4 = ["disabled"];
|
|
@@ -3360,7 +3360,7 @@ return (_ctx, _cache) => {
|
|
|
3360
3360
|
}, null, 10 /* CLASS, PROPS */, _hoisted_4$a))
|
|
3361
3361
|
: vue.createCommentVNode("v-if", true),
|
|
3362
3362
|
(vue.unref(isFloating))
|
|
3363
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
3363
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$8, _hoisted_9$5))
|
|
3364
3364
|
: vue.createCommentVNode("v-if", true),
|
|
3365
3365
|
(field.helper)
|
|
3366
3366
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -3470,13 +3470,13 @@ const _hoisted_1$h = ["id"];
|
|
|
3470
3470
|
const _hoisted_2$9 = { class: "modal-content" };
|
|
3471
3471
|
const _hoisted_3$9 = { class: "modal-header" };
|
|
3472
3472
|
const _hoisted_4$9 = { class: "modal-title" };
|
|
3473
|
-
const _hoisted_5$
|
|
3473
|
+
const _hoisted_5$7 = /*#__PURE__*/vue.createElementVNode("button", {
|
|
3474
3474
|
class: "btn btn-danger btn-sm",
|
|
3475
3475
|
"data-bs-dismiss": "modal",
|
|
3476
3476
|
"data-dismiss": "modal"
|
|
3477
3477
|
}, "×", -1 /* HOISTED */);
|
|
3478
|
-
const _hoisted_6$
|
|
3479
|
-
const _hoisted_7$
|
|
3478
|
+
const _hoisted_6$6 = { class: "modal-body" };
|
|
3479
|
+
const _hoisted_7$5 = { class: "section" };
|
|
3480
3480
|
|
|
3481
3481
|
|
|
3482
3482
|
var script$k = {
|
|
@@ -3527,10 +3527,10 @@ return (_ctx, _cache) => {
|
|
|
3527
3527
|
vue.createElementVNode("div", _hoisted_2$9, [
|
|
3528
3528
|
vue.createElementVNode("div", _hoisted_3$9, [
|
|
3529
3529
|
vue.createElementVNode("h3", _hoisted_4$9, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
|
|
3530
|
-
_hoisted_5$
|
|
3530
|
+
_hoisted_5$7
|
|
3531
3531
|
]),
|
|
3532
|
-
vue.createElementVNode("div", _hoisted_6$
|
|
3533
|
-
vue.createElementVNode("div", _hoisted_7$
|
|
3532
|
+
vue.createElementVNode("div", _hoisted_6$6, [
|
|
3533
|
+
vue.createElementVNode("div", _hoisted_7$5, [
|
|
3534
3534
|
vue.renderSlot(_ctx.$slots, "default")
|
|
3535
3535
|
])
|
|
3536
3536
|
])
|
|
@@ -3852,12 +3852,20 @@ const useUserStore = pinia.defineStore('user-store', {
|
|
|
3852
3852
|
|
|
3853
3853
|
var script$f = {
|
|
3854
3854
|
name: 'Pagination',
|
|
3855
|
-
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle'],
|
|
3855
|
+
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle','perPage'],
|
|
3856
3856
|
data () {
|
|
3857
3857
|
return {
|
|
3858
3858
|
current_page: this.pagination_data.current,
|
|
3859
3859
|
per_page: this.pagination_data.per_page,
|
|
3860
|
-
loadingMore: 0
|
|
3860
|
+
loadingMore: 0,
|
|
3861
|
+
pageOptions: [10,25,50,100,200,400]
|
|
3862
|
+
}
|
|
3863
|
+
},
|
|
3864
|
+
mounted(){
|
|
3865
|
+
if(!this.pageOptions.includes(this.perPage)){
|
|
3866
|
+
const recordCount = this.pagination_data.record_count;
|
|
3867
|
+
recordCount > 0 && recordCount < this.perPage && this.pageOptions.push(recordCount);
|
|
3868
|
+
recordCount > 0 && recordCount >= this.perPage && this.pageOptions.push(this.perPage);
|
|
3861
3869
|
}
|
|
3862
3870
|
},
|
|
3863
3871
|
methods: {
|
|
@@ -3924,47 +3932,44 @@ var script$f = {
|
|
|
3924
3932
|
const _hoisted_1$c = { key: 0 };
|
|
3925
3933
|
const _hoisted_2$7 = { class: "record_count_body mb-3" };
|
|
3926
3934
|
const _hoisted_3$7 = /*#__PURE__*/vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
|
|
3927
|
-
const _hoisted_4$7 =
|
|
3928
|
-
const
|
|
3929
|
-
|
|
3930
|
-
];
|
|
3931
|
-
const _hoisted_10$3 = { class: "record_counts" };
|
|
3932
|
-
const _hoisted_11$3 = {
|
|
3935
|
+
const _hoisted_4$7 = ["value"];
|
|
3936
|
+
const _hoisted_5$6 = { class: "record_counts" };
|
|
3937
|
+
const _hoisted_6$5 = {
|
|
3933
3938
|
key: 0,
|
|
3934
3939
|
"aria-label": "Page navigation"
|
|
3935
3940
|
};
|
|
3936
|
-
const
|
|
3937
|
-
const
|
|
3941
|
+
const _hoisted_7$4 = { class: "pagination" };
|
|
3942
|
+
const _hoisted_8$4 = {
|
|
3938
3943
|
key: 0,
|
|
3939
3944
|
class: "page-link"
|
|
3940
3945
|
};
|
|
3941
|
-
const
|
|
3946
|
+
const _hoisted_9$4 = {
|
|
3942
3947
|
key: 1,
|
|
3943
3948
|
class: "page-link"
|
|
3944
3949
|
};
|
|
3945
|
-
const
|
|
3946
|
-
const
|
|
3947
|
-
const
|
|
3950
|
+
const _hoisted_10$3 = ["onClick"];
|
|
3951
|
+
const _hoisted_11$3 = { key: 1 };
|
|
3952
|
+
const _hoisted_12$2 = {
|
|
3948
3953
|
key: 0,
|
|
3949
3954
|
class: "text-center"
|
|
3950
3955
|
};
|
|
3951
|
-
const
|
|
3956
|
+
const _hoisted_13$2 = /*#__PURE__*/vue.createElementVNode("div", {
|
|
3952
3957
|
class: "spinner-border",
|
|
3953
3958
|
role: "status"
|
|
3954
3959
|
}, null, -1 /* HOISTED */);
|
|
3955
|
-
const
|
|
3956
|
-
|
|
3960
|
+
const _hoisted_14$2 = [
|
|
3961
|
+
_hoisted_13$2
|
|
3957
3962
|
];
|
|
3958
|
-
const
|
|
3963
|
+
const _hoisted_15$2 = {
|
|
3959
3964
|
key: 1,
|
|
3960
3965
|
class: "text-center"
|
|
3961
3966
|
};
|
|
3962
|
-
const
|
|
3963
|
-
const
|
|
3967
|
+
const _hoisted_16$2 = { class: "per_page_show" };
|
|
3968
|
+
const _hoisted_17$2 = {
|
|
3964
3969
|
key: 2,
|
|
3965
3970
|
class: "text-center"
|
|
3966
3971
|
};
|
|
3967
|
-
const
|
|
3972
|
+
const _hoisted_18$2 = {
|
|
3968
3973
|
key: 1,
|
|
3969
3974
|
class: "spinner-border"
|
|
3970
3975
|
};
|
|
@@ -3979,14 +3984,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3979
3984
|
class: "select_per_page",
|
|
3980
3985
|
onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
|
|
3981
3986
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
|
|
3982
|
-
},
|
|
3987
|
+
}, [
|
|
3988
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.pageOptions, (option) => {
|
|
3989
|
+
return (vue.openBlock(), vue.createElementBlock("option", { value: option }, vue.toDisplayString(option), 9 /* TEXT, PROPS */, _hoisted_4$7))
|
|
3990
|
+
}), 256 /* UNKEYED_FRAGMENT */))
|
|
3991
|
+
], 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
|
|
3983
3992
|
[vue.vModelSelect, $data.per_page]
|
|
3984
3993
|
]),
|
|
3985
|
-
vue.createElementVNode("span",
|
|
3994
|
+
vue.createElementVNode("span", _hoisted_5$6, " of " + vue.toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
|
|
3986
3995
|
]),
|
|
3987
3996
|
($props.pagination_data != null)
|
|
3988
|
-
? (vue.openBlock(), vue.createElementBlock("nav",
|
|
3989
|
-
vue.createElementVNode("ul",
|
|
3997
|
+
? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_6$5, [
|
|
3998
|
+
vue.createElementVNode("ul", _hoisted_7$4, [
|
|
3990
3999
|
vue.createElementVNode("li", {
|
|
3991
4000
|
class: vue.normalizeClass([$options.getActivePage === 1 ? 'disabled' : '' , "page-item"])
|
|
3992
4001
|
}, [
|
|
@@ -4001,14 +4010,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4001
4010
|
key: page
|
|
4002
4011
|
}, [
|
|
4003
4012
|
($options.getActivePage === page)
|
|
4004
|
-
? (vue.openBlock(), vue.createElementBlock("a",
|
|
4013
|
+
? (vue.openBlock(), vue.createElementBlock("a", _hoisted_8$4, vue.toDisplayString(page), 1 /* TEXT */))
|
|
4005
4014
|
: (['..','...'].includes(page))
|
|
4006
|
-
? (vue.openBlock(), vue.createElementBlock("a",
|
|
4015
|
+
? (vue.openBlock(), vue.createElementBlock("a", _hoisted_9$4, vue.toDisplayString(page), 1 /* TEXT */))
|
|
4007
4016
|
: (vue.openBlock(), vue.createElementBlock("a", {
|
|
4008
4017
|
key: 2,
|
|
4009
4018
|
onClick: $event => ($options.changeTableKey('page',page)),
|
|
4010
4019
|
class: "page-link"
|
|
4011
|
-
}, vue.toDisplayString(page), 9 /* TEXT, PROPS */,
|
|
4020
|
+
}, vue.toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$3))
|
|
4012
4021
|
], 2 /* CLASS */))
|
|
4013
4022
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4014
4023
|
vue.createElementVNode("li", {
|
|
@@ -4023,24 +4032,24 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4023
4032
|
]))
|
|
4024
4033
|
: vue.createCommentVNode("v-if", true)
|
|
4025
4034
|
]))
|
|
4026
|
-
: (vue.openBlock(), vue.createElementBlock("div",
|
|
4035
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$3, [
|
|
4027
4036
|
(this.pagination_data.loading === 1 && $props.loadMore && $props.hideLoadMore)
|
|
4028
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
4037
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$2, _hoisted_14$2))
|
|
4029
4038
|
: vue.createCommentVNode("v-if", true),
|
|
4030
4039
|
(!$props.hideCount)
|
|
4031
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
4032
|
-
vue.createElementVNode("span",
|
|
4040
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$2, [
|
|
4041
|
+
vue.createElementVNode("span", _hoisted_16$2, "Showing " + vue.toDisplayString($props.pagination_data.displayCount) + " of " + vue.toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
|
|
4033
4042
|
]))
|
|
4034
4043
|
: vue.createCommentVNode("v-if", true),
|
|
4035
4044
|
($props.pagination_data.displayCount < $props.pagination_data.record_count && !$props.hideLoadMore)
|
|
4036
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
4045
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17$2, [
|
|
4037
4046
|
(this.pagination_data.loading !== 1)
|
|
4038
4047
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
4039
4048
|
key: 0,
|
|
4040
4049
|
class: "btn btn-sm btn-primary mt-1",
|
|
4041
4050
|
onClick: _cache[4] || (_cache[4] = (...args) => ($options.loadMoreRecords && $options.loadMoreRecords(...args)))
|
|
4042
4051
|
}, " Load More "))
|
|
4043
|
-
: (vue.openBlock(), vue.createElementBlock("span",
|
|
4052
|
+
: (vue.openBlock(), vue.createElementBlock("span", _hoisted_18$2))
|
|
4044
4053
|
]))
|
|
4045
4054
|
: vue.createCommentVNode("v-if", true)
|
|
4046
4055
|
]))
|
|
@@ -4615,7 +4624,7 @@ const __default__ = {
|
|
|
4615
4624
|
filter_value: '',
|
|
4616
4625
|
loading: 'loading',
|
|
4617
4626
|
loading_error: '',
|
|
4618
|
-
records:
|
|
4627
|
+
records: null,
|
|
4619
4628
|
total: 0,
|
|
4620
4629
|
pagination_data: null,
|
|
4621
4630
|
moreDetailsId: null,
|
|
@@ -4797,14 +4806,14 @@ const __default__ = {
|
|
|
4797
4806
|
},
|
|
4798
4807
|
setCachedData: function (){
|
|
4799
4808
|
if (this.cacheKey) {
|
|
4800
|
-
this.records = ShStorage.getItem('sh_table_cache_' + this.cacheKey,
|
|
4809
|
+
this.records = ShStorage.getItem('sh_table_cache_' + this.cacheKey, null);
|
|
4801
4810
|
}
|
|
4802
4811
|
},
|
|
4803
4812
|
reloadData: function (page, append){
|
|
4804
4813
|
if (typeof page !== 'undefined') {
|
|
4805
4814
|
this.page = page;
|
|
4806
4815
|
}
|
|
4807
|
-
if (this.cacheKey && this.records
|
|
4816
|
+
if (this.cacheKey && this.records !== null) {
|
|
4808
4817
|
this.loading = 'done';
|
|
4809
4818
|
} else if (!append) {
|
|
4810
4819
|
this.loading = 'loading';
|
|
@@ -5360,11 +5369,12 @@ return (_ctx, _cache) => {
|
|
|
5360
5369
|
key: 6,
|
|
5361
5370
|
onLoadMoreRecords: _ctx.loadMoreRecords,
|
|
5362
5371
|
"hide-load-more": __props.hideLoadMore,
|
|
5372
|
+
"per-page": _ctx.per_page,
|
|
5363
5373
|
"hide-count": __props.hideCount,
|
|
5364
5374
|
pagination_data: _ctx.pagination_data,
|
|
5365
5375
|
onChangeKey: _ctx.changeKey,
|
|
5366
5376
|
"pagination-style": _ctx.pageStyle
|
|
5367
|
-
}, null, 8 /* PROPS */, ["onLoadMoreRecords", "hide-load-more", "hide-count", "pagination_data", "onChangeKey", "pagination-style"]))
|
|
5377
|
+
}, null, 8 /* PROPS */, ["onLoadMoreRecords", "hide-load-more", "per-page", "hide-count", "pagination_data", "onChangeKey", "pagination-style"]))
|
|
5368
5378
|
: vue.createCommentVNode("v-if", true),
|
|
5369
5379
|
(__props.actions)
|
|
5370
5380
|
? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 7 }, vue.renderList(__props.actions.actions, (action) => {
|
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, normalizeClass, resolveComponent, createBlock, resolveDynamicComponent, watch, inject, mergeProps, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps, withCtx,
|
|
6
|
+
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, unref, normalizeClass, resolveComponent, createBlock, resolveDynamicComponent, watch, 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';
|
|
@@ -2021,10 +2021,10 @@ const _hoisted_1$n = {
|
|
|
2021
2021
|
const _hoisted_2$d = ["id"];
|
|
2022
2022
|
const _hoisted_3$c = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2023
2023
|
const _hoisted_4$c = ["onClick"];
|
|
2024
|
-
const _hoisted_5$
|
|
2025
|
-
const _hoisted_6$
|
|
2026
|
-
const _hoisted_7$
|
|
2027
|
-
const _hoisted_8$
|
|
2024
|
+
const _hoisted_5$a = ["id"];
|
|
2025
|
+
const _hoisted_6$9 = ["id", "aria-labelledby"];
|
|
2026
|
+
const _hoisted_7$8 = { key: 0 };
|
|
2027
|
+
const _hoisted_8$7 = ["onClick"];
|
|
2028
2028
|
const _hoisted_9$7 = {
|
|
2029
2029
|
key: 1,
|
|
2030
2030
|
class: "dropdown-item sh-suggest-no-results"
|
|
@@ -2146,7 +2146,7 @@ return (_ctx, _cache) => {
|
|
|
2146
2146
|
onInput: filterData,
|
|
2147
2147
|
onChange: filterData,
|
|
2148
2148
|
class: "flex-fill h-100 sh-suggestion-input"
|
|
2149
|
-
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$
|
|
2149
|
+
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$a)
|
|
2150
2150
|
], 8 /* PROPS */, _hoisted_2$d),
|
|
2151
2151
|
createElementVNode("ul", {
|
|
2152
2152
|
class: "dropdown-menu w-100",
|
|
@@ -2159,12 +2159,12 @@ return (_ctx, _cache) => {
|
|
|
2159
2159
|
key: suggestion.id
|
|
2160
2160
|
}, [
|
|
2161
2161
|
(suggestion.name)
|
|
2162
|
-
? (openBlock(), createElementBlock("li", _hoisted_7$
|
|
2162
|
+
? (openBlock(), createElementBlock("li", _hoisted_7$8, [
|
|
2163
2163
|
createElementVNode("a", {
|
|
2164
2164
|
onClick: $event => (addSuggestion(suggestion)),
|
|
2165
2165
|
class: normalizeClass(["dropdown-item", unref(selectedSuggestions).includes(suggestion) ? 'active':'']),
|
|
2166
2166
|
href: "#"
|
|
2167
|
-
}, toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$
|
|
2167
|
+
}, toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$7)
|
|
2168
2168
|
]))
|
|
2169
2169
|
: createCommentVNode("v-if", true)
|
|
2170
2170
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -2172,7 +2172,7 @@ return (_ctx, _cache) => {
|
|
|
2172
2172
|
: (unref(searchText))
|
|
2173
2173
|
? (openBlock(), createElementBlock("li", _hoisted_9$7, " No results found "))
|
|
2174
2174
|
: (openBlock(), createElementBlock("li", _hoisted_10$6, " Type to search... "))
|
|
2175
|
-
], 8 /* PROPS */, _hoisted_6$
|
|
2175
|
+
], 8 /* PROPS */, _hoisted_6$9)
|
|
2176
2176
|
]))
|
|
2177
2177
|
: createCommentVNode("v-if", true)
|
|
2178
2178
|
}
|
|
@@ -2523,10 +2523,10 @@ const _hoisted_3$b = {
|
|
|
2523
2523
|
role: "alert"
|
|
2524
2524
|
};
|
|
2525
2525
|
const _hoisted_4$b = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
|
|
2526
|
-
const _hoisted_5$
|
|
2527
|
-
const _hoisted_6$
|
|
2528
|
-
const _hoisted_7$
|
|
2529
|
-
const _hoisted_8$
|
|
2526
|
+
const _hoisted_5$9 = { key: 0 };
|
|
2527
|
+
const _hoisted_6$8 = { key: 1 };
|
|
2528
|
+
const _hoisted_7$7 = { class: "row" };
|
|
2529
|
+
const _hoisted_8$6 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2530
2530
|
const _hoisted_9$6 = { class: "col-md-12" };
|
|
2531
2531
|
const _hoisted_10$5 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
2532
2532
|
const _hoisted_11$5 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
@@ -2537,16 +2537,16 @@ const _hoisted_15$3 = ["disabled", "placeholder", "name", "onFocus", "onUpdate:m
|
|
|
2537
2537
|
const _hoisted_16$3 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2538
2538
|
const _hoisted_17$3 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
2539
2539
|
const _hoisted_18$3 = ["value"];
|
|
2540
|
-
const _hoisted_19$
|
|
2540
|
+
const _hoisted_19$1 = {
|
|
2541
2541
|
key: 11,
|
|
2542
2542
|
class: "invalid-feedback"
|
|
2543
2543
|
};
|
|
2544
|
-
const _hoisted_20$
|
|
2544
|
+
const _hoisted_20$1 = {
|
|
2545
2545
|
key: 1,
|
|
2546
2546
|
class: "row"
|
|
2547
2547
|
};
|
|
2548
|
-
const _hoisted_21$
|
|
2549
|
-
const _hoisted_22$
|
|
2548
|
+
const _hoisted_21$1 = /*#__PURE__*/createElementVNode("h5", null, "Confirm and Submit", -1 /* HOISTED */);
|
|
2549
|
+
const _hoisted_22$1 = /*#__PURE__*/createElementVNode("p", null, [
|
|
2550
2550
|
/*#__PURE__*/createTextVNode("By clicking submit, you agree to our "),
|
|
2551
2551
|
/*#__PURE__*/createElementVNode("a", {
|
|
2552
2552
|
target: "_blank",
|
|
@@ -2558,9 +2558,9 @@ const _hoisted_22$2 = /*#__PURE__*/createElementVNode("p", null, [
|
|
|
2558
2558
|
href: "https://hauzisha.co.ke/privacy-policy"
|
|
2559
2559
|
}, "privacy policy")
|
|
2560
2560
|
], -1 /* HOISTED */);
|
|
2561
|
-
const _hoisted_23$
|
|
2562
|
-
_hoisted_21$
|
|
2563
|
-
_hoisted_22$
|
|
2561
|
+
const _hoisted_23$1 = [
|
|
2562
|
+
_hoisted_21$1,
|
|
2563
|
+
_hoisted_22$1
|
|
2564
2564
|
];
|
|
2565
2565
|
const _hoisted_24$1 = /*#__PURE__*/createElementVNode("span", {
|
|
2566
2566
|
class: "spinner-border spinner-border-sm",
|
|
@@ -2581,8 +2581,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2581
2581
|
? (openBlock(), createElementBlock("div", _hoisted_3$b, [
|
|
2582
2582
|
_hoisted_4$b,
|
|
2583
2583
|
(_ctx.errorText)
|
|
2584
|
-
? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
2585
|
-
: (openBlock(), createElementBlock("span", _hoisted_6$
|
|
2584
|
+
? (openBlock(), createElementBlock("span", _hoisted_5$9, toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2585
|
+
: (openBlock(), createElementBlock("span", _hoisted_6$8, "Unexpected Error Occurred")),
|
|
2586
2586
|
createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
|
|
2587
2587
|
]))
|
|
2588
2588
|
: createCommentVNode("v-if", true),
|
|
@@ -2592,13 +2592,13 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2592
2592
|
}, null, 512 /* NEED_PATCH */), [
|
|
2593
2593
|
[vModelText, _ctx.form_elements['id']]
|
|
2594
2594
|
]),
|
|
2595
|
-
createElementVNode("div", _hoisted_7$
|
|
2595
|
+
createElementVNode("div", _hoisted_7$7, [
|
|
2596
2596
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.fields, (field) => {
|
|
2597
2597
|
return (openBlock(), createElementBlock("div", {
|
|
2598
2598
|
class: normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
|
|
2599
2599
|
key: field
|
|
2600
2600
|
}, [
|
|
2601
|
-
createElementVNode("label", _hoisted_8$
|
|
2601
|
+
createElementVNode("label", _hoisted_8$6, toDisplayString($options.getLabel(field)), 1 /* TEXT */),
|
|
2602
2602
|
createElementVNode("div", _hoisted_9$6, [
|
|
2603
2603
|
($options.getFieldType(field) === 'component')
|
|
2604
2604
|
? (openBlock(), createBlock(resolveDynamicComponent($props.customComponent[field]), {
|
|
@@ -2751,14 +2751,14 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2751
2751
|
])
|
|
2752
2752
|
: createCommentVNode("v-if", true),
|
|
2753
2753
|
(_ctx.form_errors[field] != null )
|
|
2754
|
-
? (openBlock(), createElementBlock("div", _hoisted_19$
|
|
2754
|
+
? (openBlock(), createElementBlock("div", _hoisted_19$1, toDisplayString(_ctx.form_errors[field][0]), 1 /* TEXT */))
|
|
2755
2755
|
: createCommentVNode("v-if", true)
|
|
2756
2756
|
])
|
|
2757
2757
|
], 2 /* CLASS */))
|
|
2758
2758
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2759
2759
|
]),
|
|
2760
2760
|
($props.hasTerms)
|
|
2761
|
-
? (openBlock(), createElementBlock("div", _hoisted_20$
|
|
2761
|
+
? (openBlock(), createElementBlock("div", _hoisted_20$1, _hoisted_23$1))
|
|
2762
2762
|
: createCommentVNode("v-if", true),
|
|
2763
2763
|
(_ctx.form_status == 1)
|
|
2764
2764
|
? (openBlock(), createElementBlock("button", {
|
|
@@ -3072,17 +3072,17 @@ const _hoisted_1$j = /*#__PURE__*/createElementVNode("div", null, null, -1 /* HO
|
|
|
3072
3072
|
const _hoisted_2$b = ["onUpdate:modelValue"];
|
|
3073
3073
|
const _hoisted_3$a = ["innerHTML"];
|
|
3074
3074
|
const _hoisted_4$a = ["innerHTML"];
|
|
3075
|
-
const _hoisted_5$
|
|
3075
|
+
const _hoisted_5$8 = {
|
|
3076
3076
|
key: 2,
|
|
3077
3077
|
class: "form-notch"
|
|
3078
3078
|
};
|
|
3079
|
-
const _hoisted_6$
|
|
3080
|
-
const _hoisted_7$
|
|
3081
|
-
const _hoisted_8$
|
|
3079
|
+
const _hoisted_6$7 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* HOISTED */);
|
|
3080
|
+
const _hoisted_7$6 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* HOISTED */);
|
|
3081
|
+
const _hoisted_8$5 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* HOISTED */);
|
|
3082
3082
|
const _hoisted_9$5 = [
|
|
3083
|
-
_hoisted_6$
|
|
3084
|
-
_hoisted_7$
|
|
3085
|
-
_hoisted_8$
|
|
3083
|
+
_hoisted_6$7,
|
|
3084
|
+
_hoisted_7$6,
|
|
3085
|
+
_hoisted_8$5
|
|
3086
3086
|
];
|
|
3087
3087
|
const _hoisted_10$4 = ["innerHTML"];
|
|
3088
3088
|
const _hoisted_11$4 = ["disabled"];
|
|
@@ -3348,7 +3348,7 @@ return (_ctx, _cache) => {
|
|
|
3348
3348
|
}, null, 10 /* CLASS, PROPS */, _hoisted_4$a))
|
|
3349
3349
|
: createCommentVNode("v-if", true),
|
|
3350
3350
|
(unref(isFloating))
|
|
3351
|
-
? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
3351
|
+
? (openBlock(), createElementBlock("div", _hoisted_5$8, _hoisted_9$5))
|
|
3352
3352
|
: createCommentVNode("v-if", true),
|
|
3353
3353
|
(field.helper)
|
|
3354
3354
|
? (openBlock(), createElementBlock("div", {
|
|
@@ -3458,13 +3458,13 @@ const _hoisted_1$h = ["id"];
|
|
|
3458
3458
|
const _hoisted_2$9 = { class: "modal-content" };
|
|
3459
3459
|
const _hoisted_3$9 = { class: "modal-header" };
|
|
3460
3460
|
const _hoisted_4$9 = { class: "modal-title" };
|
|
3461
|
-
const _hoisted_5$
|
|
3461
|
+
const _hoisted_5$7 = /*#__PURE__*/createElementVNode("button", {
|
|
3462
3462
|
class: "btn btn-danger btn-sm",
|
|
3463
3463
|
"data-bs-dismiss": "modal",
|
|
3464
3464
|
"data-dismiss": "modal"
|
|
3465
3465
|
}, "×", -1 /* HOISTED */);
|
|
3466
|
-
const _hoisted_6$
|
|
3467
|
-
const _hoisted_7$
|
|
3466
|
+
const _hoisted_6$6 = { class: "modal-body" };
|
|
3467
|
+
const _hoisted_7$5 = { class: "section" };
|
|
3468
3468
|
|
|
3469
3469
|
|
|
3470
3470
|
var script$k = {
|
|
@@ -3515,10 +3515,10 @@ return (_ctx, _cache) => {
|
|
|
3515
3515
|
createElementVNode("div", _hoisted_2$9, [
|
|
3516
3516
|
createElementVNode("div", _hoisted_3$9, [
|
|
3517
3517
|
createElementVNode("h3", _hoisted_4$9, toDisplayString(__props.modalTitle), 1 /* TEXT */),
|
|
3518
|
-
_hoisted_5$
|
|
3518
|
+
_hoisted_5$7
|
|
3519
3519
|
]),
|
|
3520
|
-
createElementVNode("div", _hoisted_6$
|
|
3521
|
-
createElementVNode("div", _hoisted_7$
|
|
3520
|
+
createElementVNode("div", _hoisted_6$6, [
|
|
3521
|
+
createElementVNode("div", _hoisted_7$5, [
|
|
3522
3522
|
renderSlot(_ctx.$slots, "default")
|
|
3523
3523
|
])
|
|
3524
3524
|
])
|
|
@@ -3840,12 +3840,20 @@ const useUserStore = defineStore('user-store', {
|
|
|
3840
3840
|
|
|
3841
3841
|
var script$f = {
|
|
3842
3842
|
name: 'Pagination',
|
|
3843
|
-
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle'],
|
|
3843
|
+
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle','perPage'],
|
|
3844
3844
|
data () {
|
|
3845
3845
|
return {
|
|
3846
3846
|
current_page: this.pagination_data.current,
|
|
3847
3847
|
per_page: this.pagination_data.per_page,
|
|
3848
|
-
loadingMore: 0
|
|
3848
|
+
loadingMore: 0,
|
|
3849
|
+
pageOptions: [10,25,50,100,200,400]
|
|
3850
|
+
}
|
|
3851
|
+
},
|
|
3852
|
+
mounted(){
|
|
3853
|
+
if(!this.pageOptions.includes(this.perPage)){
|
|
3854
|
+
const recordCount = this.pagination_data.record_count;
|
|
3855
|
+
recordCount > 0 && recordCount < this.perPage && this.pageOptions.push(recordCount);
|
|
3856
|
+
recordCount > 0 && recordCount >= this.perPage && this.pageOptions.push(this.perPage);
|
|
3849
3857
|
}
|
|
3850
3858
|
},
|
|
3851
3859
|
methods: {
|
|
@@ -3912,47 +3920,44 @@ var script$f = {
|
|
|
3912
3920
|
const _hoisted_1$c = { key: 0 };
|
|
3913
3921
|
const _hoisted_2$7 = { class: "record_count_body mb-3" };
|
|
3914
3922
|
const _hoisted_3$7 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
|
|
3915
|
-
const _hoisted_4$7 =
|
|
3916
|
-
const
|
|
3917
|
-
|
|
3918
|
-
];
|
|
3919
|
-
const _hoisted_10$3 = { class: "record_counts" };
|
|
3920
|
-
const _hoisted_11$3 = {
|
|
3923
|
+
const _hoisted_4$7 = ["value"];
|
|
3924
|
+
const _hoisted_5$6 = { class: "record_counts" };
|
|
3925
|
+
const _hoisted_6$5 = {
|
|
3921
3926
|
key: 0,
|
|
3922
3927
|
"aria-label": "Page navigation"
|
|
3923
3928
|
};
|
|
3924
|
-
const
|
|
3925
|
-
const
|
|
3929
|
+
const _hoisted_7$4 = { class: "pagination" };
|
|
3930
|
+
const _hoisted_8$4 = {
|
|
3926
3931
|
key: 0,
|
|
3927
3932
|
class: "page-link"
|
|
3928
3933
|
};
|
|
3929
|
-
const
|
|
3934
|
+
const _hoisted_9$4 = {
|
|
3930
3935
|
key: 1,
|
|
3931
3936
|
class: "page-link"
|
|
3932
3937
|
};
|
|
3933
|
-
const
|
|
3934
|
-
const
|
|
3935
|
-
const
|
|
3938
|
+
const _hoisted_10$3 = ["onClick"];
|
|
3939
|
+
const _hoisted_11$3 = { key: 1 };
|
|
3940
|
+
const _hoisted_12$2 = {
|
|
3936
3941
|
key: 0,
|
|
3937
3942
|
class: "text-center"
|
|
3938
3943
|
};
|
|
3939
|
-
const
|
|
3944
|
+
const _hoisted_13$2 = /*#__PURE__*/createElementVNode("div", {
|
|
3940
3945
|
class: "spinner-border",
|
|
3941
3946
|
role: "status"
|
|
3942
3947
|
}, null, -1 /* HOISTED */);
|
|
3943
|
-
const
|
|
3944
|
-
|
|
3948
|
+
const _hoisted_14$2 = [
|
|
3949
|
+
_hoisted_13$2
|
|
3945
3950
|
];
|
|
3946
|
-
const
|
|
3951
|
+
const _hoisted_15$2 = {
|
|
3947
3952
|
key: 1,
|
|
3948
3953
|
class: "text-center"
|
|
3949
3954
|
};
|
|
3950
|
-
const
|
|
3951
|
-
const
|
|
3955
|
+
const _hoisted_16$2 = { class: "per_page_show" };
|
|
3956
|
+
const _hoisted_17$2 = {
|
|
3952
3957
|
key: 2,
|
|
3953
3958
|
class: "text-center"
|
|
3954
3959
|
};
|
|
3955
|
-
const
|
|
3960
|
+
const _hoisted_18$2 = {
|
|
3956
3961
|
key: 1,
|
|
3957
3962
|
class: "spinner-border"
|
|
3958
3963
|
};
|
|
@@ -3967,14 +3972,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3967
3972
|
class: "select_per_page",
|
|
3968
3973
|
onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
|
|
3969
3974
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
|
|
3970
|
-
},
|
|
3975
|
+
}, [
|
|
3976
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($data.pageOptions, (option) => {
|
|
3977
|
+
return (openBlock(), createElementBlock("option", { value: option }, toDisplayString(option), 9 /* TEXT, PROPS */, _hoisted_4$7))
|
|
3978
|
+
}), 256 /* UNKEYED_FRAGMENT */))
|
|
3979
|
+
], 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
|
|
3971
3980
|
[vModelSelect, $data.per_page]
|
|
3972
3981
|
]),
|
|
3973
|
-
createElementVNode("span",
|
|
3982
|
+
createElementVNode("span", _hoisted_5$6, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
|
|
3974
3983
|
]),
|
|
3975
3984
|
($props.pagination_data != null)
|
|
3976
|
-
? (openBlock(), createElementBlock("nav",
|
|
3977
|
-
createElementVNode("ul",
|
|
3985
|
+
? (openBlock(), createElementBlock("nav", _hoisted_6$5, [
|
|
3986
|
+
createElementVNode("ul", _hoisted_7$4, [
|
|
3978
3987
|
createElementVNode("li", {
|
|
3979
3988
|
class: normalizeClass([$options.getActivePage === 1 ? 'disabled' : '' , "page-item"])
|
|
3980
3989
|
}, [
|
|
@@ -3989,14 +3998,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3989
3998
|
key: page
|
|
3990
3999
|
}, [
|
|
3991
4000
|
($options.getActivePage === page)
|
|
3992
|
-
? (openBlock(), createElementBlock("a",
|
|
4001
|
+
? (openBlock(), createElementBlock("a", _hoisted_8$4, toDisplayString(page), 1 /* TEXT */))
|
|
3993
4002
|
: (['..','...'].includes(page))
|
|
3994
|
-
? (openBlock(), createElementBlock("a",
|
|
4003
|
+
? (openBlock(), createElementBlock("a", _hoisted_9$4, toDisplayString(page), 1 /* TEXT */))
|
|
3995
4004
|
: (openBlock(), createElementBlock("a", {
|
|
3996
4005
|
key: 2,
|
|
3997
4006
|
onClick: $event => ($options.changeTableKey('page',page)),
|
|
3998
4007
|
class: "page-link"
|
|
3999
|
-
}, toDisplayString(page), 9 /* TEXT, PROPS */,
|
|
4008
|
+
}, toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$3))
|
|
4000
4009
|
], 2 /* CLASS */))
|
|
4001
4010
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4002
4011
|
createElementVNode("li", {
|
|
@@ -4011,24 +4020,24 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4011
4020
|
]))
|
|
4012
4021
|
: createCommentVNode("v-if", true)
|
|
4013
4022
|
]))
|
|
4014
|
-
: (openBlock(), createElementBlock("div",
|
|
4023
|
+
: (openBlock(), createElementBlock("div", _hoisted_11$3, [
|
|
4015
4024
|
(this.pagination_data.loading === 1 && $props.loadMore && $props.hideLoadMore)
|
|
4016
|
-
? (openBlock(), createElementBlock("div",
|
|
4025
|
+
? (openBlock(), createElementBlock("div", _hoisted_12$2, _hoisted_14$2))
|
|
4017
4026
|
: createCommentVNode("v-if", true),
|
|
4018
4027
|
(!$props.hideCount)
|
|
4019
|
-
? (openBlock(), createElementBlock("div",
|
|
4020
|
-
createElementVNode("span",
|
|
4028
|
+
? (openBlock(), createElementBlock("div", _hoisted_15$2, [
|
|
4029
|
+
createElementVNode("span", _hoisted_16$2, "Showing " + toDisplayString($props.pagination_data.displayCount) + " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
|
|
4021
4030
|
]))
|
|
4022
4031
|
: createCommentVNode("v-if", true),
|
|
4023
4032
|
($props.pagination_data.displayCount < $props.pagination_data.record_count && !$props.hideLoadMore)
|
|
4024
|
-
? (openBlock(), createElementBlock("div",
|
|
4033
|
+
? (openBlock(), createElementBlock("div", _hoisted_17$2, [
|
|
4025
4034
|
(this.pagination_data.loading !== 1)
|
|
4026
4035
|
? (openBlock(), createElementBlock("button", {
|
|
4027
4036
|
key: 0,
|
|
4028
4037
|
class: "btn btn-sm btn-primary mt-1",
|
|
4029
4038
|
onClick: _cache[4] || (_cache[4] = (...args) => ($options.loadMoreRecords && $options.loadMoreRecords(...args)))
|
|
4030
4039
|
}, " Load More "))
|
|
4031
|
-
: (openBlock(), createElementBlock("span",
|
|
4040
|
+
: (openBlock(), createElementBlock("span", _hoisted_18$2))
|
|
4032
4041
|
]))
|
|
4033
4042
|
: createCommentVNode("v-if", true)
|
|
4034
4043
|
]))
|
|
@@ -4603,7 +4612,7 @@ const __default__ = {
|
|
|
4603
4612
|
filter_value: '',
|
|
4604
4613
|
loading: 'loading',
|
|
4605
4614
|
loading_error: '',
|
|
4606
|
-
records:
|
|
4615
|
+
records: null,
|
|
4607
4616
|
total: 0,
|
|
4608
4617
|
pagination_data: null,
|
|
4609
4618
|
moreDetailsId: null,
|
|
@@ -4785,14 +4794,14 @@ const __default__ = {
|
|
|
4785
4794
|
},
|
|
4786
4795
|
setCachedData: function (){
|
|
4787
4796
|
if (this.cacheKey) {
|
|
4788
|
-
this.records = ShStorage.getItem('sh_table_cache_' + this.cacheKey,
|
|
4797
|
+
this.records = ShStorage.getItem('sh_table_cache_' + this.cacheKey, null);
|
|
4789
4798
|
}
|
|
4790
4799
|
},
|
|
4791
4800
|
reloadData: function (page, append){
|
|
4792
4801
|
if (typeof page !== 'undefined') {
|
|
4793
4802
|
this.page = page;
|
|
4794
4803
|
}
|
|
4795
|
-
if (this.cacheKey && this.records
|
|
4804
|
+
if (this.cacheKey && this.records !== null) {
|
|
4796
4805
|
this.loading = 'done';
|
|
4797
4806
|
} else if (!append) {
|
|
4798
4807
|
this.loading = 'loading';
|
|
@@ -5348,11 +5357,12 @@ return (_ctx, _cache) => {
|
|
|
5348
5357
|
key: 6,
|
|
5349
5358
|
onLoadMoreRecords: _ctx.loadMoreRecords,
|
|
5350
5359
|
"hide-load-more": __props.hideLoadMore,
|
|
5360
|
+
"per-page": _ctx.per_page,
|
|
5351
5361
|
"hide-count": __props.hideCount,
|
|
5352
5362
|
pagination_data: _ctx.pagination_data,
|
|
5353
5363
|
onChangeKey: _ctx.changeKey,
|
|
5354
5364
|
"pagination-style": _ctx.pageStyle
|
|
5355
|
-
}, null, 8 /* PROPS */, ["onLoadMoreRecords", "hide-load-more", "hide-count", "pagination_data", "onChangeKey", "pagination-style"]))
|
|
5365
|
+
}, null, 8 /* PROPS */, ["onLoadMoreRecords", "hide-load-more", "per-page", "hide-count", "pagination_data", "onChangeKey", "pagination-style"]))
|
|
5356
5366
|
: createCommentVNode("v-if", true),
|
|
5357
5367
|
(__props.actions)
|
|
5358
5368
|
? (openBlock(true), createElementBlock(Fragment, { key: 7 }, renderList(__props.actions.actions, (action) => {
|