Skip to content

Commit

Permalink
Old validation package replaced by the new one
Browse files Browse the repository at this point in the history
  • Loading branch information
gius committed May 2, 2021
1 parent 013866b commit a6c711e
Show file tree
Hide file tree
Showing 38 changed files with 324 additions and 1,230 deletions.
1 change: 0 additions & 1 deletion lerna-bootstrap-fix.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ call yarn lerna bootstrap [email protected]/helpers --force-local
call yarn lerna bootstrap --scope=@frui.ts/htmlcontrols --force-local
call yarn lerna bootstrap --scope=@frui.ts/screens --force-local
call yarn lerna bootstrap --scope=@frui.ts/validation --force-local
call yarn lerna bootstrap --scope=@frui.ts/validation2 --force-local
call yarn lerna bootstrap --scope=@frui.ts/views --force-local
call yarn lerna bootstrap --scope=@frui.ts/example-complexdemo --force-local
call yarn lerna bootstrap --scope=@frui.ts/examples-simpletodolist --force-local
Expand Down
8 changes: 4 additions & 4 deletions packages/datascreens/src/filteredListViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { IPagingFilter, SortingDirection } from "@frui.ts/data";
import { attachAutomaticDirtyWatcher, IHasDirtyWatcher, resetDirty } from "@frui.ts/dirtycheck";
import { bound } from "@frui.ts/helpers";
import { ScreenBase } from "@frui.ts/screens";
import { IHasValidation, validate } from "@frui.ts/validation";
import { action, isObservableArray, observable } from "mobx";
import ListViewModel from "./listViewModel";
import { validate } from "@frui.ts/validation";

type OmitValidationAndDirtyWatcher<T> = Omit<T, keyof IHasDirtyWatcher<T> | keyof IHasValidation<T>>;
type OmitValidationAndDirtyWatcher<T> = Omit<T, keyof IHasDirtyWatcher<T>>;

export default abstract class FilteredListViewModel<
TEntity,
Expand All @@ -17,7 +17,7 @@ export default abstract class FilteredListViewModel<
static defaultPageSize = 30;

/** Currently edited filter */
@observable filter: TFilter & IHasDirtyWatcher<TFilter> & Partial<IHasValidation<TFilter>>;
@observable filter: TFilter & IHasDirtyWatcher<TFilter>;
/** Currently edited paging filter */
@observable pagingFilter: IPagingFilter;

Expand Down Expand Up @@ -46,7 +46,7 @@ export default abstract class FilteredListViewModel<
}

protected cloneFilterForApply(filter: TFilter): OmitValidationAndDirtyWatcher<TFilter> {
const { __dirtycheck, __validation, ...clonedFilter } = this.filter;
const { __dirtycheck, ...clonedFilter } = this.filter;

// we need to clone array properties so that they are not shared with the original filter
Object.entries(clonedFilter).forEach(([key, value]) => {
Expand Down
176 changes: 0 additions & 176 deletions packages/validation/README.md

This file was deleted.

Loading

0 comments on commit a6c711e

Please sign in to comment.