@syncfusion/ej2-angular-base 20.2.49 → 20.3.50

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.
@@ -0,0 +1,143 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { isNullOrUndefined } from '@syncfusion/ej2-base';
3
+ /**
4
+ * Angular Utility Module
5
+ */
6
+
7
+ /* tslint:disable */
8
+ export function applyMixins(derivedClass: any, baseClass: any[]): void {
9
+ baseClass.forEach(baseClass => {
10
+ Object.getOwnPropertyNames(baseClass.prototype).forEach(name => {
11
+ if (!derivedClass.prototype.hasOwnProperty(name) || baseClass.isFormBase) {
12
+ derivedClass.prototype[name] = baseClass.prototype[name];
13
+ }
14
+ });
15
+ });
16
+ }
17
+
18
+ /* tslint:disable */
19
+ export function ComponentMixins(baseClass: Function[]): ClassDecorator {
20
+ return function (derivedClass: Function) {
21
+ applyMixins(derivedClass, baseClass);
22
+ };
23
+ }
24
+
25
+ /**
26
+ * @private
27
+ */
28
+ export function registerEvents(eventList: string[], obj: any, direct?: boolean): void {
29
+ let ngEventsEmitter: { [key: string]: Object } = {};
30
+ if (eventList && eventList.length) {
31
+ for (let event of eventList) {
32
+ if (direct === true) {
33
+ obj.propCollection[event] = new EventEmitter(false);
34
+ obj[event] = obj.propCollection[event];
35
+ } else {
36
+ ngEventsEmitter[event] = new EventEmitter(false);
37
+ }
38
+ }
39
+ if (direct !== true) {
40
+ obj.setProperties(ngEventsEmitter, true);
41
+ }
42
+ }
43
+ }
44
+
45
+ /**
46
+ * @private
47
+ */
48
+ export function clearTemplate(_this: any, templateNames?: string[], index?: any): void {
49
+ let regTemplates: string[] = Object.keys(_this.registeredTemplate);
50
+ if (regTemplates.length) {
51
+ /* istanbul ignore next */
52
+ let regProperties: string[] = templateNames && templateNames.filter(
53
+ (val: string) => {
54
+ return (/\./g.test(val) ? false : true);
55
+ });
56
+ for (let registeredTemplate of (regProperties && regProperties || regTemplates)) {
57
+ /* istanbul ignore next */
58
+ if (index && index.length) {
59
+ for (let e = 0; e < index.length; e++) {
60
+ for (let m = 0; m < _this.registeredTemplate.template.length; m++) {
61
+ let value = _this.registeredTemplate.template[m].rootNodes[0];
62
+ if (value === index[e]) {
63
+ let rt = _this.registeredTemplate[registeredTemplate];
64
+ rt[m].destroy();
65
+ }
66
+ }
67
+ }
68
+ } else {
69
+ if (_this.registeredTemplate[registeredTemplate]) {
70
+ for (let rt of _this.registeredTemplate[registeredTemplate]) {
71
+ if (!rt.destroyed) {
72
+ if (rt._view) {
73
+ let pNode: any = rt._view.renderer.parentNode(rt.rootNodes[0]);
74
+ if (!isNullOrUndefined(pNode)) {
75
+ for (let m: number = 0; m < rt.rootNodes.length; m++) {
76
+ pNode.appendChild(rt.rootNodes[m]);
77
+ }
78
+ }
79
+ }
80
+ rt.destroy();
81
+ }
82
+ }
83
+ }
84
+ }
85
+ delete _this.registeredTemplate[registeredTemplate];
86
+ }
87
+ }
88
+ for (let tagObject of _this.tagObjects) {
89
+ if (tagObject.instance) {
90
+ /* istanbul ignore next */
91
+ tagObject.instance.clearTemplate((templateNames && templateNames.filter(
92
+ (val: string) => {
93
+ return (new RegExp(tagObject.name).test(val) ? true : false);
94
+ })));
95
+ }
96
+ }
97
+ }
98
+
99
+ /**
100
+ * To set value for the nameSpace in desired object.
101
+ * @param {string} nameSpace - String value to the get the inner object
102
+ * @param {any} value - Value that you need to set.
103
+ * @param {any} obj - Object to get the inner object value.
104
+ * @return {void}
105
+ * @private
106
+ */
107
+ export function setValue(nameSpace: string, value: any, object: any): any {
108
+ let keys: string[] = nameSpace.replace(/\[/g, '.').replace(/\]/g, '').split('.');
109
+ /* istanbul ignore next */
110
+ let fromObj: any = object || {};
111
+ for (let i: number = 0; i < keys.length; i++) {
112
+ let key: string = keys[i];
113
+ if (i + 1 === keys.length) {
114
+ fromObj[key] = value === undefined ? {} : value;
115
+ } else if (fromObj[key] === undefined) {
116
+ fromObj[key] = {};
117
+ }
118
+ fromObj = fromObj[key];
119
+ }
120
+ return fromObj;
121
+ }
122
+
123
+ /* tslint:enable */
124
+
125
+
126
+
127
+
128
+ export interface PropertyCollectionInfo {
129
+ props: PropertyDetails[];
130
+ complexProps: PropertyDetails[];
131
+ colProps: PropertyDetails[];
132
+ events: PropertyDetails[];
133
+ propNames: string[];
134
+ complexPropNames: string[];
135
+ colPropNames: string[];
136
+ eventNames: string[];
137
+ }
138
+
139
+ export interface PropertyDetails {
140
+ propertyName: string;
141
+ type: FunctionConstructor | Object;
142
+ defaultValue: Object;
143
+ }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-angular-base@*",
3
- "_id": "@syncfusion/ej2-angular-base@20.2.48",
3
+ "_id": "@syncfusion/ej2-angular-base@20.3.1",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-VVVESDx14RUKqRIzP/S1BE2scncdXi8JVIJINUQbIUzIfwJ/vi3yYWb+zpg4f71tJOkkzutyLenrX5vKcCAdcQ==",
5
+ "_integrity": "sha512-g5qyk1R4lobmLIVMi3xryHNIbm+1Mw9NejAIaILfZWl6tDpM/GyqLrTorin+ulE20HQ0yrDnXDwsG+/uq1eYRA==",
6
6
  "_location": "/@syncfusion/ej2-angular-base",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -18,20 +18,30 @@
