@open-mercato/core 0.8.1-develop.7206.1.45a3cee87f → 0.8.1-develop.7215.1.60786cf836

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.
Files changed (39) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/modules/catalog/backend/catalog/products/[id]/page.js +6 -2
  3. package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
  4. package/dist/modules/catalog/backend/catalog/products/create/page.js +7 -3
  5. package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
  6. package/dist/modules/catalog/components/products/ProductUomSection.js +11 -22
  7. package/dist/modules/catalog/components/products/ProductUomSection.js.map +2 -2
  8. package/dist/modules/catalog/components/products/productForm.js +26 -1
  9. package/dist/modules/catalog/components/products/productForm.js.map +2 -2
  10. package/dist/modules/configs/lib/upgrade-actions.js +1 -0
  11. package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
  12. package/dist/modules/configs/services/upgradeActionsService.js +9 -2
  13. package/dist/modules/configs/services/upgradeActionsService.js.map +2 -2
  14. package/dist/modules/entities/lib/definition-scope-where.js +18 -0
  15. package/dist/modules/entities/lib/definition-scope-where.js.map +7 -0
  16. package/dist/modules/entities/lib/definition-scope.js +2 -8
  17. package/dist/modules/entities/lib/definition-scope.js.map +2 -2
  18. package/dist/modules/entities/lib/helpers.js +4 -30
  19. package/dist/modules/entities/lib/helpers.js.map +2 -2
  20. package/dist/modules/entities/lib/scoped-field-defs.js +5 -10
  21. package/dist/modules/entities/lib/scoped-field-defs.js.map +2 -2
  22. package/dist/modules/query_index/lib/engine.js.map +1 -1
  23. package/dist/modules/query_index/lib/search-tokens.js.map +2 -2
  24. package/dist/modules/wms/components/backend/AdjustInventoryDialog.js +15 -1
  25. package/dist/modules/wms/components/backend/AdjustInventoryDialog.js.map +2 -2
  26. package/package.json +7 -7
  27. package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +6 -2
  28. package/src/modules/catalog/backend/catalog/products/create/page.tsx +7 -6
  29. package/src/modules/catalog/components/products/ProductUomSection.tsx +11 -31
  30. package/src/modules/catalog/components/products/productForm.ts +53 -0
  31. package/src/modules/configs/lib/upgrade-actions.ts +7 -0
  32. package/src/modules/configs/services/upgradeActionsService.ts +17 -2
  33. package/src/modules/entities/lib/definition-scope-where.ts +27 -0
  34. package/src/modules/entities/lib/definition-scope.ts +2 -10
  35. package/src/modules/entities/lib/helpers.ts +4 -33
  36. package/src/modules/entities/lib/scoped-field-defs.ts +6 -15
  37. package/src/modules/query_index/lib/engine.ts +4 -4
  38. package/src/modules/query_index/lib/search-tokens.ts +31 -0
  39. package/src/modules/wms/components/backend/AdjustInventoryDialog.tsx +21 -1
@@ -38,7 +38,7 @@ import {
38
38
  apiCall,
39
39
  readApiResultOrThrow
40
40
  } from "@open-mercato/ui/backend/utils/apiCall";
41
- import { useT } from "@open-mercato/shared/lib/i18n/context";
41
+ import { useT, useLocale } from "@open-mercato/shared/lib/i18n/context";
42
42
  import { E } from "../../../../../../generated/entities.ids.generated.js";
43
43
  import {
44
44
  ProductMediaManager
@@ -46,7 +46,7 @@ import {
46
46
  import { ProductCategorizeSection } from "@open-mercato/core/modules/catalog/components/products/ProductCategorizeSection";
47
47
  import {
48
48
  PRODUCT_FORM_STEPS,
49
- productFormSchema,
49
+ buildLocaleAwareProductFormSchema,
50
50
  createInitialProductFormValues,
51
51
  createVariantDraft,
52
52
  buildOptionValuesKey,
@@ -82,7 +82,6 @@ import {
82
82
  } from "@open-mercato/core/modules/catalog/components/products/productFormUtils";
83
83
  import { createLogger } from "@open-mercato/shared/lib/logger";
84
84
  const logger = createLogger("catalog");
85
- const productFormTypedSchema = productFormSchema;
86
85
  const TRUE_BOOLEAN_VALUES = /* @__PURE__ */ new Set(["true", "1", "yes", "y", "t"]);
87
86
  const matchField = (fieldId) => (value) => value === fieldId || value.startsWith(`${fieldId}.`) || value.startsWith(`${fieldId}[`);
88
87
  const matchPrefix = (prefix) => (value) => value.startsWith(prefix);
@@ -180,6 +179,11 @@ function readInboxProductDraft() {
180
179
  }
181
180
  function CreateCatalogProductPage() {
182
181
  const t = useT();
182
+ const locale = useLocale();
183
+ const productFormTypedSchema = React.useMemo(
184
+ () => buildLocaleAwareProductFormSchema(locale),
185
+ [locale]
186
+ );
183
187
  const router = useRouter();
184
188
  const searchParams = useSearchParams();
185
189
  const fromInboxAction = searchParams.get("fromInboxAction");