@narik/ui-ng-bootstrap
Version:
Framework to create angular application
607 lines (587 loc) • 114 kB
JavaScript
import * as i0 from '@angular/core';
import { forwardRef, Component, Input, NgModule, HostListener, Inject, ViewChild, Directive, Renderer2 } from '@angular/core';
import * as i4 from '@ngx-translate/core';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { NarikAutoComplete, NarikButton, BUTTON_DEFAULT_OPTIONS, NarikCheckBox, NarikCheckBoxList, NarikDataTable, NarikDatePicker, NarikInput, NarikRadioGroup, NarikSelect, NarikDynamicForm, NarikTreeview, NarikToolBar, NarikTabOutlet } from '@narik/ui-core';
import * as i2 from '@angular/forms';
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { debounceTime, distinctUntilChanged, map, tap, switchMap, finalize, take } from 'rxjs/operators';
import { of } from 'rxjs';
import { DataProviderService, MODULE_DATA_KEY, PARAMETERS, DIALOG_CONTAINER, DIALOG_MESSAGE_COMPONENT, DIALOG_INPUT_COMPONENT } from '@narik/infrastructure';
import * as i1 from '@angular/common';
import { CommonModule, DOCUMENT } from '@angular/common';
import * as i1$1 from '@ng-bootstrap/ng-bootstrap';
import { NgbTypeaheadModule, NgbTooltipModule, NgbDatepickerModule, NgbDateAdapter, NgbDateNativeAdapter, NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { BusyIndicator, NarikListForm, NarikEditForm } from '@narik/app-core';
import * as i9 from '@narik/common';
import { NarikCommonModule, groupBy } from '@narik/common';
import { __decorate, __metadata } from 'tslib';
import { NarikInject, NarikDialogContainer, DialogAnimationBody } from '@narik/core';
import * as i8 from '@angular/flex-layout/flex';
import { FlexLayoutModule } from '@angular/flex-layout';
import { trigger } from '@angular/animations';
import { UUID } from 'angular2-uuid';
const NARIK_UI_COMPONENT_INPUTS = ['options'];
const NARIK_UI_FORM_INPUTS = [
'id',
'name',
'label',
'disabled',
'required',
'readOnly',
'placeHolder',
...NARIK_UI_COMPONENT_INPUTS,
];
const NARIK_DATA_ORIENTED_OUTPUTS = [
'dataChange',
'selectedItemChange',
];
const NARIK_DATA_ORIENTED_INPUTS = [
'listenForDataChange',
'dataSource',
'dataKey',
'dataUrl',
'dataInfo',
'dataProviderKey',
'dataParameters',
'moduleKey',
'dataMethod',
'dataUrlMethod',
...NARIK_UI_FORM_INPUTS,
];
const NARIK_DATA_DISPLAY_VALUE_OUTPUTS = [
...NARIK_DATA_ORIENTED_OUTPUTS,
];
const NARIK_DATA_DISPLAY_VALUE_INPUTS = [
'displayField',
'valueField',
...NARIK_DATA_ORIENTED_INPUTS,
];
const NARIK_AUTOCOMPLETE_INPUTS = [
'displayText',
'minSearchLength',
'isLazyLoadData',
];
const NARIK_CHECKBOX_INPUTS = ['tag', ...NARIK_UI_FORM_INPUTS];
const NARIK_SELECT_INPUTS = ['multiple'];
const NARIK_DATA_TABLE_SELECT_INPUTS = [
...NARIK_SELECT_INPUTS,
'gridOptions',
];
const NARIK_DATE_PICKER_INPUTS = [...NARIK_UI_FORM_INPUTS];
const NARIK_INPUT_INPUTS = [
'maxlength',
'type',
'mask',
'icon',
'displayStatus',
...NARIK_UI_FORM_INPUTS,
];
class NarikNgbAutoComplete extends NarikAutoComplete {
constructor(injector) {
super(injector);
this.internalChange = false;
this.optionData = [];
}
set displayValue(value) {
if (this._displayValue !== value) {
if (!this.internalChange) {
this.setValue(value);
}
this._displayValue = value;
}
}
get displayValue() {
return this._displayValue;
}
ngOnInit() {
this.loadDataOnInit = !this.isLazyLoadData;
super.ngOnInit();
if (!this.isLazyLoadData) {
this.search = (text$) => text$.pipe(debounceTime(200), distinctUntilChanged(), map((term) => term.length < this.minSearchLength
? []
: this.optionData
.filter((v) => this.displayField
? v[this.displayField]
: v
.toLowerCase()
.indexOf(term.toLowerCase()) >
-1)
.map((v) => this.displayField
? v[this.displayField]
: v)
.slice(0, 10)));
}
else {
const dataProviderService = this.injector.get(DataProviderService);
const dataInfo = this.createDataInfo();
dataInfo.dataMethod = 'POST';
dataInfo.actionType = 'COMPLETE';
if (!dataInfo.moduleKey) {
dataInfo.moduleKey = this.injector.get(MODULE_DATA_KEY);
}
this.search = (text$) => text$.pipe(debounceTime(200), distinctUntilChanged(), tap((filter) => {
if (filter && filter.length >= this.minSearchLength) {
this.dataIsLoading = true;
}
}), switchMap((filter) => {
dataInfo.dataParameters = {
filter: filter,
};
return filter && filter.length >= this.minSearchLength
? dataProviderService.getData(dataInfo).pipe(tap((result) => (this.optionData = result)), finalize(() => (this.dataIsLoading = false)))
: of([]);
}));
}
}
setValue(selectedText) {
this.internalChange = true;
if (!this.displayField) {
this.value = selectedText;
}
else {
if (selectedText) {
const item = this.optionData.filter((x) => x[this.displayField] === selectedText)[0];
if (item) {
this.value = item[this.valueField];
}
else {
this.value = undefined;
}
}
else {
this.value = undefined;
}
}
this.internalChange = false;
}
useData(data) {
this.optionData = data;
}
setDisplayText() {
this.internalChange = true;
if (this.value) {
const item = this.optionData.filter((x) => x[this.valueField] === this.value)[0];
this.displayValue = item
? item[this.displayField]
: this.displayText;
}
else {
this.displayValue = '';
}
this.internalChange = false;
}
valueChanged(newValue, oldValue) {
if (newValue !== oldValue && !this.internalChange) {
this.setDisplayText();
}
}
onBlur() {
if (!this.isLazyLoadData) {
this.setDisplayText();
}
}
}
/** @nocollapse */ /** @nocollapse */ NarikNgbAutoComplete.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbAutoComplete, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ NarikNgbAutoComplete.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NarikNgbAutoComplete, selector: "narik-ngb-autocomplete , narik-autocomplete ", inputs: { displayField: "displayField", valueField: "valueField", listenForDataChange: "listenForDataChange", dataSource: "dataSource", dataKey: "dataKey", dataUrl: "dataUrl", dataInfo: "dataInfo", dataProviderKey: "dataProviderKey", dataParameters: "dataParameters", moduleKey: "moduleKey", dataMethod: "dataMethod", dataUrlMethod: "dataUrlMethod", id: "id", name: "name", label: "label", disabled: "disabled", required: "required", readOnly: "readOnly", placeHolder: "placeHolder", options: "options", icon: "icon" }, outputs: { dataChange: "dataChange", selectedItemChange: "selectedItemChange" }, providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbAutoComplete)),
multi: true,
},
], usesInheritance: true, ngImport: i0, template: "<div class=\"form-group\">\n <label for=\"{{id}}\">{{label}}</label>\n <div class=\"input-group mb-3\" *ngIf=\"icon\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\"><i class=\"fa fa-{{icon}}\"></i></span>\n </div>\n <ng-container *ngTemplateOutlet=\"inputElement\"></ng-container>\n </div>\n <ng-container *ngIf=\"!icon\">\n <ng-container *ngTemplateOutlet=\"inputElement\"></ng-container>\n </ng-container>\n\n</div>\n<ng-template #inputElement>\n <input (blur)=\"onBlur()\" [required]=\"required\" [(ngModel)]=\"displayValue\" [attr.disabled]=\"disabled || null\"\n type=\"text\" name=\"{{name}}\" class=\"form-control\" [ngbTypeahead]=\"search\" id=\"{{id}}\" placeholder=\"{{placeHolder}}\">\n <input type=\"hidden\" name=\"{{name}}\" [(ngModel)]=\"value\">\n</ng-template>", styles: [""], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbAutoComplete, decorators: [{
type: Component,
args: [{ selector: 'narik-ngb-autocomplete , narik-autocomplete ', inputs: [...NARIK_DATA_DISPLAY_VALUE_INPUTS], outputs: [...NARIK_DATA_DISPLAY_VALUE_OUTPUTS], providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbAutoComplete)),
multi: true,
},
], template: "<div class=\"form-group\">\n <label for=\"{{id}}\">{{label}}</label>\n <div class=\"input-group mb-3\" *ngIf=\"icon\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\"><i class=\"fa fa-{{icon}}\"></i></span>\n </div>\n <ng-container *ngTemplateOutlet=\"inputElement\"></ng-container>\n </div>\n <ng-container *ngIf=\"!icon\">\n <ng-container *ngTemplateOutlet=\"inputElement\"></ng-container>\n </ng-container>\n\n</div>\n<ng-template #inputElement>\n <input (blur)=\"onBlur()\" [required]=\"required\" [(ngModel)]=\"displayValue\" [attr.disabled]=\"disabled || null\"\n type=\"text\" name=\"{{name}}\" class=\"form-control\" [ngbTypeahead]=\"search\" id=\"{{id}}\" placeholder=\"{{placeHolder}}\">\n <input type=\"hidden\" name=\"{{name}}\" [(ngModel)]=\"value\">\n</ng-template>", styles: [""] }]
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { icon: [{
type: Input
}] } });
class NarikNgbAutoCompleteModule {
}
/** @nocollapse */ /** @nocollapse */ NarikNgbAutoCompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbAutoCompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
/** @nocollapse */ /** @nocollapse */ NarikNgbAutoCompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbAutoCompleteModule, declarations: [NarikNgbAutoComplete], imports: [CommonModule, FormsModule, NgbTypeaheadModule], exports: [NarikNgbAutoComplete] });
/** @nocollapse */ /** @nocollapse */ NarikNgbAutoCompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbAutoCompleteModule, providers: [], imports: [[CommonModule, FormsModule, NgbTypeaheadModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbAutoCompleteModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, FormsModule, NgbTypeaheadModule],
declarations: [NarikNgbAutoComplete],
exports: [NarikNgbAutoComplete],
providers: [],
}]
}] });
class NarikNgbBusyIndicator {
setBusy(newState, msg) {
this.isBusy = newState;
}
}
/** @nocollapse */ /** @nocollapse */ NarikNgbBusyIndicator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbBusyIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ NarikNgbBusyIndicator.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NarikNgbBusyIndicator, selector: "narik-ngb-busy-indicator , narik-busy-indicator", inputs: { isBusy: "isBusy" }, providers: [
{
provide: BusyIndicator,
useExisting: forwardRef((() => NarikNgbBusyIndicator)),
},
], ngImport: i0, template: "<ng-content></ng-content>\n<div class=\"loading-panel\" *ngIf=\"isBusy\"></div>\n<div *ngIf=\"isBusy\" id=\"loader-wrapper\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"sr-only\">Loading...</span>\n </div>\n</div>\n", styles: [".loading-panel{width:100%;position:absolute;top:0;left:0;bottom:0;right:0;background-color:#fff;opacity:.4;z-index:50000}#loader-wrapper{width:64px;height:64px;position:absolute;left:50%;top:50%;z-index:1000;margin-left:-20px;margin-top:-20px}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbBusyIndicator, decorators: [{
type: Component,
args: [{ selector: 'narik-ngb-busy-indicator , narik-busy-indicator', providers: [
{
provide: BusyIndicator,
useExisting: forwardRef((() => NarikNgbBusyIndicator)),
},
], template: "<ng-content></ng-content>\n<div class=\"loading-panel\" *ngIf=\"isBusy\"></div>\n<div *ngIf=\"isBusy\" id=\"loader-wrapper\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"sr-only\">Loading...</span>\n </div>\n</div>\n", styles: [".loading-panel{width:100%;position:absolute;top:0;left:0;bottom:0;right:0;background-color:#fff;opacity:.4;z-index:50000}#loader-wrapper{width:64px;height:64px;position:absolute;left:50%;top:50%;z-index:1000;margin-left:-20px;margin-top:-20px}\n"] }]
}], propDecorators: { isBusy: [{
type: Input
}] } });
class NarikNgbBusyIndicatorModule {
}
/** @nocollapse */ /** @nocollapse */ NarikNgbBusyIndicatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbBusyIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
/** @nocollapse */ /** @nocollapse */ NarikNgbBusyIndicatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbBusyIndicatorModule, declarations: [NarikNgbBusyIndicator], imports: [CommonModule, TranslateModule], exports: [NarikNgbBusyIndicator] });
/** @nocollapse */ /** @nocollapse */ NarikNgbBusyIndicatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbBusyIndicatorModule, providers: [], imports: [[CommonModule, TranslateModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbBusyIndicatorModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, TranslateModule],
declarations: [NarikNgbBusyIndicator],
exports: [NarikNgbBusyIndicator],
providers: [],
}]
}] });
class NarikNgbButtonComponent extends NarikButton {
constructor(renderer, injector) {
super(injector);
this.renderer = renderer;
}
onClick(event) {
event.stopPropagation();
}
ngOnInit() {
super.ngOnInit();
this.buttonStyle = this.buttonStyle || this.defaultOptions.buttonStyle;
this.busyFontIcon =
this.busyFontIcon || this.defaultOptions.busyFontIcon;
}
ngAfterViewInit() { }
buttonClick(e) {
if (!this.disable && !this.isBusy) {
this.nClick.emit({
sender: this,
event: e,
});
}
}
}
/** @nocollapse */ /** @nocollapse */ NarikNgbButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbButtonComponent, deps: [{ token: i0.Renderer2 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ NarikNgbButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NarikNgbButtonComponent, selector: "narik-ngb-button , narik-button ", host: { listeners: { "click": "onClick($event)" } }, usesInheritance: true, ngImport: i0, template: "<button\n ngbTooltip=\"{{(tooltip ? (tooltip | translate) : '') + ( options.appendShortcutToTooltip && shortcut ? '(' + (shortcut | shortcut) +')' : '' )}}\"\n container=\"body\"\n placement=\"bottom\" (click)=\"buttonClick($event)\" [disabled]=\"disable || isBusy\" class=\"btn btn-{{buttonStyle}}\"\n type=\"button\" [ngClass]='cssClass'>\n <span *ngIf=\"isBusy\" class=\"mx-1 spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n <i *ngIf=\"icon\" class=\"fa fa-{{icon}}\"></i>\n {{ isBusy && busyLabel ? busyLabel : label}}\n</button>", directives: [{ type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i4.TranslatePipe, "shortcut": i9.ShortcutPipe } });
__decorate([
NarikInject(BUTTON_DEFAULT_OPTIONS, {
buttonStyle: 'secondary',
busyFontIcon: 'fa-spinner',
}),
__metadata("design:type", Object)
], NarikNgbButtonComponent.prototype, "defaultOptions", void 0);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbButtonComponent, decorators: [{
type: Component,
args: [{ selector: 'narik-ngb-button , narik-button ', template: "<button\n ngbTooltip=\"{{(tooltip ? (tooltip | translate) : '') + ( options.appendShortcutToTooltip && shortcut ? '(' + (shortcut | shortcut) +')' : '' )}}\"\n container=\"body\"\n placement=\"bottom\" (click)=\"buttonClick($event)\" [disabled]=\"disable || isBusy\" class=\"btn btn-{{buttonStyle}}\"\n type=\"button\" [ngClass]='cssClass'>\n <span *ngIf=\"isBusy\" class=\"mx-1 spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n <i *ngIf=\"icon\" class=\"fa fa-{{icon}}\"></i>\n {{ isBusy && busyLabel ? busyLabel : label}}\n</button>" }]
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.Injector }]; }, propDecorators: { defaultOptions: [], onClick: [{
type: HostListener,
args: ['click', ['$event']]
}] } });
class NarikNgbButtonModule {
}
/** @nocollapse */ /** @nocollapse */ NarikNgbButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
/** @nocollapse */ /** @nocollapse */ NarikNgbButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbButtonModule, declarations: [NarikNgbButtonComponent], imports: [CommonModule,
NgbTooltipModule,
TranslateModule,
NarikCommonModule], exports: [NarikNgbButtonComponent] });
/** @nocollapse */ /** @nocollapse */ NarikNgbButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbButtonModule, providers: [], imports: [[
CommonModule,
NgbTooltipModule,
TranslateModule,
NarikCommonModule,
]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbButtonModule, decorators: [{
type: NgModule,
args: [{
imports: [
CommonModule,
NgbTooltipModule,
TranslateModule,
NarikCommonModule,
],
declarations: [NarikNgbButtonComponent],
exports: [NarikNgbButtonComponent],
providers: [],
}]
}] });
class NarikNgbCheckBox extends NarikCheckBox {
constructor(injector) {
super(injector);
}
}
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBox, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NarikNgbCheckBox, selector: "narik-ngb-checkbox , narik-checkbox", inputs: { tag: "tag", id: "id", name: "name", label: "label", disabled: "disabled", required: "required", readOnly: "readOnly", placeHolder: "placeHolder", options: "options" }, providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbCheckBox)),
multi: true,
},
{
provide: NarikCheckBox,
useExisting: forwardRef((() => NarikNgbCheckBox)),
},
], usesInheritance: true, ngImport: i0, template: "<div class=\"form-check\">\n <input [attr.disabled]=\"disabled || null\" class=\"form-check-input\" type=\"checkbox\"\n [(ngModel)]=\"value\" id=\"{{id}}\">\n <label class=\"form-check-label\" for=\"{{id}}\">\n {{label}}\n </label>\n</div>\n", directives: [{ type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBox, decorators: [{
type: Component,
args: [{ selector: 'narik-ngb-checkbox , narik-checkbox', inputs: [...NARIK_CHECKBOX_INPUTS], providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbCheckBox)),
multi: true,
},
{
provide: NarikCheckBox,
useExisting: forwardRef((() => NarikNgbCheckBox)),
},
], template: "<div class=\"form-check\">\n <input [attr.disabled]=\"disabled || null\" class=\"form-check-input\" type=\"checkbox\"\n [(ngModel)]=\"value\" id=\"{{id}}\">\n <label class=\"form-check-label\" for=\"{{id}}\">\n {{label}}\n </label>\n</div>\n" }]
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
class NarikNgbCheckBoxModule {
}
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxModule, declarations: [NarikNgbCheckBox], imports: [CommonModule, FormsModule], exports: [NarikNgbCheckBox] });
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxModule, providers: [], imports: [[CommonModule, FormsModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, FormsModule],
declarations: [NarikNgbCheckBox],
exports: [NarikNgbCheckBox],
providers: [],
}]
}] });
class NarikNgbCheckBoxList extends NarikCheckBoxList {
constructor(injector) {
super(injector);
this.itemsData = [];
this._layoutDirection = 'vertical';
}
set layoutDirection(value) {
this._layoutDirection = value;
}
get layoutDirection() {
return this._layoutDirection;
}
useData(data) {
this.itemsData = data;
}
}
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBoxList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxList, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBoxList.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NarikNgbCheckBoxList, selector: "narik-ngb-checkbox-list , narik-checkbox-list", inputs: { displayField: "displayField", valueField: "valueField", listenForDataChange: "listenForDataChange", dataSource: "dataSource", dataKey: "dataKey", dataUrl: "dataUrl", dataInfo: "dataInfo", dataProviderKey: "dataProviderKey", dataParameters: "dataParameters", moduleKey: "moduleKey", dataMethod: "dataMethod", dataUrlMethod: "dataUrlMethod", id: "id", name: "name", label: "label", disabled: "disabled", required: "required", readOnly: "readOnly", placeHolder: "placeHolder", options: "options", layoutDirection: "layoutDirection" }, providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbCheckBoxList)),
multi: true,
},
], usesInheritance: true, ngImport: i0, template: "<div class=\"form-group\">\n <label for=\"{{id}}\">{{label}}</label>\n <div class=\"form-check-container p-1 pl-2\">\n <div [ngClass]=\"{ 'vertical-content': layoutDirection == 'vertical' }\">\n <narik-checkbox *ngFor=\"let item of itemsData\" (change)=\"addOrRemove(valueField ? item[valueField] : item)\"\n [tag]=\"valueField ? item[valueField] : item\" label=\"{{ item[displayField] }}\">\n </narik-checkbox>\n </div>\n </div>\n</div>\n", styles: [".form-check-container{border:1px solid #ced4da;border-radius:.25rem}\n"], components: [{ type: NarikNgbCheckBox, selector: "narik-ngb-checkbox , narik-checkbox", inputs: ["tag", "id", "name", "label", "disabled", "required", "readOnly", "placeHolder", "options"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxList, decorators: [{
type: Component,
args: [{ selector: 'narik-ngb-checkbox-list , narik-checkbox-list', inputs: [...NARIK_DATA_DISPLAY_VALUE_INPUTS], providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbCheckBoxList)),
multi: true,
},
], template: "<div class=\"form-group\">\n <label for=\"{{id}}\">{{label}}</label>\n <div class=\"form-check-container p-1 pl-2\">\n <div [ngClass]=\"{ 'vertical-content': layoutDirection == 'vertical' }\">\n <narik-checkbox *ngFor=\"let item of itemsData\" (change)=\"addOrRemove(valueField ? item[valueField] : item)\"\n [tag]=\"valueField ? item[valueField] : item\" label=\"{{ item[displayField] }}\">\n </narik-checkbox>\n </div>\n </div>\n</div>\n", styles: [".form-check-container{border:1px solid #ced4da;border-radius:.25rem}\n"] }]
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { layoutDirection: [{
type: Input
}] } });
class NarikNgbCheckBoxListModule {
}
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBoxListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBoxListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxListModule, declarations: [NarikNgbCheckBoxList], imports: [CommonModule, FormsModule, NarikNgbCheckBoxModule], exports: [NarikNgbCheckBoxList] });
/** @nocollapse */ /** @nocollapse */ NarikNgbCheckBoxListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxListModule, providers: [], imports: [[CommonModule, FormsModule, NarikNgbCheckBoxModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbCheckBoxListModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, FormsModule, NarikNgbCheckBoxModule],
declarations: [NarikNgbCheckBoxList],
exports: [NarikNgbCheckBoxList],
providers: [],
}]
}] });
class NarikNgbDataTable extends NarikDataTable {
constructor(injector, changeDetector, document) {
super(injector);
this.changeDetector = changeDetector;
this.document = document;
}
}
/** @nocollapse */ /** @nocollapse */ NarikNgbDataTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDataTable, deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ NarikNgbDataTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NarikNgbDataTable, selector: "narik-ngb-data-table , narik-data-table", usesInheritance: true, ngImport: i0, template: "" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDataTable, decorators: [{
type: Component,
args: [{ selector: 'narik-ngb-data-table , narik-data-table', template: "" }]
}], ctorParameters: function () {
return [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
type: Inject,
args: [DOCUMENT]
}] }];
} });
class NarikNgbDataTableModule {
}
/** @nocollapse */ /** @nocollapse */ NarikNgbDataTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDataTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
/** @nocollapse */ /** @nocollapse */ NarikNgbDataTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDataTableModule, declarations: [NarikNgbDataTable], imports: [CommonModule, FormsModule, TranslateModule], exports: [NarikNgbDataTable] });
/** @nocollapse */ /** @nocollapse */ NarikNgbDataTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDataTableModule, providers: [], imports: [[CommonModule, FormsModule, TranslateModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDataTableModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, FormsModule, TranslateModule],
declarations: [NarikNgbDataTable],
exports: [NarikNgbDataTable],
providers: [],
}]
}] });
class NarikNgbDatePicker extends NarikDatePicker {
constructor(injector) {
super(injector);
}
}
/** @nocollapse */ /** @nocollapse */ NarikNgbDatePicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDatePicker, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ NarikNgbDatePicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NarikNgbDatePicker, selector: "narik-ngb-date-picker , narik-date-picker", inputs: { id: "id", name: "name", label: "label", disabled: "disabled", required: "required", readOnly: "readOnly", placeHolder: "placeHolder", options: "options" }, providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbDatePicker)),
multi: true,
},
], usesInheritance: true, ngImport: i0, template: "<div class=\"form-group\">\n <label for=\"{{id}}\">{{label}}</label>\n\n <div class=\"input-group\">\n <input [required]=\"required\" [attr.disabled]=\"disabled || null\" class=\"form-control\" id=\"{{id}}\" placeholder=\"{{placeHolder}}\" name=\"dp\"\n [(ngModel)]=\"value\" ngbDatepicker #d=\"ngbDatepicker\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary\" (click)=\"d.toggle()\" type=\"button\">\n <i class=\"fa fa-calendar-alt\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n\n</div>\n", directives: [{ type: i1$1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDatePicker, decorators: [{
type: Component,
args: [{ selector: 'narik-ngb-date-picker , narik-date-picker', inputs: [...NARIK_DATE_PICKER_INPUTS], providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbDatePicker)),
multi: true,
},
], template: "<div class=\"form-group\">\n <label for=\"{{id}}\">{{label}}</label>\n\n <div class=\"input-group\">\n <input [required]=\"required\" [attr.disabled]=\"disabled || null\" class=\"form-control\" id=\"{{id}}\" placeholder=\"{{placeHolder}}\" name=\"dp\"\n [(ngModel)]=\"value\" ngbDatepicker #d=\"ngbDatepicker\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary\" (click)=\"d.toggle()\" type=\"button\">\n <i class=\"fa fa-calendar-alt\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n\n</div>\n" }]
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
class NarikNgbDatePickerModule {
}
/** @nocollapse */ /** @nocollapse */ NarikNgbDatePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
/** @nocollapse */ /** @nocollapse */ NarikNgbDatePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDatePickerModule, declarations: [NarikNgbDatePicker], imports: [CommonModule, FormsModule, NgbDatepickerModule, TranslateModule], exports: [NarikNgbDatePicker] });
/** @nocollapse */ /** @nocollapse */ NarikNgbDatePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDatePickerModule, providers: [{ provide: NgbDateAdapter, useClass: NgbDateNativeAdapter }], imports: [[CommonModule, FormsModule, NgbDatepickerModule, TranslateModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbDatePickerModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, FormsModule, NgbDatepickerModule, TranslateModule],
declarations: [NarikNgbDatePicker],
exports: [NarikNgbDatePicker],
providers: [{ provide: NgbDateAdapter, useClass: NgbDateNativeAdapter }],
}]
}] });
class NarikNgbInput extends NarikInput {
constructor(injector) {
super(injector);
}
set icon(value) {
this._icon = value;
}
get icon() {
return this._icon;
}
}
/** @nocollapse */ /** @nocollapse */ NarikNgbInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbInput, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ NarikNgbInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NarikNgbInput, selector: "narik-ngb-input , narik-input", inputs: { maxlength: "maxlength", type: "type", mask: "mask", icon: "icon", displayStatus: "displayStatus", id: "id", name: "name", label: "label", disabled: "disabled", required: "required", readOnly: "readOnly", placeHolder: "placeHolder", options: "options" }, providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbInput)),
multi: true,
},
], usesInheritance: true, ngImport: i0, template: "<div class=\"form-group \">\n <label for=\"{{id}}\">{{label}}</label>\n <div class=\"input-group mb-3\" *ngIf=\"icon\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\"><i class=\"fa fa-{{icon}}\"></i></span>\n </div>\n <ng-container *ngTemplateOutlet=\"inputElement\"></ng-container>\n </div>\n <ng-container *ngIf=\"!icon\">\n <ng-container *ngTemplateOutlet=\"inputElement\"></ng-container>\n </ng-container>\n\n</div>\n<ng-template #inputElement>\n <input [(ngModel)]=\"value\" [attr.disabled]=\"disabled || null\" type=\"{{type}}\" name=\"{{name}}\" [required]=\"required\"\n class=\"form-control\" id=\"{{id}}\" placeholder=\"{{placeHolder}}\">\n</ng-template>", directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbInput, decorators: [{
type: Component,
args: [{ selector: 'narik-ngb-input , narik-input', inputs: [...NARIK_INPUT_INPUTS], providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbInput)),
multi: true,
},
], template: "<div class=\"form-group \">\n <label for=\"{{id}}\">{{label}}</label>\n <div class=\"input-group mb-3\" *ngIf=\"icon\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\"><i class=\"fa fa-{{icon}}\"></i></span>\n </div>\n <ng-container *ngTemplateOutlet=\"inputElement\"></ng-container>\n </div>\n <ng-container *ngIf=\"!icon\">\n <ng-container *ngTemplateOutlet=\"inputElement\"></ng-container>\n </ng-container>\n\n</div>\n<ng-template #inputElement>\n <input [(ngModel)]=\"value\" [attr.disabled]=\"disabled || null\" type=\"{{type}}\" name=\"{{name}}\" [required]=\"required\"\n class=\"form-control\" id=\"{{id}}\" placeholder=\"{{placeHolder}}\">\n</ng-template>" }]
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { icon: [{
type: Input
}] } });
class NarikNgbInputModule {
}
/** @nocollapse */ /** @nocollapse */ NarikNgbInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
/** @nocollapse */ /** @nocollapse */ NarikNgbInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbInputModule, declarations: [NarikNgbInput], imports: [CommonModule, FormsModule], exports: [NarikNgbInput] });
/** @nocollapse */ /** @nocollapse */ NarikNgbInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbInputModule, providers: [], imports: [[CommonModule, FormsModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbInputModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, FormsModule],
declarations: [NarikNgbInput],
exports: [NarikNgbInput],
providers: [],
}]
}] });
class NarikNgbRadioGroup extends NarikRadioGroup {
constructor(injector) {
super(injector);
this.itemsData = [];
this._layoutDirection = 'vertical';
}
set layoutDirection(value) {
this._layoutDirection = value;
}
get layoutDirection() {
return this._layoutDirection;
}
useData(data) {
this.itemsData = data;
}
}
/** @nocollapse */ /** @nocollapse */ NarikNgbRadioGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbRadioGroup, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ NarikNgbRadioGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: NarikNgbRadioGroup, selector: "narik-ngb-radio-group , narik-radio-group", inputs: { displayField: "displayField", valueField: "valueField", listenForDataChange: "listenForDataChange", dataSource: "dataSource", dataKey: "dataKey", dataUrl: "dataUrl", dataInfo: "dataInfo", dataProviderKey: "dataProviderKey", dataParameters: "dataParameters", moduleKey: "moduleKey", dataMethod: "dataMethod", dataUrlMethod: "dataUrlMethod", id: "id", name: "name", label: "label", disabled: "disabled", required: "required", readOnly: "readOnly", placeHolder: "placeHolder", options: "options", layoutDirection: "layoutDirection" }, providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbRadioGroup)),
multi: true,
},
], usesInheritance: true, ngImport: i0, template: "<div class=\"form-group\">\n <label for=\"{{id}}\">{{label}}</label>\n <div class=\"form-check-container p-1 pl-2\">\n <div class=\"form-check \" [ngClass]=\"{'form-check-inline': layoutDirection==='horizontal'}\"\n *ngFor=\"let item of itemsData;let i=index\">\n <input [required]=\"required\" [attr.disabled]=\"disabled || null\" class=\"form-check-input\" type=\"radio\" name=\"{{name}}\" id=\"{{id+i}}\"\n value=\"{{item[valueField]}}\" checked>\n <label class=\"form-check-label\" for=\"{{id+i}}\">\n {{item[displayField]}}\n </label>\n </div>\n </div>\n</div>\n", styles: [".form-check-container{border:1px solid #ced4da;border-radius:.25rem}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbRadioGroup, decorators: [{
type: Component,
args: [{ selector: 'narik-ngb-radio-group , narik-radio-group', inputs: [...NARIK_DATA_DISPLAY_VALUE_INPUTS], providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef((() => NarikNgbRadioGroup)),
multi: true,
},
], template: "<div class=\"form-group\">\n <label for=\"{{id}}\">{{label}}</label>\n <div class=\"form-check-container p-1 pl-2\">\n <div class=\"form-check \" [ngClass]=\"{'form-check-inline': layoutDirection==='horizontal'}\"\n *ngFor=\"let item of itemsData;let i=index\">\n <input [required]=\"required\" [attr.disabled]=\"disabled || null\" class=\"form-check-input\" type=\"radio\" name=\"{{name}}\" id=\"{{id+i}}\"\n value=\"{{item[valueField]}}\" checked>\n <label class=\"form-check-label\" for=\"{{id+i}}\">\n {{item[displayField]}}\n </label>\n </div>\n </div>\n</div>\n", styles: [".form-check-container{border:1px solid #ced4da;border-radius:.25rem}\n"] }]
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { layoutDirection: [{
type: Input
}] } });
class NarikNgbRadioGroupModule {
}
/** @nocollapse */ /** @nocollapse */ NarikNgbRadioGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbRadioGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
/** @nocollapse */ /** @nocollapse */ NarikNgbRadioGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbRadioGroupModule, declarations: [NarikNgbRadioGroup], imports: [CommonModule, FormsModule], exports: [NarikNgbRadioGroup] });
/** @nocollapse */ /** @nocollapse */ NarikNgbRadioGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbRadioGroupModule, providers: [], imports: [[CommonModule, FormsModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: NarikNgbRadioGroupModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, FormsModule],
declarations: [NarikNgbRadioGroup],
exports: [NarikNgbRadioGroup],
providers: [],
}]
}] });
class NarikNgbSelect extends NarikSelect {
constructor(injector) {
super(injector);
this.optionData = [];
}
useData(data) {