@nuxt/scripts 0.11.10 → 0.12.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/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/C0XnD8hU.js +179 -0
- package/dist/client/_nuxt/CVO1_9PV.js +1 -0
- package/dist/client/_nuxt/Cp-IABpG.js +1 -0
- package/dist/client/_nuxt/D0r3Knsf.js +1 -0
- package/dist/client/_nuxt/DDcnVyjk.js +1 -0
- package/dist/client/_nuxt/DlfHMoPT.js +1 -0
- package/dist/client/_nuxt/DnkQskw_.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/639547f1-5b38-4078-9f06-0e97166e98d5.json +1 -0
- package/dist/client/_nuxt/entry.Bb8Z00UZ.css +1 -0
- package/dist/client/_nuxt/error-404.CImBk2QF.css +1 -0
- package/dist/client/_nuxt/error-500.BDZhF_NY.css +1 -0
- package/dist/client/_nuxt/n57rOy2v.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.d.mts +8 -2
- package/dist/module.json +3 -3
- package/dist/module.mjs +169 -42
- package/dist/registry.mjs +30 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +0 -0
- package/dist/runtime/components/{ScriptGoogleMaps.vue → GoogleMaps/ScriptGoogleMaps.vue} +17 -13
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +0 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.d.vue.ts +61 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue +86 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue.d.ts +61 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.d.vue.ts +33 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.vue +62 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.vue.d.ts +33 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.d.vue.ts +5 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue +32 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue.d.ts +5 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.d.vue.ts +35 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue +88 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue.d.ts +35 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.d.vue.ts +61 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue +84 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue.d.ts +61 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.d.vue.ts +27 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +56 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +27 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.d.vue.ts +5 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue +37 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue.d.ts +5 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.d.vue.ts +29 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue +60 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue.d.ts +29 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.d.vue.ts +29 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue +60 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue.d.ts +29 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.d.vue.ts +31 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue +61 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue.d.ts +31 -0
- package/dist/runtime/components/ScriptAriaLoadingIndicator.d.vue.ts +2 -0
- package/dist/runtime/components/ScriptCarbonAds.d.vue.ts +32 -0
- package/dist/runtime/components/ScriptCrisp.d.vue.ts +44 -0
- package/dist/runtime/components/ScriptCrisp.vue.d.ts +3 -1
- package/dist/runtime/components/ScriptGoogleAdsense.d.vue.ts +37 -0
- package/dist/runtime/components/ScriptGoogleAdsense.vue.d.ts +4 -1
- package/dist/runtime/components/ScriptIntercom.d.vue.ts +45 -0
- package/dist/runtime/components/ScriptIntercom.vue.d.ts +3 -1
- package/dist/runtime/components/ScriptLemonSqueezy.d.vue.ts +24 -0
- package/dist/runtime/components/ScriptLemonSqueezy.vue.d.ts +3 -1
- package/dist/runtime/components/ScriptLoadingIndicator.d.vue.ts +9 -0
- package/dist/runtime/components/ScriptLoadingIndicator.vue.d.ts +4 -1
- package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +72 -0
- package/dist/runtime/components/ScriptPayPalButtons.vue +116 -0
- package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +72 -0
- package/dist/runtime/components/ScriptPayPalMarks.d.vue.ts +51 -0
- package/dist/runtime/components/ScriptPayPalMarks.vue +69 -0
- package/dist/runtime/components/ScriptPayPalMarks.vue.d.ts +51 -0
- package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +67 -0
- package/dist/runtime/components/ScriptPayPalMessages.vue +90 -0
- package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +67 -0
- package/dist/runtime/components/ScriptStripePricingTable.d.vue.ts +35 -0
- package/dist/runtime/components/ScriptStripePricingTable.vue +1 -1
- package/dist/runtime/components/ScriptStripePricingTable.vue.d.ts +3 -1
- package/dist/runtime/components/ScriptVimeoPlayer.d.vue.ts +127 -0
- package/dist/runtime/components/ScriptVimeoPlayer.vue.d.ts +5 -3
- package/dist/runtime/components/ScriptYouTubePlayer.d.vue.ts +66 -0
- package/dist/runtime/components/ScriptYouTubePlayer.vue.d.ts +9 -1
- package/dist/runtime/composables/useScript.js +35 -2
- package/dist/runtime/composables/useScriptEventPage.js +6 -2
- package/dist/runtime/composables/useScriptTriggerIdleTimeout.d.ts +10 -0
- package/dist/runtime/composables/useScriptTriggerIdleTimeout.js +22 -0
- package/dist/runtime/composables/useScriptTriggerInteraction.d.ts +15 -0
- package/dist/runtime/composables/useScriptTriggerInteraction.js +35 -0
- package/dist/runtime/logger.d.ts +1 -0
- package/dist/runtime/logger.js +6 -0
- package/dist/runtime/registry/databuddy-analytics.d.ts +77 -0
- package/dist/runtime/registry/databuddy-analytics.js +103 -0
- package/dist/runtime/registry/google-analytics.d.ts +1 -1
- package/dist/runtime/registry/google-analytics.js +5 -5
- package/dist/runtime/registry/google-tag-manager.js +3 -5
- package/dist/runtime/registry/matomo-analytics.d.ts +1 -0
- package/dist/runtime/registry/matomo-analytics.js +27 -4
- package/dist/runtime/registry/paypal.d.ts +34 -0
- package/dist/runtime/registry/paypal.js +86 -0
- package/dist/runtime/registry/reddit-pixel.d.ts +18 -0
- package/dist/runtime/registry/reddit-pixel.js +36 -0
- package/dist/runtime/registry/stripe.d.ts +2 -2
- package/dist/runtime/registry/stripe.js +1 -1
- package/dist/runtime/types.d.ts +18 -7
- package/dist/runtime/utils.d.ts +5 -2
- package/dist/runtime/utils.js +49 -19
- package/package.json +33 -26
- package/dist/client/_nuxt/C0osJU87.js +0 -1
- package/dist/client/_nuxt/DvGN_dxb.js +0 -1
- package/dist/client/_nuxt/DzYp5PzF.js +0 -21
- package/dist/client/_nuxt/builds/meta/55b6d2d9-3309-4bdb-b3a7-e1a28ac5a730.json +0 -1
- package/dist/client/_nuxt/entry.bAQEPFjX.css +0 -1
- package/dist/client/_nuxt/error-404.eZgLTnTW.css +0 -1
- package/dist/client/_nuxt/error-500.B1rSPQ5Q.css +0 -1
- package/dist/client/_nuxt/o0sZgK8d.js +0 -1
- package/dist/runtime/components/ScriptGoogleMaps.vue.d.ts +0 -140
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { inject, onUnmounted } from "vue";
|
|
7
|
+
import { whenever } from "@vueuse/core";
|
|
8
|
+
import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
options: { type: Object, required: false }
|
|
11
|
+
});
|
|
12
|
+
const eventsWithoutPayload = [
|
|
13
|
+
"bounds_changed"
|
|
14
|
+
];
|
|
15
|
+
const eventsWithMapMouseEventPayload = [
|
|
16
|
+
"click",
|
|
17
|
+
"contextmenu",
|
|
18
|
+
"dblclick",
|
|
19
|
+
"drag",
|
|
20
|
+
"dragend",
|
|
21
|
+
"dragstart",
|
|
22
|
+
"mousedown",
|
|
23
|
+
"mousemove",
|
|
24
|
+
"mouseout",
|
|
25
|
+
"mouseover",
|
|
26
|
+
"mouseup"
|
|
27
|
+
];
|
|
28
|
+
const emit = defineEmits([]);
|
|
29
|
+
const mapContext = inject(MAP_INJECTION_KEY, void 0);
|
|
30
|
+
let rectangle = void 0;
|
|
31
|
+
whenever(() => mapContext?.map.value && mapContext.mapsApi.value, () => {
|
|
32
|
+
rectangle = new mapContext.mapsApi.value.Rectangle({
|
|
33
|
+
map: mapContext.map.value,
|
|
34
|
+
...props.options
|
|
35
|
+
});
|
|
36
|
+
setupRectangleEventListeners(rectangle);
|
|
37
|
+
whenever(() => props.options, (options) => {
|
|
38
|
+
rectangle?.setOptions(options);
|
|
39
|
+
}, {
|
|
40
|
+
deep: true
|
|
41
|
+
});
|
|
42
|
+
}, {
|
|
43
|
+
immediate: true,
|
|
44
|
+
once: true
|
|
45
|
+
});
|
|
46
|
+
onUnmounted(() => {
|
|
47
|
+
if (!rectangle || !mapContext?.mapsApi.value) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
mapContext.mapsApi.value.event.clearInstanceListeners(rectangle);
|
|
51
|
+
rectangle.setMap(null);
|
|
52
|
+
});
|
|
53
|
+
function setupRectangleEventListeners(rectangle2) {
|
|
54
|
+
eventsWithoutPayload.forEach((event) => {
|
|
55
|
+
rectangle2.addListener(event, () => emit(event));
|
|
56
|
+
});
|
|
57
|
+
eventsWithMapMouseEventPayload.forEach((event) => {
|
|
58
|
+
rectangle2.addListener(event, (payload) => emit(event, payload));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
options?: Omit<google.maps.RectangleOptions, 'map'>;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
+
click: (payload: google.maps.MapMouseEvent) => any;
|
|
6
|
+
contextmenu: (payload: google.maps.MapMouseEvent) => any;
|
|
7
|
+
dblclick: (payload: google.maps.MapMouseEvent) => any;
|
|
8
|
+
drag: (payload: google.maps.MapMouseEvent) => any;
|
|
9
|
+
dragend: (payload: google.maps.MapMouseEvent) => any;
|
|
10
|
+
dragstart: (payload: google.maps.MapMouseEvent) => any;
|
|
11
|
+
mousedown: (payload: google.maps.MapMouseEvent) => any;
|
|
12
|
+
mousemove: (payload: google.maps.MapMouseEvent) => any;
|
|
13
|
+
mouseout: (payload: google.maps.MapMouseEvent) => any;
|
|
14
|
+
mouseover: (payload: google.maps.MapMouseEvent) => any;
|
|
15
|
+
mouseup: (payload: google.maps.MapMouseEvent) => any;
|
|
16
|
+
bounds_changed: () => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
19
|
+
onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
20
|
+
onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
21
|
+
onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
22
|
+
onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
23
|
+
onDragstart?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
24
|
+
onMousedown?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
25
|
+
onMousemove?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
26
|
+
onMouseout?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
27
|
+
onMouseover?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
28
|
+
onMouseup?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
|
|
29
|
+
onBounds_changed?: (() => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
serve: string;
|
|
4
|
+
placement: string;
|
|
5
|
+
format: string;
|
|
6
|
+
/**
|
|
7
|
+
* Defines the trigger event to load the script.
|
|
8
|
+
*/
|
|
9
|
+
trigger?: ElementScriptTrigger;
|
|
10
|
+
};
|
|
11
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
awaitingLoad?: (props: typeof __VLS_1) => any;
|
|
14
|
+
} & {
|
|
15
|
+
loading?: (props: typeof __VLS_3) => any;
|
|
16
|
+
} & {
|
|
17
|
+
error?: (props: typeof __VLS_5) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
error: (error: string | Event) => any;
|
|
21
|
+
ready: (args_0: HTMLScriptElement) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
+
onError?: ((error: string | Event) => any) | undefined;
|
|
24
|
+
onReady?: ((args_0: HTMLScriptElement) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Defines the trigger event to load the script.
|
|
5
|
+
*/
|
|
6
|
+
trigger?: ElementScriptTrigger;
|
|
7
|
+
id: string;
|
|
8
|
+
runtimeConfig?: {
|
|
9
|
+
locale: string;
|
|
10
|
+
};
|
|
11
|
+
tokenId?: string;
|
|
12
|
+
cookieDomain?: string;
|
|
13
|
+
cookieExpiry?: number;
|
|
14
|
+
};
|
|
15
|
+
declare var __VLS_1: {
|
|
16
|
+
ready: any;
|
|
17
|
+
}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
default?: (props: typeof __VLS_1) => any;
|
|
20
|
+
} & {
|
|
21
|
+
awaitingLoad?: (props: typeof __VLS_3) => any;
|
|
22
|
+
} & {
|
|
23
|
+
loading?: (props: typeof __VLS_5) => any;
|
|
24
|
+
} & {
|
|
25
|
+
error?: (props: typeof __VLS_7) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
28
|
+
crisp: import("#nuxt-scripts/types").UseScriptContext<import("../registry/crisp.js").CrispApi>;
|
|
29
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
error: () => any;
|
|
31
|
+
ready: (e: import("#nuxt-scripts/types").UseScriptContext<import("../registry/crisp.js").CrispApi>) => any;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
33
|
+
onError?: (() => any) | undefined;
|
|
34
|
+
onReady?: ((e: import("#nuxt-scripts/types").UseScriptContext<import("../registry/crisp.js").CrispApi>) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
trigger: ElementScriptTrigger;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -32,7 +32,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
32
32
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
33
33
|
onError?: (() => any) | undefined;
|
|
34
34
|
onReady?: ((e: import("#nuxt-scripts/types").UseScriptContext<import("../registry/crisp.js").CrispApi>) => any) | undefined;
|
|
35
|
-
}>, {
|
|
35
|
+
}>, {
|
|
36
|
+
trigger: ElementScriptTrigger;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
38
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
37
39
|
export default _default;
|
|
38
40
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
dataAdClient: string;
|
|
4
|
+
dataAdSlot: string;
|
|
5
|
+
dataAdFormat?: 'auto' | 'rectangle' | 'vertical' | 'horizontal' | 'fluid' | 'autorelaxed';
|
|
6
|
+
dataAdLayout?: 'in-article' | 'in-feed' | 'fixed';
|
|
7
|
+
dataFullWidthResponsive?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Defines the trigger event to load the script.
|
|
10
|
+
*/
|
|
11
|
+
trigger?: ElementScriptTrigger;
|
|
12
|
+
};
|
|
13
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
awaitingLoad?: (props: typeof __VLS_1) => any;
|
|
16
|
+
} & {
|
|
17
|
+
loading?: (props: typeof __VLS_3) => any;
|
|
18
|
+
} & {
|
|
19
|
+
error?: (props: typeof __VLS_5) => any;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
error: () => any;
|
|
23
|
+
ready: (e: import("#nuxt-scripts/types").UseScriptContext<import("../registry/google-adsense.js").GoogleAdsenseApi>) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onError?: (() => any) | undefined;
|
|
26
|
+
onReady?: ((e: import("#nuxt-scripts/types").UseScriptContext<import("../registry/google-adsense.js").GoogleAdsenseApi>) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
dataAdFormat: "auto" | "rectangle" | "vertical" | "horizontal" | "fluid" | "autorelaxed";
|
|
29
|
+
dataFullWidthResponsive: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -24,7 +24,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
24
24
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
25
|
onError?: (() => any) | undefined;
|
|
26
26
|
onReady?: ((e: import("#nuxt-scripts/types").UseScriptContext<import("../registry/google-adsense.js").GoogleAdsenseApi>) => any) | undefined;
|
|
27
|
-
}>, {
|
|
27
|
+
}>, {
|
|
28
|
+
dataAdFormat: "auto" | "rectangle" | "vertical" | "horizontal" | "fluid" | "autorelaxed";
|
|
29
|
+
dataFullWidthResponsive: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
31
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
29
32
|
export default _default;
|
|
30
33
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
appId: string;
|
|
4
|
+
apiBase?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
userId?: string;
|
|
8
|
+
alignment?: 'left' | 'right';
|
|
9
|
+
horizontalPadding?: number;
|
|
10
|
+
verticalPadding?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Defines the trigger event to load the script.
|
|
13
|
+
*/
|
|
14
|
+
trigger?: ElementScriptTrigger;
|
|
15
|
+
};
|
|
16
|
+
declare var __VLS_1: {
|
|
17
|
+
ready: any;
|
|
18
|
+
}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_1) => any;
|
|
21
|
+
} & {
|
|
22
|
+
awaitingLoad?: (props: typeof __VLS_3) => any;
|
|
23
|
+
} & {
|
|
24
|
+
loading?: (props: typeof __VLS_5) => any;
|
|
25
|
+
} & {
|
|
26
|
+
error?: (props: typeof __VLS_7) => any;
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
29
|
+
intercom: import("#nuxt-scripts/types").UseScriptContext<import("../registry/intercom.js").IntercomApi>;
|
|
30
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
error: () => any;
|
|
32
|
+
ready: (e: import("#nuxt-scripts/types").UseScriptContext<import("../registry/intercom.js").IntercomApi>) => any;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
+
onError?: (() => any) | undefined;
|
|
35
|
+
onReady?: ((e: import("#nuxt-scripts/types").UseScriptContext<import("../registry/intercom.js").IntercomApi>) => any) | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
trigger: ElementScriptTrigger;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -33,7 +33,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
33
33
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
34
|
onError?: (() => any) | undefined;
|
|
35
35
|
onReady?: ((e: import("#nuxt-scripts/types").UseScriptContext<import("../registry/intercom.js").IntercomApi>) => any) | undefined;
|
|
36
|
-
}>, {
|
|
36
|
+
}>, {
|
|
37
|
+
trigger: ElementScriptTrigger;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
39
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
38
40
|
export default _default;
|
|
39
41
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ElementScriptTrigger } from '../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
trigger?: ElementScriptTrigger;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
ready: (args_0: import("../types.js").UseScriptContext<import("../registry/lemon-squeezy.js").LemonSqueezyApi>) => any;
|
|
11
|
+
lemonSqueezyEvent: (args_0: never) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onReady?: ((args_0: import("../types.js").UseScriptContext<import("../registry/lemon-squeezy.js").LemonSqueezyApi>) => any) | undefined;
|
|
14
|
+
onLemonSqueezyEvent?: ((args_0: never) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
trigger: ElementScriptTrigger;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -12,7 +12,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
13
|
onReady?: ((args_0: import("../types.js").UseScriptContext<import("../registry/lemon-squeezy.js").LemonSqueezyApi>) => any) | undefined;
|
|
14
14
|
onLemonSqueezyEvent?: ((args_0: never) => any) | undefined;
|
|
15
|
-
}>, {
|
|
15
|
+
}>, {
|
|
16
|
+
trigger: ElementScriptTrigger;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
18
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
17
19
|
export default _default;
|
|
18
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
color?: string;
|
|
3
|
+
size?: number;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
size: number;
|
|
7
|
+
color: string;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -2,5 +2,8 @@ type __VLS_Props = {
|
|
|
2
2
|
color?: string;
|
|
3
3
|
size?: number;
|
|
4
4
|
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
size: number;
|
|
7
|
+
color: string;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
9
|
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReservedProps } from 'vue';
|
|
2
|
+
import type { OnApproveActions, OnApproveData, OnCancelledActions, OnClickActions, OnShippingAddressChangeActions, OnShippingAddressChangeData, OnShippingOptionsChangeActions, OnShippingOptionsChangeData, PayPalButtonsComponentOptions, OnInitActions } from '@paypal/paypal-js';
|
|
3
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
4
|
+
import type { PayPalInput } from '../registry/paypal.js';
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
/**
|
|
7
|
+
* Customize the root element attributes.
|
|
8
|
+
*/
|
|
9
|
+
rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>;
|
|
10
|
+
/**
|
|
11
|
+
* Defines the trigger event to load the script.
|
|
12
|
+
*/
|
|
13
|
+
trigger?: ElementScriptTrigger;
|
|
14
|
+
/**
|
|
15
|
+
* The client id for the paypal script.
|
|
16
|
+
*/
|
|
17
|
+
clientId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The options for the paypal buttons.
|
|
20
|
+
*/
|
|
21
|
+
buttonOptions?: PayPalButtonsComponentOptions;
|
|
22
|
+
/**
|
|
23
|
+
* The paypal script options.
|
|
24
|
+
*/
|
|
25
|
+
paypalScriptOptions?: Partial<PayPalInput>;
|
|
26
|
+
/**
|
|
27
|
+
* Disables the paypal buttons.
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
};
|
|
31
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {};
|
|
32
|
+
type __VLS_Slots = {} & {
|
|
33
|
+
placeholder?: (props: typeof __VLS_1) => any;
|
|
34
|
+
} & {
|
|
35
|
+
loading?: (props: typeof __VLS_3) => any;
|
|
36
|
+
} & {
|
|
37
|
+
awaitingLoad?: (props: typeof __VLS_10) => any;
|
|
38
|
+
} & {
|
|
39
|
+
error?: (props: typeof __VLS_12) => any;
|
|
40
|
+
} & {
|
|
41
|
+
default?: (props: typeof __VLS_14) => any;
|
|
42
|
+
};
|
|
43
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
|
+
error: (error: Record<string, unknown>) => any;
|
|
45
|
+
init: (data: Record<string, unknown>, actions: OnInitActions) => any;
|
|
46
|
+
cancel: (data: Record<string, unknown>, actions: OnCancelledActions) => any;
|
|
47
|
+
approve: (data: OnApproveData, actions: OnApproveActions) => any;
|
|
48
|
+
clickButtons: (data: Record<string, unknown>, actions: OnClickActions) => any;
|
|
49
|
+
shippingOptionsChange: (data: OnShippingOptionsChangeData, actions: OnShippingOptionsChangeActions) => any;
|
|
50
|
+
shippingAddressChange: (data: OnShippingAddressChangeData, actions: OnShippingAddressChangeActions) => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
52
|
+
onError?: ((error: Record<string, unknown>) => any) | undefined;
|
|
53
|
+
onInit?: ((data: Record<string, unknown>, actions: OnInitActions) => any) | undefined;
|
|
54
|
+
onCancel?: ((data: Record<string, unknown>, actions: OnCancelledActions) => any) | undefined;
|
|
55
|
+
onApprove?: ((data: OnApproveData, actions: OnApproveActions) => any) | undefined;
|
|
56
|
+
onClickButtons?: ((data: Record<string, unknown>, actions: OnClickActions) => any) | undefined;
|
|
57
|
+
onShippingOptionsChange?: ((data: OnShippingOptionsChangeData, actions: OnShippingOptionsChangeActions) => any) | undefined;
|
|
58
|
+
onShippingAddressChange?: ((data: OnShippingAddressChangeData, actions: OnShippingAddressChangeActions) => any) | undefined;
|
|
59
|
+
}>, {
|
|
60
|
+
trigger: ElementScriptTrigger;
|
|
61
|
+
clientId: string;
|
|
62
|
+
buttonOptions: PayPalButtonsComponentOptions;
|
|
63
|
+
paypalScriptOptions: Partial<PayPalInput>;
|
|
64
|
+
disabled: boolean;
|
|
65
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
|
3
|
+
import { defu } from "defu";
|
|
4
|
+
import { useScriptPayPal } from "../registry/paypal";
|
|
5
|
+
import { useScriptTriggerElement } from "../composables/useScriptTriggerElement";
|
|
6
|
+
import { onBeforeUnmount, resolveComponent } from "vue";
|
|
7
|
+
const el = ref(null);
|
|
8
|
+
const rootEl = ref(null);
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
rootAttrs: { type: Object, required: false },
|
|
11
|
+
trigger: { type: [String, Array, Boolean], required: false, default: "visible" },
|
|
12
|
+
clientId: { type: String, required: false, default: "test" },
|
|
13
|
+
buttonOptions: { type: Object, required: false, default: () => ({}) },
|
|
14
|
+
paypalScriptOptions: { type: Object, required: false, default: () => ({}) },
|
|
15
|
+
disabled: { type: Boolean, required: false, default: false }
|
|
16
|
+
});
|
|
17
|
+
const ready = ref(false);
|
|
18
|
+
const { onLoaded, status } = useScriptPayPal({
|
|
19
|
+
clientId: props.clientId,
|
|
20
|
+
...props.paypalScriptOptions
|
|
21
|
+
});
|
|
22
|
+
const emit = defineEmits(["approve", "error", "cancel", "clickButtons", "shippingOptionsChange", "shippingAddressChange", "init"]);
|
|
23
|
+
const initActions = shallowRef(null);
|
|
24
|
+
const handleDisabled = () => {
|
|
25
|
+
if (!initActions.value) return;
|
|
26
|
+
if (props.disabled) {
|
|
27
|
+
initActions.value.disable();
|
|
28
|
+
} else {
|
|
29
|
+
initActions.value.enable();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const options = computed(() => {
|
|
33
|
+
const _options = {
|
|
34
|
+
onApprove: async (data, actions) => {
|
|
35
|
+
emit("approve", data, actions);
|
|
36
|
+
return props.buttonOptions?.onApprove?.(data, actions);
|
|
37
|
+
},
|
|
38
|
+
onError: (err) => {
|
|
39
|
+
emit("error", err);
|
|
40
|
+
return props.buttonOptions?.onError?.(err);
|
|
41
|
+
},
|
|
42
|
+
onCancel: (data, actions) => {
|
|
43
|
+
emit("cancel", data, actions);
|
|
44
|
+
return props.buttonOptions?.onCancel?.(data, actions);
|
|
45
|
+
},
|
|
46
|
+
onClick: (data, actions) => {
|
|
47
|
+
emit("clickButtons", data, actions);
|
|
48
|
+
return props.buttonOptions?.onClick?.(data, actions);
|
|
49
|
+
},
|
|
50
|
+
onShippingOptionsChange: async (data, actions) => {
|
|
51
|
+
emit("shippingOptionsChange", data, actions);
|
|
52
|
+
return props.buttonOptions?.onShippingOptionsChange?.(data, actions);
|
|
53
|
+
},
|
|
54
|
+
onShippingAddressChange: async (data, actions) => {
|
|
55
|
+
emit("shippingAddressChange", data, actions);
|
|
56
|
+
return props.buttonOptions?.onShippingAddressChange?.(data, actions);
|
|
57
|
+
},
|
|
58
|
+
onInit: (data, actions) => {
|
|
59
|
+
initActions.value = actions;
|
|
60
|
+
actions.disable();
|
|
61
|
+
handleDisabled();
|
|
62
|
+
emit("init", data, actions);
|
|
63
|
+
return props.buttonOptions?.onInit?.(data, actions);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return defu(_options, props.buttonOptions);
|
|
67
|
+
});
|
|
68
|
+
watch(() => props.disabled, handleDisabled);
|
|
69
|
+
const buttonInst = shallowRef();
|
|
70
|
+
onMounted(() => {
|
|
71
|
+
onLoaded(async ({ paypal }) => {
|
|
72
|
+
if (!el.value) return;
|
|
73
|
+
buttonInst.value = paypal?.Buttons?.(options.value);
|
|
74
|
+
await buttonInst.value?.render(el.value);
|
|
75
|
+
ready.value = true;
|
|
76
|
+
watch(() => options.value, async (_options) => {
|
|
77
|
+
if (!el.value) return;
|
|
78
|
+
await buttonInst.value?.updateProps(_options);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
async function destroy() {
|
|
83
|
+
if (buttonInst.value) {
|
|
84
|
+
await buttonInst.value?.close();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
onBeforeUnmount(async () => {
|
|
88
|
+
await destroy();
|
|
89
|
+
});
|
|
90
|
+
const ScriptLoadingIndicator = resolveComponent("ScriptLoadingIndicator");
|
|
91
|
+
const trigger = useScriptTriggerElement({ trigger: props.trigger, el: rootEl });
|
|
92
|
+
const rootAttrs = computed(() => {
|
|
93
|
+
return defu(props.rootAttrs, {
|
|
94
|
+
"aria-busy": status.value === "loading",
|
|
95
|
+
"aria-label": status.value === "awaitingLoad" ? "PayPal Script Placeholder" : status.value === "loading" ? "PayPal Buttons Loading" : "PayPal Buttons",
|
|
96
|
+
"aria-live": "polite",
|
|
97
|
+
"role": "application",
|
|
98
|
+
...trigger instanceof Promise ? trigger.ssrAttrs || {} : {}
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<template>
|
|
104
|
+
<div v-bind="rootAttrs" id="test">
|
|
105
|
+
<div v-show="ready" ref="el" />
|
|
106
|
+
<slot v-if="!ready" name="placeholder">
|
|
107
|
+
placeholder
|
|
108
|
+
</slot>
|
|
109
|
+
<slot v-if="status !== 'awaitingLoad' && !ready" name="loading">
|
|
110
|
+
<ScriptLoadingIndicator color="black" />
|
|
111
|
+
</slot>
|
|
112
|
+
<slot v-if="status === 'awaitingLoad'" name="awaitingLoad" />
|
|
113
|
+
<slot v-else-if="status === 'error'" name="error" />
|
|
114
|
+
<slot />
|
|
115
|
+
</div>
|
|
116
|
+
</template>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReservedProps } from 'vue';
|
|
2
|
+
import type { OnApproveActions, OnApproveData, OnCancelledActions, OnClickActions, OnShippingAddressChangeActions, OnShippingAddressChangeData, OnShippingOptionsChangeActions, OnShippingOptionsChangeData, PayPalButtonsComponentOptions, OnInitActions } from '@paypal/paypal-js';
|
|
3
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
4
|
+
import type { PayPalInput } from '../registry/paypal.js';
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
/**
|
|
7
|
+
* Customize the root element attributes.
|
|
8
|
+
*/
|
|
9
|
+
rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>;
|
|
10
|
+
/**
|
|
11
|
+
* Defines the trigger event to load the script.
|
|
12
|
+
*/
|
|
13
|
+
trigger?: ElementScriptTrigger;
|
|
14
|
+
/**
|
|
15
|
+
* The client id for the paypal script.
|
|
16
|
+
*/
|
|
17
|
+
clientId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The options for the paypal buttons.
|
|
20
|
+
*/
|
|
21
|
+
buttonOptions?: PayPalButtonsComponentOptions;
|
|
22
|
+
/**
|
|
23
|
+
* The paypal script options.
|
|
24
|
+
*/
|
|
25
|
+
paypalScriptOptions?: Partial<PayPalInput>;
|
|
26
|
+
/**
|
|
27
|
+
* Disables the paypal buttons.
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
};
|
|
31
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {};
|
|
32
|
+
type __VLS_Slots = {} & {
|
|
33
|
+
placeholder?: (props: typeof __VLS_1) => any;
|
|
34
|
+
} & {
|
|
35
|
+
loading?: (props: typeof __VLS_3) => any;
|
|
36
|
+
} & {
|
|
37
|
+
awaitingLoad?: (props: typeof __VLS_10) => any;
|
|
38
|
+
} & {
|
|
39
|
+
error?: (props: typeof __VLS_12) => any;
|
|
40
|
+
} & {
|
|
41
|
+
default?: (props: typeof __VLS_14) => any;
|
|
42
|
+
};
|
|
43
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
|
+
error: (error: Record<string, unknown>) => any;
|
|
45
|
+
init: (data: Record<string, unknown>, actions: OnInitActions) => any;
|
|
46
|
+
cancel: (data: Record<string, unknown>, actions: OnCancelledActions) => any;
|
|
47
|
+
approve: (data: OnApproveData, actions: OnApproveActions) => any;
|
|
48
|
+
clickButtons: (data: Record<string, unknown>, actions: OnClickActions) => any;
|
|
49
|
+
shippingOptionsChange: (data: OnShippingOptionsChangeData, actions: OnShippingOptionsChangeActions) => any;
|
|
50
|
+
shippingAddressChange: (data: OnShippingAddressChangeData, actions: OnShippingAddressChangeActions) => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
52
|
+
onError?: ((error: Record<string, unknown>) => any) | undefined;
|
|
53
|
+
onInit?: ((data: Record<string, unknown>, actions: OnInitActions) => any) | undefined;
|
|
54
|
+
onCancel?: ((data: Record<string, unknown>, actions: OnCancelledActions) => any) | undefined;
|
|
55
|
+
onApprove?: ((data: OnApproveData, actions: OnApproveActions) => any) | undefined;
|
|
56
|
+
onClickButtons?: ((data: Record<string, unknown>, actions: OnClickActions) => any) | undefined;
|
|
57
|
+
onShippingOptionsChange?: ((data: OnShippingOptionsChangeData, actions: OnShippingOptionsChangeActions) => any) | undefined;
|
|
58
|
+
onShippingAddressChange?: ((data: OnShippingAddressChangeData, actions: OnShippingAddressChangeActions) => any) | undefined;
|
|
59
|
+
}>, {
|
|
60
|
+
trigger: ElementScriptTrigger;
|
|
61
|
+
clientId: string;
|
|
62
|
+
buttonOptions: PayPalButtonsComponentOptions;
|
|
63
|
+
paypalScriptOptions: Partial<PayPalInput>;
|
|
64
|
+
disabled: boolean;
|
|
65
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|