Skip to content

Commit 64de6e5

Browse files
feat: support jquery 4 (DevExpress#29830)
Co-authored-by: Mikhail Preyskurantov <[email protected]>
1 parent 63dc5e2 commit 64de6e5

File tree

106 files changed

+404
-327
lines changed

Some content is hidden

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

106 files changed

+404
-327
lines changed

apps/demos/Demos/Autocomplete/Overview/jQuery/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ $(() => {
9494
});
9595

9696
function updateEmployeeInfo() {
97-
let result = $.trim(`${firstName || ''} ${lastName || ''}`);
97+
let result = `${firstName || ''} ${lastName || ''}`.trim();
9898

9999
result += (result && position) ? (`, ${position}`) : position || '';
100100
result += (result && state) ? (`, ${state}`) : state || '';

apps/demos/Demos/Charts/SignalRService/jQuery/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
$(() => {
2+
$.type = $.type || function (obj) {
3+
if (obj == null) {
4+
return obj + '';
5+
}
6+
7+
return typeof obj;
8+
};
9+
210
const hubConnection = new signalR.HubConnectionBuilder()
311
.withUrl('https://js.devexpress.com/Demos/NetCore/stockTickDataHub', {
412
skipNegotiation: true,

apps/demos/Demos/DataGrid/CollaborativeEditing/jQuery/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
$(() => {
2+
$.type = $.type || function (obj) {
3+
if (obj == null) {
4+
return obj + '';
5+
}
6+
7+
return typeof obj;
8+
};
9+
210
const BASE_PATH = 'https://js.devexpress.com/Demos/NetCore/';
311
const url = `${BASE_PATH}api/DataGridCollaborativeEditing/`;
412
const groupId = new DevExpress.data.Guid().toString();

apps/demos/Demos/DataGrid/SignalRService/jQuery/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
$(() => {
2+
$.type = $.type || function (obj) {
3+
if (obj == null) {
4+
return obj + '';
5+
}
6+
7+
return typeof obj;
8+
};
9+
210
const connection = new signalR.HubConnectionBuilder()
311
.withUrl('https://js.devexpress.com/Demos/NetCore/liveUpdateSignalRHub', {
412
skipNegotiation: true,

apps/demos/Demos/Scheduler/SignalRService/jQuery/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
$(() => {
2+
$.type = $.type || function (obj) {
3+
if (obj == null) {
4+
return obj + '';
5+
}
6+
7+
return typeof obj;
8+
};
9+
210
const BASE_PATH = 'https://js.devexpress.com/Demos/NetCore/';
311
const url = `${BASE_PATH}api/SchedulerSignalR`;
412
const createScheduler = function (index) {

e2e/testcafe-devextreme/tests/common/draggable.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ fixture.disablePageReloads`Draggable`
99
const init = ClientFunction(() => {
1010
$('<div>', {
1111
id: 'scrollview',
12-
width: 400,
13-
height: 400,
12+
width: '400px',
13+
height: '400px',
1414
})
1515
.css({
1616
position: 'absolute',
1717
top: 0,
18-
padding: 20,
18+
padding: '20px',
1919
background: '#f18787',
2020
})
2121
.appendTo('#container');
2222

2323
$('<div>', {
2424
id: 'scrollview-content',
25-
height: 500,
26-
width: 500,
25+
height: '500px',
26+
width: '500px',
2727
}).appendTo('#scrollview');
2828

2929
$('<div>', {

e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ test('Header container should have padding-right if grid has max-height and scro
445445
.ok(compareResults.errorMessages());
446446
}).before(async () => {
447447
await ClientFunction(() => {
448-
$('#container').css('max-height', 200);
448+
$('#container').css('max-height', '200px');
449449
})();
450450

451451
return createWidget('dxDataGrid', {
@@ -752,7 +752,7 @@ test('New row should be rendered at the top when grid is scrolled in virtual scr
752752
return items;
753753
};
754754
await ClientFunction(() => {
755-
$('#container').css('max-height', 440);
755+
$('#container').css('max-height', '440px');
756756
})();
757757
await createWidget('dxDataGrid', {
758758
dataSource: generateData(),
@@ -1119,8 +1119,8 @@ safeSizeTest('The page should not be changed when hiding/showing the grid view a
11191119
(window as any).testLoadCount = 0;
11201120

11211121
$('body').css({
1122-
minHeight: 100,
1123-
minWidth: 100,
1122+
minHeight: '100px',
1123+
minWidth: '100px',
11241124
});
11251125
})();
11261126

e2e/testcafe-devextreme/tests/editors/checkBox/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ test('Checkbox appearance', async (t) => {
9595
`${INVALID_STATE_CLASS} ${FOCUSED_STATE_CLASS}`,
9696
] as string[]) {
9797
await ClientFunction(() => {
98-
$('#container').append($('<div>').text(`State: ${state}`).css('fontSize', 10));
98+
$('#container').append($('<div>').text(`State: ${state}`).css('fontSize', '10px'));
9999
}, {
100100
dependencies: {
101101
state,

e2e/testcafe-devextreme/tests/editors/overlays/resizeObserverIntegration.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ test('Popup should be centered regarding the container even if content dimension
4545
}).before(async () => createWidget('dxPopup', {
4646
width: 'auto',
4747
height: 'auto',
48-
contentTemplate: () => $('<div>').attr({ id: 'content' }).css({ width: 100, height: 100 }),
48+
contentTemplate: () => $('<div>').attr({ id: 'content' }).css({ width: '100px', height: '100px' }),
4949
}, undefined, { disableFxAnimation: false }));
5050

5151
test('Popup should be centered regarding the container even if popup dimension option is changed during animation', async (t) => {
@@ -84,7 +84,7 @@ test('Popup should be centered regarding the container even if popup dimension o
8484
}).before(async () => createWidget('dxPopup', {
8585
width: 'auto',
8686
height: 'auto',
87-
contentTemplate: () => $('<div>').attr({ id: 'content' }).css({ width: 100, height: 100 }),
87+
contentTemplate: () => $('<div>').attr({ id: 'content' }).css({ width: '100px', height: '100px' }),
8888
}, undefined, { disableFxAnimation: false }));
8989

9090
test('Popup should be centered regarding the container even if content dimension is changed', async (t) => {
@@ -123,7 +123,7 @@ test('Popup should be centered regarding the container even if content dimension
123123
}).before(async () => createWidget('dxPopup', {
124124
width: 'auto',
125125
height: 'auto',
126-
contentTemplate: () => $('<div>').attr({ id: 'content' }).css({ width: 100, height: 100 }),
126+
contentTemplate: () => $('<div>').attr({ id: 'content' }).css({ width: '100px', height: '100px' }),
127127
animation: null,
128128
}, undefined, { disableFxAnimation: false }));
129129

@@ -225,7 +225,7 @@ test('Showing and shown events should be raised only once even after resize duri
225225
}).before(async () => createWidget('dxPopup', {
226226
width: 'auto',
227227
height: 'auto',
228-
contentTemplate: () => $('<div>').attr({ id: 'content' }).css({ width: 100, height: 100 }),
228+
contentTemplate: () => $('<div>').attr({ id: 'content' }).css({ width: '100px', height: '100px' }),
229229
}, undefined, { disableFxAnimation: false })).after(async () => {
230230
await ClientFunction(() => {
231231
delete (window as any).shownCallCount;

e2e/testcafe-devextreme/tests/navigation/drawer/drawer.helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function createDrawer({
2525
opened: true,
2626
height: 400,
2727
template: () => {
28-
const $result = $('<div>').width(200).css('background-color', 'aqua').css('height', '100%');
28+
const $result = $('<div>').width('200px').css('background-color', 'aqua').css('height', '100%');
2929
if (createDrawerContent) {
3030
createDrawerContent($result);
3131
}

0 commit comments

Comments
 (0)