Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sheet): sort feature #2435

Merged
merged 75 commits into from
Jun 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
d8a5402
feat: add command & mutation for sheet sort
yuhongz May 13, 2024
7a423e3
feat: register skeleton change if mutation executed
yuhongz May 14, 2024
1e54e7c
feat: plugin schema for compare fn & basic value type compare fn
yuhongz May 15, 2024
8da4812
feat: handle merge cell sort
yuhongz May 16, 2024
bcb7056
feat: extend filter range if set-range-value at nextline
yuhongz May 16, 2024
ead6958
fix: not every srv-mutation extend filter range
yuhongz May 16, 2024
fd076a8
fix: protect unsafe var
yuhongz May 16, 2024
2f2d37f
feat: add some entries
yuhongz May 17, 2024
c1582dd
feat: ui split
yuhongz May 20, 2024
04f5941
feat: split ui and sort-core
yuhongz May 23, 2024
ae82d13
chore: merge to dev
yuhongz May 24, 2024
2760a31
feat: add custom sort panel
yuhongz May 25, 2024
5c3b1ec
feat: add more entry
yuhongz May 25, 2024
f0edf1d
feat: custom sort ui
yuhongz May 28, 2024
22f89f6
feat: polishing sort ui
yuhongz May 29, 2024
d0cd9a4
feat: add sort btn at filter panel
yuhongz May 30, 2024
ed1051b
fix: merge conflicts
yuhongz May 31, 2024
9d6e7c0
chore: lock
yuhongz May 31, 2024
9c289e9
fix: custom panel has max-height
yuhongz Jun 5, 2024
d34a456
test: add test for sort-range-command
yuhongz Jun 5, 2024
6079074
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 6, 2024
6b3d7f7
chore: typo
yuhongz Jun 6, 2024
365375b
chore: type
yuhongz Jun 6, 2024
2e0b590
chore: type
yuhongz Jun 6, 2024
27ba6ea
chore: add version
yuhongz Jun 6, 2024
fbd8653
fix: unneccesary focus
yuhongz Jun 6, 2024
23953fb
chore: lock
yuhongz Jun 6, 2024
6e64b33
chore: react version
yuhongz Jun 6, 2024
c737951
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 7, 2024
b29c7e5
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 11, 2024
a1cc4d5
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 12, 2024
19a7cfa
feat: add locale
yuhongz Jun 12, 2024
b38d31b
chore: disable lint
yuhongz Jun 12, 2024
80240ae
fix: null value compare
yuhongz Jun 13, 2024
0898335
fix: hidden row should not be sorted
yuhongz Jun 13, 2024
9f4b0e4
fix: undo error
yuhongz Jun 13, 2024
ccf6ade
fix: quit dialog when click out side
yuhongz Jun 14, 2024
0708310
feat: custom sort has at least one rule
yuhongz Jun 14, 2024
59ca2d5
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 14, 2024
ab6373b
fix: filter panel error
yuhongz Jun 14, 2024
a38f7fc
fix: should not preserve panel position
yuhongz Jun 14, 2024
dc4a88b
fix: ui
yuhongz Jun 14, 2024
a339adc
feat: add reorder-range mutation/command to sheet
yuhongz Jun 14, 2024
767458b
feat: has title will effect selection & dropdown label
yuhongz Jun 15, 2024
06127a7
feat: add empty check before sort
yuhongz Jun 15, 2024
0929401
feat: add reorderrange to ref-range
yuhongz Jun 15, 2024
385d766
fix: ref-range about reorder-range
yuhongz Jun 15, 2024
99a6e52
fix: cf refresh after reorder
yuhongz Jun 15, 2024
f0cecdb
fix: richformat will be sorted
yuhongz Jun 16, 2024
c5a9114
feat: dv support sort
yuhongz Jun 16, 2024
dca5b34
feat: checkbox will be sorted
yuhongz Jun 16, 2024
3ea720a
feat: single row cannot be sorted
yuhongz Jun 16, 2024
88f89e5
test: fix test
yuhongz Jun 16, 2024
cc63833
chore: type
yuhongz Jun 16, 2024
cfd2714
fix: style
yuhongz Jun 17, 2024
067f9b9
fix: ctx-menu sort disable
yuhongz Jun 18, 2024
e00a9fa
fix: sort by raw cell data
yuhongz Jun 18, 2024
c1c7ae0
fix: reorder-range-mutation will trigger value change rerender
yuhongz Jun 18, 2024
745c402
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 18, 2024
27de4b0
chore: pnpm
yuhongz Jun 18, 2024
84cb2f4
fix: filter panel should not has limited height
yuhongz Jun 18, 2024
fa0b2b6
fix: filter panel height change
yuhongz Jun 18, 2024
293b5cb
fix: ui
yuhongz Jun 18, 2024
e64b56d
fix: autofill will extend filter-range
yuhongz Jun 18, 2024
1451561
fix: cr revise
yuhongz Jun 18, 2024
d771f03
fix: cr revise
yuhongz Jun 18, 2024
38cf184
feat: array-formula will not be sorted
yuhongz Jun 18, 2024
2db2be5
fix: style
yuhongz Jun 19, 2024
c73fa90
fix(conditional-formatting): when multiple conditional formats are se…
Gggpound Jun 19, 2024
1de5ccf
fix: autofill will copy value if single cell
yuhongz Jun 19, 2024
07b19bb
feat: update formula calc
yuhongz Jun 19, 2024
0cb4374
fix: empty cell will not be sorted
yuhongz Jun 19, 2024
b87209e
fix: throttle add new sort rule
yuhongz Jun 19, 2024
01f914e
fix: filter panel trigger sort will not set selection
yuhongz Jun 19, 2024
22d23d5
fix: list ui
yuhongz Jun 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: ctx-menu sort disable
  • Loading branch information
