@syncfusion/ej2-base 24.2.8 → 25.1.35-579988
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +2 -1
- package/CHANGELOG.md +641 -677
- package/{README.md → ReadMe.md} +100 -100
- package/dist/ej2-base.umd.min.js +1 -10
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +178 -1025
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +226 -934
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +1 -10
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/dist/ts/ajax.ts +236 -0
- package/dist/ts/animation.ts +544 -0
- package/dist/ts/base.ts +357 -0
- package/dist/ts/browser.ts +387 -0
- package/dist/ts/child-property.ts +192 -0
- package/dist/ts/component.ts +519 -0
- package/dist/ts/dom.ts +488 -0
- package/dist/ts/draggable.ts +1155 -0
- package/dist/ts/droppable.ts +172 -0
- package/dist/ts/event-handler.ts +169 -0
- package/dist/ts/internationalization.ts +369 -0
- package/dist/ts/intl/date-formatter.ts +317 -0
- package/dist/ts/intl/date-parser.ts +426 -0
- package/dist/ts/intl/intl-base.ts +1104 -0
- package/dist/ts/intl/number-formatter.ts +411 -0
- package/dist/ts/intl/number-parser.ts +158 -0
- package/dist/ts/intl/parser-base.ts +394 -0
- package/dist/ts/keyboard.ts +238 -0
- package/dist/ts/l10n.ts +94 -0
- package/dist/ts/module-loader.ts +149 -0
- package/dist/ts/notify-property-change.ts +726 -0
- package/dist/ts/observer.ts +236 -0
- package/dist/ts/sanitize-helper.ts +224 -0
- package/dist/ts/template-engine.ts +191 -0
- package/dist/ts/template.ts +329 -0
- package/dist/ts/touch.ts +544 -0
- package/dist/ts/util.ts +523 -0
- package/dist/ts/validate-lic.ts +0 -0
- package/e2e/crypto.js +16 -16
- package/e2e/m.protractor.config.js +286 -286
- package/e2e/modified-protractor/protractor.config.js +316 -316
- package/e2e/protractor.config.js +389 -332
- package/helpers/e2e/index.js +3 -3
- package/license +10 -10
- package/package.json +225 -174
- package/src/ajax.d.ts +1 -1
- package/src/ajax.js +3 -8
- package/src/animation-model.d.ts +41 -41
- package/src/animation.d.ts +6 -6
- package/src/animation.js +25 -25
- package/src/base.d.ts +2 -1
- package/src/base.js +9 -7
- package/src/component-model.d.ts +16 -16
- package/src/component.d.ts +9 -3
- package/src/component.js +50 -38
- package/src/draggable-model.d.ts +113 -113
- package/src/draggable.d.ts +2 -0
- package/src/draggable.js +45 -29
- package/src/droppable-model.d.ts +23 -23
- package/src/droppable.js +19 -19
- package/src/event-handler.js +2 -1
- package/src/index.d.ts +0 -3
- package/src/index.js +0 -3
- package/src/intl/date-formatter.js +2 -6
- package/src/intl/date-parser.js +1 -20
- package/src/intl/intl-base.js +1 -164
- package/src/intl/number-formatter.d.ts +3 -0
- package/src/intl/number-formatter.js +7 -7
- package/src/intl/number-parser.js +1 -0
- package/src/keyboard-model.d.ts +16 -16
- package/src/keyboard.js +19 -19
- package/src/module-loader.d.ts +12 -0
- package/src/module-loader.js +11 -0
- package/src/notify-property-change.js +3 -2
- package/src/observer.js +2 -0
- package/src/sanitize-helper.js +5 -0
- package/src/template-engine.js +1 -0
- package/src/template.js +3 -2
- package/src/touch-model.d.ts +39 -39
- package/src/touch.js +19 -19
- package/src/validate-lic.d.ts +0 -11
- package/src/validate-lic.js +1 -259
- package/styles/_all.scss +2 -2
- package/styles/_bds-dark-definition.scss +15 -0
- package/styles/_bds-definition.scss +15 -0
- package/styles/_bootstrap-dark-definition.scss +42 -42
- package/styles/_bootstrap-definition.scss +42 -42
- package/styles/_bootstrap4-definition.scss +11 -11
- package/styles/_bootstrap5-dark-definition.scss +9 -9
- package/styles/_bootstrap5-definition.scss +8 -8
- package/styles/_fabric-dark-definition.scss +42 -42
- package/styles/_fabric-definition.scss +42 -42
- package/styles/_fluent-dark-definition.scss +9 -9
- package/styles/_fluent-definition.scss +9 -9
- package/styles/_fluent2-definition.scss +9 -0
- package/styles/_fusionnew-dark-definition.scss +8 -8
- package/styles/_fusionnew-definition.scss +8 -8
- package/styles/_highcontrast-definition.scss +42 -42
- package/styles/_highcontrast-light-definition.scss +42 -42
- package/styles/_material-dark-definition.scss +48 -48
- package/styles/_material-definition.scss +49 -49
- package/styles/_material3-dark-definition.scss +14 -14
- package/styles/_material3-definition.scss +15 -15
- package/styles/_tailwind-dark-definition.scss +15 -15
- package/styles/_tailwind-definition.scss +15 -15
- package/styles/animation/_all.scss +560 -560
- package/styles/bootstrap-dark.css +10 -1
- package/styles/bootstrap.css +10 -1
- package/styles/bootstrap4.css +10 -1
- package/styles/bootstrap5-dark.css +10 -1
- package/styles/bootstrap5.css +10 -1
- package/styles/common/_all.scss +2 -2
- package/styles/common/_core.scss +117 -117
- package/styles/common/_mixin.scss +9 -9
- package/styles/definition/_bds-dark.scss +1179 -0
- package/styles/definition/_bds.scss +1474 -0
- package/styles/definition/_bootstrap-dark.scss +219 -219
- package/styles/definition/_bootstrap.scss +215 -215
- package/styles/definition/_bootstrap4.scss +167 -167
- package/styles/definition/_bootstrap5-dark.scss +493 -493
- package/styles/definition/_bootstrap5.scss +494 -494
- package/styles/definition/_fabric-dark.scss +200 -200
- package/styles/definition/_fabric.scss +198 -198
- package/styles/definition/_fluent-dark.scss +557 -557
- package/styles/definition/_fluent.scss +558 -558
- package/styles/definition/_fluent2.scss +2198 -0
- package/styles/definition/_fusionnew-dark.scss +362 -362
- package/styles/definition/_fusionnew.scss +363 -363
- package/styles/definition/_highcontrast-light.scss +193 -193
- package/styles/definition/_highcontrast.scss +195 -195
- package/styles/definition/_material-dark.scss +198 -198
- package/styles/definition/_material.scss +192 -192
- package/styles/definition/_material3-dark.scss +710 -710
- package/styles/definition/_material3.scss +792 -792
- package/styles/definition/_tailwind-dark.scss +488 -488
- package/styles/definition/_tailwind.scss +485 -485
- package/styles/fabric-dark.css +10 -1
- package/styles/fabric.css +10 -1
- package/styles/fluent-dark.css +10 -1
- package/styles/fluent.css +10 -1
- package/styles/highcontrast-light.css +10 -1
- package/styles/highcontrast.css +10 -1
- package/styles/material-dark.css +10 -1
- package/styles/material.css +10 -1
- package/styles/material3-dark.css +10 -1
- package/styles/material3.css +10 -1
- package/styles/offline-theme/material-dark.css +10 -1
- package/styles/offline-theme/material.css +10 -1
- package/styles/offline-theme/tailwind-dark.css +10 -1
- package/styles/offline-theme/tailwind.css +10 -1
- package/styles/tailwind-dark.css +10 -1
- package/styles/tailwind.css +10 -1
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -60
- package/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -42
- package/bin/syncfusion-license.js +0 -2
- package/dist/ej2-base.min.js +0 -10
- package/e2e/index.d.ts +0 -27
- package/src/fetch.d.ts +0 -114
- package/src/fetch.js +0 -116
- package/src/hijri-parser.d.ts +0 -19
- package/src/hijri-parser.js +0 -204
package/src/draggable.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
20
|
import { Base } from './base';
|
|
21
21
|
import { Browser } from './browser';
|
|
22
22
|
import { isVisible } from './dom';
|
|
@@ -26,9 +26,6 @@ import { ChildProperty } from './child-property';
|
|
|
26
26
|
import { select, closest, setStyleAttribute, addClass, createElement } from './dom';
|
|
27
27
|
import { extend, isUndefined, isNullOrUndefined, compareElementParent, isBlazor } from './util';
|
|
28
28
|
var defaultPosition = { left: 0, top: 0, bottom: 0, right: 0 };
|
|
29
|
-
var positionProp = ['offsetLeft', 'offsetTop'];
|
|
30
|
-
var axisMapper = ['x', 'y'];
|
|
31
|
-
var axisValueMapper = ['left', 'top'];
|
|
32
29
|
var isDraggedObject = { isDragged: false };
|
|
33
30
|
/**
|
|
34
31
|
* Specifies the position coordinates
|
|
@@ -161,6 +158,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
161
158
|
return this.getScrollableParent(element.parentNode, axis);
|
|
162
159
|
}
|
|
163
160
|
};
|
|
161
|
+
/* eslint-disable */
|
|
164
162
|
Draggable.prototype.getScrollableValues = function () {
|
|
165
163
|
this.parentScrollX = 0;
|
|
166
164
|
this.parentScrollY = 0;
|
|
@@ -168,6 +166,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
168
166
|
var verticalScrollParent = this.getScrollableParent(this.element.parentNode, 'vertical');
|
|
169
167
|
var horizontalScrollParent = this.getScrollableParent(this.element.parentNode, 'horizontal');
|
|
170
168
|
};
|
|
169
|
+
/* eslint-enable */
|
|
171
170
|
Draggable.prototype.initialize = function (evt, curTarget) {
|
|
172
171
|
this.currentStateTarget = evt.target;
|
|
173
172
|
if (this.isDragStarted()) {
|
|
@@ -181,6 +180,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
181
180
|
this.dragProcessStarted = false;
|
|
182
181
|
if (this.abort) {
|
|
183
182
|
/* tslint:disable no-any */
|
|
183
|
+
// eslint-disable-next-line
|
|
184
184
|
var abortSelectors = this.abort;
|
|
185
185
|
if (typeof abortSelectors === 'string') {
|
|
186
186
|
abortSelectors = [abortSelectors];
|
|
@@ -251,6 +251,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
251
251
|
}
|
|
252
252
|
/* istanbul ignore next */
|
|
253
253
|
if (this.isReplaceDragEle) {
|
|
254
|
+
// eslint-disable-next-line
|
|
254
255
|
element = this.currentStateCheck(evt.target, element);
|
|
255
256
|
}
|
|
256
257
|
this.offset = this.calculateParentPosition(element);
|
|
@@ -403,6 +404,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
403
404
|
}
|
|
404
405
|
}
|
|
405
406
|
if (flag) {
|
|
407
|
+
// eslint-disable-next-line
|
|
406
408
|
eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
|
|
407
409
|
eleObj.instance.intOver(evt, eleObj.target);
|
|
408
410
|
this.hoverObject = eleObj;
|
|
@@ -552,6 +554,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
552
554
|
elements = this.getPathElements(evt);
|
|
553
555
|
}
|
|
554
556
|
/* tslint:disable no-any */
|
|
557
|
+
// eslint-disable-next-line
|
|
555
558
|
var scrollParent = this.getScrollParent(elements, false);
|
|
556
559
|
if (this.elementInViewport(this.helperElement)) {
|
|
557
560
|
this.getScrollPosition(scrollParent, draEleTop);
|
|
@@ -574,8 +577,10 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
574
577
|
this.pageY = pagey;
|
|
575
578
|
};
|
|
576
579
|
/* tslint:disable no-any */
|
|
580
|
+
// eslint-disable-next-line
|
|
577
581
|
Draggable.prototype.getScrollParent = function (node, reverse) {
|
|
578
582
|
/* tslint:disable no-any */
|
|
583
|
+
// eslint-disable-next-line
|
|
579
584
|
var nodeEl = reverse ? node.reverse() : node;
|
|
580
585
|
var hasScroll;
|
|
581
586
|
for (var i = nodeEl.length - 1; i >= 0; i--) {
|
|
@@ -602,10 +607,12 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
602
607
|
}
|
|
603
608
|
}
|
|
604
609
|
else if (nodeEle && nodeEle !== document.scrollingElement) {
|
|
605
|
-
|
|
610
|
+
var docScrollTop = document.scrollingElement.scrollTop;
|
|
611
|
+
var helperClientHeight = this.helperElement.clientHeight;
|
|
612
|
+
if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - helperClientHeight + docScrollTop) < draEleTop) {
|
|
606
613
|
nodeEle.scrollTop += this.helperElement.clientHeight;
|
|
607
614
|
}
|
|
608
|
-
else if (nodeEle.getBoundingClientRect().top > (draEleTop -
|
|
615
|
+
else if (nodeEle.getBoundingClientRect().top > (draEleTop - helperClientHeight - docScrollTop)) {
|
|
609
616
|
nodeEle.scrollTop -= this.helperElement.clientHeight;
|
|
610
617
|
}
|
|
611
618
|
}
|
|
@@ -657,6 +664,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
657
664
|
var eleObj = this.checkTargetElement(evt);
|
|
658
665
|
if (eleObj.target && eleObj.instance) {
|
|
659
666
|
eleObj.instance.dragStopCalled = true;
|
|
667
|
+
// eslint-disable-next-line
|
|
660
668
|
eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
|
|
661
669
|
eleObj.instance.intDrop(evt, eleObj.target);
|
|
662
670
|
}
|
|
@@ -664,8 +672,11 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
664
672
|
document.body.classList.remove('e-prevent-select');
|
|
665
673
|
};
|
|
666
674
|
/**
|
|
675
|
+
* @param {MouseEvent | TouchEvent} evt ?
|
|
676
|
+
* @returns {void}
|
|
667
677
|
* @private
|
|
668
678
|
*/
|
|
679
|
+
// eslint-disable-next-line
|
|
669
680
|
Draggable.prototype.intDestroy = function (evt) {
|
|
670
681
|
this.dragProcessStarted = false;
|
|
671
682
|
this.toggleEvents();
|
|
@@ -680,6 +691,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
680
691
|
}
|
|
681
692
|
};
|
|
682
693
|
// triggers when property changed
|
|
694
|
+
// eslint-disable-next-line
|
|
683
695
|
Draggable.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
684
696
|
//No Code to handle
|
|
685
697
|
};
|
|
@@ -710,6 +722,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
710
722
|
eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
|
|
711
723
|
eleHeightBound = ele.scrollHeight ? (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
|
|
712
724
|
var keys = ['Top', 'Left', 'Bottom', 'Right'];
|
|
725
|
+
/* eslint-disable */
|
|
713
726
|
var styles = getComputedStyle(ele);
|
|
714
727
|
for (var i = 0; i < keys.length; i++) {
|
|
715
728
|
var key = keys[parseInt(i.toString(), 10)];
|
|
@@ -719,6 +732,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
719
732
|
this.borderWidth["" + lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
|
|
720
733
|
this.padding["" + lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
|
|
721
734
|
}
|
|
735
|
+
/* eslint-enable */
|
|
722
736
|
if (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) {
|
|
723
737
|
top = elementArea.top + document.scrollingElement.scrollTop;
|
|
724
738
|
}
|
|
@@ -736,7 +750,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
736
750
|
var intCoord = this.getCoordinates(evt);
|
|
737
751
|
var ele;
|
|
738
752
|
var prevStyle = this.helperElement.style.pointerEvents || '';
|
|
739
|
-
var isPointer = evt.type.indexOf('pointer') !== -1 && Browser.info.name === 'safari' && parseInt(Browser.info.version) > 12;
|
|
753
|
+
var isPointer = evt.type.indexOf('pointer') !== -1 && Browser.info.name === 'safari' && parseInt(Browser.info.version, 10) > 12;
|
|
740
754
|
if (compareElementParent(evt.target, this.helperElement) || evt.type.indexOf('touch') !== -1 || isPointer) {
|
|
741
755
|
this.helperElement.style.pointerEvents = 'none';
|
|
742
756
|
ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
|
|
@@ -760,6 +774,7 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
760
774
|
};
|
|
761
775
|
Draggable.prototype.getMousePosition = function (evt, isdragscroll) {
|
|
762
776
|
/* tslint:disable no-any */
|
|
777
|
+
// eslint-disable-next-line
|
|
763
778
|
var dragEle = evt.srcElement !== undefined ? evt.srcElement : evt.target;
|
|
764
779
|
var intCoord = this.getCoordinates(evt);
|
|
765
780
|
var pageX;
|
|
@@ -777,10 +792,11 @@ var Draggable = /** @class */ (function (_super) {
|
|
|
777
792
|
pageY = this.clone ? intCoord.pageY : (intCoord.pageY + window.pageYOffset) - this.relativeYPosition;
|
|
778
793
|
}
|
|
779
794
|
if (document.scrollingElement && (!isdragscroll && !this.clone)) {
|
|
780
|
-
var
|
|
781
|
-
var
|
|
782
|
-
|
|
783
|
-
|
|
795
|
+
var ele = document.scrollingElement;
|
|
796
|
+
var isVerticalScroll = ele.scrollHeight > 0 && ele.scrollHeight > ele.clientHeight && ele.scrollTop > 0;
|
|
797
|
+
var isHorrizontalScroll = ele.scrollWidth > 0 && ele.scrollWidth > ele.clientWidth && ele.scrollLeft > 0;
|
|
798
|
+
pageX = isHorrizontalScroll ? pageX - ele.scrollLeft : pageX;
|
|
799
|
+
pageY = isVerticalScroll ? pageY - ele.scrollTop : pageY;
|
|
784
800
|
}
|
|
785
801
|
return {
|
|
786
802
|
left: pageX - (this.margin.left + this.cursorAt.left),
|
package/src/droppable-model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Base } from './base';
|
|
1
|
+
import { Base } from './base';
|
|
2
2
|
import {DropEventArgs} from "./droppable";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,35 +7,35 @@ import {DropEventArgs} from "./droppable";
|
|
|
7
7
|
export interface DroppableModel {
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Defines the selector for draggable element to be accepted by the droppable.
|
|
11
|
-
*/
|
|
12
|
-
accept?: string;
|
|
10
|
+
* Defines the selector for draggable element to be accepted by the droppable.
|
|
11
|
+
*/
|
|
12
|
+
accept?: string;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Defines the scope value to group sets of draggable and droppable items.
|
|
16
|
-
* A draggable with the same scope value will only be accepted by the droppable.
|
|
17
|
-
*/
|
|
18
|
-
scope?: string;
|
|
15
|
+
* Defines the scope value to group sets of draggable and droppable items.
|
|
16
|
+
* A draggable with the same scope value will only be accepted by the droppable.
|
|
17
|
+
*/
|
|
18
|
+
scope?: string;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* Specifies the callback function, which will be triggered while drag element is dropped in droppable.
|
|
22
|
-
*
|
|
23
|
-
* @event drop
|
|
24
|
-
*/
|
|
25
|
-
drop?: (args: DropEventArgs) => void;
|
|
21
|
+
* Specifies the callback function, which will be triggered while drag element is dropped in droppable.
|
|
22
|
+
*
|
|
23
|
+
* @event drop
|
|
24
|
+
*/
|
|
25
|
+
drop?: (args: DropEventArgs) => void;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* Specifies the callback function, which will be triggered while drag element is moved over droppable element.
|
|
29
|
-
*
|
|
30
|
-
* @event over
|
|
31
|
-
*/
|
|
32
|
-
over?: Function;
|
|
28
|
+
* Specifies the callback function, which will be triggered while drag element is moved over droppable element.
|
|
29
|
+
*
|
|
30
|
+
* @event over
|
|
31
|
+
*/
|
|
32
|
+
over?: Function;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Specifies the callback function, which will be triggered while drag element is moved out of droppable element.
|
|
36
|
-
*
|
|
37
|
-
* @event bind
|
|
38
|
-
*/
|
|
39
|
-
out?: Function;
|
|
35
|
+
* Specifies the callback function, which will be triggered while drag element is moved out of droppable element.
|
|
36
|
+
*
|
|
37
|
+
* @event bind
|
|
38
|
+
*/
|
|
39
|
+
out?: Function;
|
|
40
40
|
|
|
41
41
|
}
|
package/src/droppable.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
20
|
import { Base } from './base';
|
|
21
21
|
import { Browser } from './browser';
|
|
22
22
|
import { isVisible, matches } from './dom';
|
package/src/event-handler.js
CHANGED
|
@@ -115,7 +115,8 @@ var EventHandler = /** @class */ (function () {
|
|
|
115
115
|
// eslint-disable-next-line
|
|
116
116
|
copyData = extend([], copyData, eventData);
|
|
117
117
|
for (var i = 0; i < copyData.length; i++) {
|
|
118
|
-
|
|
118
|
+
var parseValue = copyData[parseInt(i.toString(), 10)];
|
|
119
|
+
element.removeEventListener(parseValue.name, parseValue.debounce);
|
|
119
120
|
eventData.shift();
|
|
120
121
|
}
|
|
121
122
|
};
|
package/src/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './intl/intl-base';
|
|
5
5
|
export * from './ajax';
|
|
6
|
-
export * from './fetch';
|
|
7
6
|
export * from './animation';
|
|
8
7
|
export * from './animation-model';
|
|
9
8
|
export * from './base';
|
|
@@ -21,11 +20,9 @@ export * from './l10n';
|
|
|
21
20
|
export * from './module-loader';
|
|
22
21
|
export * from './notify-property-change';
|
|
23
22
|
export * from './touch';
|
|
24
|
-
export * from './hijri-parser';
|
|
25
23
|
export * from './touch-model';
|
|
26
24
|
export * from './template-engine';
|
|
27
25
|
export * from './util';
|
|
28
26
|
export * from './dom';
|
|
29
27
|
export * from './observer';
|
|
30
28
|
export * from './sanitize-helper';
|
|
31
|
-
export * from './validate-lic';
|
package/src/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './intl/intl-base';
|
|
5
5
|
export * from './ajax';
|
|
6
|
-
export * from './fetch';
|
|
7
6
|
export * from './animation';
|
|
8
7
|
export * from './base';
|
|
9
8
|
export * from './browser';
|
|
@@ -18,10 +17,8 @@ export * from './l10n';
|
|
|
18
17
|
export * from './module-loader';
|
|
19
18
|
export * from './notify-property-change';
|
|
20
19
|
export * from './touch';
|
|
21
|
-
export * from './hijri-parser';
|
|
22
20
|
export * from './template-engine';
|
|
23
21
|
export * from './util';
|
|
24
22
|
export * from './dom';
|
|
25
23
|
export * from './observer';
|
|
26
24
|
export * from './sanitize-helper';
|
|
27
|
-
export * from './validate-lic';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ParserBase as parser } from './parser-base';
|
|
2
2
|
import { IntlBase as base } from './intl-base';
|
|
3
3
|
import { isUndefined, throwError, getValue, isBlazor } from '../util';
|
|
4
|
-
import { HijriParser } from '../hijri-parser';
|
|
5
4
|
import { isNullOrUndefined, extend } from '../util';
|
|
6
5
|
var abbreviateRegexGlobal = /\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi;
|
|
7
6
|
var standalone = 'stand-alone';
|
|
@@ -137,7 +136,7 @@ var DateFormat = /** @class */ (function () {
|
|
|
137
136
|
var pattern = options.pattern;
|
|
138
137
|
var ret = '';
|
|
139
138
|
var matches = pattern.match(base.dateParseRegex);
|
|
140
|
-
var dObject = this.getCurrentDateValue(value
|
|
139
|
+
var dObject = this.getCurrentDateValue(value);
|
|
141
140
|
for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) {
|
|
142
141
|
var match = matches_1[_i];
|
|
143
142
|
var length_1 = match.length;
|
|
@@ -268,10 +267,7 @@ var DateFormat = /** @class */ (function () {
|
|
|
268
267
|
}
|
|
269
268
|
return ret;
|
|
270
269
|
};
|
|
271
|
-
DateFormat.getCurrentDateValue = function (value
|
|
272
|
-
if (isIslamic) {
|
|
273
|
-
return HijriParser.getHijriDate(value);
|
|
274
|
-
}
|
|
270
|
+
DateFormat.getCurrentDateValue = function (value) {
|
|
275
271
|
return { year: value.getFullYear(), month: value.getMonth() + 1, date: value.getDate() };
|
|
276
272
|
};
|
|
277
273
|
/**
|
package/src/intl/date-parser.js
CHANGED
|
@@ -2,7 +2,6 @@ import { IntlBase as base } from './intl-base';
|
|
|
2
2
|
import { ParserBase as parser } from './parser-base';
|
|
3
3
|
import { isUndefined, throwError, getValue, isNullOrUndefined, isBlazor } from '../util';
|
|
4
4
|
import { datePartMatcher } from './date-formatter';
|
|
5
|
-
import { HijriParser } from '../hijri-parser';
|
|
6
5
|
var standalone = 'stand-alone';
|
|
7
6
|
var latnRegex = /^[0-9]*$/;
|
|
8
7
|
var timeSetter = {
|
|
@@ -202,25 +201,6 @@ var DateParser = /** @class */ (function () {
|
|
|
202
201
|
if (isNullOrUndefined(parsedDateParts) || !Object.keys(parsedDateParts).length) {
|
|
203
202
|
return null;
|
|
204
203
|
}
|
|
205
|
-
if (parseOptions.isIslamic) {
|
|
206
|
-
var dobj = {};
|
|
207
|
-
var tYear = parsedDateParts.year;
|
|
208
|
-
var tDate = parsedDateParts.day;
|
|
209
|
-
var tMonth = parsedDateParts.month;
|
|
210
|
-
var ystrig = tYear ? (tYear + '') : '';
|
|
211
|
-
var is2DigitYear = (ystrig.length === 2);
|
|
212
|
-
if (!tYear || !tMonth || !tDate || is2DigitYear) {
|
|
213
|
-
dobj = HijriParser.getHijriDate(new Date());
|
|
214
|
-
}
|
|
215
|
-
if (is2DigitYear) {
|
|
216
|
-
tYear = parseInt((dobj.year + '').slice(0, 2) + ystrig, 10);
|
|
217
|
-
}
|
|
218
|
-
// tslint:disable-next-line
|
|
219
|
-
var dateObject = HijriParser.toGregorian(tYear || dobj.year, tMonth || dobj.month, tDate || dobj.date);
|
|
220
|
-
parsedDateParts.year = dateObject.getFullYear();
|
|
221
|
-
parsedDateParts.month = dateObject.getMonth() + 1;
|
|
222
|
-
parsedDateParts.day = dateObject.getDate();
|
|
223
|
-
}
|
|
224
204
|
return _this.getDateObject(parsedDateParts);
|
|
225
205
|
};
|
|
226
206
|
};
|
|
@@ -342,6 +322,7 @@ var DateParser = /** @class */ (function () {
|
|
|
342
322
|
// eslint-disable-next-line
|
|
343
323
|
matchString = ((prop === 'month') && (!parseOptions.isIslamic) && (parseOptions.culture === 'en' || parseOptions.culture === 'en-GB' || parseOptions.culture === 'en-US'))
|
|
344
324
|
? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
|
|
325
|
+
// eslint-disable-next-line
|
|
345
326
|
matchString = ((prop !== 'month') && (prop === 'designator') && parseOptions.culture && parseOptions.culture.indexOf('en-') !== -1 && cultureOptions.indexOf(parseOptions.culture) === -1)
|
|
346
327
|
? matchString.toLowerCase() : matchString;
|
|
347
328
|
// eslint-disable-next-line
|
package/src/intl/intl-base.js
CHANGED
|
@@ -473,162 +473,7 @@ export var IntlBase;
|
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
|
-
IntlBase.blazorDefaultObject = {
|
|
477
|
-
'numbers': {
|
|
478
|
-
'mapper': {
|
|
479
|
-
'0': '0',
|
|
480
|
-
'1': '1',
|
|
481
|
-
'2': '2',
|
|
482
|
-
'3': '3',
|
|
483
|
-
'4': '4',
|
|
484
|
-
'5': '5',
|
|
485
|
-
'6': '6',
|
|
486
|
-
'7': '7',
|
|
487
|
-
'8': '8',
|
|
488
|
-
'9': '9'
|
|
489
|
-
},
|
|
490
|
-
'mapperDigits': '0123456789',
|
|
491
|
-
'numberSymbols': {
|
|
492
|
-
'decimal': '.',
|
|
493
|
-
'group': ',',
|
|
494
|
-
'plusSign': '+',
|
|
495
|
-
'minusSign': '-',
|
|
496
|
-
'percentSign': '%',
|
|
497
|
-
'nan': 'NaN',
|
|
498
|
-
'timeSeparator': ':',
|
|
499
|
-
'infinity': '∞'
|
|
500
|
-
},
|
|
501
|
-
'timeSeparator': ':',
|
|
502
|
-
'currencySymbol': '$',
|
|
503
|
-
'currencypData': {
|
|
504
|
-
'nlead': '$',
|
|
505
|
-
'nend': '',
|
|
506
|
-
'groupSeparator': ',',
|
|
507
|
-
'groupData': {
|
|
508
|
-
'primary': 3
|
|
509
|
-
},
|
|
510
|
-
'maximumFraction': 2,
|
|
511
|
-
'minimumFraction': 2
|
|
512
|
-
},
|
|
513
|
-
'percentpData': {
|
|
514
|
-
'nlead': '',
|
|
515
|
-
'nend': '%',
|
|
516
|
-
'groupSeparator': ',',
|
|
517
|
-
'groupData': {
|
|
518
|
-
'primary': 3
|
|
519
|
-
},
|
|
520
|
-
'maximumFraction': 2,
|
|
521
|
-
'minimumFraction': 2
|
|
522
|
-
},
|
|
523
|
-
'percentnData': {
|
|
524
|
-
'nlead': '-',
|
|
525
|
-
'nend': '%',
|
|
526
|
-
'groupSeparator': ',',
|
|
527
|
-
'groupData': {
|
|
528
|
-
'primary': 3
|
|
529
|
-
},
|
|
530
|
-
'maximumFraction': 2,
|
|
531
|
-
'minimumFraction': 2
|
|
532
|
-
},
|
|
533
|
-
'currencynData': {
|
|
534
|
-
'nlead': '($',
|
|
535
|
-
'nend': ')',
|
|
536
|
-
'groupSeparator': ',',
|
|
537
|
-
'groupData': {
|
|
538
|
-
'primary': 3
|
|
539
|
-
},
|
|
540
|
-
'maximumFraction': 2,
|
|
541
|
-
'minimumFraction': 2
|
|
542
|
-
},
|
|
543
|
-
'decimalnData': {
|
|
544
|
-
'nlead': '-',
|
|
545
|
-
'nend': '',
|
|
546
|
-
'groupData': {
|
|
547
|
-
'primary': 3
|
|
548
|
-
},
|
|
549
|
-
'maximumFraction': 2,
|
|
550
|
-
'minimumFraction': 2
|
|
551
|
-
},
|
|
552
|
-
'decimalpData': {
|
|
553
|
-
'nlead': '',
|
|
554
|
-
'nend': '',
|
|
555
|
-
'groupData': {
|
|
556
|
-
'primary': 3
|
|
557
|
-
},
|
|
558
|
-
'maximumFraction': 2,
|
|
559
|
-
'minimumFraction': 2
|
|
560
|
-
}
|
|
561
|
-
},
|
|
562
|
-
'dates': {
|
|
563
|
-
'dayPeriods': {
|
|
564
|
-
'am': 'AM',
|
|
565
|
-
'pm': 'PM'
|
|
566
|
-
},
|
|
567
|
-
'dateSeperator': '/',
|
|
568
|
-
'days': {
|
|
569
|
-
'abbreviated': {
|
|
570
|
-
'sun': 'Sun',
|
|
571
|
-
'mon': 'Mon',
|
|
572
|
-
'tue': 'Tue',
|
|
573
|
-
'wed': 'Wed',
|
|
574
|
-
'thu': 'Thu',
|
|
575
|
-
'fri': 'Fri',
|
|
576
|
-
'sat': 'Sat'
|
|
577
|
-
},
|
|
578
|
-
'short': {
|
|
579
|
-
'sun': 'Su',
|
|
580
|
-
'mon': 'Mo',
|
|
581
|
-
'tue': 'Tu',
|
|
582
|
-
'wed': 'We',
|
|
583
|
-
'thu': 'Th',
|
|
584
|
-
'fri': 'Fr',
|
|
585
|
-
'sat': 'Sa'
|
|
586
|
-
},
|
|
587
|
-
'wide': {
|
|
588
|
-
'sun': 'Sunday',
|
|
589
|
-
'mon': 'Monday',
|
|
590
|
-
'tue': 'Tuesday',
|
|
591
|
-
'wed': 'Wednesday',
|
|
592
|
-
'thu': 'Thursday',
|
|
593
|
-
'fri': 'Friday',
|
|
594
|
-
'sat': 'Saturday'
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
'months': {
|
|
598
|
-
'abbreviated': {
|
|
599
|
-
'1': 'Jan',
|
|
600
|
-
'2': 'Feb',
|
|
601
|
-
'3': 'Mar',
|
|
602
|
-
'4': 'Apr',
|
|
603
|
-
'5': 'May',
|
|
604
|
-
'6': 'Jun',
|
|
605
|
-
'7': 'Jul',
|
|
606
|
-
'8': 'Aug',
|
|
607
|
-
'9': 'Sep',
|
|
608
|
-
'10': 'Oct',
|
|
609
|
-
'11': 'Nov',
|
|
610
|
-
'12': 'Dec'
|
|
611
|
-
},
|
|
612
|
-
'wide': {
|
|
613
|
-
'1': 'January',
|
|
614
|
-
'2': 'February',
|
|
615
|
-
'3': 'March',
|
|
616
|
-
'4': 'April',
|
|
617
|
-
'5': 'May',
|
|
618
|
-
'6': 'June',
|
|
619
|
-
'7': 'July',
|
|
620
|
-
'8': 'August',
|
|
621
|
-
'9': 'September',
|
|
622
|
-
'10': 'October',
|
|
623
|
-
'11': 'November',
|
|
624
|
-
'12': 'December'
|
|
625
|
-
}
|
|
626
|
-
},
|
|
627
|
-
'eras': {
|
|
628
|
-
'1': 'AD'
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
};
|
|
476
|
+
IntlBase.blazorDefaultObject = {};
|
|
632
477
|
/* tslint:enable:quotemark */
|
|
633
478
|
IntlBase.monthIndex = {
|
|
634
479
|
3: 'abbreviated',
|
|
@@ -773,7 +618,6 @@ export var IntlBase;
|
|
|
773
618
|
var ret = {};
|
|
774
619
|
var pattern = matches[1].toUpperCase();
|
|
775
620
|
ret.isAccount = (pattern === 'A');
|
|
776
|
-
// eslint-disable-next-line
|
|
777
621
|
ret.type = IntlBase.patternMatcher[pattern];
|
|
778
622
|
if (skeleton.length > 1) {
|
|
779
623
|
ret.fractionDigits = parseInt(matches[2], 10);
|
|
@@ -861,7 +705,6 @@ export var IntlBase;
|
|
|
861
705
|
var formatSplit = format.split(';');
|
|
862
706
|
var data = ['pData', 'nData', 'zeroData'];
|
|
863
707
|
for (var i = 0; i < formatSplit.length; i++) {
|
|
864
|
-
// eslint-disable-next-line
|
|
865
708
|
options[data[i]] = customNumberFormat(formatSplit[i], dOptions, obj);
|
|
866
709
|
}
|
|
867
710
|
if (isNullOrUndefined(options.nData)) {
|
|
@@ -921,7 +764,6 @@ export var IntlBase;
|
|
|
921
764
|
if (!isNullOrUndefined(numObject)) {
|
|
922
765
|
var symbolPattern = getSymbolPattern(cOptions.type, dOptions.numberMapper.numberSystem, numObject, false);
|
|
923
766
|
if (cOptions.useGrouping) {
|
|
924
|
-
// eslint-disable-next-line
|
|
925
767
|
cOptions.groupSeparator = spaceGrouping ? ' ' : dOptions.numberMapper.numberSymbols[mapper[2]];
|
|
926
768
|
cOptions.groupData = NumberFormat.getGroupingDetails(symbolPattern.split(';')[0]);
|
|
927
769
|
}
|
|
@@ -946,9 +788,7 @@ export var IntlBase;
|
|
|
946
788
|
var part = parts[parseInt(i.toString(), 10)];
|
|
947
789
|
var loc = part.indexOf(actual);
|
|
948
790
|
if ((loc !== -1) && ((loc < part.indexOf('\'')) || (loc > part.lastIndexOf('\'')))) {
|
|
949
|
-
// eslint-disable-next-line
|
|
950
791
|
options[typeMapper[i]] = part.substr(0, loc) + symbol + part.substr(loc + 1);
|
|
951
|
-
// eslint-disable-next-line
|
|
952
792
|
options[typeMapper[actual]] = true;
|
|
953
793
|
options.type = options.isCurrency ? 'currency' : 'percent';
|
|
954
794
|
break;
|
|
@@ -987,7 +827,6 @@ export var IntlBase;
|
|
|
987
827
|
var actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);
|
|
988
828
|
if (isExcelFormat) {
|
|
989
829
|
actualPattern = actualPattern.replace(patternRegex, function (pattern) {
|
|
990
|
-
// eslint-disable-next-line
|
|
991
830
|
return patternMatch[pattern];
|
|
992
831
|
});
|
|
993
832
|
if (actualPattern.indexOf('z') !== -1) {
|
|
@@ -1020,10 +859,8 @@ export var IntlBase;
|
|
|
1020
859
|
* @param {any} option ?
|
|
1021
860
|
* @returns {any} ?
|
|
1022
861
|
*/
|
|
1023
|
-
// eslint-disable-next-line
|
|
1024
862
|
function processSymbol(actual, option) {
|
|
1025
863
|
if (actual.indexOf(',') !== -1) {
|
|
1026
|
-
// eslint-disable-next-line
|
|
1027
864
|
var split = actual.split(',');
|
|
1028
865
|
actual = (split[0] + getValue('numberMapper.numberSymbols.group', option) +
|
|
1029
866
|
split[1].replace('.', getValue('numberMapper.numberSymbols.decimal', option)));
|