mirror of https://github.com/abpframework/abp.git
committed by
GitHub
182 changed files with 3676 additions and 2414 deletions
@ -1,38 +1,34 @@ |
|||||
import { Component, inject, OnInit, viewChild } from '@angular/core'; |
import { ChangeDetectionStrategy, Component, inject, viewChild } from '@angular/core'; |
||||
|
import { toSignal } from '@angular/core/rxjs-interop'; |
||||
import { DynamicFormComponent, FormFieldConfig } from '@abp/ng.components/dynamic-form'; |
import { DynamicFormComponent, FormFieldConfig } from '@abp/ng.components/dynamic-form'; |
||||
import { FormConfigService } from './form-config.service'; |
import { FormConfigService } from './form-config.service'; |
||||
|
|
||||
@Component({ |
@Component({ |
||||
selector: 'app-dynamic-form-page', |
changeDetection: ChangeDetectionStrategy.OnPush, |
||||
templateUrl: './dynamic-form-page.component.html', |
selector: 'app-dynamic-form-page', |
||||
imports: [DynamicFormComponent], |
templateUrl: './dynamic-form-page.component.html', |
||||
|
imports: [DynamicFormComponent], |
||||
}) |
}) |
||||
export class DynamicFormPageComponent implements OnInit { |
export class DynamicFormPageComponent { |
||||
readonly dynamicFormComponent = viewChild(DynamicFormComponent); |
readonly dynamicFormComponent = viewChild(DynamicFormComponent); |
||||
protected readonly formConfigService = inject(FormConfigService); |
protected readonly formConfigService = inject(FormConfigService); |
||||
|
|
||||
formFields: FormFieldConfig[] = []; |
readonly formFields = toSignal(this.formConfigService.getFormConfig(), { |
||||
|
initialValue: [] as FormFieldConfig[], |
||||
|
}); |
||||
|
|
||||
ngOnInit() { |
submit(formData: any) { |
||||
this.formConfigService.getFormConfig().subscribe(config => { |
console.log('✅ Form Submitted Successfully!', formData); |
||||
this.formFields = config; |
console.table(formData); |
||||
}); |
|
||||
} |
|
||||
|
|
||||
submit(formData: any) { |
alert('✅ Form submitted successfully! Check the console for details.'); |
||||
console.log('✅ Form Submitted Successfully!', formData); |
|
||||
console.table(formData); |
|
||||
|
|
||||
// Show success message
|
|
||||
alert('✅ Form submitted successfully! Check the console for details.'); |
|
||||
|
|
||||
// Reset form after submission
|
|
||||
this.dynamicFormComponent().resetForm(); |
|
||||
} |
|
||||
|
|
||||
cancel() { |
this.dynamicFormComponent()?.resetForm(); |
||||
console.log('❌ Form Cancelled'); |
} |
||||
alert('Form cancelled'); |
|
||||
this.dynamicFormComponent().resetForm(); |
cancel() { |
||||
} |
console.log('❌ Form Cancelled'); |
||||
|
alert('Form cancelled'); |
||||
|
this.dynamicFormComponent()?.resetForm(); |
||||
|
} |
||||
} |
} |
||||
|
|||||
@ -1,118 +1,130 @@ |
|||||
{ |
{ |
||||
"migrations": [ |
"migrations": [ |
||||
{ |
{ |
||||
"version": "22.0.0-beta.1", |
"cli": "nx", |
||||
"description": "Updates release version config based on the breaking changes in Nx v22", |
"version": "22.6.0-beta.10", |
||||
"implementation": "./src/migrations/update-22-0-0/release-version-config-changes", |
"description": "Adds .claude/worktrees to .gitignore", |
||||
|
"implementation": "./dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore", |
||||
"package": "nx", |
"package": "nx", |
||||
"name": "22-0-0-release-version-config-changes" |
"name": "22-6-1-add-claude-worktrees-to-git-ignore" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "22.0.0-beta.2", |
"cli": "nx", |
||||
"description": "Consolidates releaseTag* options into nested releaseTag object structure", |
"version": "22.7.0-beta.0", |
||||
"implementation": "./src/migrations/update-22-0-0/consolidate-release-tag-config", |
"description": "Adds .nx/polygraph to .gitignore", |
||||
|
"implementation": "./dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore", |
||||
"package": "nx", |
"package": "nx", |
||||
"name": "22-0-0-consolidate-release-tag-config" |
"name": "22-7-0-add-polygraph-to-git-ignore" |
||||
}, |
}, |
||||
{ |
{ |
||||
"cli": "nx", |
"cli": "nx", |
||||
"version": "22.1.0-beta.5", |
"version": "22.6.0-rc.0", |
||||
"description": "Updates the nx wrapper.", |
"description": "Adds .claude/settings.local.json to .gitignore", |
||||
"implementation": "./src/migrations/update-22-1-0/update-nx-wrapper", |
"implementation": "./dist/src/migrations/update-17-3-0/update-nxw", |
||||
"package": "nx", |
"package": "nx", |
||||
"name": "22-1-0-update-nx-wrapper" |
"name": "22-6-0-add-claude-settings-local-to-git-ignore" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "21.5.0-beta.2", |
"cli": "nx", |
||||
"description": "Migrate the legacy 'development' custom condition to a workspace-unique custom condition name.", |
"version": "22.7.0-beta.0", |
||||
"factory": "./src/migrations/update-21-5-0/migrate-development-custom-condition", |
"description": "Adds .nx/self-healing to .gitignore", |
||||
"package": "@nx/js", |
"implementation": "./dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore", |
||||
"name": "migrate-development-custom-condition" |
"package": "nx", |
||||
|
"name": "22-7-0-add-self-healing-to-gitignore" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "22.0.0-beta.0", |
"version": "22.3.2-beta.0", |
||||
"description": "Remove the deprecated `external` and `externalBuildTargets` options from the `@nx/js:swc` and `@nx/js:tsc` executors.", |
"requires": { |
||||
"factory": "./src/migrations/update-22-0-0/remove-external-options-from-js-executors", |
"@angular/build": ">=21.0.0" |
||||
"package": "@nx/js", |
}, |
||||
"name": "remove-external-options-from-js-executors" |
"description": "Create AI Instructions to help migrate users workspaces past breaking changes for Vitest 4.", |
||||
|
"implementation": "./src/migrations/update-22-1-0/create-ai-instructions-for-vitest-4", |
||||
|
"package": "@nx/vitest", |
||||
|
"name": "update-22-3-2" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "22.1.0-rc.1", |
"version": "22.6.0-beta.11", |
||||
"description": "Removes redundant TypeScript project references from project's tsconfig.json files when runtime tsconfig files (e.g., tsconfig.lib.json, tsconfig.app.json) exist.", |
"description": "Prefix reportsDirectory with {projectRoot} to maintain correct resolution after workspace-root-relative behavior change.", |
||||
"factory": "./src/migrations/update-22-1-0/remove-redundant-ts-project-references", |
"implementation": "./src/migrations/update-22-6-0/prefix-reports-directory-with-project-root", |
||||
"package": "@nx/js", |
"package": "@nx/vitest", |
||||
"name": "remove-redundant-ts-project-references" |
"name": "update-22-6-0-prefix-reports-directory" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "21.3.0-beta.3", |
"version": "22.7.0-beta.12", |
||||
"description": "Rename the CLI option `testPathPattern` to `testPathPatterns`.", |
"description": "Add missing inputs to @nx/eslint:lint executor target defaults", |
||||
"implementation": "./src/migrations/update-21-3-0/rename-test-path-pattern", |
"implementation": "./src/migrations/update-21-6-0/update-executor-lint-inputs", |
||||
"package": "@nx/jest", |
"package": "@nx/eslint", |
||||
"name": "rename-test-path-pattern" |
"name": "update-executor-lint-inputs" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "22.2.0-beta.2", |
"version": "22.3.2-beta.0", |
||||
"description": "Convert jest.config.ts files from ESM to CJS syntax (export default -> module.exports, import -> require) for projects using CommonJS resolution to ensure correct loading under Node.js type-stripping.", |
"requires": { |
||||
"implementation": "./src/migrations/update-22-2-0/convert-jest-config-to-cjs", |
"jest": ">=30.0.0" |
||||
|
}, |
||||
|
"description": "Replace removed matcher aliases in Jest v30 with their corresponding matcher", |
||||
|
"implementation": "./src/migrations/update-21-3-0/replace-removed-matcher-aliases", |
||||
"package": "@nx/jest", |
"package": "@nx/jest", |
||||
"name": "convert-jest-config-to-cjs" |
"name": "replace-removed-matcher-aliases-v22-3" |
||||
}, |
}, |
||||
{ |
{ |
||||
"cli": "nx", |
"version": "22.3.0-beta.0", |
||||
"version": "21.3.0-beta.4", |
"requires": { |
||||
"requires": { "@angular/core": ">=20.1.0" }, |
"@angular/core": ">=21.0.0" |
||||
"description": "Update the @angular/cli package version to ~20.1.0.", |
}, |
||||
"factory": "./src/migrations/update-21-3-0/update-angular-cli", |
"description": "Updates webpack-based SSR configuration to use preserve module format and bundler module resolution.", |
||||
|
"factory": "./src/migrations/update-22-3-0/update-ssr-webpack-config", |
||||
"package": "@nx/angular", |
"package": "@nx/angular", |
||||
"name": "update-angular-cli-version-20-1-0" |
"name": "update-ssr-webpack-config-22-2-0" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "21.5.0-beta.0", |
"version": "22.3.0-beta.0", |
||||
"description": "Set the 'tsConfig' option to build and test targets to help with Angular migration issues.", |
"requires": { |
||||
"factory": "./src/migrations/update-21-5-0/set-tsconfig-option", |
"@angular/core": ">=21.0.0-rc.3" |
||||
|
}, |
||||
|
"description": "Update 'module' to 'preserve' and 'moduleResolution' to 'bundler' in TypeScript configurations for Angular projects.", |
||||
|
"factory": "./src/migrations/update-22-3-0/update-module-resolution", |
||||
"package": "@nx/angular", |
"package": "@nx/angular", |
||||
"name": "set-tsconfig-option" |
"name": "update-module-resolution-22-2-0" |
||||
}, |
}, |
||||
{ |
{ |
||||
"cli": "nx", |
"version": "22.3.0-beta.0", |
||||
"version": "21.5.0-beta.2", |
"requires": { |
||||
"requires": { "@angular/core": ">=20.2.0" }, |
"@angular/core": ">=21.0.0" |
||||
"description": "Update the @angular/cli package version to ~20.2.0.", |
}, |
||||
"factory": "./src/migrations/update-21-5-0/update-angular-cli", |
"description": "Updates the 'lib' property in tsconfig files to use 'es2022' or a more modern version.", |
||||
|
"factory": "./src/migrations/update-22-3-0/update-typescript-lib", |
||||
"package": "@nx/angular", |
"package": "@nx/angular", |
||||
"name": "update-angular-cli-version-20-2-0" |
"name": "update-typescript-lib-22-2-0" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "21.5.0-beta.2", |
"version": "22.3.0-beta.0", |
||||
"requires": { "@angular/core": ">=20.2.0" }, |
"requires": { |
||||
"description": "Remove any Karma configuration files that only contain the default content. The default configuration is automatically available without a specific project configurationfile.", |
"@angular/core": ">=21.0.0" |
||||
"factory": "./src/migrations/update-21-5-0/remove-default-karma-configuration-files", |
}, |
||||
|
"description": "Update 'vitest' unit test runner option to 'vitest-analog' in generator defaults.", |
||||
|
"factory": "./src/migrations/update-22-3-0/update-unit-test-runner-option", |
||||
"package": "@nx/angular", |
"package": "@nx/angular", |
||||
"name": "remove-default-karma-configuration-files" |
"name": "update-unit-test-runner-option" |
||||
}, |
}, |
||||
{ |
{ |
||||
"cli": "nx", |
"version": "22.3.0-beta.3", |
||||
"version": "21.6.1-beta.2", |
"requires": { |
||||
"requires": { "@angular/core": ">=20.3.0" }, |
"@angular/core": ">=21.0.0" |
||||
"description": "Update the @angular/cli package version to ~20.3.0.", |
}, |
||||
"factory": "./src/migrations/update-21-6-1/update-angular-cli", |
"description": "Set 'isolatedModules' to 'true' in TypeScript test configurations for Angular projects.", |
||||
|
"factory": "./src/migrations/update-22-3-0/set-isolated-modules", |
||||
"package": "@nx/angular", |
"package": "@nx/angular", |
||||
"name": "update-angular-cli-version-20-3-0" |
"name": "set-isolated-modules-22-3-0" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "20.2.0", |
"version": "22.3.0-beta.3", |
||||
"description": "Replaces usages of the deprecated Router.getCurrentNavigation method with the Router.currentNavigation signal", |
"requires": { |
||||
"factory": "./bundles/router-current-navigation.cjs#migrate", |
"@angular/core": ">=21.0.0" |
||||
"optional": true, |
}, |
||||
"package": "@angular/core", |
"description": "Replace 'jest-preset-angular/setup-jest' imports with the new 'setupZoneTestEnv' function.", |
||||
"name": "router-current-navigation" |
"factory": "./src/migrations/update-22-3-0/update-jest-preset-angular-setup", |
||||
}, |
"package": "@nx/angular", |
||||
{ |
"name": "update-jest-preset-angular-setup" |
||||
"version": "20.3.0", |
|
||||
"description": "Adds `BootstrapContext` to `bootstrapApplication` calls in `main.server.ts` to support server rendering.", |
|
||||
"factory": "./bundles/add-bootstrap-context-to-server-main.cjs#migrate", |
|
||||
"package": "@angular/core", |
|
||||
"name": "add-bootstrap-context-to-server-main" |
|
||||
} |
} |
||||
] |
] |
||||
} |
} |
||||
|
|||||
@ -1,14 +1,14 @@ |
|||||
@if (form) { |
@if (form) { |
||||
<form [formGroup]="form" (ngSubmit)="submit()" validateOnSubmit class="abp-md-form"> |
<form [formGroup]="form" (ngSubmit)="submit()" [validateOnSubmit]="true" class="abp-md-form"> |
||||
<abp-extensible-form [selectedRecord]="selected"></abp-extensible-form> |
<abp-extensible-form [selectedRecord]="selected" /> |
||||
|
|
||||
<abp-button |
<abp-button |
||||
buttonType="submit" |
buttonType="submit" |
||||
iconClass="fa fa-check" |
iconClass="fa fa-check" |
||||
buttonClass="btn btn-primary color-white" |
buttonClass="btn btn-primary color-white" |
||||
[loading]="inProgress" |
[loading]="inProgress()" |
||||
> |
|
||||
{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button |
|
||||
> |
> |
||||
|
{{ 'AbpIdentity::Save' | abpLocalization }} |
||||
|
</abp-button> |
||||
</form> |
</form> |
||||
} |
} |
||||
|
|||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue