@gomusdev/web-components 4.16.0 → 4.17.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/README.md +12 -0
- package/dist-js/gomus-webcomponents.iife.js +13 -9
- package/dist-js/gomus-webcomponents.js +13 -9
- package/dist-js/gomus-webcomponents.min.iife.js +14 -14
- package/dist-js/gomus-webcomponents.min.js +829 -828
- package/dist-js/src/config/configStore.svelte.d.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.17.0 (2026-08-12)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **cart:** add quantityStepperAtMinimum config to disable − at the line minimum
|
|
8
|
+
|
|
9
|
+
## 4.16.1 (2026-08-12)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **checkout:** honor configured checkoutFailure URL instead of always falling back to the legacy Angular URL
|
|
14
|
+
|
|
3
15
|
## 4.16.0 (2026-08-12)
|
|
4
16
|
|
|
5
17
|
### Features
|
|
@@ -14278,7 +14278,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14278
14278
|
},
|
|
14279
14279
|
forms: {},
|
|
14280
14280
|
fields: {},
|
|
14281
|
-
quantityStepper: true
|
|
14281
|
+
quantityStepper: true,
|
|
14282
|
+
quantityStepperAtMinimum: "remove"
|
|
14282
14283
|
};
|
|
14283
14284
|
var ConfigStoreSvelte = class {
|
|
14284
14285
|
defaultConfig = assign(defaultConfig, window.customOptions);
|
|
@@ -16031,6 +16032,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16031
16032
|
/** Emits the next committed quantity. The control never mutates anything itself. */
|
|
16032
16033
|
let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), label = prop($$props, "label", 7), floor = prop($$props, "floor", 7, 0), deselectable = prop($$props, "deselectable", 7, true), onDecrementBelowMin = prop($$props, "onDecrementBelowMin", 7), onChange = prop($$props, "onChange", 7);
|
|
16033
16034
|
const useStepper = /* @__PURE__ */ user_derived(() => configStore.config.quantityStepper);
|
|
16035
|
+
const disabledAtMinimum = /* @__PURE__ */ user_derived(() => onDecrementBelowMin() != null && configStore.config.quantityStepperAtMinimum === "disable");
|
|
16034
16036
|
var $$exports = {
|
|
16035
16037
|
get value() {
|
|
16036
16038
|
return value();
|
|
@@ -16093,11 +16095,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16093
16095
|
var node = first_child(fragment);
|
|
16094
16096
|
var consequent = ($$anchor) => {
|
|
16095
16097
|
{
|
|
16096
|
-
let $0 = /* @__PURE__ */ user_derived(() => deselectable() ? 0 : min());
|
|
16098
|
+
let $0 = /* @__PURE__ */ user_derived(() => get$2(disabledAtMinimum) ? Math.max(min(), 1) : deselectable() ? 0 : min());
|
|
16097
16099
|
let $1 = /* @__PURE__ */ user_derived(() => shop.t("quantity.decrease"));
|
|
16098
16100
|
let $2 = /* @__PURE__ */ user_derived(() => shop.t("quantity.increase"));
|
|
16099
|
-
let $3 = /* @__PURE__ */ user_derived(() =>
|
|
16100
|
-
let $4 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove
|
|
16101
|
+
let $3 = /* @__PURE__ */ user_derived(() => get$2(disabledAtMinimum) ? void 0 : onDecrementBelowMin());
|
|
16102
|
+
let $4 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove"));
|
|
16103
|
+
let $5 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove.label"));
|
|
16101
16104
|
QuantityStepper($$anchor, {
|
|
16102
16105
|
get value() {
|
|
16103
16106
|
return value();
|
|
@@ -16121,13 +16124,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16121
16124
|
return get$2($2);
|
|
16122
16125
|
},
|
|
16123
16126
|
get onDecrementBelowMin() {
|
|
16124
|
-
return
|
|
16127
|
+
return get$2($3);
|
|
16125
16128
|
},
|
|
16126
16129
|
get removeAriaLabel() {
|
|
16127
|
-
return get$2($
|
|
16130
|
+
return get$2($4);
|
|
16128
16131
|
},
|
|
16129
16132
|
get removeLabel() {
|
|
16130
|
-
return get$2($
|
|
16133
|
+
return get$2($5);
|
|
16131
16134
|
},
|
|
16132
16135
|
get onChange() {
|
|
16133
16136
|
return onChange();
|
|
@@ -18796,13 +18799,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18796
18799
|
if (beforeSubmit) await beforeSubmit(form.details.formData);
|
|
18797
18800
|
const meta = checkout.data.meta;
|
|
18798
18801
|
const navigateTo = configStore.config.navigateTo;
|
|
18802
|
+
const checkoutFailure = configStore.config.urls.checkoutFailure ?? shop.urls.checkoutFailure;
|
|
18799
18803
|
if (meta.status === "success") {
|
|
18800
18804
|
const checkoutSuccess = configStore.config.urls.checkoutSuccess ?? shop.urls.checkoutSuccess;
|
|
18801
18805
|
navigateTo?.(checkoutSuccess(checkout.data.order.token));
|
|
18802
|
-
} else if (meta.status === "fail") navigateTo?.(
|
|
18806
|
+
} else if (meta.status === "fail") navigateTo?.(checkoutFailure(""));
|
|
18803
18807
|
else if (meta.payment_url) navigateTo?.(meta.payment_url);
|
|
18804
18808
|
else if (meta.payment_data) postToPaymentProvider(meta.payment_data);
|
|
18805
|
-
else navigateTo?.(
|
|
18809
|
+
else navigateTo?.(checkoutFailure(""));
|
|
18806
18810
|
}
|
|
18807
18811
|
function setupGuestCheckout(host, custom) {
|
|
18808
18812
|
Forms.defineForm({
|
|
@@ -14277,7 +14277,8 @@ var defaultConfig = {
|
|
|
14277
14277
|
},
|
|
14278
14278
|
forms: {},
|
|
14279
14279
|
fields: {},
|
|
14280
|
-
quantityStepper: true
|
|
14280
|
+
quantityStepper: true,
|
|
14281
|
+
quantityStepperAtMinimum: "remove"
|
|
14281
14282
|
};
|
|
14282
14283
|
var ConfigStoreSvelte = class {
|
|
14283
14284
|
defaultConfig = assign(defaultConfig, window.customOptions);
|
|
@@ -16030,6 +16031,7 @@ function QuantityControl($$anchor, $$props) {
|
|
|
16030
16031
|
/** Emits the next committed quantity. The control never mutates anything itself. */
|
|
16031
16032
|
let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), label = prop($$props, "label", 7), floor = prop($$props, "floor", 7, 0), deselectable = prop($$props, "deselectable", 7, true), onDecrementBelowMin = prop($$props, "onDecrementBelowMin", 7), onChange = prop($$props, "onChange", 7);
|
|
16032
16033
|
const useStepper = /* @__PURE__ */ user_derived(() => configStore.config.quantityStepper);
|
|
16034
|
+
const disabledAtMinimum = /* @__PURE__ */ user_derived(() => onDecrementBelowMin() != null && configStore.config.quantityStepperAtMinimum === "disable");
|
|
16033
16035
|
var $$exports = {
|
|
16034
16036
|
get value() {
|
|
16035
16037
|
return value();
|
|
@@ -16092,11 +16094,12 @@ function QuantityControl($$anchor, $$props) {
|
|
|
16092
16094
|
var node = first_child(fragment);
|
|
16093
16095
|
var consequent = ($$anchor) => {
|
|
16094
16096
|
{
|
|
16095
|
-
let $0 = /* @__PURE__ */ user_derived(() => deselectable() ? 0 : min());
|
|
16097
|
+
let $0 = /* @__PURE__ */ user_derived(() => get$2(disabledAtMinimum) ? Math.max(min(), 1) : deselectable() ? 0 : min());
|
|
16096
16098
|
let $1 = /* @__PURE__ */ user_derived(() => shop.t("quantity.decrease"));
|
|
16097
16099
|
let $2 = /* @__PURE__ */ user_derived(() => shop.t("quantity.increase"));
|
|
16098
|
-
let $3 = /* @__PURE__ */ user_derived(() =>
|
|
16099
|
-
let $4 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove
|
|
16100
|
+
let $3 = /* @__PURE__ */ user_derived(() => get$2(disabledAtMinimum) ? void 0 : onDecrementBelowMin());
|
|
16101
|
+
let $4 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove"));
|
|
16102
|
+
let $5 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove.label"));
|
|
16100
16103
|
QuantityStepper($$anchor, {
|
|
16101
16104
|
get value() {
|
|
16102
16105
|
return value();
|
|
@@ -16120,13 +16123,13 @@ function QuantityControl($$anchor, $$props) {
|
|
|
16120
16123
|
return get$2($2);
|
|
16121
16124
|
},
|
|
16122
16125
|
get onDecrementBelowMin() {
|
|
16123
|
-
return
|
|
16126
|
+
return get$2($3);
|
|
16124
16127
|
},
|
|
16125
16128
|
get removeAriaLabel() {
|
|
16126
|
-
return get$2($
|
|
16129
|
+
return get$2($4);
|
|
16127
16130
|
},
|
|
16128
16131
|
get removeLabel() {
|
|
16129
|
-
return get$2($
|
|
16132
|
+
return get$2($5);
|
|
16130
16133
|
},
|
|
16131
16134
|
get onChange() {
|
|
16132
16135
|
return onChange();
|
|
@@ -18795,13 +18798,14 @@ async function finalizeCheckout(form, formId) {
|
|
|
18795
18798
|
if (beforeSubmit) await beforeSubmit(form.details.formData);
|
|
18796
18799
|
const meta = checkout.data.meta;
|
|
18797
18800
|
const navigateTo = configStore.config.navigateTo;
|
|
18801
|
+
const checkoutFailure = configStore.config.urls.checkoutFailure ?? shop.urls.checkoutFailure;
|
|
18798
18802
|
if (meta.status === "success") {
|
|
18799
18803
|
const checkoutSuccess = configStore.config.urls.checkoutSuccess ?? shop.urls.checkoutSuccess;
|
|
18800
18804
|
navigateTo?.(checkoutSuccess(checkout.data.order.token));
|
|
18801
|
-
} else if (meta.status === "fail") navigateTo?.(
|
|
18805
|
+
} else if (meta.status === "fail") navigateTo?.(checkoutFailure(""));
|
|
18802
18806
|
else if (meta.payment_url) navigateTo?.(meta.payment_url);
|
|
18803
18807
|
else if (meta.payment_data) postToPaymentProvider(meta.payment_data);
|
|
18804
|
-
else navigateTo?.(
|
|
18808
|
+
else navigateTo?.(checkoutFailure(""));
|
|
18805
18809
|
}
|
|
18806
18810
|
function setupGuestCheckout(host, custom) {
|
|
18807
18811
|
Forms.defineForm({
|