@gomusdev/web-components 4.16.1 → 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 +6 -0
- package/dist-js/gomus-webcomponents.iife.js +10 -7
- package/dist-js/gomus-webcomponents.js +10 -7
- package/dist-js/gomus-webcomponents.min.iife.js +14 -14
- package/dist-js/gomus-webcomponents.min.js +777 -776
- package/dist-js/src/config/configStore.svelte.d.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -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();
|
|
@@ -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();
|