Skip to content

Commit 4803dec

Browse files
authored
Merge branch 'master' into preserve-edit-data
2 parents 6f736d2 + 6bbfbb3 commit 4803dec

File tree

85 files changed

+7101
-5130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+7101
-5130
lines changed

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
pnpm-lock.yaml
1+
pnpm-lock.yaml
2+
/.nx/workspace-data

MIGRATION.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Migration guide
22

3+
## Migrating to JSON Forms 3.7
4+
5+
### Angular support now targets Angular 19 to 21
6+
7+
When using JSON Forms 3.7, your Angular application now needs to target Angular 19, 20 or 21.
8+
9+
Use JSON Forms 3.6 if you need to stay on Angular 18.
10+
311
## Migrating to JSON Forms 3.6
412

513
### UI schema type changes

lerna.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.7.0-alpha.2",
2+
"version": "3.7.0",
33
"npmClient": "pnpm",
4-
"useWorkspaces": true
4+
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
55
}

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"node": "^22",
55
"pnpm": "^10.4.1"
66
},
7-
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
7+
"packageManager": "pnpm@10.22.0+sha512.bf049efe995b28f527fd2b41ae0474ce29186f7edcb3bf545087bd61fbbebb2bf75362d1307fda09c2d288e1e499787ac12d4fcb617a974718a6051f2eee741c",
88
"scripts": {
99
"lerna": "lerna",
1010
"preparePublish": "git clean -dfx && pnpm i --frozen-lockfile && pnpm run clean && pnpm run build && pnpm run doc && pnpm run test",
@@ -21,23 +21,20 @@
2121
"build:examples-app": "lerna run build:examples-app && node packages/examples-app/prepare-examples-app.js"
2222
},
2323
"devDependencies": {
24-
"@angular/core": "^18.0.0",
25-
"@angular/cli": "^18.0.0",
2624
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.5",
2725
"@babel/plugin-proposal-optional-chaining": "^7.16.5",
2826
"@istanbuljs/nyc-config-typescript": "^1.0.2",
29-
"@types/jest": "^27.4.1",
3027
"@types/lodash": "^4.14.149",
3128
"ajv": "^8.6.1",
3229
"ajv-formats": "^2.1.0",
3330
"babel-loader": "^8.0.6",
3431
"core-js": "^3.9.1",
3532
"coveralls": "^3.0.9",
36-
"cross-env": "^7.0.2",
33+
"cross-env": "^10.1.0",
3734
"css-loader": "^3.2.0",
3835
"istanbul-lib-coverage": "^3.2.0",
3936
"lcov-result-merger": "^3.1.0",
40-
"lerna": "^6.6.2",
37+
"lerna": "^9.0.1",
4138
"nan": "^2.14.2",
4239
"nyc": "^15.1.0",
4340
"prettier": "^2.8.4",

packages/angular-material/.eslintrc.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ module.exports = {
3535
],
3636
// workaround for
3737
// https://github.com/import-js/eslint-plugin-import/issues/1810:
38-
"import/no-unresolved": [
39-
"error",
38+
'import/no-unresolved': [
39+
'error',
4040
{
4141
ignore: [
42-
"@angular/cdk/.*",
43-
"@angular/core/.*",
44-
"@angular/material/.*",
45-
"@angular/platform-browser/.*",
46-
"@angular/platform-browser-dynamic/.*",
47-
"core-js/es7/.*",
48-
"zone.js/.*",
49-
]
50-
}
42+
'@angular/cdk/.*',
43+
'@angular/core/.*',
44+
'@angular/material/.*',
45+
'@angular/platform-browser/.*',
46+
'@angular/platform-browser-dynamic/.*',
47+
'core-js/es7/.*',
48+
'zone.js/.*',
49+
],
50+
},
5151
],
5252
},
5353
};

