erp-pos-ecommerce-shared 0.2.5 → 0.2.7

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,8 +1,8 @@
1
1
  import React$1, { ReactNode } from 'react';
2
- import { e as IField, b as IButton } from './form.interface-CO6P9ez0.js';
2
+ import { e as IField, b as IButton } from './form.interface-D72rc8aa.js';
3
3
  import { ReactFormExtendedApi, FormValidateOrFn, FormAsyncValidateOrFn } from '@tanstack/react-form';
4
4
  import { UseMutationResult, UseQueryOptions, UseMutationOptions } from '@tanstack/react-query';
5
- import { u as TblProductsImage, q as ITableFilterConfig, i as IFilterSelectOption } from './filters.interface-glhGBJfx.js';
5
+ import { v as TblProductsImage, r as ITableFilterConfig, j as IFilterSelectOption } from './filters.interface-C9rkI_yn.js';
6
6
  import * as z from 'zod';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
  import { ColumnDef, useReactTable, Row } from '@tanstack/react-table';
@@ -399,6 +399,7 @@ interface FormPagePropsBase<TData, TVariables = unknown> {
399
399
  * @example <ArrowLeft /> from lucide-react
400
400
  */
401
401
  backButtonIcon?: ReactNode;
402
+ onFormRef?: (form: FormInstance) => void;
402
403
  }
403
404
  interface FormPagePropsWithFiles<TData, TVariables = unknown> extends FormPagePropsBase<TData, TVariables> {
404
405
  hasFiles: true;
@@ -409,6 +410,6 @@ interface FormPagePropsWithoutFiles<TData, TVariables = unknown> extends FormPag
409
410
  buildVariables?: (values: Record<string, unknown>) => TVariables;
410
411
  }
411
412
  type FormPageProps<TData, TVariables = unknown> = FormPagePropsWithFiles<TData, TVariables> | FormPagePropsWithoutFiles<TData, TVariables>;
412
- declare const FormPage: <TData, TVariables = unknown>({ fields, buttons, mutationOptions, buildVariables, typeOfForm, dataKey, loading, cardWidth, hasFiles, onSuccess, setData, navigateAway, showBackButton, onGoBack, backButtonIcon, }: FormPageProps<TData, TVariables>) => React.ReactNode;
413
+ declare const FormPage: <TData, TVariables = unknown>({ fields, buttons, mutationOptions, buildVariables, typeOfForm, dataKey, loading, cardWidth, hasFiles, onSuccess, setData, navigateAway, showBackButton, onGoBack, backButtonIcon, onFormRef, }: FormPageProps<TData, TVariables>) => React.ReactNode;
413
414
 
414
415
  export { BottomPagination, CreateEditForm, DataTable, EmptyState, FilterDate, type FilterDateProps, FilterSelect, type FilterSelectProps, FormGenerator, type FormInstance, FormPage, type FormValues, ImageForm, type PaginatedResponse, SearchInput, SimpleDataTable, TablePage, TableSkeleton, configureImageFormIcons, dateGteFilterFn, fieldGenerator, generateFormSchema };
@@ -2102,7 +2102,8 @@ var FormPage = ({
2102
2102
  navigateAway = true,
2103
2103
  showBackButton = true,
2104
2104
  onGoBack,
2105
- backButtonIcon
2105
+ backButtonIcon,
2106
+ onFormRef
2106
2107
  }) => {
2107
2108
  const showBack = showBackButton && onGoBack != null;
2108
2109
  const mutation = useMutation(mutationOptions);
@@ -2140,7 +2141,8 @@ var FormPage = ({
2140
2141
  hasFiles,
2141
2142
  onSuccess,
2142
2143
  setData,
2143
- navigateAway
2144
+ navigateAway,
2145
+ onFormRef
2144
2146
  }
2145
2147
  ) })
2146
2148
  ] }) })