Skip to content

Commit ed98419

Browse files
author
pipeline
committed
v22.2.12 is released
1 parent 3935669 commit ed98419

File tree

158 files changed

+1646
-433
lines changed

Some content is hidden

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

158 files changed

+1646
-433
lines changed

controls/base/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
## 22.2.12 (2023-09-05)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- Resolved the issue with offline material theme have google fonts.
12+
513
## 22.2.10 (2023-08-22)
614

715
### Common

controls/base/styles/_material-dark-definition.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
@if not variable-exists('is-roboto-loaded') {
55
//sass-lint:disable no-url-protocols,no-url-domains
6-
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500');// stylelint-disable-line no-invalid-position-at-import-rule
6+
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700');// stylelint-disable-line no-invalid-position-at-import-rule
77
}
88

99
$is-roboto-loaded: 'true' !default;

controls/calendars/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
## [Unreleased]
44

5+
## 22.2.12 (2023-09-05)
6+
7+
### DatePicker
8+
9+
#### Bug Fixes
10+
11+
- `#I491906` - Fixed an issue where the values were not being cleared or changed while the popup was open and the user focus out.
12+
13+
### DateRangePicker
14+
15+
#### Bug Fixes
16+
17+
- `#I491906` - Fixed an issue where the values were not being cleared or changed while the popup was open and the user focus out.
18+
19+
### DateTimePicker
20+
21+
#### Bug Fixes
22+
23+
- `#I491906` - Fixed an issue where the values were not being cleared or changed while the popup was open and the user focus out.
24+
525
## 22.2.11 (2023-08-29)
626

727
### DateRangePicker

