chayns-api 2.2.18 → 2.2.20

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.
@@ -21,9 +21,9 @@ const WaitUntil = ({
21
21
  loadingComponent
22
22
  }) => {
23
23
  const [loaded, setLoaded] = (0, _react.useState)(() => !tasks.length);
24
- const mounted = (0, _react.useRef)(false);
25
- if (!mounted.current) handleTasks(tasks).finally(() => setLoaded(true));
26
- mounted.current = true;
24
+ (0, _react.useEffect)(() => {
25
+ handleTasks(tasks).finally(() => setLoaded(true));
26
+ }, []);
27
27
  return loaded ? children : loadingComponent;
28
28
  };
29
29
  exports.WaitUntil = WaitUntil;
@@ -1,4 +1,4 @@
1
- import { useRef, useState } from "react";
1
+ import { useEffect, useState } from "react";
2
2
  const handleTasks = async tasks => {
3
3
  for (let i = 0; i < tasks.length; i++) {
4
4
  const task = tasks[i];
@@ -16,8 +16,8 @@ export const WaitUntil = _ref => {
16
16
  loadingComponent
17
17
  } = _ref;
18
18
  const [loaded, setLoaded] = useState(() => !tasks.length);
19
- const mounted = useRef(false);
20
- if (!mounted.current) handleTasks(tasks).finally(() => setLoaded(true));
21
- mounted.current = true;
19
+ useEffect(() => {
20
+ handleTasks(tasks).finally(() => setLoaded(true));
21
+ }, []);
22
22
  return loaded ? children : loadingComponent;
23
23
  };
@@ -98,6 +98,7 @@ export interface DialogModule<T = object> {
98
98
  backgroundColor?: string;
99
99
  allowAnonymousUser?: boolean;
100
100
  seamless?: boolean;
101
+ height?: string | number;
101
102
  }
102
103
  export interface DialogIFrame<T = object> {
103
104
  type: DialogType.IFRAME;
@@ -106,6 +107,7 @@ export interface DialogIFrame<T = object> {
106
107
  backgroundColor?: string;
107
108
  allowAnonymousUser?: boolean;
108
109
  seamless?: boolean;
110
+ height?: string | number;
109
111
  }
110
112
  export declare enum DialogInputType {
111
113
  NUMBER = "number",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.2.18",
3
+ "version": "2.2.20",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",