ingeniuscliq-core 0.3.33 → 0.3.34
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.
|
@@ -10,7 +10,7 @@ interface FormSelectProps<T extends FieldValues = FieldValues> extends BaseStyle
|
|
|
10
10
|
}>;
|
|
11
11
|
readonly className: string;
|
|
12
12
|
readonly selectClassName: string;
|
|
13
|
-
onValueChange
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare function FormSelect<T extends FieldValues = FieldValues>({ control, name, placeholder, className, options, selectClassName }: FormSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function FormSelect<T extends FieldValues = FieldValues>({ control, name, placeholder, className, options, selectClassName, onValueChange }: FormSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -2497,9 +2497,11 @@ class J5 {
|
|
|
2497
2497
|
throw console.error(o), t((a) => ({ ...a, error: o, loading: !1 })), o;
|
|
2498
2498
|
}
|
|
2499
2499
|
},
|
|
2500
|
-
clearCart: () => {
|
|
2500
|
+
clearCart: async () => {
|
|
2501
2501
|
try {
|
|
2502
|
-
t({ loading: !0, error: null }), this.shopCartService.clearCart()
|
|
2502
|
+
t({ loading: !0, error: null }), await this.shopCartService.clearCart();
|
|
2503
|
+
let r = await this.shopCartService.getCart();
|
|
2504
|
+
t(() => ({ cart: r.data.data, cartItems: r.data.data.items, loading: !1 }));
|
|
2503
2505
|
} catch (r) {
|
|
2504
2506
|
throw console.error(r), t((o) => ({ ...o, error: r, loading: !1 })), r;
|
|
2505
2507
|
}
|
|
@@ -5368,8 +5370,9 @@ function c4({ control: e, name: t, placeholder: n, className: r = "", checkboxPr
|
|
|
5368
5370
|
}
|
|
5369
5371
|
);
|
|
5370
5372
|
}
|
|
5371
|
-
function l4({ control: e, name: t, placeholder: n, className: r = "", options: o, selectClassName: a
|
|
5372
|
-
|
|
5373
|
+
function l4({ control: e, name: t, placeholder: n, className: r = "", options: o, selectClassName: a, onValueChange: s = () => {
|
|
5374
|
+
} }) {
|
|
5375
|
+
const { t: i } = Zn(), c = () => n || (t ? i(`fields.${t}`) : "");
|
|
5373
5376
|
return /* @__PURE__ */ f(
|
|
5374
5377
|
Yo,
|
|
5375
5378
|
{
|
|
@@ -5377,14 +5380,16 @@ function l4({ control: e, name: t, placeholder: n, className: r = "", options: o
|
|
|
5377
5380
|
name: t,
|
|
5378
5381
|
className: r,
|
|
5379
5382
|
withinControl: !0,
|
|
5380
|
-
render: (
|
|
5383
|
+
render: (u) => /* @__PURE__ */ Q(
|
|
5381
5384
|
kd,
|
|
5382
5385
|
{
|
|
5383
|
-
onValueChange:
|
|
5384
|
-
|
|
5386
|
+
onValueChange: (d) => {
|
|
5387
|
+
u.onChange(d), s(d);
|
|
5388
|
+
},
|
|
5389
|
+
defaultValue: u.value,
|
|
5385
5390
|
children: [
|
|
5386
|
-
/* @__PURE__ */ f(pu, { children: /* @__PURE__ */ f(Ld, { className: a, children: /* @__PURE__ */ f(Id, { placeholder:
|
|
5387
|
-
/* @__PURE__ */ f($d, { children: o.map((
|
|
5391
|
+
/* @__PURE__ */ f(pu, { children: /* @__PURE__ */ f(Ld, { className: a, children: /* @__PURE__ */ f(Id, { placeholder: c() }) }) }),
|
|
5392
|
+
/* @__PURE__ */ f($d, { children: o.map((d) => /* @__PURE__ */ f(Fd, { value: d.value, children: d.label }, d.value)) })
|
|
5388
5393
|
]
|
|
5389
5394
|
}
|
|
5390
5395
|
)
|