primeng
Version:
PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,
75 lines (70 loc) • 4.58 kB
JavaScript
import * as i0 from '@angular/core';
import { Injectable, InjectionToken, input, inject, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
import { SharedModule } from 'primeng/api';
import { BaseComponent, PARENT_INSTANCE } from 'primeng/basecomponent';
import * as i1 from 'primeng/bind';
import { Bind } from 'primeng/bind';
import { BaseStyle } from 'primeng/base';
const classes = {
root: 'p-inputicon'
};
class InputIconStyle extends BaseStyle {
name = 'inputicon';
classes = classes;
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: InputIconStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: InputIconStyle });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: InputIconStyle, decorators: [{
type: Injectable
}] });
const INPUTICON_INSTANCE = new InjectionToken('INPUTICON_INSTANCE');
/**
* InputIcon displays an icon.
* @group Components
*/
class InputIcon extends BaseComponent {
componentName = 'InputIcon';
hostName = input('', /* @ts-ignore */
...(ngDevMode ? [{ debugName: "hostName" }] : /* istanbul ignore next */ []));
_componentStyle = inject(InputIconStyle);
$pcInputIcon = inject(INPUTICON_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
bindDirectiveInstance = inject(Bind, { self: true });
onAfterViewChecked() {
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: InputIcon, deps: null, target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: InputIcon, isStandalone: true, selector: "p-inputicon", inputs: { hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cx('root')" } }, providers: [InputIconStyle, { provide: INPUTICON_INSTANCE, useExisting: InputIcon }, { provide: PARENT_INSTANCE, useExisting: InputIcon }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, dependencies: [{ kind: "ngmodule", type: SharedModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: InputIcon, decorators: [{
type: Component,
args: [{
selector: 'p-inputicon',
standalone: true,
imports: [SharedModule],
template: `<ng-content></ng-content>`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [InputIconStyle, { provide: INPUTICON_INSTANCE, useExisting: InputIcon }, { provide: PARENT_INSTANCE, useExisting: InputIcon }],
hostDirectives: [Bind],
host: {
'[class]': "cx('root')"
}
}]
}], propDecorators: { hostName: [{ type: i0.Input, args: [{ isSignal: true, alias: "hostName", required: false }] }] } });
class InputIconModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: InputIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: InputIconModule, imports: [InputIcon, SharedModule], exports: [InputIcon, SharedModule] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: InputIconModule, imports: [InputIcon, SharedModule, SharedModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: InputIconModule, decorators: [{
type: NgModule,
args: [{
imports: [InputIcon, SharedModule],
exports: [InputIcon, SharedModule]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { InputIcon, InputIconModule, InputIconStyle };
//# sourceMappingURL=primeng-inputicon.mjs.map