@iankibetsh/vue-streamline 1.2.5 → 1.2.7
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/package.json +1 -1
- package/src/App.vue +9 -9
- package/src/composables/useStreamline.js +3 -8
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import useStreamline from './composables/useStreamline.js'
|
|
3
3
|
import { onMounted, ref, toRefs } from 'vue'
|
|
4
4
|
|
|
5
|
-
const {loading, service:paybillService, getActionUrl,props,confirmAction} = useStreamline('mpesa/paybill')
|
|
5
|
+
const {loading, service:paybillService, getActionUrl,props,confirmAction} = useStreamline('mpesa/paybill',true)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
const foundPaybill = ref(null)
|
|
@@ -27,14 +27,14 @@ const findPaybill = async ()=>{
|
|
|
27
27
|
<template>
|
|
28
28
|
<div>
|
|
29
29
|
<hr/>
|
|
30
|
-
<h3>Destructed: {{ testKey }}</h3
|
|
31
|
-
<h3>Original: {{ props.testKey }}</h3
|
|
32
|
-
<h3>Original: {{ props.testKey }}</h3
|
|
33
|
-
<h3>Original: {{ props.testKey }}</h3
|
|
34
|
-
<h3>Original: {{ props.testKey }}</h3
|
|
35
|
-
<h3 class="text-success" >Loading : {{ loading }}</h3
|
|
36
|
-
<h1 @click="findPaybill">Get Paybill</h1
|
|
37
|
-
{{ foundPaybill }}
|
|
30
|
+
<!-- <h3>Destructed: {{ testKey }}</h3>-->
|
|
31
|
+
<!-- <h3>Original: {{ props.testKey }}</h3>-->
|
|
32
|
+
<!-- <h3>Original: {{ props.testKey }}</h3>-->
|
|
33
|
+
<!-- <h3>Original: {{ props.testKey }}</h3>-->
|
|
34
|
+
<!-- <h3>Original: {{ props.testKey }}</h3>-->
|
|
35
|
+
<!-- <h3 class="text-success" >Loading : {{ loading }}</h3>-->
|
|
36
|
+
<!-- <h1 @click="findPaybill">Get Paybill</h1>-->
|
|
37
|
+
<!-- {{ foundPaybill }}-->
|
|
38
38
|
</div>
|
|
39
39
|
</template>
|
|
40
40
|
|
|
@@ -57,11 +57,6 @@ const useStreamline = (stream, ...initialArgs) => {
|
|
|
57
57
|
|
|
58
58
|
const handler = {
|
|
59
59
|
get(target, prop, receiver) {
|
|
60
|
-
// Fetch properties if not already fetched
|
|
61
|
-
if (!propertiesFetched.value && !loading.value) {
|
|
62
|
-
fetchServiceProperties().then(() => target[prop])
|
|
63
|
-
}
|
|
64
|
-
|
|
65
60
|
if (prop in target) {
|
|
66
61
|
return target[prop]
|
|
67
62
|
}
|
|
@@ -130,14 +125,14 @@ const useStreamline = (stream, ...initialArgs) => {
|
|
|
130
125
|
}
|
|
131
126
|
|
|
132
127
|
onMounted(() => {
|
|
128
|
+
if (initialArgs.length > 0) {
|
|
129
|
+
fetchServiceProperties()
|
|
130
|
+
}
|
|
133
131
|
if (!enableCache) return
|
|
134
132
|
const cachedData = localStorage.getItem(cacheKey)
|
|
135
133
|
if (cachedData) {
|
|
136
134
|
assignProperties(JSON.parse(cachedData))
|
|
137
135
|
}
|
|
138
|
-
if (initialArgs.length > 0) {
|
|
139
|
-
fetchServiceProperties()
|
|
140
|
-
}
|
|
141
136
|
})
|
|
142
137
|
|
|
143
138
|
return {
|