Skip to content

Commit 7313e23

Browse files
Merge branch '25_2' into 25_2_ng_nested_fix
2 parents e5200af + 3c951bc commit 7313e23

File tree

139 files changed

+706
-306
lines changed

Some content is hidden

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

139 files changed

+706
-306
lines changed

apps/demos/.testcaferc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"src": [
3-
"./testing/**/*.test.js"
3+
"./testing/**/*.test.ts"
44
],
55
"screenshots": {
66
"path": "./",

apps/demos/Demos/Calendar/Overview/Angular/app/app.component.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ export class AppComponent {
5555
return day === 0 || day === 6;
5656
}
5757

58+
isHoliday(date: Date) {
59+
return this.holidays.some((item) => date.getDate() === item[0] && date.getMonth() === item[1]);
60+
}
61+
5862
useCellTemplate({ value }) {
5963
this.cellTemplate = value ? 'custom' : 'cell';
6064
}
@@ -68,13 +72,7 @@ export class AppComponent {
6872
} else {
6973
if (this.isWeekend(date)) { cssClass = 'weekend'; }
7074

71-
// eslint-disable-next-line consistent-return
72-
this.holidays.forEach((item) => {
73-
if (date.getDate() === item[0] && date.getMonth() === item[1]) {
74-
cssClass = 'holiday';
75-
return false;
76-
}
77-
});
75+
if (this.isHoliday(date)) { cssClass = 'holiday'; }
7876
}
7977
}
8078

apps/demos/Demos/Calendar/Overview/React/CustomCell.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@ export function isWeekend(date: Date) {
55
return day === 0 || day === 6;
66
}
77