packages/angular-material/angular.json

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "../../node_modules/@angular/cli/lib/config/schema.json",
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
44
"newProjectRoot": ".",
55
"projects": {
@@ -20,28 +20,23 @@
2020
"outputPath": "example/dist/",
2121
"index": "example/index.html",
2222
"main": "example/main.ts",
23-
"polyfills": [
24-
"zone.js"
25-
],
23+
"polyfills": ["zone.js"],
2624
"tsConfig": "tsconfig.example.json",
2725
"inlineStyleLanguage": "scss",
2826
"assets": [],
2927
"styles": [
3028
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
3129
],
3230
"scripts": [],
33-
"allowedCommonJsDependencies": [
34-
"lodash",
35-
"hammerjs"
36-
],
31+
"allowedCommonJsDependencies": ["lodash", "hammerjs"],
3732
"optimization": false,
3833
"buildOptimizer": false
3934
}
4035
},
4136
"serve": {
4237
"builder": "@angular-devkit/build-angular:dev-server",
4338
"options": {
44-
"buildTarget": "example:build"
39+
"buildTarget": "example:build"
4540
}
4641
}
4742
}
@@ -72,10 +67,7 @@
7267
"options": {
7368
"karmaConfig": "karma.conf.js",
7469
"tsConfig": "tsconfig.spec.json",
75-
"polyfills": [
76-
"zone.js",
77-
"zone.js/testing"
78-
]
70+
"polyfills": ["zone.js", "zone.js/testing"]
7971
}
8072
}
8173
}

