Skip to content

Commit 533f58b

Browse files
Merge remote-tracking branch 'my/25_1_ng_nested_fix' into 25_1_ng_nested_fix
2 parents bcf6e0a + b957be4 commit 533f58b

167 files changed

Lines changed: 2508 additions & 2089 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.
-2.06 KB
Loading
-2.34 KB
Loading
-1.46 KB
Loading

e2e/compilation-cases/T1282141.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { CutEvent } from 'devextreme/js/ui/color_box';
2+
import { EVENT_PROPERTIES } from 'devextreme/js/__internal/events/core/m_consts';
3+
4+
type NATIVE_EVENT_ARGS = KeyboardEvent
5+
& PointerEvent
6+
& TouchEvent
7+
& FocusEvent
8+
& WheelEvent
9+
& ClipboardEvent;
10+
11+
type NATIVE_EVENT_ARG_NON_PROPS = Pick<KeyboardEvent,
12+
'getModifierState'
13+
| 'initKeyboardEvent'
14+
| 'DOM_KEY_LOCATION_STANDARD'
15+
| 'DOM_KEY_LOCATION_LEFT'
16+
| 'DOM_KEY_LOCATION_RIGHT'
17+
| 'DOM_KEY_LOCATION_NUMPAD'>
18+
& Pick<UIEvent, 'initUIEvent'>
19+
& Pick<Event,
20+
'composedPath'
21+
| 'initEvent'
22+
| 'preventDefault'
23+
| 'stopImmediatePropagation'
24+
| 'stopPropagation'
25+
| 'NONE'
26+
| 'CAPTURING_PHASE'
27+
| 'AT_TARGET'
28+
| 'BUBBLING_PHASE'>
29+
& Pick<PointerEvent, 'getCoalescedEvents' | 'getPredictedEvents'>
30+
& Pick<MouseEvent, 'initMouseEvent'>
31+
& Pick<WheelEvent, 'DOM_DELTA_PIXEL' | 'DOM_DELTA_LINE' | 'DOM_DELTA_PAGE'>;
32+
33+
type PROPS_ASSIGNED_ELSEWHERE = {
34+
type: string;
35+
isTrusted: boolean;
36+
timeStamp: number;
37+
which: number;
38+
currentTarget: EventTarget | null;
39+
40+
// touch hooks
41+
clientX: number;
42+
clientY: number;
43+
pageX: number;
44+
pageY: number;
45+
screenX: number;
46+
screenY: number;
47+
}
48+
49+
type IGNORED_MEMBERS = NATIVE_EVENT_ARG_NON_PROPS & PROPS_ASSIGNED_ELSEWHERE;
50+
51+
type ASSIGNED_EVENT_ARG_GETTERS = {
52+
[Property in typeof EVENT_PROPERTIES[number]]
53+
};
54+
55+
function fn(): void {
56+
let e: CutEvent = undefined as unknown as CutEvent;
57+
58+
e.event?.originalEvent.clipboardData?.clearData();
59+
60+
let dxGetters = undefined as unknown as ASSIGNED_EVENT_ARG_GETTERS & IGNORED_MEMBERS;
61+
let nativeArgs = undefined as unknown as NATIVE_EVENT_ARGS;
62+
63+
nativeArgs = dxGetters;
64+
}
65+
66+

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,32 @@ test('DataGrid - Scrolling position is reset to far right on an attempt to scrol
18251825
},
18261826
}));
18271827

