@teselagen/ui 0.3.76 → 0.3.78

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ui",
3
- "version": "0.3.76",
3
+ "version": "0.3.78",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { Dialog, Classes } from "@blueprintjs/core";
3
3
  import { Rnd } from "react-rnd";
4
+ import { debounce } from "lodash";
4
5
  import "./style.css";
5
6
 
6
7
  const defaultDialogWidth = 400;
@@ -13,9 +14,11 @@ export default class ResizableDraggableDialog extends React.Component {
13
14
  this.setDefaults();
14
15
  try {
15
16
  const el = this.containerEl.querySelector(".bp3-dialog-body");
16
- this.resizeObs = new ResizeObserver(() => {
17
- this.setDefaults({ doNotSetXOrWidth: true });
18
- });
17
+ this.resizeObs = new ResizeObserver(
18
+ debounce(() => {
19
+ this.setDefaults({ doNotSetXOrWidth: true });
20
+ })
21
+ );
19
22
  this.resizeObs.observe(el);
20
23
  } catch (e) {
21
24
  console.warn(
package/src/toastr.js CHANGED
@@ -32,6 +32,9 @@ const generateToast = intent => (message, options) => {
32
32
  if (intent === Intent.DANGER) {
33
33
  console.error("Toastr error message: ", message);
34
34
  }
35
+ if (intent === Intent.WARNING) {
36
+ console.error("Toastr warning message: ", message);
37
+ }
35
38
 
36
39
  const maybeAddClearAll = () => {
37
40
  // wipe any existing clear all buttons