Skip to content

Commit 15ba7e8

Browse files
authored
Merge branch '25_2' into update_jquery_demo
2 parents b179a54 + c6be797 commit 15ba7e8

File tree

1,997 files changed

+20475
-11872
lines changed

Some content is hidden

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

1,997 files changed

+20475
-11872
lines changed

.github/workflows/demos_visual_tests_frameworks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
needs: check-should-run
3636
if: needs.check-should-run.outputs.should-run == 'true'
3737
env:
38-
NODE_OPTIONS: "--max-old-space-size=8192"
38+
NODE_OPTIONS: --max-old-space-size=8192
3939
timeout-minutes: 40
4040

4141
steps:
@@ -152,7 +152,7 @@ jobs:
152152
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'force all tests')
153153
working-directory: apps/demos
154154
env:
155-
NODE_OPTIONS: "--max-old-space-size=8192"
155+
NODE_OPTIONS: --max-old-space-size=8192
156156
run: pnpx nx prepare-bundles
157157

158158
- name: Demos - Run tsc

.github/workflows/qunit_tests.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,15 @@ jobs:
148148
matrix:
149149
constel: [
150150
'ui',
151-
'ui.widgets(1/3)',
152-
'ui.widgets(2/3)',
153-
'ui.widgets(3/3)',
151+
'ui.widgets(1/2)',
152+
'ui.widgets(2/2)',
154153
'ui.editors(1/2)',
155154
'ui.editors(2/2)',
156155
'ui.htmlEditor',
157-
'ui.grid(1/4)',
158-
'ui.grid(2/4)',
159-
'ui.grid(3/4)',
160-
'ui.grid(4/4)',
161-
'ui.scheduler(1/3)',
162-
'ui.scheduler(2/3)',
163-
'ui.scheduler(3/3)',
156+
'ui.grid(1/2)',
157+
'ui.grid(2/2)',
158+
'ui.scheduler(1/2)',
159+
'ui.scheduler(2/2)',
164160
'viz'
165161
]
166162

.github/workflows/testcafe_tests.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ jobs:
7070

7171
- name: Build
7272
shell: bash
73-
run: pnpx nx build devextreme
73+
env:
74+
NODE_OPTIONS: --max-old-space-size=8192
75+
run: pnpx nx build devextreme --uglify
7476

