Skip to content

Commit e2a0e8f

Browse files
authored
Merge pull request #1461 from finos/salt-vite-versions
Salt vite versions
2 parents a059ae1 + 2c3d725 commit e2a0e8f

102 files changed

Lines changed: 3294 additions & 1941 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

vuu-ui/package-lock.json

Lines changed: 311 additions & 335 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vuu-ui/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"typecheck": "tsc --noEmit --project tsconfig-typecheck.json"
4949
},
5050
"dependencies": {
51-
"@salt-ds/core": "1.27.1",
5251
"@testing-library/react-hooks": "^8.0.1",
5352
"@types/jest": "^29.5.11",
5453
"@types/node": "^18.0.0",
@@ -79,7 +78,7 @@
7978
"cypress": "13.6.1",
8079
"cypress-axe": "1.5.0",
8180
"cypress-real-events": "1.11.0",
82-
"esbuild": "0.20.1",
81+
"esbuild": "0.23.0",
8382
"esbuild-visualizer": "0.6.0",
8483
"eslint": "8.36.0",
8584
"eslint-config-prettier": "8.7.0",
@@ -89,7 +88,7 @@
8988
"eslint-plugin-react-hooks": "4.6.0",
9089
"happy-dom": "^12.10.3",
9190
"open": "^10.0.0",
92-
"prettier": "2.8.4",
91+
"prettier": "3.3.3",
9392
"rollup": "^4.14.1",
9493
"rollup-plugin-esbuild": "^6.1.1",
9594
"rollup-plugin-import-css": "^3.5.0",

vuu-ui/packages/vuu-data-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@finos/vuu-ui-controls": "0.0.26",
2525
"@finos/vuu-utils": "0.0.26",
2626
"@finos/vuu-table": "0.0.26",
27-
"@salt-ds/core": "1.27.1",
27+
"@salt-ds/core": "1.34.0",
2828
"@salt-ds/styles": "0.2.1",
2929
"@salt-ds/window": "0.1.1"
3030
},

vuu-ui/packages/vuu-data-react/src/data-editing/date-editing-utils.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import { ColumnDescriptor } from "@finos/vuu-table-types";
2-
import {
3-
type Commithandler,
4-
VuuInput,
5-
VuuTypeaheadInput,
6-
} from "@finos/vuu-ui-controls";
2+
import { VuuInput, VuuTypeaheadInput } from "@finos/vuu-ui-controls";
73
import { SuggestionProvider, TableSchemaTable } from "@finos/vuu-data-types";
4+
import { CommitHandler } from "@finos/vuu-utils";
85

