react-dialogger 1.1.45 → 1.1.47

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.
@@ -29,7 +29,7 @@ declare class DialogBase<Values extends Record<string, any>> extends Component<B
29
29
  protected readonly _snackbarRef: RefObject<any>;
30
30
  protected _dialogSize: IDialogSize;
31
31
  protected _holder?: TInitialHolder;
32
- protected _formikProps: FormikProps<any>;
32
+ protected readonly _formikProps: React.RefObject<FormikProps<any>>;
33
33
  _dialogTranslate: {
34
34
  lastX: number;
35
35
  lastY: number;
@@ -352,7 +352,7 @@ var DialogBase = /** @class */ (function (_super) {
352
352
  return;
353
353
  }
354
354
  _this.baseZoomEffect();
355
- }, children: (0, jsx_runtime_1.jsx)(DialogContent_1.DialogContent, { body: body, header: header, actions: actions, dialogRef: _this._dialogRef, footerRef: _this._footerRef, backdropRef: _this._backdropRef, dialogOptions: _this.dialogOptions, dom: _this._dom, keyboardListener: _this._keyboardListener, dialog: _this, initialValues: _this._initialValues }) });
355
+ }, children: (0, jsx_runtime_1.jsx)(DialogContent_1.DialogContent, { body: body, header: header, actions: actions, dialogRef: _this._dialogRef, footerRef: _this._footerRef, backdropRef: _this._backdropRef, dialogOptions: _this.dialogOptions, dom: _this._dom, keyboardListener: _this._keyboardListener, dialog: _this, initialValues: _this._initialValues, formikProps: _this._formikProps }) });
356
356
  };
357
357
  _this.switchFullScreen = function () {
358
358
  if (!_this.state.fullscreenMode) {
@@ -541,7 +541,7 @@ var DialogBase = /** @class */ (function (_super) {
541
541
  var _b;
542
542
  var _c, _d;
543
543
  var body = _a.body, header = _a.header, actions = _a.actions;
544
- _this._formikProps = (0, formik_1.useFormik)({
544
+ _this._formikProps.current = (0, formik_1.useFormik)({
545
545
  enableReinitialize: true,
546
546
  initialValues: _this._initialValues,
547
547
  onSubmit: function (values, formikHelpers) {
@@ -683,6 +683,7 @@ var DialogBase = /** @class */ (function (_super) {
683
683
  var base = _this._dialogOptions.base;
684
684
  var memoBounds = base.memoBounds;
685
685
  _this._storedBounds = ((_b = _this._dialogOptions.base) === null || _b === void 0 ? void 0 : _b.memoBounds) ? (0, helpers_1.getDialogBounds)(base) : null;
686
+ _this._formikProps = (0, react_1.createRef)();
686
687
  return _this;
687
688
  }
688
689
  Object.defineProperty(DialogBase.prototype, "parent", {
@@ -725,10 +726,10 @@ var DialogBase = /** @class */ (function (_super) {
725
726
  // return super.state
726
727
  // }
727
728
  get: function () {
728
- return this._formikProps;
729
+ return this._formikProps.current;
729
730
  },
730
731
  set: function (value) {
731
- this._formikProps = value;
732
+ this._formikProps.current = value;
732
733
  },
733
734
  enumerable: false,
734
735
  configurable: true
@@ -755,6 +756,8 @@ var DialogBase = /** @class */ (function (_super) {
755
756
  configurable: true
756
757
  });
757
758
  Object.defineProperty(DialogBase.prototype, "values", {
759
+ // 1248
760
+ //
758
761
  // get values(): DialogValues {
759
762
  get: function () {
760
763
  return this.state.values;
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
  import { BaseDialogProps, DialogOptionsType, TDialogCallbackNodeFn } from "../types/DialogTypes";
3
3
  import DialogBase from "./DialogBase";
4
4
  import { DialogContentFooterReturnType } from "./DialogContenFooter";
5
+ import { FormikProps } from "formik";
5
6
  interface IContentProps {
6
7
  body: TDialogCallbackNodeFn;
7
8
  header: TDialogCallbackNodeFn;
@@ -14,6 +15,7 @@ interface IContentProps {
14
15
  keyboardListener: BaseDialogProps['keyboardListener'];
15
16
  dialog: DialogBase<any>;
16
17
  initialValues: BaseDialogProps['initialValues'];
18
+ formikProps: React.RefObject<FormikProps<any>>;
17
19
  }
18
20
  declare const DialogContent: React.FC<IContentProps>;
19
21
  export { DialogContent };
@@ -78,13 +78,13 @@ var dialogAutoPos = function () {
78
78
  var DialogContent = function (_a) {
79
79
  var _b;
80
80
  var _c, _d, _e;
81
- var body = _a.body, header = _a.header, actions = _a.actions, dialogRef = _a.dialogRef, footerRef = _a.footerRef, dialogOptions = _a.dialogOptions, dom = _a.dom, backdropRef = _a.backdropRef, keyboardListener = _a.keyboardListener, dialog = _a.dialog, initialValues = _a.initialValues;
81
+ var body = _a.body, header = _a.header, actions = _a.actions, dialogRef = _a.dialogRef, footerRef = _a.footerRef, dialogOptions = _a.dialogOptions, dom = _a.dom, backdropRef = _a.backdropRef, keyboardListener = _a.keyboardListener, dialog = _a.dialog, initialValues = _a.initialValues, formikProps = _a.formikProps;
82
82
  var position = dialogAutoPos();
83
83
  var snackbarRef = React.useRef(null);
84
84
  var _f = React.useState(false), fullscreenMode = _f[0], setFullscreenMode = _f[1];
85
85
  var baseOptions = dialogOptions.base;
86
- dialog.formikProps = (0, formik_1.useFormik)({
87
- enableReinitialize: true,
86
+ formikProps.current = (0, formik_1.useFormik)({
87
+ // enableReinitialize: true,
88
88
  initialValues: initialValues,
89
89
  onSubmit: function (values, formikHelpers) {
90
90
  // No Necessary
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-dialogger",
3
- "version": "1.1.45",
3
+ "version": "1.1.47",
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",