Skip to content

Commit 85883b6

Browse files
Merge branch '26_1' into 26_1_dx_scss_nx_infra_p
2 parents 4620d41 + 2fb4ba4 commit 85883b6

7 files changed

Lines changed: 306 additions & 1019 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This demo creates a new appointment from a multi-cell selection. Click and drag across two or more time cells to select a range. The Scheduler opens the appointment popup pre-filled with the corresponding start date, end date, and resource group.
2+
3+
<!--split-->
4+
5+
The Scheduler raises the [onSelectionEnd](/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#onSelectionEnd) event when a user finishes selecting cells. The event's `selectedCellData` array contains one object per selected cell, each with `startDate`, `endDate`, `allDay`, and group field values.
6+
7+
In this demo, the event handler ignores single-cell selection and passes a new appointment object built from the first and last cell in the selection to the [showAppointmentPopup](/Documentation/ApiReference/UI_Components/dxScheduler/Methods/#showAppointmentPopupappointmentData-createNewAppointment-appointmentElement) method.

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

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ import { isMaterial, isMaterialBased, testScreenshot } from '../../../helpers/th
77
import url from '../../../helpers/getPageUrl';
88
import { createWidget } from '../../../helpers/createWidget';
99
import {
10-
appendElementTo, insertStylesheetRulesToPage, setStyleAttribute,
10+
appendElementTo, insertStylesheetRulesToPage, removeStylesheetRulesFromPage, setStyleAttribute,
1111
} from '../../../helpers/domUtils';
1212

1313
const LOOKUP_FIELD_CLASS = 'dx-lookup-field';
1414
const OVERLAY_CLASS = 'dx-overlay-content';
1515

16+
const LOADINDICATOR_SEGMENT_CLASS = 'dx-loadindicator-segment';
17+
const LOADINDICATOR_CONTENT_CLASS = 'dx-loadindicator-content';
18+
const LOADINDICATOR_ICON_CLASS = 'dx-loadindicator-icon';
19+
const LOADINDICATOR_SEGMENT_INNER_CLASS = 'dx-loadindicator-segment-inner';
20+
1621
const stylingModes = ['outlined', 'underlined', 'filled'];
1722
const labelModes = ['static', 'floating', 'hidden', 'outside'];
1823

@@ -98,7 +103,7 @@ test.meta({ browserSize: [300, 400] })('Check popup height with no found data op
98103
.ok(compareResults.errorMessages());
99104
}).before(async () => createWidget('dxLookup', { dataSource: [], searchEnabled: true }));
100105

101-
test.meta({ browserSize: [300, 400], unstable: true })('Check popup height in loading state', async (t) => {
106+
test.meta({ browserSize: [300, 400] })('Check popup height in loading state', async (t) => {
102107
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
103108

104109
await t.click(Selector(`.${LOOKUP_FIELD_CLASS}`));
@@ -109,19 +114,30 @@ test.meta({ browserSize: [300, 400], unstable: true })('Check popup height in lo
109114
await t
110115
.expect(compareResults.isValid())
111116
.ok(compareResults.errorMessages());
112-
}).before(async () => createWidget('dxLookup', {
113-
dataSource: {
114-
load() {
115-
return new Promise((resolve) => {
116-
setTimeout(() => {
117-
resolve([1, 2, 3]);
118-
}, 5000);
119-
});
117+
}).before(async () => {
118+
await insertStylesheetRulesToPage(`
119+
.${LOADINDICATOR_SEGMENT_CLASS},
120+
.${LOADINDICATOR_CONTENT_CLASS},
121+
.${LOADINDICATOR_ICON_CLASS},
122+
.${LOADINDICATOR_SEGMENT_INNER_CLASS} {
123+
animation: none !important;
124+
}
125+
`);
126+
127+
return createWidget('dxLookup', {
128+
dataSource: {
129+
load() {
130+
return new Promise((resolve) => {
131+
setTimeout(() => {
132+
resolve([1, 2, 3]);
133+
}, 5000);
134+
});
135+
},
120136
},
121-
},
122-
valueExpr: 'id',
123-
displayExpr: 'text',
124-
}));
137+
valueExpr: 'id',
138+
displayExpr: 'text',
139+
});
140+
}).after(async () => removeStylesheetRulesFromPage());
125141

126142
test('Lookup appearance', async (t) => {
127143
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

packages/devextreme/js/__internal/ui/chat/suggestions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ class Suggestions {
4040
}
4141

4242
private _initButtonGroup(options: SuggestionsOptions = {}): void {
43-
if (this._hasOptions(options) && this._$element) {
43+
if (this._hasItems(options) && this._$element) {
4444
this._$element.addClass(CHAT_SUGGESTIONS_CLASS);
4545
this._buttonGroup = new ButtonGroup(this._$element.get(0), this._getConfiguration(options));
4646
}
4747
}
4848

49-
private _hasOptions(options: SuggestionsOptions | undefined): boolean {
50-
return Boolean(Object.keys(options ?? {}).length);
49+
private _hasItems(options: SuggestionsOptions | undefined): boolean {
50+
return Boolean(options?.items?.length);
5151
}
5252

5353
updateOptions(options: SuggestionsOptions | undefined): void {
54-
if (!this._hasOptions(options)) {
54+
if (!this._hasItems(options)) {
5555
this.clean();
5656
return;
5757
}

packages/devextreme/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
"build:community-localization": "gulp generate-community-locales",
244244
"build:systemjs": "gulp transpile-systemjs",
245245
"dev": "cross-env DEVEXTREME_TEST_CI=true gulp dev",
246+
"dev:playground": "vite",
246247
"dev:watch": "cross-env DEVEXTREME_TEST_CI=true gulp dev-watch",
247248
"transpile-tests": "gulp transpile-tests",
248249
"update-ts-reexports": "dx-tools generate-reexports --sources ./js --exclude \"((dialog|export|list_light|notify|overlay|palette|set_template_engine|splitter_control|themes|themes_callback|track_bar|utils|validation_engine|validation_message)[.d.ts])\" --compiler-options \"{ \\\"typeRoots\\\": [] }\"",
@@ -251,7 +252,6 @@
251252
"validate-ts": "gulp validate-ts",
252253
"validate-declarations": "dx-tools validate-declarations --sources ./js --exclude \"js/(renovation|__internal|.eslintrc.js)\" --compiler-options \"{ \\\"typeRoots\\\": [] }\"",
253254
"testcafe-in-docker": "docker build -f ./testing/testcafe/docker/Dockerfile -t testcafe-testing . && docker run -it testcafe-testing",
254-
"dev:playground": "vite",
255255
"test-jest": "cross-env NODE_OPTIONS='--expose-gc' jest --no-coverage --runInBand --selectProjects jsdom-tests",
256256
"test-jest:watch": "jest --watch",
257257
"test-jest:node": "jest --no-coverage --runInBand --selectProjects node-tests",

packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/suggestions.tests.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ QUnit.module('Suggestions', moduleConfig, () => {
5353
assert.strictEqual(this.getItems().length, 1, 'item rendered correctly');
5454
});
5555

56-
QUnit.test('should update items to empty list', function(assert) {
56+
QUnit.test('should clean ButtonGroup when items is empty array', function(assert) {
5757
this.instance.updateOptions({ items: [] });
5858

59-
const $items = this.getItems();
60-
61-
assert.strictEqual($items.length, 0, 'all items removed');
59+
assert.strictEqual(this.getItems().length, 0, 'all items removed');
60+
assert.strictEqual(this.getSuggestions().hasClass(BUTTON_GROUP_CLASS), false, 'ButtonGroup is cleaned');
6261
});
6362

6463
QUnit.test('should clean ButtonGroup when called with undefined', function(assert) {

packages/sbom/package.json

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,5 @@
55
"devDependencies": {
66
"@devexpress/sbom-toolkit": "0.6.1"
77
},
8-
"packageManager": "pnpm@9.15.9",
9-
"pnpm": {
10-
"overrides": {
11-
"@isaacs/brace-expansion@<=5.0.0": "^5.0.1",
12-
"body-parser@>=2.2.0 <2.2.1": ">=2.2.1",
13-
"jws@=4.0.0": ">=4.0.1",
14-
"minimatch@>=10.0.0 <10.2.3": "^10.2.4",
15-
"picomatch@>=2.0.0 <2.3.2": "2.3.2",
16-
"picomatch@>=4.0.0 <4.0.4": "4.0.4",
17-
"qs": ">=6.14.1",
18-
"tar@<=7.5.9": "^7.5.10",
19-
"undici@<7.24.0": "^7.24.0"
20-
}
21-
}
8+
"packageManager": "pnpm@9.15.9"
229
}

0 commit comments

Comments
 (0)