Skip to content

Commit

Permalink
Refactor #3965 - For Directives .d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Jun 23, 2023
1 parent 2f33571 commit ab880af
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 50 deletions.
30 changes: 15 additions & 15 deletions components/lib/badgedirective/BadgeDirective.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,46 @@ import { DirectiveBinding, ObjectDirective } from 'vue';
/**
* Defines options of Badge.
*/
export interface BadgeOptions {
export interface BadgeDirectiveOptions {
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {BadgePassThroughOptions}
* @type {BadgeDirectivePassThroughOptions}
*/
pt?: BadgePassThroughOptions;
pt?: BadgeDirectivePassThroughOptions;
}

/**
* Custom passthrough(pt) options.
* @see {@link BadgeOptions.pt}
* @see {@link BadgeDirectiveOptions.pt}
*/
export interface BadgePassThroughOptions {
export interface BadgeDirectivePassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
* @see {@link BadgePassThroughDirectiveOptions}
* @see {@link BadgeDirectivePassThroughDirectiveOptions}
*/
root?: BadgePassThroughDirectiveOptions;
root?: BadgeDirectivePassThroughDirectiveOptions;
}

/**
* Custom passthrough(pt) directive options.
*/
export interface BadgePassThroughDirectiveOptions {
export interface BadgeDirectivePassThroughDirectiveOptions {
/**
* Uses to pass attributes to the life cycle hooks.
* @see {@link BadgePassThroughHooksOptions}
* @see {@link BadgeDirectivePassThroughHooksOptions}
*/
hooks?: BadgePassThroughHooksOptions;
hooks?: BadgeDirectivePassThroughHooksOptions;
/**
* Uses to pass attributes to the styles.
* @see {@link BadgePassThroughCSSOptions}
* @see {@link BadgeDirectivePassThroughCSSOptions}
*/
css?: BadgePassThroughCSSOptions;
css?: BadgeDirectivePassThroughCSSOptions;
}

/**
* Custom passthrough(pt) hooks options.
*/
export interface BadgePassThroughHooksOptions {
export interface BadgeDirectivePassThroughHooksOptions {
/**
* Called before bound element's attributes or event listeners are applied.
*/
Expand Down Expand Up @@ -84,7 +84,7 @@ export interface BadgePassThroughHooksOptions {
/**
* Custom passthrough(pt) css options.
*/
export interface BadgePassThroughCSSOptions {
export interface BadgeDirectivePassThroughCSSOptions {
/**
* Style class of the element.
*/
Expand Down Expand Up @@ -128,7 +128,7 @@ export interface BadgeDirectiveBinding extends Omit<DirectiveBinding, 'modifiers
/**
* Value of the Badge.
*/
value?: string | BadgeOptions | undefined;
value?: string | BadgeDirectiveOptions | undefined;
/**
* Modifiers of the Badge.
* @type {BadgeDirectiveModifiers}
Expand Down
13 changes: 12 additions & 1 deletion components/lib/config/PrimeVue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { AccordionTabPassThroughOptions } from '../accordiontab';
import { AutoCompletePassThroughOptions } from '../autocomplete';
import { AvatarPassThroughOptions } from '../avatar';
import { BadgePassThroughOptions } from '../badge';
import { BadgeDirectivePassThroughOptions } from '../badgedirective';
import { BlockUIPassThroughOptions } from '../blockui';
import { BreadcrumbPassThroughOptions } from '../breadcrumb';
import { ButtonPassThroughOptions } from '../button';
Expand Down Expand Up @@ -31,6 +32,7 @@ import { DropdownPassThroughOptions } from '../dropdown';
import { EditorPassThroughOptions } from '../editor';
import { FieldsetPassThroughOptions } from '../fieldset';
import { FileUploadPassThroughOptions } from '../fileupload';
import { FocusTrapDirectivePassThroughOptions } from '../focustrap';
import { GalleriaPassThroughOptions } from '../galleria';
import { ImagePassThroughOptions } from '../image';
import { InlineMessagePassThroughOptions } from '../inlinemessage';
Expand All @@ -57,6 +59,7 @@ import { PickListPassThroughOptions } from '../picklist';
import { ProgressBarPassThroughOptions } from '../progressbar';
import { ProgressSpinnerPassThroughOptions } from '../progressspinner';
import { RadioButtonPassThroughOptions } from '../radiobutton';
import { RippleDirectivePassThroughOptions } from '../ripple';
import { RowPassThroughOptions } from '../row';
import { ScrollPanelPassThroughOptions } from '../scrollpanel';
import { ScrollTopPassThroughOptions } from '../scrolltop';
Expand All @@ -66,6 +69,8 @@ import { SkeletonPassThroughOptions } from '../skeleton';
import { SpeedDialPassThroughOptions } from '../speeddial';
import { SplitButtonPassThroughOptions } from '../splitbutton';
import { SplitterPassThroughOptions } from '../splitter';
import { StepsPassThroughOptions } from '../steps';
import { StyleClassDirectivePassThroughOptions } from '../styleclass';
import { TabMenuPassThroughOptions } from '../tabmenu';
import { TabPanelPassThroughOptions } from '../tabpanel';
import { TabViewPassThroughOptions } from '../tabview';
Expand All @@ -76,6 +81,7 @@ import { TieredMenuPassThroughOptions } from '../tieredmenu';
import { TimelinePassThroughOptions } from '../timeline';
import { ToastPassThroughOptions } from '../toast';
import { ToolbarPassThroughOptions } from '../toolbar';
import { TooltipPassThroughOptions } from '../tooltip';
import { TreePassThroughOptions } from '../tree';
import { TreeSelectPassThroughOptions } from '../treeselect';
import { TreeTablePassThroughOptions } from '../treetable';
Expand Down Expand Up @@ -105,6 +111,7 @@ interface PrimeVuePTOptions {
autocomplete?: DefaultPTOptions<AutoCompletePassThroughOptions>;
avatar?: DefaultPTOptions<AvatarPassThroughOptions>;
badge?: DefaultPTOptions<BadgePassThroughOptions>;
badgedirective?: DefaultPTOptions<BadgeDirectivePassThroughOptions>;
blockui?: DefaultPTOptions<BlockUIPassThroughOptions>;
breadcrumb?: DefaultPTOptions<BreadcrumbPassThroughOptions>;
button?: DefaultPTOptions<ButtonPassThroughOptions>;
Expand Down Expand Up @@ -133,6 +140,7 @@ interface PrimeVuePTOptions {
editor?: DefaultPTOptions<EditorPassThroughOptions>;
fieldset?: DefaultPTOptions<FieldsetPassThroughOptions>;
fileupload?: DefaultPTOptions<FileUploadPassThroughOptions>;
focustrap?: DefaultPTOptions<FocusTrapDirectivePassThroughOptions>;
galleria?: DefaultPTOptions<GalleriaPassThroughOptions>;
image?: DefaultPTOptions<ImagePassThroughOptions>;
inlinemessage?: DefaultPTOptions<InlineMessagePassThroughOptions>;
Expand All @@ -159,6 +167,7 @@ interface PrimeVuePTOptions {
progressbar?: DefaultPTOptions<ProgressBarPassThroughOptions>;
progressspinner?: DefaultPTOptions<ProgressSpinnerPassThroughOptions>;
radiobutton?: DefaultPTOptions<RadioButtonPassThroughOptions>;
ripple?: DefaultPTOptions<RippleDirectivePassThroughOptions>;
row?: DefaultPTOptions<RowPassThroughOptions>;
scrollpanel?: DefaultPTOptions<ScrollPanelPassThroughOptions>;
scrolltop?: DefaultPTOptions<ScrollTopPassThroughOptions>;
Expand All @@ -168,7 +177,8 @@ interface PrimeVuePTOptions {
selectbutton?: DefaultPTOptions<SelectButtonPassThroughOptions>;
splitbutton?: DefaultPTOptions<SplitButtonPassThroughOptions>;
splitter?: DefaultPTOptions<SplitterPassThroughOptions>;
steps?: DefaultPTOptions<PanelMenuPassThroughOptions>;
steps?: DefaultPTOptions<StepsPassThroughOptions>;
styleclass?: DefaultPTOptions<StyleClassDirectivePassThroughOptions>;
tabmenu?: DefaultPTOptions<TabMenuPassThroughOptions>;
tabpanel?: DefaultPTOptions<TabPanelPassThroughOptions>;
tabview?: DefaultPTOptions<TabViewPassThroughOptions>;
Expand All @@ -179,6 +189,7 @@ interface PrimeVuePTOptions {
timeline?: DefaultPTOptions<TimelinePassThroughOptions>;
toast?: DefaultPTOptions<ToastPassThroughOptions>;
toolbar?: DefaultPTOptions<ToolbarPassThroughOptions>;
tooltip?: DefaultPTOptions<TooltipPassThroughOptions>;
tree?: DefaultPTOptions<TreePassThroughOptions>;
treeselect?: DefaultPTOptions<TreeSelectPassThroughOptions>;
treetable?: DefaultPTOptions<TreeTablePassThroughOptions>;
Expand Down
32 changes: 16 additions & 16 deletions components/lib/focustrap/FocusTrap.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,53 +24,53 @@ export interface FocusTrapOptions {
autoFocus?: boolean | undefined;
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {FocusTrapPassThroughOptions}
* @type {FocusTrapDirectivePassThroughOptions}
*/
pt?: FocusTrapPassThroughOptions;
pt?: FocusTrapDirectivePassThroughOptions;
}

/**
* Custom passthrough(pt) options.
* @see {@link FocusTrapOptions.pt}
*/
export interface FocusTrapPassThroughOptions {
export interface FocusTrapDirectivePassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
* @see {@link FocusTrapPassThroughDirectiveOptions}
* @see {@link FocusTrapDirectivePassThroughDirectiveOptions}
*/
root?: FocusTrapPassThroughDirectiveOptions;
root?: FocusTrapDirectivePassThroughDirectiveOptions;
/**
* Uses to pass attributes to the first focusable element's DOM element.
* @see {@link FocusTrapPassThroughDirectiveOptions}
* @see {@link FocusTrapDirectivePassThroughDirectiveOptions}
*/
firstFocusableElement?: FocusTrapPassThroughDirectiveOptions;
firstFocusableElement?: FocusTrapDirectivePassThroughDirectiveOptions;
/**
* Uses to pass attributes to the last focusable element's DOM element.
* @see {@link FocusTrapPassThroughDirectiveOptions}
* @see {@link FocusTrapDirectivePassThroughDirectiveOptions}
*/
lastFocusableElement?: FocusTrapPassThroughDirectiveOptions;
lastFocusableElement?: FocusTrapDirectivePassThroughDirectiveOptions;
}

/**
* Custom passthrough(pt) directive options.
*/
export interface FocusTrapPassThroughDirectiveOptions {
export interface FocusTrapDirectivePassThroughDirectiveOptions {
/**
* Uses to pass attributes to the life cycle hooks.
* @see {@link FocusTrapPassThroughHooksOptions}
* @see {@link FocusTrapDirectivePassThroughHooksOptions}
*/
hooks?: FocusTrapPassThroughHooksOptions;
hooks?: FocusTrapDirectivePassThroughHooksOptions;
/**
* Uses to pass attributes to the styles.
* @see {@link FocusTrapPassThroughCSSOptions}
* @see {@link FocusTrapDirectivePassThroughCSSOptions}
*/
css?: FocusTrapPassThroughCSSOptions;
css?: FocusTrapDirectivePassThroughCSSOptions;
}

/**
* Custom passthrough(pt) hooks options.
*/
export interface FocusTrapPassThroughHooksOptions {
export interface FocusTrapDirectivePassThroughHooksOptions {
/**
* Called before bound element's attributes or event listeners are applied.
*/
Expand Down Expand Up @@ -104,7 +104,7 @@ export interface FocusTrapPassThroughHooksOptions {
/**
* Custom passthrough(pt) css options.
*/
export interface FocusTrapPassThroughCSSOptions {
export interface FocusTrapDirectivePassThroughCSSOptions {
/**
* Style class of the element.
*/
Expand Down
24 changes: 12 additions & 12 deletions components/lib/ripple/Ripple.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,43 @@ import { DirectiveBinding, ObjectDirective } from 'vue';
export interface RippleOptions {
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {RipplePassThroughOptions}
* @type {RippleDirectivePassThroughOptions}
*/
pt?: RipplePassThroughOptions;
pt?: RippleDirectivePassThroughOptions;
}

/**
* Custom passthrough(pt) options.
* @see {@link RippleOptions.pt}
*/
export interface RipplePassThroughOptions {
export interface RippleDirectivePassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
* @see {@link RipplePassThroughDirectiveOptions}
* @see {@link RippleDirectivePassThroughOptions}
*/
root?: RipplePassThroughDirectiveOptions;
root?: RippleDirectivePassThroughOptions;
}

/**
* Custom passthrough(pt) directive options.
*/
export interface RipplePassThroughDirectiveOptions {
export interface RippleDirectivePassThroughOptions {
/**
* Uses to pass attributes to the life cycle hooks.
* @see {@link RipplePassThroughHooksOptions}
* @see {@link RippleDirectivePassThroughHooksOptions}
*/
hooks?: RipplePassThroughHooksOptions;
hooks?: RippleDirectivePassThroughHooksOptions;
/**
* Uses to pass attributes to the styles.
* @see {@link RipplePassThroughCSSOptions}
* @see {@link RippleDirectivePassThroughCSSOptions}
*/
css?: RipplePassThroughCSSOptions;
css?: RippleDirectivePassThroughCSSOptions;
}

/**
* Custom passthrough(pt) hooks options.
*/
export interface RipplePassThroughHooksOptions {
export interface RippleDirectivePassThroughHooksOptions {
/**
* Called before bound element's attributes or event listeners are applied.
*/
Expand Down Expand Up @@ -84,7 +84,7 @@ export interface RipplePassThroughHooksOptions {
/**
* Custom passthrough(pt) css options.
*/
export interface RipplePassThroughCSSOptions {
export interface RippleDirectivePassThroughCSSOptions {
/**
* Style class of the element.
*/
Expand Down
12 changes: 6 additions & 6 deletions components/lib/styleclass/StyleClass.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@ export interface StyleClassOptions {
toggleClass?: string | undefined;
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {StyleClassPassThroughDirectiveOptions}
* @type {StyleClassDirectivePassThroughOptions}
*/
pt?: StyleClassPassThroughDirectiveOptions;
pt?: StyleClassDirectivePassThroughOptions;
}

/**
* Custom passthrough(pt) directive options.
*/
export interface StyleClassPassThroughDirectiveOptions {
export interface StyleClassDirectivePassThroughOptions {
/**
* Uses to pass attributes to the life cycle hooks.
* @see {@link StyleClassPassThroughHooksOptions}
* @see {@link StyleClassDirectivePassThroughHooksOptions}
*/
hooks?: StyleClassPassThroughHooksOptions;
hooks?: StyleClassDirectivePassThroughHooksOptions;
}

/**
* Custom passthrough(pt) hooks options.
*/
export interface StyleClassPassThroughHooksOptions {
export interface StyleClassDirectivePassThroughHooksOptions {
/**
* Called before bound element's attributes or event listeners are applied.
*/
Expand Down

0 comments on commit ab880af

Please sign in to comment.