ublo-lib 1.47.106 → 1.47.108
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-preview.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-preview/cart-preview.js"],"names":[],"mappings":";AAYA;;;;;;
|
|
1
|
+
{"version":3,"file":"cart-preview.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-preview/cart-preview.js"],"names":[],"mappings":";AAYA;;;;;;4CA2GC"}
|
|
@@ -15,7 +15,9 @@ const CartPreview = ({ lang, visible, className, pillClassName, forcePillVisibil
|
|
|
15
15
|
const [count, setCount] = React.useState(0);
|
|
16
16
|
const [cart, setCart] = React.useState();
|
|
17
17
|
const [cartChanges, setCartChanges] = React.useState(0);
|
|
18
|
-
const addCartChange = React.useCallback(() => {
|
|
18
|
+
const addCartChange = React.useCallback((e) => {
|
|
19
|
+
if (e?.detail === "cart-removed")
|
|
20
|
+
setCart(undefined);
|
|
19
21
|
setCartChanges((prev) => prev + 1);
|
|
20
22
|
}, []);
|
|
21
23
|
React.useEffect(() => {
|
|
@@ -101,6 +101,8 @@ function getTag(type) {
|
|
|
101
101
|
return Checkbox;
|
|
102
102
|
case "number":
|
|
103
103
|
return NumberPicker;
|
|
104
|
+
case "input-number":
|
|
105
|
+
return Input;
|
|
104
106
|
default:
|
|
105
107
|
return Input;
|
|
106
108
|
}
|
|
@@ -129,6 +131,9 @@ function getProps(type, name, className, data, required, placeholder, autoSizing
|
|
|
129
131
|
if (type === "number") {
|
|
130
132
|
return { withInput: true, onChange, min, max, ...commonProps };
|
|
131
133
|
}
|
|
134
|
+
if (type === "input-number") {
|
|
135
|
+
return { type: "number", onValueChange: onChange, ...commonProps };
|
|
136
|
+
}
|
|
132
137
|
return { type, onValueChange: onChange, ...commonProps };
|
|
133
138
|
}
|
|
134
139
|
function getLabel(lang, label, required) {
|