7577
- name: Zip artifacts
7678
working-directory: ./packages/devextreme
@@ -92,18 +94,13 @@ jobs:
9294
fail-fast: false
9395
matrix:
9496
ARGS: [
95-
{ componentFolder: "accessibility", name: "accessibility (1/2)", indices: "1/2" },
96-
{ componentFolder: "accessibility", name: "accessibility (2/2)", indices: "2/2" },
97+
{ componentFolder: "accessibility", name: "accessibility" },
9798
{ componentFolder: "common", name: "common" },
9899

99100
# Grids tests need to be reworked to work in fluent theme
100-
{ componentFolder: "dataGrid/common", name: "dataGrid / common (1/5)", indices: "1/5" },
101-
{ componentFolder: "dataGrid/common", name: "dataGrid / common (2/5)", indices: "2/5" },
102-
{ componentFolder: "dataGrid/common", name: "dataGrid / common (3/5)", indices: "3/5" },
103-
{ componentFolder: "dataGrid/common", name: "dataGrid / common (4/5)", indices: "4/5" },
104-
{ componentFolder: "dataGrid/common", name: "dataGrid / common (5/5)", indices: "5/5" },
105-
{ componentFolder: "dataGrid/sticky", name: "dataGrid / sticky (1/2)", indices: "1/2" },
106-
{ componentFolder: "dataGrid/sticky", name: "dataGrid / sticky (2/2)", indices: "2/2" },
101+
{ componentFolder: "dataGrid", name: "dataGrid (1/3)", indices: "1/3" },
102+
{ componentFolder: "dataGrid", name: "dataGrid (2/3)", indices: "2/3" },
103+
{ componentFolder: "dataGrid", name: "dataGrid (3/3)", indices: "3/3" },
107104
{ componentFolder: "cardView", name: "cardView" },
108105

109106
# Scheduler tests need to be reworked to work in fluent theme
@@ -162,8 +159,8 @@ jobs:
162159
run: |
163160
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
164161
165-
- uses: actions/cache@v4
166-
name: Setup pnpm cache
162+
- uses: actions/cache/restore@v4
163+
name: Restore pnpm cache
167164
with:
168165
path: |
169166
${{ env.STORE_PATH }}
@@ -177,6 +174,8 @@ jobs:
177174

178175
- name: Run TestCafe tests
179176
working-directory: ./e2e/testcafe-devextreme
177+
env:
178+
NODE_OPTIONS: --max-old-space-size=8192
180179
run: |
181180
if [ "${{ matrix.ARGS.theme }}" != "" ]; then
182181
THEME="--theme ${{ matrix.ARGS.theme }}"

apps/demos/Demos/Accordion/Overview/Angular/app/app.component.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@
5757
<div class="option">
5858
<span>Animation duration</span>
5959
<dx-slider [min]="0" [max]="1000" [(value)]="accordion.animationDuration">
60-
<dxo-tooltip [enabled]="true" position="bottom"></dxo-tooltip>
61-
<dxo-label [visible]="true"></dxo-label>
60+
<dxo-slider-tooltip
61+
[enabled]="true"
62+
position="bottom"
63+
></dxo-slider-tooltip>
64+
<dxo-slider-label [visible]="true"></dxo-slider-label>
6265
</dx-slider>
6366
</div>
6467
<div class="option">

apps/demos/Demos/ActionSheet/PopoverMode/Angular/app/app.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<dx-list (onItemClick)="itemClick($event)">
2-
<dxi-item *ngFor="let contact of contacts">
2+
<dxi-list-item *ngFor="let contact of contacts">
33
<div>{{ contact.name }}</div>
44
<div>{{ contact.phone }}</div>
55
<div>{{ contact.email }}</div>
6-
</dxi-item>
6+
</dxi-list-item>
77
</dx-list>
88
<dx-action-sheet
99
[items]="commands"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MockDate.set(new Date('2025/05/05 16:35:10'));
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
const getTimestamp = function (date, offsetMinutes = 0) {
2+
return date.getTime() + offsetMinutes * 60000;
3+
};
4+
5+
const date = new Date();
6+
date.setHours(0, 0, 0, 0);
7+
8+
const currentUser = {
9+
id: 'c94c0e76-fb49-4b9b-8f07-9f93ed93b4f3',
10+
name: 'John Doe',
11+
};
12+
13+
const supportAgent = {
14+
id: 'd16d1a4c-5c67-4e20-b70e-2991c22747c3',
15+
name: 'Support Agent',
16+
avatarUrl: '../../../../images/petersmith.png',
17+
};
18+
19+
const createEmptyAttachment = (name, type) => {
20+
const blob = new Blob([''], { type });
21+
const url = URL.createObjectURL(blob);
22+
23+
return {
24+
name,
25+
url,
26+
size: 1024 * 10,
27+
};
28+
};
29+
30+
const screenshot1 = createEmptyAttachment('Screenshot1.jpg', 'image/jpeg');
31+
const screenshot2 = createEmptyAttachment('Screenshot2.jpg', 'image/jpeg');
32+
const screenshot3 = createEmptyAttachment('Screenshot3.jpg', 'image/jpeg');
33+
const instructions = createEmptyAttachment('Instructions.pdf', 'application/pdf');
34+
35+
const messages = [
36+
{
37+
id: new DevExpress.data.Guid(),
38+
timestamp: getTimestamp(date, -9),
39+
author: supportAgent,
40+
text: 'Hello, John!\nHow can I assist you today?',
41+
},
42+
{
43+
id: new DevExpress.data.Guid(),
44+
timestamp: getTimestamp(date, -7),
45+
author: currentUser,
46+
text: "Hi, I'm having trouble accessing my account.\nIt says my password is incorrect. I’ve attached some screenshots for you to check.",
47+
attachments: [screenshot1, screenshot2, screenshot3],
48+
},
49+
{
50+
id: new DevExpress.data.Guid(),
51+
timestamp: getTimestamp(date, -7),
52+
author: supportAgent,
53+
text: 'Thanks for the screenshots! I can help you with that. Please refer to the attached file for instructions to restore access.',
54+
attachments: [instructions],
55+
},
56+
];
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3+
<head>
4+
<title>DevExtreme Demo</title>
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
8+
<script src="../../../../node_modules/jquery/dist/jquery.min.js"></script>
9+
<link rel="stylesheet" type="text/css" href="../../../../node_modules/devextreme-dist/css/dx.light.css" />
10+
<script src="../../../../node_modules/devextreme-dist/js/dx.all.js"></script>
11+
<link rel="stylesheet" type="text/css" href="styles.css" />
12+
<script src="data.js"></script>
13+
<script src="index.js"></script>
14+
</head>
15+
<body class="dx-viewport">
16+
<div class="demo-container">
17+
<div class="chat-container">
18+
<div id="chat"></div>
19+
</div>
20+
</div>
21+
</body>
22+
</html>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
$(() => {
2+
const customStore = new DevExpress.data.CustomStore({
3+
key: 'id',
4+
load: async () => messages,
5+
insert: async (message) => {
6+
messages.push(message);
7+
return message;
8+
},
9+
});
10+
11+
const dataSource = new DevExpress.data.DataSource({
12+
store: customStore,
13+
paginate: false,
14+
});
15+
16+
const uploadedFilesMap = new Map();
17+
18+
$('#chat').dxChat({
19+
height: 600,
20+
dataSource,
21+
reloadOnChange: false,
22+
user: currentUser,
23+
fileUploaderOptions: {
24+
uploadFile: () => {},
25+
onValueChanged(e) {
26+
e.value.forEach((file) => {
27+
const url = URL.createObjectURL(file);
28+
uploadedFilesMap.set(file.name, url);
29+
});
30+
},
31+
},
32+
onMessageEntered(e) {
33+
const { message } = e;
34+
35+
const attachmentsWithUrls = message.attachments?.map((attachment) => {
36+
const url = uploadedFilesMap.get(attachment.name);
37+
return { ...attachment, url };
38+
});
39+
40+
dataSource.store().push([{
41+
type: 'insert',
42+
data: {
43+
id: new DevExpress.data.Guid(),
44+
...message,
45+
attachments: attachmentsWithUrls,
46+
},
47+
}]);
48+
},
49+
onAttachmentDownloadClick(e) {
50+
const { attachment } = e;
51+
52+
if (!attachment?.url) {
53+
return;
54+
}
55+
56+
const link = document.createElement('a');
57+
link.href = attachment.url;
58+
link.download = attachment.name;
59+
document.body.appendChild(link);
60+
61+
link.click();
62+
63+
document.body.removeChild(link);
64+
},
65+
}).dxChat('instance');
66+
});
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.demo-container {
2+
min-width: 720px;
3+
}
4+
5+
.chat-container {
6+
display: flex;
7+
flex-grow: 1;
8+
align-items: center;
9+
justify-content: center;
10+
}
11+
12+
.dx-chat {
13+
max-width: 480px;
14+
}
15+
16+
.caption {
17+
font-size: var(--dx-font-size-sm);
18+
font-weight: 500;
19+
}
20+
21+
.dx-avatar {
22+
border: 1px solid var(--dx-color-border);
23+
}

0 commit comments

Comments
 (0)