{"version":3,"file":"fundamental-ngx-core-object-attribute.mjs","sources":["../../../../libs/core/object-attribute/object-attribute.component.ts","../../../../libs/core/object-attribute/object-attribute.component.html","../../../../libs/core/object-attribute/object-attribute.module.ts","../../../../libs/core/object-attribute/fundamental-ngx-core-object-attribute.ts"],"sourcesContent":["import {\n    ChangeDetectionStrategy,\n    Component,\n    ElementRef,\n    EventEmitter,\n    Input,\n    OnInit,\n    Output,\n    Renderer2,\n    ViewEncapsulation\n} from '@angular/core';\n\n@Component({\n    selector: 'fd-object-attribute',\n    templateUrl: './object-attribute.component.html',\n    styleUrl: './object-attribute.component.scss',\n    encapsulation: ViewEncapsulation.None,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    imports: []\n})\nexport class ObjectAttributeComponent implements OnInit {\n    /** label for the element */\n    @Input()\n    label: string;\n\n    /** Text in link */\n    @Input()\n    linkText: string;\n\n    /** Is linked object attribute */\n    @Input()\n    islink: boolean;\n\n    /** To disabled linked object attribute */\n    @Input()\n    disabled: boolean;\n\n    /** Emitting object attribute link click event */\n    @Output()\n    objectAttributeclick = new EventEmitter<Event>();\n\n    /** @hidden */\n    constructor(\n        private _el: ElementRef<HTMLElement>,\n        private _renderer: Renderer2\n    ) {}\n\n    /** @hidden */\n    ngOnInit(): void {\n        this._renderer.addClass(this._el.nativeElement, 'fd-object-attribute');\n        if (this.label !== null && this.label !== undefined) {\n            this._renderer.setProperty(this._el.nativeElement, 'aria-label', this.label);\n            this._renderer.setProperty(this._el.nativeElement, 'title', this.label);\n        }\n    }\n\n    /**\n     *  Handles link click\n     */\n    onObjectAttributeClick(event: Event): void {\n        if (this.islink) {\n            this.objectAttributeclick.emit(event);\n        }\n    }\n}\n","{{ label }}\n<ng-content></ng-content>\n@if (linkText !== null && linkText !== undefined) {\n    <span\n        (click)=\"onObjectAttributeClick($event)\"\n        [attr.tabindex]=\"disabled ? '-1' : '0'\"\n        [attr.aria-label]=\"linkText\"\n        [attr.title]=\"linkText\"\n        [class.fd-object-attribute--link]=\"islink\"\n        role=\"link\"\n        [attr.aria-disabled]=\"disabled\"\n        (keydown.enter)=\"onObjectAttributeClick($event)\"\n    >\n        {{ linkText }}\n    </span>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ObjectAttributeComponent } from './object-attribute.component';\n\n/**\n * @deprecated\n * Use direct imports of components and directives.\n */\n@NgModule({\n    imports: [ObjectAttributeComponent],\n    exports: [ObjectAttributeComponent]\n})\nexport class ObjectAttributeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAoBa,wBAAwB,CAAA;;IAsBjC,WAAA,CACY,GAA4B,EAC5B,SAAoB,EAAA;QADpB,IAAA,CAAA,GAAG,GAAH,GAAG;QACH,IAAA,CAAA,SAAS,GAAT,SAAS;;AALrB,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,YAAY,EAAS;IAM7C;;IAGH,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,qBAAqB,CAAC;AACtE,QAAA,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;AACjD,YAAA,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC;AAC5E,YAAA,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC;QAC3E;IACJ;AAEA;;AAEG;AACH,IAAA,sBAAsB,CAAC,KAAY,EAAA;AAC/B,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC;QACzC;IACJ;8GA3CS,wBAAwB,EAAA,IAAA,EAAA,CAAA,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