mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-28 18:20:42 +00:00
feat: update ngx formly
This commit is contained in:
parent
361a9510fe
commit
0130933bc0
7 changed files with 33 additions and 59 deletions
72
package-lock.json
generated
72
package-lock.json
generated
|
|
@ -50,8 +50,8 @@
|
|||
"@ngrx/schematics": "^14.0.2",
|
||||
"@ngrx/store": "14.0.2",
|
||||
"@ngrx/store-devtools": "^14.0.2",
|
||||
"@ngx-formly/core": "5.12.0",
|
||||
"@ngx-formly/material": "5.12.0",
|
||||
"@ngx-formly/core": "6.0.1",
|
||||
"@ngx-formly/material": "6.0.1",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"@ngx-translate/http-loader": "^7.0.0",
|
||||
"@schematics/angular": "^14.1.3",
|
||||
|
|
@ -4352,43 +4352,31 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@ngx-formly/core": {
|
||||
"version": "5.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@ngx-formly/core/-/core-5.12.0.tgz",
|
||||
"integrity": "sha512-1YQIu69w3dU4KlrKj6gOgY5ekiut3erZyJ8lMpPNYl1/I1fd3mkEMOjBKqeDdm29buScuD/YcxSQiePDpseKzA==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ngx-formly/core/-/core-6.0.1.tgz",
|
||||
"integrity": "sha512-TkVg7m2SZEIHoL5kIJgH7TYqwT6G6mz1ZKIgvT3W3eBUr70u1HZ1RiDHjXeqMC3sse7saSDFsFOI6P7ybHJ1Zw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"tslib": "^1.7.1"
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/forms": ">=7.0.0",
|
||||
"rxjs": ">=6.3.0"
|
||||
"@angular/forms": ">=13.2.0",
|
||||
"rxjs": "^6.5.3 || ^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ngx-formly/core/node_modules/tslib": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@ngx-formly/material": {
|
||||
"version": "5.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@ngx-formly/material/-/material-5.12.0.tgz",
|
||||
"integrity": "sha512-km37Q+PLHYmEOv17AM35kichDwLgvQ5t+FgIWzWcyPhcEbzgRWOCAtXDt+htiLkMPD9kQDRpniF/zIlECsZfdA==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ngx-formly/material/-/material-6.0.1.tgz",
|
||||
"integrity": "sha512-dyu6Scwn3D6g4Zg7bDS4yvxjkLakwIpy0sIE5TjvRa2ByTE0cTAkRaksFfdT6KW8dtti+N56IjFgQOzb+XZwMg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"tslib": "^1.9.0"
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/material": ">=7.0.0",
|
||||
"@ngx-formly/core": "5.12.0"
|
||||
"@angular/material": ">=13.0.0",
|
||||
"@ngx-formly/core": "6.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@ngx-formly/material/node_modules/tslib": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@ngx-translate/core": {
|
||||
"version": "14.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-14.0.0.tgz",
|
||||
|
|
@ -30304,37 +30292,21 @@
|
|||
"requires": {}
|
||||
},
|
||||
"@ngx-formly/core": {
|
||||
"version": "5.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@ngx-formly/core/-/core-5.12.0.tgz",
|
||||
"integrity": "sha512-1YQIu69w3dU4KlrKj6gOgY5ekiut3erZyJ8lMpPNYl1/I1fd3mkEMOjBKqeDdm29buScuD/YcxSQiePDpseKzA==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ngx-formly/core/-/core-6.0.1.tgz",
|
||||
"integrity": "sha512-TkVg7m2SZEIHoL5kIJgH7TYqwT6G6mz1ZKIgvT3W3eBUr70u1HZ1RiDHjXeqMC3sse7saSDFsFOI6P7ybHJ1Zw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||
"dev": true
|
||||
}
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@ngx-formly/material": {
|
||||
"version": "5.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@ngx-formly/material/-/material-5.12.0.tgz",
|
||||
"integrity": "sha512-km37Q+PLHYmEOv17AM35kichDwLgvQ5t+FgIWzWcyPhcEbzgRWOCAtXDt+htiLkMPD9kQDRpniF/zIlECsZfdA==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@ngx-formly/material/-/material-6.0.1.tgz",
|
||||
"integrity": "sha512-dyu6Scwn3D6g4Zg7bDS4yvxjkLakwIpy0sIE5TjvRa2ByTE0cTAkRaksFfdT6KW8dtti+N56IjFgQOzb+XZwMg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||
"dev": true
|
||||
}
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@ngx-translate/core": {
|
||||
|
|
|
|||
|
|
@ -144,8 +144,8 @@
|
|||
"@ngrx/schematics": "^14.0.2",
|
||||
"@ngrx/store": "14.0.2",
|
||||
"@ngrx/store-devtools": "^14.0.2",
|
||||
"@ngx-formly/core": "5.12.0",
|
||||
"@ngx-formly/material": "5.12.0",
|
||||
"@ngx-formly/core": "6.0.1",
|
||||
"@ngx-formly/material": "6.0.1",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"@ngx-translate/http-loader": "^7.0.0",
|
||||
"@schematics/angular": "^14.1.3",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { FieldType } from '@ngx-formly/material';
|
|||
import { MATERIAL_ICONS } from '../../../ui/material-icons.const';
|
||||
import { Observable } from 'rxjs';
|
||||
import { filter, map, startWith } from 'rxjs/operators';
|
||||
import { FormlyFieldConfig } from '@ngx-formly/core';
|
||||
|
||||
@Component({
|
||||
selector: 'icon-input',
|
||||
|
|
@ -10,7 +11,7 @@ import { filter, map, startWith } from 'rxjs/operators';
|
|||
styleUrls: ['./icon-input.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class IconInputComponent extends FieldType implements OnInit {
|
||||
export class IconInputComponent extends FieldType<FormlyFieldConfig> implements OnInit {
|
||||
// @ViewChild(MatInput) formFieldControl: MatInput;
|
||||
|
||||
customIcons: string[] = MATERIAL_ICONS;
|
||||
|
|
@ -21,8 +22,6 @@ export class IconInputComponent extends FieldType implements OnInit {
|
|||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
super.ngOnInit();
|
||||
|
||||
this.filteredIcons$ = this.formControl.valueChanges.pipe(
|
||||
startWith(''),
|
||||
filter((searchTerm) => !!searchTerm),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { FieldType } from '@ngx-formly/material';
|
||||
import { FormlyFieldConfig } from '@ngx-formly/core';
|
||||
|
||||
@Component({
|
||||
selector: 'keyboard-input',
|
||||
|
|
@ -7,7 +8,7 @@ import { FieldType } from '@ngx-formly/material';
|
|||
styleUrls: ['./keyboard-input.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class KeyboardInputComponent extends FieldType {
|
||||
export class KeyboardInputComponent extends FieldType<FormlyFieldConfig> {
|
||||
// @ViewChild(MatInput, {static: true}) formFieldControl: MatInput;
|
||||
|
||||
get type(): string {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { FieldType } from '@ngx-formly/material';
|
|||
import { ProjectService } from '../../project/project.service';
|
||||
import { Project } from '../../project/project.model';
|
||||
import { T } from 'src/app/t.const';
|
||||
import { FormlyFieldConfig } from '@ngx-formly/core';
|
||||
|
||||
@Component({
|
||||
selector: 'select-project',
|
||||
|
|
@ -10,7 +11,7 @@ import { T } from 'src/app/t.const';
|
|||
styleUrls: ['./select-project.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class SelectProjectComponent extends FieldType {
|
||||
export class SelectProjectComponent extends FieldType<FormlyFieldConfig> {
|
||||
T: typeof T = T;
|
||||
|
||||
constructor(public projectService: ProjectService) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const updateParent = (
|
|||
field.form?.patchValue({
|
||||
// ...field.parent.model,
|
||||
...changes,
|
||||
});
|
||||
} as any);
|
||||
};
|
||||
|
||||
export const TASK_REPEAT_CFG_FORM_CFG_BEFORE_TAGS: FormlyFieldConfig[] = [
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { FieldType } from '@ngx-formly/material';
|
||||
import { FormlyFieldConfig } from '@ngx-formly/core';
|
||||
|
||||
@Component({
|
||||
selector: 'input-duration-formly',
|
||||
|
|
@ -7,6 +8,6 @@ import { FieldType } from '@ngx-formly/material';
|
|||
styleUrls: ['./input-duration-formly.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class InputDurationFormlyComponent extends FieldType {
|
||||
export class InputDurationFormlyComponent extends FieldType<FormlyFieldConfig> {
|
||||
// @ViewChild(MatInput, {static: true}) formFieldControl?: MatInput;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue