@agile-team/mach-table 0.5.0 → 0.13.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/LICENSE CHANGED
@@ -1,21 +1,110 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 MachTable Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MachTable Source-Available License 1.0
2
+
3
+ Copyright (c) 2026 ChenyCHENYU (Agile Team). All rights reserved.
4
+
5
+ IMPORTANT: The source code is publicly visible for review, but it is not
6
+ open-source software as defined by the Open Source Initiative. Except for the
7
+ limited inspection permission below, no permission is granted unless the
8
+ copyright holder gives you prior written authorization.
9
+
10
+ 1. Definitions
11
+
12
+ "Software" means MachTable and all source code, object code, packages,
13
+ documentation, examples, designs, assets, and other materials distributed with
14
+ this license.
15
+
16
+ "Licensor" means ChenyCHENYU (Agile Team), the copyright holder of the
17
+ Software.
18
+
19
+ "Written Authorization" means a durable written permission issued directly by
20
+ the Licensor that identifies the licensee and the permitted scope, purpose,
21
+ environment, term, and any other applicable conditions.
22
+
23
+ 2. Limited Inspection Permission
24
+
25
+ You may view the Software on the repository hosting service solely to inspect
26
+ and evaluate it, to link to its public repository, to discuss it, and to submit
27
+ good-faith issue reports. This limited permission does not include permission
28
+ to use, run, build, compile, copy, download for reuse, install, integrate,
29
+ modify, create derivative works from, deploy, distribute, sublicense, sell,
30
+ lease, provide as a service, or otherwise exploit the Software.
31
+
32
+ 3. Authorization Required
33
+
34
+ Any use beyond Section 2 requires the Licensor's prior Written Authorization.
35
+ This requirement applies to personal, educational, research, governmental,
36
+ non-profit, internal, evaluation, testing, development, staging, production,
37
+ and commercial use. Possession of a copy, cloning the repository, downloading
38
+ an npm package, receiving the Software from another person, or submitting a
39
+ contribution does not grant any additional rights.
40
+
41
+ The Licensor may grant separate commercial or non-commercial terms in a
42
+ written agreement. If such an agreement conflicts with this license, that
43
+ agreement controls only for the licensee and scope identified in it.
44
+
45
+ 4. Restrictions
46
+
47
+ Without prior Written Authorization, you must not, directly or indirectly:
48
+
49
+ a. use, execute, build, compile, install, test, or integrate the Software;
50
+ b. copy, reproduce, modify, adapt, translate, or create derivative works;
51
+ c. publish, distribute, sublicense, sell, rent, lease, transfer, host, or make
52
+ the Software available to any third party;
53
+ d. use the Software to provide a hosted, managed, consulting, outsourcing,
54
+ software-as-a-service, or other service;
55
+ e. remove or alter copyright, authorization, trademark, attribution, or other
56
+ proprietary notices; or
57
+ f. represent the Software as open source or represent that you have received
58
+ authorization when you have not.
59
+
60
+ 5. Contributions
61
+
62
+ Submitting a patch, pull request, code, documentation, design, or other
63
+ material to the project does not authorize you to use the Software. Unless a
64
+ separate written contributor agreement applies, by intentionally submitting a
65
+ contribution you represent that you have the right to submit it and grant the
66
+ Licensor a perpetual, worldwide, irrevocable, transferable, sublicensable,
67
+ royalty-free license to use, reproduce, modify, create derivative works from,
68
+ distribute, license, and relicense that contribution as part of the Software.
69
+
70
+ 6. Ownership and Trademarks
71
+
72
+ The Software is licensed, not sold. The Licensor and applicable contributors
73
+ retain all right, title, and interest in the Software. No trademark, service
74
+ mark, trade name, logo, or branding rights are granted by this license.
75
+
76
+ 7. Termination
77
+
78
+ Any permission granted under this license terminates automatically upon breach.
79
+ On termination, you must immediately stop all use and destroy all copies in
80
+ your possession or control, except where retention is required by law. Sections
81
+ 4 through 9 survive termination.
82
+
83
+ 8. Disclaimer
84
+
85
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" AND
86
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND
88
+ NON-INFRINGEMENT.
89
+
90
+ 9. Limitation of Liability
91
+
92
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE LICENSOR AND CONTRIBUTORS WILL NOT
93
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
94
+ CONSEQUENTIAL, OR OTHER DAMAGES, OR FOR LOSS OF DATA, PROFITS, REVENUE,
95
+ GOODWILL, OR BUSINESS INTERRUPTION, ARISING FROM OR RELATED TO THE SOFTWARE OR
96
+ THIS LICENSE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
97
+
98
+ 10. Contact and Authorization
99
+
100
+ See LICENSING.md in the repository for the authorization request process. No
101
+ request, discussion, issue, payment, or contribution constitutes authorization
102
+ unless and until the Licensor issues explicit Written Authorization.
103
+
104
+ 中文说明(仅为阅读便利;如有冲突,以英文条款为准)
105
+
106
+ 本项目源代码公开可查看,但不是 OSI 定义下的开源软件。除查看、链接、
107
+ 讨论和善意提交问题外,任何个人、教育、研究、公益、政府、内部、测试、
108
+ 开发、生产或商业用途,均须事先取得作者明确的书面授权。未经授权,不得
109
+ 运行、构建、复制、修改、集成、部署、分发、转授权、销售、出租、托管或
110
+ 以服务形式提供本软件。公开仓库、克隆代码或下载 npm 包不代表获得授权。
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # @agile-team/mach-table
6
6
 