18
18
  },
19
19
  "_requiredBy": [
20
20
  "/",
21
+ "/@syncfusion/ej2-angular-buttons",
22
+ "/@syncfusion/ej2-angular-calendars",
21
23
  "/@syncfusion/ej2-angular-charts",
22
24
  "/@syncfusion/ej2-angular-diagrams",
23
25
  "/@syncfusion/ej2-angular-documenteditor",
26
+ "/@syncfusion/ej2-angular-dropdowns",
24
27
  "/@syncfusion/ej2-angular-gantt",
25
28
  "/@syncfusion/ej2-angular-grids",
29
+ "/@syncfusion/ej2-angular-heatmap",
30
+ "/@syncfusion/ej2-angular-image-editor",
31
+ "/@syncfusion/ej2-angular-inputs",
32
+ "/@syncfusion/ej2-angular-lists",
26
33
  "/@syncfusion/ej2-angular-navigations",
27
34
  "/@syncfusion/ej2-angular-pdfviewer",
35
+ "/@syncfusion/ej2-angular-pivotview",
28
36
  "/@syncfusion/ej2-angular-popups",
37
+ "/@syncfusion/ej2-angular-querybuilder",
29
38
  "/@syncfusion/ej2-angular-richtexteditor",
39
+ "/@syncfusion/ej2-angular-schedule",
30
40
  "/@syncfusion/ej2-angular-spreadsheet",
31
41
  "/@syncfusion/ej2-angular-treegrid"
32
42
  ],
33
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-angular-base/-/ej2-angular-base-20.2.48.tgz",
34
- "_shasum": "8fdfd45ca9994ca1e4d9ff694ef85e5b4c274f65",
43
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-angular-base/-/ej2-angular-base-20.3.1.tgz",
44
+ "_shasum": "ff689191d5306dde0b27a376d4b6c84a65eec63a",
35
45
  "_spec": "@syncfusion/ej2-angular-base@*",
