@teselagen/ui 0.6.2 → 0.6.4

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.6.2",
3
+ "version": "0.6.4",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -46,7 +46,7 @@
46
46
  "react-color": "^2.19.3",
47
47
  "react-dom": "^18.2.0",
48
48
  "react-dropzone": "^11.4.2",
49
- "react-markdown": "9.0.1",
49
+ "react-markdown": "8.0.7",
50
50
  "react-redux": "^8.0.5",
51
51
  "react-rnd": "^10.2.4",
52
52
  "react-router-dom": "^4.3.1",
@@ -55,7 +55,7 @@
55
55
  "redux": "^4.1.2",
56
56
  "redux-form": "^8.3.10",
57
57
  "redux-thunk": "2.4.1",
58
- "remark-gfm": "^4.0.0",
58
+ "remark-gfm": "^3.0.1",
59
59
  "tippy.js": "^6.3.7",
60
60
  "url-join": "^4.0.1",
61
61
  "use-deep-compare-effect": "^1.6.1",
@@ -0,0 +1,38 @@
1
+ /* eslint react/jsx-no-bind: 0 */
2
+ import { Popover } from "@blueprintjs/core";
3
+ import React, { useState } from "react";
4
+
5
+ export default function ExcelCell() {
6
+ const [v, setV] = useState("");
7
+ const [isPopoverOpen, setIsPopoverOpen] = useState(false);
8
+ return (
9
+ <Popover
10
+ onClose={() => {
11
+ setIsPopoverOpen(false);
12
+ }}
13
+ isOpen={isPopoverOpen}
14
+ content={<div>Sum</div>}
15
+ >
16
+ <div
17
+ style={{
18
+ border: "1px solid #ccc",
19
+ padding: 5,
20
+ width: 100,
21
+ height: 30
22
+ }}
23
+ contentEditable
24
+ onInput={e => {
25
+ const text = e.currentTarget.textContent;
26
+
27
+ if (text === "=") {
28
+ // open a popover
29
+ setIsPopoverOpen(true);
30
+ }
31
+ setV(text);
32
+ }}
33
+ >
34
+ {v}
35
+ </div>
36
+ </Popover>
37
+ );
38
+ }
@@ -232,7 +232,9 @@ class TgSelect extends React.Component {
232
232
  active={active}
233
233
  onClick={(...args) => {
234
234
  const shouldStopEarly = this.props.onCreateNewOption(query);
235
- if (!shouldStopEarly) {
235
+ if (shouldStopEarly) {
236
+ this.setOpenState(false);
237
+ } else {
236
238
  handleClick(...args);
237
239
  }
238
240
  }}