@orderingstack/front-components-product-configurator 1.4.2-beta.4 → 1.4.2-beta.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/dist/components/DisplayState/DisplayState.d.ts.map +1 -1
- package/dist/components/ProductConfigurator/ProductConfigurator.d.ts.map +1 -1
- package/dist/components/ProductConfigurator/useProductConfigurator.d.ts +1 -0
- package/dist/components/ProductConfigurator/useProductConfigurator.d.ts.map +1 -1
- package/dist/hooks/useEmitFilter.d.ts.map +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +8 -3
- package/dist/index.es.js.map +1 -1
- package/dist/utils/setSelected.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -6686,6 +6686,7 @@ function useProductConfigurator(product) {
|
|
|
6686
6686
|
return {
|
|
6687
6687
|
encodedProduct,
|
|
6688
6688
|
initSelected,
|
|
6689
|
+
initFilter,
|
|
6689
6690
|
filter,
|
|
6690
6691
|
setCurrency,
|
|
6691
6692
|
setIsOnSubmittedOnTrue,
|
|
@@ -8804,7 +8805,7 @@ function Counter(props) {
|
|
|
8804
8805
|
});
|
|
8805
8806
|
}
|
|
8806
8807
|
function useEmitFilter(product) {
|
|
8807
|
-
const { watch } = useFormContext();
|
|
8808
|
+
const { watch, setValue } = useFormContext();
|
|
8808
8809
|
const setFilter = useStore((state) => state.setFilter);
|
|
8809
8810
|
const { id, selCtx, emit = {}, fltCtx } = product;
|
|
8810
8811
|
const value = watch(`selected.${selCtx}.${id}`);
|
|
@@ -9226,10 +9227,12 @@ const DisplayState = () => {
|
|
|
9226
9227
|
watch
|
|
9227
9228
|
} = useFormContext();
|
|
9228
9229
|
const selected = watch("selected");
|
|
9230
|
+
const filter = watch("filter");
|
|
9229
9231
|
const validationMap = useStore((state) => state.validationMap);
|
|
9230
9232
|
console.log({
|
|
9231
9233
|
selected,
|
|
9232
|
-
validationMap
|
|
9234
|
+
validationMap,
|
|
9235
|
+
filter
|
|
9233
9236
|
});
|
|
9234
9237
|
return /* @__PURE__ */ jsxs("div", {
|
|
9235
9238
|
className: "flex flex-col items-center py-4",
|
|
@@ -10884,6 +10887,7 @@ function ProductConfigurator(props) {
|
|
|
10884
10887
|
const {
|
|
10885
10888
|
encodedProduct,
|
|
10886
10889
|
initSelected,
|
|
10890
|
+
initFilter,
|
|
10887
10891
|
filter,
|
|
10888
10892
|
productQuantity,
|
|
10889
10893
|
setIsOnSubmittedOnTrue,
|
|
@@ -10908,7 +10912,8 @@ function ProductConfigurator(props) {
|
|
|
10908
10912
|
});
|
|
10909
10913
|
const methods = useForm({
|
|
10910
10914
|
defaultValues: {
|
|
10911
|
-
selected: initSelected
|
|
10915
|
+
selected: initSelected,
|
|
10916
|
+
filter: initFilter
|
|
10912
10917
|
}
|
|
10913
10918
|
});
|
|
10914
10919
|
const {
|