36
46
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
37
47
  "author": {
@@ -42,8 +52,8 @@
42
52
  },
43
53
  "bundleDependencies": false,
44
54
  "dependencies": {
45
- "@syncfusion/ej2-base": "~20.2.48",
46
- "@syncfusion/ej2-icons": "~20.2.45",
55
+ "@syncfusion/ej2-base": "~20.3.50",
56
+ "@syncfusion/ej2-icons": "~20.3.47",
47
57
  "core-js": "^3.4.8",
48
58
  "reflect-metadata": "^0.1.9",
49
59
  "rxjs": "^6.5.4",
@@ -75,6 +85,6 @@
75
85
  "postinstall": "node ./postinstall.js"
76
86
  },
77
87
  "typings": "index.d.ts",
78
- "version": "20.2.49",
88
+ "version": "20.3.50",
79
89
  "sideEffects": true
80
90
  }
@@ -9,6 +9,9 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  function getProjectFromWorkspace(workspace, projectName) {
11
11
  let project = workspace.projects[projectName || workspace.defaultProject];
12
+ if (workspace.defaultProject === undefined) {
13
+ project = workspace.projects[projectName || Object.keys(workspace.projects)[0]];
14
+ }
12
15
  if (!project) {
13
16
  throw new Error(`Could not find project in workspace: ${projectName}`);
14
17
  }
package/src/form-base.js CHANGED
@@ -59,21 +59,22 @@ var FormBase = /** @class */ (function () {
59
59
  };
60
60
  // tslint:disable-next-line:no-any
61
61
  FormBase.prototype.ngAfterViewInit = function (isTempRef) {
62
+ var _this = this;
62
63
  // tslint:disable-next-line:no-any
63
64
  var tempFormAfterViewThis = isTempRef || this;
64
65
  // Used setTimeout for template binding
65
66
  // Refer Link: https://github.com/angular/angular/issues/6005
66
67
  // Removed setTimeout, Because we have called markForCheck() method in Angular Template Compiler
67
- // setTimeout(() => {
68
- /* istanbul ignore else */
69
- if (typeof window !== 'undefined') {
70
- tempFormAfterViewThis.appendTo(tempFormAfterViewThis.element);
71
- var ele = tempFormAfterViewThis.inputElement || tempFormAfterViewThis.element;
72
- ele.addEventListener('focus', tempFormAfterViewThis.ngOnFocus.bind(tempFormAfterViewThis));
73
- ele.addEventListener('blur', tempFormAfterViewThis.ngOnBlur.bind(tempFormAfterViewThis));
74
- }
75
- this.isFormInit = false;
76
- // });
68
+ setTimeout(function () {
69
+ /* istanbul ignore else */
70
+ if (typeof window !== 'undefined') {
71
+ tempFormAfterViewThis.appendTo(tempFormAfterViewThis.element);
72
+ var ele = tempFormAfterViewThis.inputElement || tempFormAfterViewThis.element;
73
+ ele.addEventListener('focus', tempFormAfterViewThis.ngOnFocus.bind(tempFormAfterViewThis));
74
+ ele.addEventListener('blur', tempFormAfterViewThis.ngOnBlur.bind(tempFormAfterViewThis));
75
+ }
76
+ _this.isFormInit = false;
77
+ });
77
78
  };
78
79
  FormBase.prototype.setDisabledState = function (disabled) {
79
80
  this.enabled = !disabled;
package/src/template.js CHANGED
@@ -17,7 +17,7 @@ export function compile(templateEle, helper) {
17
17
  /* istanbul ignore next */
18
18
  var conRef = contRef_1 ? contRef_1 : component.viewContainerRef;
19
19
  var viewRef = conRef.createEmbeddedView(templateEle, context);
20
- viewRef.markForCheck();
20
+ viewRef.detectChanges();
21
21
  /* istanbul ignore next */
22
22
  var viewCollection = (component && component.registeredTemplate) ?
23
23
  component.registeredTemplate : getValue('currentInstance.registeredTemplate', conRef);