yuhongz committed Jun 18, 2024
commit 067f9b9ec7397196e6a7798ffca63ca920cbef09
9 changes: 6 additions & 3 deletions packages/sheets-sort-ui/src/controllers/sheets-sort.menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function sortRangeCustomMenuFactory(_accessor: IAccessor): IMenuItem {
};
}

export function sortRangeCtxMenuFactory(accessor: IAccessor): IMenuItem {
export function sortRangeCtxMenuFactory(_accessor: IAccessor): IMenuItem {
return {
id: SHEETS_SORT_CTX_MENU_ID,
title: 'sheets-sort.general.sort',
Expand All @@ -104,7 +104,6 @@ export function sortRangeCtxMenuFactory(accessor: IAccessor): IMenuItem {
],
group: MenuGroup.CONTEXT_MENU_DATA,
icon: SHEETS_SORT_ASC_ICON,
disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
};
}

Expand All @@ -115,6 +114,7 @@ export function sortRangeAscCtxMenuFactory(_accessor: IAccessor): IMenuItem {
type: MenuItemType.BUTTON,
icon: SHEETS_SORT_ASC_ICON,
positions: [SHEETS_SORT_CTX_MENU_ID],
disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
};
}

Expand All @@ -125,6 +125,7 @@ export function sortRangeAscExtCtxMenuFactory(_accessor: IAccessor): IMenuItem {
type: MenuItemType.BUTTON,
icon: SHEETS_SORT_ASC_EXT_ICON,
positions: [SHEETS_SORT_CTX_MENU_ID],
disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
};
}

Expand All @@ -135,7 +136,7 @@ export function sortRangeDescCtxMenuFactory(_accessor: IAccessor): IMenuItem {
type: MenuItemType.BUTTON,
positions: [SHEETS_SORT_CTX_MENU_ID],
icon: SHEETS_SORT_DESC_ICON,

disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
};
}

Expand All @@ -146,6 +147,7 @@ export function sortRangeDescExtCtxMenuFactory(_accessor: IAccessor): IMenuItem
type: MenuItemType.BUTTON,
positions: [SHEETS_SORT_CTX_MENU_ID],
icon: SHEETS_SORT_DESC_EXT_ICON,
disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
};
}

Expand All @@ -156,6 +158,7 @@ export function sortRangeCustomCtxMenuFactory(_accessor: IAccessor): IMenuItem {
type: MenuItemType.BUTTON,
positions: [SHEETS_SORT_CTX_MENU_ID],
icon: SHEETS_SORT_CUSTOM_ICON,
disabled$: getCurrentRangeDisable$(_accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetSortPermission, WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
};
}