8+
const holidays = [
9+
[1, 0],
10+
[4, 6],
11+
[25, 11],
12+
];
13+
14+
export function isHoliday(date: Date) {
15+
return holidays.some((item) => date.getDate() === item[0] && date.getMonth() === item[1]);
16+
}
17+
818
function getCellCssClass({ date, view }) {
919
let cssClass = '';
10-
const holidays = [
11-
[1, 0],
12-
[4, 6],
13-
[25, 11],
14-
];
1520

1621
if (view === 'month') {
1722
if (!date) {
@@ -21,11 +26,9 @@ function getCellCssClass({ date, view }) {
2126
cssClass = 'weekend';
2227
}
2328

24-
holidays.forEach((item) => {
25-
if (date.getDate() === item[0] && date.getMonth() === item[1]) {
26-
cssClass = 'holiday';
27-
}
28-
});
29+
if (isHoliday(date)) {
30+
cssClass = 'holiday';
31+
}
2932
}
3033
}
3134

apps/demos/Demos/Calendar/Overview/ReactJs/CustomCell.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,26 @@ export function isWeekend(date) {
44
const day = date.getDay();
55
return day === 0 || day === 6;
66
}
7+
const holidays = [
8+
[1, 0],
9+
[4, 6],
10+
[25, 11],
11+
];
12+
export function isHoliday(date) {
13+
return holidays.some((item) => date.getDate() === item[0] && date.getMonth() === item[1]);
14+
}
715
function getCellCssClass({ date, view }) {
816
let cssClass = '';
9-
const holidays = [
10-
[1, 0],
11-
[4, 6],
12-
[25, 11],
13-
];
1417
if (view === 'month') {
1518
if (!date) {
1619
cssClass = 'week-number';
1720
} else {
1821
if (isWeekend(date)) {
1922
cssClass = 'weekend';
2023
}
21-
holidays.forEach((item) => {
22-
if (date.getDate() === item[0] && date.getMonth() === item[1]) {
23-
cssClass = 'holiday';
24-
}
25-
});
24+
if (isHoliday(date)) {
25+
cssClass = 'holiday';
26+
}
2627
}
2728
}
2829
return cssClass;

apps/demos/Demos/Calendar/Overview/Vue/App.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,26 +107,25 @@ function isWeekend(date: Date) {
107107
const day = date.getDay();
108108
return day === 0 || day === 6;
109109
}
110+
const holidays = [[1, 0], [4, 6], [25, 11]];
111+
function isHoliday(date: Date) {
112+
return holidays.some((item) => date.getDate() === item[0] && date.getMonth() === item[1]);
113+
}
110114
111115
function useCellTemplate({ value }: DxCheckBoxTypes.ValueChangedEvent) {
112116
cellTemplate.value = value ? 'custom' : 'cell';
113117
}
114118
115119
function getCellCssClass({ date, view }: { date: Date, view: string }) {
116120
let cssClass = '';
117-
const holidays = [[1, 0], [4, 6], [25, 11]];
118121
119122
if (view === 'month') {
120123
if (!date) {
121124
cssClass = 'week-number';
122125
} else {
123126
if (isWeekend(date)) { cssClass = 'weekend'; }
124127
125-
holidays.forEach((item) => {
126-
if (date.getDate() === item[0] && date.getMonth() === item[1]) {
127-
cssClass = 'holiday';
128-
}
129-
});
128+
if (isHoliday(date)) { cssClass = 'holiday'; }
130129
}
131130
}
132131

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ $(() => {
9494

9595
return day === 0 || day === 6;
9696
}
97+
function isHoliday(d) {
98+
return holidays.some((item) => d.date.getDate() === item[0] && d.date.getMonth() === item[1]);
99+
}
97100

98101
function getCellTemplate(data) {
99102
let cssClass = '';
@@ -104,13 +107,7 @@ $(() => {
104107
} else {
105108
if (isWeekend(data.date)) { cssClass = 'weekend'; }
106109

107-
$.each(holidays, (_, item) => {
108-
if (data.date.getDate() === item[0] && data.date.getMonth() === item[1]) {
109-
cssClass = 'holiday';
110-
return false;
111-
}
112-
return true;
113-
});
110+
if (isHoliday(data.date)) { cssClass = 'holiday'; }
114111
}
115112
}
116113

apps/demos/Demos/Charts/Annotation/Angular/app/app.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
<dxi-annotation
1818
type="text"
1919
text="WWDC 2017"
20-
[argument]="wwdcDate"
20+
[argument]="appleWWDCDate"
2121
description="The Apple Worldwide Developers Conference was held from June 5 to June 9, 2017 at the San Jose Convention Center in San Jose, California, which was the first time since 2002 that the conference took place in the city. Software announcements included iOS 11, watchOS 4, macOS High Sierra, and updates to tvOS. Hardware announcements included updates to iMac, MacBook and MacBook Pro, as well as the new iMac Pro, 10.5-inch iPad Pro and smart speaker HomePod. Fall Out Boy performed at the Bash held in Discovery Meadow on June 8"
2222
></dxi-annotation>
2323
<dxi-annotation
2424
type="text"
2525
text="Apple TV+ announced"
26-
[argument]="tvAnnounceDate"
26+
[argument]="appleTVAnnouncementDate"
2727
description="Apple TV+ is an upcoming over-the-top ad-free subscription video on demand web television service announced by Apple Inc. in 2019 during their March 25 Apple Special Event held at Steve Jobs Theater."
2828
></dxi-annotation>
2929
<dxi-annotation

apps/demos/Demos/Charts/Annotation/Angular/app/app.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ if (window && window.config?.packageConfigPaths) {
2525
export class AppComponent {
2626
dataSource: Data[];
2727

28-
// eslint-disable-next-line spellcheck/spell-checker
29-
wwdcDate = new Date(2017, 5, 5);
28+
appleWWDCDate = new Date(2017, 5, 5);
3029

31-
// eslint-disable-next-line spellcheck/spell-checker
32-
tvAnnounceDate = new Date(2019, 2, 25);
30+
appleTVAnnouncementDate = new Date(2019, 2, 25);
3331

3432
watchReleaseDate = new Date(2015, 3, 24);
3533

apps/demos/Demos/Charts/CustomizePointsAndLabels/Angular/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ export class AppComponent {
3838

3939
return (value < this.lowAverage)
4040
? { color: '#8c8cff', hoverStyle: { color: '#8c8cff' } }
41-
: undefined;
41+
: null;
4242
};
4343

44-
// eslint-disable-next-line consistent-return
4544
customizeLabel: DxChartTypes.Properties['customizeLabel'] = ({ value }) => {
4645
if (value > this.highAverage) {
4746
return {
@@ -50,6 +49,7 @@ export class AppComponent {
5049
customizeText: this.customizeText,
5150
};
5251
}
52+
return null;
5353
};
5454

5555
customizeText: DxChartTypes.ValueAxisLabel['customizeText'] = ({ valueText }) => `${valueText}&#176F`;

apps/demos/Demos/Charts/ExportCustomMarkup/Vue/Form.vue

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<!-- eslint-disable vue/max-len -->
2-
31
<template>
42
<div class="custom_markup_container">
53
<svg
@@ -26,7 +24,11 @@
2624
/>
2725
<text
2826
transform="translate(30,89)"
29-
style="fill: #fff; font-family: 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif; font-size: 36px; font-weight: bold;"
27+
:style="{ fill: '#fff',
28+
fontFamily: fontFamily,
29+
fontSize: '36px',
30+
fontWeight: 'bold',
31+
}"
3032
>
3133
<tspan
3234
x="0"
@@ -43,7 +45,11 @@
4345
</text>
4446
<text
4547
transform="translate(32,199)"
46-
style="opacity: 0.8; fill: #fff; font-family: 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif; font-size: 14px;"
48+
:style="{ opacity: '0.8',
49+
fill: '#fff',
50+
fontFamily: fontFamily,
51+
fontSize: '14px'
52+
}"
4753
>
4854
<tspan
4955
x="0"
@@ -59,6 +65,7 @@
5965
</template>
6066
<script setup lang="ts">
6167
68+
const fontFamily = "'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif";
6269
defineExpose({
6370
getMarkup() {
6471
// @ts-ignore

0 commit comments

Comments
 (0)