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.8 to 1.0.10

dist/es6/intl/date-formatter.js

1

dist/es6/base.js

@@ -10,2 +10,3 @@ import { isUndefined, isNullOrUndefined, merge, setImmediate, setValue } from './util';

this.oldProperties = {};
this.refreshing = false;
this.finalUpdate = function () { };

@@ -12,0 +13,0 @@ this.childChangedProperties = {};

3

dist/es6/browser.js

@@ -13,3 +13,3 @@ import { isUndefined } from './util';

EDGE: /(edge)(?:.*version|)[ \/]([\w.]+)/i,
CHROME: /(chrome)[ \/]([\w.]+)/i,
CHROME: /(chrome|crios)[ \/]([\w.]+)/i,
PANTHOMEJS: /(phantomjs)[ \/]([\w.]+)/i,

@@ -34,2 +34,3 @@ SAFARI: /(safari)[ \/]([\w.]+)/i,

browserInfo.name = (clientInfo[1].toLowerCase() === 'opr' ? 'opera' : clientInfo[1].toLowerCase());
browserInfo.name = (clientInfo[1].toLowerCase() === 'crios' ? 'chrome' : browserInfo.name);
browserInfo.version = clientInfo[2];

@@ -36,0 +37,0 @@ browserInfo.culture.name = browserInfo.culture.language = navigator.language;

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

