@moonbase.sh/vue 0.3.26 → 0.3.29
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/index.cjs +5 -2
- package/dist/index.js +5 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -142,7 +142,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
142
142
|
this.currentUser = (0, import_vue.ref)(null);
|
|
143
143
|
this.loadedUser = (0, import_vue.ref)(false);
|
|
144
144
|
this.refreshOrderAbortController = new AbortController();
|
|
145
|
-
this.debouncedPushOrderContent = debounce((order) => this.client.orders.pushContent(order, void 0, this.
|
|
145
|
+
this.debouncedPushOrderContent = debounce((order) => this.client.orders.pushContent(order, void 0, this.hasUtmOrReferrer ? this.utm.value : void 0), 500);
|
|
146
146
|
var _a;
|
|
147
147
|
if (typeof window === "undefined") {
|
|
148
148
|
this.currentOrder = (0, import_vue.ref)({
|
|
@@ -194,7 +194,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
194
194
|
items: [],
|
|
195
195
|
couponsApplied: []
|
|
196
196
|
});
|
|
197
|
-
if (this.
|
|
197
|
+
if (this.hasUtmOrReferrer) {
|
|
198
198
|
this.pushOrderContent();
|
|
199
199
|
}
|
|
200
200
|
}
|
|
@@ -245,6 +245,9 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
get hasUtm() {
|
|
248
|
+
return !!this.utm.value && !!(this.utm.value.source || this.utm.value.medium || this.utm.value.campaign || this.utm.value.term || this.utm.value.content);
|
|
249
|
+
}
|
|
250
|
+
get hasUtmOrReferrer() {
|
|
248
251
|
return !!this.utm.value && Object.values(this.utm.value).some((v) => !!v);
|
|
249
252
|
}
|
|
250
253
|
get loadedUserPromise() {
|
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
112
112
|
this.currentUser = ref(null);
|
|
113
113
|
this.loadedUser = ref(false);
|
|
114
114
|
this.refreshOrderAbortController = new AbortController();
|
|
115
|
-
this.debouncedPushOrderContent = debounce((order) => this.client.orders.pushContent(order, void 0, this.
|
|
115
|
+
this.debouncedPushOrderContent = debounce((order) => this.client.orders.pushContent(order, void 0, this.hasUtmOrReferrer ? this.utm.value : void 0), 500);
|
|
116
116
|
var _a;
|
|
117
117
|
if (typeof window === "undefined") {
|
|
118
118
|
this.currentOrder = ref({
|
|
@@ -164,7 +164,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
164
164
|
items: [],
|
|
165
165
|
couponsApplied: []
|
|
166
166
|
});
|
|
167
|
-
if (this.
|
|
167
|
+
if (this.hasUtmOrReferrer) {
|
|
168
168
|
this.pushOrderContent();
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -215,6 +215,9 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
get hasUtm() {
|
|
218
|
+
return !!this.utm.value && !!(this.utm.value.source || this.utm.value.medium || this.utm.value.campaign || this.utm.value.term || this.utm.value.content);
|
|
219
|
+
}
|
|
220
|
+
get hasUtmOrReferrer() {
|
|
218
221
|
return !!this.utm.value && Object.values(this.utm.value).some((v) => !!v);
|
|
219
222
|
}
|
|
220
223
|
get loadedUserPromise() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.29",
|
|
5
5
|
"description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@vue/devtools-api": "^6.6.3",
|
|
20
20
|
"uuid": "^9.0.1",
|
|
21
21
|
"zod": "^3.23.8",
|
|
22
|
-
"@moonbase.sh/storefront-api": "0.3.
|
|
22
|
+
"@moonbase.sh/storefront-api": "0.3.29"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/uuid": "^9.0.8",
|