@gomusdev/web-components 4.14.3 → 4.14.5
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/README.md +12 -0
- package/dist-js/gomus-webcomponents.iife.js +6 -2
- package/dist-js/gomus-webcomponents.js +6 -2
- package/dist-js/gomus-webcomponents.min.iife.js +6 -6
- package/dist-js/gomus-webcomponents.min.js +132 -129
- package/dist-js/src/factories/CouponFactories.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.14.5 (2026-08-05)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **shop:** include path params in fetchAndCache's dedup/cache key
|
|
8
|
+
|
|
9
|
+
## 4.14.4 (2026-08-04)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **order:** clear cart coupons after a completed order
|
|
14
|
+
|
|
3
15
|
## 4.14.3 (2026-08-04)
|
|
4
16
|
|
|
5
17
|
### Bug Fixes
|
|
@@ -13987,6 +13987,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13987
13987
|
}
|
|
13988
13988
|
});
|
|
13989
13989
|
}
|
|
13990
|
+
#fetchId(endpoint, query, path = {}) {
|
|
13991
|
+
return endpoint + JSON.stringify(query) + JSON.stringify(path);
|
|
13992
|
+
}
|
|
13990
13993
|
/**
|
|
13991
13994
|
* Returns a reactive value that will contain the fetched data, no need to await.
|
|
13992
13995
|
*
|
|
@@ -14008,7 +14011,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14008
14011
|
return get$2(this.#data)[dataKey];
|
|
14009
14012
|
}
|
|
14010
14013
|
const query = options.query;
|
|
14011
|
-
const fetchId = endpoint
|
|
14014
|
+
const fetchId = this.#fetchId(endpoint, query, options.path);
|
|
14012
14015
|
const isNotFetchedYet = !this.#fetchStatus[fetchId];
|
|
14013
14016
|
const isCacheExpired = this.#fetchStatus[fetchId]?.fetchedAt < Date.now() - options.cache * 1e3;
|
|
14014
14017
|
if (isNotFetchedYet || isCacheExpired) this.apiGet(endpoint, query, options.path).then((ret) => {
|
|
@@ -14142,7 +14145,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14142
14145
|
}
|
|
14143
14146
|
async apiGet(path, query = {}, pathOptions) {
|
|
14144
14147
|
this.#ensureApi();
|
|
14145
|
-
const fetchId = path
|
|
14148
|
+
const fetchId = this.#fetchId(path, query, pathOptions);
|
|
14146
14149
|
this.#fetchStatus[fetchId] = {
|
|
14147
14150
|
status: "fetching",
|
|
14148
14151
|
fetchedAt: Date.now()
|
|
@@ -36565,6 +36568,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
36565
36568
|
cleanedUpToken = token();
|
|
36566
36569
|
untrack(() => {
|
|
36567
36570
|
cart.clearItems();
|
|
36571
|
+
cart.clearCoupons();
|
|
36568
36572
|
if (shop.auth.isGuest()) shop.auth.signOut();
|
|
36569
36573
|
});
|
|
36570
36574
|
});
|
|
@@ -13986,6 +13986,9 @@ var Shop = class {
|
|
|
13986
13986
|
}
|
|
13987
13987
|
});
|
|
13988
13988
|
}
|
|
13989
|
+
#fetchId(endpoint, query, path = {}) {
|
|
13990
|
+
return endpoint + JSON.stringify(query) + JSON.stringify(path);
|
|
13991
|
+
}
|
|
13989
13992
|
/**
|
|
13990
13993
|
* Returns a reactive value that will contain the fetched data, no need to await.
|
|
13991
13994
|
*
|
|
@@ -14007,7 +14010,7 @@ var Shop = class {
|
|
|
14007
14010
|
return get$2(this.#data)[dataKey];
|
|
14008
14011
|
}
|
|
14009
14012
|
const query = options.query;
|
|
14010
|
-
const fetchId = endpoint
|
|
14013
|
+
const fetchId = this.#fetchId(endpoint, query, options.path);
|
|
14011
14014
|
const isNotFetchedYet = !this.#fetchStatus[fetchId];
|
|
14012
14015
|
const isCacheExpired = this.#fetchStatus[fetchId]?.fetchedAt < Date.now() - options.cache * 1e3;
|
|
14013
14016
|
if (isNotFetchedYet || isCacheExpired) this.apiGet(endpoint, query, options.path).then((ret) => {
|
|
@@ -14141,7 +14144,7 @@ var Shop = class {
|
|
|
14141
14144
|
}
|
|
14142
14145
|
async apiGet(path, query = {}, pathOptions) {
|
|
14143
14146
|
this.#ensureApi();
|
|
14144
|
-
const fetchId = path
|
|
14147
|
+
const fetchId = this.#fetchId(path, query, pathOptions);
|
|
14145
14148
|
this.#fetchStatus[fetchId] = {
|
|
14146
14149
|
status: "fetching",
|
|
14147
14150
|
fetchedAt: Date.now()
|
|
@@ -36564,6 +36567,7 @@ function Order($$anchor, $$props) {
|
|
|
36564
36567
|
cleanedUpToken = token();
|
|
36565
36568
|
untrack(() => {
|
|
36566
36569
|
cart.clearItems();
|
|
36570
|
+
cart.clearCoupons();
|
|
36567
36571
|
if (shop.auth.isGuest()) shop.auth.signOut();
|
|
36568
36572
|
});
|
|
36569
36573
|
});
|