@angular/upgrade 14.1.0-rc.0 → 14.1.0
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/esm2020/src/common/src/version.mjs +1 -1
- package/esm2020/src/dynamic/src/upgrade_ng1_adapter.mjs +15 -8
- package/esm2020/static/src/upgrade_component.mjs +3 -3
- package/esm2020/static/src/upgrade_module.mjs +4 -4
- package/esm2020/static/testing/src/create_angular_testing_module.mjs +4 -4
- package/fesm2015/static/testing.mjs +5 -5
- package/fesm2015/static.mjs +9 -9
- package/fesm2015/static.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +16 -9
- package/fesm2015/upgrade.mjs.map +1 -1
- package/fesm2020/static/testing.mjs +5 -5
- package/fesm2020/static.mjs +9 -9
- package/fesm2020/static.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +16 -9
- package/fesm2020/upgrade.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +5 -5
- package/static/index.d.ts +1 -1
- package/static/testing/index.d.ts +1 -1
package/fesm2015/upgrade.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.1.0
|
|
2
|
+
* @license Angular v14.1.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -19,7 +19,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
|
19
19
|
/**
|
|
20
20
|
* @publicApi
|
|
21
21
|
*/
|
|
22
|
-
const VERSION = new Version('14.1.0
|
|
22
|
+
const VERSION = new Version('14.1.0');
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
@@ -1162,6 +1162,12 @@ const INITIAL_VALUE = {
|
|
|
1162
1162
|
__UNINITIALIZED__: true
|
|
1163
1163
|
};
|
|
1164
1164
|
const NOT_SUPPORTED = 'NOT_SUPPORTED';
|
|
1165
|
+
function getInputPropertyMapName(name) {
|
|
1166
|
+
return `input_${name}`;
|
|
1167
|
+
}
|
|
1168
|
+
function getOutputPropertyMapName(name) {
|
|
1169
|
+
return `output_${name}`;
|
|
1170
|
+
}
|
|
1165
1171
|
class UpgradeNg1ComponentAdapterBuilder {
|
|
1166
1172
|
constructor(name) {
|
|
1167
1173
|
this.name = name;
|
|
@@ -1204,9 +1210,9 @@ class UpgradeNg1ComponentAdapterBuilder {
|
|
|
1204
1210
|
const bindingOptions = definition.charAt(1);
|
|
1205
1211
|
const attrName = definition.substring(bindingOptions === '?' ? 2 : 1) || propName;
|
|
1206
1212
|
// QUESTION: What about `=*`? Ignore? Throw? Support?
|
|
1207
|
-
const inputName =
|
|
1213
|
+
const inputName = getInputPropertyMapName(attrName);
|
|
1208
1214
|
const inputNameRename = `${inputName}: ${attrName}`;
|
|
1209
|
-
const outputName =
|
|
1215
|
+
const outputName = getOutputPropertyMapName(attrName);
|
|
1210
1216
|
const outputNameRename = `${outputName}: ${attrName}`;
|
|
1211
1217
|
const outputNameRenameChange = `${outputNameRename}Change`;
|
|
1212
1218
|
switch (bindingType) {
|
|
@@ -1329,8 +1335,9 @@ class UpgradeNg1ComponentAdapter {
|
|
|
1329
1335
|
const ng1Changes = {};
|
|
1330
1336
|
Object.keys(changes).forEach(name => {
|
|
1331
1337
|
const change = changes[name];
|
|
1332
|
-
|
|
1333
|
-
|
|
1338
|
+
const propertyMapName = getInputPropertyMapName(name);
|
|
1339
|
+
this.setComponentProperty(propertyMapName, change.currentValue);
|
|
1340
|
+
ng1Changes[this.propertyMap[propertyMapName]] = change;
|
|
1334
1341
|
});
|
|
1335
1342
|
if (isFunction(this.destinationObj.$onChanges)) {
|
|
1336
1343
|
this.destinationObj.$onChanges(ng1Changes);
|
|
@@ -1360,9 +1367,9 @@ class UpgradeNg1ComponentAdapter {
|
|
|
1360
1367
|
this.destinationObj[this.propertyMap[name]] = value;
|
|
1361
1368
|
}
|
|
1362
1369
|
}
|
|
1363
|
-
UpgradeNg1ComponentAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0
|
|
1364
|
-
UpgradeNg1ComponentAdapter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0
|
|
1370
|
+
UpgradeNg1ComponentAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UpgradeNg1ComponentAdapter, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
1371
|
+
UpgradeNg1ComponentAdapter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: UpgradeNg1ComponentAdapter, usesOnChanges: true, ngImport: i0 });
|
|
1372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UpgradeNg1ComponentAdapter, decorators: [{
|
|
1366
1373
|
type: Directive
|
|
1367
1374
|
}], ctorParameters: function () { return [{ type: UpgradeHelper }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }]; } });
|
|
1368
1375
|
|