controls/calendars/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-calendars",
3-
"version": "22.2.10",
3+
"version": "22.2.11",
44
"description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/calendars/src/datepicker/datepicker.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export class DatePicker extends Calendar implements IInput {
9595
protected touchStart: boolean;
9696
protected iconRight: boolean;
9797
protected isBlur: boolean = false;
98+
private isKeyAction: boolean = false;
9899
/**
99100
* Specifies the width of the DatePicker component.
100101
*
@@ -773,6 +774,7 @@ export class DatePicker extends Calendar implements IInput {
773774
EventHandler.add(this.inputElement, 'mouseup', this.mouseUpHandler, this);
774775
EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
775776
EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
777+
EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);
776778
if (this.enableMask){
777779
EventHandler.add(this.inputElement, 'keydown', this.keydownHandler, this);
778780
}
@@ -832,6 +834,7 @@ export class DatePicker extends Calendar implements IInput {
832834
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
833835
EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
834836
EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
837+
EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);
835838
if (this.enableMask){
836839
EventHandler.remove(this.inputElement, 'keydown', this.keydownHandler);
837840
}
@@ -1523,13 +1526,17 @@ export class DatePicker extends Calendar implements IInput {
15231526
this.isInteracted = true;
15241527
}
15251528
}
1529+
this.isKeyAction = false;
15261530
}
15271531

15281532
protected navigatedEvent(): void {
15291533
this.trigger('navigated', this.navigatedArgs);
15301534
}
1535+
protected keyupHandler(e: KeyboardEventArgs): void {
1536+
this.isKeyAction = (this.inputElement.value !== this.previousElementValue) ? true : false;
1537+
}
15311538
protected changeEvent(event?: MouseEvent | KeyboardEvent | Event): void {
1532-
if (!this.isIconClicked && !this.isBlur) {
1539+
if (!this.isIconClicked && !(this.isBlur || this.isKeyAction)) {
15331540
this.selectCalendar(event);
15341541
}
15351542
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
@@ -1549,6 +1556,7 @@ export class DatePicker extends Calendar implements IInput {
15491556
else if (event) {
15501557
this.hide(event);
15511558
}
1559+
this.isKeyAction = false;
15521560
}
15531561

15541562
public requiredModules(): ModuleDeclaration[] {

controls/calendars/src/daterangepicker/daterangepicker.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ export class DateRangePicker extends CalendarBase {
256256
protected touchRangeModule: Touch;
257257
protected touchRangeStart: boolean;
258258
protected iconRangeRight: string;
259+
private isKeyPressed: boolean = false;
259260

260261
/**
261262
* Gets or sets the start and end date of the Calendar.
@@ -1060,6 +1061,7 @@ export class DateRangePicker extends CalendarBase {
10601061
EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
10611062
EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
10621063
EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);
1064+
EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);
10631065
if (this.showClearButton && this.inputWrapper.clearButton) {
10641066
EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
10651067
}
@@ -1087,6 +1089,7 @@ export class DateRangePicker extends CalendarBase {
10871089
EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
10881090
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
10891091
EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
1092+
EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);
10901093
if (this.showClearButton && this.inputWrapper.clearButton) {
10911094
EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
10921095
}
@@ -3236,6 +3239,9 @@ export class DateRangePicker extends CalendarBase {
32363239
this.startButton.element.classList.add(ACTIVE);
32373240
}
32383241
}
3242+
private keyupHandler(e: KeyboardEventArgs): void {
3243+
this.isKeyPressed = (this.inputElement.value !== this.previousEleValue) ? true : false;
3244+
}
32393245
private applyFunction(eve?: MouseEvent | KeyboardEventArgs): void {
32403246
let isValueChanged: boolean = false;
32413247
if (eve.type !== 'touchstart') {
@@ -3261,7 +3267,10 @@ export class DateRangePicker extends CalendarBase {
32613267
this.previousStartValue = new Date(+this.startValue);
32623268
this.previousEndValue = new Date(+this.endValue);
32633269
this.previousEleValue = this.inputElement.value;
3264-
Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
3270+
if(!this.isKeyPressed){
3271+
Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
3272+
}
3273+
this.isKeyPressed = false;
32653274
if (+this.initStartDate !== +this.startValue || +this.initEndDate !== +this.endValue) {
32663275
isValueChanged = true;
32673276
}

controls/calendars/src/timepicker/timepicker.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ export class TimePicker extends Component<HTMLElement> implements IInput {
14221422
}
14231423
private inputHandler(event: KeyboardEventArgs): void {
14241424
if (!this.readonly && this.enabled) {
1425-
if (!((event.action == 'right' || event.action == 'left' || event.action == 'tab') || ((event.action == 'home' || event.action == 'end') && !this.isPopupOpen()))) {
1425+
if (!((event.action == 'right' || event.action == 'left' || event.action == 'tab') || ((event.action == 'home' || event.action == 'end' || event.action == 'up' || event.action == 'down') && !this.isPopupOpen() && !this.enableMask))) {
14261426
event.preventDefault();
14271427
}
14281428
switch (event.action) {
@@ -2212,7 +2212,9 @@ export class TimePicker extends Component<HTMLElement> implements IInput {
22122212
this.isNavigate = true;
22132213
this.setHover(this.selectedElement, NAVIGATION);
22142214
this.setActiveDescendant();
2215-
this.selectInputText();
2215+
if (this.enableMask) {
2216+
this.selectInputText();
2217+
}
22162218
if (this.isPopupOpen() && this.selectedElement !== null && (!event || event.type !== 'click')) { this.setScrollPosition(); }
22172219
}
22182220
protected getCultureTimeObject(ld: Object, c: string): Object {

controls/charts/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
## 22.2.12 (2023-09-05)
6+
7+
### Chart
8+
9+
#### Bug Fixes
10+
11+
- `#F184251` - Fixed an issue in axis label position when label position set to inside for bar series.
12+
513
## 22.2.11 (2023-08-29)
614

715
### Accumulation chart

controls/charts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-charts",
3-
"version": "22.2.10",
3+
"version": "22.2.11",
44
"description": "Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/charts/src/chart/axis/cartesian-panel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,15 +873,15 @@ export class CartesianAxisLayoutPanel {
873873
pointY = (valueToCoefficient(axis.visibleLabels[i as number].value, axis) * rect.height) + (chart.stockChart ? 7 : 0);
874874
pointY = Math.floor((pointY * -1) + (rect.y + rect.height));
875875
textHeight = ((elementSize.height / 8) * axis.visibleLabels[i as number].text.length / 2);
876-
textPadding = ((elementSize.height / 4) * 3) + 3;
876+
textPadding = chart.requireInvertedAxis ? 0 : ((elementSize.height / 4) * 3) + 3;
877877
intervalLength = rect.height / axis.visibleLabels.length;
878878
labelHeight = ((axis.labelIntersectAction === 'Trim' || axis.labelIntersectAction === 'Wrap') && angle !== 0 &&
879879
elementSize.width > intervalLength) ? intervalLength : elementSize.width;
880880
pointY = (isAxisBreakLabel ? (axis.labelPosition === 'Inside' ? (pointY - (elementSize.height / 2) - textHeight + textPadding)
881881
: (pointY - textHeight)) : (axis.labelPosition === 'Inside' ? pointY + textPadding : pointY));
882882
if (axis.labelPosition === 'Inside' && ((i === 0 && !axis.isInversed) || (i === len - 1 && axis.isInversed))) {
883883
if (chart.stockChart) { pointY -= (textPadding); }
884-
else { pointY -= (textPadding - (axis.opposedPosition ? -padding : padding)); }
884+
else { pointY -= (textPadding - (chart.requireInvertedAxis ? 0 : (axis.opposedPosition ? -padding : padding))); }
885885
}
886886
if (axis.majorGridLines.width > axis.majorTickLines.width) {
887887
maxLineWidth = axis.majorGridLines.width;

controls/charts/src/chart/user-interaction/tooltip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export class Tooltip extends BaseTooltip {
299299
const point: Points[] = [];
300300
for (let i: number = 0; i < data.length; i++) {
301301
point[i as number] = extend({}, data[i as number].point) as Points;
302-
point[i as number].x = this.formatPointValue(data[1].point, data[1].series.xAxis, 'x', true, false);
302+
point[i as number].x = this.formatPointValue(data[i as number].point, data[i as number].series.xAxis, 'x', true, false);
303303
if ((data[i as number].series.seriesType === 'XY')) {
304304
point[i as number].y = this.formatPointValue(data[i as number].point, data[i as number].series.yAxis, 'y', false, true);
305305
} else {

controls/diagrams/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
## [Unreleased]
44

5+
## 22.2.12 (2023-09-05)
6+
7+
### Diagram
8+
9+
#### Bug Fixes
10+
11+
- `#I469741` - Now, group node rotation and undo working properly.
12+
- `#F184075` - Now, BPMN node subtype visibles whiles changing the node visibility issue is resolved.
13+
- `#I489954` - Now, Connectors are routed correctly while enable routing set as true.
14+
- `#I493510` -Now, Expand and collapse working properly at runtime.
15+
- `#I490046` - In the positionChange event, during the completed state, old and new values remain identical issue is resolved.
16+
517
## 22.2.11 (2023-08-29)
618

719
### Diagram

controls/diagrams/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-diagrams",
3-
"version": "22.2.10",
3+
"version": "22.2.11",
44
"description": "Feature-rich diagram control to create diagrams like flow charts, organizational charts, mind maps, and BPMN diagrams. Its rich feature set includes built-in shapes, editing, serializing, exporting, printing, overview, data binding, and automatic layouts.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/diagrams/spec/diagram/interaction/events.spec.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,54 @@ describe('Mouse Enter, Mouse Over event does not get triggered for selected item
11401140
done();
11411141
});
11421142
});
1143+
describe('positionChange event in completed state', () => {
1144+
let diagram: Diagram;
1145+
let ele: HTMLElement;
1146+
let getNewValue;
1147+
let getOldValue;
1148+
let mouseEvents: MouseEvents = new MouseEvents();
1149+
beforeAll((): void => {
1150+
const isDef = (o: any) => o !== undefined && o !== null;
1151+
if (!isDef(window.performance)) {
1152+
console.log("Unsupported environment, window.performance.memory is unavailable");
1153+
this.skip(); //Skips test (in Chai)
1154+
return;
1155+
}
1156+
ele = createElement('div', { id: 'positionChange' });
1157+
document.body.appendChild(ele);
1158+
let node: NodeModel = {
1159+
id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100,
1160+
annotations: [{ content: 'Node1' }]
1161+
};
1162+
diagram = new Diagram({ width: '1000px', height: '1000px', nodes: [node] });
1163+
diagram.appendTo('#positionChange');
1164+
});
1165+
1166+
afterAll((): void => {
1167+
diagram.destroy();
1168+
ele.remove();
1169+
});
1170+
1171+
it('Checking diagram instance creation', (done: Function) => {
1172+
let diagramCanvas: HTMLElement = document.getElementById(diagram.element.id + 'content');
1173+
mouseEvents.clickEvent(diagramCanvas, 100, 100);
1174+
mouseEvents.mouseUpEvent(diagramCanvas, 100, 100);
1175+
mouseEvents.mouseMoveEvent(diagramCanvas, 120, 100);
1176+
mouseEvents.mouseMoveEvent(diagramCanvas, 140, 100);
1177+
mouseEvents.mouseMoveEvent(diagramCanvas, 160, 100);
1178+
mouseEvents.mouseDownEvent(diagramCanvas, 160, 100);
1179+
diagram.positionChange = (args : IDraggingEventArgs) =>{
1180+
if(args.state === "Completed"){
1181+
expect(args.newValue.offsetX !== args.oldValue.offsetX).toBe(true);
1182+
expect(args.newValue.offsetY !== args.oldValue.offsetY).toBe(true);
1183+
expect(args.oldValue.offsetX == 100).toBe(true);
1184+
expect(args.oldValue.offsetY == 100).toBe(true);
1185+
expect(args.newValue.offsetX == 160).toBe(true);
1186+
expect(args.newValue.offsetY == 100).toBe(true);
1187+
}
1188+
};
1189+
});
1190+
});
11431191
describe('SourcePointChange and TargetPointChange Event on node dragging', () => {
11441192
let diagram: Diagram;
11451193
let ele: HTMLElement;

controls/diagrams/spec/diagram/objects/bpmnshapesDataObject.spec.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ShadowModel, RadialGradientModel, StopModel } from '../../../src/diagra
66
import { Canvas } from '../../../src/diagram/core/containers/canvas';
77
import { BpmnDiagrams } from '../../../src/diagram/objects/bpmn';
88
import {profile , inMB, getMemoryProfile} from '../../../spec/common.spec';
9+
import { BpmnShape, Container } from '../../../src';
910
Diagram.Inject(BpmnDiagrams);
1011

1112
/**
@@ -200,7 +201,63 @@ describe('Diagram Control', () => {
200201
})
201202
});
202203
});
204+
describe('BPMN dataobject node visibility issue', () => {
205+
let diagram: Diagram;
206+
let ele: HTMLElement;
203207

208+
beforeAll((): void => {
209+
const isDef = (o: any) => o !== undefined && o !== null;
210+
if (!isDef(window.performance)) {
211+
console.log("Unsupported environment, window.performance.memory is unavailable");
212+
this.skip(); //Skips test (in Chai)
213+
return;
214+
}
215+
ele = createElement('div', { id: 'diagram1' });
216+
document.body.appendChild(ele);
217+
218+
let nodes: NodeModel[] = [
219+
{
220+
id: 'subProcess', width: 520, height: 250, offsetX: 300, offsetY: 100,
221+
shape: { type: 'Bpmn', shape: 'DataObject'}
222+
} ,
223+
224+
];
225+
diagram = new Diagram({
226+
width: '74%', height: '600px', nodes: nodes,
227+
});
228+
diagram.appendTo('#diagram1');
229+
});
230+
231+
afterAll((): void => {
232+
diagram.destroy();
233+
ele.remove();
234+
});
235+
236+
it('BPMN dataObject after visibility true and false', (done: Function) => {
237+
diagram.nodes[0].visible = false;
238+
diagram.dataBind();
239+
diagram.nodes[0].visible = true;
240+
diagram.dataBind();
241+
expect((diagram.nodes[0].wrapper.children[0] as Container).children[2].visible === false).toBe(true);
242+
expect((diagram.nodes[0].wrapper.children[0] as Container).children[1].visible === false).toBe(true);
243+
(diagram.nodes[0].shape as BpmnShape).dataObject = { type : 'Input', collection : false};
244+
diagram.dataBind();
245+
diagram.nodes[0].visible = false;
246+
diagram.dataBind();
247+
diagram.nodes[0].visible = true;
248+
diagram.dataBind();
249+
expect((diagram.nodes[0].wrapper.children[0] as Container).children[2].visible === false).toBe(true);
250+
(diagram.nodes[0].shape as BpmnShape).dataObject = { type : 'None', collection : true};
251+
diagram.dataBind();
252+
diagram.nodes[0].visible = false;
253+
diagram.dataBind();
254+
diagram.nodes[0].visible = true;
255+
diagram.dataBind();
256+
expect((diagram.nodes[0].wrapper.children[0] as Container).children[1].visible === false).toBe(true);
257+
done();
258+
});
259+
260+
});
204261
describe('BPMN shapes', () => {
205262
describe('Changing of BPMN Shapes from one to another', () => {
206263
let diagram: Diagram;

0 commit comments

Comments
 (0)