packages/angular-material/example/app/app.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
THE SOFTWARE.
2424
*/
2525
import { Component } from '@angular/core';
26+
import { CommonModule } from '@angular/common';
27+
import { JsonFormsModule } from '@jsonforms/angular';
2628
import { ExampleDescription, getExamples } from '@jsonforms/examples';
2729
import {
2830
JsonFormsI18nState,
@@ -87,7 +89,7 @@ const itemTester: UISchemaTester = (_schema, schemaPath, _path) => {
8789
[readonly]="readonly"
8890
></jsonforms>
8991
`,
90-
standalone: false,
92+
imports: [CommonModule, JsonFormsModule],
9193
})
9294
export class AppComponent {
9395
readonly renderers = angularMaterialRenderers;

packages/angular-material/example/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ import { AppComponent } from './app.component';
2929
import { JsonFormsAngularMaterialModule } from '../../src/library';
3030

3131
@NgModule({
32-
declarations: [AppComponent],
3332
imports: [
3433
BrowserModule,
3534
BrowserAnimationsModule,
3635
JsonFormsAngularMaterialModule,
36+
AppComponent,
3737
],
3838
bootstrap: [AppComponent],
3939
schemas: [CUSTOM_ELEMENTS_SCHEMA],

packages/angular-material/package.json

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jsonforms/angular-material",
3-
"version": "3.7.0-alpha.2",
3+
"version": "3.7.0",
44
"description": "Material Renderer Set for Angular module of JSON Forms",
55
"repository": {
66
"type": "git",
@@ -64,16 +64,16 @@
6464
]
6565
},
6666
"peerDependencies": {
67-
"@angular/animations": "^18.0.0 || ^19.0.0 || ^20.0.0",
68-
"@angular/cdk": "^18.0.0 || ^19.0.0 || ^20.0.0",
69-
"@angular/common": "^18.0.0 || ^19.0.0 || ^20.0.0",
70-
"@angular/core": "^18.0.0 || ^19.0.0 || ^20.0.0",
71-
"@angular/forms": "^18.0.0 || ^19.0.0 || ^20.0.0",
72-
"@angular/material": "^18.0.0 || ^19.0.0 || ^20.0.0",
73-
"@angular/platform-browser": "^18.0.0 || ^19.0.0 || ^20.0.0",
74-
"@angular/router": "^18.0.0 || ^19.0.0 || ^20.0.0",
75-
"@jsonforms/angular": "3.7.0-alpha.2",
76-
"@jsonforms/core": "3.7.0-alpha.2",
67+
"@angular/animations": "^19.0.0 || ^20.0.0 || ^21.0.0",
68+
"@angular/cdk": "^19.0.0 || ^20.0.0 || ^21.0.0",
69+
"@angular/common": "^19.0.0 || ^20.0.0 || ^21.0.0",
70+
"@angular/core": "^19.0.0 || ^20.0.0 || ^21.0.0",
71+
"@angular/forms": "^19.0.0 || ^20.0.0 || ^21.0.0",
72+
"@angular/material": "^19.0.0 || ^20.0.0 || ^21.0.0",
73+
"@angular/platform-browser": "^19.0.0 || ^20.0.0 || ^21.0.0",
74+
"@angular/router": "^19.0.0 || ^20.0.0 || ^21.0.0",
75+
"@jsonforms/angular": "3.7.0",
76+
"@jsonforms/core": "3.7.0",
7777
"dayjs": "^1.11.10",
7878
"rxjs": "^6.6.0 || ^7.4.0"
7979
},
@@ -82,29 +82,30 @@
8282
"lodash": "^4.17.21"
8383
},
8484
"devDependencies": {
85-
"@angular-devkit/build-angular": "^18.0.0",
86-
"@angular-devkit/core": "^18.0.0",
87-
"@angular-eslint/eslint-plugin": "^18.0.0",
88-
"@angular-eslint/eslint-plugin-template": "^18.0.0",
89-
"@angular-eslint/schematics": "^18.0.0",
90-
"@angular-eslint/template-parser": "^18.0.0",
91-
"@angular/animations": "^18.0.0",
92-
"@angular/cdk": "^18.0.0",
93-
"@angular/common": "^18.0.0",
94-
"@angular/compiler": "^18.0.0",
95-
"@angular/compiler-cli": "^18.0.0",
96-
"@angular/core": "^18.0.0",
97-
"@angular/forms": "^18.0.0",
98-
"@angular/material": "^18.0.0",
99-
"@angular/platform-browser": "^18.0.0",
100-
"@angular/platform-browser-dynamic": "^18.0.0",
101-
"@angular/router": "^18.0.0",
85+
"@angular-devkit/build-angular": "^19.0.0",
86+
"@angular-devkit/core": "^19.0.0",
87+
"@angular-eslint/eslint-plugin": "^19.0.0",
88+
"@angular-eslint/eslint-plugin-template": "^19.0.0",
89+
"@angular-eslint/schematics": "^19.0.0",
90+
"@angular-eslint/template-parser": "^19.0.0",
91+
"@angular/animations": "^19.0.0",
92+
"@angular/cdk": "^19.0.0",
93+
"@angular/cli": "^19.0.0",
94+
"@angular/common": "^19.0.0",
95+
"@angular/compiler": "^19.0.0",
96+
"@angular/compiler-cli": "^19.0.0",
97+
"@angular/core": "^19.0.0",
98+
"@angular/forms": "^19.0.0",
99+
"@angular/material": "^19.0.0",
100+
"@angular/platform-browser": "^19.0.0",
101+
"@angular/platform-browser-dynamic": "^19.0.0",
102+
"@angular/router": "^19.0.0",
102103
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.5",
103104
"@babel/plugin-proposal-optional-chaining": "^7.16.5",
104105
"@jsonforms/angular": "workspace:*",
105106
"@jsonforms/core": "workspace:*",
106107
"@jsonforms/examples": "workspace:*",
107-
"@ngtools/webpack": "^18.0.0",
108+
"@ngtools/webpack": "^19.0.0",
108109
"@types/jasmine": "~3.8.0",
109110
"@types/lodash": "4.14.149",
110111
"@types/node": "^22.13.8",
@@ -128,19 +129,19 @@
128129
"karma-jasmine-html-reporter": "^1.7.0",
129130
"karma-sourcemap-loader": "^0.3.8",
130131
"karma-webpack": "^5.0.0",
131-
"ng-packagr": "^18.0.0",
132+
"ng-packagr": "^19.0.0",
132133
"null-loader": "^0.1.1",
133134
"nyc": "^15.1.0",
134135
"prettier": "^2.8.4",
135136
"protractor": "^7.0.0",
136-
"rimraf": "^3.0.2",
137+
"rimraf": "^6.1.0",
137138
"rxjs": "^6.6.0",
138139
"ts-loader": "^9.5.1",
139140
"tslib": "^2.5.0",
140141
"typedoc": "~0.25.3",
141142
"typescript": "~5.5.0",
142143
"webpack": "^5.78.0",
143144
"yargs": "^17.7.2",
144-
"zone.js": "~0.14.10"
145+
"zone.js": "~0.15.0"
145146
}
146147
}

packages/angular-material/src/library/controls/autocomplete.renderer.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ import {
4141
} from '@jsonforms/core';
4242
import type { Observable } from 'rxjs';
4343
import { map, startWith } from 'rxjs/operators';
44+
import { CommonModule } from '@angular/common';
45+
import { ReactiveFormsModule } from '@angular/forms';
46+
import { MatFormFieldModule } from '@angular/material/form-field';
47+
import { MatInputModule } from '@angular/material/input';
48+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
4449

4550
/**
4651
* To use this component you will need to add your own tester:
@@ -110,7 +115,13 @@ import { map, startWith } from 'rxjs/operators';
110115
`,
111116
],
112117
changeDetection: ChangeDetectionStrategy.OnPush,
113-
standalone: false,
118+
imports: [
119+
CommonModule,
120+
ReactiveFormsModule,
121+
MatFormFieldModule,
122+
MatInputModule,
123+
MatAutocompleteModule,
124+
],
114125
})
115126
export class AutocompleteControlRenderer
116127
extends JsonFormsControl

0 commit comments

Comments
 (0)