@oniratec/onira-react-ui 1.2.2 → 1.2.3

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/index.d.ts CHANGED
@@ -334,6 +334,8 @@ export declare interface FormFactoryConfig<TFormModel extends FieldValues, TEnti
334
334
 
335
335
  export declare function FormFactoryRenderer<TFormModel extends FieldValues, TEntity>({ config, form, onSubmitAction, submitLabel, maxWidthClass, children, }: Props_4<TFormModel, TEntity>): JSX.Element;
336
336
 
337
+ declare type FormFactoryRendererProps<TFormModel extends FieldValues, TEntity> = Parameters<typeof FormFactoryRenderer<TFormModel, TEntity>>[0];
338
+
337
339
  export declare const Input: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
338
340
 
339
341
  /** =========================
@@ -462,6 +464,8 @@ declare type RenderFiltersPanelOptions = Omit<FiltersPanelProps_2, 'filters' | '
462
464
  onReset?: () => void;
463
465
  };
464
466
 
467
+ export declare function renderFormFactory<TFormModel extends FieldValues, TEntity>(props: FormFactoryRendererProps<TFormModel, TEntity>): JSX.Element;
468
+
465
469
  export declare function renderTable<T>(config: TableFactoryConfig<T>, data: T[], props?: DataTableRenderProps<T>): JSX.Element;
466
470
 
467
471
  declare type Section<T extends FieldValues> = {
package/dist/index.js CHANGED
@@ -12670,6 +12670,9 @@ function FormFactoryRenderer({
12670
12670
  /* @__PURE__ */ jsx("div", { className: "oniratec-form__actions", children: /* @__PURE__ */ jsx(Button, { type: "submit", loading: t.formState.isSubmitting, children: i }) })
12671
12671
  ] }) });
12672
12672
  }
12673
+ function renderFormFactory(e) {
12674
+ return /* @__PURE__ */ jsx(FormFactoryRenderer, { ...e });
12675
+ }
12673
12676
  const alignToClass = (e) => e === "center" ? "text-center" : e === "right" ? "text-right" : "text-left", widthToClass = (e) => {
12674
12677
  if (e)
12675
12678
  return typeof e == "number" ? `w-[${e}px]` : e.startsWith("w-") ? e : `w-[${e}]`;
@@ -12802,6 +12805,7 @@ export {
12802
12805
  createTableFactory,
12803
12806
  renderFiltersModal,
12804
12807
  renderFiltersPanel,
12808
+ renderFormFactory,
12805
12809
  renderTable,
12806
12810
  useField
12807
12811
  };