react-dialogger 1.1.98 → 1.1.99

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,7 +1,7 @@
1
1
  import { Component, RefObject } from 'react';
2
2
  import { FormikProps } from "formik";
3
3
  import { DialogActionBase } from "./index.js";
4
- import { BaseDialogProps, BaseDialogState, IDialogSize, DialogOptionsType, TDialogCallbackFn, TDialogCallbackVoidFn, WithBackdrop, IDialogSnackbar, IInProcess, TInitialHolder, ISnackbarAnchor, TSeverity, TAccessFrom, ActionApiDef, DialogContentFooterReturnType, DialogFormikAdapter, DialogHandlers, DialogHandlerFn, DialogValues, DialogValue } from "../types/index.js";
4
+ import { BaseDialogProps, BaseDialogState, IDialogSize, DialogOptionsType, TDialogCallbackFn, TDialogCallbackVoidFn, WithBackdrop, IDialogSnackbar, IInProcess, TInitialHolder, ISnackbarAnchor, TSeverity, TAccessFrom, ActionApiDef, DialogContentFooterReturnType, DialogFormikAdapter, DialogHandlers, DialogHandlerFn, DialogValues, ModelDialogValues } from "../types/index.js";
5
5
  import Dialog, { DialogAction } from "../models/index.js";
6
6
  interface IFormikAdapter extends Pick<FormikProps<any>, 'setValues' | 'setFieldValue' | 'values'> {
7
7
  }
@@ -64,7 +64,7 @@ declare class DialogBase<Values extends DialogValues<Record<string, any>>> exten
64
64
  get formikValidate(): Promise<DialogFormikAdapter<any>>;
65
65
  set inlineFormikProps(inlineFormikProps: IFormikAdapter);
66
66
  get values(): IFormikAdapter['values'];
67
- setValue(key: string, value: DialogValue): void;
67
+ setValue(key: string, value: ModelDialogValues<any>): void;
68
68
  setValues(values: DialogValues<Values>, callbackFn?: () => void): void;
69
69
  componentDidMount(): void;
70
70
  setInProcess: (process: boolean, message?: string, holder?: TInitialHolder) => this;
@@ -385,6 +385,7 @@ var DialogBase = /** @class */ (function (_super) {
385
385
  };
386
386
  // ✨✨✨✨✨✨✨✨✨✨✨
387
387
  // public setValues(values: IFormikAdapter['values'], callbackFn?: () => void): void {
388
+ // 2 public setValues(values: DialogValues<Values>, callbackFn?: () => void): void {
388
389
  DialogBase.prototype.setValues = function (values, callbackFn) {
389
390
  this._inlineFormikProps.setValues(values);
390
391
  // UseImperative
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-dialogger",
3
- "version": "1.1.98",
3
+ "version": "1.1.99",
4
4
  "description": "This package is a continuation of the react-araci package. Due to an error, react-araci was removed, and it has been decided to continue under the new package name react-dialogger",
5
5
  "main": "index.js",
6
6
  "author": "Sueleyman Topaloglu",
@@ -245,11 +245,12 @@ export type TInitialValues<T extends Record<string, any>> = T;
245
245
  export type TUserProps = {
246
246
  [K: string]: any;
247
247
  };
248
- export type DialogValue = string | number | any[] | {
249
- [k: string]: string | number | any[];
250
- };
248
+ export type NonFunction<T> = T extends (...args: any[]) => any ? never : T;
249
+ export type DialogValue<T> = string | number | boolean | null | undefined | DialogValue<T>[] | {
250
+ [key: string]: DialogValue<T>;
251
+ } | NonFunction<T>;
251
252
  export type ModelDialogValues<T> = {
252
- [K in keyof T]: DialogValue;
253
+ [key: string]: DialogValue<T>;
253
254
  };
254
255
  export type DialogValues<T> = ModelDialogValues<T>;
255
256
  export type DialogHandlerFn = (...args: any[]) => any;