@syncfusion/ej2-angular-base 20.1.52 → 20.2.37
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/CHANGELOG.md +15 -6
- package/README.md +1 -1
- package/dist/ej2-angular-base.umd.min.js +1 -10
- package/dist/ej2-angular-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-angular-base.es2015.js +11 -30
- package/dist/es6/ej2-angular-base.es2015.js.map +1 -1
- package/dist/es6/ej2-angular-base.es5.js +11 -30
- package/dist/es6/ej2-angular-base.es5.js.map +1 -1
- package/dist/global/ej2-angular-base.min.js +1 -10
- package/dist/global/ej2-angular-base.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +100 -83
- package/schematics/generators/component-builder.js +14 -14
- package/schematics/generators/template/schema.json +1 -1
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/ng-add/theme.js +5 -4
- package/schematics/utils/helpers/helpers.d.ts +1 -1
- package/schematics/utils/project-style-file.js +2 -2
- package/src/complex-array-base.js +5 -12
- package/src/component-base.js +4 -17
- package/src/form-base.d.ts +1 -1
- package/src/form-base.js +1 -1
- package/src/template.js +1 -0
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const change_1 = require("@schematics/angular/utility/change");
|
|
4
|
-
const
|
|
4
|
+
const helpers_1 = require("../utils/helpers/helpers");
|
|
5
5
|
const get_project_1 = require("../utils/get-project");
|
|
6
6
|
const package_1 = require("../utils/package");
|
|
7
7
|
const project_style_file_1 = require("../utils/project-style-file");
|
|
@@ -21,12 +21,13 @@ exports.addEJ2ThemeToPackageJson = addEJ2ThemeToPackageJson;
|
|
|
21
21
|
*/
|
|
22
22
|
function addEJ2Theme(options, theme) {
|
|
23
23
|
return (host) => {
|
|
24
|
-
|
|
24
|
+
let themePath = `@import \'..\/node_modules/@syncfusion/ej2-${theme}-theme/styles/${theme}.css\'`;
|
|
25
25
|
const strippedThemePath = `./node_modules/@syncfusion/ej2-${theme}-theme/styles/${theme}.css`;
|
|
26
|
-
const workspace =
|
|
26
|
+
const workspace = helpers_1.getWorkspace(host);
|
|
27
27
|
const project = get_project_1.getProjectFromWorkspace(workspace, options.project);
|
|
28
|
-
const stylesPath = project_style_file_1.getProjectStyleFile(project
|
|
28
|
+
const stylesPath = project_style_file_1.getProjectStyleFile(project);
|
|
29
29
|
const stylesBuffer = host.read(stylesPath);
|
|
30
|
+
themePath += stylesPath.includes("sass") ? `\n` : `;\n`;
|
|
30
31
|
// Because the build setup for the Angular CLI can be changed so dramatically, we can't know
|
|
31
32
|
// where to generate anything if the project is not using the default config for build and test.
|
|
32
33
|
project_style_file_1.assertDefaultBuildersConfigured(project);
|
|
@@ -93,7 +93,7 @@ export interface ProjectBuildOptions {
|
|
|
93
93
|
[k: string]: any;
|
|
94
94
|
}
|
|
95
95
|
/** Gets the Angular CLI workspace config (angular.json) */
|
|
96
|
-
export declare function getWorkspace(host: Tree):
|
|
96
|
+
export declare function getWorkspace(host: Tree): any;
|
|
97
97
|
/**
|
|
98
98
|
* Gets a project from the Angular CLI workspace. If no project name is given, the first project
|
|
99
99
|
* will be retrieved.
|
|
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
const core_1 = require("@angular-devkit/core");
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
12
|
/** Regular expression that matches all possible Angular CLI default style files. */
|
|
13
|
-
const defaultStyleFileRegex = /styles\.(c|le|sc)ss/;
|
|
13
|
+
const defaultStyleFileRegex = /styles\.(c|le|sa|sc)ss/;
|
|
14
14
|
/** Regular expression that matches all files that have a proper stylesheet extension. */
|
|
15
|
-
const validStyleFileRegex = /\.(c|le|sc)ss/;
|
|
15
|
+
const validStyleFileRegex = /\.(c|le|sa|sc)ss/;
|
|
16
16
|
/**
|
|
17
17
|
* Gets a style file with the given extension in a project and returns its path. If no
|
|
18
18
|
* extension is specified, any style file with a valid extension will be returned.
|
|
@@ -21,14 +21,8 @@ var ComplexBase = /** @class */ (function () {
|
|
|
21
21
|
var templateProperties = Object.keys(this);
|
|
22
22
|
for (var i = 0; i < templateProperties.length; i++) {
|
|
23
23
|
var tempProp = getValue(templateProperties[i], this);
|
|
24
|
-
if (typeof tempProp === 'object' && tempProp &&
|
|
25
|
-
|
|
26
|
-
setValue(templateProperties[i].indexOf('Ref') !== -1 ? templateProperties[i] : templateProperties[i] + 'Ref', tempProp, this);
|
|
27
|
-
}
|
|
28
|
-
if (getValue("viewContainerRef", this) && !getValue("_viewContainerRef", tempProp.elementRef.nativeElement) && !getValue("propName", tempProp.elementRef.nativeElement)) {
|
|
29
|
-
setValue("_viewContainerRef", getValue("viewContainerRef", this), tempProp.elementRef.nativeElement);
|
|
30
|
-
setValue("propName", templateProperties[i].replace("Ref", ''), tempProp.elementRef.nativeElement);
|
|
31
|
-
}
|
|
24
|
+
if (typeof tempProp === 'object' && tempProp.elementRef && !getValue(templateProperties[i] + 'Ref', this)) {
|
|
25
|
+
setValue(templateProperties[i] + 'Ref', tempProp, this);
|
|
32
26
|
}
|
|
33
27
|
}
|
|
34
28
|
templateProperties = Object.keys(this);
|
|
@@ -47,7 +41,7 @@ var ComplexBase = /** @class */ (function () {
|
|
|
47
41
|
if (this.directivePropList) {
|
|
48
42
|
for (var k = 0; k < this.directivePropList.length; k++) {
|
|
49
43
|
var dirPropName = this.directivePropList[k];
|
|
50
|
-
if (propList.indexOf(dirPropName) !== -1 &&
|
|
44
|
+
if (propList.indexOf(dirPropName) !== -1 && getValue(dirPropName, this)) {
|
|
51
45
|
setValue(dirPropName, getValue(dirPropName, this), this.propCollection);
|
|
52
46
|
}
|
|
53
47
|
}
|
|
@@ -181,9 +175,8 @@ var ArrayBase = /** @class */ (function () {
|
|
|
181
175
|
this.list[i].propCollection.dataSource = this.list[i].dataSource;
|
|
182
176
|
this.list[i].hasChanges = true;
|
|
183
177
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
isSourceChanged = true;
|
|
178
|
+
isSourceChanged = (JSON.stringify(this.list[i].propCollection.dataSource) !==
|
|
179
|
+
JSON.stringify(childrenDataSource[i].propCollection.dataSource));
|
|
187
180
|
}
|
|
188
181
|
}
|
|
189
182
|
}
|
package/src/component-base.js
CHANGED
|
@@ -75,19 +75,6 @@ var ComponentBase = /** @class */ (function () {
|
|
|
75
75
|
tempOnThis.tagObjects.push(tagObject);
|
|
76
76
|
}
|
|
77
77
|
var complexTemplates = Object.keys(tempOnThis);
|
|
78
|
-
for (var i = 0; i < complexTemplates.length; i++) {
|
|
79
|
-
var compProp = getValue(complexTemplates[i], tempOnThis);
|
|
80
|
-
if (typeof compProp === 'object' && compProp && compProp.elementRef) {
|
|
81
|
-
if (typeof compProp === 'object' && compProp && compProp.elementRef && complexTemplates[i].indexOf('_') !== -1 && complexTemplates[i].indexOf('Ref') === -1) {
|
|
82
|
-
setValue(complexTemplates[i] + 'Ref', compProp, tempOnThis);
|
|
83
|
-
}
|
|
84
|
-
if (tempOnThis.viewContainerRef && !getValue("_viewContainerRef", compProp.elementRef.nativeElement) && !getValue("propName", compProp.elementRef.nativeElement)) {
|
|
85
|
-
setValue("_viewContainerRef", tempOnThis.viewContainerRef, compProp.elementRef.nativeElement);
|
|
86
|
-
setValue("propName", complexTemplates[i].replace("Ref", ''), compProp.elementRef.nativeElement);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
complexTemplates = Object.keys(tempOnThis);
|
|
91
78
|
complexTemplates = complexTemplates.filter(function (val) {
|
|
92
79
|
return /Ref$/i.test(val) && /\_/i.test(val);
|
|
93
80
|
});
|
|
@@ -146,7 +133,7 @@ var ComponentBase = /** @class */ (function () {
|
|
|
146
133
|
// Refer Link: https://github.com/angular/angular/issues/6005
|
|
147
134
|
setTimeout(function () {
|
|
148
135
|
/* istanbul ignore else */
|
|
149
|
-
if (typeof window !== 'undefined' &&
|
|
136
|
+
if (typeof window !== 'undefined' && document.body.contains(tempAfterViewThis.element)) {
|
|
150
137
|
tempAfterViewThis.appendTo(tempAfterViewThis.element);
|
|
151
138
|
tempAfterViewThis.ngEle.nativeElement.style.visibility = '';
|
|
152
139
|
}
|
|
@@ -158,7 +145,7 @@ var ComponentBase = /** @class */ (function () {
|
|
|
158
145
|
var tempOnDestroyThis = isTempRef || this;
|
|
159
146
|
/* istanbul ignore else */
|
|
160
147
|
setTimeout(function () {
|
|
161
|
-
if (typeof window !== 'undefined' && (tempOnDestroyThis.element.classList.contains('e-control'))
|
|
148
|
+
if (typeof window !== 'undefined' && document.body.contains(tempOnDestroyThis.element) && tempOnDestroyThis.element.classList.contains('e-control')) {
|
|
162
149
|
tempOnDestroyThis.destroy();
|
|
163
150
|
tempOnDestroyThis.clearTemplate(null);
|
|
164
151
|
// removing bounded events and tagobjects from component after destroy
|
|
@@ -232,7 +219,7 @@ var ComponentBase = /** @class */ (function () {
|
|
|
232
219
|
}
|
|
233
220
|
else {
|
|
234
221
|
/* istanbul ignore next */
|
|
235
|
-
if ((tempAfterContentThis[tagObject.name].length !== tagObject.instance.list.length) || (
|
|
222
|
+
if ((tempAfterContentThis[tagObject.name].length !== tagObject.instance.list.length) || (tempAfterContentThis.getModuleName() === 'diagram')) {
|
|
236
223
|
tempAfterContentThis[tagObject.name] = tagObject.instance.list;
|
|
237
224
|
}
|
|
238
225
|
for (var _b = 0, _c = tagObject.instance.list; _b < _c.length; _b++) {
|
|
@@ -243,7 +230,7 @@ var ComponentBase = /** @class */ (function () {
|
|
|
243
230
|
complexTemplates = complexTemplates.filter(function (val) {
|
|
244
231
|
return /Ref$/i.test(val);
|
|
245
232
|
});
|
|
246
|
-
if (curChild.properties && Object.keys(curChild.properties).length !== 0) {
|
|
233
|
+
if (curChild.properties && Object.keys(curChild.properties).length !== 0 && /chart/.test(tempAfterContentThis.getModuleName())) {
|
|
247
234
|
for (var _d = 0, complexTemplates_2 = complexTemplates; _d < complexTemplates_2.length; _d++) {
|
|
248
235
|
var complexPropName = complexTemplates_2[_d];
|
|
249
236
|
complexPropName = complexPropName.replace(/Ref/, '');
|
package/src/form-base.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare class FormBase<T> implements ControlValueAccessor {
|
|
|
7
7
|
value: T;
|
|
8
8
|
checked: boolean;
|
|
9
9
|
private skipFromEvent;
|
|
10
|
-
static readonly isFormBase
|
|
10
|
+
static readonly isFormBase = true;
|
|
11
11
|
propagateChange(_: T): void;
|
|
12
12
|
propagateTouch(): void;
|
|
13
13
|
enabled: Object;
|
package/src/form-base.js
CHANGED
|
@@ -49,7 +49,7 @@ var FormBase = /** @class */ (function () {
|
|
|
49
49
|
FormBase.prototype.twoWaySetter = function (newVal, prop) {
|
|
50
50
|
var oldVal = this.oldValue || getValue(prop, this.properties);
|
|
51
51
|
var ele = this.inputElement || this.element;
|
|
52
|
-
if (ele && oldVal === newVal &&
|
|
52
|
+
if (ele && oldVal === newVal &&
|
|
53
53
|
(ele.value === undefined || ele.value === '')) {
|
|
54
54
|
return;
|
|
55
55
|
}
|
package/src/template.js
CHANGED
|
@@ -18,6 +18,7 @@ export function compile(templateEle, helper) {
|
|
|
18
18
|
var conRef = contRef_1 ? contRef_1 : component.viewContainerRef;
|
|
19
19
|
var viewRef = conRef.createEmbeddedView(templateEle, context);
|
|
20
20
|
viewRef.markForCheck();
|
|
21
|
+
viewRef.detectChanges();
|
|
21
22
|
/* istanbul ignore next */
|
|
22
23
|
var viewCollection = (component && component.registeredTemplate) ?
|
|
23
24
|
component.registeredTemplate : getValue('currentInstance.registeredTemplate', conRef);
|
package/styles/material-dark.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");
|
|
1
|
+
@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");
|
package/styles/material.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");
|
|
1
|
+
@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");
|
package/styles/tailwind-dark.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
|
package/styles/tailwind.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
|