tsgrid-ui 1.0.0 → 2.0.1
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 +97 -0
- package/LICENSE +22 -22
- package/MIGRATION_v2.md +178 -0
- package/dist/tsgrid-ui.css +2 -2
- package/dist/tsgrid-ui.d.ts +132 -86
- package/dist/tsgrid-ui.es6.js +10061 -9643
- package/dist/tsgrid-ui.js +10048 -9644
- package/dist/tsgrid-ui.min.css +2 -2
- package/package.json +26 -21
- package/readme.md +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,103 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to **TsGrid UI** will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## v2.0.1 — 2026-05-13
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **`MIGRATION_v2.md` now included in the published npm tarball.** v2.0.0 omitted this file from `package.json` `files`, so `CHANGELOG.md` and `README.md` links pointing to `MIGRATION_v2.md` (codemod, bundle measurement, release checklist) broke on npmjs.com. No source code changes — package metadata only.
|
|
10
|
+
|
|
11
|
+
## v2.0.0 — 2026-05-09
|
|
12
|
+
|
|
13
|
+
### Breaking changes
|
|
14
|
+
|
|
15
|
+
**BC-1 — Event handler signatures changed (`CustomEvent` → `TsEventPayload`)**
|
|
16
|
+
|
|
17
|
+
All `on*` event handler properties across `TsGrid`, `TsForm`, and `TsField` now declare
|
|
18
|
+
`(event: TsEventPayload) => void` instead of `(event: CustomEvent) => void`.
|
|
19
|
+
|
|
20
|
+
This is a type-level correction: the runtime has always dispatched `TsEventPayload` objects,
|
|
21
|
+
never DOM `CustomEvent` instances. Consumers who explicitly annotated handlers with
|
|
22
|
+
`CustomEvent` will see a TypeScript compile error. Untyped or `any`-typed handlers are
|
|
23
|
+
unaffected. Mechanical migration via codemod — see [MIGRATION_v2.md § Codemod](MIGRATION_v2.md#codemod).
|
|
24
|
+
|
|
25
|
+
**BC-2 — Internal restructure; deep imports are unsupported**
|
|
26
|
+
|
|
27
|
+
`src/tsgrid.ts` has been decomposed from ~10,006 LOC into 8 sibling modules:
|
|
28
|
+
`grid-columns`, `grid-state`, `grid-data`, `grid-selection`, `grid-edit`, `grid-search`,
|
|
29
|
+
`grid-interaction`, `grid-render`. The public class `TsGrid` is now ~2,392 LOC (thin
|
|
30
|
+
orchestrator of one-liner delegators).
|
|
31
|
+
|
|
32
|
+
The public API surface is **UNCHANGED**: all method signatures, names, and behaviors are
|
|
33
|
+
preserved (verified by 84 Vitest + 38 Playwright tests). Consumers who import from the
|
|
34
|
+
public barrel (`import { TsGrid } from 'tsgrid-ui'`) require **no changes**. Subclasses
|
|
35
|
+
or code that inspects `TsGrid.prototype` directly may observe method bodies as one-line
|
|
36
|
+
delegators — this is expected behavior. Deep imports from internal paths
|
|
37
|
+
(`tsgrid-ui/src/*`) are not supported and may break.
|
|
38
|
+
|
|
39
|
+
### Bundle size disclosure
|
|
40
|
+
|
|
41
|
+
v2.0 is a structural refactor with no bundle reduction goal. Bundle size delta vs v1.0.1
|
|
42
|
+
baseline: **-0.19%** (actual: 941,597 bytes vs baseline: 943,401 bytes). No reduction is
|
|
43
|
+
claimed. Bundle improvements are deferred to v2.2 (multi-entry subpath exports +
|
|
44
|
+
tree-shaking). See [MIGRATION_v2.md § Bundle size measurement](MIGRATION_v2.md#bundle-size-measurement).
|
|
45
|
+
|
|
46
|
+
### Migration
|
|
47
|
+
|
|
48
|
+
See [MIGRATION_v2.md](MIGRATION_v2.md) for the codemod, full migration guide, and
|
|
49
|
+
release checklist.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## [1.0.1] — Consumer DX fixes
|
|
54
|
+
|
|
55
|
+
Patch release driven by integrating tsgrid-ui v1.0.0 in a real Angular 21 standalone project. Three changes, no breaking, no API removals.
|
|
56
|
+
|
|
57
|
+
### Added — `sideEffects` declaration
|
|
58
|
+
|
|
59
|
+
`package.json` now declares `"sideEffects": ["./dist/tsgrid-ui.css", "./dist/tsgrid-ui.min.css"]`. Modern bundlers (esbuild, Vite, webpack 5+, Rollup) can now tree-shake widgets the consumer does not import. Importing only `TsGrid` no longer drags `TsForm`, `TsLayout`, `TsSidebar`, `TsTabs`, `TsPopup`, `TsTooltip` into the final bundle.
|
|
60
|
+
|
|
61
|
+
### Added — public type exports
|
|
62
|
+
|
|
63
|
+
The barrel `src/index.ts` previously re-exported only the **classes** (`TsGrid`, `TsForm`, etc.). Auxiliary interfaces and types lived in `dist/tsgrid-ui.d.ts` but were inaccessible — consumers had to type their inputs as `any` or import from internal paths. v1.0.1 re-exports the full public type surface:
|
|
64
|
+
|
|
65
|
+
- **TsGrid**: `TsGridRecord`, `TsGridColumn`, `TsGridSearch`, `TsGridSortData`, `TsGridSelection`, `TsGridCellSelection`, `TsGridRange`, `TsGridRangeEndpoint`, `TsGridGroupBy`
|
|
66
|
+
- **TsField**: `TsFieldOptions`, `TsFieldElement`, `TsFieldNumericOptions`, `TsFieldColorOptions`, `TsFieldDateOptions`, `TsFieldTimeOptions`, `TsFieldDateTimeOptions`, `TsFieldListOptions`, `TsFieldEnumOptions`, `TsFieldFileOptions`
|
|
67
|
+
- **TsLayout**: `TsLayoutPanel`, `TsPanelType`, `TsPanelContent`
|
|
68
|
+
- **TsSidebar**: `TsSidebarRefreshOptions`, `TsSidebarUpdateOptions`, `TsSidebarSetCountOptions`, `TsSidebarFindOptions`, `TsSidebarSortOptions`
|
|
69
|
+
- **TsLocale / TsUtils**: `TsLocaleSettings`, `TsMessageProm`, `TsMessageWhere`, `TsMessageOptions`, `TsMenuItem`, `TsColorRgb`, `TsLockOptions`, `TsCloneOptions`
|
|
70
|
+
- **Common**: `RecId`, `TsEventData`, `TsEventPayload`
|
|
71
|
+
|
|
72
|
+
Consumers can now write `import type { TsGridColumn, TsGridRecord } from 'tsgrid-ui'` and get full autocomplete + type checking.
|
|
73
|
+
|
|
74
|
+
### Added — `TsEventPayload` interface and `toSafeEvent()` helper
|
|
75
|
+
|
|
76
|
+
The per-class event-handler signatures (`onSelect: (event: CustomEvent) => void`) are misleading: the runtime always passes a `TsEvent` instance from the TsBase event system, **not** a DOM `CustomEvent`. The real payload contains a circular reference (`event.owner` ↔ `widget.activeEvents[]`), so calling `JSON.stringify(event)` throws "Converting circular structure to JSON". This breaks reactive state in any framework: Angular signals + JsonPipe, React state + Redux DevTools, Vue ref + Pinia, etc.
|
|
77
|
+
|
|
78
|
+
This release adds:
|
|
79
|
+
|
|
80
|
+
- **`interface TsEventPayload<TDetail>`** — accurate shape of the object passed to handlers, with the `owner` field documented as circular and unsafe to serialize. The misleading `(event: CustomEvent) => void` per-class declarations remain for backwards compatibility and will be corrected in v2.0.
|
|
81
|
+
- **`function toSafeEvent(event)`** — extracts a JSON-serializable subset (`type`, `phase`, `detail`, `isStopped`, `isCancelled`) for use in reactive state.
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import { toSafeEvent } from 'tsgrid-ui'
|
|
85
|
+
|
|
86
|
+
grid.on('select', (event) => {
|
|
87
|
+
mySignal.set(toSafeEvent(event)) // safe to JSON.stringify
|
|
88
|
+
})
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Bundle-size impact (measured)
|
|
92
|
+
|
|
93
|
+
Bundle in a fresh Angular 21 standalone project consuming only `TsGrid`:
|
|
94
|
+
|
|
95
|
+
| | v1.0.0 | v1.0.1 |
|
|
96
|
+
| --- | --- | --- |
|
|
97
|
+
| `main.js` raw | 506.18 KB | _re-measure pending_ |
|
|
98
|
+
| `main.js` gzip | 121.90 KB | _re-measure pending_ |
|
|
99
|
+
|
|
100
|
+
Re-measurement after publish lives in the `tsgrid-angular-example` demo repo.
|
|
101
|
+
|
|
5
102
|
## [1.0.0] — Hard Fork from w2ui v2.1
|
|
6
103
|
|
|
7
104
|
This is the initial public release of **TsGrid UI**, a hard fork of [w2ui](https://github.com/vitmalina/w2ui) by Vit Malina. See [README — Acknowledgments](README.md#acknowledgments) for the relationship to upstream and [MIGRATION-FROM-W2UI.md](MIGRATION-FROM-W2UI.md) for the complete renaming map if you're coming from w2ui.
|
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2014 Vit Malina <vitmalina@gmail.com>
|
|
4
|
-
Copyright (c) 2026 DaverSoGT <jodaniheso@gmail.com>
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in
|
|
14
|
-
all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
THE SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014 Vit Malina <vitmalina@gmail.com>
|
|
4
|
+
Copyright (c) 2026 DaverSoGT <jodaniheso@gmail.com>
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
package/MIGRATION_v2.md
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Migration Guide: v1.x to v2.0
|
|
2
|
+
|
|
3
|
+
<!-- baseline: 943401 bytes -->
|
|
4
|
+
|
|
5
|
+
## Bundle size measurement
|
|
6
|
+
|
|
7
|
+
| Metric | Value |
|
|
8
|
+
|--------|-------|
|
|
9
|
+
| Baseline (v1.0.1, pre-v2.0) | 943,401 bytes |
|
|
10
|
+
| Post-v2.0 actual | 941,597 bytes |
|
|
11
|
+
| Delta | -1,804 bytes (-0.19%) |
|
|
12
|
+
| Status | PASS (within ±2% gate) |
|
|
13
|
+
| Build date | 2026-05-09 |
|
|
14
|
+
|
|
15
|
+
v2.0 is a structural refactor with no bundle reduction goal. The -0.19% delta is
|
|
16
|
+
within the ±2% measurement gate and does not constitute a meaningful change. Bundle
|
|
17
|
+
improvements are explicitly deferred to v2.2 (multi-entry subpath exports + tree-shaking).
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
`tsgrid-ui` v2.0 is a **code-organisation and type-system release**. No runtime behavior
|
|
24
|
+
changes between v1.0.1 and v2.0.0. All public API method signatures remain identical.
|
|
25
|
+
|
|
26
|
+
Two breaking changes are documented below (BC-1 and BC-2). Both were intentional and
|
|
27
|
+
are codemod-friendly.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Breaking Change BC-1: Event handler types
|
|
32
|
+
|
|
33
|
+
### What changed
|
|
34
|
+
|
|
35
|
+
All `on*` event handler properties on `TsGrid`, `TsForm`, and `TsField` now declare
|
|
36
|
+
`TsEventPayload` as the handler parameter type instead of `CustomEvent`.
|
|
37
|
+
|
|
38
|
+
**v1.x (old type):**
|
|
39
|
+
```ts
|
|
40
|
+
onSelect: ((event: CustomEvent) => void) | null
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**v2.0 (corrected type):**
|
|
44
|
+
```ts
|
|
45
|
+
onSelect: ((event: TsEventPayload) => void) | null
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Why this is a correction, not a new feature
|
|
49
|
+
|
|
50
|
+
The runtime event system in `TsGrid`/`TsForm` has always passed a `TsEventPayload`
|
|
51
|
+
object to handlers — never a DOM `CustomEvent`. The v1.x type declarations were
|
|
52
|
+
inaccurate. This change aligns the declared types with what was always happening at
|
|
53
|
+
runtime.
|
|
54
|
+
|
|
55
|
+
### Who is affected
|
|
56
|
+
|
|
57
|
+
Only consumers who **explicitly annotated** their handler parameter as `CustomEvent`:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
// This breaks on v2.0 — parameter type mismatch
|
|
61
|
+
grid.onSelect = (event: CustomEvent) => {
|
|
62
|
+
console.log(event.detail)
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Consumers who used **no annotation** or **inferred types** are unaffected:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
// These continue to work — TypeScript infers TsEventPayload
|
|
70
|
+
grid.onSelect = (event) => { console.log(event.detail) }
|
|
71
|
+
grid.onSelect = (event: TsEventPayload) => { console.log(event.detail) }
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Codemod
|
|
75
|
+
|
|
76
|
+
Apply the following regex to your source files to migrate in bulk:
|
|
77
|
+
|
|
78
|
+
**Find:**
|
|
79
|
+
```
|
|
80
|
+
\(event:\s*CustomEvent\)\s*=>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Replace:**
|
|
84
|
+
```
|
|
85
|
+
(event: TsEventPayload) =>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Caveats:**
|
|
89
|
+
1. You must add `import type { TsEventPayload } from 'tsgrid-ui'` to each migrated file.
|
|
90
|
+
2. The regex may produce false positives on unrelated DOM `CustomEvent` handler sites
|
|
91
|
+
(e.g., handlers attached via `element.addEventListener('custom', ...)`). Review
|
|
92
|
+
replacements manually before committing.
|
|
93
|
+
3. `event.detail` is now typed as `TsEventData` (with `[key: string]: unknown`). If you
|
|
94
|
+
accessed properties like `event.detail.someField`, TypeScript strict mode requires
|
|
95
|
+
bracket notation: `event.detail['someField']`. Cast as needed.
|
|
96
|
+
|
|
97
|
+
### Before / after example
|
|
98
|
+
|
|
99
|
+
The updated `test/consumer-smoke.ts` is the canonical reference. Below is a condensed
|
|
100
|
+
example:
|
|
101
|
+
|
|
102
|
+
**Before (v1.x):**
|
|
103
|
+
```ts
|
|
104
|
+
import { TsGrid } from 'tsgrid-ui'
|
|
105
|
+
|
|
106
|
+
const grid = new TsGrid({ name: 'my-grid', columns: [], records: [] })
|
|
107
|
+
|
|
108
|
+
// Explicit CustomEvent annotation — BREAKS on v2.0
|
|
109
|
+
grid.onSelect = (event: CustomEvent) => {
|
|
110
|
+
console.log(event.detail)
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**After (v2.0):**
|
|
115
|
+
```ts
|
|
116
|
+
import { TsGrid } from 'tsgrid-ui'
|
|
117
|
+
import type { TsEventPayload } from 'tsgrid-ui'
|
|
118
|
+
|
|
119
|
+
const grid = new TsGrid({ name: 'my-grid', columns: [], records: [] })
|
|
120
|
+
|
|
121
|
+
// Option A: explicit TsEventPayload annotation
|
|
122
|
+
grid.onSelect = (event: TsEventPayload) => {
|
|
123
|
+
console.log(event.detail)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Option B: remove the annotation — TypeScript infers correctly
|
|
127
|
+
grid.onSelect = (event) => {
|
|
128
|
+
console.log(event.detail)
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`TsEventPayload` has been importable from `tsgrid-ui` since **v1.0.1**. Consumers may
|
|
133
|
+
pre-migrate before upgrading to v2.0.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Breaking Change BC-2: Deep imports are unsupported
|
|
138
|
+
|
|
139
|
+
v2.0 decomposes `src/tsgrid.ts` into sibling modules (`src/grid-*.ts`). Any import from
|
|
140
|
+
an internal path is **not supported** and carries no stability guarantee:
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
// UNSUPPORTED — may break in any minor or patch release
|
|
144
|
+
import { someHelper } from 'tsgrid-ui/src/tsgrid'
|
|
145
|
+
import { someHelper } from 'tsgrid-ui/src/grid-columns'
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Always import from the public barrel:
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
// SUPPORTED — stable public API
|
|
152
|
+
import { TsGrid, TsEventPayload } from 'tsgrid-ui'
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Bundle size disclosure
|
|
158
|
+
|
|
159
|
+
v2.0 decomposes the codebase for maintainability. **Bundle size is unchanged by design.**
|
|
160
|
+
Bundle improvements are deferred to v2.2 (multi-entry subpath exports + tree-shaking).
|
|
161
|
+
|
|
162
|
+
Do not expect or claim bundle size reduction from upgrading to v2.0.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Release checklist
|
|
167
|
+
|
|
168
|
+
> Reference — execute manually after PR review and approval. The SDD apply phase does NOT
|
|
169
|
+
> run any of these.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# After PR merged to master:
|
|
173
|
+
git checkout master && git pull
|
|
174
|
+
git tag -a v2.0.0 -m "v2.0.0 — TsGrid decomposition + event signature fix"
|
|
175
|
+
git push origin v2.0.0
|
|
176
|
+
pnpm publish --access public --tag latest
|
|
177
|
+
gh release create v2.0.0 --title "v2.0.0 — TsGrid v2 decomposition" --notes-from-tag
|
|
178
|
+
```
|
package/dist/tsgrid-ui.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* tsgrid-ui 1.0.x (nightly) (5/
|
|
1
|
+
/* tsgrid-ui 1.0.x (nightly) (5/9/2026, 12:14:18 PM) (c) 2014 vitmalina@gmail.com, (c) 2026 DaverSoGT — MIT */
|
|
2
2
|
/**
|
|
3
3
|
* TODO:
|
|
4
4
|
* - remove default styling, only keep tsg-* styles
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
@font-face {
|
|
11
11
|
font-family: "tsgrid-font";
|
|
12
|
-
src: url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAApYAAsAAAAAD0wAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQQAAAFZdKW6ZY21hcAAAAYgAAACiAAACNBnCLmJnbHlmAAACLAAABd8AAAfo+
|
|
12
|
+
src: url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAApYAAsAAAAAD0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rGTVrXCECEG/2SnzOZVPmal2VNY4MC9xJ75UfUXw9owY7ElTWRW824ZWaGoehuaJX2IdTVVYIyIn/mTD5niST+me2hWeJxtx1EOgjAQRdE+aAuKCizERdUyCrF0mk5JZPdq/PX83FxVqZ9e/TegQg0NA4sGLQ44osMJZ1zQY8Co6hu/jJ/JP63nwFmaT7Y1ivGZRfSUORlaU9k72un63URZL/HOJjkpZBNFvwSdwiY2U2A3WSGX/dwKlbLEhyj1BqYnJNk=") format("woff");
|
|
13
13
|
font-weight: normal;
|
|
14
14
|
font-style: normal;
|
|
15
15
|
}
|
package/dist/tsgrid-ui.d.ts
CHANGED
|
@@ -8,6 +8,34 @@
|
|
|
8
8
|
* - added unmount that cleans up the box
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
+
/**
|
|
12
|
+
* Payload object passed to handlers registered via `.on(eventName, handler)`.
|
|
13
|
+
*
|
|
14
|
+
* IMPORTANT — circular references:
|
|
15
|
+
* `event.owner` points back to the widget that triggered the event, and that
|
|
16
|
+
* widget keeps `activeEvents: TsEvent[]` referencing this same payload.
|
|
17
|
+
* Calling `JSON.stringify(event)` will throw "Converting circular structure
|
|
18
|
+
* to JSON". Use `toSafeEvent(event)` from `tsgrid-ui` to extract a
|
|
19
|
+
* serializable subset before storing in reactive state (Angular signals,
|
|
20
|
+
* React state, Pinia/Redux stores, etc.).
|
|
21
|
+
*
|
|
22
|
+
* Note: the per-class declarations like `onSelect: (event: CustomEvent) => void`
|
|
23
|
+
* in TsGrid/TsForm/etc. are historical noise — the runtime always passes a
|
|
24
|
+
* `TsEventPayload`, never a DOM `CustomEvent`. This will be corrected in v2.0.
|
|
25
|
+
*/
|
|
26
|
+
interface TsEventPayload<TDetail = unknown> {
|
|
27
|
+
type: string | null;
|
|
28
|
+
phase: 'before' | 'after' | string;
|
|
29
|
+
detail: TDetail & TsEventData;
|
|
30
|
+
target: unknown;
|
|
31
|
+
object: unknown;
|
|
32
|
+
isStopped: boolean;
|
|
33
|
+
isCancelled: boolean;
|
|
34
|
+
/** Reference to the widget that triggered this event. CIRCULAR — do not serialize. */
|
|
35
|
+
owner: unknown;
|
|
36
|
+
/** @internal — Promise resolved when listeners settle; do not depend on shape. */
|
|
37
|
+
complete?: Promise<unknown>;
|
|
38
|
+
}
|
|
11
39
|
interface TsEventData {
|
|
12
40
|
type?: string | null;
|
|
13
41
|
target?: unknown;
|
|
@@ -48,6 +76,24 @@ declare class TsEvent {
|
|
|
48
76
|
preventDefault(): void;
|
|
49
77
|
stopPropagation(): void;
|
|
50
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Extract a JSON-serializable subset of a TsEvent payload, dropping the
|
|
81
|
+
* circular `owner` and `complete` references. Use before storing in
|
|
82
|
+
* Angular signals, React state, Pinia/Redux stores, or any DevTools that
|
|
83
|
+
* snapshots state via JSON.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* grid.on('select', (event) => {
|
|
87
|
+
* this.lastSelection.set(toSafeEvent(event))
|
|
88
|
+
* })
|
|
89
|
+
*/
|
|
90
|
+
declare function toSafeEvent<TDetail = unknown>(event: unknown): {
|
|
91
|
+
type: string | null;
|
|
92
|
+
phase: string;
|
|
93
|
+
detail: TDetail & TsEventData;
|
|
94
|
+
isStopped: boolean;
|
|
95
|
+
isCancelled: boolean;
|
|
96
|
+
};
|
|
51
97
|
declare class TsBase {
|
|
52
98
|
activeEvents: TsEvent[];
|
|
53
99
|
listeners: TsEventListener[];
|
|
@@ -1677,57 +1723,57 @@ declare class TsGrid extends TsBase {
|
|
|
1677
1723
|
operators: Record<string, any[]>;
|
|
1678
1724
|
defaultOperator: Record<string, string>;
|
|
1679
1725
|
operatorsMap: Record<string, string>;
|
|
1680
|
-
onAdd: ((event:
|
|
1681
|
-
onEdit: ((event:
|
|
1682
|
-
onRequest: ((event:
|
|
1683
|
-
onLoad: ((event:
|
|
1684
|
-
onDelete: ((event:
|
|
1685
|
-
onSave: ((event:
|
|
1686
|
-
onSelect: ((event:
|
|
1687
|
-
onClick: ((event:
|
|
1688
|
-
onDblClick: ((event:
|
|
1689
|
-
onContextMenu: ((event:
|
|
1690
|
-
onContextMenuClick: ((event:
|
|
1691
|
-
onColumnClick: ((event:
|
|
1692
|
-
onColumnDblClick: ((event:
|
|
1693
|
-
onColumnContextMenu: ((event:
|
|
1694
|
-
onColumnResize: ((event:
|
|
1695
|
-
onColumnAutoResize: ((event:
|
|
1696
|
-
onSort: ((event:
|
|
1697
|
-
onSearch: ((event:
|
|
1698
|
-
onSearchOpen: ((event:
|
|
1699
|
-
onSearchClose: ((event:
|
|
1700
|
-
onChange: ((event:
|
|
1701
|
-
onRestore: ((event:
|
|
1702
|
-
onExpand: ((event:
|
|
1703
|
-
onCollapse: ((event:
|
|
1704
|
-
onError: ((event:
|
|
1705
|
-
onKeydown: ((event:
|
|
1706
|
-
onToolbar: ((event:
|
|
1707
|
-
onColumnOnOff: ((event:
|
|
1708
|
-
onCopy: ((event:
|
|
1709
|
-
onPaste: ((event:
|
|
1710
|
-
onSelectionExtend: ((event:
|
|
1711
|
-
onEditField: ((event:
|
|
1712
|
-
onRender: ((event:
|
|
1713
|
-
onRefresh: ((event:
|
|
1714
|
-
onReload: ((event:
|
|
1715
|
-
onResize: ((event:
|
|
1716
|
-
onDestroy: ((event:
|
|
1717
|
-
onStateSave: ((event:
|
|
1718
|
-
onStateRestore: ((event:
|
|
1719
|
-
onFocus: ((event:
|
|
1720
|
-
onBlur: ((event:
|
|
1721
|
-
onReorderRow: ((event:
|
|
1722
|
-
onSearchSave: ((event:
|
|
1723
|
-
onSearchRemove: ((event:
|
|
1724
|
-
onSearchSelect: ((event:
|
|
1725
|
-
onColumnSelect: ((event:
|
|
1726
|
-
onColumnDragStart: ((event:
|
|
1727
|
-
onColumnDragEnd: ((event:
|
|
1728
|
-
onResizerDblClick: ((event:
|
|
1729
|
-
onMouseEnter: ((event:
|
|
1730
|
-
onMouseLeave: ((event:
|
|
1726
|
+
onAdd: ((event: TsEventPayload) => void) | null;
|
|
1727
|
+
onEdit: ((event: TsEventPayload) => void) | null;
|
|
1728
|
+
onRequest: ((event: TsEventPayload) => void) | null;
|
|
1729
|
+
onLoad: ((event: TsEventPayload) => void) | null;
|
|
1730
|
+
onDelete: ((event: TsEventPayload) => void) | null;
|
|
1731
|
+
onSave: ((event: TsEventPayload) => void) | null;
|
|
1732
|
+
onSelect: ((event: TsEventPayload) => void) | null;
|
|
1733
|
+
onClick: ((event: TsEventPayload) => void) | null;
|
|
1734
|
+
onDblClick: ((event: TsEventPayload) => void) | null;
|
|
1735
|
+
onContextMenu: ((event: TsEventPayload) => void) | null;
|
|
1736
|
+
onContextMenuClick: ((event: TsEventPayload) => void) | null;
|
|
1737
|
+
onColumnClick: ((event: TsEventPayload) => void) | null;
|
|
1738
|
+
onColumnDblClick: ((event: TsEventPayload) => void) | null;
|
|
1739
|
+
onColumnContextMenu: ((event: TsEventPayload) => void) | null;
|
|
1740
|
+
onColumnResize: ((event: TsEventPayload) => void) | null;
|
|
1741
|
+
onColumnAutoResize: ((event: TsEventPayload) => void) | null;
|
|
1742
|
+
onSort: ((event: TsEventPayload) => void) | null;
|
|
1743
|
+
onSearch: ((event: TsEventPayload) => void) | null;
|
|
1744
|
+
onSearchOpen: ((event: TsEventPayload) => void) | null;
|
|
1745
|
+
onSearchClose: ((event: TsEventPayload) => void) | null;
|
|
1746
|
+
onChange: ((event: TsEventPayload) => void) | null;
|
|
1747
|
+
onRestore: ((event: TsEventPayload) => void) | null;
|
|
1748
|
+
onExpand: ((event: TsEventPayload) => void) | null;
|
|
1749
|
+
onCollapse: ((event: TsEventPayload) => void) | null;
|
|
1750
|
+
onError: ((event: TsEventPayload) => void) | null;
|
|
1751
|
+
onKeydown: ((event: TsEventPayload) => void) | null;
|
|
1752
|
+
onToolbar: ((event: TsEventPayload) => void) | null;
|
|
1753
|
+
onColumnOnOff: ((event: TsEventPayload) => void) | null;
|
|
1754
|
+
onCopy: ((event: TsEventPayload) => void) | null;
|
|
1755
|
+
onPaste: ((event: TsEventPayload) => void) | null;
|
|
1756
|
+
onSelectionExtend: ((event: TsEventPayload) => void) | null;
|
|
1757
|
+
onEditField: ((event: TsEventPayload) => void) | null;
|
|
1758
|
+
onRender: ((event: TsEventPayload) => void) | null;
|
|
1759
|
+
onRefresh: ((event: TsEventPayload) => void) | null;
|
|
1760
|
+
onReload: ((event: TsEventPayload) => void) | null;
|
|
1761
|
+
onResize: ((event: TsEventPayload) => void) | null;
|
|
1762
|
+
onDestroy: ((event: TsEventPayload) => void) | null;
|
|
1763
|
+
onStateSave: ((event: TsEventPayload) => void) | null;
|
|
1764
|
+
onStateRestore: ((event: TsEventPayload) => void) | null;
|
|
1765
|
+
onFocus: ((event: TsEventPayload) => void) | null;
|
|
1766
|
+
onBlur: ((event: TsEventPayload) => void) | null;
|
|
1767
|
+
onReorderRow: ((event: TsEventPayload) => void) | null;
|
|
1768
|
+
onSearchSave: ((event: TsEventPayload) => void) | null;
|
|
1769
|
+
onSearchRemove: ((event: TsEventPayload) => void) | null;
|
|
1770
|
+
onSearchSelect: ((event: TsEventPayload) => void) | null;
|
|
1771
|
+
onColumnSelect: ((event: TsEventPayload) => void) | null;
|
|
1772
|
+
onColumnDragStart: ((event: TsEventPayload) => void) | null;
|
|
1773
|
+
onColumnDragEnd: ((event: TsEventPayload) => void) | null;
|
|
1774
|
+
onResizerDblClick: ((event: TsEventPayload) => void) | null;
|
|
1775
|
+
onMouseEnter: ((event: TsEventPayload) => void) | null;
|
|
1776
|
+
onMouseLeave: ((event: TsEventPayload) => void) | null;
|
|
1731
1777
|
constructor(options: Record<string, any>);
|
|
1732
1778
|
add(record: TsGridRecord | TsGridRecord[], first?: boolean): number;
|
|
1733
1779
|
find(obj?: Record<string, any>, returnIndex?: boolean, displayedOnly?: boolean): (string | number)[];
|
|
@@ -1755,13 +1801,13 @@ declare class TsGrid extends TsBase {
|
|
|
1755
1801
|
hideColumn(...fields: string[]): number;
|
|
1756
1802
|
/** Add one or more search fields. If `search` is omitted, `before` is treated as the search(es) to append. */
|
|
1757
1803
|
addSearch(before: any, search?: any): number;
|
|
1758
|
-
removeSearch(...fields: string[]):
|
|
1804
|
+
removeSearch(...fields: string[]): any;
|
|
1759
1805
|
getSearch(): string[];
|
|
1760
1806
|
getSearch(field: string, returnIndex: true): number | null;
|
|
1761
1807
|
getSearch(field: string, returnIndex?: false): TsGridSearch | null;
|
|
1762
|
-
toggleSearch(...fields: string[]):
|
|
1763
|
-
showSearch(...fields: string[]):
|
|
1764
|
-
hideSearch(...fields: string[]):
|
|
1808
|
+
toggleSearch(...fields: string[]): any;
|
|
1809
|
+
showSearch(...fields: string[]): any;
|
|
1810
|
+
hideSearch(...fields: string[]): any;
|
|
1765
1811
|
getSearchData(field: string): Record<string, any> | null;
|
|
1766
1812
|
localSort(silent?: boolean, noResetRefresh?: boolean): number | undefined;
|
|
1767
1813
|
localSearch(silent?: boolean): number | undefined;
|
|
@@ -1775,7 +1821,7 @@ declare class TsGrid extends TsBase {
|
|
|
1775
1821
|
addRange(rangesInput: TsGridRange | TsGridRange[] | string | Record<string, any>): number;
|
|
1776
1822
|
removeRange(...names: string[]): number;
|
|
1777
1823
|
refreshRanges(): number | undefined;
|
|
1778
|
-
select(...selectArgs: any[]):
|
|
1824
|
+
select(...selectArgs: any[]): any;
|
|
1779
1825
|
unselect(...unselectArgs: any[]): number;
|
|
1780
1826
|
compareSelection(newSel: any[]): {
|
|
1781
1827
|
select: any[];
|
|
@@ -1806,17 +1852,17 @@ declare class TsGrid extends TsBase {
|
|
|
1806
1852
|
* compat with the v2.0 API and for callers that genuinely handle both modes.
|
|
1807
1853
|
*/
|
|
1808
1854
|
getSelection(returnIndex?: boolean): RecId[] | number[] | TsGridCellSelection[];
|
|
1809
|
-
search(field?: any, value?: any):
|
|
1810
|
-
searchOpen(options?: any):
|
|
1855
|
+
search(field?: any, value?: any): any;
|
|
1856
|
+
searchOpen(options?: any): any;
|
|
1811
1857
|
searchClose(): void;
|
|
1812
|
-
searchFieldTooltip(ind: any, sd_ind: any, el: any):
|
|
1813
|
-
searchSuggest(imediate?: boolean, forceHide?: boolean, anchor?: HTMLElement | Element):
|
|
1858
|
+
searchFieldTooltip(ind: any, sd_ind: any, el: any): any;
|
|
1859
|
+
searchSuggest(imediate?: boolean, forceHide?: boolean, anchor?: HTMLElement | Element): any;
|
|
1814
1860
|
searchSave(): void;
|
|
1815
1861
|
cache(type: any): any;
|
|
1816
|
-
cacheSave(type: any, value: any):
|
|
1862
|
+
cacheSave(type: any, value: any): any;
|
|
1817
1863
|
searchReset(noReload?: boolean): void;
|
|
1818
1864
|
searchShowFields(forceHide?: boolean): void;
|
|
1819
|
-
searchInitInput(field: string, _value?: any):
|
|
1865
|
+
searchInitInput(field: string, _value?: any): any;
|
|
1820
1866
|
clear(noRefresh?: boolean): void;
|
|
1821
1867
|
reset(noRefresh?: boolean): void;
|
|
1822
1868
|
skip(offset: any, callBack?: any): void;
|
|
@@ -1828,14 +1874,14 @@ declare class TsGrid extends TsBase {
|
|
|
1828
1874
|
getChanges(recordsBase?: TsGridRecord[]): Record<string, any>[];
|
|
1829
1875
|
mergeChanges(): void;
|
|
1830
1876
|
save(callBack?: (data: any) => void): void;
|
|
1831
|
-
editField(recid: string | number, column: number, value: any, event?: any):
|
|
1832
|
-
editChange(input?: any, index?: any, column?: any, event?: any):
|
|
1833
|
-
editDone(index?: any, column?: any, event?: any):
|
|
1877
|
+
editField(recid: string | number, column: number, value: any, event?: any): any;
|
|
1878
|
+
editChange(input?: any, index?: any, column?: any, event?: any): any;
|
|
1879
|
+
editDone(index?: any, column?: any, event?: any): any;
|
|
1834
1880
|
'delete'(force?: boolean): void;
|
|
1835
1881
|
click(recid: string | number | {
|
|
1836
1882
|
recid: string | number;
|
|
1837
1883
|
column?: number;
|
|
1838
|
-
} | any, event?: MouseEvent | any):
|
|
1884
|
+
} | any, event?: MouseEvent | any): any;
|
|
1839
1885
|
columnClick(field: string, event?: MouseEvent | any): void;
|
|
1840
1886
|
columnDblClick(field: any, event: any): void;
|
|
1841
1887
|
columnContextMenu(field: any, event: any): void;
|
|
@@ -1849,7 +1895,7 @@ declare class TsGrid extends TsBase {
|
|
|
1849
1895
|
dblClick(recid: string | number | {
|
|
1850
1896
|
recid: string | number;
|
|
1851
1897
|
column?: number;
|
|
1852
|
-
} | any, event?: MouseEvent | any):
|
|
1898
|
+
} | any, event?: MouseEvent | any): any;
|
|
1853
1899
|
showContextMenu(event: MouseEvent | any, options: {
|
|
1854
1900
|
recid?: string | number;
|
|
1855
1901
|
index?: number;
|
|
@@ -1896,9 +1942,9 @@ declare class TsGrid extends TsBase {
|
|
|
1896
1942
|
resizeBoxes(): void;
|
|
1897
1943
|
resizeRecords(): void;
|
|
1898
1944
|
getSearchesHTML(): string;
|
|
1899
|
-
getOperators(type: any, opers: any):
|
|
1900
|
-
initOperator(ind: any):
|
|
1901
|
-
initSearchLists(changedField?: any):
|
|
1945
|
+
getOperators(type: any, opers: any): any;
|
|
1946
|
+
initOperator(ind: any): any;
|
|
1947
|
+
initSearchLists(changedField?: any): any;
|
|
1902
1948
|
initSearches(): void;
|
|
1903
1949
|
getColumnsHTML(): string[];
|
|
1904
1950
|
getColumnCellHTML(i: any): string;
|
|
@@ -2025,21 +2071,21 @@ declare class TsForm extends TsBase {
|
|
|
2025
2071
|
errorsShown?: boolean;
|
|
2026
2072
|
observeResize?: ResizeObserver;
|
|
2027
2073
|
};
|
|
2028
|
-
onRequest: ((event:
|
|
2029
|
-
onLoad: ((event:
|
|
2030
|
-
onValidate: ((event:
|
|
2031
|
-
onSubmit: ((event:
|
|
2032
|
-
onProgress: ((event:
|
|
2033
|
-
onSave: ((event:
|
|
2034
|
-
onChange: ((event:
|
|
2035
|
-
onInput: ((event:
|
|
2036
|
-
onRender: ((event:
|
|
2037
|
-
onRefresh: ((event:
|
|
2038
|
-
onResize: ((event:
|
|
2039
|
-
onDestroy: ((event:
|
|
2040
|
-
onAction: ((event:
|
|
2041
|
-
onToolbar: ((event:
|
|
2042
|
-
onError: ((event:
|
|
2074
|
+
onRequest: ((event: TsEventPayload) => void) | null;
|
|
2075
|
+
onLoad: ((event: TsEventPayload) => void) | null;
|
|
2076
|
+
onValidate: ((event: TsEventPayload) => void) | null;
|
|
2077
|
+
onSubmit: ((event: TsEventPayload) => void) | null;
|
|
2078
|
+
onProgress: ((event: TsEventPayload) => void) | null;
|
|
2079
|
+
onSave: ((event: TsEventPayload) => void) | null;
|
|
2080
|
+
onChange: ((event: TsEventPayload) => void) | null;
|
|
2081
|
+
onInput: ((event: TsEventPayload) => void) | null;
|
|
2082
|
+
onRender: ((event: TsEventPayload) => void) | null;
|
|
2083
|
+
onRefresh: ((event: TsEventPayload) => void) | null;
|
|
2084
|
+
onResize: ((event: TsEventPayload) => void) | null;
|
|
2085
|
+
onDestroy: ((event: TsEventPayload) => void) | null;
|
|
2086
|
+
onAction: ((event: TsEventPayload) => void) | null;
|
|
2087
|
+
onToolbar: ((event: TsEventPayload) => void) | null;
|
|
2088
|
+
onError: ((event: TsEventPayload) => void) | null;
|
|
2043
2089
|
msgRefresh: string;
|
|
2044
2090
|
msgSaving: string;
|
|
2045
2091
|
msgServerError: string;
|
|
@@ -2429,4 +2475,4 @@ declare class TsField extends TsBase {
|
|
|
2429
2475
|
moveCaret2end(): void;
|
|
2430
2476
|
}
|
|
2431
2477
|
|
|
2432
|
-
export { Tooltip, TsAlert, TsBase, TsColor, TsConfirm, TsDate, TsDialog, TsEvent, TsField, TsForm, TsGrid, TsLayout, TsLocale, TsMenu, TsPopup, TsPrompt, TsSidebar, TsTabs, TsToolbar, TsTooltip, TsUi, TsUtils, query };
|
|
2478
|
+
export { type RecId, Tooltip, TsAlert, TsBase, type TsCloneOptions, TsColor, type TsColorRgb, TsConfirm, TsDate, TsDialog, TsEvent, type TsEventData, type TsEventPayload, TsField, type TsFieldColorOptions, type TsFieldDateOptions, type TsFieldDateTimeOptions, type TsFieldElement, type TsFieldEnumOptions, type TsFieldFileOptions, type TsFieldListOptions, type TsFieldNumericOptions, type TsFieldOptions, type TsFieldTimeOptions, TsForm, TsGrid, type TsGridCellSelection, type TsGridColumn, type TsGridGroupBy, type TsGridRange, type TsGridRangeEndpoint, type TsGridRecord, type TsGridSearch, type TsGridSelection, type TsGridSortData, TsLayout, type TsLayoutPanel, TsLocale, type TsLocaleSettings, type TsLockOptions, TsMenu, type TsMenuItem, type TsMessageOptions, type TsMessageProm, type TsMessageWhere, type TsPanelContent, type TsPanelType, TsPopup, TsPrompt, TsSidebar, type TsSidebarFindOptions, type TsSidebarRefreshOptions, type TsSidebarSetCountOptions, type TsSidebarSortOptions, type TsSidebarUpdateOptions, TsTabs, TsToolbar, TsTooltip, TsUi, TsUtils, query, toSafeEvent };
|