Skip to content

Commit e97d9f3

Browse files
author
pipeline
committed
v19.1.58 is released
1 parent aba61c8 commit e97d9f3

File tree

221 files changed

+4491
-2086
lines changed

Some content is hidden

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

221 files changed

+4491
-2086
lines changed

controls/barcodegenerator/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 19.1.57 (2021-04-20)
5+
## 19.1.58 (2021-04-27)
66

77
### Barcode
88

controls/base/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-base",
3-
"version": "19.1.56",
3+
"version": "19.1.57",
44
"description": "A common package of Essential JS 2 base libraries, methods and class definitions",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/calendars/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-calendars",
3-
"version": "19.1.55",
3+
"version": "19.1.56",
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/circulargauge/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
## [Unreleased]
66

7+
## 19.1.58 (2021-04-27)
8+
9+
### CircularGauge
10+
11+
#### Bug Fixes
12+
13+
- `#324756` - If numeric content is set, the text style of the annotation content will now be applied correctly.
14+
715
## 19.1.55 (2021-04-06)
816

917
### CircularGauge

controls/circulargauge/spec/circulargauge/annotation/annotation.spec.ts

+23
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,29 @@ describe('Circular-Gauge Control', () => {
6161
gauge.refresh();
6262
});
6363

64+
it('checking annotation numeric text', (done: Function) => {
65+
gauge.loaded = (args: ILoadedEventArgs): void => {
66+
svg = document.getElementById('container_Secondary_Element');
67+
expect(svg.childElementCount == 1).toBe(true);
68+
svg = document.getElementById('container_Annotations_0');
69+
expect(svg.textContent).toBe('30');
70+
svg = document.getElementById('container_Axis_0_Annotation_0');
71+
expect(svg.childElementCount == 1).toBe(true);
72+
expect(svg.children[0]['style'].color).toBe("red");
73+
expect(svg.children[0]['style']["font-size"]).toBe("50px");
74+
expect(svg.children[0]['style']["font-family"]).toBe("Roboto");
75+
done();
76+
};
77+
gauge.axes[0].annotations[0].content = '30';
78+
gauge.axes[0].annotations[0].textStyle = {
79+
size: "50px",
80+
color: "red",
81+
fontFamily: "Roboto",
82+
fontStyle: "Regular"
83+
}
84+
gauge.refresh();
85+
})
86+
6487
it('checking annotation template', (done: Function) => {
6588
gauge.loaded = (args: ILoadedEventArgs): void => {
6689
svg = document.getElementById('container_Secondary_Element');

controls/circulargauge/src/circular-gauge/utils/helper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ export function getTemplateFunction(template: string, gauge: CircularGauge): any
819819
template = numb ? template.replace(numb, '') : template;
820820
template = template.indexOf('/') !== -1 ? template.replace('/', '') : template;
821821
}
822-
if (document.querySelectorAll(template).length) {
822+
if (isNaN(parseFloat(template)) && document.querySelectorAll(template).length) {
823823
if ((template.charAt(0) !== 'a' || template.charAt(0) !== 'A') && template.length !== 1) {
824824
templateFn = templateComplier(document.querySelector(template).innerHTML.trim());
825825
}

controls/compression/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 19.1.57 (2021-04-20)
5+
## 19.1.58 (2021-04-27)
66

77
### Compression
88

controls/data/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 19.1.57 (2021-04-20)
5+
## 19.1.58 (2021-04-27)
66

77
### DataManager
88

controls/diagrams/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
- `F164350` - The issue "Annotation hyper link is not working" has been fixed.
1212
- `#319911` - The issue "Customized style disappears when serializing the BPMN shapes" has been fixed.
13+
- `#321939` - The issue "Swimlane send to back node working" has been fixed.
14+
- `#322854` - The issue "Swimlane children disappear while performing the order commands" has been fixed.
15+
- `#323203` - The issue "Exception occurs when try to redo the node's gradient color" has been fixed.
1316

1417
## 19.1.56 (2021-04-13)
1518

controls/diagrams/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-diagrams",
3-
"version": "19.1.56",
3+
"version": "19.1.57",
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/diagram/pagesettings.spec.ts

+262-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ConnectorModel } from '../../../src/diagram/objects/connector-model';
55
import { NodeModel } from '../../../src/diagram/objects/node-model';
66
import { BpmnDiagrams } from '../../../src/diagram/objects/bpmn';
77
import { DiagramScroller } from '../../../src/diagram/interaction/scroller';
8-
import { Rect } from '../../../src/index';
8+
import { LayerModel, Rect } from '../../../src/index';
99
import { MouseEvents } from '../../../spec/diagram/interaction/mouseevents.spec';
1010
import { profile, inMB, getMemoryProfile } from '../../../spec/common.spec';
1111
Diagram.Inject(BpmnDiagrams);
@@ -521,7 +521,7 @@ describe('PageSettings boundary constraints', () => {
521521
diagram.pageSettings.boundaryConstraints = 'Page';
522522
diagram.drawingObject = { id: 'connector11', type: 'Straight' };
523523
mouseEvents.dragAndDropEvent(diagramCanvas, 250, 400, 250, 520);
524-
expect((diagram.connectors[2].targetPoint.y === 392)|| diagram.connectors[2].targetPoint.y === 400).toBe(true);
524+
expect((diagram.connectors[2].targetPoint.y === 392) || diagram.connectors[2].targetPoint.y === 400).toBe(true);
525525
done();
526526
});
527527
it('branch coverage for drag', (done: Function) => {
@@ -782,3 +782,263 @@ describe('BPMN Shape Style Change', () => {
782782
done();
783783
});
784784
})
785+
786+
describe('Node undo-redo style change', () => {
787+
let diagram: Diagram;
788+
let ele: HTMLElement;
789+
let scroller: DiagramScroller;
790+
let mouseEvents: MouseEvents = new MouseEvents();
791+
beforeAll((): void => {
792+
const isDef = (o: any) => o !== undefined && o !== null;
793+
if (!isDef(window.performance)) {
794+
console.log("Unsupported environment, window.performance.memory is unavailable");
795+
this.skip(); //Skips test (in Chai)
796+
return;
797+
}
798+
799+
ele = createElement('div', { id: 'diagram' });
800+
document.body.appendChild(ele);
801+
let node: NodeModel = {
802+
id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100,
803+
};
804+
diagram = new Diagram({
805+
width: 800, height: 800, nodes: [node],
806+
});
807+
diagram.appendTo('#diagram');
808+
809+
});
810+
afterAll((): void => {
811+
diagram.destroy();
812+
ele.remove();
813+
});
814+
it('Check node color after undo and redo', (done: Function) => {
815+
diagram.nodes[0].style = {
816+
fill: '#d8ecdc',
817+
strokeColor: '#78BE83',
818+
strokeWidth: 3,
819+
gradient: {
820+
// Start point of linear gradient
821+
x1: 0,
822+
y1: 0,
823+
// End point of linear gradient
824+
x2: 100,
825+
y2: 100,
826+
// Sets an array of stop objects
827+
stops: [
828+
{
829+
color: 'white',
830+
offset: 30,
831+
opacity: 0.1
832+
},
833+
{
834+
color: '#d8ecdc',
835+
offset: 100,
836+
opacity: 0.1
837+
}
838+
],
839+
type: 'Linear'
840+
}
841+
};
842+
diagram.dataBind();
843+
diagram.undo();
844+
expect(diagram.nodes[0].style.fill === "white").toBe(true);
845+
diagram.redo();
846+
expect(diagram.nodes[0].style.fill === "#d8ecdc").toBe(true);
847+
done();
848+
});
849+
it('Add layer', (done: Function) => {
850+
var newNode = {
851+
id: 'new', offsetX: 300, offsetY: 300, height: 50, width: 50
852+
}
853+
diagram.addLayer({ objects: [], visible: true }, [newNode]);
854+
expect(diagram.layers.length === 2).toBe(true);
855+
done();
856+
});
857+
it('Remove layer', (done: Function) => {
858+
diagram.removeLayer(diagram.layers[1].id);
859+
expect(diagram.layers.length === 1).toBe(true);
860+
done();
861+
});
862+
})
863+
describe('Swimlane child disappears', () => {
864+
let diagram: Diagram;
865+
let ele: HTMLElement;
866+
let scroller: DiagramScroller;
867+
let mouseEvents: MouseEvents = new MouseEvents();
868+
beforeAll((): void => {
869+
const isDef = (o: any) => o !== undefined && o !== null;
870+
if (!isDef(window.performance)) {
871+
console.log("Unsupported environment, window.performance.memory is unavailable");
872+
this.skip(); //Skips test (in Chai)
873+
return;
874+
}
875+
876+
ele = createElement('div', { id: 'diagramlane' });
877+
document.body.appendChild(ele);
878+
let nodes: NodeModel[] = [
879+
{
880+
id: 'swimlane',
881+
shape: {
882+
type: 'SwimLane',
883+
orientation: 'Horizontal',
884+
header: {
885+
annotation: { content: 'ONLINE PURCHASE STATUS', style: { fill: '#111111' } },
886+
height: 50, style: { fontSize: 11 },
887+
},
888+
lanes: [
889+
{
890+
id: 'stackCanvas1',
891+
header: {
892+
annotation: { content: 'CUSTOMER' }, width: 50,
893+
style: { fontSize: 11 }
894+
},
895+
height: 100,
896+
children: [
897+
{
898+
id: 'Order',
899+
annotations: [
900+
{
901+
content: 'ORDER',
902+
style: { fontSize: 11 }
903+
}
904+
],
905+
margin: { left: 60, top: 20 },
906+
height: 40, width: 100
907+
},
908+
{
909+
id: 'selectItemaddcart',
910+
annotations: [{ content: 'Select item\nAdd cart' }],
911+
margin: { left: 190, top: 20 },
912+
height: 40, width: 100
913+
},
914+
],
915+
},
916+
917+
],
918+
919+
},
920+
offsetX: 420, offsetY: 270,
921+
height: 100,
922+
width: 650
923+
},
924+
];
925+
let connectors: ConnectorModel[] = [
926+
{
927+
id: 'connector1', sourceID: 'Order',
928+
targetID: 'selectItemaddcart'
929+
},
930+
931+
];
932+
diagram = new Diagram({
933+
width: 800, height: 800, nodes: nodes,
934+
connectors: connectors
935+
});
936+
diagram.appendTo('#diagramlane');
937+
938+
});
939+
afterAll((): void => {
940+
diagram.destroy();
941+
ele.remove();
942+
});
943+
it('Send swimlane child back and Check lane selection', (done: Function) => {
944+
diagram.select([diagram.getObject('Order')]);
945+
diagram.sendToBack();
946+
diagram.clearSelection();
947+
let diagramCanvas: HTMLElement = document.getElementById(diagram.element.id + 'content');
948+
mouseEvents.clickEvent(diagramCanvas, 200, 300);
949+
expect(diagram.selectedItems.nodes[0].id === "swimlanestackCanvas10").toBe(true);
950+
done();
951+
});
952+
})
953+
describe('Swimlane send to back', () => {
954+
let diagram: Diagram;
955+
let ele: HTMLElement;
956+
let scroller: DiagramScroller;
957+
let mouseEvents: MouseEvents = new MouseEvents();
958+
beforeAll((): void => {
959+
const isDef = (o: any) => o !== undefined && o !== null;
960+
if (!isDef(window.performance)) {
961+
console.log("Unsupported environment, window.performance.memory is unavailable");
962+
this.skip(); //Skips test (in Chai)
963+
return;
964+
}
965+
966+
ele = createElement('div', { id: 'diagramlane' });
967+
document.body.appendChild(ele);
968+
let nodes: NodeModel[] = [
969+
{
970+
id: 'swimlane',
971+
shape: {
972+
type: 'SwimLane',
973+
orientation: 'Horizontal',
974+
header: {
975+
annotation: { content: 'ONLINE PURCHASE STATUS', style: { fill: '#111111' } },
976+
height: 50, style: { fontSize: 11 },
977+
},
978+
lanes: [
979+
{
980+
id: 'stackCanvas1',
981+
header: {
982+
annotation: { content: 'CUSTOMER' }, width: 50,
983+
style: { fontSize: 11 }
984+
},
985+
height: 100,
986+
children: [
987+
{
988+
id: 'Order',
989+
annotations: [
990+
{
991+
content: 'ORDER',
992+
style: { fontSize: 11 }
993+
}
994+
],
995+
margin: { left: 60, top: 20 },
996+
height: 40, width: 100
997+
},
998+
{
999+
id: 'selectItemaddcart',
1000+
annotations: [{ content: 'Select item\nAdd cart' }],
1001+
margin: { left: 190, top: 20 },
1002+
height: 40, width: 100
1003+
},
1004+
],
1005+
},
1006+
1007+
],
1008+
1009+
},
1010+
offsetX: 420, offsetY: 270,
1011+
height: 100,
1012+
width: 650
1013+
},
1014+
];
1015+
let connectors: ConnectorModel[] = [
1016+
{
1017+
id: 'connector1', sourceID: 'Order',
1018+
targetID: 'selectItemaddcart'
1019+
},
1020+
1021+
];
1022+
diagram = new Diagram({
1023+
width: 800, height: 800, nodes: nodes,
1024+
connectors: connectors
1025+
});
1026+
diagram.appendTo('#diagramlane');
1027+
1028+
});
1029+
afterAll((): void => {
1030+
diagram.destroy();
1031+
ele.remove();
1032+
});
1033+
it('Send swimlane back and check 1st index swimlane got selected', (done: Function) => {
1034+
diagram.select([diagram.getObject('swimlane')]);
1035+
diagram.copy();
1036+
diagram.paste();
1037+
diagram.sendToBack();
1038+
diagram.clearSelection();
1039+
let diagramCanvas: HTMLElement = document.getElementById(diagram.element.id + 'content');
1040+
mouseEvents.clickEvent(diagramCanvas, 550, 300);
1041+
expect(diagram.selectedItems.nodes[0].id === "swimlanestackCanvas10").toBe(true);
1042+
done();
1043+
});
1044+
})

0 commit comments

Comments
 (0)