7
- Enterprise-grade, framework-independent TypeScript data grid. Zero runtime dependencies, virtualized rows and columns, editing, selection, grouping, tree data, master-detail, infinite loading and composable extensions.
7
+ Enterprise-grade, framework-independent TypeScript data grid. Zero runtime dependencies, virtualized rows and columns, polished cell/full-row editing, async validation, action columns, change tracking, versioned state and resilient infinite loading.
8
8
 
9
9
  ```bash
10
10
  pnpm add @agile-team/mach-table
@@ -27,6 +27,50 @@ const api = createGrid(document.querySelector("#grid")!, {
27
27
  api.destroy();
28
28
  ```
29
29
 
30
+ Complex business workflows use first-class APIs instead of adapter-specific glue:
31
+
32
+ ```ts
33
+ const state = api.getState();
34
+ await api.saveChanges((changes) => orderApi.save(changes));
35
+ api.rollbackChanges();
36
+ console.info(api.getDiagnostics());
37
+
38
+ await api.applyTransactionAsync({ update: realtimeRows });
39
+ api.applyState(state);
40
+ ```
41
+
42
+ 0.13 adds a built-in/headless column workbench and cancellable lazy trees:
43
+
44
+ ```ts
45
+ api.openColumnWorkbench();
46
+ const columns = api.getColumnWorkbenchItems();
47
+
48
+ const treeOptions = {
49
+ treeData: true,
50
+ isTreeRowExpandable: ({ data }) => data.hasChildren,
51
+ loadTreeChildren: ({ data, signal }) => catalogApi.children(data.id, { signal })
52
+ };
53
+ ```
54
+
55
+ XLSX stays outside Core; install `@agile-team/mach-table-xlsx` only on Excel routes.
56
+
57
+ Polished editing and row actions are built in rather than adapter-specific:
58
+
59
+ ```ts
60
+ import { rowActionsColumn } from "@agile-team/mach-table";
61
+
62
+ const options = {
63
+ editType: "fullRow" as const,
64
+ columnDefs: [
65
+ { field: "name", editable: true },
66
+ { field: "age", editable: true, cellEditor: "number" },
67
+ rowActionsColumn({ onView, onDelete, overflow: "drawer" })
68
+ ]
69
+ };
70
+ ```
71
+
72
+ Cell mode remains the default and renders a subtle pencil plus inline confirm/cancel controls. Use `editableIndicator: "always" | "hover" | "none"` to match the page density.
73
+
30
74
  For framework applications use the official adapters:
31
75
 
32
76
  - Vue 3: [`@agile-team/mach-table-vue`](https://www.npmjs.com/package/@agile-team/mach-table-vue)
@@ -36,4 +80,4 @@ Documentation: [Quick start](https://github.com/ChenyCHENYU/MachTable/blob/main/
36
80
 
37
81
  > Overlay strings render as text by default. Prefer HTMLElement factories for rich content; enable `allowUnsafeOverlayHtml` only for fully trusted static markup.
38
82
 
39
- MIT © Agile Team
83
+ Source-available © ChenyCHENYU (Agile Team). Any use requires prior written authorization. See the [license](https://github.com/ChenyCHENYU/MachTable/blob/main/LICENSE) and [authorization process](https://github.com/ChenyCHENYU/MachTable/blob/main/LICENSING.md).