primeng
Version:
PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB
184 lines (179 loc) • 6.43 kB
TypeScript
import * as i0 from '@angular/core';
import { AfterContentInit, EventEmitter, TemplateRef, QueryList } from '@angular/core';
import * as i1 from 'primeng/api';
import { PrimeTemplate } from 'primeng/api';
import { BaseComponent } from 'primeng/basecomponent';
import * as _primeuix_styled from '@primeuix/styled';
import { BaseStyle } from 'primeng/base';
/**
*
* Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.
*
* [Live Demo](https://www.primeng.org/inplace)
*
* @module inplacestyle
*
*/
declare enum InplaceClasses {
/**
* Class name of the root element
*/
root = "p-inplace",
/**
* Class name of the display element
*/
display = "p-inplace-display",
/**
* Class name of the content element
*/
content = "p-inplace-content"
}
declare class InplaceStyle extends BaseStyle {
name: string;
theme: _primeuix_styled.StyleType;
classes: {
root: () => string[];
display: ({ instance }: {
instance: any;
}) => (string | {
'p-disabled': any;
})[];
content: string;
};
static ɵfac: i0.ɵɵFactoryDeclaration<InplaceStyle, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<InplaceStyle>;
}
interface InplaceStyle extends BaseStyle {
}
declare class InplaceDisplay {
static ɵfac: i0.ɵɵFactoryDeclaration<InplaceDisplay, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<InplaceDisplay, "p-inplacedisplay, p-inplaceDisplay", never, {}, {}, never, ["*"], true, never>;
}
declare class InplaceContent {
static ɵfac: i0.ɵɵFactoryDeclaration<InplaceContent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<InplaceContent, "p-inplacecontent, p-inplaceContent", never, {}, {}, never, ["*"], true, never>;
}
/**
* Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.
* @group Components
*/
declare class Inplace extends BaseComponent implements AfterContentInit {
/**
* Whether the content is displayed or not.
* @group Props
*/
active: boolean | undefined;
/**
* Displays a button to switch back to display mode.
* @deprecated since v20.0.0, use `closeCallback` within content template.
* @group Props
*/
closable: boolean | undefined;
/**
* When present, it specifies that the element should be disabled.
* @group Props
*/
disabled: boolean | undefined;
/**
* Allows to prevent clicking.
* @group Props
*/
preventClick: boolean | undefined;
/**
* Class of the element.
* @deprecated since v20.0.0, use `class` instead.
* @group Props
*/
styleClass: string | undefined;
/**
* Icon to display in the close button.
* @deprecated since v20.0.0, use `class` instead.
* @group Props
*/
closeIcon: string | undefined;
/**
* Establishes a string value that labels the close button.
* @group Props
*/
closeAriaLabel: string | undefined;
/**
* Callback to invoke when inplace is opened.
* @param {Event} event - Browser event.
* @group Emits
*/
onActivate: EventEmitter<Event>;
/**
* Callback to invoke when inplace is closed.
* @param {Event} event - Browser event.
* @group Emits
*/
onDeactivate: EventEmitter<Event>;
hover: boolean;
/**
* Display template of the element.
* @group Templates
*/
displayTemplate: TemplateRef<any> | undefined;
/**
* Content template of the element.
* @group Templates
*/
contentTemplate: TemplateRef<any> | undefined;
/**
* Close icon template of the element.
* @group Templates
*/
closeIconTemplate: TemplateRef<any> | undefined;
_componentStyle: InplaceStyle;
onActivateClick(event: MouseEvent): void;
onDeactivateClick(event: MouseEvent): void;
/**
* Activates the content.
* @param {Event} event - Browser event.
* @group Method
*/
activate(event?: Event): void;
/**
* Deactivates the content.
* @param {Event} event - Browser event.
* @group Method
*/
deactivate(event?: Event): void;
onKeydown(event: KeyboardEvent): void;
templates: QueryList<PrimeTemplate> | undefined;
_displayTemplate: TemplateRef<any> | undefined;
_closeIconTemplate: TemplateRef<any> | undefined;
_contentTemplate: TemplateRef<any> | undefined;
ngAfterContentInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<Inplace, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<Inplace, "p-inplace", never, { "active": { "alias": "active"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "preventClick": { "alias": "preventClick"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "closeIcon": { "alias": "closeIcon"; "required": false; }; "closeAriaLabel": { "alias": "closeAriaLabel"; "required": false; }; }, { "onActivate": "onActivate"; "onDeactivate": "onDeactivate"; }, ["displayTemplate", "contentTemplate", "closeIconTemplate", "templates"], ["[pInplaceDisplay]", "[pInplaceContent]"], true, never>;
static ngAcceptInputType_active: unknown;
static ngAcceptInputType_closable: unknown;
static ngAcceptInputType_disabled: unknown;
static ngAcceptInputType_preventClick: unknown;
}
declare class InplaceModule {
static ɵfac: i0.ɵɵFactoryDeclaration<InplaceModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<InplaceModule, never, [typeof Inplace, typeof InplaceContent, typeof InplaceDisplay, typeof i1.SharedModule], [typeof Inplace, typeof InplaceContent, typeof InplaceDisplay, typeof i1.SharedModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<InplaceModule>;
}
/**
* Defines valid templates in Inplace.
* @group Templates
*/
interface InplaceTemplates {
/**
* Custom template of display.
*/
display(): TemplateRef<any>;
/**
* Custom template of content.
*/
content(): TemplateRef<any>;
/**
* Custom template of close icon.
*/
closeicon(): TemplateRef<any>;
}
export { Inplace, InplaceClasses, InplaceContent, InplaceDisplay, InplaceModule, InplaceStyle };
export type { InplaceTemplates };