@mxstage/mxstage 0.2.6 → 0.2.8
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 +73 -15
- package/app/assets/{data-grid-overlay-editor-pt3p2IkT.js → data-grid-overlay-editor-BrQ-gATi.js} +1 -1
- package/app/assets/index-C9kLOfvw.js +281 -0
- package/app/assets/{index-Drrlbw0z.css → index-CgzHRsxM.css} +1 -1
- package/app/assets/{number-overlay-editor-Dh36xA80.js → number-overlay-editor-BMNyXNx0.js} +1 -1
- package/app/index.html +2 -2
- package/app/sw.js +1 -1
- package/package.json +1 -1
- package/server/mxstage-bridge.mjs +3193 -560
- package/app/assets/index-CEZgw9ro.js +0 -280
package/README.md
CHANGED
|
@@ -7,21 +7,22 @@
|
|
|
7
7
|
[](#requirements)
|
|
8
8
|
[](#requirements)
|
|
9
9
|
[](https://modelcontextprotocol.io)
|
|
10
|
-
[](https://glama.ai/mcp/servers/mxstage/mxstage)
|
|
11
10
|
[](https://mxstage.tsunagi.app/pricing)
|
|
12
11
|
[](LICENSE)
|
|
13
12
|
[](#requirements)
|
|
14
13
|
|
|
15
14
|
English | [日本語](README.ja.md)
|
|
16
15
|
|
|
17
|
-
**MX Stage is a local-only AI workbench for correcting IBM Maximo data with your own AI assistant (Claude Desktop, ChatGPT, IBM Bob): every change is staged, diffed and approved by a human before it is written to Maximo.**
|
|
16
|
+
**MX Stage is a local-only AI workbench for correcting IBM Maximo data with your own AI assistant (Claude Desktop, ChatGPT, Antigravity, IBM Bob): every change is staged, diffed and approved by a human before it is written to Maximo.**
|
|
18
17
|
|
|
19
18
|
Website: https://mxstage.tsunagi.app · Contact: mxstage@tsunagi.app
|
|
20
19
|
|
|
21
|
-
- **Your AI works on a staging sheet, not on Maximo.** The AI assistant loads Maximo data into a sheet in the *work screen* (a browser tab), analyses it and proposes changes with reasons. You see every changed cell.
|
|
22
|
-
- **Only a person can commit.** The AI's tools cannot write to Maximo. Changes are written only when you press **Commit to Maximo** in the work screen. MX Stage writes one record first
|
|
23
|
-
- **
|
|
20
|
+
- **Your AI works on a staging sheet, not on Maximo.** The AI assistant loads Maximo data into a sheet in the *work screen* (a browser tab), analyses it and proposes changes with reasons. You see every changed cell. The sheets live only in the work screen tab and the bridge's memory; loaded tables are never written to disk.
|
|
21
|
+
- **Only a person can commit.** The AI's tools cannot write to Maximo. Changes are written only when you press **Commit to Maximo** in the work screen. MX Stage writes one record first and lets you check it before it sends the rest. Records that someone else changed after you loaded them are skipped and listed; it stops on an error or a result it cannot confirm. Any batch of changes can be undone before you commit. You choose in the commit panel how many records one commit sends (all of them, or a number; 200 by default).
|
|
22
|
+
- **Keep a record of what was approved.** The commit panel saves a diff report (Excel): one row per changed cell with the old value, the new value, who changed it (the AI assistant or a person) and why. After a commit, it also holds the write log of that commit.
|
|
23
|
+
- **Nothing leaves your PC except calls to your Maximo and your AI assistant.** There is no MX Stage cloud and no telemetry. There are two optional exceptions: if you turn on **Settings → Updates → Update automatically** (off by default), the bridge asks GitHub once a day for the latest version number; and if you choose **Settings → Demo → Download data and connect**, it downloads fictional sample data once from `mxstage-demo.pages.dev` (nothing is sent). Installs made with the setup script then update themselves while no work is open (the new version from GitHub, its packages from the npm registry); the Claude Desktop extension downloads the new file from GitHub and checks it for you to install. A small local process (the *bridge*) serves the work screen, talks MCP to your AI assistant and relays requests to Maximo, so Maximo needs no CORS settings. Your Maximo API key is saved on this PC by the bridge, encrypted with Windows data protection (DPAPI), and is not sent to the browser (on macOS, untested, the Keychain protects it; on Linux, a file only your user can read). Every window of the work screen — the installed app, a browser tab, or the browser inside your AI assistant — connects automatically, even after a restart, and you can switch between saved Maximo environments in Settings. (You can also connect without saving; the key then stays only in the tab's memory.)
|
|
24
24
|
- **Teach it your procedures.** Save a procedure worked out in a conversation as a *Skill*; the AI follows it next time.
|
|
25
|
+
- **Keep the customer's way of writing.** *Customer dictionaries* hold how a customer writes names, the words that mean a failure code, and how values such as maker or department names are written. The AI adds entries and the work screen applies them as rules (matching, codes from text, value replacement), so the next month's files need less reading. You check and save them in the work screen; with a shared folder per connection (OneDrive, SharePoint, a network folder…), saved entries reach every member through your own file sync. MX Stage itself sends them nowhere.
|
|
25
26
|
|
|
26
27
|
## Why not call the Maximo REST API from the AI directly?
|
|
27
28
|
|
|
@@ -33,14 +34,14 @@ Several Maximo MCP servers let the AI call the REST API. That is fine for readin
|
|
|
33
34
|
|---|---|
|
|
34
35
|
| Claude Desktop (chat and Code tab) | Supported |
|
|
35
36
|
| ChatGPT desktop — **Codex** or **Work** mode (Chat mode cannot use local MCP servers) | Supported |
|
|
36
|
-
|
|
|
37
|
+
| Antigravity (2.0, IDE) | Supported (registered by the installer) |
|
|
37
38
|
| IBM Bob | Supported (registered by the installer) |
|
|
38
|
-
|
|
|
39
|
+
| Claude Code, Codex CLI and IDE extension | Work, not officially supported |
|
|
39
40
|
|
|
40
41
|
## Requirements
|
|
41
42
|
|
|
42
43
|
- Windows (macOS and Linux are untested)
|
|
43
|
-
- Node.js 22.6 or later and Git (the installer offers to install them)
|
|
44
|
+
- For the installer: Node.js 22.6 or later and Git (the installer offers to install them). The Claude Desktop extension needs neither; the npm package (`npx @mxstage/mxstage`) needs Node.js 20 or later.
|
|
44
45
|
- Chrome or Edge
|
|
45
46
|
- IBM Maximo or Maximo Application Suite (Manage) with the JSON API at `/maximo/api` and an API key
|
|
46
47
|
|
|
@@ -55,6 +56,16 @@ Several Maximo MCP servers let the AI call the REST API. That is fine for readin
|
|
|
55
56
|
|
|
56
57
|
The extension needs no Node.js or Git: Claude Desktop runs it. To use MX Stage from other assistants as well (ChatGPT desktop, IBM Bob, Claude Code in the terminal, Antigravity), use the installer below; it detects the extension and does not register MX Stage twice.
|
|
57
58
|
|
|
59
|
+
### Try without Maximo
|
|
60
|
+
|
|
61
|
+
No Maximo at hand? MX Stage includes a demo: a fictional Maximo with three waste incineration plants (assets, locations, about 52,000 work orders, inventory and the data quality problems migrations leave behind), in Japanese or English, running inside the bridge on your PC.
|
|
62
|
+
|
|
63
|
+
1. Install MX Stage (above), then open `http://127.0.0.1:8788/settings#demo`.
|
|
64
|
+
2. Choose **Download data and connect**. MX Stage downloads about 10 MB of fictional data (no programs) once from `mxstage-demo.pages.dev` and checks it against a SHA-256 built into this version.
|
|
65
|
+
3. Ask your AI assistant, for example "Check the data quality of the operating assets at North Clean Center and list the problems with counts."
|
|
66
|
+
|
|
67
|
+
Commits change only the copy on your PC (**Reset to the initial state** puts it back), and no license is needed. The demo takes about 0.5 GB of memory while in use. Five sample Excel files to merge with Maximo (purchase orders without work order numbers, a legacy equipment register, daily work reports printed as A4 forms (a repair log table in the English data), an equipment register ahead of Maximo, a star chart) are in the same tab. See [docs/demo.en.md](docs/demo.en.md).
|
|
68
|
+
|
|
58
69
|
### Claude plugin (Skills)
|
|
59
70
|
|
|
60
71
|
The `mxstage` plugin in [`plugin/`](plugin) adds two Skills to Claude (planning a safe bulk correction of Maximo data; explaining, installing and troubleshooting MX Stage) and, in Claude Code and Cowork, starts the MX Stage server with `npx @mxstage/mxstage` (Node.js 20 or later). Chat does not start local servers, so use the extension there. In Claude Code: `/plugin marketplace add mxstage/mxstage`, then `/plugin install mxstage@mxstage`.
|
|
@@ -86,8 +97,28 @@ To update, say "update MX Stage"; to remove it, say "uninstall MX Stage" (see [U
|
|
|
86
97
|
| Codex (ChatGPT desktop, CLI, IDE extension) | `[mcp_servers.mxstage]` in `~\.codex\config.toml` | `~\.agents\skills\<name>\SKILL.md` | Restart Codex |
|
|
87
98
|
| IBM Bob | `mcpServers.mxstage` in `~\.bob\settings\mcp.json` | `~\.bob\skills\<name>\SKILL.md` | Restart IBM Bob |
|
|
88
99
|
|
|
100
|
+
The installer copies the 17 built-in Skills (the index `mxstage-workbench`, the basic operations `mxstage-core-*` and the standard objects `mxstage-obj-*`) and your own Skills (in `~\.config\mxstage\skills\`). Assistants that get no Skill files (Claude Desktop chat, the `agy` CLI) still receive the index and the list of Skills in tool results (see [Skills](#skills)).
|
|
101
|
+
|
|
102
|
+
### Checking in each assistant
|
|
103
|
+
|
|
104
|
+
Screen names are those in each product's documentation (English UI, September 2026).
|
|
105
|
+
|
|
106
|
+
| Assistant | MCP (`mxstage` and its tools) | Skills (`mxstage-workbench` and others) |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| Claude Code (CLI) | `/mcp` in a conversation (list and connection state). In a shell: `claude mcp list`, `claude mcp get mxstage` | `/skills` in a conversation. Typing `/` shows `/mxstage-workbench` |
|
|
109
|
+
| Claude Desktop (Code tab) | **+** in the input box → **Connectors** | Type `/` in the input box, or **+** → **Slash commands** |
|
|
110
|
+
| Claude Desktop (chat) | **+** in the input box → **Connectors** → **Manage connectors** shows the tools. Connection state and logs: Settings → **Developer** (log: `%APPDATA%\Claude\logs\mcp-server-mxstage.log`) | Not shown (no files are copied). Ask "show the MX Stage Skills" and the tools return the list |
|
|
111
|
+
| Antigravity 2.0 | Settings at the bottom left (`Ctrl+,`) → **Customizations** → **Installed MCP Servers** (refresh to reload) | The same **Customizations**. Call one with `/<name>` in a conversation |
|
|
112
|
+
| Antigravity IDE | **…** at the top of the agent panel → **MCP Servers** → **Manage MCP Servers** (**View raw config** opens the file) | **Customizations** in the agent panel |
|
|
113
|
+
| `agy` CLI | `/mcp` in a conversation | Not shown (no files are copied) |
|
|
114
|
+
| Codex (ChatGPT desktop) | Settings → **MCP servers**. `/mcp` in the input box | **Skills** on the left. Type `@` in the input box to pick one |
|
|
115
|
+
| Codex CLI | `codex mcp list`. `/mcp` in a conversation | `/skills` in a conversation, or `$mxstage-workbench` |
|
|
116
|
+
| Codex IDE extension | Gear menu → **MCP servers** | `/skills`, or type `$` to pick one |
|
|
117
|
+
|
|
89
118
|
## Uninstall
|
|
90
119
|
|
|
120
|
+
### Remove everything
|
|
121
|
+
|
|
91
122
|
Say "uninstall MX Stage" to Claude Code, or run in `%USERPROFILE%\mxstage`:
|
|
92
123
|
|
|
93
124
|
```bash
|
|
@@ -96,6 +127,20 @@ node scripts/setup-local.mjs --uninstall
|
|
|
96
127
|
|
|
97
128
|
This removes the `mxstage` entries from every assistant (restoring any setting the installer replaced), the Skills it copied (unless you edited them), the sign-in shortcut and desktop shortcut, and the bridge it started. It keeps your own Skills (`~\.config\mxstage\skills\`) and the backups. To remove everything, also delete `%USERPROFILE%\mxstage` and `~\.config\mxstage` (the backups are full copies of the original settings files, including any tokens in them), and clear the site data for `127.0.0.1:8788` in your browser.
|
|
98
129
|
|
|
130
|
+
### Remove it from some assistants only
|
|
131
|
+
|
|
132
|
+
The installer has no option to remove a single assistant, so delete only the `mxstage` entry from that assistant's settings. Other servers' settings stay.
|
|
133
|
+
|
|
134
|
+
| Assistant | Remove the MCP server | Remove the Skills |
|
|
135
|
+
|---|---|---|
|
|
136
|
+
| Claude Code (CLI) | `claude mcp remove --scope user mxstage` | In `~\.claude\skills\`, delete the folders MX Stage copied (`mxstage-workbench`, `mxstage-core-*`, `mxstage-obj-*` and your own Skills' names) |
|
|
137
|
+
| Claude Desktop (chat and Code tab) | Settings → **Developer** → **Edit Config** opens `claude_desktop_config.json`: delete the `"mxstage"` entry under `mcpServers` and reopen Claude Desktop. To remove it from the Code tab too, also remove it from Claude Code | None in chat. The Code tab uses Claude Code's |
|
|
138
|
+
| Antigravity | Delete the `"mxstage"` entry under `mcpServers` in `~\.gemini\config\mcp_config.json` (**View raw config** in the IDE opens it) | Delete the same folders in `~\.gemini\config\skills\` |
|
|
139
|
+
| Codex | Delete the `[mcp_servers.mxstage]` table (up to the next `[` line) in `~\.codex\config.toml` and reopen Codex | Delete the same folders in `~\.agents\skills\` |
|
|
140
|
+
| IBM Bob | Delete the `"mxstage"` entry under `mcpServers` in `~\.bob\settings\mcp.json` and restart IBM Bob | Delete the same folders in `~\.bob\skills\` |
|
|
141
|
+
|
|
142
|
+
Running the installer again registers it with that assistant again, unless you add `--no-claude-desktop`, `--no-antigravity`, `--no-codex` or `--no-bob` (Claude Code has no such option, but it is not registered while the MX Stage extension is enabled in Claude Desktop, unless you add `--claude-code`).
|
|
143
|
+
|
|
99
144
|
## Installation steps for Claude Code
|
|
100
145
|
|
|
101
146
|
When the user asks to install MX Stage, follow these steps and get the user's approval before each command.
|
|
@@ -110,6 +155,16 @@ When the user asks to install MX Stage, follow these steps and get the user's ap
|
|
|
110
155
|
|
|
111
156
|
**Update**: steps 2 to 4. Ask the user to restart their assistant afterwards so the new bridge is used. **Uninstall**: `node scripts/setup-local.mjs --uninstall --json`. **Status**: `node scripts/setup-local.mjs --status --json` (changes nothing).
|
|
112
157
|
|
|
158
|
+
## What the installer does
|
|
159
|
+
|
|
160
|
+
| What | Details |
|
|
161
|
+
|---|---|
|
|
162
|
+
| Bridge | Starts on port `8788` (fixed, never shifted). There is one per PC; bridges started by AI assistants relay to it |
|
|
163
|
+
| MCP and Skills | Registers them as in [Where it is registered](#where-it-is-registered). To leave some out: `--no-claude-desktop`, `--no-antigravity`, `--no-codex`, `--no-bob`, `--no-skills` |
|
|
164
|
+
| Startup and shortcuts | A shortcut that starts the bridge at sign-in, and `mxstage` on the desktop |
|
|
165
|
+
|
|
166
|
+
Running it again is safe. See [docs/local.md](docs/local.md) (in Japanese) for details.
|
|
167
|
+
|
|
113
168
|
## Skills
|
|
114
169
|
|
|
115
170
|
A Skill is a procedure the AI assistant follows.
|
|
@@ -128,22 +183,25 @@ A Skill is a procedure the AI assistant follows.
|
|
|
128
183
|
|
|
129
184
|
## Documentation
|
|
130
185
|
|
|
131
|
-
The detailed guides are in Japanese for now:
|
|
186
|
+
The detailed guides are in Japanese for now, except the demo guide:
|
|
132
187
|
|
|
133
|
-
- [docs/
|
|
188
|
+
- [docs/demo.en.md](docs/demo.en.md) — trying MX Stage without Maximo (the built-in demo; in English)
|
|
189
|
+
- [docs/local.md](docs/local.md) — daily use, updates, uninstalling, troubleshooting, where things are written
|
|
134
190
|
- [docs/status.md](docs/status.md) — what works today
|
|
135
|
-
- [docs/publish.md](docs/publish.md) — checks before
|
|
191
|
+
- [docs/publish.md](docs/publish.md) — checks before pushing to GitHub (no customer data)
|
|
192
|
+
- [docs/design.md](docs/design.md) — the design rules of the work screen
|
|
136
193
|
|
|
137
194
|
## Development
|
|
138
195
|
|
|
139
196
|
```bash
|
|
140
197
|
npm run typecheck # tsc (app and bridge)
|
|
141
|
-
npx vitest run # tests (app and
|
|
198
|
+
npx vitest run # tests (app, bridge and the demo data generator)
|
|
142
199
|
npm run test:setup # installer tests (write only to temporary folders)
|
|
143
200
|
npm run build # build the built-in Skills and the work screen (dist/app)
|
|
144
|
-
npm run dev:app # dev server for the work screen (http://localhost:5173/app?
|
|
201
|
+
npm run dev:app # dev server for the work screen (http://localhost:5173/app?samples=1 shows sample data; relays to the dev bridge on 8790)
|
|
145
202
|
npm run dev:fake-maximo # a fake Maximo at https://127.0.0.1:9797 (API key: test-api-key)
|
|
146
203
|
npm run dev:bridge # a bridge on port 8790 that accepts the development license for the fake Maximo
|
|
204
|
+
node scripts/check-publish.mjs --worktree # checks before pushing (docs/publish.md)
|
|
147
205
|
```
|
|
148
206
|
|
|
149
207
|
Disable IBM telemetry when installing dependencies (`$env:IBM_TELEMETRY_DISABLED='true'; npm install` in PowerShell); the installer does this itself. See [dev/README.md](dev/README.md) for developing and testing license checks.
|
|
@@ -155,9 +213,9 @@ Disable IBM telemetry when installing dependencies (`$env:IBM_TELEMETRY_DISABLED
|
|
|
155
213
|
MX Stage is licensed under the [Business Source License 1.1](LICENSE). The source is available, but it is not open source. The [LICENSE](LICENSE) file is authoritative; this is a summary.
|
|
156
214
|
|
|
157
215
|
- **Free**: everything except committing to a production Maximo — loading, analysing and editing production data, building Skills, and committing to test environments. You may read, modify and redistribute the source under the same license.
|
|
158
|
-
- **License needed**: using MX Stage to create, change or delete data in a **production Maximo environment** — US$4,800 per production environment per year, for any number of users and PCs. The license key names the environment's URLs (up to three aliases). [
|
|
216
|
+
- **License needed**: using MX Stage to create, change or delete data in a **production Maximo environment** — US$4,800 per production environment per year, for any number of users and PCs. The license key names the environment's URLs (up to three aliases). [License and purchase](https://mxstage.tsunagi.app/license).
|
|
159
217
|
- **Production environment**: the Maximo your organization uses to record day-to-day operations, and an environment being prepared to replace it (for example, a migration target before go-live). **Test environment**: everything else (development, test, training, demonstration, migration rehearsal), even if it holds a copy of production data.
|
|
160
|
-
- **Each version becomes Apache License 2.0 four years after its release.**
|
|
218
|
+
- **Each version becomes Apache License 2.0 four years after its release.** From then on, that version can also write to production under Apache 2.0.
|
|
161
219
|
- Third-party packages and fonts (IBM Carbon Design System, IBM Plex and others) keep their own licenses ([THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)).
|
|
162
220
|
|
|
163
221
|
IBM and Maximo are trademarks of International Business Machines Corporation. MX Stage is an independent product and is not affiliated with or endorsed by IBM.
|
package/app/assets/{data-grid-overlay-editor-pt3p2IkT.js → data-grid-overlay-editor-BrQ-gATi.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as L,r,i as D,a as $,b as z,c as J,T as Q,C as U,m as Z}from"./index-
|
|
1
|
+
import{s as L,r,i as D,a as $,b as z,c as J,T as Q,C as U,m as Z}from"./index-C9kLOfvw.js";const ee=()=>t=>t.targetX,te=()=>t=>t.targetY,re=()=>t=>t.targetWidth,ne=()=>t=>t.targetHeight,ie=()=>t=>t.targetY+10,se=()=>t=>Math.max(0,(t.targetHeight-28)/2),ae=L("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[te(),"px"],"d19meir1-1":[ee(),"px"],"d19meir1-2":[re(),"px"],"d19meir1-3":[ne(),"px"],"d19meir1-4":[ie(),"px"],"d19meir1-5":[se(),"px"]}});function oe(){const[t,s]=r.useState();return[t??void 0,s]}function de(){const[t,s]=oe(),[n,p]=r.useState(0),[f,b]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&b(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(f||t===void 0)return;let a;const o=()=>{const{right:v}=t.getBoundingClientRect();p(g=>Math.min(g+window.innerWidth-v-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,f]);const C=r.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:s,style:C}}const ue=t=>{const{target:s,content:n,onFinishEditing:p,forceEditMode:f,initialValue:b,imageEditorOverride:C,markdownDivCreateNode:a,highlight:o,className:v,theme:g,id:G,cell:x,bloom:I,validateCell:m,getCellRenderer:w,provideEditor:F,isOutsideClick:H}=t,[d,X]=r.useState(f?n:void 0),O=r.useRef(d??n);O.current=d??n;const[y,S]=r.useState(()=>m===void 0?!0:!(D(n)&&m?.(x,n,O.current)===!1)),u=r.useCallback((e,i)=>{p(y?e:void 0,i)},[y,p]),A=r.useCallback(e=>{if(m!==void 0&&e!==void 0&&D(e)){const i=m(x,e,O.current);i===!1?S(!1):(typeof i=="object"&&(e=i),S(!0))}X(e)},[x,m]),h=r.useRef(!1),c=r.useRef(void 0),K=r.useCallback(()=>{u(d,[0,0]),h.current=!0},[d,u]),W=r.useCallback((e,i)=>{u(e,i??c.current??[0,0]),h.current=!0},[u]),Y=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),c.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),c.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),c.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!h.current&&c.current!==void 0&&(u(i?d:void 0,c.current),h.current=!0)},0)},[u,d]),k=d??n,[l,j]=r.useMemo(()=>{if($(n))return[];const e=F?.(n);return e!==void 0?[e,!1]:[w(n)?.provideEditor?.(n),!1]},[n,w,F]),{ref:q,style:B}=de();let P=!0,M,_=!0,E;if(l!==void 0){P=l.disablePadding!==!0,_=l.disableStyling!==!0;const e=z(l);e&&(E=l.styleOverride);const i=e?l.editor:l;M=r.createElement(i,{isHighlighted:o,onChange:A,value:k,initialValue:b,onFinishedEditing:W,validatedSelection:D(k)?k.selectionRange:void 0,forceEditMode:f,target:s,imageEditorOverride:C,markdownDivCreateNode:a,isValid:y,theme:g})}E={...E,...B};const N=document.getElementById("portal");if(N===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let R=_?"gdg-style":"gdg-unstyle";y||(R+=" gdg-invalid"),P&&(R+=" gdg-pad");const T=I?.[0]??1,V=I?.[1]??1;return J.createPortal(r.createElement(Q.Provider,{value:g},r.createElement(U,{style:Z(g),className:v,onClickOutside:K,isOutsideClick:H},r.createElement(ae,{ref:q,id:G,className:R,style:E,as:j===!0?"label":void 0,targetX:s.x-T,targetY:s.y-V,targetWidth:s.width+T*2,targetHeight:s.height+V*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:Y},M)))),N)};export{ue as default};
|