@abp/ng.components 9.3.6 → 10.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chart.js/index.d.ts +2 -3
- package/extensible/index.d.ts +28 -9
- package/fesm2022/abp-ng.components-chart.js.mjs +6 -6
- package/fesm2022/abp-ng.components-chart.js.mjs.map +1 -1
- package/fesm2022/abp-ng.components-extensible.mjs +125 -51
- package/fesm2022/abp-ng.components-extensible.mjs.map +1 -1
- package/fesm2022/abp-ng.components-page.mjs +12 -17
- package/fesm2022/abp-ng.components-page.mjs.map +1 -1
- package/fesm2022/abp-ng.components-tree.mjs +12 -13
- package/fesm2022/abp-ng.components-tree.mjs.map +1 -1
- package/package.json +7 -7
- package/page/index.d.ts +30 -31
- package/tree/index.d.ts +0 -2
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, input, Optional, SkipSelf, ViewChild, ChangeDetectionStrategy, Component, InjectionToken, Injectable, forwardRef, Injector, Input, Directive, ViewChildren, LOCALE_ID,
|
|
3
|
-
import * as i5 from '@angular/common';
|
|
4
|
-
import { CommonModule, NgClass, NgTemplateOutlet, AsyncPipe, NgComponentOutlet } from '@angular/common';
|
|
2
|
+
import { inject, ChangeDetectorRef, input, Optional, SkipSelf, ViewChild, ChangeDetectionStrategy, Component, InjectionToken, Injectable, forwardRef, Injector, signal, effect, Input, TemplateRef, ViewContainerRef, Directive, ViewChildren, LOCALE_ID, PLATFORM_ID, EventEmitter, computed, Output, Pipe, NgModule } from '@angular/core';
|
|
5
3
|
import * as i2 from '@angular/forms';
|
|
6
4
|
import { ControlContainer, ReactiveFormsModule, Validators, NG_VALUE_ACCESSOR, FormGroupDirective, FormsModule, UntypedFormGroup, UntypedFormControl } from '@angular/forms';
|
|
7
5
|
import * as i1 from '@ng-bootstrap/ng-bootstrap';
|
|
@@ -9,11 +7,11 @@ import { NgbDateAdapter, NgbTimeAdapter, NgbDatepickerModule, NgbTimepickerModul
|
|
|
9
7
|
import * as i3 from '@ngx-validate/core';
|
|
10
8
|
import { NgxValidateCoreModule } from '@ngx-validate/core';
|
|
11
9
|
import { DateTimeAdapter, DateAdapter, TimeAdapter, DisabledDirective, EllipsisDirective, AbpVisibleDirective, NgxDatatableDefaultDirective, NgxDatatableListDirective, ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import { of, map as map$1, filter, merge, pipe, zip } from 'rxjs';
|
|
10
|
+
import { RestService, ConfigStateService, AbpValidators, LocalizationPipe, TrackByService, ShowPasswordDirective, PermissionDirective, escapeHtmlChars, TimezoneService, PermissionService, UtcToLocalPipe, LocalizationService, createLocalizationPipeKeyGenerator, CoreModule } from '@abp/ng.core';
|
|
11
|
+
import { of, Subject, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, map as map$1, filter, merge, pipe, zip } from 'rxjs';
|
|
15
12
|
import { map, debounceTime, distinctUntilChanged, switchMap, filter as filter$1, take } from 'rxjs/operators';
|
|
16
13
|
import { LinkedList } from '@abp/utils';
|
|
14
|
+
import { AsyncPipe, NgClass, NgComponentOutlet, NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
17
15
|
import * as i1$1 from '@swimlane/ngx-datatable';
|
|
18
16
|
import { SelectionType, NgxDatatableModule } from '@swimlane/ngx-datatable';
|
|
19
17
|
|
|
@@ -54,7 +52,7 @@ class ExtensibleDateTimePickerComponent {
|
|
|
54
52
|
(ngModelChange)="setDate($event)"
|
|
55
53
|
[meridian]="meridian()"
|
|
56
54
|
/>
|
|
57
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
55
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", 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]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NgbDatepickerModule }, { kind: "directive", type: i1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "ngmodule", type: NgbTimepickerModule }, { kind: "component", type: i1.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"], exportAs: ["ngbTimepicker"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }], viewProviders: [
|
|
58
56
|
{
|
|
59
57
|
provide: ControlContainer,
|
|
60
58
|
useFactory: selfFactory,
|
|
@@ -75,7 +73,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
75
73
|
args: [{
|
|
76
74
|
exportAs: 'abpExtensibleDateTimePicker',
|
|
77
75
|
imports: [
|
|
78
|
-
CommonModule,
|
|
79
76
|
ReactiveFormsModule,
|
|
80
77
|
NgbDatepickerModule,
|
|
81
78
|
NgbTimepickerModule,
|
|
@@ -453,7 +450,7 @@ class ExtensibleFormMultiselectComponent {
|
|
|
453
450
|
</div>
|
|
454
451
|
}
|
|
455
452
|
</div>
|
|
456
|
-
`, isInline: true, dependencies: [{ kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "ngmodule", type:
|
|
453
|
+
`, isInline: true, dependencies: [{ kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i3.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
457
454
|
}
|
|
458
455
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ExtensibleFormMultiselectComponent, decorators: [{
|
|
459
456
|
type: Component,
|
|
@@ -483,12 +480,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
483
480
|
</div>
|
|
484
481
|
`,
|
|
485
482
|
providers: [EXTENSIBLE_FORM_MULTI_SELECT_CONTROL_VALUE_ACCESSOR],
|
|
486
|
-
imports: [LocalizationPipe,
|
|
483
|
+
imports: [LocalizationPipe, NgxValidateCoreModule],
|
|
487
484
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
488
485
|
}]
|
|
489
486
|
}] });
|
|
490
487
|
|
|
491
488
|
class ExtensibleFormPropComponent {
|
|
489
|
+
#groupDirective;
|
|
490
|
+
get disabled() {
|
|
491
|
+
return this.disabledFn(this.data);
|
|
492
|
+
}
|
|
492
493
|
constructor() {
|
|
493
494
|
this.service = inject(ExtensibleFormPropService);
|
|
494
495
|
this.cdRef = inject(ChangeDetectorRef);
|
|
@@ -496,6 +497,8 @@ class ExtensibleFormPropComponent {
|
|
|
496
497
|
this.#groupDirective = inject(FormGroupDirective);
|
|
497
498
|
this.injector = inject(Injector);
|
|
498
499
|
this.form = this.#groupDirective.form;
|
|
500
|
+
this.shouldFocus = signal(false);
|
|
501
|
+
this.isViewReady = signal(false);
|
|
499
502
|
this.asterisk = '';
|
|
500
503
|
this.containerClassName = 'mb-2';
|
|
501
504
|
this.showPassword = false;
|
|
@@ -508,10 +511,12 @@ class ExtensibleFormPropComponent {
|
|
|
508
511
|
: of([]);
|
|
509
512
|
this.typeaheadFormatter = (option) => option.key;
|
|
510
513
|
this.meridian$ = this.service.meridian$;
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
514
|
+
// Effect to handle focus when both conditions are met
|
|
515
|
+
effect(() => {
|
|
516
|
+
if (this.shouldFocus() && this.isViewReady() && this.fieldRef?.nativeElement) {
|
|
517
|
+
this.focusElement();
|
|
518
|
+
}
|
|
519
|
+
});
|
|
515
520
|
}
|
|
516
521
|
setTypeaheadValue(selectedOption) {
|
|
517
522
|
this.typeaheadModel = selectedOption || { key: null, value: null };
|
|
@@ -537,9 +542,19 @@ class ExtensibleFormPropComponent {
|
|
|
537
542
|
setAsterisk() {
|
|
538
543
|
this.asterisk = this.service.calcAsterisks(this.validators);
|
|
539
544
|
}
|
|
540
|
-
|
|
541
|
-
|
|
545
|
+
focusElement() {
|
|
546
|
+
try {
|
|
542
547
|
this.fieldRef.nativeElement.focus();
|
|
548
|
+
this.shouldFocus.set(false);
|
|
549
|
+
}
|
|
550
|
+
catch (error) {
|
|
551
|
+
console.error('Error focusing field:', error);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
ngAfterViewInit() {
|
|
555
|
+
this.isViewReady.set(true);
|
|
556
|
+
if (this.isFirstGroup && this.first) {
|
|
557
|
+
this.shouldFocus.set(true);
|
|
543
558
|
}
|
|
544
559
|
}
|
|
545
560
|
getComponent(prop) {
|
|
@@ -586,7 +601,7 @@ class ExtensibleFormPropComponent {
|
|
|
586
601
|
this.typeaheadModel = { key: keyControl.value, value: valueControl.value };
|
|
587
602
|
}
|
|
588
603
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ExtensibleFormPropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
589
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: ExtensibleFormPropComponent, isStandalone: true, selector: "abp-extensible-form-prop", inputs: { data: "data", prop: "prop", first: "first", isFirstGroup: "isFirstGroup" }, providers: [ExtensibleFormPropService], viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n @switch (getComponent(prop)) {\r\n @case ('template') {\r\n <ng-container *ngComponentOutlet=\"prop.template; injector: injectorForCustomComponent\" />\r\n }\r\n }\r\n\r\n <div [ngClass]=\"containerClassName\" class=\"mb-2\">\r\n @switch (getComponent(prop)) {\r\n @case ('input') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [type]=\"getType(prop)\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n />\r\n }\r\n @case ('hidden') {\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n }\r\n @case ('checkbox') {\r\n <div class=\"form-check\" validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n />\r\n <ng-template\r\n [ngTemplateOutlet]=\"label\"\r\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\r\n />\r\n </div>\r\n }\r\n @case ('select') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n class=\"form-select form-control\"\r\n >\r\n @for (option of options$ | async; track option.value) {\r\n <option [ngValue]=\"option.value\">\r\n @if (prop.isExtra) {\r\n {{ '::' + option.key | abpLocalization }}\r\n } @else {\r\n {{ option.key }}\r\n }\r\n </option>\r\n }\r\n </select>\r\n }\r\n @case ('multiselect') {\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-extensible-form-multi-select\r\n [prop]=\"prop\"\r\n [options]=\"options$ | async\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n />\r\n }\r\n @case ('typeahead') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [abpDisabled]=\"disabled\"\r\n [ngbTypeahead]=\"search\"\r\n [editable]=\"false\"\r\n [inputFormatter]=\"typeaheadFormatter\"\r\n [resultFormatter]=\"typeaheadFormatter\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [(ngModel)]=\"typeaheadModel\"\r\n (selectItem)=\"setTypeaheadValue($event.item)\"\r\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\r\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\r\n class=\"form-control\"\r\n />\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </div>\r\n }\r\n @case ('date') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <input\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n (click)=\"datepicker.open()\"\r\n (keyup.space)=\"datepicker.open()\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n />\r\n }\r\n @case ('time') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <ngb-timepicker [formControlName]=\"prop.name\" />\r\n }\r\n @case ('dateTime') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <abp-extensible-date-time-picker [prop]=\"prop\" [meridian]=\"meridian$ | async\" />\r\n }\r\n @case ('textarea') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <textarea\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n ></textarea>\r\n }\r\n @case ('passwordinputgroup') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <div class=\"input-group form-group\" validationTarget>\r\n <input\r\n class=\"form-control\"\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpShowPassword]=\"showPassword\"\r\n />\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"showPassword = !showPassword\">\r\n <i\r\n class=\"fa\"\r\n aria-hidden=\"true\"\r\n [ngClass]=\"{\r\n 'fa-eye-slash': !showPassword,\r\n 'fa-eye': showPassword,\r\n }\"\r\n ></i>\r\n </button>\r\n </div>\r\n }\r\n }\r\n\r\n @if (prop.formText) {\r\n <small class=\"text-muted d-block\">{{ prop.formText | abpLocalization }}</small>\r\n }\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label d-inline-block'\">\r\n <span class=\"d-inline-flex align-items-center gap-1 text-nowrap\">\r\n @if (prop.displayTextResolver) {\r\n {{ prop.displayTextResolver(data) | abpLocalization }}\r\n } @else {\r\n @if (prop.isExtra) {\r\n {{ '::' + prop.displayName | abpLocalization }}\r\n } @else {\r\n {{ prop.displayName | abpLocalization }}\r\n }\r\n }\r\n {{ asterisk }}\r\n @if (prop.tooltip) {\r\n <i\r\n [ngbTooltip]=\"prop.tooltip.text | abpLocalization\"\r\n [placement]=\"prop.tooltip.placement || 'auto'\"\r\n container=\"body\"\r\n class=\"bi bi-info-circle\"\r\n ></i>\r\n }\r\n </span>\r\n </label>\r\n</ng-template>\r\n", dependencies: [{ kind: "component", type: ExtensibleDateTimePickerComponent, selector: "abp-extensible-date-time-picker", inputs: ["prop", "meridian", "placement"], exportAs: ["abpExtensibleDateTimePicker"] }, { kind: "component", type: ExtensibleFormMultiselectComponent, selector: "abp-extensible-form-multi-select", inputs: ["prop", "options"] }, { kind: "ngmodule", type: NgbDatepickerModule }, { kind: "directive", type: i1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "ngmodule", type: NgbTimepickerModule }, { kind: "component", type: i1.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"], exportAs: ["ngbTimepicker"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", 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]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: DisabledDirective, selector: "[abpDisabled]", inputs: ["abpDisabled"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i3.ValidationStyleDirective, selector: "[validationStyle]", exportAs: ["validationStyle"] }, { kind: "directive", type: i3.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "ngmodule", type: NgbTypeaheadModule }, { kind: "directive", type: i1.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "container", "editable", "focusFirst", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "selectOnExact", "showHint", "placement", "popperOptions", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { kind: "directive", type: ShowPasswordDirective, selector: "[abpShowPassword]", inputs: ["abpShowPassword"] }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i2$1.LocalizationPipe, name: "abpLocalization" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], viewProviders: [
|
|
604
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: ExtensibleFormPropComponent, isStandalone: true, selector: "abp-extensible-form-prop", inputs: { data: "data", prop: "prop", first: "first", isFirstGroup: "isFirstGroup" }, providers: [ExtensibleFormPropService], viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n @switch (getComponent(prop)) {\r\n @case ('template') {\r\n <ng-container *ngComponentOutlet=\"prop.template; injector: injectorForCustomComponent\" />\r\n }\r\n }\r\n\r\n <div [ngClass]=\"containerClassName\" class=\"mb-2\">\r\n @switch (getComponent(prop)) {\r\n @case ('input') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [type]=\"getType(prop)\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n />\r\n }\r\n @case ('hidden') {\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n }\r\n @case ('checkbox') {\r\n <div class=\"form-check\" validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n />\r\n <ng-template\r\n [ngTemplateOutlet]=\"label\"\r\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\r\n />\r\n </div>\r\n }\r\n @case ('select') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n class=\"form-select form-control\"\r\n >\r\n @for (option of options$ | async; track option.value) {\r\n <option [ngValue]=\"option.value\">\r\n @if (prop.isExtra) {\r\n {{ '::' + option.key | abpLocalization }}\r\n } @else {\r\n {{ option.key }}\r\n }\r\n </option>\r\n }\r\n </select>\r\n }\r\n @case ('multiselect') {\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-extensible-form-multi-select\r\n [prop]=\"prop\"\r\n [options]=\"options$ | async\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n />\r\n }\r\n @case ('typeahead') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [abpDisabled]=\"disabled\"\r\n [ngbTypeahead]=\"search\"\r\n [editable]=\"false\"\r\n [inputFormatter]=\"typeaheadFormatter\"\r\n [resultFormatter]=\"typeaheadFormatter\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [(ngModel)]=\"typeaheadModel\"\r\n (selectItem)=\"setTypeaheadValue($event.item)\"\r\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\r\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\r\n class=\"form-control\"\r\n />\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </div>\r\n }\r\n @case ('date') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <input\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n (click)=\"datepicker.open()\"\r\n (keyup.space)=\"datepicker.open()\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n />\r\n }\r\n @case ('time') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <ngb-timepicker [formControlName]=\"prop.name\" />\r\n }\r\n @case ('dateTime') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <abp-extensible-date-time-picker [prop]=\"prop\" [meridian]=\"meridian$ | async\" />\r\n }\r\n @case ('textarea') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <textarea\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n ></textarea>\r\n }\r\n @case ('passwordinputgroup') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <div class=\"input-group form-group\" validationTarget>\r\n <input\r\n class=\"form-control\"\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpShowPassword]=\"showPassword\"\r\n />\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"showPassword = !showPassword\">\r\n <i\r\n class=\"fa\"\r\n aria-hidden=\"true\"\r\n [ngClass]=\"{\r\n 'fa-eye-slash': !showPassword,\r\n 'fa-eye': showPassword,\r\n }\"\r\n ></i>\r\n </button>\r\n </div>\r\n }\r\n }\r\n\r\n @if (prop.formText) {\r\n <small class=\"text-muted d-block\">{{ prop.formText | abpLocalization }}</small>\r\n }\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label d-inline-block'\">\r\n <span class=\"d-inline-flex align-items-center gap-1 text-nowrap\">\r\n @if (prop.displayTextResolver) {\r\n {{ prop.displayTextResolver(data) | abpLocalization }}\r\n } @else {\r\n @if (prop.isExtra) {\r\n {{ '::' + prop.displayName | abpLocalization }}\r\n } @else {\r\n {{ prop.displayName | abpLocalization }}\r\n }\r\n }\r\n {{ asterisk }}\r\n @if (prop.tooltip) {\r\n <i\r\n [ngbTooltip]=\"prop.tooltip.text | abpLocalization\"\r\n [placement]=\"prop.tooltip.placement || 'auto'\"\r\n container=\"body\"\r\n class=\"bi bi-info-circle\"\r\n ></i>\r\n }\r\n </span>\r\n </label>\r\n</ng-template>\r\n", dependencies: [{ kind: "component", type: ExtensibleDateTimePickerComponent, selector: "abp-extensible-date-time-picker", inputs: ["prop", "meridian", "placement"], exportAs: ["abpExtensibleDateTimePicker"] }, { kind: "component", type: ExtensibleFormMultiselectComponent, selector: "abp-extensible-form-multi-select", inputs: ["prop", "options"] }, { kind: "ngmodule", type: NgbDatepickerModule }, { kind: "directive", type: i1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "ngmodule", type: NgbTimepickerModule }, { kind: "component", type: i1.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"], exportAs: ["ngbTimepicker"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", 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]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: DisabledDirective, selector: "[abpDisabled]", inputs: ["abpDisabled"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i3.ValidationStyleDirective, selector: "[validationStyle]", exportAs: ["validationStyle"] }, { kind: "directive", type: i3.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "ngmodule", type: NgbTypeaheadModule }, { kind: "directive", type: i1.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "container", "editable", "focusFirst", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "selectOnExact", "showHint", "placement", "popperOptions", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { kind: "directive", type: ShowPasswordDirective, selector: "[abpShowPassword]", inputs: ["abpShowPassword"] }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], viewProviders: [
|
|
590
605
|
{
|
|
591
606
|
provide: ControlContainer,
|
|
592
607
|
useFactory: selfFactory,
|
|
@@ -610,8 +625,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
610
625
|
NgbTypeaheadModule,
|
|
611
626
|
ShowPasswordDirective,
|
|
612
627
|
PermissionDirective,
|
|
613
|
-
|
|
614
|
-
|
|
628
|
+
LocalizationPipe,
|
|
629
|
+
AsyncPipe,
|
|
630
|
+
NgClass,
|
|
631
|
+
NgComponentOutlet,
|
|
632
|
+
NgTemplateOutlet,
|
|
615
633
|
FormsModule,
|
|
616
634
|
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ExtensibleFormPropService], viewProviders: [
|
|
617
635
|
{
|
|
@@ -622,7 +640,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
622
640
|
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
623
641
|
{ provide: NgbTimeAdapter, useClass: TimeAdapter },
|
|
624
642
|
], template: "<ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n @switch (getComponent(prop)) {\r\n @case ('template') {\r\n <ng-container *ngComponentOutlet=\"prop.template; injector: injectorForCustomComponent\" />\r\n }\r\n }\r\n\r\n <div [ngClass]=\"containerClassName\" class=\"mb-2\">\r\n @switch (getComponent(prop)) {\r\n @case ('input') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [type]=\"getType(prop)\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n />\r\n }\r\n @case ('hidden') {\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n }\r\n @case ('checkbox') {\r\n <div class=\"form-check\" validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n />\r\n <ng-template\r\n [ngTemplateOutlet]=\"label\"\r\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\r\n />\r\n </div>\r\n }\r\n @case ('select') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n class=\"form-select form-control\"\r\n >\r\n @for (option of options$ | async; track option.value) {\r\n <option [ngValue]=\"option.value\">\r\n @if (prop.isExtra) {\r\n {{ '::' + option.key | abpLocalization }}\r\n } @else {\r\n {{ option.key }}\r\n }\r\n </option>\r\n }\r\n </select>\r\n }\r\n @case ('multiselect') {\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-extensible-form-multi-select\r\n [prop]=\"prop\"\r\n [options]=\"options$ | async\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n />\r\n }\r\n @case ('typeahead') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [abpDisabled]=\"disabled\"\r\n [ngbTypeahead]=\"search\"\r\n [editable]=\"false\"\r\n [inputFormatter]=\"typeaheadFormatter\"\r\n [resultFormatter]=\"typeaheadFormatter\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [(ngModel)]=\"typeaheadModel\"\r\n (selectItem)=\"setTypeaheadValue($event.item)\"\r\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\r\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\r\n class=\"form-control\"\r\n />\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </div>\r\n }\r\n @case ('date') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <input\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n (click)=\"datepicker.open()\"\r\n (keyup.space)=\"datepicker.open()\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n />\r\n }\r\n @case ('time') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <ngb-timepicker [formControlName]=\"prop.name\" />\r\n }\r\n @case ('dateTime') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <abp-extensible-date-time-picker [prop]=\"prop\" [meridian]=\"meridian$ | async\" />\r\n }\r\n @case ('textarea') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <textarea\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n ></textarea>\r\n }\r\n @case ('passwordinputgroup') {\r\n <ng-template [ngTemplateOutlet]=\"label\" />\r\n <div class=\"input-group form-group\" validationTarget>\r\n <input\r\n class=\"form-control\"\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpShowPassword]=\"showPassword\"\r\n />\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"showPassword = !showPassword\">\r\n <i\r\n class=\"fa\"\r\n aria-hidden=\"true\"\r\n [ngClass]=\"{\r\n 'fa-eye-slash': !showPassword,\r\n 'fa-eye': showPassword,\r\n }\"\r\n ></i>\r\n </button>\r\n </div>\r\n }\r\n }\r\n\r\n @if (prop.formText) {\r\n <small class=\"text-muted d-block\">{{ prop.formText | abpLocalization }}</small>\r\n }\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label d-inline-block'\">\r\n <span class=\"d-inline-flex align-items-center gap-1 text-nowrap\">\r\n @if (prop.displayTextResolver) {\r\n {{ prop.displayTextResolver(data) | abpLocalization }}\r\n } @else {\r\n @if (prop.isExtra) {\r\n {{ '::' + prop.displayName | abpLocalization }}\r\n } @else {\r\n {{ prop.displayName | abpLocalization }}\r\n }\r\n }\r\n {{ asterisk }}\r\n @if (prop.tooltip) {\r\n <i\r\n [ngbTooltip]=\"prop.tooltip.text | abpLocalization\"\r\n [placement]=\"prop.tooltip.placement || 'auto'\"\r\n container=\"body\"\r\n class=\"bi bi-info-circle\"\r\n ></i>\r\n }\r\n </span>\r\n </label>\r\n</ng-template>\r\n" }]
|
|
625
|
-
}], propDecorators: { data: [{
|
|
643
|
+
}], ctorParameters: () => [], propDecorators: { data: [{
|
|
626
644
|
type: Input
|
|
627
645
|
}], prop: [{
|
|
628
646
|
type: Input
|
|
@@ -819,10 +837,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
819
837
|
|
|
820
838
|
/* eslint-disable @angular-eslint/no-input-rename */
|
|
821
839
|
class PropDataDirective extends PropData {
|
|
822
|
-
constructor(
|
|
840
|
+
constructor() {
|
|
841
|
+
const injector = inject(Injector);
|
|
823
842
|
super();
|
|
824
|
-
this.tempRef =
|
|
825
|
-
this.vcRef =
|
|
843
|
+
this.tempRef = inject(TemplateRef);
|
|
844
|
+
this.vcRef = inject(ViewContainerRef);
|
|
826
845
|
this.getInjected = injector.get.bind(injector);
|
|
827
846
|
}
|
|
828
847
|
ngOnChanges() {
|
|
@@ -835,7 +854,7 @@ class PropDataDirective extends PropData {
|
|
|
835
854
|
ngOnDestroy() {
|
|
836
855
|
this.vcRef.clear();
|
|
837
856
|
}
|
|
838
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: PropDataDirective, deps: [
|
|
857
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: PropDataDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
839
858
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: PropDataDirective, isStandalone: true, selector: "[abpPropData]", inputs: { propList: ["abpPropDataFromList", "propList"], record: ["abpPropDataWithRecord", "record"], index: ["abpPropDataAtIndex", "index"] }, exportAs: ["abpPropData"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
840
859
|
}
|
|
841
860
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: PropDataDirective, decorators: [{
|
|
@@ -844,7 +863,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
844
863
|
exportAs: 'abpPropData',
|
|
845
864
|
selector: '[abpPropData]',
|
|
846
865
|
}]
|
|
847
|
-
}], ctorParameters: () => [
|
|
866
|
+
}], ctorParameters: () => [], propDecorators: { propList: [{
|
|
848
867
|
type: Input,
|
|
849
868
|
args: ['abpPropDataFromList']
|
|
850
869
|
}], record: [{
|
|
@@ -890,7 +909,7 @@ class ExtensibleFormComponent {
|
|
|
890
909
|
return formPropList.some(prop => prop.visible(data));
|
|
891
910
|
}
|
|
892
911
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ExtensibleFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
893
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: ExtensibleFormComponent, isStandalone: true, selector: "abp-extensible-form", inputs: { selectedRecord: "selectedRecord" }, viewQueries: [{ propertyName: "formProps", predicate: ExtensibleFormPropComponent, descendants: true }], exportAs: ["abpExtensibleForm"], ngImport: i0, template: "@if (form) {\r\n @for (groupedProp of groupedPropList.items; track i; let i = $index; let first = $first) {\r\n <ng-container *abpPropData=\"let data; fromList: groupedProp.formPropList; withRecord: record\">\r\n @if (isAnyGroupMemberVisible(i, data) && groupedProp.group?.className) {\r\n <div\r\n [ngClass]=\"groupedProp.group?.className\"\r\n [attr.data-name]=\"groupedProp.group?.name || groupedProp.group?.className\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"propListTemplate\"\r\n [ngTemplateOutletContext]=\"{ groupedProp: groupedProp, data: data, isFirstGroup: first}\"\r\n >\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"propListTemplate\"\r\n [ngTemplateOutletContext]=\"{ groupedProp: groupedProp, data: data, isFirstGroup: first }\"\r\n >\r\n </ng-container>\r\n }\r\n </ng-container>\r\n }\r\n}\r\n\r\n<ng-template let-groupedProp=\"groupedProp\" let-data=\"data\" let-isFirstGroup=\"isFirstGroup\" #propListTemplate>\r\n @for (prop of groupedProp.formPropList; let index = $index; let first = $first; track prop.name) {\r\n @if (prop.visible(data)) {\r\n @if (extraProperties.controls[prop.name]) {\r\n <ng-container [formGroupName]=\"extraPropertiesKey\">\r\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\" [class]=\"prop.className\" />\r\n </ng-container>\r\n } @else {\r\n @if (form.get(prop.name)) {\r\n <abp-extensible-form-prop\r\n [class]=\"prop.className\"\r\n [prop]=\"prop\"\r\n [data]=\"data\"\r\n [first]=\"first\"\r\n [isFirstGroup]=\"isFirstGroup\"\r\n />\r\n }\r\n }\r\n }\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "
|
|
912
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: ExtensibleFormComponent, isStandalone: true, selector: "abp-extensible-form", inputs: { selectedRecord: "selectedRecord" }, viewQueries: [{ propertyName: "formProps", predicate: ExtensibleFormPropComponent, descendants: true }], exportAs: ["abpExtensibleForm"], ngImport: i0, template: "@if (form) {\r\n @for (groupedProp of groupedPropList.items; track i; let i = $index; let first = $first) {\r\n <ng-container *abpPropData=\"let data; fromList: groupedProp.formPropList; withRecord: record\">\r\n @if (isAnyGroupMemberVisible(i, data) && groupedProp.group?.className) {\r\n <div\r\n [ngClass]=\"groupedProp.group?.className\"\r\n [attr.data-name]=\"groupedProp.group?.name || groupedProp.group?.className\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"propListTemplate\"\r\n [ngTemplateOutletContext]=\"{ groupedProp: groupedProp, data: data, isFirstGroup: first}\"\r\n >\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"propListTemplate\"\r\n [ngTemplateOutletContext]=\"{ groupedProp: groupedProp, data: data, isFirstGroup: first }\"\r\n >\r\n </ng-container>\r\n }\r\n </ng-container>\r\n }\r\n}\r\n\r\n<ng-template let-groupedProp=\"groupedProp\" let-data=\"data\" let-isFirstGroup=\"isFirstGroup\" #propListTemplate>\r\n @for (prop of groupedProp.formPropList; let index = $index; let first = $first; track prop.name) {\r\n @if (prop.visible(data)) {\r\n @if (extraProperties.controls[prop.name]) {\r\n <ng-container [formGroupName]=\"extraPropertiesKey\">\r\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\" [class]=\"prop.className\" />\r\n </ng-container>\r\n } @else {\r\n @if (form.get(prop.name)) {\r\n <abp-extensible-form-prop\r\n [class]=\"prop.className\"\r\n [prop]=\"prop\"\r\n [data]=\"data\"\r\n [first]=\"first\"\r\n [isFirstGroup]=\"isFirstGroup\"\r\n />\r\n }\r\n }\r\n }\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PropDataDirective, selector: "[abpPropData]", inputs: ["abpPropDataFromList", "abpPropDataWithRecord", "abpPropDataAtIndex"], exportAs: ["abpPropData"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: ["data", "prop", "first", "isFirstGroup"] }], viewProviders: [
|
|
894
913
|
{
|
|
895
914
|
provide: ControlContainer,
|
|
896
915
|
useFactory: selfFactory,
|
|
@@ -900,7 +919,7 @@ class ExtensibleFormComponent {
|
|
|
900
919
|
}
|
|
901
920
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ExtensibleFormComponent, decorators: [{
|
|
902
921
|
type: Component,
|
|
903
|
-
args: [{ exportAs: 'abpExtensibleForm', selector: 'abp-extensible-form', imports: [
|
|
922
|
+
args: [{ exportAs: 'abpExtensibleForm', selector: 'abp-extensible-form', imports: [NgClass, NgTemplateOutlet, PropDataDirective, ReactiveFormsModule, ExtensibleFormPropComponent], changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
|
|
904
923
|
{
|
|
905
924
|
provide: ControlContainer,
|
|
906
925
|
useFactory: selfFactory,
|
|
@@ -917,7 +936,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
917
936
|
// Fix for https://github.com/angular/angular/issues/23904
|
|
918
937
|
// @dynamic
|
|
919
938
|
class AbstractActionsComponent extends ActionData {
|
|
920
|
-
constructor(
|
|
939
|
+
constructor() {
|
|
940
|
+
const injector = inject(Injector);
|
|
921
941
|
super();
|
|
922
942
|
this.getInjected = injector.get.bind(injector);
|
|
923
943
|
const extensions = injector.get(ExtensionsService);
|
|
@@ -925,29 +945,29 @@ class AbstractActionsComponent extends ActionData {
|
|
|
925
945
|
const type = injector.get(EXTENSIONS_ACTION_TYPE);
|
|
926
946
|
this.actionList = extensions[type].get(name).actions;
|
|
927
947
|
}
|
|
928
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AbstractActionsComponent, deps: [
|
|
948
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AbstractActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
929
949
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: AbstractActionsComponent, isStandalone: true, inputs: { record: "record" }, usesInheritance: true, ngImport: i0 }); }
|
|
930
950
|
}
|
|
931
951
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AbstractActionsComponent, decorators: [{
|
|
932
952
|
type: Directive
|
|
933
|
-
}], ctorParameters: () => [
|
|
953
|
+
}], ctorParameters: () => [], propDecorators: { record: [{
|
|
934
954
|
type: Input
|
|
935
955
|
}] } });
|
|
936
956
|
|
|
937
957
|
class GridActionsComponent extends AbstractActionsComponent {
|
|
938
|
-
constructor(
|
|
939
|
-
super(
|
|
958
|
+
constructor() {
|
|
959
|
+
super();
|
|
940
960
|
this.icon = 'fa fa-cog';
|
|
941
961
|
this.text = '';
|
|
942
962
|
this.trackByFn = (_, item) => item.text;
|
|
943
963
|
}
|
|
944
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: GridActionsComponent, deps: [
|
|
964
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: GridActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
945
965
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: GridActionsComponent, isStandalone: true, selector: "abp-grid-actions", inputs: { icon: "icon", index: "index", text: "text" }, providers: [
|
|
946
966
|
{
|
|
947
967
|
provide: EXTENSIONS_ACTION_TYPE,
|
|
948
968
|
useValue: 'entityActions',
|
|
949
969
|
},
|
|
950
|
-
], exportAs: ["abpGridActions"], usesInheritance: true, ngImport: i0, template: "@if (actionList.length > 1) {\r\n <div ngbDropdown container=\"body\" class=\"d-inline-block\">\r\n <button\r\n class=\"btn btn-primary btn-sm dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n ngbDropdownToggle\r\n >\r\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\r\n </button>\r\n <div ngbDropdownMenu>\r\n @for (action of actionList; track action.text) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n}\r\n\r\n@if (actionList.length === 1) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n ></ng-container>\r\n}\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n @if (action.visible(data)) {\r\n <button\r\n ngbDropdownItem\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon && !action.showOnlyIcon\"></i>\r\n @if (!action.showOnlyIcon) {\r\n @if (action.icon) {\r\n <span>{{ action.text | abpLocalization }}</span>\r\n } @else {\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n @if (action.visible(data)) {\r\n @if (action.tooltip) {\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [class]=\"action.btnClass\"\r\n [style]=\"action.btnStyle\"\r\n [ngbTooltip]=\"action.tooltip.text | abpLocalization\"\r\n [placement]=\"action.tooltip.placement || 'auto'\"\r\n triggers=\"hover\"\r\n container=\"body\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n } @else {\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [class]=\"action.btnClass\"\r\n [style]=\"action.btnStyle\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n }\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "directive", type: EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "
|
|
970
|
+
], exportAs: ["abpGridActions"], usesInheritance: true, ngImport: i0, template: "@if (actionList.length > 1) {\r\n <div ngbDropdown container=\"body\" class=\"d-inline-block\">\r\n <button\r\n class=\"btn btn-primary btn-sm dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n ngbDropdownToggle\r\n >\r\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\r\n </button>\r\n <div ngbDropdownMenu>\r\n @for (action of actionList; track action.text) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n}\r\n\r\n@if (actionList.length === 1) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n ></ng-container>\r\n}\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n @if (action.visible(data)) {\r\n <button\r\n ngbDropdownItem\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon && !action.showOnlyIcon\"></i>\r\n @if (!action.showOnlyIcon) {\r\n @if (action.icon) {\r\n <span>{{ action.text | abpLocalization }}</span>\r\n } @else {\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n @if (action.visible(data)) {\r\n @if (action.tooltip) {\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [class]=\"action.btnClass\"\r\n [style]=\"action.btnStyle\"\r\n [ngbTooltip]=\"action.tooltip.text | abpLocalization\"\r\n [placement]=\"action.tooltip.placement || 'auto'\"\r\n triggers=\"hover\"\r\n container=\"body\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n } @else {\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [class]=\"action.btnClass\"\r\n [style]=\"action.btnStyle\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n }\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "directive", type: EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: NgbTooltipModule }, { kind: "directive", type: i1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
951
971
|
}
|
|
952
972
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: GridActionsComponent, decorators: [{
|
|
953
973
|
type: Component,
|
|
@@ -956,7 +976,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
956
976
|
EllipsisDirective,
|
|
957
977
|
PermissionDirective,
|
|
958
978
|
NgClass,
|
|
959
|
-
|
|
979
|
+
LocalizationPipe,
|
|
960
980
|
NgTemplateOutlet,
|
|
961
981
|
NgbTooltipModule,
|
|
962
982
|
], selector: 'abp-grid-actions', providers: [
|
|
@@ -965,7 +985,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
965
985
|
useValue: 'entityActions',
|
|
966
986
|
},
|
|
967
987
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (actionList.length > 1) {\r\n <div ngbDropdown container=\"body\" class=\"d-inline-block\">\r\n <button\r\n class=\"btn btn-primary btn-sm dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n ngbDropdownToggle\r\n >\r\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\r\n </button>\r\n <div ngbDropdownMenu>\r\n @for (action of actionList; track action.text) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n}\r\n\r\n@if (actionList.length === 1) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n ></ng-container>\r\n}\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n @if (action.visible(data)) {\r\n <button\r\n ngbDropdownItem\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon && !action.showOnlyIcon\"></i>\r\n @if (!action.showOnlyIcon) {\r\n @if (action.icon) {\r\n <span>{{ action.text | abpLocalization }}</span>\r\n } @else {\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n @if (action.visible(data)) {\r\n @if (action.tooltip) {\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [class]=\"action.btnClass\"\r\n [style]=\"action.btnStyle\"\r\n [ngbTooltip]=\"action.tooltip.text | abpLocalization\"\r\n [placement]=\"action.tooltip.placement || 'auto'\"\r\n triggers=\"hover\"\r\n container=\"body\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n } @else {\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [class]=\"action.btnClass\"\r\n [style]=\"action.btnStyle\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n }\r\n }\r\n</ng-template>\r\n" }]
|
|
968
|
-
}], ctorParameters: () => [
|
|
988
|
+
}], ctorParameters: () => [], propDecorators: { icon: [{
|
|
969
989
|
type: Input
|
|
970
990
|
}], index: [{
|
|
971
991
|
type: Input
|
|
@@ -997,14 +1017,26 @@ class ExtensibleTableComponent {
|
|
|
997
1017
|
this.timeZoneService = inject(TimezoneService);
|
|
998
1018
|
this.entityPropTypeClasses = inject(ENTITY_PROP_TYPE_CLASSES);
|
|
999
1019
|
this.permissionService = inject(PermissionService);
|
|
1020
|
+
this.platformId = inject(PLATFORM_ID);
|
|
1021
|
+
this.isBrowser = isPlatformBrowser(this.platformId);
|
|
1000
1022
|
this.tableActivate = new EventEmitter();
|
|
1001
1023
|
this.selectable = false;
|
|
1002
1024
|
this._selectionType = SelectionType.multiClick;
|
|
1003
1025
|
this.selected = [];
|
|
1004
1026
|
this.selectionChange = new EventEmitter();
|
|
1027
|
+
// Infinite scroll configuration
|
|
1028
|
+
this.infiniteScroll = false;
|
|
1029
|
+
this.isLoading = false;
|
|
1030
|
+
this.scrollThreshold = 10;
|
|
1031
|
+
this.loadMore = new EventEmitter();
|
|
1005
1032
|
this.trackByFn = (_, item) => item.name;
|
|
1006
1033
|
// Signal for actions column width
|
|
1007
1034
|
this._actionsColumnWidth = signal(DEFAULT_ACTIONS_COLUMN_WIDTH);
|
|
1035
|
+
// Infinite scroll: debounced load more subject
|
|
1036
|
+
this.loadMoreSubject = new Subject();
|
|
1037
|
+
this.loadMoreSubscription = this.loadMoreSubject
|
|
1038
|
+
.pipe(debounceTime$1(100), distinctUntilChanged$1())
|
|
1039
|
+
.subscribe(() => this.triggerLoadMore());
|
|
1008
1040
|
this.columnWidths = computed(() => {
|
|
1009
1041
|
return this.propList.toArray().map(prop => prop.columnWidth);
|
|
1010
1042
|
});
|
|
@@ -1096,14 +1128,46 @@ class ExtensibleTableComponent {
|
|
|
1096
1128
|
this.selected.push(...selected);
|
|
1097
1129
|
this.selectionChange.emit(selected);
|
|
1098
1130
|
}
|
|
1131
|
+
onScroll(scrollEvent) {
|
|
1132
|
+
if (!this.shouldHandleScroll()) {
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
const target = scrollEvent.target;
|
|
1136
|
+
if (!target) {
|
|
1137
|
+
return;
|
|
1138
|
+
}
|
|
1139
|
+
if (this.isNearScrollBottom(target)) {
|
|
1140
|
+
this.loadMoreSubject.next();
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
shouldHandleScroll() {
|
|
1144
|
+
return this.infiniteScroll && !this.isLoading;
|
|
1145
|
+
}
|
|
1146
|
+
isNearScrollBottom(element) {
|
|
1147
|
+
const { offsetHeight, scrollTop, scrollHeight } = element;
|
|
1148
|
+
return offsetHeight + scrollTop >= scrollHeight - this.scrollThreshold;
|
|
1149
|
+
}
|
|
1150
|
+
triggerLoadMore() {
|
|
1151
|
+
this.loadMore.emit();
|
|
1152
|
+
}
|
|
1153
|
+
getTableHeight() {
|
|
1154
|
+
if (!this.infiniteScroll)
|
|
1155
|
+
return 'auto';
|
|
1156
|
+
return this.tableHeight ? `${this.tableHeight}px` : 'auto';
|
|
1157
|
+
}
|
|
1099
1158
|
ngAfterViewInit() {
|
|
1100
|
-
this.
|
|
1101
|
-
this.
|
|
1102
|
-
|
|
1103
|
-
|
|
1159
|
+
if (!this.infiniteScroll) {
|
|
1160
|
+
this.list?.requestStatus$?.pipe(filter(status => status === 'loading')).subscribe(() => {
|
|
1161
|
+
this.data = [];
|
|
1162
|
+
this.cdr.markForCheck();
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
ngOnDestroy() {
|
|
1167
|
+
this.loadMoreSubscription.unsubscribe();
|
|
1104
1168
|
}
|
|
1105
1169
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ExtensibleTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1106
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: ExtensibleTableComponent, isStandalone: true, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate", selectable: "selectable", selectionType: "selectionType", selected: "selected" }, outputs: { tableActivate: "tableActivate", selectionChange: "selectionChange" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n [selectionType]=\"selectable ? _selectionType : undefined\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n (select)=\"onSelect($event)\"\r\n [selected]=\"selected\"\r\n>\r\n@if(selectable) {\r\n <ngx-datatable-column [width]=\"50\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\" [resizeable]=\"false\">\r\n \r\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\r\n let-selectFn=\"selectFn\">\r\n @if (_selectionType !== 'single') {\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input table-check\" type=\"checkbox\" [checked]=\"allRowsSelected\"\r\n (change)=\"selectFn(!allRowsSelected)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n <ng-template ngx-datatable-cell-template let-value=\"value\" let-row=\"row\" let-isSelected=\"isSelected\"\r\n let-onCheckboxChangeFn=\"onCheckboxChangeFn\">\r\n @if(_selectionType === 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"radio\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n @if (_selectionType !== 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n </ngx-datatable-column>\r\n }\r\n @if (actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)) {\r\n <ngx-datatable-column\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"_actionsColumnWidth() ?? undefined\"\r\n [width]=\"_actionsColumnWidth() ?? 200\"\r\n [canAutoResize]=\"!_actionsColumnWidth()\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n @if (isVisibleActions(row)) {\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n @for (prop of propList; track prop.name; let i = $index) {\r\n <ngx-datatable-column\r\n *abpVisible=\"prop.columnVisible(getInjected)\"\r\n [width]=\"columnWidths[i] ?? 200\"\r\n [canAutoResize]=\"!columnWidths[i]\"\r\n [name]=\"(prop.isExtra ? '::' + prop.displayName : prop.displayName) | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template ngx-datatable-header-template let-column=\"column\">\r\n @if (prop.tooltip) {\r\n <span\r\n [ngbTooltip]=\"prop.tooltip.text | abpLocalization\"\r\n [placement]=\"prop.tooltip.placement || 'auto'\"\r\n container=\"body\"\r\n >\r\n {{ column.name }} <i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i>\r\n </span>\r\n } @else {\r\n {{ column.name }}\r\n }\r\n </ng-template>\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n <ng-container *abpVisible=\"row['_' + prop.name]?.visible\">\r\n @if (!row['_' + prop.name].component) {\r\n @if (prop.type === 'datetime' || prop.type === 'date' || prop.type === 'time') {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type)\r\n : ('::' + (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n } @else {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async)\r\n : ('::' + (row['_' + prop.name]?.value | async) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n }\r\n } @else {\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n</ngx-datatable>\r\n", dependencies: [{ kind: "directive", type: AbpVisibleDirective, selector: "[abpVisible]", inputs: ["abpVisible"] }, { kind: "ngmodule", type: NgxDatatableModule }, { kind: "component", type: i1$1.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarVDynamic", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "ghostLoadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "disableRowCheck", "rowDraggable", "enableClearingSortState", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction", "rowDragEvents"] }, { kind: "directive", type: i1$1.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "bindAsUnsafeHtml", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate", "ghostCellTemplate"] }, { kind: "directive", type: i1$1.DataTableColumnHeaderDirective, selector: "[ngx-datatable-header-template]" }, { kind: "directive", type: i1$1.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "component", type: GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }, { kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { kind: "directive", type: NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i2$1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: UtcToLocalPipe, name: "abpUtcToLocal" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1170
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: ExtensibleTableComponent, isStandalone: true, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate", selectable: "selectable", selectionType: "selectionType", selected: "selected", infiniteScroll: "infiniteScroll", isLoading: "isLoading", scrollThreshold: "scrollThreshold", tableHeight: "tableHeight" }, outputs: { tableActivate: "tableActivate", selectionChange: "selectionChange", loadMore: "loadMore" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0, template: "@if (isBrowser) {\r\n <ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n [selectionType]=\"selectable ? _selectionType : undefined\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n (select)=\"onSelect($event)\"\r\n [selected]=\"selected\"\r\n (scroll)=\"onScroll($event)\"\r\n [scrollbarV]=\"infiniteScroll\"\r\n [style.height]=\"getTableHeight()\"\r\n [loadingIndicator]=\"infiniteScroll && isLoading\"\r\n [footerHeight]=\"infiniteScroll ? false : 50\"\r\n>\r\n@if(selectable) {\r\n <ngx-datatable-column [width]=\"50\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\" [resizeable]=\"false\">\r\n\r\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\r\n let-selectFn=\"selectFn\">\r\n @if (_selectionType !== 'single') {\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input table-check\" type=\"checkbox\" [checked]=\"allRowsSelected\"\r\n (change)=\"selectFn(!allRowsSelected)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <ng-template ngx-datatable-cell-template let-value=\"value\" let-row=\"row\" let-isSelected=\"isSelected\"\r\n let-onCheckboxChangeFn=\"onCheckboxChangeFn\">\r\n @if(_selectionType === 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"radio\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n @if (_selectionType !== 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n </ngx-datatable-column>\r\n }\r\n @if (actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)) {\r\n <ngx-datatable-column\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"_actionsColumnWidth() ?? undefined\"\r\n [width]=\"_actionsColumnWidth() ?? 200\"\r\n [canAutoResize]=\"!_actionsColumnWidth()\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n @if (isVisibleActions(row)) {\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n @for (prop of propList; track prop.name; let i = $index) {\r\n <ngx-datatable-column\r\n *abpVisible=\"prop.columnVisible(getInjected)\"\r\n [width]=\"columnWidths[i] ?? 200\"\r\n [canAutoResize]=\"!columnWidths[i]\"\r\n [name]=\"(prop.isExtra ? '::' + prop.displayName : prop.displayName) | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template ngx-datatable-header-template let-column=\"column\" let-sortFn=\"sortFn\">\r\n @if (prop.tooltip) {\r\n <span\r\n [ngbTooltip]=\"prop.tooltip.text | abpLocalization\"\r\n [placement]=\"prop.tooltip.placement || 'auto'\"\r\n container=\"body\"\r\n [class.pointer]=\"prop.sortable\"\r\n (click)=\"prop.sortable && sortFn(column)\"\r\n >\r\n {{ column.name }} <i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i>\r\n </span>\r\n } @else {\r\n <span\r\n [class.pointer]=\"prop.sortable\"\r\n (click)=\"prop.sortable && sortFn(column)\"\r\n >\r\n {{ column.name }}\r\n </span>\r\n }\r\n </ng-template>\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n <ng-container *abpVisible=\"row['_' + prop.name]?.visible\">\r\n @if (!row['_' + prop.name].component) {\r\n @if (prop.type === 'datetime' || prop.type === 'date' || prop.type === 'time') {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type)\r\n : ('::' + (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n } @else {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async)\r\n : ('::' + (row['_' + prop.name]?.value | async) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n }\r\n } @else {\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n</ngx-datatable>\r\n}\r\n", dependencies: [{ kind: "directive", type: AbpVisibleDirective, selector: "[abpVisible]", inputs: ["abpVisible"] }, { kind: "ngmodule", type: NgxDatatableModule }, { kind: "component", type: i1$1.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarVDynamic", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "ghostLoadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "disableRowCheck", "rowDraggable", "enableClearingSortState", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction", "rowDragEvents"] }, { kind: "directive", type: i1$1.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "bindAsUnsafeHtml", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate", "ghostCellTemplate"] }, { kind: "directive", type: i1$1.DataTableColumnHeaderDirective, selector: "[ngx-datatable-header-template]" }, { kind: "directive", type: i1$1.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "component", type: GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }, { kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { kind: "directive", type: NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: UtcToLocalPipe, name: "abpUtcToLocal" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1107
1171
|
}
|
|
1108
1172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ExtensibleTableComponent, decorators: [{
|
|
1109
1173
|
type: Component,
|
|
@@ -1115,12 +1179,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
1115
1179
|
NgxDatatableDefaultDirective,
|
|
1116
1180
|
NgxDatatableListDirective,
|
|
1117
1181
|
PermissionDirective,
|
|
1118
|
-
|
|
1182
|
+
LocalizationPipe,
|
|
1119
1183
|
UtcToLocalPipe,
|
|
1120
1184
|
AsyncPipe,
|
|
1121
1185
|
NgTemplateOutlet,
|
|
1122
1186
|
NgComponentOutlet,
|
|
1123
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n [selectionType]=\"selectable ? _selectionType : undefined\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n (select)=\"onSelect($event)\"\r\n [selected]=\"selected\"\r\n>\r\n@if(selectable) {\r\n <ngx-datatable-column [width]=\"50\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\" [resizeable]=\"false\">\r\n
|
|
1187
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isBrowser) {\r\n <ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n [selectionType]=\"selectable ? _selectionType : undefined\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n (select)=\"onSelect($event)\"\r\n [selected]=\"selected\"\r\n (scroll)=\"onScroll($event)\"\r\n [scrollbarV]=\"infiniteScroll\"\r\n [style.height]=\"getTableHeight()\"\r\n [loadingIndicator]=\"infiniteScroll && isLoading\"\r\n [footerHeight]=\"infiniteScroll ? false : 50\"\r\n>\r\n@if(selectable) {\r\n <ngx-datatable-column [width]=\"50\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\" [resizeable]=\"false\">\r\n\r\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\r\n let-selectFn=\"selectFn\">\r\n @if (_selectionType !== 'single') {\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input table-check\" type=\"checkbox\" [checked]=\"allRowsSelected\"\r\n (change)=\"selectFn(!allRowsSelected)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <ng-template ngx-datatable-cell-template let-value=\"value\" let-row=\"row\" let-isSelected=\"isSelected\"\r\n let-onCheckboxChangeFn=\"onCheckboxChangeFn\">\r\n @if(_selectionType === 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"radio\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n @if (_selectionType !== 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n </ngx-datatable-column>\r\n }\r\n @if (actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)) {\r\n <ngx-datatable-column\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"_actionsColumnWidth() ?? undefined\"\r\n [width]=\"_actionsColumnWidth() ?? 200\"\r\n [canAutoResize]=\"!_actionsColumnWidth()\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n @if (isVisibleActions(row)) {\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n @for (prop of propList; track prop.name; let i = $index) {\r\n <ngx-datatable-column\r\n *abpVisible=\"prop.columnVisible(getInjected)\"\r\n [width]=\"columnWidths[i] ?? 200\"\r\n [canAutoResize]=\"!columnWidths[i]\"\r\n [name]=\"(prop.isExtra ? '::' + prop.displayName : prop.displayName) | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template ngx-datatable-header-template let-column=\"column\" let-sortFn=\"sortFn\">\r\n @if (prop.tooltip) {\r\n <span\r\n [ngbTooltip]=\"prop.tooltip.text | abpLocalization\"\r\n [placement]=\"prop.tooltip.placement || 'auto'\"\r\n container=\"body\"\r\n [class.pointer]=\"prop.sortable\"\r\n (click)=\"prop.sortable && sortFn(column)\"\r\n >\r\n {{ column.name }} <i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i>\r\n </span>\r\n } @else {\r\n <span\r\n [class.pointer]=\"prop.sortable\"\r\n (click)=\"prop.sortable && sortFn(column)\"\r\n >\r\n {{ column.name }}\r\n </span>\r\n }\r\n </ng-template>\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n <ng-container *abpVisible=\"row['_' + prop.name]?.visible\">\r\n @if (!row['_' + prop.name].component) {\r\n @if (prop.type === 'datetime' || prop.type === 'date' || prop.type === 'time') {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type)\r\n : ('::' + (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n } @else {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async)\r\n : ('::' + (row['_' + prop.name]?.value | async) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n }\r\n } @else {\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n</ngx-datatable>\r\n}\r\n" }]
|
|
1124
1188
|
}], ctorParameters: () => [], propDecorators: { actionsText: [{
|
|
1125
1189
|
type: Input
|
|
1126
1190
|
}], data: [{
|
|
@@ -1143,6 +1207,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
1143
1207
|
type: Input
|
|
1144
1208
|
}], selectionChange: [{
|
|
1145
1209
|
type: Output
|
|
1210
|
+
}], infiniteScroll: [{
|
|
1211
|
+
type: Input
|
|
1212
|
+
}], isLoading: [{
|
|
1213
|
+
type: Input
|
|
1214
|
+
}], scrollThreshold: [{
|
|
1215
|
+
type: Input
|
|
1216
|
+
}], loadMore: [{
|
|
1217
|
+
type: Output
|
|
1218
|
+
}], tableHeight: [{
|
|
1219
|
+
type: Input
|
|
1146
1220
|
}] } });
|
|
1147
1221
|
|
|
1148
1222
|
class CreateInjectorPipe {
|
|
@@ -1179,32 +1253,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
1179
1253
|
}] });
|
|
1180
1254
|
|
|
1181
1255
|
class PageToolbarComponent extends AbstractActionsComponent {
|
|
1182
|
-
constructor(
|
|
1183
|
-
|
|
1184
|
-
|
|
1256
|
+
constructor() {
|
|
1257
|
+
const injector = inject(Injector);
|
|
1258
|
+
super();
|
|
1185
1259
|
this.defaultBtnClass = 'btn btn-sm btn-primary';
|
|
1186
1260
|
this.getData = () => this.data;
|
|
1187
1261
|
this.trackByFn = (_, item) => item.action || item.component;
|
|
1262
|
+
this.injector = injector;
|
|
1188
1263
|
}
|
|
1189
1264
|
asToolbarAction(value) {
|
|
1190
1265
|
return {
|
|
1191
1266
|
value: value,
|
|
1192
1267
|
};
|
|
1193
1268
|
}
|
|
1194
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: PageToolbarComponent, deps: [
|
|
1269
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: PageToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1195
1270
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: PageToolbarComponent, isStandalone: true, selector: "abp-page-toolbar", providers: [
|
|
1196
1271
|
{
|
|
1197
1272
|
provide: EXTENSIONS_ACTION_TYPE,
|
|
1198
1273
|
useValue: 'toolbarActions',
|
|
1199
1274
|
},
|
|
1200
|
-
], exportAs: ["abpPageToolbar"], usesInheritance: true, ngImport: i0, template: "<div class=\"row justify-content-end mx-0 gap-2\" id=\"AbpContentToolbar\">\r\n @for (action of actionList; track action.component || action.action; let last = $last) {\r\n <div class=\"col-auto px-0 pt-0\" [class.pe-0]=\"last\">\r\n @if (action.visible(data)) {\r\n <ng-container *abpPermission=\"action.permission; runChangeDetection: false\">\r\n @if (action.component; as component) {\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: record | createInjector: action:this\"\r\n ></ng-container>\r\n\r\n }@else {\r\n @if (asToolbarAction(action).value; as toolbarAction ) {\r\n <button\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [ngClass]=\"toolbarAction?.btnClass ? toolbarAction?.btnClass : defaultBtnClass\"\r\n class=\"d-inline-flex align-items-center gap-1\"\r\n >\r\n <i [ngClass]=\"toolbarAction?.icon\" [class.me-1]=\"toolbarAction?.icon\"></i>\r\n {{ toolbarAction?.text | abpLocalization }}\r\n </button>\r\n } \r\n }\r\n </ng-container>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n", dependencies: [{ kind: "pipe", type: CreateInjectorPipe, name: "createInjector" }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "
|
|
1275
|
+
], exportAs: ["abpPageToolbar"], usesInheritance: true, ngImport: i0, template: "<div class=\"row justify-content-end mx-0 gap-2\" id=\"AbpContentToolbar\">\r\n @for (action of actionList; track action.component || action.action; let last = $last) {\r\n <div class=\"col-auto px-0 pt-0\" [class.pe-0]=\"last\">\r\n @if (action.visible(data)) {\r\n <ng-container *abpPermission=\"action.permission; runChangeDetection: false\">\r\n @if (action.component; as component) {\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: record | createInjector: action:this\"\r\n ></ng-container>\r\n\r\n }@else {\r\n @if (asToolbarAction(action).value; as toolbarAction ) {\r\n <button\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [ngClass]=\"toolbarAction?.btnClass ? toolbarAction?.btnClass : defaultBtnClass\"\r\n class=\"d-inline-flex align-items-center gap-1\"\r\n >\r\n <i [ngClass]=\"toolbarAction?.icon\" [class.me-1]=\"toolbarAction?.icon\"></i>\r\n {{ toolbarAction?.text | abpLocalization }}\r\n </button>\r\n } \r\n }\r\n </ng-container>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n", dependencies: [{ kind: "pipe", type: CreateInjectorPipe, name: "createInjector" }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1201
1276
|
}
|
|
1202
1277
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: PageToolbarComponent, decorators: [{
|
|
1203
1278
|
type: Component,
|
|
1204
1279
|
args: [{ exportAs: 'abpPageToolbar', selector: 'abp-page-toolbar', imports: [
|
|
1205
1280
|
CreateInjectorPipe,
|
|
1206
1281
|
PermissionDirective,
|
|
1207
|
-
|
|
1282
|
+
LocalizationPipe,
|
|
1208
1283
|
NgClass,
|
|
1209
1284
|
NgComponentOutlet,
|
|
1210
1285
|
], providers: [
|
|
@@ -1213,7 +1288,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
1213
1288
|
useValue: 'toolbarActions',
|
|
1214
1289
|
},
|
|
1215
1290
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row justify-content-end mx-0 gap-2\" id=\"AbpContentToolbar\">\r\n @for (action of actionList; track action.component || action.action; let last = $last) {\r\n <div class=\"col-auto px-0 pt-0\" [class.pe-0]=\"last\">\r\n @if (action.visible(data)) {\r\n <ng-container *abpPermission=\"action.permission; runChangeDetection: false\">\r\n @if (action.component; as component) {\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: record | createInjector: action:this\"\r\n ></ng-container>\r\n\r\n }@else {\r\n @if (asToolbarAction(action).value; as toolbarAction ) {\r\n <button\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [ngClass]=\"toolbarAction?.btnClass ? toolbarAction?.btnClass : defaultBtnClass\"\r\n class=\"d-inline-flex align-items-center gap-1\"\r\n >\r\n <i [ngClass]=\"toolbarAction?.icon\" [class.me-1]=\"toolbarAction?.icon\"></i>\r\n {{ toolbarAction?.text | abpLocalization }}\r\n </button>\r\n } \r\n }\r\n </ng-container>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n" }]
|
|
1216
|
-
}], ctorParameters: () => [
|
|
1291
|
+
}], ctorParameters: () => [] });
|
|
1217
1292
|
|
|
1218
1293
|
var objectExtensions = /*#__PURE__*/Object.freeze({
|
|
1219
1294
|
__proto__: null
|
|
@@ -1560,7 +1635,6 @@ class ExtensibleModule {
|
|
|
1560
1635
|
NgbTooltipModule, ExtensibleDateTimePickerComponent,
|
|
1561
1636
|
ExtensibleFormPropComponent,
|
|
1562
1637
|
GridActionsComponent,
|
|
1563
|
-
PageToolbarComponent,
|
|
1564
1638
|
ExtensibleFormComponent,
|
|
1565
1639
|
ExtensibleTableComponent,
|
|
1566
1640
|
ExtensibleFormMultiselectComponent] }); }
|