Skip to content

Commit bb61c53

Browse files
author
pipeline
committed
v19.4.38 is released
1 parent e9ff444 commit bb61c53

File tree

40,734 files changed

+7874053
-19049
lines changed

Some content is hidden

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

40,734 files changed

+7874053
-19049
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+
## 19.4.38 (2021-12-17)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- `I324684` - Resolved the `Treeview` check box issues in safari browser.
12+
513
## 17.4.51 (2020-02-25)
614

715
### Common

controls/base/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,5 @@ Check the license detail [here](https://github.com/syncfusion/ej2-base/blob/mast
9999

100100
Check the changelog [here](https://ej2.syncfusion.com/documentation/release-notes?utm_source=npm&utm_campaign=ej2-base)
101101

102-
© Copyright 2019 Syncfusion, Inc. All Rights Reserved.
102+
© Copyright 2021 Syncfusion, Inc. All Rights Reserved.
103103
The Syncfusion Essential Studio license and copyright applies to this distribution.

controls/base/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-base",
3-
"version": "18.39.0",
3+
"version": "18.43.1",
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/base/spec/util.spec.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,19 +190,23 @@ describe('Util', () => {
190190
}, 1000);
191191
});
192192

193-
it('formatunit method auto value testing', () => {
193+
it('formatunit method value testing', () => {
194194
expect(Util.formatUnit('auto')).toEqual('auto');
195-
});
196-
197-
it('formatunit method percentage value testing', () => {
198-
expect(Util.formatUnit('100%')).toEqual('100%');
199-
});
200-
201-
it('formatunit method pixel value testing', () => {
195+
expect(Util.formatUnit('100cm')).toEqual('100cm');
196+
expect(Util.formatUnit('100mm')).toEqual('100mm');
197+
expect(Util.formatUnit('100in')).toEqual('100in');
202198
expect(Util.formatUnit('100px')).toEqual('100px');
203-
});
204-
205-
it('formatunit method number value testing', () => {
199+
expect(Util.formatUnit('100pt')).toEqual('100pt');
200+
expect(Util.formatUnit('100pc')).toEqual('100pc');
201+
expect(Util.formatUnit('100%')).toEqual('100%');
202+
expect(Util.formatUnit('100em')).toEqual('100em');
203+
expect(Util.formatUnit('100ex')).toEqual('100ex');
204+
expect(Util.formatUnit('100ch')).toEqual('100ch');
205+
expect(Util.formatUnit('100rem')).toEqual('100rem');
206+
expect(Util.formatUnit('100vw')).toEqual('100vw');
207+
expect(Util.formatUnit('100vh')).toEqual('100vh');
208+
expect(Util.formatUnit('100vmin')).toEqual('100vmin');
209+
expect(Util.formatUnit('100vmax')).toEqual('100vmax');
206210
expect(Util.formatUnit(100)).toEqual('100px');
207211
});
208212
describe('addInstance function', () => {

controls/base/src/animation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ export interface AnimationOptions extends AnimationModel {
310310
export function rippleEffect(element: HTMLElement, rippleOptions?: RippleOptions, done?: Function): () => void {
311311
const rippleModel: RippleOptions = getRippleModel(rippleOptions);
312312
if (rippleModel.rippleFlag === false || (rippleModel.rippleFlag === undefined && !isRippleEnabled)) {
313-
return Function;
313+
return (() => {});
314314
}
315315
element.setAttribute('data-ripple', 'true');
316316
EventHandler.add(element, 'mousedown', rippleHandler, { parent: element, rippleOptions: rippleModel });

controls/base/src/browser.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ export class Browser {
150150
if ('undefined' === typeof (<{ [key: string]: Object }>browserDetails)[key]) {
151151
return (<{ [key: string]: Object }>browserDetails)[key] = regX.test(Browser.userAgent);
152152
}
153+
if (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
154+
browserDetails['isIos'] = true;
155+
browserDetails['isDevice'] = true;
156+
browserDetails['isTouch'] = true;
157+
browserDetails['isPointer'] = true;
158+
}
153159
return (<{ [key: string]: Object }>browserDetails)[key];
154160
}
155161

controls/base/src/dom.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,16 @@ export function selectAll(selector: string, context: Document | Element = docume
288288
* @private
289289
*/
290290
function querySelectId(selector: string): string {
291-
if (selector.match(/#[0-9]/g)) {
291+
const charRegex: RegExp = /(!|"|\$|%|&|'|\(|\)|\*|\/|:|;|<|=|\?|@|\]|\^|`|{|}|\||\+|~)/g;
292+
if (selector.match(/#[0-9]/g) || selector.match(charRegex)) {
292293
const idList: string[] = selector.split(',');
293294
for (let i: number = 0; i < idList.length; i++) {
294295
const list: string[] = idList[i].split(' ');
295296
for (let j: number = 0; j < list.length; j++) {
296297
if (list[j].indexOf('#') > -1) {
297298
if (!list[j].match(/\[.*\]/)) {
298299
const splitId: string[] = list[j].split('#');
299-
if (splitId[1].match(/^\d/)) {
300+
if (splitId[1].match(/^\d/) || splitId[1].match(charRegex)) {
300301
const setId: string[] = list[j].split('.');
301302
setId[0] = setId[0].replace(/#/, '[id=\'') + '\']';
302303
list[j] = setId.join('.');

controls/base/src/draggable-model.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export interface DraggableModel {
5858

5959
/**
6060
* Specifies the callback function for drag event.
61+
6162
* @event
6263
*/
6364
drag?: Function;

controls/base/src/draggable.ts

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ export class Draggable extends Base<HTMLElement> implements INotifyPropertyChang
224224
public isPreventSelect: boolean;
225225
/**
226226
* Specifies the callback function for drag event.
227+
227228
* @event
228229
*/
229230
@Event()
@@ -324,7 +325,7 @@ export class Draggable extends Base<HTMLElement> implements INotifyPropertyChang
324325
*/
325326
@Property(750)
326327
public tapHoldThreshold: number;
327-
/**
328+
/**
328329
* @private
329330
*/
330331
@Property(false)
@@ -352,6 +353,7 @@ export class Draggable extends Base<HTMLElement> implements INotifyPropertyChang
352353
private prevTop: number = 0;
353354
private dragProcessStarted: boolean = false;
354355
/* tslint:disable no-any */
356+
private eleTop: number = 0;
355357
private tapHoldTimer: any = 0;
356358
private dragElePosition: any;
357359
public currentStateTarget: any;
@@ -572,6 +574,11 @@ export class Draggable extends Base<HTMLElement> implements INotifyPropertyChang
572574
if (this.clone && marginTop !== 0) {
573575
pos.top += marginTop;
574576
}
577+
this.eleTop = !isNaN(parseFloat(styles.top)) ? parseFloat(styles.top) - this.offset.top : 0;
578+
/* istanbul ignore next */
579+
// if (this.eleTop > 0) {
580+
// pos.top += this.eleTop;
581+
// }
575582
if (this.enableScrollHandler && !this.clone) {
576583
pos.top -= this.parentScrollY;
577584
pos.left -= this.parentScrollX;
@@ -688,7 +695,6 @@ export class Draggable extends Base<HTMLElement> implements INotifyPropertyChang
688695
let dLeft: number = this.position.left - this.diffX;
689696
let dTop: number = this.position.top - this.diffY;
690697
let styles: CSSStyleDeclaration = getComputedStyle(helperElement);
691-
let marginTop: number = parseFloat(styles.marginTop);
692698
if (this.dragArea) {
693699
if (this.pageX !== pagex || this.skipDistanceCheck) {
694700
let helperWidth: number = helperElement.offsetWidth + (parseFloat(styles.marginLeft)
@@ -732,37 +738,42 @@ export class Draggable extends Base<HTMLElement> implements INotifyPropertyChang
732738
this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
733739
draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
734740
draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
735-
// when drag-element has margin-top
736-
/* istanbul ignore next */
737-
if (marginTop > 0) {
738-
if (this.clone) {
739-
draEleTop += this.element.offsetTop;
740-
if (dTop < 0) {
741-
if ((this.element.offsetTop + dTop) >= 0) {
742-
draEleTop = this.element.offsetTop + dTop;
743-
} else {
744-
draEleTop -= this.element.offsetTop;
745-
}
741+
} else {
742+
draEleTop = top - iTop;
743+
draEleLeft = left - iLeft;
744+
}
745+
let marginTop: number = parseFloat(getComputedStyle(this.element).marginTop);
746+
// when drag-element has margin-top
747+
/* istanbul ignore next */
748+
if (marginTop > 0) {
749+
if (this.clone) {
750+
draEleTop += marginTop;
751+
if (dTop < 0) {
752+
if ((marginTop + dTop) >= 0) {
753+
draEleTop = marginTop + dTop;
754+
} else {
755+
draEleTop -= marginTop;
746756
}
747-
draEleTop = (this.dragLimit.bottom < draEleTop) ? this.dragLimit.bottom : draEleTop;
748757
}
749-
if ((top - iTop) < 0) {
750-
if (dTop + marginTop + (helperElement.offsetHeight - iTop) >= 0) {
751-
let tempDraEleTop: number = this.dragLimit.top + dTop - iTop;
752-
if ((tempDraEleTop + marginTop + iTop) < 0) {
753-
draEleTop -= marginTop + iTop;
754-
} else {
755-
draEleTop = tempDraEleTop;
756-
}
757-
} else {
758+
draEleTop = (this.dragLimit.bottom < draEleTop) ? this.dragLimit.bottom : draEleTop;
759+
}
760+
if ((top - iTop) < 0) {
761+
if (dTop + marginTop + (helperElement.offsetHeight - iTop) >= 0) {
762+
let tempDraEleTop: number = this.dragLimit.top + dTop - iTop;
763+
if ((tempDraEleTop + marginTop + iTop) < 0) {
758764
draEleTop -= marginTop + iTop;
765+
} else {
766+
draEleTop = tempDraEleTop;
759767
}
768+
} else {
769+
draEleTop -= marginTop + iTop;
760770
}
761771
}
762-
} else {
763-
draEleTop = top - iTop;
764-
draEleLeft = left - iLeft;
765772
}
773+
/* istanbul ignore next */
774+
// if(this.eleTop > 0) {
775+
// draEleTop += this.eleTop;
776+
// }
766777
if (this.enableScrollHandler && !this.clone) {
767778
draEleTop -= this.parentScrollY;
768779
draEleLeft -= this.parentScrollX;
@@ -938,11 +949,6 @@ export class Draggable extends Base<HTMLElement> implements INotifyPropertyChang
938949
pageX = this.clone ? intCoord.pageX : (intCoord.pageX + window.pageXOffset) - this.relativeXPosition;
939950
pageY = this.clone ? intCoord.pageY : (intCoord.pageY + window.pageYOffset) - this.relativeYPosition;
940951
}
941-
if (!this.clone && this.dragArea && !isdragscroll) {
942-
this.getScrollableValues();
943-
pageY -= this.tempScrollHeight ? this.parentScrollY : 0;
944-
pageX -= this.tempScrollWidth ? this.parentScrollX : 0;
945-
}
946952
return {
947953
left: pageX - (this.margin.left + this.cursorAt.left),
948954
top: pageY - (this.margin.top + this.cursorAt.top)

controls/base/src/intl/intl-base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ export namespace IntlBase {
12121212
}
12131213
iCulture = iCulture.slice(0, 2).toUpperCase() + iCulture.substr(2);
12141214
if (mapper) {
1215-
firstDay = mapper[iCulture] || defaultFirstDay;
1215+
firstDay = mapper[iCulture] || mapper[iCulture.slice(0, 2)] || defaultFirstDay;
12161216
}
12171217
return firstDayMapper[firstDay];
12181218
}
@@ -1247,7 +1247,7 @@ export namespace IntlBase {
12471247
if (day < 4) {
12481248
weeknum = Math.floor((daynum + day - 1) / 7) + 1;
12491249
if (weeknum > 52) {
1250-
const nYear: Date = new Date(this.getFullYear() + 1, 0, 1);
1250+
const nYear: Date = new Date(date.getFullYear() + 1, 0, 1);
12511251
let nday: number = nYear.getDay();
12521252
nday = nday >= 0 ? nday : nday + 7;
12531253
weeknum = nday < 4 ? 1 : 53;

controls/base/src/template.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,18 @@ export function compile(template: string, helper?: Object, ignorePrefix?: boolea
7777
}
7878
str = str.replace(str, str1);
7979
}
80-
else if(str.match(hrefRegex)) {
81-
var check = str.match(hrefRegex);
82-
var str1 = str;
83-
for (var i=0; i < check.length; i++) {
84-
var check1 = str.match(hrefRegex)[i].split('href=')[1];
85-
var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
86-
change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
87-
str1 = str1.replace(check1, change);
80+
else if (str.match(/(?:href='')/) === null) {
81+
if(str.match(hrefRegex)) {
82+
var check = str.match(hrefRegex);
83+
var str1 = str;
84+
for (var i=0; i < check.length; i++) {
85+
var check1 = str.match(hrefRegex)[i].split('href=')[1];
86+
var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
87+
change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
88+
str1 = str1.replace(check1, change);
89+
}
90+
str = str.replace(str, str1);
8891
}
89-
str = str.replace(str, str1);
9092
}
9193
`;
9294
const fnCode: string = "var str=\"" + evalExpResult + "\";" + condtion + " return str;";

controls/base/src/util.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,12 @@ export function throwError(message: string): void {
359359
export function print(element: Element, printWindow?: Window): Window {
360360
const div: Element = document.createElement('div');
361361
const links: HTMLElement[] = [].slice.call(document.getElementsByTagName('head')[0].querySelectorAll('base, link, style'));
362+
const blinks: HTMLElement[] = [].slice.call(document.getElementsByTagName('body')[0].querySelectorAll('link, style'));
363+
if (blinks.length) {
364+
for (let l: number = 0, len: number = blinks.length; l < len; l++) {
365+
links.push(blinks[l]);
366+
}
367+
}
362368
let reference: string = '';
363369
if (isNullOrUndefined(printWindow)) {
364370
printWindow = window.open('', 'print', 'height=452,width=1024,tabbar=no');
@@ -393,7 +399,7 @@ export function print(element: Element, printWindow?: Window): Window {
393399
*/
394400
export function formatUnit(value: number | string): string {
395401
const result: string = <string>value + '';
396-
if (result === 'auto' || result.indexOf('%') !== -1 || result.indexOf('px') !== -1) {
402+
if (result.match(/auto|cm|mm|in|px|pt|pc|%|em|ex|ch|rem|vw|vh|vmin|vmax/)) {
397403
return result;
398404
}
399405

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@import 'common/mixin.scss';
2+
@import 'definition/fluent-dark.scss';
3+
4+
$font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif !default;
5+
$font-size: 12px !default;
6+
$font-weight: 400 !default;
7+
$error-font-color: $danger !default;
8+
$warning-font-color: $orange20 !default;
9+
$success-font-color: $green20 !default;
10+
$information-font-color: $white !default;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@import 'common/mixin.scss';
2+
@import 'definition/fluent.scss';
3+
4+
$font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif !default;
5+
$font-size: 12px !default;
6+
$font-weight: 400 !default;
7+
$error-font-color: $danger !default;
8+
$warning-font-color: $orange20 !default;
9+
$success-font-color: $green20 !default;
10+
$information-font-color: $white !default;

controls/base/styles/common/_core.scss

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,42 @@
77
font-weight: $font-weight;
88
}
99

10+
$white: #fff;
11+
$background: #e82824;
12+
13+
.sf-license-warning {
14+
background: $background;
15+
color: $white;
16+
font-family: 'Segoe UI';
17+
font-size: medium;
18+
left: 0;
19+
line-height: 45px;
20+
opacity: .75;
21+
position: fixed;
22+
right: 0;
23+
text-align: center;
24+
top: 0;
25+
z-index: 999999999;
26+
}
27+
28+
.sf-license-close-btn {
29+
background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIyMCIgd2lkdGg9IjIwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiI+ICA8Zz4gICAgPHBhdGggaWQ9InBhdGgxIiB0cmFuc2Zvcm09InJvdGF0ZSgxLDEyOCwxMjgpIHRyYW5zbGF0ZSg1OS4wMTA3Nzk0NDEwNDU1LDU5KSBzY2FsZSg0LjMxMjUwMDI1NzA0NTA1LDQuMzEyNTA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+
margin-top: 14px;
33+
padding-top: 10px;
34+
position: absolute;
35+
right: 20px;
36+
width: 20px;
37+
}
38+
39+
$warning: #ffd800;
40+
41+
.sf-license-warning a,
42+
.sf-license-warning a:hover {
43+
color: $warning;
44+
}
45+
1046
.e-error {
1147
color: $error-font-color;
1248
font-family: $font-family;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ $brand-danger-font: #ac2a2a !default;
5050
$base-font: #000 !default;
5151
$shadow: #000 !default;
5252
$skin-name: 'bootstrap-dark' !default;
53+
$theme-name: 'bootstrap-dark' !default;
5354

5455
// mapping Bootstrap variables
5556
$grey-base: $gray-base !default;

controls/base/styles/definition/_bootstrap.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ $brand-danger-font: #a94442 !default;
4545
$base-font: #000 !default;
4646
$shadow: #000 !default;
4747
$skin-name: 'bootstrap' !default;
48+
$theme-name: 'bootstrap' !default;
4849

4950
// mapping Bootstrap variables
5051
$grey-base: $gray-base !default;

controls/base/styles/definition/_bootstrap4.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ $secondary-font: $white !default;
3636
$content-bg: $white !default;
3737
$content-popup-bg: $white !default;
3838
$skin-name: 'bootstrap4' !default;
39+
$theme-name: 'bootstrap4' !default;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ $series-10: #3bc6cf;
350350
$series-11: #74b706;
351351
$series-12: #ea6266;
352352
$skin-name: 'bootstrap5' !default;
353+
$theme-name: 'bootstrap5-dark' !default;
353354

354355
//Diagram Palette color
355356
$diagram-palette-background: $gray-300 !default;

0 commit comments

Comments
 (0)