@kiva/kv-shop 1.4.0 → 1.5.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.
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
v-if="updatingPaymentWrapper"
|
|
10
10
|
class="tw-mb-2"
|
|
11
11
|
/>
|
|
12
|
-
<kv-toast :ref="errorToast" />
|
|
13
12
|
</div>
|
|
14
13
|
</template>
|
|
15
14
|
|
|
@@ -18,7 +17,6 @@ import {
|
|
|
18
17
|
defineComponent, onMounted, ref, toRefs, watch,
|
|
19
18
|
} from 'vue-demi';
|
|
20
19
|
import KvLoadingSpinner from '@kiva/kv-components/vue/KvLoadingSpinner.vue';
|
|
21
|
-
import KvToast from '@kiva/kv-components/vue/KvToast.vue';
|
|
22
20
|
import type { PropType } from 'vue-demi';
|
|
23
21
|
import useBraintreeDropIn, { defaultPaymentTypes } from '../useBraintreeDropIn';
|
|
24
22
|
import type { PayPalFlowType, PaymentType } from '../useBraintreeDropIn';
|
|
@@ -26,7 +24,6 @@ import type { PayPalFlowType, PaymentType } from '../useBraintreeDropIn';
|
|
|
26
24
|
export default defineComponent({
|
|
27
25
|
components: {
|
|
28
26
|
KvLoadingSpinner,
|
|
29
|
-
KvToast,
|
|
30
27
|
},
|
|
31
28
|
props: {
|
|
32
29
|
amount: {
|
|
@@ -82,7 +79,7 @@ export default defineComponent({
|
|
|
82
79
|
default: true,
|
|
83
80
|
},
|
|
84
81
|
},
|
|
85
|
-
emits: ['transactions-enabled'],
|
|
82
|
+
emits: ['transactions-enabled', 'error'],
|
|
86
83
|
setup(props, { emit }) {
|
|
87
84
|
const {
|
|
88
85
|
amount,
|
|
@@ -101,11 +98,6 @@ export default defineComponent({
|
|
|
101
98
|
updateAmount,
|
|
102
99
|
} = useBraintreeDropIn(props.dropInName);
|
|
103
100
|
|
|
104
|
-
const errorToast = ref();
|
|
105
|
-
const showError = (message: string) => {
|
|
106
|
-
errorToast.value?.show(message, 'error', true);
|
|
107
|
-
};
|
|
108
|
-
|
|
109
101
|
watch(amount, (newValue) => {
|
|
110
102
|
updateAmount(newValue);
|
|
111
103
|
});
|
|
@@ -130,9 +122,9 @@ export default defineComponent({
|
|
|
130
122
|
});
|
|
131
123
|
} catch (e) {
|
|
132
124
|
if (e instanceof Error) {
|
|
133
|
-
|
|
125
|
+
emit('error', e?.message);
|
|
134
126
|
} else {
|
|
135
|
-
|
|
127
|
+
emit('error', 'An error has occured. Please refresh the page and try again.');
|
|
136
128
|
}
|
|
137
129
|
} finally {
|
|
138
130
|
updatingPaymentWrapper.value = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-shop",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@apollo/client": "^3.7.14",
|
|
41
|
-
"@kiva/kv-components": "^3.
|
|
41
|
+
"@kiva/kv-components": "^3.48.0",
|
|
42
42
|
"@types/braintree-web-drop-in": "^1.34.2",
|
|
43
43
|
"braintree-web-drop-in": "^1.37.0",
|
|
44
44
|
"numeral": "^2.0.6",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"optional": true
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "65803ebdda797ec7f58071b93f063143fb759830"
|
|
57
57
|
}
|