96
export interface DataItemEditControlProps {
107
column: ColumnDescriptor;
11-
onCommit: Commithandler;
8+
onCommit: CommitHandler<HTMLInputElement, string | undefined>;
129
suggestionProvider?: SuggestionProvider;
1310
table?: TableSchemaTable;
1411
}
@@ -23,6 +20,7 @@ export const getDataItemEditControl = ({
2320
return (
2421
<VuuTypeaheadInput
2522
column={column.name}
23+
onCommit={onCommit}
2624
suggestionProvider={suggestionProvider}
2725
table={table}
2826
/>

vuu-ui/packages/vuu-filters/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@finos/vuu-ui-controls": "0.0.26",
2525
"@finos/vuu-table": "0.0.26",
2626
"@finos/vuu-utils": "0.0.26",
27-
"@salt-ds/core": "1.27.1",
27+
"@salt-ds/core": "1.34.0",
2828
"@salt-ds/styles": "0.2.1",
2929
"@salt-ds/window": "0.1.1",
3030
"uuid": "9.0.0"

vuu-ui/packages/vuu-filters/src/__tests__/__component__/FilterClause.cy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
NewFilterClause,
33
PartialFilterClauseColumnAndOperator,
4-
} from "../../../../../showcase/src/examples/Filters/FilterBar/FilterClause.examples";
4+
} from "../../../../../showcase/src/examples/Filters/FilterClause/FilterClause.examples";
55

66
describe("FilterClause", () => {
77
describe("WHEN new filter clause is rendered", () => {

vuu-ui/packages/vuu-filters/src/__tests__/__component__/FilterEditor.cy.tsx

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ describe("FilterEditor", () => {
125125
it("THEN filter combinator (AND) is rendered", () => {
126126
cy.mount(<NewFilter />);
127127
assertComboboxReady();
128+
128129
EnterAndAssertListVisible();
129130
EnterAndAssertListVisible();
130131
cy.realPress("Enter");
@@ -154,10 +155,8 @@ describe("FilterEditor", () => {
154155
EnterAndAssertListVisible();
155156
EnterAndAssertListVisible();
156157
cy.realPress("Enter");
157-
158158
selectMenuOption("AND");
159159
cy.findByText("currency").should("be.visible");
160-
161160
cy.realPress("ArrowDown");
162161
cy.findByRole("option", { name: "currency" }).should(
163162
"have.class",
@@ -166,7 +165,11 @@ describe("FilterEditor", () => {
166165
EnterAndAssertListVisible();
167166
EnterAndAssertListVisible();
168167
cy.realPress("Enter");
168+
cy.findByRole("button", { name: "Save" }).should("be.enabled");
169+
cy.findByRole("button", { name: "Save" }).should("be.focused");
170+
169171
cy.realPress("Enter");
172+
170173
cy.get("@saveFilterHandler").should("have.been.calledWith", {
171174
op: "and",
172175
filters: [
@@ -189,6 +192,7 @@ describe("FilterEditor", () => {
189192
cy.realPress("Enter");
190193
cy.findByRole("listbox").should("be.visible");
191194
cy.realPress("Enter");
195+
cy.findByRole("button", { name: "Save" }).should("be.focused");
192196
cy.realPress(["Shift", "Tab"]);
193197
cy.findAllByRole("combobox").eq(2).should("be.focused");
194198
cy.findByRole("listbox").should("be.visible");
@@ -206,6 +210,7 @@ describe("FilterEditor", () => {
206210
cy.realPress("Enter");
207211
cy.findByRole("listbox").should("be.visible");
208212
cy.realPress("Enter");
213+
cy.findByRole("button", { name: "Save" }).should("be.focused");
209214
cy.realPress(["Shift", "Tab"]);
210215
cy.realPress("ArrowLeft");
211216
cy.findAllByRole("combobox").eq(1).should("be.focused");
@@ -221,12 +226,17 @@ describe("FilterEditor", () => {
221226
cy.mount(<NewFilter />);
222227
assertComboboxReady();
223228
cy.realPress("Enter");
229+
cy.findAllByRole("combobox").eq(1).should("be.focused");
224230
cy.findByRole("listbox").should("be.visible");
225231
cy.realPress("Enter");
232+
cy.findAllByRole("combobox").eq(2).should("be.focused");
226233
cy.findByRole("listbox").should("be.visible");
227234
cy.realPress("Enter");
235+
cy.findByRole("button", { name: "Save" }).should("be.focused");
228236
cy.realPress(["Shift", "Tab"]);
237+
cy.findAllByRole("combobox").eq(2).should("be.focused");
229238
cy.realPress("ArrowLeft");
239+
cy.findAllByRole("combobox").eq(1).should("be.focused");
230240
cy.realPress("ArrowLeft");
231241
cy.findAllByRole("combobox").eq(0).should("be.focused");
232242
cy.findByRole("listbox").should("be.visible");
@@ -240,11 +250,11 @@ describe("FilterEditor", () => {
240250
});
241251
describe("within a multi clause filter", () => {
242252
describe("WHEN right arrow is repeatedly pressed", () => {
243-
it("THEN focus moves from field to field, first selecting then deselecting, then across combinators and clauses", () => {
253+
it.skip("THEN focus moves from field to field, first selecting then deselecting, then across combinators and clauses", () => {
244254
cy.mount(<EditMultiClauseOrFilter />);
245255
cy.findAllByRole("combobox").should("have.length", 6);
246256
cy.findAllByRole("combobox").eq(0).should("be.focused");
247-
// Onbe keypress selects text, next deselects, leavbing cursor at end
257+
// One keypress selects text, next deselects, leaving cursor at end
248258
// don't have a good way to assert selection yet
249259
cy.realPress("ArrowRight");
250260
cy.realPress("ArrowRight");
@@ -304,6 +314,7 @@ describe("FilterEditor", () => {
304314
assertComboboxReady();
305315
clickListItem("description");
306316
clickListItem("starts");
317+
cy.findAllByRole("option").should("have.length", 10);
307318
cy.findAllByRole("option")
308319
.eq(0)
309320
.should("have.attr", "aria-disabled", "true");
@@ -323,6 +334,7 @@ describe("FilterEditor", () => {
323334
assertComboboxReady();
324335
clickListItem("description");
325336
clickListItem("starts");
337+
cy.findAllByRole("combobox").eq(2).should("be.focused");
326338
cy.realType("A");
327339
cy.findByRole("button", { name: "Save" }).should("be.enabled");
328340
});
@@ -332,6 +344,7 @@ describe("FilterEditor", () => {
332344
assertComboboxReady();
333345
clickListItem("description");
334346
clickListItem("starts");
347+
cy.findAllByRole("combobox").eq(2).should("be.focused");
335348
cy.realType("A");
336349
cy.realPress("Enter");
337350
cy.findByRole("button", { name: "Save" }).should("be.focused");
@@ -343,6 +356,7 @@ describe("FilterEditor", () => {
343356
assertComboboxReady();
344357
clickListItem("description");
345358
clickListItem("starts");
359+
cy.findAllByRole("combobox").eq(2).should("be.focused");
346360
cy.realType("A");
347361
cy.realPress("Tab");
348362
cy.findByRole("button", { name: "Save" }).should("be.focused");
@@ -355,6 +369,7 @@ describe("FilterEditor", () => {
355369
assertComboboxReady();
356370
clickListItem("description");
357371
clickListItem("starts");
372+
cy.findAllByRole("combobox").eq(2).should("be.focused");
358373
cy.realType("A");
359374
cy.realPress("Backspace");
360375
cy.findByRole("button", { name: "Save" }).should("be.disabled");
@@ -410,6 +425,7 @@ describe("FilterEditor", () => {
410425
clickListItem("lotSize");
411426
cy.findByRole("option", { name: ">" }).realHover();
412427
cy.findByRole("option", { name: ">" }).realClick();
428+
cy.findByRole("textbox").should("be.focused");
413429

414430
cy.realType("1000");
415431
cy.realPress("Backspace");

vuu-ui/packages/vuu-filters/src/__tests__/__component__/Filterbar.cy.tsx

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ describe("The mouse user", () => {
111111
describe("WHEN user clicks SAVE", () => {
112112
const testFilter = {
113113
column: "currency",
114-
op: "!=",
115-
value: "USD",
114+
op: "=",
115+
value: "EUR",
116116
};
117117

118118
beforeEach(() => {
@@ -125,7 +125,17 @@ describe("The mouse user", () => {
125125
/>
126126
);
127127
findAddButton().realClick();
128-
clickListItems(testFilter.column, testFilter.op, testFilter.value);
128+
cy.findAllByRole("combobox").eq(0).should("be.focused");
129+
cy.findByRole("option", { name: "currency" }).realHover();
130+
cy.findByRole("option", { name: "currency" }).realClick();
131+
cy.findAllByRole("combobox").eq(1).should("be.focused");
132+
cy.findByRole("option", { name: "=" }).realHover();
133+
cy.findByRole("option", { name: "=" }).realClick();
134+
cy.findAllByRole("combobox").eq(2).should("be.focused");
135+
cy.findByRole("option", { name: "EUR" }).realHover();
136+
cy.findByRole("option", { name: "EUR" }).realClick();
137+
cy.findByRole("button", { name: "Save" }).should("be.focused");
138+
129139
clickButton("Save");
130140
});
131141

@@ -138,7 +148,7 @@ describe("The mouse user", () => {
138148

139149
it("THEN filter is applied", () => {
140150
cy.get("@applyFilterHandler").should("be.calledWith", {
141-
filter: 'currency != "USD"',
151+
filter: 'currency = "EUR"',
142152
filterStruct: testFilter,
143153
});
144154
});
@@ -198,15 +208,24 @@ describe("The mouse user", () => {
198208
.find(".vuuSplitButton-trigger")
199209
.realClick();
200210
clickButton("Edit");
201-
clickListItems(newFilter.column, newFilter.op, newFilter.value);
211+
cy.findAllByRole("combobox").eq(0).should("be.focused");
212+
cy.findByRole("option", { name: "currency" }).realHover();
213+
cy.findByRole("option", { name: "currency" }).realClick();
214+
cy.findAllByRole("combobox").eq(1).should("be.focused");
215+
cy.findByRole("option", { name: "=" }).realHover();
216+
cy.findByRole("option", { name: "=" }).realClick();
217+
cy.findAllByRole("combobox").eq(2).should("be.focused");
218+
cy.findByRole("option", { name: "CAD" }).realHover();
219+
cy.findByRole("option", { name: "CAD" }).realClick();
220+
cy.findByRole("button", { name: "Save" }).should("be.focused");
202221
clickButton("Save");
203222

204223
cy.get("@filterStateChangeHandler").should("be.calledWithExactly", {
205224
filters: [newFilter],
206225
activeIndices: [0],
207226
});
208227
cy.get("@applyFilterHandler").should("be.calledWithExactly", {
209-
filter: 'currency != "CAD"',
228+
filter: 'currency = "CAD"',
210229
filterStruct: newFilter,
211230
});
212231
});
@@ -237,13 +256,31 @@ describe("The mouse user", () => {
237256
/>
238257
);
239258
findAddButton().realClick();
240-
clickListItems(filter1.column, filter1.op, filter1.value);
259+
cy.findAllByRole("combobox").eq(0).should("be.focused");
260+
cy.findByRole("option", { name: filter1.column }).realHover();
261+
cy.findByRole("option", { name: filter1.column }).realClick();
262+
cy.findAllByRole("combobox").eq(1).should("be.focused");
263+
cy.findByRole("option", { name: filter1.op }).realHover();
264+
cy.findByRole("option", { name: filter1.op }).realClick();
265+
cy.findAllByRole("combobox").eq(2).should("be.focused");
266+
cy.findByRole("option", { name: filter1.value }).realHover();
267+
cy.findByRole("option", { name: filter1.value }).realClick();
268+
cy.findByRole("button", { name: "Save" }).should("be.focused");
241269
clickButton("Save");
242270
waitUntilEditableLabelIsFocused();
243271
pressEnterEditableLabel();
244272

245273
findAddButton().realClick();
246-
clickListItems(filter2.column, filter2.op, filter2.value);
274+
cy.findAllByRole("combobox").eq(0).should("be.focused");
275+
cy.findByRole("option", { name: filter2.column }).realHover();
276+
cy.findByRole("option", { name: filter2.column }).realClick();
277+
cy.findAllByRole("combobox").eq(1).should("be.focused");
278+
cy.findByRole("option", { name: filter2.op }).realHover();
279+
cy.findByRole("option", { name: filter2.op }).realClick();
280+
cy.findAllByRole("combobox").eq(2).should("be.focused");
281+
cy.findByRole("option", { name: filter2.value }).realHover();
282+
cy.findByRole("option", { name: filter2.value }).realClick();
283+
cy.findByRole("button", { name: "Save" }).should("be.focused");
247284
clickButton("Save");
248285
waitUntilEditableLabelIsFocused(1);
249286
pressEnterEditableLabel(1);
@@ -446,7 +483,7 @@ const getDate = (t: "start-today" | "start-tomorrow" | "end-today") => {
446483
}
447484
};
448485

449-
describe("WHEN a user applies a date filter", () => {
486+
describe.only("WHEN a user applies a date filter", () => {
450487
const DATE_COLUMN = "lastUpdated";
451488
const startOfToday = getDate("start-today").getTime();
452489
const endOfToday = getDate("end-today").getTime();
@@ -513,7 +550,10 @@ describe("WHEN a user applies a date filter", () => {
513550
// Add date filter
514551
findAddButton().realClick();
515552
clickListItems(DATE_COLUMN, op);
516-
cy.get(".vuuDatePopup .vuuIconButton").realClick();
553+
cy.findByRole("textbox", { name: "Start date" }).should("be.focused");
554+
cy.realPress("ArrowDown")
555+
556+
// cy.get(".vuuDatePopup .vuuIconButton").realClick();
517557
cy.get(`${VISIBLE_MONTH} .saltCalendarDay-today`).realClick();
518558
cy.realPress("ArrowRight");
519559
clickButton("Save");

vuu-ui/packages/vuu-filters/src/filter-bar/FilterBar.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
);
99
--vuuFilterEditor-height: var(--filterbar-height);
1010
--flexbar-gap: var(--salt-spacing-100);
11+
--icon-marginTop: 0;
1112

1213
align-items: center;
1314
background-color: var(--salt-container-secondary-background);
@@ -23,10 +24,10 @@
2324
height: calc(var(--salt-spacing-100) + var(--filterbar-height));
2425
overflow: hidden;
2526
padding: var(--salt-spacing-100) var(--salt-spacing-200);
26-
/* transition: height 0.3s ease-in; */
2727
}
2828

2929
.vuuFilterBar-quick-filter {
30+
--icon-marginTop: 20px;
3031
--filterbar-height: var(
3132
--vuuFilterBar-height,
3233
calc(2 * var(--salt-size-base))
@@ -40,6 +41,15 @@
4041
height: calc(1px + var(--flexbar-gap) + (2 * var(--filterbar-height)));
4142
}
4243

44+
.vuuFilterBar-iconContainer {
45+
height: 100%;
46+
47+
.saltToggleButtonGroup {
48+
margin-top: var(--icon-marginTop);
49+
transition: margin-top 0.1s ease-in;
50+
}
51+
}
52+
4353
.vuuFilterbar-icon {
4454
display: inline-block;
4555
height: 16px;

0 commit comments

Comments
 (0)