Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei15193 committed Sep 30, 2024
1 parent 7dd5275 commit c9f8fb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 36 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-model-view-viewmodel",
"version": "3.0.0-forms",
"version": "3.0.0-forms.2",
"description": "A library for developing React applications using Model-View-ViewModel inspired by .NET",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
34 changes: 1 addition & 33 deletions src/forms/index.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,7 @@
import { IReadOnlyObservableCollection, IObservableCollection } from '../collections';
import { FormFieldViewModel } from './FormFieldViewModel';
import { FormSectionCollection } from './FormSectionCollection';
import { FormViewModel } from './FormViewModel';
import { IReadOnlyFormSectionCollection } from './IReadOnlyFormSectionCollection';

export { FormViewModel } from './FormViewModel';
export { type IFormFieldViewModelConfig, FormFieldViewModel } from './FormFieldViewModel';

export type { IConfigurableFormSectionCollection, FormSectionSetupCallback } from './IConfigurableFormSectionCollection'
export type { IReadOnlyFormSectionCollection } from './IReadOnlyFormSectionCollection';
export type { IFormSectionCollection } from './IFormSectionCollection'
export { FormSectionCollection } from './FormSectionCollection';





export class MyFormViewModel extends FormViewModel {
public constructor() {
super();

this.withFields(
this.name = new FormFieldViewModel<string>({
name: 'name',
initialValue: '',
validators: [field => field.value === '' ? 'Required' : null]
}),
this.description = new FormFieldViewModel<string>({
name: 'description',
initialValue: ''
})
);
}

public readonly name: FormFieldViewModel<string>;

public readonly description: FormFieldViewModel<string>;
}
export { FormSectionCollection } from './FormSectionCollection';

0 comments on commit c9f8fb6

Please sign in to comment.