erp-pos-ecommerce-shared 0.2.6 → 0.2.8
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.d.ts +3 -2
- package/dist/components.js +4 -2
- package/dist/components.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components.d.ts
CHANGED
|
@@ -382,7 +382,7 @@ interface FormPagePropsBase<TData, TVariables = unknown> {
|
|
|
382
382
|
typeOfForm: "create" | "edit";
|
|
383
383
|
dataKey: string;
|
|
384
384
|
loading: boolean;
|
|
385
|
-
cardWidth?: number;
|
|
385
|
+
cardWidth?: number | string;
|
|
386
386
|
onSuccess?: (data: TData) => void;
|
|
387
387
|
setData?: (data: TData) => void;
|
|
388
388
|
navigateAway?: boolean;
|
|
@@ -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 };
|
package/dist/components.js
CHANGED
|
@@ -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
|
] }) })
|