@open-mercato/core 0.8.1-develop.7207.1.901ef7e47a → 0.8.1-develop.7218.1.9f22882799
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/.turbo/turbo-build.log +1 -1
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js +6 -2
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/create/page.js +7 -3
- package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductUomSection.js +11 -22
- package/dist/modules/catalog/components/products/ProductUomSection.js.map +2 -2
- package/dist/modules/catalog/components/products/productForm.js +26 -1
- package/dist/modules/catalog/components/products/productForm.js.map +2 -2
- package/dist/modules/configs/lib/upgrade-actions.js +1 -0
- package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
- package/dist/modules/configs/services/upgradeActionsService.js +9 -2
- package/dist/modules/configs/services/upgradeActionsService.js.map +2 -2
- package/dist/modules/customers/components/calendar/CalendarEventEditor.js +1 -4
- package/dist/modules/customers/components/calendar/CalendarEventEditor.js.map +2 -2
- package/dist/modules/customers/components/calendar/CalendarToolbar.js +3 -0
- package/dist/modules/customers/components/calendar/CalendarToolbar.js.map +2 -2
- package/dist/modules/customers/components/calendar/editor/RepeatField.js +1 -3
- package/dist/modules/customers/components/calendar/editor/RepeatField.js.map +2 -2
- package/dist/modules/customers/components/calendar/editor/ScheduleSection.js +1 -5
- package/dist/modules/customers/components/calendar/editor/ScheduleSection.js.map +2 -2
- package/dist/modules/customers/components/calendar/editor/inputs.js.map +2 -2
- package/dist/modules/entities/lib/definition-scope-where.js +18 -0
- package/dist/modules/entities/lib/definition-scope-where.js.map +7 -0
- package/dist/modules/entities/lib/definition-scope.js +2 -8
- package/dist/modules/entities/lib/definition-scope.js.map +2 -2
- package/dist/modules/entities/lib/helpers.js +6 -32
- package/dist/modules/entities/lib/helpers.js.map +2 -2
- package/dist/modules/entities/lib/scoped-field-defs.js +5 -10
- package/dist/modules/entities/lib/scoped-field-defs.js.map +2 -2
- package/dist/modules/query_index/lib/batch.js +2 -2
- package/dist/modules/query_index/lib/batch.js.map +2 -2
- package/dist/modules/query_index/lib/document.js +7 -1
- package/dist/modules/query_index/lib/document.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js.map +1 -1
- package/dist/modules/query_index/lib/indexer.js +9 -2
- package/dist/modules/query_index/lib/indexer.js.map +2 -2
- package/dist/modules/query_index/lib/search-tokens.js.map +2 -2
- package/dist/modules/wms/components/backend/AdjustInventoryDialog.js +15 -1
- package/dist/modules/wms/components/backend/AdjustInventoryDialog.js.map +2 -2
- package/package.json +7 -7
- package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +6 -2
- package/src/modules/catalog/backend/catalog/products/create/page.tsx +7 -6
- package/src/modules/catalog/components/products/ProductUomSection.tsx +11 -31
- package/src/modules/catalog/components/products/productForm.ts +53 -0
- package/src/modules/configs/lib/upgrade-actions.ts +7 -0
- package/src/modules/configs/services/upgradeActionsService.ts +17 -2
- package/src/modules/customers/components/calendar/CalendarEventEditor.tsx +1 -4
- package/src/modules/customers/components/calendar/CalendarToolbar.tsx +3 -0
- package/src/modules/customers/components/calendar/editor/RepeatField.tsx +0 -3
- package/src/modules/customers/components/calendar/editor/ScheduleSection.tsx +1 -7
- package/src/modules/customers/components/calendar/editor/inputs.tsx +0 -1
- package/src/modules/entities/lib/definition-scope-where.ts +27 -0
- package/src/modules/entities/lib/definition-scope.ts +2 -10
- package/src/modules/entities/lib/helpers.ts +6 -35
- package/src/modules/entities/lib/scoped-field-defs.ts +6 -15
- package/src/modules/query_index/lib/batch.ts +8 -2
- package/src/modules/query_index/lib/document.ts +28 -0
- package/src/modules/query_index/lib/engine.ts +4 -4
- package/src/modules/query_index/lib/indexer.ts +15 -2
- package/src/modules/query_index/lib/search-tokens.ts +31 -0
- 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
|
-
|
|
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");
|