Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-base

Package Overview
Dependencies
Maintainers
2
Versions
205
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-base - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

api.json

9

dist/es6/component.js

@@ -52,2 +52,5 @@ var __extends = (this && this.__extends) || (function () {

Component.prototype.destroy = function () {
if (this.isDestroyed) {
return;
}
this.localObserver.destroy();

@@ -128,3 +131,5 @@ if (this.refreshing) {

Component.prototype.notify = function (property, argument) {
this.localObserver.notify(property, argument);
if (this.isDestroyed !== true) {
this.localObserver.notify(property, argument);
}
};

@@ -163,2 +168,4 @@ Component.prototype.getInjectedModules = function () {

};
Component.prototype.clearTemplate = function (templateName) {
};
Component.prototype.addOnPersist = function (options) {

@@ -165,0 +172,0 @@ var _this = this;

3

dist/es6/draggable.js

@@ -342,6 +342,7 @@ var __extends = (this && this.__extends) || (function () {

var ele;
var prevStyle = this.helperElement.style.display || '';
if (evt.target === this.helperElement || evt.type.indexOf('touch') !== -1) {
this.helperElement.style.display = 'none';
ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
this.helperElement.style.display = '';
this.helperElement.style.display = prevStyle;
}

@@ -348,0 +349,0 @@ else {

@@ -28,3 +28,3 @@ var __extends = (this && this.__extends) || (function () {

'capslock': 20,
'space': 22,
'space': 32,
'escape': 27,

@@ -77,8 +77,12 @@ 'pageup': 33,

var key = keys_1[_i];
var rKeyObj = KeyboardEvents_1.getKeyConfigData(_this.keyConfigs[key]);
if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey &&
isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {
e.action = key;
if (_this.keyAction) {
_this.keyAction(e);
var configCollection = _this.keyConfigs[key].split(',');
for (var _a = 0, configCollection_1 = configCollection; _a < configCollection_1.length; _a++) {
var rconfig = configCollection_1[_a];
var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());
if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey &&
isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {
e.action = key;
if (_this.keyAction) {
_this.keyAction(e);
}
}

@@ -85,0 +89,0 @@ }

@@ -7,5 +7,10 @@ import { compile as render } from './template';

return function (data) {
var result = '' + compiler(data);
var ele = createElement((HAS_ROW.test(result) ? 'table' : 'div'), { innerHTML: result });
return ele.childNodes;
var result = compiler(data);
if (typeof result === 'string') {
var ele = createElement((HAS_ROW.test(result) ? 'table' : 'div'), { innerHTML: result });
return ele.childNodes;
}
else {
return result;
}
};

@@ -16,2 +21,5 @@ }

}
export function getTemplateEngine() {
return engineObj.compile;
}
var Engine = (function () {

@@ -18,0 +26,0 @@ function Engine() {

@@ -47,3 +47,3 @@ var __extends = (this && this.__extends) || (function () {

_this.tStampStart = Date.now();
_this.timeOutTapHold = setTimeout(function () { _this.tapholdEvent(evt); }, _this.tapholdThreshold);
_this.timeOutTapHold = setTimeout(function () { _this.tapHoldEvent(evt); }, _this.tapHoldThreshold);
EventHandler.add(_this.element, Browser.touchMoveEvent, _this.moveEvent, _this);

@@ -162,3 +162,3 @@ EventHandler.add(_this.element, Browser.touchEndEvent, _this.endEvent, _this);

};
Touch.prototype.tapholdEvent = function (evt) {
Touch.prototype.tapHoldEvent = function (evt) {
var eTapArgs;

@@ -168,3 +168,3 @@ EventHandler.remove(this.element, Browser.touchMoveEvent, this.moveEvent);

eTapArgs = { originalEvent: evt };
this.trigger('taphold', eTapArgs);
this.trigger('tapHold', eTapArgs);
};

@@ -225,3 +225,3 @@ Touch.prototype.calcPoints = function (evt) {

Event()
], Touch.prototype, "taphold", void 0);
], Touch.prototype, "tapHold", void 0);
__decorate([

@@ -238,3 +238,3 @@ Event()

Property(750)
], Touch.prototype, "tapholdThreshold", void 0);
], Touch.prototype, "tapHoldThreshold", void 0);
__decorate([

@@ -241,0 +241,0 @@ Complex({}, SwipeSettings)

@@ -0,0 +0,0 @@ import { ProtractorBrowser, promise } from 'protractor';

@@ -0,0 +0,0 @@ const os = require("os");

@@ -0,0 +0,0 @@ # EJ2 Component Development

{
"_args": [
[
{
"raw": "@syncfusion/ej2-base@*",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-base",
"name": "@syncfusion/ej2-base",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2"
]
],
"_from": "@syncfusion/ej2-base@*",
"_id": "@syncfusion/ej2-base@1.0.10",
"_inCache": true,
"_location": "/@syncfusion/ej2-base",
"_nodeVersion": "6.11.0",
"_npmUser": {
"name": "ej2",
"email": "pipeline@syncfusion.com"
},
"_npmVersion": "3.10.10",
"_phantomChildren": {},
"_requested": {
"raw": "@syncfusion/ej2-base@*",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-base",
"name": "@syncfusion/ej2-base",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"_requiredBy": [
"/@syncfusion/ej2",
"/@syncfusion/ej2-buttons",
"/@syncfusion/ej2-calendars",
"/@syncfusion/ej2-charts",
"/@syncfusion/ej2-data",
"/@syncfusion/ej2-grids",
"/@syncfusion/ej2-inputs",
"/@syncfusion/ej2-lists",
"/@syncfusion/ej2-navigations",
"/@syncfusion/ej2-ng-base",
"/@syncfusion/ej2-ng-buttons",
"/@syncfusion/ej2-ng-calendars",
"/@syncfusion/ej2-ng-charts",
"/@syncfusion/ej2-ng-grids",
"/@syncfusion/ej2-ng-inputs",
"/@syncfusion/ej2-ng-lists",
"/@syncfusion/ej2-ng-navigations",
"/@syncfusion/ej2-ng-popups",
"/@syncfusion/ej2-popups"
],
"_resolved": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-base/-/ej2-base-1.0.10.tgz",
"_shasum": "765573cff5dbac6b182ca8f94376fe5e961edd23",
"_shrinkwrap": null,
"_spec": "@syncfusion/ej2-base@*",
"_where": "C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2",
"author": {
"name": "Syncfusion Inc."
},
"bugs": {
"url": "https://github.com/syncfusion/ej2-base/issues"
},
"dependencies": {},
"description": "Essential JS 2 Base library",
"devDependencies": {
"@types/chai": "^3.4.28",
"@types/jasmine": "^2.2.29",
"@types/jasmine-ajax": "^3.1.27",
"@types/requirejs": "^2.1.26"
},
"dist": {
"shasum": "765573cff5dbac6b182ca8f94376fe5e961edd23",
"tarball": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-base/-/ej2-base-1.0.10.tgz"
},
"gitHead": "355f5032d6005332e5a705047ed1a48ad243a038",
"homepage": "https://github.com/syncfusion/ej2-base#readme",
"name": "@syncfusion/ej2-base",
"version": "1.0.11",
"description": "Syncfusion TypeScript Base library",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
"keywords": [

@@ -89,23 +14,15 @@ "ej2",

],
"license": "SEE LICENSE IN license",
"maintainers": [
{
"name": "ej2",
"email": "pipeline@syncfusion.com"
}
],
"module": "dist/es6/index.js",
"name": "@syncfusion/ej2-base",
"optionalDependencies": {},
"readme": "ReadMe.md",
"repository": {
"type": "git",
"url": "git+https://github.com/syncfusion/ej2-base.git"
"url": "https://github.com/syncfusion/ej2-base.git"
},
"scripts": {
"ci-publish": "gulp ci-publish",
"compile": "gulp ci-compile",
"test": "gulp ci-test"
},
"version": "1.0.10"
"module": "dist/es6/index.js",
"readme": "ReadMe.md",
"dependencies": {},
"devDependencies": {
"@types/chai": "^3.4.28",
"@types/jasmine": "^2.2.29",
"@types/jasmine-ajax": "^3.1.27",
"@types/requirejs": "^2.1.26"
}
}

@@ -6,7 +6,4 @@ A common package of Essential JS 2 base libraries, methods and class definitions. It comes with full documentation and support and is available under commercial and community licenses – please visit www.syncfusion.com to get started.

# 1.0.10
## Changelog
## Bug Fixes
- Resolved DateParser issue in Chinese culture, when the date string is in 12 hours format.
Check the changelog [here](https://github.com/syncfusion/ej2-base/blob/master/CHANGELOG.md)

@@ -1,2 +0,2 @@

import { createElement, selectAll, closest } from './dom'; import { Base, EmitType } from './base'; import { EventHandler } from './event-handler'; import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';
import { createElement, selectAll, closest } from './dom';import { Base, EmitType } from './base';import { EventHandler } from './event-handler';import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';
import {Effect,AnimationOptions} from "./animation";

@@ -10,25 +10,25 @@

/**
* Specify the type of animation * @default : 'FadeIn'; */ name?: Effect;
* Specify the type of animation * @default : 'FadeIn'; */ name?: Effect;
/**
* Specify the duration to animate * @default : 400; */ duration?: number;
* Specify the duration to animate * @default : 400; */ duration?: number;
/**
* Specify the animation timing function * @default : 'ease'; */ timingFunction?: string;
* Specify the animation timing function * @default : 'ease'; */ timingFunction?: string;
/**
* Specify the delay to start animation * @default : 0; */ delay?: number;
* Specify the delay to start animation * @default : 0; */ delay?: number;
/**
* Triggers when animation is in-progress * @event */ progress?: EmitType<AnimationOptions>;
* Triggers when animation is in-progress * @event */ progress?: EmitType<AnimationOptions>;
/**
* Triggers when the animation is started * @event */ begin?: EmitType<AnimationOptions>;
* Triggers when the animation is started * @event */ begin?: EmitType<AnimationOptions>;
/**
* Triggers when animation is completed * @event */ end?: EmitType<AnimationOptions>;
* Triggers when animation is completed * @event */ end?: EmitType<AnimationOptions>;
/**
* Triggers when animation is failed due to any scripts * @event */ fail?: EmitType<AnimationOptions>;
* Triggers when animation is failed due to any scripts * @event */ fail?: EmitType<AnimationOptions>;
}

@@ -55,7 +55,5 @@ import { Observer } from './observer';

protected saveChanges(key: string, newValue: string, oldValue: string): void;
/** END of property base section */
/** Event Base Section */
/**
* To attaches an event handler to the current component context.
* It is used for managing the sample side event properties which are not used internal event calling within the component.
* Adds the handler to given event listener.
* @param {string} eventName - A String that specifies the name of the event

@@ -67,3 +65,3 @@ * @param {Function} listener - Specifies the call to run when the event occurs.

/**
* To remove an event handler that has been attached with the addEventListener() method.
* Removes the handler from the given event listener.
* @param {string} eventName - A String that specifies the name of the event to remove

@@ -75,3 +73,3 @@ * @param {Function} listener - Specifies the function to remove

/**
* To triggers the handlers in the specified event.
* Triggers the handlers in the specified event.
* @private

@@ -84,3 +82,2 @@ * @param {string} eventName - Specifies the event to trigger for the specified component properties.

trigger(eventName: string, eventProp?: Object): void;
/** End of event Base Section */
/**

@@ -87,0 +84,0 @@ * Base constructor accept options and element

@@ -1,2 +0,2 @@

import { isUndefined, getValue, isNullOrUndefined, setValue, getUniqueID } from './util'; import { ModuleLoader, ModuleDeclaration } from './module-loader'; import { Base } from './base'; import { Observer, BoundOptions } from './observer'; import { ChildProperty } from './child-property'; import { Property, NotifyPropertyChanges } from './notify-property-change'; import { onIntlChange, rightToLeft, defaultCulture } from './internationalization';
import { isUndefined, getValue, isNullOrUndefined, setValue, getUniqueID } from './util';import { ModuleLoader, ModuleDeclaration } from './module-loader';import { Base } from './base';import { Observer, BoundOptions } from './observer';import { ChildProperty } from './child-property';import { Property, NotifyPropertyChanges } from './notify-property-change';import { onIntlChange, rightToLeft, defaultCulture } from './internationalization';

@@ -9,10 +9,10 @@ /**

/**
* Enable or disable persisting component's state between page reloads. * @default false */ enablePersistence?: boolean;
* Enable or disable persisting component's state between page reloads. * @default false */ enablePersistence?: boolean;
/**
* Enable or disable rendering component in right to left direction. * @default false */ enableRtl?: boolean;
* Enable or disable rendering component in right to left direction. * @default false */ enableRtl?: boolean;
/**
* Overrides the global culture and localization value for this component. Default Global culture is 'en-US' * @default undefined */ locale?: string;
* Overrides the global culture and localization value for this component. Default Global culture is 'en-US' * @default undefined */ locale?: string;
}

@@ -92,2 +92,3 @@ import { ModuleLoader, ModuleDeclaration } from './module-loader';

private setPersistData();
protected clearTemplate(templateName?: string[]): void;
protected addOnPersist(options: string[]): string;

@@ -94,0 +95,0 @@ protected getActualProperties<T>(obj: T): T;

@@ -48,2 +48,5 @@ var __extends = (this && this.__extends) || (function () {

Component.prototype.destroy = function () {
if (this.isDestroyed) {
return;
}
this.localObserver.destroy();

@@ -124,3 +127,5 @@ if (this.refreshing) {

Component.prototype.notify = function (property, argument) {
this.localObserver.notify(property, argument);
if (this.isDestroyed !== true) {
this.localObserver.notify(property, argument);
}
};

@@ -159,2 +164,4 @@ Component.prototype.getInjectedModules = function () {

};
Component.prototype.clearTemplate = function (templateName) {
};
Component.prototype.addOnPersist = function (options) {

@@ -161,0 +168,0 @@ var _this = this;

@@ -1,2 +0,2 @@

import { Base } from './base'; import { Browser } from './browser'; import { isVisible } from './dom'; import { Property, Complex, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change'; import { EventHandler } from './event-handler'; import { ChildProperty } from './child-property'; import { select, closest, setStyleAttribute, addClass, createElement } from './dom'; import { extend, isUndefined, isNullOrUndefined, compareElementParent } from './util';
import { Base } from './base';import { Browser } from './browser';import { isVisible } from './dom';import { Property, Complex, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';import { EventHandler } from './event-handler';import { ChildProperty } from './child-property';import { select, closest, setStyleAttribute, addClass, createElement } from './dom';import { extend, isUndefined, isNullOrUndefined, compareElementParent } from './util';

@@ -9,12 +9,12 @@ /**

/**
* Property specifies the left position of cursor in draggable. */ left?: number;
* Property specifies the left position of cursor in draggable. */ left?: number;
/**
* Property specifies the right position of cursor in draggable. */ right?: number;
* Property specifies the right position of cursor in draggable. */ right?: number;
/**
* Property specifies the left position of cursor in draggable. */ top?: number;
* Property specifies the left position of cursor in draggable. */ top?: number;
/**
* Property specifies the left position of cursor in draggable. */ bottom?: number;
* Property specifies the left position of cursor in draggable. */ bottom?: number;

@@ -30,37 +30,37 @@ }

/**
* Change the cursor position of draggable */ cursorAt?: PositionModel;
* Change the cursor position of draggable */ cursorAt?: PositionModel;
/**
* Specifies whether to clone the draggable element or not. * @default true */ clone?: boolean;
* Specifies whether to clone the draggable element or not. * @default true */ clone?: boolean;
/**
* Specifies the area in which dragging to happen. */ dragArea?: HTMLElement | string;
* Specifies the area in which dragging to happen. */ dragArea?: HTMLElement | string;
/**
* Specifies the callback function for drag event. * @event */ drag?: Function;
* Specifies the callback function for drag event. * @event */ drag?: Function;
/**
* Specifies the callback function for dragStart event. * @event */ dragStart?: Function;
* Specifies the callback function for dragStart event. * @event */ dragStart?: Function;
/**
* Specifies the callback function for dragStop event. * @event */ dragStop?: Function;
* Specifies the callback function for dragStop event. * @event */ dragStop?: Function;
/**
* Specifies the minimum distance draggable element moved to perform dragging operation. * @default 1 */ distance?: number;
* Specifies the minimum distance draggable element moved to perform dragging operation. * @default 1 */ distance?: number;
/**
* Specifies the selector for the child element by which parent element can be dragged. */ handle?: string;
* Specifies the selector for the child element by which parent element can be dragged. */ handle?: string;
/**
* Specifies the selector for the child element to prevent the dragging of the parent element by selecting the child. */ abort?: string;
* Specifies the selector for the child element to prevent the dragging of the parent element by selecting the child. */ abort?: string;
/**
* Defines the function for customizing the draggable element on cloning. */ helper?: Function;
* Defines the function for customizing the draggable element on cloning. */ helper?: Function;
/**
* Defines the current score for grouping draggable and droppable. */ scope?: string;
* Defines the current score for grouping draggable and droppable. */ scope?: string;
/**
* Specifies the dragTarget by which the clone element is positioned if not given current context element will be considered. */ dragTarget?: string;
* Specifies the dragTarget by which the clone element is positioned if not given current context element will be considered. */ dragTarget?: string;
}

@@ -337,6 +337,7 @@ var __extends = (this && this.__extends) || (function () {

var ele;
var prevStyle = this.helperElement.style.display || '';
if (evt.target === this.helperElement || evt.type.indexOf('touch') !== -1) {
this.helperElement.style.display = 'none';
ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
this.helperElement.style.display = '';
this.helperElement.style.display = prevStyle;
}

@@ -343,0 +344,0 @@ else {

@@ -1,2 +0,2 @@

import { Base } from './base'; import { Browser } from './browser'; import { isVisible, matches } from './dom'; import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change'; import { EventHandler } from './event-handler'; import { compareElementParent } from './util'; import {Coordinates, DropInfo} from './draggable';
import { Base } from './base';import { Browser } from './browser';import { isVisible, matches } from './dom';import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';import { EventHandler } from './event-handler';import { compareElementParent } from './util';import {Coordinates, DropInfo} from './draggable';
import {DropEventArgs} from "./droppable";

@@ -11,16 +11,16 @@

/**
* Specifies the acceptable element selector in droppable element */ accept?: string;
* Specifies the acceptable element selector in droppable element */ accept?: string;
/**
* Defines the current score for grouping draggable and droppable. */ scope?: string;
* Defines the current score for grouping draggable and droppable. */ scope?: string;
/**
* Specifies the callback function for drop event. * @event */ drop?: (args: DropEventArgs) => void;
* Specifies the callback function for drop event. * @event */ drop?: (args: DropEventArgs) => void;
/**
* Specifies the callback function for element over the draggable event. * @event */ over?: Function;
* Specifies the callback function for element over the draggable event. * @event */ over?: Function;
/**
* Specifies the callback function for element out of the draggable event. * @event */ out?: Function;
* Specifies the callback function for element out of the draggable event. * @event */ out?: Function;
}

@@ -1,2 +0,2 @@

import { selectAll, select, createElement } from './dom'; import { Base, EmitType } from './base'; import { extend, isNullOrUndefined, IKeyValue } from './util'; import { EventHandler } from './event-handler'; import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';
import { selectAll, select, createElement } from './dom';import { Base, EmitType } from './base';import { extend, isNullOrUndefined, IKeyValue } from './util';import { EventHandler } from './event-handler';import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';
import {ErrorOption} from "./form-validator";

@@ -10,46 +10,46 @@

/**
* Ignores input fields based on the class name * @default 'e-hidden'; */ ignore?: string;
* Ignores input fields based on the class name * @default 'e-hidden'; */ ignore?: string;
/**
* Maps the input fields with validation rules * @default {}; */ rules?: { [name: string]: { [rule: string]: Object } };
* Maps the input fields with validation rules * @default {}; */ rules?: { [name: string]: { [rule: string]: Object } };
/**
* Sets the defined css class to error fields * @default 'e-error'; */ errorClass?: string;
* Sets the defined css class to error fields * @default 'e-error'; */ errorClass?: string;
/**
* Sets the defined css class to valid fields * @default : 'e-valid'; */ validClass?: string;
* Sets the defined css class to valid fields * @default : 'e-valid'; */ validClass?: string;
/**
* Specify HTML element for error * @default : 'label'; */ errorElement?: string;
* Specify HTML element for error * @default : 'label'; */ errorElement?: string;
/**
* Specify HTML element for error container * @default : 'div'; */ errorContainer?: string;
* Specify HTML element for error container * @default : 'div'; */ errorContainer?: string;
/**
* Option to display the error * @default : ErrorOption.Label; */ errorOption?: ErrorOption;
* Option to display the error * @default : ErrorOption.Label; */ errorOption?: ErrorOption;
/**
* Triggers when a field's focused out * @event */ focusout?: EmitType<Event>;
* Triggers when a field's focused out * @event */ focusout?: EmitType<Event>;
/**
* Trigger when keyup is triggered in any fields * @event */ keyup?: EmitType<KeyboardEvent>;
* Trigger when keyup is triggered in any fields * @event */ keyup?: EmitType<KeyboardEvent>;
/**
* Triggers when a check box field is clicked * @event */ click?: EmitType<Event>;
* Triggers when a check box field is clicked * @event */ click?: EmitType<Event>;
/**
* Trigger when a select/drop-down field is changed * @event */ change?: EmitType<Event>;
* Trigger when a select/drop-down field is changed * @event */ change?: EmitType<Event>;
/**
* Triggers before form is being submitted * @event */ submit?: EmitType<Event>;
* Triggers before form is being submitted * @event */ submit?: EmitType<Event>;
/**
* Triggers before validation starts * @event */ validationBegin?: EmitType<Object>;
* Triggers before validation starts * @event */ validationBegin?: EmitType<Object>;
/**
* Triggers after validation is completed * @event */ validationComplete?: EmitType<Object>;
* Triggers after validation is completed * @event */ validationComplete?: EmitType<Object>;
/**
* Assigns the custom function to place the error message in the page. * @event */ customPlacement?: EmitType<Object>;
* Assigns the custom function to place the error message in the page. * @event */ customPlacement?: EmitType<Object>;
}

@@ -1,2 +0,2 @@

import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change'; import { Base, EmitType } from './base';
import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';import { Base, EmitType } from './base';
import {KeyboardEventArgs} from "./keyboard";

@@ -10,10 +10,10 @@

/**
* Specifies key combination and it respective action name. * @default null */ keyConfigs?: { [key: string]: string };
* Specifies key combination and it respective action name. * @default null */ keyConfigs?: { [key: string]: string };
/**
* Specifies on which event keyboardEvents class should listen for key press. For ex., `keyup`, `keydown` or `keypress` * @default keyup */ eventName?: string;
* Specifies on which event keyboardEvents class should listen for key press. For ex., `keyup`, `keydown` or `keypress` * @default keyup */ eventName?: string;
/**
* Specifies the listener when keyboard actions is performed. * @event */ keyAction?: EmitType<KeyboardEventArgs>;
* Specifies the listener when keyboard actions is performed. * @event */ keyAction?: EmitType<KeyboardEventArgs>;
}

@@ -29,3 +29,3 @@ var __extends = (this && this.__extends) || (function () {

'capslock': 20,
'space': 22,
'space': 32,
'escape': 27,

@@ -78,8 +78,12 @@ 'pageup': 33,

var key = keys_1[_i];
var rKeyObj = KeyboardEvents_1.getKeyConfigData(_this.keyConfigs[key]);
if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey &&
isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {
e.action = key;
if (_this.keyAction) {
_this.keyAction(e);
var configCollection = _this.keyConfigs[key].split(',');
for (var _a = 0, configCollection_1 = configCollection; _a < configCollection_1.length; _a++) {
var rconfig = configCollection_1[_a];
var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());
if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey &&
isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {
e.action = key;
if (_this.keyAction) {
_this.keyAction(e);
}
}

@@ -86,0 +90,0 @@ }

@@ -0,0 +0,0 @@ /**

@@ -18,1 +18,6 @@ /**

export declare function setTemplateEngine(classObj: ITemplateEngine): void;
/**
* Get current template engine for template rendering.
* @param {ITemplateEngine} classObj - Class object for custom template.
*/
export declare function getTemplateEngine(): (template: string, helper?: object) => (data: Object | JSON) => string;

@@ -8,5 +8,10 @@ define(["require", "exports", "./template", "./dom"], function (require, exports, template_1, dom_1) {

return function (data) {
var result = '' + compiler(data);
var ele = dom_1.createElement((HAS_ROW.test(result) ? 'table' : 'div'), { innerHTML: result });
return ele.childNodes;
var result = compiler(data);
if (typeof result === 'string') {
var ele = dom_1.createElement((HAS_ROW.test(result) ? 'table' : 'div'), { innerHTML: result });
return ele.childNodes;
}
else {
return result;
}
};

@@ -19,2 +24,6 @@ }

exports.setTemplateEngine = setTemplateEngine;
function getTemplateEngine() {
return engineObj.compile;
}
exports.getTemplateEngine = getTemplateEngine;
var Engine = (function () {

@@ -21,0 +30,0 @@ function Engine() {

@@ -1,2 +0,2 @@

import { extend, isNullOrUndefined } from './util'; import { Property, Complex, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change'; import { Browser } from './browser'; import { Base, EmitType } from './base'; import { ChildProperty } from './child-property'; import { EventHandler, BaseEventArgs } from './event-handler';
import { extend, isNullOrUndefined } from './util';import { Property, Complex, NotifyPropertyChanges, INotifyPropertyChanged, Event } from './notify-property-change';import { Browser } from './browser';import { Base, EmitType } from './base';import { ChildProperty } from './child-property';import { EventHandler, BaseEventArgs } from './event-handler';
import {TapEventArgs,SwipeEventArgs,ScrollEventArgs} from "./touch";

@@ -11,3 +11,3 @@

/**
* Property specifies minimum distance of swipe moved. */ swipeThresholdDistance?: number;
* Property specifies minimum distance of swipe moved. */ swipeThresholdDistance?: number;

@@ -22,25 +22,25 @@ }

/**
* Specifies the callback function for tap event. * @event */ tap?: EmitType<TapEventArgs>;
* Specifies the callback function for tap event. * @event */ tap?: EmitType<TapEventArgs>;
/**
* Specifies the callback function for doubleTap event. * @event */ doubleTap?: EmitType<TapEventArgs>;
* Specifies the callback function for doubleTap event. * @event */ doubleTap?: EmitType<TapEventArgs>;
/**
* Specifies the callback function for taphold event. * @event */ taphold?: EmitType<TapEventArgs>;
* Specifies the callback function for tapHold event. * @event */ tapHold?: EmitType<TapEventArgs>;
/**
* Specifies the callback function for swipe event. * @event */ swipe?: EmitType<SwipeEventArgs>;
* Specifies the callback function for swipe event. * @event */ swipe?: EmitType<SwipeEventArgs>;
/**
* Specifies the callback function for scroll event. * @event */ scroll?: EmitType<ScrollEventArgs>;
* Specifies the callback function for scroll event. * @event */ scroll?: EmitType<ScrollEventArgs>;
/**
* Specifies the time delay for doubleTap. * @default 500 */ doubleTapThreshold?: number;
* Specifies the time delay for doubleTap. * @default 500 */ doubleTapThreshold?: number;
/**
* Specifies the time delay for tap hold. * @default 750 */ tapholdThreshold?: number;
* Specifies the time delay for tap hold. * @default 750 */ tapHoldThreshold?: number;
/**
* Customize the swipe event configuration. * @default { swipeThresholdDistance: 50 } */ swipeSettings?: SwipeSettingsModel;
* Customize the swipe event configuration. * @default { swipeThresholdDistance: 50 } */ swipeSettings?: SwipeSettingsModel;
}

@@ -28,3 +28,3 @@ import { INotifyPropertyChanged } from './notify-property-change';

* }
* taphold: function (e) {
* tapHold: function (e) {
* // tap hold handler function code

@@ -70,6 +70,6 @@ * }

/**
* Specifies the callback function for taphold event.
* Specifies the callback function for tapHold event.
* @event
*/
taphold: EmitType<TapEventArgs>;
tapHold: EmitType<TapEventArgs>;
/**

@@ -94,3 +94,3 @@ * Specifies the callback function for swipe event.

*/
tapholdThreshold: number;
tapHoldThreshold: number;
/**

@@ -130,3 +130,3 @@ * Customize the swipe event configuration.

private moveEvent;
private tapholdEvent(evt);
private tapHoldEvent(evt);
private endEvent;

@@ -133,0 +133,0 @@ private calcPoints(evt);

@@ -44,3 +44,3 @@ var __extends = (this && this.__extends) || (function () {

_this.tStampStart = Date.now();
_this.timeOutTapHold = setTimeout(function () { _this.tapholdEvent(evt); }, _this.tapholdThreshold);
_this.timeOutTapHold = setTimeout(function () { _this.tapHoldEvent(evt); }, _this.tapHoldThreshold);
event_handler_1.EventHandler.add(_this.element, browser_1.Browser.touchMoveEvent, _this.moveEvent, _this);

@@ -159,3 +159,3 @@ event_handler_1.EventHandler.add(_this.element, browser_1.Browser.touchEndEvent, _this.endEvent, _this);

};
Touch.prototype.tapholdEvent = function (evt) {
Touch.prototype.tapHoldEvent = function (evt) {
var eTapArgs;

@@ -165,3 +165,3 @@ event_handler_1.EventHandler.remove(this.element, browser_1.Browser.touchMoveEvent, this.moveEvent);

eTapArgs = { originalEvent: evt };
this.trigger('taphold', eTapArgs);
this.trigger('tapHold', eTapArgs);
};

@@ -222,3 +222,3 @@ Touch.prototype.calcPoints = function (evt) {

notify_property_change_1.Event()
], Touch.prototype, "taphold", void 0);
], Touch.prototype, "tapHold", void 0);
__decorate([

@@ -235,3 +235,3 @@ notify_property_change_1.Event()

notify_property_change_1.Property(750)
], Touch.prototype, "tapholdThreshold", void 0);
], Touch.prototype, "tapHoldThreshold", void 0);
__decorate([

@@ -238,0 +238,0 @@ notify_property_change_1.Complex({}, SwipeSettings)

@@ -5,3 +5,3 @@ /**

export interface IKeyValue extends CSSStyleDeclaration {
[key: string]: Object;
[key: string]: any;
}

@@ -8,0 +8,0 @@ /**

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc