This repository was archived by the owner on Aug 29, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 72
3.1 refactor cells rendering #123
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
2af1d3e
WIP
0646dc0
wip
cdb93f5
wip
50053fa
further down the rabbit hole..
fcc1edb
Merge remote-tracking branch 'origin/develop' into 3.1-refactor-cells…
70048e2
fix dropdown navigation regression
d5bed92
fix selected row regression
f03d02f
renaming / restructuring
7bebb9d
rename/restructure
4473467
- clean up zipping
966681f
rework style/ast cache
75736ed
clean up
219da49
clean up
1bbc70e
build update
172d3ab
improve rendering perf
ed7053c
optimize wrappers generation
1d93552
build config
b91af6a
- fix typing regression
72231b8
- fix navigation regression
61d3b74
simplify slightly the derived props / ui
443d380
fix copy/paste regressions
47be714
clean up wrapper props
4c16af0
clean up
c4a3609
merge with develop
54a9b49
fix regression on conditional dropdowns
617ce7b
wip, fp the headers
caecaf5
fp content, wrappers, labels, indices from header factory
e8b6751
fix regressions
f3b4671
fp the table itself
bf28720
fix typing and behavior for table fp
dd47d51
Merge remote-tracking branch 'origin/develop' into 3.1-refactor-cells…
b3cee9f
fix sorting icon regression
a177af2
fix regression
0c7be88
regression
d85c35f
fix column name regression with only 1 header row
1544031
fix header actions regression
9334516
Merge remote-tracking branch 'origin/develop' into 3.1-refactor-cells…
ed6c5c9
fix style application on mount
0cd7e2c
fix regression edit cell in n-th page
7a0b167
fix editing on non-first page (continued)
fd2ec45
merge develop into 3.1-refactor-cell-rendering
8033eb8
fix test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import * as R from 'ramda'; | ||
|
|
||
| type Array<T> = T[]; | ||
|
|
||
| export function arrayMap<T1, T2, TR>( | ||
| a1: Array<T1>, | ||
| a2: Array<T2>, | ||
| cb: (d1: T1, d2: T2, i: number) => TR | ||
| ) { | ||
| const mapArray = R.addIndex<T1, TR>(R.map); | ||
|
|
||
| return mapArray((iValue, i) => cb(iValue, a2[i], i), a1); | ||
| } | ||
|
|
||
| export function arrayMap3<T1, T2, T3, TR>( | ||
| a1: Array<T1>, | ||
| a2: Array<T2>, | ||
| a3: Array<T3>, | ||
| cb: (d1: T1, d2: T2, d3: T3, i: number) => TR | ||
| ) { | ||
| const mapArray = R.addIndex<T1, TR>(R.map); | ||
|
|
||
| return mapArray((iValue, i) => cb(iValue, a2[i], a3[i], i), a1); | ||
|
|
||
| } | ||
|
|
||
| export function arrayMapN<TR>( | ||
| cb: (i: number, ...args: any[]) => TR, | ||
| ...arrays: (any[])[] | ||
| ) { | ||
| const a1 = arrays.slice(0, 1); | ||
| const as = arrays.slice(1); | ||
|
|
||
| const mapArray = R.addIndex<any, TR>(R.map); | ||
|
|
||
| return mapArray((iValue, i) => cb(i, [iValue, ...as.map(a => a[i])]), a1); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| import * as R from 'ramda'; | ||
|
|
||
| type Matrix<T> = T[][]; | ||
|
|
||
| export function matrixMap<T1, T2, TR>( | ||
| m1: Matrix<T1>, | ||
| m2: Matrix<T2>, | ||
| cb: (d1: T1, d2: T2, i: number, j: number) => TR | ||
| ) { | ||
| const mapMatrix = R.addIndex<T1[], TR[]>(R.map); | ||
| const mapRow = R.addIndex<T1, TR>(R.map); | ||
|
|
||
| return mapMatrix((iRow, i) => | ||
| mapRow( | ||
| (ijValue, j) => cb(ijValue, m2[i][j], i, j), | ||
| iRow | ||
| ), m1 | ||
| ); | ||
| } | ||
|
|
||
| export function matrixMap3<T1, T2, T3, TR>( | ||
| m1: Matrix<T1>, | ||
| m2: Matrix<T2>, | ||
| m3: Matrix<T3>, | ||
| cb: (d1: T1, d2: T2, d3: T3, i: number, j: number) => TR | ||
| ) { | ||
| const mapMatrix = R.addIndex<T1[], TR[]>(R.map); | ||
| const mapRow = R.addIndex<T1, TR>(R.map); | ||
|
|
||
| return mapMatrix((iRow, i) => | ||
| mapRow( | ||
| (ijValue, j) => cb(ijValue, m2[i][j], m3[i][j], i, j), | ||
| iRow | ||
| ), m1 | ||
| ); | ||
| } | ||
|
|
||
| export function matrixMap4<T1, T2, T3, T4, TR>( | ||
| m1: Matrix<T1>, | ||
| m2: Matrix<T2>, | ||
| m3: Matrix<T3>, | ||
| m4: Matrix<T4>, | ||
| cb: (d1: T1, d2: T2, d3: T3, d4: T4, i: number, j: number) => TR | ||
| ) { | ||
| const mapMatrix = R.addIndex<T1[], TR[]>(R.map); | ||
| const mapRow = R.addIndex<T1, TR>(R.map); | ||
|
|
||
| return mapMatrix((iRow, i) => | ||
| mapRow( | ||
| (ijValue, j) => cb(ijValue, m2[i][j], m3[i][j], m4[i][j], i, j), | ||
| iRow | ||
| ), m1 | ||
| ); | ||
| } | ||
|
|
||
| export function matrixMapN<TR>( | ||
| cb: (i: number, j: number, ...args: any[]) => TR, | ||
| ...matrices: (any[][])[] | ||
| ) { | ||
| const m1 = matrices.slice(0, 1); | ||
| const ms = matrices.slice(1); | ||
|
|
||
| const mapMatrix = R.addIndex<any[], TR[]>(R.map); | ||
| const mapRow = R.addIndex<any, TR>(R.map); | ||
|
|
||
| return mapMatrix((iRow, i) => | ||
| mapRow( | ||
| (ijValue, j) => cb(i, j, [ijValue, ...ms.map(m => m[i][j])]), | ||
| iRow | ||
| ), m1 | ||
| ); | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Helper functions for combined zip/map of n-matrices together.. less expensive than chaining (n-1) (zip+zip) + mapping after.. still based off ramda |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helper functions for combined zip/map of n-arrays together.. less expensive than chaining (n-1) zips + mapping after.. still based off ramda