Skip to content

Commit

Permalink
validator.d.ts, regenerate all (3), ref prev 1513a6d
Browse files Browse the repository at this point in the history
  • Loading branch information
mpreyskurantov committed Jan 8, 2025
1 parent 1513a6d commit 0121803
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
14 changes: 7 additions & 7 deletions packages/devextreme-angular/src/ui/validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {


import * as CommonTypes from 'devextreme/common';
import { EventInfo } from 'devextreme/common/core/events';
import { DisposingEvent, InitializedEvent, OptionChangedEvent } from 'devextreme/ui/validator';

import DxValidator from 'devextreme/ui/validator';

Expand Down Expand Up @@ -179,27 +179,27 @@ export class DxValidatorComponent extends DxComponentExtension implements OnDest

/**
* [descr:DOMComponentOptions.onDisposing]
* [descr:dxValidatorOptions.onDisposing]
*/
@Output() onDisposing: EventEmitter<EventInfo<any>>;
@Output() onDisposing: EventEmitter<DisposingEvent>;

/**
* [descr:ComponentOptions.onInitialized]
* [descr:dxValidatorOptions.onInitialized]
*/
@Output() onInitialized: EventEmitter<Object>;
@Output() onInitialized: EventEmitter<InitializedEvent>;

/**
* [descr:DOMComponentOptions.onOptionChanged]
* [descr:dxValidatorOptions.onOptionChanged]
*/
@Output() onOptionChanged: EventEmitter<Object>;
@Output() onOptionChanged: EventEmitter<OptionChangedEvent>;

/**
Expand Down
12 changes: 11 additions & 1 deletion packages/devextreme-react/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@ import { ExtensionComponent as BaseComponent } from "./core/extension-component"
import { IHtmlOptions, ComponentRef, NestedComponentMeta } from "./core/component";
import NestedOption from "./core/nested-option";

import type { DisposingEvent, InitializedEvent } from "devextreme/ui/validator";
import type { ValidationRuleType, ComparisonOperator } from "devextreme/common";

type IValidatorOptions = React.PropsWithChildren<Properties & IHtmlOptions>
type ReplaceFieldTypes<TSource, TReplacement> = {
[P in keyof TSource]: P extends keyof TReplacement ? TReplacement[P] : TSource[P];
}

type IValidatorOptionsNarrowedEvents = {
onDisposing?: ((e: DisposingEvent) => void);
onInitialized?: ((e: InitializedEvent) => void);
}

type IValidatorOptions = React.PropsWithChildren<ReplaceFieldTypes<Properties, IValidatorOptionsNarrowedEvents> & IHtmlOptions>

interface ValidatorRef {
instance: () => dxValidator;
Expand Down
16 changes: 7 additions & 9 deletions packages/devextreme-vue/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import { PropType } from "vue";
import { defineComponent } from "vue";
import { prepareExtensionComponentConfig } from "./core/index";
import Validator, { Properties } from "devextreme/ui/validator";
import DOMComponent from "devextreme/core/dom_component";
import {
EventInfo,
} from "devextreme/common/core/events";
import {
Component,
} from "devextreme/core/component";
DisposingEvent,
InitializedEvent,
OptionChangedEvent,
} from "devextreme/ui/validator";
import {
ValidationStatus,
ValidationRuleType,
Expand Down Expand Up @@ -41,9 +39,9 @@ const componentConfig = {
elementAttr: Object as PropType<Record<string, any>>,
height: [Function, Number, String] as PropType<((() => number | string)) | number | string>,
name: String,
onDisposing: Function as PropType<((e: EventInfo<any>) => void)>,
onInitialized: Function as PropType<((e: { component: Component<any>, element: any }) => void)>,
onOptionChanged: Function as PropType<((e: { component: DOMComponent, element: any, fullName: string, model: any, name: string, previousValue: any, value: any }) => void)>,
onDisposing: Function as PropType<((e: DisposingEvent) => void)>,
onInitialized: Function as PropType<((e: InitializedEvent) => void)>,
onOptionChanged: Function as PropType<((e: OptionChangedEvent) => void)>,
onValidated: Function as PropType<((validatedInfo: { brokenRule: CommonTypes.ValidationRule | CommonTypes.ValidationRule | CommonTypes.ValidationRule | CommonTypes.ValidationRule | CommonTypes.ValidationRule | CommonTypes.ValidationRule | CommonTypes.ValidationRule | CommonTypes.ValidationRule | CommonTypes.ValidationRule, brokenRules: Array<CommonTypes.ValidationRule>, isValid: boolean, name: string, status: ValidationStatus, validationRules: Array<CommonTypes.ValidationRule>, value: Record<string, any> }) => void)>,
validationGroup: String,
validationRules: Array as PropType<Array<CommonTypes.ValidationRule>>,
Expand Down

0 comments on commit 0121803

Please sign in to comment.