1828+
// T1280020
1829+
test('DataGrid - The "row" parameter in the FocusedRowChanged event refers to a non-focused row if the grid height is small', async (t) => {
1830+
const dataGrid = new DataGrid('#container');
1831+
const otherContainer = Selector('#otherContainer');
1832+
1833+
await dataGrid.apiOption('focusedRowKey', '2');
1834+
await t.expect(otherContainer.innerText).eql('2');
1835+
1836+
await dataGrid.apiOption('focusedRowKey', '0');
1837+
await t.expect(otherContainer.innerText).eql('0');
1838+
}).before(async () => createWidget('dxDataGrid', {
1839+
height: 70,
1840+
dataSource: [
1841+
{ id: '0' },
1842+
{ id: '1' },
1843+
{ id: '2' },
1844+
],
1845+
scrolling: { mode: 'virtual' },
1846+
keyExpr: 'id',
1847+
focusedRowEnabled: true,
1848+
onFocusedRowChanged(e) {
1849+
const data = e.row?.data;
1850+
$('#otherContainer').text(data.id);
1851+
},
1852+
}));
1853+
18281854
[true, false].forEach((nativeScroll) => {
18291855
type TestCaseWindow = typeof window & { dataGridScrollableEventValues?: number[] };
18301856

e2e/testcafe-devextreme/tests/scheduler/common/dragAndDrop/outlookDragging/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ test('Basic drag-n-drop movements from tooltip in month view', async (t) => {
113113
.ok();
114114

115115
await t
116-
.click(scheduler.collectors.find('1').element)
116+
.click(scheduler.collectors.find('1', 1).element)
117117
.expect(scheduler.appointmentTooltip.isVisible()).ok()
118118
.drag(scheduler.appointmentTooltip.getListItem('Appointment 4').element, 320, 150)
119119
.expect(await takeScreenshot('drag-n-drop-\'Appointment 4\'-from-tooltip-in-month.png', scheduler.workSpace))

e2e/testcafe-devextreme/tests/scheduler/common/rerenderOnResize.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ fixture.disablePageReloads`Re-render on resize`
88
.page(url(__dirname, '../../container.html'));
99

1010
const createScheduler = async (container, options?): Promise<void> => createWidget('dxScheduler', {
11-
...options,
1211
currentDate: new Date(2020, 8, 7),
1312
startDayHour: 8,
1413
endDayHour: 20,
@@ -27,24 +26,34 @@ const createScheduler = async (container, options?): Promise<void> => createWidg
2726
endDate: new Date(2020, 8, 7, 9),
2827
text: 'test',
2928
}],
29+
...options,
3030
}, container);
3131

32-
safeSizeTest('Appointment should re-rendered on window resize when width and height not set (T1139566)', async (t) => {
32+
safeSizeTest('Appointment should re-rendered on window resize-up (T1139566)', async (t) => {
33+
const scheduler = new Scheduler('#container');
34+
const { element } = scheduler.getAppointment('test');
35+
36+
await setStyleAttribute(element, 'background-color: red;');
37+
await t.resizeWindow(800, 400);
38+
await t.expect(await getStyleAttribute(element)).match(/transform: translate\(0px, 0px\); width: 10\d\.\d\d\dpx; height: 50px;/);
39+
}, [400, 400]).before(async () => createScheduler('#container', { currentView: 'workWeek' }));
40+
41+
safeSizeTest('Appointment should not re-rendered on window resize when width and height not set (T1139566)', async (t) => {
3342
const scheduler = new Scheduler('#container');
3443
const { element } = scheduler.getAppointment('test');
3544

3645
await setStyleAttribute(element, 'background-color: red;');
3746
await t.resizeWindow(300, 300);
38-
await t.expect(await getStyleAttribute(element)).eql('transform: translate(0px, 26px); width: 200px; height: 74px;');
47+
await t.expect(await getStyleAttribute(element)).eql('transform: translate(0px, 26px); width: 200px; height: 74px; background-color: red;');
3948
}).before(async () => createScheduler('#container'));
4049

41-
safeSizeTest('Appointment should re-rendered on window resize when width and height have percent value (T1139566)', async (t) => {
50+
safeSizeTest('Appointment should not re-rendered on window resize when width and height have percent value (T1139566)', async (t) => {
4251
const scheduler = new Scheduler('#container');
4352
const { element } = scheduler.getAppointment('test');
4453

4554
await setStyleAttribute(element, 'background-color: red;');
4655
await t.resizeWindow(300, 400);
47-
await t.expect(await getStyleAttribute(element)).eql('transform: translate(0px, 26px); width: 200px; height: 74px;');
56+
await t.expect(await getStyleAttribute(element)).eql('transform: translate(0px, 26px); width: 200px; height: 74px; background-color: red;');
4857
}).before(async () => createScheduler('#container', { width: '100%', height: '100%' }));
4958

5059
safeSizeTest('Appointment should not re-rendered on window resize when width and height have static value (T1139566)', async (t) => {

packages/devextreme-react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"type": "git",
88
"url": "https://github.com/DevExpress/devextreme-react.git"
99
},
10+
"sideEffects": false,
1011
"main": "./cjs/index.js",
1112
"module": "./esm/index.js",
1213
"types": "./cjs/index.d.ts",

packages/devextreme-react/src/autocomplete.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ type IDropDownOptionsProps = React.PropsWithChildren<{
238238
hide?: AnimationConfig;
239239
show?: AnimationConfig;
240240
};
241-
bindingOptions?: Record<string, any>;
242241
container?: any | string | undefined;
243242
contentTemplate?: ((contentElement: any) => string | any) | template;
244243
deferRendering?: boolean;
@@ -461,7 +460,6 @@ const Offset = Object.assign<typeof _componentOffset, NestedComponentMeta>(_comp
461460
type IOptionsProps = React.PropsWithChildren<{
462461
accessKey?: string | undefined;
463462
activeStateEnabled?: boolean;
464-
bindingOptions?: Record<string, any>;
465463
disabled?: boolean;
466464
elementAttr?: Record<string, any>;
467465
focusStateEnabled?: boolean;

packages/devextreme-react/src/card-view.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ const ButtonItem = Object.assign<typeof _componentButtonItem, NestedComponentMet
290290
type IButtonOptionsProps = React.PropsWithChildren<{
291291
accessKey?: string | undefined;
292292
activeStateEnabled?: boolean;
293-
bindingOptions?: Record<string, any>;
294293
disabled?: boolean;
295294
elementAttr?: Record<string, any>;
296295
focusStateEnabled?: boolean;
@@ -1118,7 +1117,6 @@ type IFilterBuilderProps = React.PropsWithChildren<{
11181117
accessKey?: string | undefined;
11191118
activeStateEnabled?: boolean;
11201119
allowHierarchicalFields?: boolean;
1121-
bindingOptions?: Record<string, any>;
11221120
customOperations?: Array<dxFilterBuilderCustomOperation>;
11231121
disabled?: boolean;
11241122
elementAttr?: Record<string, any>;
@@ -1274,7 +1272,6 @@ type IFormProps = React.PropsWithChildren<{
12741272
activeStateEnabled?: boolean;
12751273
alignItemLabels?: boolean;
12761274
alignItemLabelsInAllGroups?: boolean;
1277-
bindingOptions?: Record<string, any>;
12781275
colCount?: Mode | number;
12791276
colCountByScreen?: Record<string, any> | {
12801277
lg?: number | undefined;
@@ -1802,7 +1799,6 @@ type ILoadPanelProps = React.PropsWithChildren<{
18021799
hide?: AnimationConfig;
18031800
show?: AnimationConfig;
18041801
};
1805-
bindingOptions?: Record<string, any>;
18061802
container?: any | string | undefined;
18071803
deferRendering?: boolean;
18081804
delay?: number;
@@ -2497,7 +2493,6 @@ type ITabPanelOptionsProps = React.PropsWithChildren<{
24972493
accessKey?: string | undefined;
24982494
activeStateEnabled?: boolean;
24992495
animationEnabled?: boolean;
2500-
bindingOptions?: Record<string, any>;
25012496
dataSource?: Array<any | dxTabPanelItem | string> | DataSource | DataSourceOptions | null | Store | string;
25022497
deferRendering?: boolean;
25032498
disabled?: boolean;

0 commit comments

Comments
 (0)