@igniteui/angular-templates 18.2.1422-beta.0 → 18.2.1422
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/AngularTypeScriptFileUpdate.d.ts +2 -10
- package/AngularTypeScriptFileUpdate.js +4 -44
- package/igx-ts/projects/_base/files/__dot__github/workflows/github.io.yml +6 -5
- package/igx-ts/projects/_base/files/__dot__github/workflows/node.js.yml +1 -1
- package/igx-ts/projects/_base_with_home/files/__dot__github/workflows/github.io.yml +6 -5
- package/igx-ts/projects/_base_with_home/files/__dot__github/workflows/node.js.yml +1 -1
- package/igx-ts-legacy/projects/_base/files/__dot__github/workflows/github.io.yml +6 -5
- package/igx-ts-legacy/projects/_base/files/__dot__github/workflows/node.js.yml +1 -1
- package/igx-ts-legacy/projects/_base_with_home/files/__dot__github/workflows/github.io.yml +6 -5
- package/igx-ts-legacy/projects/_base_with_home/files/__dot__github/workflows/node.js.yml +1 -1
- package/package.json +2 -2
- package/types/index.d.ts +1 -3
- package/types/index.js +1 -3
- package/types/enumerations/AngularDecoratorMetaTargetType.d.ts +0 -8
- package/types/enumerations/AngularDecoratorMetaTargetType.js +0 -12
- package/types/enumerations/AngularDecoratorName.d.ts +0 -4
- package/types/enumerations/AngularDecoratorName.js +0 -9
- /package/types/{AngularDecoratorMetaTarget.d.ts → enumerations/AngularDecoratorMetaTarget.d.ts} +0 -0
- /package/types/{AngularDecoratorMetaTarget.js → enumerations/AngularDecoratorMetaTarget.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ts from 'typescript';
|
|
2
2
|
import { KeyValuePair, FormatSettings, PropertyAssignment, TemplateDependency, TypeScriptFileUpdate, RouteEntry } from '@igniteui/cli-core';
|
|
3
|
-
import { AngularRouteLike
|
|
3
|
+
import { AngularRouteLike } from './types';
|
|
4
4
|
export declare class AngularTypeScriptFileUpdate extends TypeScriptFileUpdate {
|
|
5
5
|
readonly filePath: string;
|
|
6
6
|
readonly standalone: boolean;
|
|
@@ -35,14 +35,6 @@ export declare class AngularTypeScriptFileUpdate extends TypeScriptFileUpdate {
|
|
|
35
35
|
* @param multiline Whether to format the new entry as multiline.
|
|
36
36
|
*/
|
|
37
37
|
addNgModuleMeta(dep: TemplateDependency, variables?: KeyValuePair<string>, multiline?: boolean): void;
|
|
38
|
-
/**
|
|
39
|
-
* Sorts the elements of an Angular decorator property that is an {@link ts.ArrayLiteralExpression}.
|
|
40
|
-
* @param decoratorName The name of the decorator to look for.
|
|
41
|
-
* @param target The target metadata property to sort.
|
|
42
|
-
*
|
|
43
|
-
* @remarks The {@link target} must be a {@link ts.PropertyAssignment} with an initializer that is an {@link ts.ArrayLiteralExpression}.
|
|
44
|
-
*/
|
|
45
|
-
sortDecoratorPropertyInitializer(decoratorName: string, target: AngularDecoratorOptions): void;
|
|
46
38
|
/**
|
|
47
39
|
* Adds metadata to the arguments provided in `TestBed.configureTestingModule`.
|
|
48
40
|
* @param dep The dependency to add to the testing module's metadata.
|
|
@@ -82,7 +74,7 @@ export declare class AngularTypeScriptFileUpdate extends TypeScriptFileUpdate {
|
|
|
82
74
|
* @param target The target metadata property to update.
|
|
83
75
|
* @param multiline Whether to format the new entry as multiline.
|
|
84
76
|
*/
|
|
85
|
-
private
|
|
77
|
+
private mutateNgDecoratorMeta;
|
|
86
78
|
/**
|
|
87
79
|
* Updates Angular's metadata related to NgModules, Standalone Components or TestingModules.
|
|
88
80
|
* @param target The name of the target metadata property to update.
|
|
@@ -54,7 +54,7 @@ class AngularTypeScriptFileUpdate extends cli_core_1.TypeScriptFileUpdate {
|
|
|
54
54
|
}
|
|
55
55
|
const structure = this.buildRouteStructure(route, multiline);
|
|
56
56
|
const newRoute = this.factory.createObjectLiteralExpression(structure, multiline);
|
|
57
|
-
this.astTransformer.requestNewMembersInArrayLiteral((0, cli_core_1.variableAsParentCondition)(this.astTransformer, cli_core_1.ROUTES_VARIABLE_NAME), [newRoute],
|
|
57
|
+
this.astTransformer.requestNewMembersInArrayLiteral((0, cli_core_1.variableAsParentCondition)(this.astTransformer, cli_core_1.ROUTES_VARIABLE_NAME), [newRoute], prepend, anchorElement);
|
|
58
58
|
}
|
|
59
59
|
addChildRoute(parentPath, route, asIdentifier = false, multiline = false) {
|
|
60
60
|
super.addChildRoute(parentPath, route, asIdentifier, multiline);
|
|
@@ -100,46 +100,6 @@ class AngularTypeScriptFileUpdate extends cli_core_1.TypeScriptFileUpdate {
|
|
|
100
100
|
this.addRootToModule(dep, copy);
|
|
101
101
|
this.applyDecoratorMutations(cli_core_1.NG_MODULE_DECORATOR_NAME, copy, multiline);
|
|
102
102
|
}
|
|
103
|
-
/**
|
|
104
|
-
* Sorts the elements of an Angular decorator property that is an {@link ts.ArrayLiteralExpression}.
|
|
105
|
-
* @param decoratorName The name of the decorator to look for.
|
|
106
|
-
* @param target The target metadata property to sort.
|
|
107
|
-
*
|
|
108
|
-
* @remarks The {@link target} must be a {@link ts.PropertyAssignment} with an initializer that is an {@link ts.ArrayLiteralExpression}.
|
|
109
|
-
*/
|
|
110
|
-
sortDecoratorPropertyInitializer(decoratorName, target) {
|
|
111
|
-
const visitCondition = (node) => {
|
|
112
|
-
const propertyAssignment = this.astTransformer.findNodeAncestor(node, (node) => ts.isPropertyAssignment(node) &&
|
|
113
|
-
ts.isIdentifier(node.name) &&
|
|
114
|
-
node.name.text.toLowerCase() === target.toLowerCase() &&
|
|
115
|
-
ts.isArrayLiteralExpression(node.initializer));
|
|
116
|
-
if (!propertyAssignment) {
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
const expectedDecorator = this.checkNgDecorator(decoratorName, node);
|
|
120
|
-
return expectedDecorator;
|
|
121
|
-
};
|
|
122
|
-
const igxMembersPrefix = 'igx';
|
|
123
|
-
this.astTransformer.requestSortInArrayLiteral(visitCondition, (a, b) => {
|
|
124
|
-
// this check is just to type guard to a ts.Identifier
|
|
125
|
-
// in reality, the elements should always be identifiers
|
|
126
|
-
if (!ts.isIdentifier(a) || !ts.isIdentifier(b))
|
|
127
|
-
return -1;
|
|
128
|
-
const aText = a.text.toLowerCase();
|
|
129
|
-
const bText = b.text.toLowerCase();
|
|
130
|
-
if (aText.startsWith(igxMembersPrefix) &&
|
|
131
|
-
!bText.startsWith(igxMembersPrefix)) {
|
|
132
|
-
return 1;
|
|
133
|
-
}
|
|
134
|
-
else if (!aText.startsWith(igxMembersPrefix) &&
|
|
135
|
-
bText.startsWith(igxMembersPrefix)) {
|
|
136
|
-
return -1;
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
return aText.localeCompare(bText);
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
103
|
/**
|
|
144
104
|
* Adds metadata to the arguments provided in `TestBed.configureTestingModule`.
|
|
145
105
|
* @param dep The dependency to add to the testing module's metadata.
|
|
@@ -312,7 +272,7 @@ class AngularTypeScriptFileUpdate extends cli_core_1.TypeScriptFileUpdate {
|
|
|
312
272
|
applyDecoratorMutations(decoratorName, meta, multiline = false) {
|
|
313
273
|
for (const key of Object.keys(meta)) {
|
|
314
274
|
if (meta[key].length > 0) {
|
|
315
|
-
this.
|
|
275
|
+
this.mutateNgDecoratorMeta(decoratorName, meta[key], key, multiline);
|
|
316
276
|
}
|
|
317
277
|
}
|
|
318
278
|
}
|
|
@@ -323,7 +283,7 @@ class AngularTypeScriptFileUpdate extends cli_core_1.TypeScriptFileUpdate {
|
|
|
323
283
|
* @param target The target metadata property to update.
|
|
324
284
|
* @param multiline Whether to format the new entry as multiline.
|
|
325
285
|
*/
|
|
326
|
-
|
|
286
|
+
mutateNgDecoratorMeta(name, meta, target, multiline = false) {
|
|
327
287
|
const identifiers = meta.map(ts.factory.createIdentifier);
|
|
328
288
|
const targetMetaProp = this.findNgDecoratorProperty(name, target);
|
|
329
289
|
this.mutateNgMeta(target, targetMetaProp, identifiers, (node) => this.checkNgDecorator(name, node), multiline);
|
|
@@ -340,7 +300,7 @@ class AngularTypeScriptFileUpdate extends cli_core_1.TypeScriptFileUpdate {
|
|
|
340
300
|
const value = targetMetaProp && !ts.isArrayLiteralExpression(targetMetaProp.initializer)
|
|
341
301
|
? [targetMetaProp.initializer, ...identifiers]
|
|
342
302
|
: identifiers;
|
|
343
|
-
this.astTransformer.requestNewMemberInObjectLiteral(visitorCondition, target, this.factory.createArrayLiteralExpression(value, multiline),
|
|
303
|
+
this.astTransformer.requestNewMemberInObjectLiteral(visitorCondition, target, this.factory.createArrayLiteralExpression(value, multiline), multiline);
|
|
344
304
|
}
|
|
345
305
|
/**
|
|
346
306
|
* Checks if a node has an ancestor with a specific decorator.
|
|
@@ -8,7 +8,8 @@ on:
|
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
build-and-deploy:
|
|
11
|
-
|
|
11
|
+
# Deactivate the workflow. Will be changed when AB is ready
|
|
12
|
+
if: false
|
|
12
13
|
runs-on: ubuntu-latest
|
|
13
14
|
|
|
14
15
|
permissions:
|
|
@@ -17,7 +18,7 @@ jobs:
|
|
|
17
18
|
|
|
18
19
|
strategy:
|
|
19
20
|
matrix:
|
|
20
|
-
node-version: [
|
|
21
|
+
node-version: [22.x]
|
|
21
22
|
|
|
22
23
|
steps:
|
|
23
24
|
- uses: actions/checkout@v3
|
|
@@ -31,10 +32,10 @@ jobs:
|
|
|
31
32
|
run: echo "PROJECT_NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
|
|
32
33
|
- name: Determine if project is standalone and set build path
|
|
33
34
|
run: |
|
|
34
|
-
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].
|
|
35
|
-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
|
|
36
|
-
else
|
|
35
|
+
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].architect.build.builder == \"@angular-devkit/build-angular:application\"" angular.json > /dev/null; then
|
|
37
36
|
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}/browser" >> $GITHUB_ENV
|
|
37
|
+
else
|
|
38
|
+
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
|
|
38
39
|
fi
|
|
39
40
|
- name: Build project with dynamic base-href
|
|
40
41
|
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
|
|
@@ -8,7 +8,8 @@ on:
|
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
build-and-deploy:
|
|
11
|
-
|
|
11
|
+
# Deactivate the workflow. Will be changed when AB is ready
|
|
12
|
+
if: false
|
|
12
13
|
runs-on: ubuntu-latest
|
|
13
14
|
|
|
14
15
|
permissions:
|
|
@@ -17,7 +18,7 @@ jobs:
|
|
|
17
18
|
|
|
18
19
|
strategy:
|
|
19
20
|
matrix:
|
|
20
|
-
node-version: [
|
|
21
|
+
node-version: [22.x]
|
|
21
22
|
|
|
22
23
|
steps:
|
|
23
24
|
- uses: actions/checkout@v3
|
|
@@ -31,10 +32,10 @@ jobs:
|
|
|
31
32
|
run: echo "PROJECT_NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
|
|
32
33
|
- name: Determine if project is standalone and set build path
|
|
33
34
|
run: |
|
|
34
|
-
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].
|
|
35
|
-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
|
|
36
|
-
else
|
|
35
|
+
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].architect.build.builder == \"@angular-devkit/build-angular:application\"" angular.json > /dev/null; then
|
|
37
36
|
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}/browser" >> $GITHUB_ENV
|
|
37
|
+
else
|
|
38
|
+
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
|
|
38
39
|
fi
|
|
39
40
|
- name: Build project with dynamic base-href
|
|
40
41
|
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
|
|
@@ -8,7 +8,8 @@ on:
|
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
build-and-deploy:
|
|
11
|
-
|
|
11
|
+
# Deactivate the workflow. Will be changed when AB is ready
|
|
12
|
+
if: false
|
|
12
13
|
runs-on: ubuntu-latest
|
|
13
14
|
|
|
14
15
|
permissions:
|
|
@@ -17,7 +18,7 @@ jobs:
|
|
|
17
18
|
|
|
18
19
|
strategy:
|
|
19
20
|
matrix:
|
|
20
|
-
node-version: [
|
|
21
|
+
node-version: [22.x]
|
|
21
22
|
|
|
22
23
|
steps:
|
|
23
24
|
- uses: actions/checkout@v3
|
|
@@ -31,10 +32,10 @@ jobs:
|
|
|
31
32
|
run: echo "PROJECT_NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
|
|
32
33
|
- name: Determine if project is standalone and set build path
|
|
33
34
|
run: |
|
|
34
|
-
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].
|
|
35
|
-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
|
|
36
|
-
else
|
|
35
|
+
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].architect.build.builder == \"@angular-devkit/build-angular:application\"" angular.json > /dev/null; then
|
|
37
36
|
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}/browser" >> $GITHUB_ENV
|
|
37
|
+
else
|
|
38
|
+
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
|
|
38
39
|
fi
|
|
39
40
|
- name: Build project with dynamic base-href
|
|
40
41
|
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
|
|
@@ -8,7 +8,8 @@ on:
|
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
build-and-deploy:
|
|
11
|
-
|
|
11
|
+
# Deactivate the workflow. Will be changed when AB is ready
|
|
12
|
+
if: false
|
|
12
13
|
runs-on: ubuntu-latest
|
|
13
14
|
|
|
14
15
|
permissions:
|
|
@@ -17,7 +18,7 @@ jobs:
|
|
|
17
18
|
|
|
18
19
|
strategy:
|
|
19
20
|
matrix:
|
|
20
|
-
node-version: [
|
|
21
|
+
node-version: [22.x]
|
|
21
22
|
|
|
22
23
|
steps:
|
|
23
24
|
- uses: actions/checkout@v3
|
|
@@ -31,10 +32,10 @@ jobs:
|
|
|
31
32
|
run: echo "PROJECT_NAME=$(jq -r '.name' package.json)" >> $GITHUB_ENV
|
|
32
33
|
- name: Determine if project is standalone and set build path
|
|
33
34
|
run: |
|
|
34
|
-
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].
|
|
35
|
-
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
|
|
36
|
-
else
|
|
35
|
+
if jq -e ".projects[\"${{ env.PROJECT_NAME }}\"].architect.build.builder == \"@angular-devkit/build-angular:application\"" angular.json > /dev/null; then
|
|
37
36
|
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}/browser" >> $GITHUB_ENV
|
|
37
|
+
else
|
|
38
|
+
echo "BUILD_PATH=./dist/${{ env.PROJECT_NAME }}" >> $GITHUB_ENV
|
|
38
39
|
fi
|
|
39
40
|
- name: Build project with dynamic base-href
|
|
40
41
|
run: npm run build -- --base-href "/${{ github.event.repository.name }}/"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igniteui/angular-templates",
|
|
3
|
-
"version": "18.2.1422
|
|
3
|
+
"version": "18.2.1422",
|
|
4
4
|
"description": "Templates for Ignite UI for Angular projects and components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"author": "Infragistics",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@igniteui/cli-core": "~14.2.2
|
|
15
|
+
"@igniteui/cli-core": "~14.2.2",
|
|
16
16
|
"typescript": "~5.5.4"
|
|
17
17
|
}
|
|
18
18
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export * from "./AngularDecoratorMetaTarget";
|
|
1
|
+
export * from "./enumerations/AngularDecoratorMetaTarget";
|
|
2
2
|
export * from "./enumerations/AngularRouteTarget";
|
|
3
|
-
export * from "./enumerations/AngularDecoratorName";
|
|
4
|
-
export * from "./enumerations/AngularDecoratorMetaTargetType";
|
|
5
3
|
export * from "./AngularRouteEntry";
|
|
6
4
|
export * from "./AngularRouteLike";
|
package/types/index.js
CHANGED
|
@@ -14,9 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./AngularDecoratorMetaTarget"), exports);
|
|
17
|
+
__exportStar(require("./enumerations/AngularDecoratorMetaTarget"), exports);
|
|
18
18
|
__exportStar(require("./enumerations/AngularRouteTarget"), exports);
|
|
19
|
-
__exportStar(require("./enumerations/AngularDecoratorName"), exports);
|
|
20
|
-
__exportStar(require("./enumerations/AngularDecoratorMetaTargetType"), exports);
|
|
21
19
|
__exportStar(require("./AngularRouteEntry"), exports);
|
|
22
20
|
__exportStar(require("./AngularRouteLike"), exports);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AngularDecoratorOptions = void 0;
|
|
4
|
-
/** Represents the names of the different members an Angular decorator can have. */
|
|
5
|
-
var AngularDecoratorOptions;
|
|
6
|
-
(function (AngularDecoratorOptions) {
|
|
7
|
-
AngularDecoratorOptions["Imports"] = "imports";
|
|
8
|
-
AngularDecoratorOptions["Declarations"] = "declarations";
|
|
9
|
-
AngularDecoratorOptions["Providers"] = "providers";
|
|
10
|
-
AngularDecoratorOptions["Exports"] = "exports";
|
|
11
|
-
AngularDecoratorOptions["Schemas"] = "schemas";
|
|
12
|
-
})(AngularDecoratorOptions || (exports.AngularDecoratorOptions = AngularDecoratorOptions = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AngularDecoratorName = void 0;
|
|
4
|
-
/* Represents the names of the different decorators in Angular. */
|
|
5
|
-
var AngularDecoratorName;
|
|
6
|
-
(function (AngularDecoratorName) {
|
|
7
|
-
AngularDecoratorName["Component"] = "Component";
|
|
8
|
-
AngularDecoratorName["NgModule"] = "NgModule";
|
|
9
|
-
})(AngularDecoratorName || (exports.AngularDecoratorName = AngularDecoratorName = {}));
|
/package/types/{AngularDecoratorMetaTarget.d.ts → enumerations/AngularDecoratorMetaTarget.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|