@gridsheet/react-core 2.0.3 → 2.0.5-0

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/README.md CHANGED
@@ -18,9 +18,8 @@ $ npm install @gridsheet/react-core --save
18
18
 
19
19
  ## Docs
20
20
 
21
- - [ReactGridsheet document](https://docs.walkframe.com/gridsheet/react)
22
- - [Examples](https://docs.walkframe.com/gridsheet/Examples/react-case1)
23
- - [Histories](https://docs.walkframe.com/gridsheet/history)
21
+ - [GridSheet document](https://gridsheet.walkframe.com/)
22
+ - [Examples](https://gridsheet.walkframe.com/examples/case1)
24
23
 
25
24
  ## License
26
25
  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwalkframe%2Freact-gridsheet.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwalkframe%2Freact-gridsheet?ref=badge_large)
@@ -1,2 +1,6 @@
1
- export declare const FormulaBar: () => JSX.Element;
1
+ type FormulaBarProps = {
2
+ ready: boolean;
3
+ };
4
+ export declare const FormulaBar: ({ ready }: FormulaBarProps) => JSX.Element;
5
+ export {};
2
6
  //# sourceMappingURL=FormulaBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormulaBar.d.ts","sourceRoot":"","sources":["../../src/components/FormulaBar.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU,mBAuMtB,CAAC"}
1
+ {"version":3,"file":"FormulaBar.d.ts","sourceRoot":"","sources":["../../src/components/FormulaBar.tsx"],"names":[],"mappings":"AAUA,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,WAAW,eAAe,gBAsMpD,CAAC"}
package/dist/index.js CHANGED
@@ -10415,7 +10415,7 @@ const embedStyle = () => {
10415
10415
  style.setAttribute("data-modified-at", `${LAST_MODIFIED}`);
10416
10416
  style.innerText = CSS;
10417
10417
  };
10418
- const FormulaBar = () => {
10418
+ const FormulaBar = ({ ready }) => {
10419
10419
  var _a;
10420
10420
  const { store, dispatch } = useContext(Context);
10421
10421
  const [before, setBefore] = useState("");
@@ -10464,7 +10464,6 @@ const FormulaBar = () => {
10464
10464
  }, []);
10465
10465
  const largeInput = largeEditorRef.current;
10466
10466
  const handleInput = useCallback((e) => {
10467
- console.log("e.currentTarget.value", e.currentTarget.value);
10468
10467
  dispatch(setInputting(e.currentTarget.value));
10469
10468
  }, []);
10470
10469
  const updateScroll = useCallback(() => {
@@ -10556,14 +10555,15 @@ const FormulaBar = () => {
10556
10555
  },
10557
10556
  [table, choosing, before, writeCell, updateScroll]
10558
10557
  );
10558
+ const style = ready ? {} : { visibility: "hidden" };
10559
10559
  if (!table) {
10560
- return /* @__PURE__ */ jsxs("label", { className: "gs-formula-bar gs-hidden", children: [
10560
+ return /* @__PURE__ */ jsxs("label", { className: "gs-formula-bar gs-hidden", style, children: [
10561
10561
  /* @__PURE__ */ jsx("div", { className: "gs-selecting-address" }),
10562
10562
  /* @__PURE__ */ jsx("div", { className: "gs-fx", children: "Fx" }),
10563
10563
  /* @__PURE__ */ jsx("div", { className: "gs-formula-bar-editor-inner", children: /* @__PURE__ */ jsx("textarea", {}) })
10564
10564
  ] });
10565
10565
  }
10566
- return /* @__PURE__ */ jsxs("label", { className: "gs-formula-bar", children: [
10566
+ return /* @__PURE__ */ jsxs("label", { className: "gs-formula-bar", "data-sheet-id": store.sheetId, style, children: [
10567
10567
  /* @__PURE__ */ jsx(ScrollHandle, { style: { position: "absolute", left: 0, top: 0, zIndex: 2 }, vertical: -1 }),
10568
10568
  /* @__PURE__ */ jsx("div", { className: "gs-selecting-address", children: address }),
10569
10569
  /* @__PURE__ */ jsx("div", { className: "gs-fx", children: "Fx" }),
@@ -10851,7 +10851,7 @@ function GridSheet({
10851
10851
  /* @__PURE__ */ jsx(ScrollHandle, { style: { position: "fixed", top: 0, left: 0 } }),
10852
10852
  /* @__PURE__ */ jsx(ScrollHandle, { style: { position: "absolute", zIndex: 4, right: 0, top: 0, width: 5 }, horizontal: 1 }),
10853
10853
  /* @__PURE__ */ jsx(ScrollHandle, { style: { position: "absolute", zIndex: 4, left: 0, bottom: 0, height: 5 }, vertical: 1 }),
10854
- typeof store.searchQuery === "undefined" ? showFormulaBar && /* @__PURE__ */ jsx(FormulaBar, {}) : /* @__PURE__ */ jsx(SearchBar, {}),
10854
+ typeof store.searchQuery === "undefined" ? showFormulaBar && /* @__PURE__ */ jsx(FormulaBar, { ready: wire.ready }) : /* @__PURE__ */ jsx(SearchBar, {}),
10855
10855
  /* @__PURE__ */ jsxs(
10856
10856
  "div",
10857
10857
  {