Skip to content

Commit 3a34bee

Browse files
author
pipeline
committed
v1.0.0 is released
1 parent cc7a5ec commit 3a34bee

File tree

7 files changed

+69
-171
lines changed

7 files changed

+69
-171
lines changed

ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Essential JS 2
22

3-
Essential JS 2 is a modern JavaScript UI toolkit that has been the built from the ground up to be lightweight, responsive, modular and touch friendly. It is written in TypeScript and has no external dependences. It also includes complete support for Angular.
3+
Essential JS 2 is a modern JavaScript UI toolkit that has been the built from the ground up to be lightweight, responsive, modular and touch friendly. It is written in TypeScript and has no external dependences.
44

55
## Resources
66
* [Pure JS Demos](http://ej2.syncfusion.com/demos/)

dist/global/calendar/calendar.js

Lines changed: 15 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -323,25 +323,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
323323
}
324324
Calendar.prototype.render = function () {
325325
this.globalize = new ej2_base_1.Internationalization(this.locale);
326-
if (this.getModuleName() === 'calendar') {
327-
this.element.classList.add(ROOT);
328-
if (this.enableRtl) {
329-
this.element.classList.add(RTL);
330-
}
331-
dom_1.attributes(this.element, {
332-
'role': 'calendar'
333-
});
334-
}
335-
else {
336-
this.baseElement = dom_1.createElement('div');
337-
this.baseElement.classList.add(ROOT);
338-
if (this.enableRtl) {
339-
this.baseElement.classList.add(RTL);
340-
}
341-
dom_1.attributes(this.baseElement, {
342-
'role': 'calendar'
343-
});
326+
this.element.classList.add(ROOT);
327+
if (this.enableRtl) {
328+
this.element.classList.add(RTL);
344329
}
330+
dom_1.attributes(this.element, {
331+
'role': 'calendar'
332+
});
345333
this.aniObj = new ej2_base_4.Animation(this.animateOptions);
346334
this.processDate();
347335
this.header();
@@ -423,12 +411,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
423411
iconContainer.appendChild(this.prevIcon);
424412
iconContainer.appendChild(this.nextIcon);
425413
this.headerEle.appendChild(iconContainer);
426-
if (this.getModuleName() === 'calendar') {
427-
this.element.appendChild(this.headerEle);
428-
}
429-
else {
430-
this.baseElement.appendChild(this.headerEle);
431-
}
414+
this.element.appendChild(this.headerEle);
432415
};
433416
Calendar.prototype.content = function () {
434417
this.effect = {
@@ -440,12 +423,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
440423
this.previousDate = this.value;
441424
this.contentEle = dom_1.createElement('div', { className: CONTENT });
442425
this.table = dom_1.createElement('table', { attrs: { tabIndex: '0', 'role': 'grid', 'aria-activedescendant': '' } });
443-
if (this.getModuleName() === 'calendar') {
444-
this.element.appendChild(this.contentEle);
445-
}
446-
else {
447-
this.baseElement.appendChild(this.contentEle);
448-
}
426+
this.element.appendChild(this.contentEle);
449427
this.contentEle.appendChild(this.table);
450428
this.contentHdr();
451429
this.contentBody();
@@ -466,15 +444,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
466444
return culShortNames;
467445
};
468446
Calendar.prototype.contentHdr = function () {
469-
if (this.getModuleName() === 'calendar') {
470-
if (this.element.querySelectorAll('.e-content .e-week-header')[0]) {
471-
dom_1.remove(this.element.querySelectorAll('.e-content .e-week-header')[0]);
472-
}
473-
}
474-
else {
475-
if (this.baseElement.querySelectorAll('.e-content .e-week-header')[0]) {
476-
dom_1.remove(this.baseElement.querySelectorAll('.e-content .e-week-header')[0]);
477-
}
447+
if (this.element.querySelectorAll('.e-content .e-week-header')[0]) {
448+
dom_1.remove(this.element.querySelectorAll('.e-content .e-week-header')[0]);
478449
}
479450
var daysCount = 6;
480451
var html = '';
@@ -495,15 +466,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
495466
this.table.appendChild(this.theadEle);
496467
};
497468
Calendar.prototype.contentBody = function () {
498-
if (this.getModuleName() === 'calendar') {
499-
if (this.element.querySelectorAll('.e-content tbody')[0]) {
500-
dom_1.remove(this.element.querySelectorAll('.e-content tbody')[0]);
501-
}
502-
}
503-
else {
504-
if (this.baseElement.querySelectorAll('.e-content tbody')[0]) {
505-
dom_1.remove(this.baseElement.querySelectorAll('.e-content tbody')[0]);
506-
}
469+
if (this.element.querySelectorAll('.e-content tbody')[0]) {
470+
dom_1.remove(this.element.querySelectorAll('.e-content tbody')[0]);
507471
}
508472
switch (this.start) {
509473
case 'year':
@@ -1008,20 +972,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
1008972
break;
1009973
case 'enableRtl':
1010974
if (newProp.enableRtl) {
1011-
if (this.getModuleName() === 'calendar') {
1012-
this.element.classList.add('e-rtl');
1013-
}
1014-
else {
1015-
this.baseElement.classList.add('e-rtl');
1016-
}
975+
this.element.classList.add('e-rtl');
1017976
}
1018977
else {
1019-
if (this.getModuleName() === 'calendar') {
1020-
this.element.classList.remove('e-rtl');
1021-
}
1022-
else {
1023-
this.baseElement.classList.remove('e-rtl');
1024-
}
978+
this.element.classList.remove('e-rtl');
1025979
}
1026980
break;
1027981
case 'weekNumber':
@@ -1092,12 +1046,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
10921046
}
10931047
};
10941048
Calendar.prototype.destroy = function () {
1095-
if (this.getModuleName() === 'calendar') {
1096-
this.element.classList.remove(ROOT);
1097-
}
1098-
else {
1099-
this.baseElement.classList.remove(ROOT);
1100-
}
1049+
this.element.classList.remove(ROOT);
11011050
ej2_base_1.EventHandler.remove(this.hdrTitleEle, 'click', this.navTitle);
11021051
this.prevIconHandler(true);
11031052
this.nextIconHandler(true);

dist/global/calendar/calendar.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/global/calendar/calendar.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/global/ej2.js

Lines changed: 15 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -7631,25 +7631,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
76317631
}
76327632
Calendar.prototype.render = function () {
76337633
this.globalize = new ej2_base_1.Internationalization(this.locale);
7634-
if (this.getModuleName() === 'calendar') {
7635-
this.element.classList.add(ROOT);
7636-
if (this.enableRtl) {
7637-
this.element.classList.add(RTL);
7638-
}
7639-
dom_1.attributes(this.element, {
7640-
'role': 'calendar'
7641-
});
7642-
}
7643-
else {
7644-
this.baseElement = dom_1.createElement('div');
7645-
this.baseElement.classList.add(ROOT);
7646-
if (this.enableRtl) {
7647-
this.baseElement.classList.add(RTL);
7648-
}
7649-
dom_1.attributes(this.baseElement, {
7650-
'role': 'calendar'
7651-
});
7634+
this.element.classList.add(ROOT);
7635+
if (this.enableRtl) {
7636+
this.element.classList.add(RTL);
76527637
}
7638+
dom_1.attributes(this.element, {
7639+
'role': 'calendar'
7640+
});
76537641
this.aniObj = new ej2_base_4.Animation(this.animateOptions);
76547642
this.processDate();
76557643
this.header();
@@ -7731,12 +7719,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
77317719
iconContainer.appendChild(this.prevIcon);
77327720
iconContainer.appendChild(this.nextIcon);
77337721
this.headerEle.appendChild(iconContainer);
7734-
if (this.getModuleName() === 'calendar') {
7735-
this.element.appendChild(this.headerEle);
7736-
}
7737-
else {
7738-
this.baseElement.appendChild(this.headerEle);
7739-
}
7722+
this.element.appendChild(this.headerEle);
77407723
};
77417724
Calendar.prototype.content = function () {
77427725
this.effect = {
@@ -7748,12 +7731,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
77487731
this.previousDate = this.value;
77497732
this.contentEle = dom_1.createElement('div', { className: CONTENT });
77507733
this.table = dom_1.createElement('table', { attrs: { tabIndex: '0', 'role': 'grid', 'aria-activedescendant': '' } });
7751-
if (this.getModuleName() === 'calendar') {
7752-
this.element.appendChild(this.contentEle);
7753-
}
7754-
else {
7755-
this.baseElement.appendChild(this.contentEle);
7756-
}
7734+
this.element.appendChild(this.contentEle);
77577735
this.contentEle.appendChild(this.table);
77587736
this.contentHdr();
77597737
this.contentBody();
@@ -7774,15 +7752,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
77747752
return culShortNames;
77757753
};
77767754
Calendar.prototype.contentHdr = function () {
7777-
if (this.getModuleName() === 'calendar') {
7778-
if (this.element.querySelectorAll('.e-content .e-week-header')[0]) {
7779-
dom_1.remove(this.element.querySelectorAll('.e-content .e-week-header')[0]);
7780-
}
7781-
}
7782-
else {
7783-
if (this.baseElement.querySelectorAll('.e-content .e-week-header')[0]) {
7784-
dom_1.remove(this.baseElement.querySelectorAll('.e-content .e-week-header')[0]);
7785-
}
7755+
if (this.element.querySelectorAll('.e-content .e-week-header')[0]) {
7756+
dom_1.remove(this.element.querySelectorAll('.e-content .e-week-header')[0]);
77867757
}
77877758
var daysCount = 6;
77887759
var html = '';
@@ -7803,15 +7774,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
78037774
this.table.appendChild(this.theadEle);
78047775
};
78057776
Calendar.prototype.contentBody = function () {
7806-
if (this.getModuleName() === 'calendar') {
7807-
if (this.element.querySelectorAll('.e-content tbody')[0]) {
7808-
dom_1.remove(this.element.querySelectorAll('.e-content tbody')[0]);
7809-
}
7810-
}
7811-
else {
7812-
if (this.baseElement.querySelectorAll('.e-content tbody')[0]) {
7813-
dom_1.remove(this.baseElement.querySelectorAll('.e-content tbody')[0]);
7814-
}
7777+
if (this.element.querySelectorAll('.e-content tbody')[0]) {
7778+
dom_1.remove(this.element.querySelectorAll('.e-content tbody')[0]);
78157779
}
78167780
switch (this.start) {
78177781
case 'year':
@@ -8316,20 +8280,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
83168280
break;
83178281
case 'enableRtl':
83188282
if (newProp.enableRtl) {
8319-
if (this.getModuleName() === 'calendar') {
8320-
this.element.classList.add('e-rtl');
8321-
}
8322-
else {
8323-
this.baseElement.classList.add('e-rtl');
8324-
}
8283+
this.element.classList.add('e-rtl');
83258284
}
83268285
else {
8327-
if (this.getModuleName() === 'calendar') {
8328-
this.element.classList.remove('e-rtl');
8329-
}
8330-
else {
8331-
this.baseElement.classList.remove('e-rtl');
8332-
}
8286+
this.element.classList.remove('e-rtl');
83338287
}
83348288
break;
83358289
case 'weekNumber':
@@ -8400,12 +8354,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
84008354
}
84018355
};
84028356
Calendar.prototype.destroy = function () {
8403-
if (this.getModuleName() === 'calendar') {
8404-
this.element.classList.remove(ROOT);
8405-
}
8406-
else {
8407-
this.baseElement.classList.remove(ROOT);
8408-
}
8357+
this.element.classList.remove(ROOT);
84098358
ej2_base_1.EventHandler.remove(this.hdrTitleEle, 'click', this.navTitle);
84108359
this.prevIconHandler(true);
84118360
this.nextIconHandler(true);

dist/global/ej2.min.js

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/global/ej2.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)