@updog/data-editor 0.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@updog/data-editor` and `@updog/data-editor-wc` are documented here. Both packages ship in lockstep — a single entry covers both.
4
+
5
+ This project follows [Semantic Versioning](https://semver.org/). While the version is `0.x`, minor version bumps may include breaking changes; we will call them out explicitly.
6
+
7
+ ## [0.1.0] — 2026-04-21
8
+
9
+ First public release.
10
+
11
+ ### Added
12
+
13
+ - `@updog/data-editor` — React SDK with virtualized grid, CSV/XLSX import, validation, undo/redo, find & replace, multi-source data merging.
14
+ - `@updog/data-editor-wc` — framework-agnostic Web Component wrapper (`<updog-editor>`). Works in vanilla HTML, Angular, Vue.
15
+ - Commercial license via API key issued through [updog.tech](https://updog.tech).
package/LICENSE ADDED
@@ -0,0 +1,259 @@
1
+ Copyright (c) 2026 Mikhail Kutateladze. All rights reserved.
2
+
3
+ ================================================================================
4
+ UPDOG SDK — COMMERCIAL LICENSE
5
+ Version 1.0
6
+ ================================================================================
7
+
8
+ --------------------------------------------------------------------------------
9
+ 1. DEFINITIONS
10
+ --------------------------------------------------------------------------------
11
+
12
+ "Licensor" Mikhail Kutateladze, the copyright holder of the Software.
13
+
14
+ "Software" The Updog SDK, including all source code, compiled artifacts,
15
+ documentation, and associated files distributed as an npm
16
+ package or otherwise.
17
+
18
+ "User" Any individual or legal entity that downloads, installs,
19
+ integrates, or uses the Software.
20
+
21
+ "License Key" A unique credential issued by the Licensor that identifies
22
+ the User's subscription tier and permitted domains.
23
+
24
+ "Permitted
25
+ Environment" Any environment listed in Section 3 of this License.
26
+
27
+ "Production Use" Any use of the Software on a domain, host, or environment
28
+ not listed in Section 3, including any use intended for
29
+ real users or business operations regardless of how the
30
+ environment is labelled. For the avoidance of doubt, any
31
+ environment not explicitly listed in Section 3 — including
32
+ self-hosted, internal, staging on custom domains, and
33
+ VPN-protected environments — is considered Production Use.
34
+
35
+ "Root Domain" The registered domain name and its subdomains
36
+ (e.g. "example.com" covers "app.example.com").
37
+
38
+ "Domain" A publicly accessible hostname or domain name through which
39
+ the User's Application is served.
40
+
41
+ "Application" Software developed by the User that integrates the Software.
42
+
43
+ --------------------------------------------------------------------------------
44
+ 2. LICENSE GRANT
45
+ --------------------------------------------------------------------------------
46
+
47
+ Subject to the terms and conditions of this License, the Licensor hereby grants
48
+ the User a limited, non-exclusive, non-transferable, non-sublicensable license
49
+ to use and integrate the Software solely as permitted herein.
50
+
51
+ The User may copy and modify the Software solely as necessary to integrate and
52
+ run it within the User's Application (e.g. bundling, minification,
53
+ transpilation, tree-shaking). No other modification rights are granted.
54
+
55
+ The Software may include mechanisms intended to verify the validity of a
56
+ License Key or the Domain on which the Software is used.
57
+
58
+ --------------------------------------------------------------------------------
59
+ 3. FREE USE — PERMITTED ENVIRONMENTS
60
+ --------------------------------------------------------------------------------
61
+
62
+ The Software may be used free of charge, without a License Key, solely when
63
+ running on or served from one of the following environments:
64
+
65
+ Loopback / local development:
66
+ - localhost
67
+ - 127.0.0.1
68
+ - 0.0.0.0
69
+ - ::1
70
+
71
+ Reserved TLDs:
72
+ - *.local
73
+ - *.test
74
+ - *.localhost
75
+
76
+ Deployment preview platforms:
77
+ - *.vercel.app
78
+ - *.netlify.app
79
+ - *.pages.dev
80
+ - *.fly.dev
81
+ - *.railway.app
82
+
83
+ Cloud IDEs and sandboxes:
84
+ - *.gitpod.io
85
+ - *.github.dev
86
+ - *.app.github.dev
87
+ - *.stackblitz.io
88
+ - *.codesandbox.io
89
+ - *.idx.dev
90
+ - *.replit.dev
91
+
92
+ Tunneling tools:
93
+ - *.ngrok-free.app
94
+ - *.ngrok.io
95
+ - *.loca.lt
96
+
97
+ The User is solely responsible for ensuring that the Software is used only
98
+ within Permitted Environments when operating without a valid License Key.
99
+
100
+ --------------------------------------------------------------------------------
101
+ 4. COMMERCIAL USE — LICENSE KEY REQUIRED
102
+ --------------------------------------------------------------------------------
103
+
104
+ A valid License Key must be obtained from the Licensor before using the
105
+ Software for any Production Use. This includes, without limitation:
106
+
107
+ - Custom domains (e.g. yourapp.com, app.yourcompany.io)
108
+ - Internal company domains and intranets
109
+ - Self-hosted infrastructure
110
+ - Any environment accessible to end users outside of Section 3
111
+
112
+ License Keys are issued per Root Domain or per subscription tier as described
113
+ on the Licensor's official website. A separate License Key is required for
114
+ each Root Domain unless the applicable subscription plan expressly permits
115
+ multiple domains.
116
+
117
+ To obtain a License Key, visit: https://updog.tech
118
+
119
+ --------------------------------------------------------------------------------
120
+ 5. RESTRICTIONS
121
+ --------------------------------------------------------------------------------
122
+
123
+ Unless expressly permitted in writing by the Licensor, the User may NOT:
124
+
125
+ a) Redistribute, sublicense, sell, rent, lease, or otherwise transfer the
126
+ Software or any rights therein to any third party. This restriction does
127
+ not prohibit distribution of the Software as compiled or bundled within
128
+ the User's Application;
129
+
130
+ b) Reverse engineer or decompile the Software except to the limited extent
131
+ expressly permitted by applicable law and only where the Licensor has
132
+ not made the relevant information available;
133
+
134
+ c) Remove, alter, or obscure any copyright, trademark, or proprietary
135
+ notices contained in the Software;
136
+
137
+ d) Publicly disclose or share any License Key. The User must take reasonable
138
+ steps to protect the confidentiality of any License Key issued to them.
139
+
140
+ The above restrictions do not prohibit the User from independently developing
141
+ software with similar functionality, provided such software is written entirely
142
+ from scratch without copying or deriving from the Software.
143
+
144
+ --------------------------------------------------------------------------------
145
+ 6. THIRD-PARTY OPEN SOURCE COMPONENTS
146
+ --------------------------------------------------------------------------------
147
+
148
+ The Software may include third-party open source components subject to their
149
+ respective licenses. Such components are not governed by this License. A list
150
+ of third-party components and their applicable licenses is available in the
151
+ Software's repository.
152
+
153
+ --------------------------------------------------------------------------------
154
+ 7. COMPLIANCE
155
+ --------------------------------------------------------------------------------
156
+
157
+ The Licensor may, upon reasonable written notice, request information
158
+ reasonably necessary to verify the User's compliance with this License. The
159
+ User agrees to cooperate in good faith with any such verification request.
160
+ Failure to provide such information within a reasonable time may be treated
161
+ as a breach of this License.
162
+
163
+ --------------------------------------------------------------------------------
164
+ 8. OWNERSHIP
165
+ --------------------------------------------------------------------------------
166
+
167
+ The Software is licensed, not sold. The Licensor retains all right, title, and
168
+ interest in and to the Software, including all intellectual property rights
169
+ therein. This License does not grant the User any ownership rights in the
170
+ Software.
171
+
172
+ --------------------------------------------------------------------------------
173
+ 9. UPDATES AND VERSIONS
174
+ --------------------------------------------------------------------------------
175
+
176
+ This License applies to all versions of the Software unless a separate license
177
+ is expressly provided with a specific version. Updated versions of this License
178
+ apply only to new versions of the Software released after the update.
179
+
180
+ --------------------------------------------------------------------------------
181
+ 10. LICENSE TRANSFER
182
+ --------------------------------------------------------------------------------
183
+
184
+ This License is personal to the User and may not be assigned or transferred
185
+ to any third party without the prior written consent of the Licensor. Any
186
+ attempted assignment without such consent is void. Notwithstanding the
187
+ foregoing, a User that is a legal entity may transfer this License to a
188
+ successor entity in connection with a merger, acquisition, or sale of all or
189
+ substantially all of its assets, provided the Licensor is notified in writing
190
+ within thirty (30) days of such transfer.
191
+
192
+ --------------------------------------------------------------------------------
193
+ 11. NO WARRANTY
194
+ --------------------------------------------------------------------------------
195
+
196
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
197
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
198
+ FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE LICENSOR DOES NOT
199
+ WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE OR UNINTERRUPTED.
200
+
201
+ --------------------------------------------------------------------------------
202
+ 12. LIMITATION OF LIABILITY
203
+ --------------------------------------------------------------------------------
204
+
205
+ TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL THE
206
+ LICENSOR BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR
207
+ PUNITIVE DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA, GOODWILL, OR
208
+ OTHER INTANGIBLE LOSSES, ARISING OUT OF OR IN CONNECTION WITH THIS LICENSE OR
209
+ THE USE OF THE SOFTWARE, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE
210
+ POSSIBILITY OF SUCH DAMAGES.
211
+
212
+ THE LICENSOR'S TOTAL AGGREGATE LIABILITY ARISING OUT OF OR RELATING TO THIS
213
+ LICENSE SHALL NOT EXCEED THE GREATER OF (A) THE AMOUNT PAID BY THE USER FOR
214
+ THE SOFTWARE IN THE TWELVE (12) MONTHS PRECEDING THE CLAIM, OR (B) ONE HUNDRED
215
+ US DOLLARS (USD $100).
216
+
217
+ --------------------------------------------------------------------------------
218
+ 13. TERMINATION
219
+ --------------------------------------------------------------------------------
220
+
221
+ This License is effective until terminated. It will terminate automatically,
222
+ without notice, if the User breaches any term of this License. In addition,
223
+ any License Key will be automatically revoked, and the associated license will
224
+ terminate, upon non-payment of applicable fees, chargeback, or fraudulent
225
+ payment. Upon termination, the User must immediately cease all use of the
226
+ Software.
227
+
228
+ Sections 5, 8, 11, 12, and 14 survive termination of this License.
229
+
230
+ --------------------------------------------------------------------------------
231
+ 14. GOVERNING LAW
232
+ --------------------------------------------------------------------------------
233
+
234
+ This License shall be governed by and construed in accordance with the laws of
235
+ the United Arab Emirates. Any disputes arising under this License shall be
236
+ subject to the exclusive jurisdiction of the courts of the United Arab Emirates.
237
+
238
+ --------------------------------------------------------------------------------
239
+ 15. EXPORT COMPLIANCE
240
+ --------------------------------------------------------------------------------
241
+
242
+ The User may not export, re-export, or transfer the Software in violation of
243
+ any applicable export control laws or regulations, including those of the
244
+ United Arab Emirates and any other jurisdiction applicable to the User.
245
+
246
+ --------------------------------------------------------------------------------
247
+ 16. ENTIRE AGREEMENT
248
+ --------------------------------------------------------------------------------
249
+
250
+ This License constitutes the entire agreement between the User and the Licensor
251
+ with respect to the Software and supersedes all prior or contemporaneous
252
+ understandings or agreements relating to the Software.
253
+
254
+ --------------------------------------------------------------------------------
255
+
256
+ For licensing inquiries: admin@updog.tech
257
+ Website: https://updog.tech
258
+
259
+ ================================================================================
package/README.md ADDED
@@ -0,0 +1,219 @@
1
+ # @updog/data-editor
2
+
3
+ Enterprise-grade spreadsheet editor SDK for React. Designed for editing large datasets (100k+ rows) with multi-source data merging, file imports, validation, and undo/redo.
4
+
5
+ ## Requirements
6
+
7
+ - React 18.x or 19.x
8
+ - An API key — this is a **commercial SDK**. Sign up at [updog.tech](https://updog.tech) to create an account and get a key. The editor will not render without one.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install @updog/data-editor
14
+ ```
15
+
16
+ ## Quick Start
17
+
18
+ ```tsx
19
+ import { DataEditor } from "@updog/data-editor";
20
+ import "@updog/data-editor/styles.css";
21
+
22
+ function App() {
23
+ const [open, setOpen] = useState(false);
24
+
25
+ const columns = [
26
+ { id: "name", title: "Name", width: 150 },
27
+ { id: "email", title: "Email", width: 260 },
28
+ ];
29
+
30
+ const loadData = async (onChunk) => {
31
+ const res = await fetch("/api/employees");
32
+ onChunk(await res.json());
33
+ };
34
+
35
+ const onComplete = (result) => {
36
+ console.log(result.valid, result.invalid, result.deleted);
37
+ setOpen(false);
38
+ };
39
+
40
+ return (
41
+ <>
42
+ <button onClick={() => setOpen(true)}>Open Editor</button>
43
+ <DataEditor
44
+ apiKey="your-api-key"
45
+ open={open}
46
+ onClose={() => setOpen(false)}
47
+ columns={columns}
48
+ primaryKey="id"
49
+ loadData={loadData}
50
+ onComplete={onComplete}
51
+ />
52
+ </>
53
+ );
54
+ }
55
+ ```
56
+
57
+ ## Inline Mode
58
+
59
+ Render the editor directly in the DOM without a modal overlay:
60
+
61
+ ```tsx
62
+ <DataEditor
63
+ mode="inline"
64
+ apiKey="your-api-key"
65
+ columns={columns}
66
+ primaryKey="id"
67
+ loadData={loadData}
68
+ onComplete={onComplete}
69
+ />
70
+ ```
71
+
72
+ ## Props
73
+
74
+ | Prop | Type | Required | Default | Description |
75
+ |---|---|---|---|---|
76
+ | `mode` | `"modal"` \| `"inline"` | No | `"modal"` | Rendering mode |
77
+ | `apiKey` | `string` | Yes | — | License key |
78
+ | `open` | `boolean` | Modal only | — | Controls modal visibility. Required in modal mode only |
79
+ | `onClose` | `() => void` | Modal only | — | Called when user initiates close. Required in modal mode only |
80
+ | `columns` | `DataEditorColumn[]` | Yes | — | Column definitions |
81
+ | `primaryKey` | `keyof TRow` | Yes | — | Unique row identifier column |
82
+ | `loadData` | `(onChunk) => Promise<void>` | No | — | Async data loader with chunked delivery |
83
+ | `onComplete` | `(result, actions) => void` | No | — | Called on submit with valid/invalid/deleted rows |
84
+ | `variant` | `"editor"` \| `"uploader"` | No | `"editor"` | UI mode |
85
+ | `translations` | `DataEditorTranslations` | No | — | i18n overrides |
86
+ | `locale` | `string` | No | `"en"` | BCP 47 locale tag |
87
+ | `enableDeleteRow` | `"all"` \| `"new"` \| `false` | No | `false` | Row deletion policy |
88
+ | `enableAddRow` | `boolean` | No | `true` | Show "Add row" option |
89
+ | `importFormats` | `DataEditorFormat[]` | No | all | Allowed import formats |
90
+ | `exportFormats` | `DataEditorFormat[]` | No | all | Allowed export formats |
91
+ | `rowHeight` | `number` | No | `34` | Row height in pixels |
92
+ | `headerHeight` | `number` | No | `36` | Header height in pixels |
93
+ | `readonly` | `boolean` | No | `false` | Hide write-oriented UI |
94
+ | `rtl` | `boolean` | No | `false` | Right-to-left layout |
95
+ | `className` | `string` | No | — | CSS class for the modal |
96
+
97
+ ## Column Configuration
98
+
99
+ ```tsx
100
+ const columns: DataEditorColumn[] = [
101
+ {
102
+ id: "email",
103
+ title: "Email",
104
+ width: 260,
105
+
106
+ // Validation — single or array of validators
107
+ validate: (value, row) => {
108
+ if (!value) return { level: "error", message: "Required" };
109
+ if (!String(value).includes("@")) return { level: "warning", message: "Invalid email" };
110
+ return null;
111
+ },
112
+
113
+ // Uniqueness constraint
114
+ unique: true,
115
+
116
+ // Cross-field validation — revalidate these columns when this one changes
117
+ dependentFields: ["confirmEmail"],
118
+
119
+ // Cell editor: "text" (default), "date", or "select"
120
+ editor: { type: "select", options: [{ id: "us", text: "United States" }] },
121
+
122
+ // Visual formatting (display only, does not change data)
123
+ formatter: (value) => value.toLowerCase(),
124
+
125
+ // Data transformation on input
126
+ transformer: (value) => String(value).trim(),
127
+
128
+ // Filter panel configuration
129
+ filter: { type: "select" },
130
+ },
131
+ ];
132
+ ```
133
+
134
+ ## Built-in Validators
135
+
136
+ ```tsx
137
+ import { useDataEditorValidators } from "@updog/data-editor";
138
+
139
+ function App() {
140
+ const { required, numeric, email, date, endDateAfterStart } = useDataEditorValidators();
141
+
142
+ const columns = [
143
+ { id: "email", title: "Email", validate: [required, email] },
144
+ { id: "salary", title: "Salary", validate: numeric },
145
+ { id: "startDate", title: "Start", validate: date, editor: { type: "date" } },
146
+ {
147
+ id: "endDate",
148
+ title: "End",
149
+ validate: [date, endDateAfterStart("startDate")],
150
+ dependentFields: ["startDate"],
151
+ editor: { type: "date" },
152
+ },
153
+ ];
154
+ }
155
+ ```
156
+
157
+ ## Data Loading
158
+
159
+ Data is loaded in chunks to avoid blocking the UI:
160
+
161
+ ```tsx
162
+ const loadData = async (onChunk) => {
163
+ // Load from API in pages
164
+ for (let page = 0; page < totalPages; page++) {
165
+ const res = await fetch(`/api/employees?page=${page}`);
166
+ const rows = await res.json();
167
+ onChunk(rows); // Each chunk is immediately rendered
168
+ }
169
+ };
170
+ ```
171
+
172
+ ## Submission Result
173
+
174
+ ```tsx
175
+ const onComplete = (result, actions) => {
176
+ // result.valid — rows that pass all validation
177
+ // result.invalid — rows with validation errors
178
+ // result.deleted — rows marked for deletion
179
+ // result.newCount, result.editedCount, result.deletedCount
180
+
181
+ // actions.reset() — clear all changes and reload
182
+ };
183
+ ```
184
+
185
+ ## Import/Export Formats
186
+
187
+ Supported formats: `"csv"`, `"tsv"`, `"xlsx"`, `"json"`, `"xml"`.
188
+
189
+ ```tsx
190
+ // Only allow CSV and XLSX import, disable export
191
+ <DataEditor
192
+ importFormats={["csv", "xlsx"]}
193
+ exportFormats={[]}
194
+ />
195
+ ```
196
+
197
+ ## Non-React Usage
198
+
199
+ For Angular, Vue, or vanilla JS, use the Web Component package:
200
+
201
+ ```bash
202
+ npm install @updog/data-editor-wc
203
+ ```
204
+
205
+ See [@updog/data-editor-wc](https://www.npmjs.com/package/@updog/data-editor-wc) for details.
206
+
207
+ ## Key Features
208
+
209
+ - Virtualized grid — smooth scrolling with 100k+ rows
210
+ - Multi-source data — backend data + multiple CSV/XLSX imports merged into one view
211
+ - Smart CSV column matching — auto-maps imported columns with 90%+ accuracy
212
+ - Undo/redo — Cmd+Z / Cmd+Shift+Z with batch support
213
+ - Find & replace — search across all columns with match highlighting
214
+ - Cell validation — custom validators, uniqueness constraints, cross-field dependencies
215
+ - Dirty tracking — distinguishes new vs edited rows, detects value reverts
216
+
217
+ ## License
218
+
219
+ Commercial — see [LICENSE](./LICENSE) for the full terms of the Updog SDK Commercial License v1.0. Contact `admin@updog.tech` for enterprise licensing questions. Third-party dependencies bundled with this package are listed in `THIRD_PARTY_NOTICES.txt`.
package/SECURITY.md ADDED
@@ -0,0 +1,24 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ Email `admin@updog.tech` with a description of the issue, steps to reproduce, and any relevant proof-of-concept code. We will acknowledge receipt within 72 hours and keep you updated as we investigate.
6
+
7
+ Please do not file public issues or post to forums before we have had a chance to triage and patch.
8
+
9
+ ## Supported Versions
10
+
11
+ Only the most recent minor version of `@updog/data-editor` and `@updog/data-editor-wc` receives security updates. Older versions are not patched.
12
+
13
+ ## Scope
14
+
15
+ In scope:
16
+ - Cross-site scripting via data rendered inside the editor grid, cells, dropdowns, or modal chrome.
17
+ - License-validation bypass.
18
+ - Memory corruption in file parsing (CSV, XLSX).
19
+ - Any vulnerability that lets a user of the host page access data or functionality they should not.
20
+
21
+ Out of scope:
22
+ - Security issues in a host application's own code that embeds the SDK.
23
+ - Denial of service via arbitrarily large user-provided files.
24
+ - Issues requiring a compromised NPM registry, CDN, or customer API key.