Component.prototype.destroy = function () {
this.localObserver.destroy();
if (this.refreshing) {
return;
}
this.trigger('destroyed', { cancel: false });
_super.prototype.destroy.call(this);
this.moduleLoader.clean();
onIntlChange.off('notifyExternalChange', this.detectFunction);
this.moduleLoader.clean();
this.localObserver.destroy();
if (this.enablePersistence) {

@@ -63,6 +66,10 @@ this.setPersistData();

Component.prototype.refresh = function () {
this.refreshing = true;
this.destroy();
this.clearChanges();
this.localObserver = new Observer(this);
this.preRender();
this.injectModules();
this.render();
this.refreshing = false;
};

@@ -69,0 +76,0 @@ Component.prototype.appendTo = function (selector) {

@@ -19,2 +19,2 @@ export * from './ajax';

export * from './touch';
export * from './template';
export * from './template-engine';

@@ -1,6 +0,6 @@

import { DateFormat } from './Internationalization/date-formatter';
import { NumberFormat } from './Internationalization/number-formatter';
import { DateParser } from './Internationalization/date-parser';
import { NumberParser } from './Internationalization/number-parser';
import { IntlBase } from './Internationalization/intl-base';
import { DateFormat } from './intl/date-formatter';
import { NumberFormat } from './intl/number-formatter';
import { DateParser } from './intl/date-parser';
import { NumberParser } from './intl/number-parser';
import { IntlBase } from './intl/intl-base';
import { extend, getValue } from './util';

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

@@ -8,8 +8,12 @@ import { createInstance, isUndefined, merge, extend, getValue } from './util';

}
function getObjectArray(instance, curKey, defaultValue, type, isSetter) {
function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactory) {
var result = [];
var len = defaultValue.length;
for (var i = 0; i < len; i++) {
var curType = type;
if (isFactory) {
curType = type(defaultValue[i]);
}
if (isSetter) {
var inst = createInstance(type, [instance, curKey, {}, true]);
var inst = createInstance(curType, [instance, curKey, {}, true]);
inst.setProperties(defaultValue[i], true);

@@ -19,3 +23,3 @@ result.push(inst);

else {
result.push(createInstance(type, [instance, curKey, defaultValue[i], true]));
result.push(createInstance(curType, [instance, curKey, defaultValue[i], true]));
}

@@ -52,6 +56,18 @@ }

}
function complexFactoryGetter(defaultValue, curKey, type) {
return function () {
var curType = type({});
return getObject(this, curKey, defaultValue, curType);
};
}
function complexFactorySetter(defaultValue, curKey, type) {
return function (newValue) {
var curType = type(newValue);
getObject(this, curKey, defaultValue, curType).setProperties(newValue);
};
}
function complexArrayGetter(defaultValue, curKey, type) {
return function () {
if (!this.properties.hasOwnProperty(curKey)) {
var defCollection = getObjectArray(this, curKey, defaultValue, type);
var defCollection = getObjectArray(this, curKey, defaultValue, type, false);
this.properties[curKey] = defCollection;

@@ -64,3 +80,3 @@ }

return function (newValue) {
var oldValueCollection = getObjectArray(this, curKey, defaultValue, type);
var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, false);
var newValCollection = getObjectArray(this, curKey, newValue, type, true);

@@ -71,2 +87,20 @@ this.saveChanges(curKey, newValCollection, oldValueCollection);

}
function complexArrayFactorySetter(defaultValue, curKey, type) {
return function (newValue) {
var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, false, true);
var newValCollection = getObjectArray(this, curKey, newValue, type, true, true);
this.saveChanges(curKey, newValCollection, oldValueCollection);
this.properties[curKey] = newValCollection;
};
}
function complexArrayFactoryGetter(defaultValue, curKey, type) {
return function () {
var curType = type({});
if (!this.properties.hasOwnProperty(curKey)) {
var defCollection = getObjectArray(this, curKey, defaultValue, curType, false);
this.properties[curKey] = defCollection;
}
return this.properties[curKey];
};
}
export function Property(defaultValue) {

@@ -96,2 +130,14 @@ return function (target, key) {

}
export function ComplexFactory(type) {
return function (target, key) {
var propertyDescriptor = {
set: complexFactorySetter({}, key, type),
get: complexFactoryGetter({}, key, type),
enumerable: true,
configurable: true
};
Object.defineProperty(target, key, propertyDescriptor);
addPropertyCollection(target, key, 'complexProp', {}, type);
};
}
export function Collection(defaultValue, type) {

@@ -109,2 +155,14 @@ return function (target, key) {

}
export function CollectionFactory(type) {
return function (target, key) {
var propertyDescriptor = {
set: complexArrayFactorySetter([], key, type),
get: complexArrayFactoryGetter([], key, type),
enumerable: true,
configurable: true
};
Object.defineProperty(target, key, propertyDescriptor);
addPropertyCollection(target, key, 'colProp', {}, type);
};
}
export function Event() {

@@ -111,0 +169,0 @@ return function (target, key) {

import { compile as render } from './template';
import { createElement } from './dom';
var HAS_ROW = /^[\n\r.]+\<tr|^\<tr/;
export function compile(templateString, helper) {
return engineObj.compile(templateString, helper);
var compiler = engineObj.compile(templateString, helper);
return function (data) {
var result = '' + compiler(data);
var ele = createElement((HAS_ROW.test(result) ? 'table' : 'div'), { innerHTML: result });
return ele.childNodes;
};
}

@@ -12,2 +19,3 @@ export function setTemplateEngine(classObj) {

Engine.prototype.compile = function (templateString, helper) {
if (helper === void 0) { helper = {}; }
return render(templateString, helper);

@@ -14,0 +22,0 @@ };

@@ -13,41 +13,13 @@ {

},
"D:\\release\\packages\\node_modules\\@syncfusion\\ej2"
],
[
{
"raw": "@syncfusion/ej2-base@^1.0.0",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-base",
"name": "@syncfusion/ej2-base",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"C:\\Users\\ajithr\\Desktop\\pack\\node_modules\\@syncfusion\\ej2"
],
[
{
"raw": "@syncfusion/ej2-base@^1.0.0",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-base",
"name": "@syncfusion/ej2-base",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"C:\\Users\\ajithr\\Desktop\\npm\\node_modules\\@syncfusion\\ej2"
"C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2"
]
],
"_from": "@syncfusion/ej2-base@^1.0.0",
"_id": "@syncfusion/ej2-base@1.0.5",
"_from": "@syncfusion/ej2-base@*",
"_id": "@syncfusion/ej2-base@1.0.10",
"_inCache": true,
"_location": "/@syncfusion/ej2-base",
"_nodeVersion": "6.10.2",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/ej2-base-1.0.5.tgz_1494508014413_0.1744333051610738"
},
"_nodeVersion": "6.11.0",
"_npmUser": {
"name": "ajithr11",
"email": "ajithr@syncfusion.com"
"name": "ej2",
"email": "pipeline@syncfusion.com"
},

@@ -57,8 +29,8 @@ "_npmVersion": "3.10.10",

"_requested": {
"raw": "@syncfusion/ej2-base@^1.0.0",
"raw": "@syncfusion/ej2-base@*",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-base",
"name": "@syncfusion/ej2-base",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"rawSpec": "*",
"spec": "*",
"type": "range"

@@ -82,2 +54,3 @@ },

"/@syncfusion/ej2-ng-inputs",
"/@syncfusion/ej2-ng-lists",
"/@syncfusion/ej2-ng-navigations",

@@ -87,7 +60,7 @@ "/@syncfusion/ej2-ng-popups",

],
"_resolved": "https://registry.npmjs.org/@syncfusion/ej2-base/-/ej2-base-1.0.5.tgz",
"_shasum": "dd6b419e489fecd3bed0d0ce4063a8a9655f695d",
"_resolved": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-base/-/ej2-base-1.0.10.tgz",
"_shasum": "765573cff5dbac6b182ca8f94376fe5e961edd23",
"_shrinkwrap": null,
"_spec": "@syncfusion/ej2-base@^1.0.0",
"_where": "C:\\Users\\ajithr\\Desktop\\npm\\node_modules\\@syncfusion\\ej2",
"_spec": "@syncfusion/ej2-base@*",
"_where": "C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2",
"author": {

@@ -99,14 +72,6 @@ "name": "Syncfusion Inc."

},
"config": {
"ghooks": {
"pre-commit": "gulp pre-commit",
"pre-push": "gulp pre-push",
"commit-msg": "gulp commit-msg"
}
},
"dependencies": {},
"description": "Syncfusion TypeScript Base library",
"description": "Essential JS 2 Base library",
"devDependencies": {
"@types/chai": "^3.4.28",
"@types/es6-promise": "0.0.28",
"@types/jasmine": "^2.2.29",

@@ -116,8 +81,7 @@ "@types/jasmine-ajax": "^3.1.27",

},
"directories": {},
"dist": {
"shasum": "dd6b419e489fecd3bed0d0ce4063a8a9655f695d",
"tarball": "https://registry.npmjs.org/@syncfusion/ej2-base/-/ej2-base-1.0.5.tgz"
"shasum": "765573cff5dbac6b182ca8f94376fe5e961edd23",
"tarball": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-base/-/ej2-base-1.0.10.tgz"
},
"gitHead": "f98b0b9d4c85bb791409b802e7e0479ae085c28a",
"gitHead": "355f5032d6005332e5a705047ed1a48ad243a038",
"homepage": "https://github.com/syncfusion/ej2-base#readme",

@@ -127,3 +91,5 @@ "keywords": [

"syncfusion",
"ej2-base"
"ej2 base",
"base",
"library"
],

@@ -133,8 +99,4 @@ "license": "SEE LICENSE IN license",

{
"name": "ajithr11",
"email": "ajithr@syncfusion.com"
},
{
"name": "syncfusionorg",
"email": "npmjs@syncfusion.com"
"name": "ej2",
"email": "pipeline@syncfusion.com"
}

@@ -145,3 +107,3 @@ ],

"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"readme": "ReadMe.md",
"repository": {

@@ -156,3 +118,3 @@ "type": "git",

},
"version": "1.0.8"
}
"version": "1.0.10"
}

@@ -1,4 +0,11 @@

A common package of Essential JS 2 base libraries, methods and class definitions.
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.
## Resources
[Demos](http://ej2.syncfusion.com/demos/)
[Demos](http://ej2.syncfusion.com/demos/)
# 1.0.10
## Bug Fixes
- Resolved DateParser issue in Chinese culture, when the date string is in 12 hours format.

@@ -115,2 +115,3 @@ import { Base, EmitType } from './base';

* Animation event argument for progress event handler
* @private
*/

@@ -117,0 +118,0 @@ export interface AnimationOptions extends AnimationModel {

@@ -26,2 +26,3 @@ import { Observer } from './observer';

};
protected refreshing: boolean;
protected finalUpdate: Function;

@@ -28,0 +29,0 @@ protected modelObserver: Observer;

@@ -10,2 +10,3 @@ define(["require", "exports", "./util", "./dom", "./observer"], function (require, exports, util_1, dom_1, observer_1) {

this.oldProperties = {};
this.refreshing = false;
this.finalUpdate = function () { };

@@ -12,0 +13,0 @@ this.childChangedProperties = {};

@@ -15,3 +15,3 @@ define(["require", "exports", "./util"], function (require, exports, util_1) {

EDGE: /(edge)(?:.*version|)[ \/]([\w.]+)/i,
CHROME: /(chrome)[ \/]([\w.]+)/i,
CHROME: /(chrome|crios)[ \/]([\w.]+)/i,
PANTHOMEJS: /(phantomjs)[ \/]([\w.]+)/i,

@@ -36,2 +36,3 @@ SAFARI: /(safari)[ \/]([\w.]+)/i,

browserInfo.name = (clientInfo[1].toLowerCase() === 'opr' ? 'opera' : clientInfo[1].toLowerCase());
browserInfo.name = (clientInfo[1].toLowerCase() === 'crios' ? 'chrome' : browserInfo.name);
browserInfo.version = clientInfo[2];

@@ -38,0 +39,0 @@ browserInfo.culture.name = browserInfo.culture.language = navigator.language;

@@ -9,10 +9,10 @@ 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';

/**
* Enable or disable persisting component's state between page reloads. */ 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. */ 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. */ locale?: string;
* Overrides the global culture and localization value for this component. Default Global culture is 'en-US' * @default undefined */ locale?: string;
}

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

* Enable or disable persisting component's state between page reloads.
* @default false
*/

@@ -17,6 +18,8 @@ enablePersistence: 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.
* Overrides the global culture and localization value for this component. Default Global culture is 'en-US'
* @default undefined
*/

@@ -46,3 +49,3 @@ locale: string;

/**
* Apply the pending property changes immediately to the component
* When invoked applies the pending property changes immediately to the component.
*/

@@ -49,0 +52,0 @@ dataBind(): void;

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

Component.prototype.destroy = function () {
this.localObserver.destroy();
if (this.refreshing) {
return;
}
this.trigger('destroyed', { cancel: false });
_super.prototype.destroy.call(this);
this.moduleLoader.clean();
internationalization_1.onIntlChange.off('notifyExternalChange', this.detectFunction);
this.moduleLoader.clean();
this.localObserver.destroy();
if (this.enablePersistence) {

@@ -59,6 +62,10 @@ this.setPersistData();

Component.prototype.refresh = function () {
this.refreshing = true;
this.destroy();
this.clearChanges();
this.localObserver = new observer_1.Observer(this);
this.preRender();
this.injectModules();
this.render();
this.refreshing = false;
};

@@ -65,0 +72,0 @@ Component.prototype.appendTo = function (selector) {

@@ -69,3 +69,3 @@ import { Base } from './base';

/**
* sepecifies current instance collection in element
* Specifies current instance collection in element
*/

@@ -72,0 +72,0 @@ ej2_instances: {

@@ -59,2 +59,3 @@ /**

* Common Event argument for all base Essential JavaScript 2 Events.
* @private
*/

@@ -61,0 +62,0 @@ export interface BaseEventArgs {

@@ -6,2 +6,3 @@ import { Base, EmitType } from './base';

* ErrorOption values
* @private
*/

@@ -8,0 +9,0 @@ export declare enum ErrorOption {

@@ -28,2 +28,2 @@ /**

export * from './touch-model';
export * from './template';
export * from './template-engine';

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

define(["require", "exports", "./ajax", "./animation", "./base", "./browser", "./canvas-renderer", "./component", "./child-property", "./draggable", "./droppable", "./event-handler", "./form-validator", "./internationalization", "./keyboard", "./l10n", "./module-loader", "./notify-property-change", "./svg-renderer", "./touch", "./template"], function (require, exports, ajax_1, animation_1, base_1, browser_1, canvas_renderer_1, component_1, child_property_1, draggable_1, droppable_1, event_handler_1, form_validator_1, internationalization_1, keyboard_1, l10n_1, module_loader_1, notify_property_change_1, svg_renderer_1, touch_1, template_1) {
define(["require", "exports", "./ajax", "./animation", "./base", "./browser", "./canvas-renderer", "./component", "./child-property", "./draggable", "./droppable", "./event-handler", "./form-validator", "./internationalization", "./keyboard", "./l10n", "./module-loader", "./notify-property-change", "./svg-renderer", "./touch", "./template-engine"], function (require, exports, ajax_1, animation_1, base_1, browser_1, canvas_renderer_1, component_1, child_property_1, draggable_1, droppable_1, event_handler_1, form_validator_1, internationalization_1, keyboard_1, l10n_1, module_loader_1, notify_property_change_1, svg_renderer_1, touch_1, template_engine_1) {
"use strict";

@@ -25,3 +25,3 @@ function __export(m) {

__export(touch_1);
__export(template_1);
__export(template_engine_1);
});

@@ -12,2 +12,3 @@ import { Observer } from './observer';

* Interface for dateFormatOptions
* @private
*/

@@ -30,2 +31,3 @@ export interface DateFormatOptions {

* Interface for numberFormatOptions
* @private
*/

@@ -32,0 +34,0 @@ export interface NumberFormatOptions {

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

define(["require", "exports", "./Internationalization/date-formatter", "./Internationalization/number-formatter", "./Internationalization/date-parser", "./Internationalization/number-parser", "./Internationalization/intl-base", "./util", "./observer"], function (require, exports, date_formatter_1, number_formatter_1, date_parser_1, number_parser_1, intl_base_1, util_1, observer_1) {
define(["require", "exports", "./intl/date-formatter", "./intl/number-formatter", "./intl/date-parser", "./intl/number-parser", "./intl/intl-base", "./util", "./observer"], function (require, exports, date_formatter_1, number_formatter_1, date_parser_1, number_parser_1, intl_base_1, util_1, observer_1) {
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -21,2 +21,12 @@ /**

/**
* Method used to create complex Factory property. General syntax below.
* @param {Function} defaultType - Specifies the default value of property.
* @param {Function} type - Specifies the class factory type of complex object.
* ```
* @ComplexFactory(defaultType, factoryFunction)
* propertyName: Type1 | Type2;
* ```
*/
export declare function ComplexFactory(type: Function): PropertyDecorator;
/**
* Method used to create complex array property. General syntax below.

@@ -32,2 +42,12 @@ * @param {T[]} defaultValue - Specifies the default value of property.

/**
* Method used to create complex factory array property. General syntax below.
* @param {T[]} defaultType - Specifies the default type of property.
* @param {Function} type - Specifies the class type of complex object.
* ```
* @Collection([], Type);
* propertyName: Type;
* ```
*/
export declare function CollectionFactory(type: Function): PropertyDecorator;
/**
* Method used to create event property. General syntax below.

@@ -34,0 +54,0 @@ * @param {Function} defaultValue? - Specifies the default value of property.

@@ -10,8 +10,12 @@ define(["require", "exports", "./util"], function (require, exports, util_1) {

}
function getObjectArray(instance, curKey, defaultValue, type, isSetter) {
function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactory) {
var result = [];
var len = defaultValue.length;
for (var i = 0; i < len; i++) {
var curType = type;
if (isFactory) {
curType = type(defaultValue[i]);
}
if (isSetter) {
var inst = util_1.createInstance(type, [instance, curKey, {}, true]);
var inst = util_1.createInstance(curType, [instance, curKey, {}, true]);
inst.setProperties(defaultValue[i], true);

@@ -21,3 +25,3 @@ result.push(inst);

else {
result.push(util_1.createInstance(type, [instance, curKey, defaultValue[i], true]));
result.push(util_1.createInstance(curType, [instance, curKey, defaultValue[i], true]));
}

@@ -54,6 +58,18 @@ }

}
function complexFactoryGetter(defaultValue, curKey, type) {
return function () {
var curType = type({});
return getObject(this, curKey, defaultValue, curType);
};
}
function complexFactorySetter(defaultValue, curKey, type) {
return function (newValue) {
var curType = type(newValue);
getObject(this, curKey, defaultValue, curType).setProperties(newValue);
};
}
function complexArrayGetter(defaultValue, curKey, type) {
return function () {
if (!this.properties.hasOwnProperty(curKey)) {
var defCollection = getObjectArray(this, curKey, defaultValue, type);
var defCollection = getObjectArray(this, curKey, defaultValue, type, false);
this.properties[curKey] = defCollection;

@@ -66,3 +82,3 @@ }

return function (newValue) {
var oldValueCollection = getObjectArray(this, curKey, defaultValue, type);
var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, false);
var newValCollection = getObjectArray(this, curKey, newValue, type, true);

@@ -73,2 +89,20 @@ this.saveChanges(curKey, newValCollection, oldValueCollection);

}
function complexArrayFactorySetter(defaultValue, curKey, type) {
return function (newValue) {
var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, false, true);
var newValCollection = getObjectArray(this, curKey, newValue, type, true, true);
this.saveChanges(curKey, newValCollection, oldValueCollection);
this.properties[curKey] = newValCollection;
};
}
function complexArrayFactoryGetter(defaultValue, curKey, type) {
return function () {
var curType = type({});
if (!this.properties.hasOwnProperty(curKey)) {
var defCollection = getObjectArray(this, curKey, defaultValue, curType, false);
this.properties[curKey] = defCollection;
}
return this.properties[curKey];
};
}
function Property(defaultValue) {

@@ -100,2 +134,15 @@ return function (target, key) {

exports.Complex = Complex;
function ComplexFactory(type) {
return function (target, key) {
var propertyDescriptor = {
set: complexFactorySetter({}, key, type),
get: complexFactoryGetter({}, key, type),
enumerable: true,
configurable: true
};
Object.defineProperty(target, key, propertyDescriptor);
addPropertyCollection(target, key, 'complexProp', {}, type);
};
}
exports.ComplexFactory = ComplexFactory;
function Collection(defaultValue, type) {

@@ -114,2 +161,15 @@ return function (target, key) {

exports.Collection = Collection;
function CollectionFactory(type) {
return function (target, key) {
var propertyDescriptor = {
set: complexArrayFactorySetter([], key, type),
get: complexArrayFactoryGetter([], key, type),
enumerable: true,
configurable: true
};
Object.defineProperty(target, key, propertyDescriptor);
addPropertyCollection(target, key, 'colProp', {}, type);
};
}
exports.CollectionFactory = CollectionFactory;
function Event() {

@@ -116,0 +176,0 @@ return function (target, key) {

@@ -12,3 +12,3 @@ /**

*/
export declare function compile(templateString: string, helper?: Object): (data: Object | JSON) => string;
export declare function compile(templateString: string, helper?: Object): (data: Object | JSON) => HTMLCollection;
/**

@@ -15,0 +15,0 @@ * Set your custom template engine for template rendering.

@@ -1,6 +0,12 @@

define(["require", "exports", "./template"], function (require, exports, template_1) {
define(["require", "exports", "./template", "./dom"], function (require, exports, template_1, dom_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var HAS_ROW = /^[\n\r.]+\<tr|^\<tr/;
function compile(templateString, helper) {
return engineObj.compile(templateString, helper);
var compiler = engineObj.compile(templateString, helper);
return function (data) {
var result = '' + compiler(data);
var ele = dom_1.createElement((HAS_ROW.test(result) ? 'table' : 'div'), { innerHTML: result });
return ele.childNodes;
};
}

@@ -16,2 +22,3 @@ exports.compile = compile;

Engine.prototype.compile = function (templateString, helper) {
if (helper === void 0) { helper = {}; }
return template_1.compile(templateString, helper);

@@ -18,0 +25,0 @@ };

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

* The argument type of `Tap` Event
* @private
*/

@@ -146,2 +147,3 @@ export interface TapEventArgs extends BaseEventArgs {

* The argument type of `Scroll` Event
* @private
*/

@@ -184,2 +186,3 @@ export interface ScrollEventArgs extends BaseEventArgs {

* The argument type of `Swipe` Event
* @private
*/

@@ -186,0 +189,0 @@ export interface SwipeEventArgs extends BaseEventArgs {

@@ -115,3 +115,3 @@ /**

* To throw custom error message.
* @param{string} - Specifies the error message to be throwned.
* @param{string} - Specifies the error message to be thrown.
*/

@@ -118,0 +118,0 @@ export declare function throwError(message: string): void;

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

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

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

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