@abp/ng.theme.shared 6.0.0-rc.4 → 6.0.0
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/esm2020/extensions/lib/adapters/date-time.adapter.mjs +3 -3
- package/esm2020/extensions/lib/adapters/date.adapter.mjs +3 -3
- package/esm2020/extensions/lib/adapters/time.adapter.mjs +3 -3
- package/esm2020/extensions/lib/components/abstract-actions/abstract-actions.component.mjs +3 -3
- package/esm2020/extensions/lib/components/date-time-picker/date-time-picker.component.mjs +8 -8
- package/esm2020/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +29 -25
- package/esm2020/extensions/lib/components/extensible-form/extensible-form.component.mjs +19 -10
- package/esm2020/extensions/lib/components/extensible-table/extensible-table.component.mjs +11 -11
- package/esm2020/extensions/lib/components/grid-actions/grid-actions.component.mjs +7 -7
- package/esm2020/extensions/lib/components/page-toolbar/page-toolbar.component.mjs +4 -4
- package/esm2020/extensions/lib/directives/disabled.directive.mjs +3 -3
- package/esm2020/extensions/lib/directives/prop-data.directive.mjs +3 -3
- package/esm2020/extensions/lib/models/form-props.mjs +23 -1
- package/esm2020/extensions/lib/pipes/create-injector.pipe.mjs +3 -3
- package/esm2020/extensions/lib/services/extensions.service.mjs +3 -3
- package/esm2020/extensions/lib/ui-extensions.module.mjs +15 -17
- package/esm2020/extensions/lib/utils/form-props.util.mjs +8 -8
- package/esm2020/extensions/lib/utils/state.util.mjs +5 -5
- package/esm2020/extensions/lib/utils/typeahead.util.mjs +2 -2
- package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +5 -5
- package/esm2020/lib/components/breadcrumb-items/breadcrumb-items.component.mjs +3 -3
- package/esm2020/lib/components/button/button.component.mjs +4 -4
- package/esm2020/lib/components/confirmation/confirmation.component.mjs +4 -4
- package/esm2020/lib/components/http-error-wrapper/http-error-wrapper.component.mjs +3 -3
- package/esm2020/lib/components/loader-bar/loader-bar.component.mjs +4 -4
- package/esm2020/lib/components/loading/loading.component.mjs +6 -34
- package/esm2020/lib/components/modal/modal-close.directive.mjs +3 -3
- package/esm2020/lib/components/modal/modal-ref.service.mjs +3 -3
- package/esm2020/lib/components/modal/modal.component.mjs +5 -5
- package/esm2020/lib/components/toast/toast.component.mjs +4 -4
- package/esm2020/lib/components/toast-container/toast-container.component.mjs +6 -6
- package/esm2020/lib/constants/styles.mjs +6 -1
- package/esm2020/lib/directives/ellipsis.directive.mjs +7 -7
- package/esm2020/lib/directives/loading.directive.mjs +3 -3
- package/esm2020/lib/directives/ngx-datatable-default.directive.mjs +3 -3
- package/esm2020/lib/directives/ngx-datatable-list.directive.mjs +3 -3
- package/esm2020/lib/handlers/document-dir.handler.mjs +3 -3
- package/esm2020/lib/handlers/error.handler.mjs +3 -3
- package/esm2020/lib/providers/route.provider.mjs +2 -2
- package/esm2020/lib/services/confirmation.service.mjs +5 -5
- package/esm2020/lib/services/nav-items.service.mjs +3 -3
- package/esm2020/lib/services/page-alert.service.mjs +3 -3
- package/esm2020/lib/services/toaster.service.mjs +3 -3
- package/esm2020/lib/services/user-menu.service.mjs +3 -3
- package/esm2020/lib/theme-shared.module.mjs +13 -15
- package/esm2020/lib/utils/date-parser-formatter.mjs +3 -3
- package/esm2020/testing/lib/theme-shared-testing.module.mjs +5 -5
- package/extensions/{abp-ng.theme.shared-extensions.d.ts → index.d.ts} +0 -0
- package/extensions/lib/components/abstract-actions/abstract-actions.component.d.ts +1 -1
- package/extensions/lib/components/date-time-picker/date-time-picker.component.d.ts +1 -1
- package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +2 -1
- package/extensions/lib/components/extensible-form/extensible-form.component.d.ts +7 -6
- package/extensions/lib/components/extensible-table/extensible-table.component.d.ts +1 -1
- package/extensions/lib/components/grid-actions/grid-actions.component.d.ts +1 -1
- package/extensions/lib/components/page-toolbar/page-toolbar.component.d.ts +1 -1
- package/extensions/lib/directives/disabled.directive.d.ts +1 -1
- package/extensions/lib/directives/prop-data.directive.d.ts +1 -1
- package/extensions/lib/models/form-props.d.ts +13 -0
- package/extensions/lib/pipes/create-injector.pipe.d.ts +1 -1
- package/extensions/lib/utils/form-props.util.d.ts +2 -2
- package/fesm2015/abp-ng.theme.shared-extensions.mjs +228 -195
- package/fesm2015/abp-ng.theme.shared-extensions.mjs.map +1 -1
- package/fesm2015/abp-ng.theme.shared-testing.mjs +4 -4
- package/fesm2015/abp-ng.theme.shared-testing.mjs.map +1 -1
- package/fesm2015/abp-ng.theme.shared.mjs +103 -128
- package/fesm2015/abp-ng.theme.shared.mjs.map +1 -1
- package/fesm2020/abp-ng.theme.shared-extensions.mjs +138 -106
- package/fesm2020/abp-ng.theme.shared-extensions.mjs.map +1 -1
- package/fesm2020/abp-ng.theme.shared-testing.mjs +4 -4
- package/fesm2020/abp-ng.theme.shared-testing.mjs.map +1 -1
- package/fesm2020/abp-ng.theme.shared.mjs +103 -128
- package/fesm2020/abp-ng.theme.shared.mjs.map +1 -1
- package/{abp-ng.theme.shared.d.ts → index.d.ts} +0 -0
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +1 -1
- package/lib/components/breadcrumb-items/breadcrumb-items.component.d.ts +1 -1
- package/lib/components/button/button.component.d.ts +1 -1
- package/lib/components/confirmation/confirmation.component.d.ts +1 -1
- package/lib/components/http-error-wrapper/http-error-wrapper.component.d.ts +1 -1
- package/lib/components/loader-bar/loader-bar.component.d.ts +1 -1
- package/lib/components/loading/loading.component.d.ts +1 -1
- package/lib/components/modal/modal-close.directive.d.ts +1 -1
- package/lib/components/modal/modal.component.d.ts +1 -1
- package/lib/components/toast/toast.component.d.ts +1 -1
- package/lib/components/toast-container/toast-container.component.d.ts +1 -1
- package/lib/constants/styles.d.ts +1 -1
- package/lib/directives/ellipsis.directive.d.ts +1 -1
- package/lib/directives/loading.directive.d.ts +1 -1
- package/lib/directives/ngx-datatable-default.directive.d.ts +1 -1
- package/lib/directives/ngx-datatable-list.directive.d.ts +1 -1
- package/package.json +8 -8
- package/testing/{abp-ng.theme.shared-testing.d.ts → index.d.ts} +0 -0
- package/extensions/package.json +0 -10
- package/testing/package.json +0 -10
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Optional, SkipSelf, Component, ChangeDetectionStrategy, Input, ViewChild, InjectionToken, Directive, Host, Injector, Inject, ViewChildren, LOCALE_ID, Pipe, NgModule } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { formatDate } from '@angular/common';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i4$1 from '@ng-bootstrap/ng-bootstrap';
|
|
6
6
|
import { NgbDateAdapter, NgbTimeAdapter, NgbInputDatepicker, NgbTimepicker, NgbDatepickerModule, NgbDropdownModule, NgbTimepickerModule, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
|
|
7
|
-
import * as i2
|
|
8
|
-
import { ControlContainer, FormGroupDirective, Validators,
|
|
9
|
-
import * as
|
|
7
|
+
import * as i2 from '@angular/forms';
|
|
8
|
+
import { ControlContainer, FormGroupDirective, Validators, UntypedFormGroup, UntypedFormControl } from '@angular/forms';
|
|
9
|
+
import * as i4 from '@ngx-validate/core';
|
|
10
10
|
import { NgxValidateCoreModule } from '@ngx-validate/core';
|
|
11
11
|
import * as i1 from '@abp/ng.core';
|
|
12
12
|
import { RestService, AbpValidators, escapeHtmlChars, PermissionService, getShortDateShortTimeFormat, getShortTimeFormat, getShortDateFormat, CoreModule, LocalizationService, createLocalizationPipeKeyGenerator } from '@abp/ng.core';
|
|
13
13
|
import { of, merge, pipe, zip } from 'rxjs';
|
|
14
14
|
import { map, debounceTime, distinctUntilChanged, switchMap, filter, take } from 'rxjs/operators';
|
|
15
15
|
import { LinkedList } from '@abp/utils';
|
|
16
|
-
import * as
|
|
17
|
-
import * as i4 from '@abp/ng.theme.shared';
|
|
16
|
+
import * as i3 from '@swimlane/ngx-datatable';
|
|
17
|
+
import * as i4$2 from '@abp/ng.theme.shared';
|
|
18
18
|
import { ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
19
19
|
|
|
20
20
|
class DateTimeAdapter {
|
|
@@ -45,9 +45,9 @@ class DateTimeAdapter {
|
|
|
45
45
|
return new Date(date).toISOString();
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
DateTimeAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
DateTimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
+
DateTimeAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DateTimeAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
+
DateTimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DateTimeAdapter });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DateTimeAdapter, decorators: [{
|
|
51
51
|
type: Injectable
|
|
52
52
|
}] });
|
|
53
53
|
|
|
@@ -82,9 +82,9 @@ class DateAdapter extends NgbDateAdapter {
|
|
|
82
82
|
return new Date(dateUtc.getTime() + Math.abs(dateUtc.getTimezoneOffset() * 60000));
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
DateAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
86
|
-
DateAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
85
|
+
DateAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
86
|
+
DateAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DateAdapter });
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DateAdapter, decorators: [{
|
|
88
88
|
type: Injectable
|
|
89
89
|
}] });
|
|
90
90
|
|
|
@@ -111,9 +111,9 @@ class TimeAdapter extends NgbTimeAdapter {
|
|
|
111
111
|
return formattedDate;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
TimeAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
115
|
-
TimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
114
|
+
TimeAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: TimeAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
115
|
+
TimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: TimeAdapter });
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: TimeAdapter, decorators: [{
|
|
117
117
|
type: Injectable
|
|
118
118
|
}] });
|
|
119
119
|
function isTimeStr(value) {
|
|
@@ -136,8 +136,8 @@ class DateTimePickerComponent {
|
|
|
136
136
|
this.time.writeValue(datestr);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
140
|
-
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
139
|
+
DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
+
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: { prop: "prop", meridian: "meridian" }, viewQueries: [{ propertyName: "date", first: true, predicate: NgbInputDatepicker, descendants: true }, { propertyName: "time", first: true, predicate: NgbTimepicker, descendants: true }], exportAs: ["abpDateTimePicker"], ngImport: i0, template: `
|
|
141
141
|
<input
|
|
142
142
|
[id]="prop.id"
|
|
143
143
|
[formControlName]="prop.name"
|
|
@@ -155,7 +155,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
155
155
|
(ngModelChange)="setDate($event)"
|
|
156
156
|
[meridian]="meridian"
|
|
157
157
|
></ngb-timepicker>
|
|
158
|
-
`, isInline: true,
|
|
158
|
+
`, isInline: true, dependencies: [{ 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: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i4$1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "component", type: i4$1.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"] }], viewProviders: [
|
|
159
159
|
{
|
|
160
160
|
provide: ControlContainer,
|
|
161
161
|
useFactory: selfFactory,
|
|
@@ -170,7 +170,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
170
170
|
useClass: DateTimeAdapter,
|
|
171
171
|
},
|
|
172
172
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
174
174
|
type: Component,
|
|
175
175
|
args: [{
|
|
176
176
|
exportAs: 'abpDateTimePicker',
|
|
@@ -261,9 +261,9 @@ function createTypeaheadOptions(lookup) {
|
|
|
261
261
|
}
|
|
262
262
|
function getTypeaheadType(lookup, name) {
|
|
263
263
|
return Boolean(lookup.url)
|
|
264
|
-
? "typeahead" /* Typeahead */
|
|
264
|
+
? "typeahead" /* ePropType.Typeahead */
|
|
265
265
|
: name.endsWith(TYPEAHEAD_TEXT_SUFFIX)
|
|
266
|
-
? "hidden" /* Hidden */
|
|
266
|
+
? "hidden" /* ePropType.Hidden */
|
|
267
267
|
: undefined;
|
|
268
268
|
}
|
|
269
269
|
function createTypeaheadDisplayNameGenerator(displayNameGeneratorFn, properties) {
|
|
@@ -297,15 +297,15 @@ class DisabledDirective {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
DisabledDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
301
|
-
DisabledDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
300
|
+
DisabledDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DisabledDirective, deps: [{ token: i2.NgControl, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
301
|
+
DisabledDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: DisabledDirective, selector: "[abpDisabled]", inputs: { abpDisabled: "abpDisabled" }, usesOnChanges: true, ngImport: i0 });
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: DisabledDirective, decorators: [{
|
|
303
303
|
type: Directive,
|
|
304
304
|
args: [{
|
|
305
305
|
selector: '[abpDisabled]',
|
|
306
306
|
}]
|
|
307
307
|
}], ctorParameters: function () {
|
|
308
|
-
return [{ type: i2
|
|
308
|
+
return [{ type: i2.NgControl, decorators: [{
|
|
309
309
|
type: Host
|
|
310
310
|
}] }];
|
|
311
311
|
}, propDecorators: { abpDisabled: [{
|
|
@@ -319,6 +319,7 @@ class ExtensibleFormPropComponent {
|
|
|
319
319
|
this.configState = configState;
|
|
320
320
|
this.injector = injector;
|
|
321
321
|
this.asterisk = '';
|
|
322
|
+
this.containerClassName = 'mb-3 form-group';
|
|
322
323
|
this.options$ = of([]);
|
|
323
324
|
this.validators = [];
|
|
324
325
|
this.disabledFn = (data) => false;
|
|
@@ -368,21 +369,21 @@ class ExtensibleFormPropComponent {
|
|
|
368
369
|
return 'template';
|
|
369
370
|
}
|
|
370
371
|
switch (prop.type) {
|
|
371
|
-
case "boolean" /* Boolean */:
|
|
372
|
+
case "boolean" /* ePropType.Boolean */:
|
|
372
373
|
return 'checkbox';
|
|
373
|
-
case "date" /* Date */:
|
|
374
|
+
case "date" /* ePropType.Date */:
|
|
374
375
|
return 'date';
|
|
375
|
-
case "datetime" /* DateTime */:
|
|
376
|
+
case "datetime" /* ePropType.DateTime */:
|
|
376
377
|
return 'dateTime';
|
|
377
|
-
case "hidden" /* Hidden */:
|
|
378
|
+
case "hidden" /* ePropType.Hidden */:
|
|
378
379
|
return 'hidden';
|
|
379
|
-
case "multiselect" /* MultiSelect */:
|
|
380
|
+
case "multiselect" /* ePropType.MultiSelect */:
|
|
380
381
|
return 'multiselect';
|
|
381
|
-
case "text" /* Text */:
|
|
382
|
+
case "text" /* ePropType.Text */:
|
|
382
383
|
return 'textarea';
|
|
383
|
-
case "time" /* Time */:
|
|
384
|
+
case "time" /* ePropType.Time */:
|
|
384
385
|
return 'time';
|
|
385
|
-
case "typeahead" /* Typeahead */:
|
|
386
|
+
case "typeahead" /* ePropType.Typeahead */:
|
|
386
387
|
return 'typeahead';
|
|
387
388
|
default:
|
|
388
389
|
return prop.options ? 'select' : 'input';
|
|
@@ -390,16 +391,16 @@ class ExtensibleFormPropComponent {
|
|
|
390
391
|
}
|
|
391
392
|
getType(prop) {
|
|
392
393
|
switch (prop.type) {
|
|
393
|
-
case "date" /* Date */:
|
|
394
|
-
case "string" /* String */:
|
|
394
|
+
case "date" /* ePropType.Date */:
|
|
395
|
+
case "string" /* ePropType.String */:
|
|
395
396
|
return 'text';
|
|
396
|
-
case "boolean" /* Boolean */:
|
|
397
|
+
case "boolean" /* ePropType.Boolean */:
|
|
397
398
|
return 'checkbox';
|
|
398
|
-
case "number" /* Number */:
|
|
399
|
+
case "number" /* ePropType.Number */:
|
|
399
400
|
return 'number';
|
|
400
|
-
case "email" /* Email */:
|
|
401
|
+
case "email" /* ePropType.Email */:
|
|
401
402
|
return 'email';
|
|
402
|
-
case "password" /* Password */:
|
|
403
|
+
case "password" /* ePropType.Password */:
|
|
403
404
|
return 'password';
|
|
404
405
|
default:
|
|
405
406
|
return 'hidden';
|
|
@@ -408,7 +409,7 @@ class ExtensibleFormPropComponent {
|
|
|
408
409
|
ngOnChanges({ prop, data }) {
|
|
409
410
|
var _a;
|
|
410
411
|
const currentProp = prop === null || prop === void 0 ? void 0 : prop.currentValue;
|
|
411
|
-
const { options, readonly, disabled, validators, template } = currentProp || {};
|
|
412
|
+
const { options, readonly, disabled, validators, className, template } = currentProp || {};
|
|
412
413
|
if (template) {
|
|
413
414
|
this.injectorForCustomComponent = Injector.create({
|
|
414
415
|
providers: [
|
|
@@ -436,13 +437,16 @@ class ExtensibleFormPropComponent {
|
|
|
436
437
|
this.validators = validators(this.data);
|
|
437
438
|
this.setAsterisk();
|
|
438
439
|
}
|
|
440
|
+
if (className !== undefined) {
|
|
441
|
+
this.containerClassName = className;
|
|
442
|
+
}
|
|
439
443
|
const [keyControl, valueControl] = this.getTypeaheadControls();
|
|
440
444
|
if (keyControl && valueControl)
|
|
441
445
|
this.typeaheadModel = { key: keyControl.value, value: valueControl.value };
|
|
442
446
|
}
|
|
443
447
|
}
|
|
444
|
-
ExtensibleFormPropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
445
|
-
ExtensibleFormPropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
448
|
+
ExtensibleFormPropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: ExtensibleFormPropComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TrackByService }, { token: i1.ConfigStateService }, { token: i2.FormGroupDirective }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
449
|
+
ExtensibleFormPropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: { data: "data", prop: "prop", first: "first" }, viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"getComponent(prop)\"\r\n\r\n *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n\r\n <ng-template ngSwitchCase=\"template\">\r\n <ng-container\r\n *ngComponentOutlet=\"prop.template;injector:injectorForCustomComponent\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <div\r\n [ngClass]=\"containerClassName\"\r\n class=\"mb-3 form-group\"\r\n >\r\n <ng-template ngSwitchCase=\"input\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"hidden\">\r\n <input [formControlName]=\"prop.name\" type=\"hidden\"/>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"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 ></ng-template>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"select\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"multiselect\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n multiple=\"multiple\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"typeahead\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"date\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"time\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"dateTime\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"textarea\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 </ng-template>\r\n </div>\r\n\r\n</ng-container>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label'\" x\r\n >{{ prop.displayName | abpLocalization }} {{ asterisk }}</label\r\n >\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { 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.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i4.ValidationStyleDirective, selector: "[validationStyle]", exportAs: ["validationStyle"] }, { kind: "directive", type: i4.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i4$1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "component", type: i4$1.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"] }, { kind: "directive", type: i4$1.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "container", "editable", "focusFirst", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "showHint", "placement", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { kind: "component", type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: ["prop", "meridian"], exportAs: ["abpDateTimePicker"] }, { kind: "directive", type: DisabledDirective, selector: "[abpDisabled]", inputs: ["abpDisabled"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], viewProviders: [
|
|
446
450
|
{
|
|
447
451
|
provide: ControlContainer,
|
|
448
452
|
useFactory: selfFactory,
|
|
@@ -451,7 +455,7 @@ ExtensibleFormPropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
451
455
|
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
452
456
|
{ provide: NgbTimeAdapter, useClass: TimeAdapter },
|
|
453
457
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: ExtensibleFormPropComponent, decorators: [{
|
|
455
459
|
type: Component,
|
|
456
460
|
args: [{ selector: 'abp-extensible-form-prop', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
|
|
457
461
|
{
|
|
@@ -461,8 +465,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
461
465
|
},
|
|
462
466
|
{ provide: NgbDateAdapter, useClass: DateAdapter },
|
|
463
467
|
{ provide: NgbTimeAdapter, useClass: TimeAdapter },
|
|
464
|
-
], template: "<ng-container [ngSwitch]=\"getComponent(prop)\"\r\n *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n\r\n <ng-template ngSwitchCase=\"template\">\r\n <ng-container\r\n *ngComponentOutlet=\"prop.template;injector:injectorForCustomComponent\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <div\r\n class=\"mb-3 form-group\"\r\n >\r\n
|
|
465
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i1.ConfigStateService }, { type: i2
|
|
468
|
+
], template: "<ng-container [ngSwitch]=\"getComponent(prop)\"\r\n\r\n *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n\r\n <ng-template ngSwitchCase=\"template\">\r\n <ng-container\r\n *ngComponentOutlet=\"prop.template;injector:injectorForCustomComponent\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <div\r\n [ngClass]=\"containerClassName\"\r\n class=\"mb-3 form-group\"\r\n >\r\n <ng-template ngSwitchCase=\"input\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"hidden\">\r\n <input [formControlName]=\"prop.name\" type=\"hidden\"/>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"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 ></ng-template>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"select\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"multiselect\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n multiple=\"multiple\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"typeahead\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"date\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"time\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"dateTime\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"textarea\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\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 </ng-template>\r\n </div>\r\n\r\n</ng-container>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label'\" x\r\n >{{ prop.displayName | abpLocalization }} {{ asterisk }}</label\r\n >\r\n</ng-template>\r\n" }]
|
|
469
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i1.ConfigStateService }, { type: i2.FormGroupDirective }, { type: i0.Injector }]; }, propDecorators: { data: [{
|
|
466
470
|
type: Input
|
|
467
471
|
}], prop: [{
|
|
468
472
|
type: Input
|
|
@@ -478,9 +482,9 @@ function isRequired(validator) {
|
|
|
478
482
|
validator.name === 'required');
|
|
479
483
|
}
|
|
480
484
|
|
|
481
|
-
class
|
|
485
|
+
class PropList extends LinkedList {
|
|
482
486
|
}
|
|
483
|
-
class
|
|
487
|
+
class PropData {
|
|
484
488
|
get data() {
|
|
485
489
|
return {
|
|
486
490
|
getInjected: this.getInjected,
|
|
@@ -489,14 +493,20 @@ class ActionData {
|
|
|
489
493
|
};
|
|
490
494
|
}
|
|
491
495
|
}
|
|
492
|
-
class
|
|
493
|
-
constructor(permission, visible = _ => true,
|
|
496
|
+
class Prop {
|
|
497
|
+
constructor(type, name, displayName, permission, visible = _ => true, isExtra = false, template, className) {
|
|
498
|
+
this.type = type;
|
|
499
|
+
this.name = name;
|
|
500
|
+
this.displayName = displayName;
|
|
494
501
|
this.permission = permission;
|
|
495
502
|
this.visible = visible;
|
|
496
|
-
this.
|
|
503
|
+
this.isExtra = isExtra;
|
|
504
|
+
this.template = template;
|
|
505
|
+
this.className = className;
|
|
506
|
+
this.displayName = this.displayName || this.name;
|
|
497
507
|
}
|
|
498
508
|
}
|
|
499
|
-
class
|
|
509
|
+
class PropsFactory {
|
|
500
510
|
constructor() {
|
|
501
511
|
this.contributorCallbacks = {};
|
|
502
512
|
}
|
|
@@ -505,14 +515,14 @@ class ActionsFactory {
|
|
|
505
515
|
return new this._ctor(this.contributorCallbacks[name]);
|
|
506
516
|
}
|
|
507
517
|
}
|
|
508
|
-
class
|
|
518
|
+
class Props {
|
|
509
519
|
constructor(callbackList) {
|
|
510
520
|
this.callbackList = callbackList;
|
|
511
521
|
}
|
|
512
|
-
get
|
|
513
|
-
const
|
|
514
|
-
this.callbackList.forEach(callback => callback(
|
|
515
|
-
return
|
|
522
|
+
get props() {
|
|
523
|
+
const propList = new this._ctor();
|
|
524
|
+
this.callbackList.forEach(callback => callback(propList));
|
|
525
|
+
return propList;
|
|
516
526
|
}
|
|
517
527
|
addContributor(contributeCallback) {
|
|
518
528
|
this.callbackList.push(contributeCallback);
|
|
@@ -523,37 +533,83 @@ class Actions {
|
|
|
523
533
|
}
|
|
524
534
|
}
|
|
525
535
|
|
|
526
|
-
class
|
|
536
|
+
class FormPropList extends PropList {
|
|
527
537
|
}
|
|
528
|
-
class
|
|
538
|
+
class FormProps extends Props {
|
|
529
539
|
constructor() {
|
|
530
540
|
super(...arguments);
|
|
531
|
-
this._ctor =
|
|
541
|
+
this._ctor = FormPropList;
|
|
532
542
|
}
|
|
533
543
|
}
|
|
534
|
-
class
|
|
544
|
+
class GroupedFormPropList {
|
|
545
|
+
constructor() {
|
|
546
|
+
this.items = [];
|
|
547
|
+
}
|
|
548
|
+
addItem(item) {
|
|
549
|
+
var _a;
|
|
550
|
+
const groupName = (_a = item.group) === null || _a === void 0 ? void 0 : _a.name;
|
|
551
|
+
let group = this.items.find(i => { var _a; return ((_a = i.group) === null || _a === void 0 ? void 0 : _a.name) === groupName; });
|
|
552
|
+
if (group) {
|
|
553
|
+
group.formPropList.addTail(item);
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
group = {
|
|
557
|
+
formPropList: new FormPropList(),
|
|
558
|
+
group: item.group,
|
|
559
|
+
};
|
|
560
|
+
group.formPropList.addHead(item);
|
|
561
|
+
this.items.push(group);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
class CreateFormPropsFactory extends PropsFactory {
|
|
535
566
|
constructor() {
|
|
536
567
|
super(...arguments);
|
|
537
|
-
this._ctor =
|
|
568
|
+
this._ctor = FormProps;
|
|
538
569
|
}
|
|
539
570
|
}
|
|
540
|
-
class
|
|
571
|
+
class EditFormPropsFactory extends PropsFactory {
|
|
572
|
+
constructor() {
|
|
573
|
+
super(...arguments);
|
|
574
|
+
this._ctor = FormProps;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
class FormProp extends Prop {
|
|
541
578
|
constructor(options) {
|
|
542
|
-
super(options.permission, options.visible, options.
|
|
543
|
-
this.
|
|
544
|
-
this.
|
|
579
|
+
super(options.type, options.name, options.displayName, options.permission, options.visible, options.isExtra, options.template, options.className);
|
|
580
|
+
this.group = options.group;
|
|
581
|
+
this.className = options.className;
|
|
582
|
+
this.asyncValidators = options.asyncValidators || (_ => []);
|
|
583
|
+
this.validators = options.validators || (_ => []);
|
|
584
|
+
this.disabled = options.disabled || (_ => false);
|
|
585
|
+
this.readonly = options.readonly || (_ => false);
|
|
586
|
+
this.autocomplete = options.autocomplete || 'off';
|
|
587
|
+
this.options = options.options;
|
|
588
|
+
this.id = options.id || options.name;
|
|
589
|
+
const defaultValue = options.defaultValue;
|
|
590
|
+
this.defaultValue = isFalsyValue(defaultValue) ? defaultValue : defaultValue || null;
|
|
545
591
|
}
|
|
546
592
|
static create(options) {
|
|
547
|
-
return new
|
|
593
|
+
return new FormProp(options);
|
|
548
594
|
}
|
|
549
595
|
static createMany(arrayOfOptions) {
|
|
550
|
-
return arrayOfOptions.map(
|
|
596
|
+
return arrayOfOptions.map(FormProp.create);
|
|
551
597
|
}
|
|
598
|
+
}
|
|
599
|
+
class FormPropData extends PropData {
|
|
600
|
+
constructor(injector, record) {
|
|
601
|
+
super();
|
|
602
|
+
this.record = record;
|
|
603
|
+
this.getInjected = injector.get.bind(injector);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
function isFalsyValue(defaultValue) {
|
|
607
|
+
return [0, '', false].indexOf(defaultValue) > -1;
|
|
552
608
|
}
|
|
553
609
|
|
|
554
|
-
class
|
|
610
|
+
class ActionList extends LinkedList {
|
|
555
611
|
}
|
|
556
|
-
class
|
|
612
|
+
class ActionData {
|
|
557
613
|
get data() {
|
|
558
614
|
return {
|
|
559
615
|
getInjected: this.getInjected,
|
|
@@ -562,20 +618,14 @@ class PropData {
|
|
|
562
618
|
};
|
|
563
619
|
}
|
|
564
620
|
}
|
|
565
|
-
class
|
|
566
|
-
constructor(
|
|
567
|
-
this.type = type;
|
|
568
|
-
this.name = name;
|
|
569
|
-
this.displayName = displayName;
|
|
621
|
+
class Action {
|
|
622
|
+
constructor(permission, visible = _ => true, action = _ => { }) {
|
|
570
623
|
this.permission = permission;
|
|
571
624
|
this.visible = visible;
|
|
572
|
-
this.
|
|
573
|
-
this.template = template;
|
|
574
|
-
this.className = className;
|
|
575
|
-
this.displayName = this.displayName || this.name;
|
|
625
|
+
this.action = action;
|
|
576
626
|
}
|
|
577
627
|
}
|
|
578
|
-
class
|
|
628
|
+
class ActionsFactory {
|
|
579
629
|
constructor() {
|
|
580
630
|
this.contributorCallbacks = {};
|
|
581
631
|
}
|
|
@@ -584,14 +634,14 @@ class PropsFactory {
|
|
|
584
634
|
return new this._ctor(this.contributorCallbacks[name]);
|
|
585
635
|
}
|
|
586
636
|
}
|
|
587
|
-
class
|
|
637
|
+
class Actions {
|
|
588
638
|
constructor(callbackList) {
|
|
589
639
|
this.callbackList = callbackList;
|
|
590
640
|
}
|
|
591
|
-
get
|
|
592
|
-
const
|
|
593
|
-
this.callbackList.forEach(callback => callback(
|
|
594
|
-
return
|
|
641
|
+
get actions() {
|
|
642
|
+
const actionList = new this._ctor();
|
|
643
|
+
this.callbackList.forEach(callback => callback(actionList));
|
|
644
|
+
return actionList;
|
|
595
645
|
}
|
|
596
646
|
addContributor(contributeCallback) {
|
|
597
647
|
this.callbackList.push(contributeCallback);
|
|
@@ -602,88 +652,65 @@ class Props {
|
|
|
602
652
|
}
|
|
603
653
|
}
|
|
604
654
|
|
|
605
|
-
class
|
|
655
|
+
class EntityActionList extends ActionList {
|
|
606
656
|
}
|
|
607
|
-
class
|
|
657
|
+
class EntityActions extends Actions {
|
|
608
658
|
constructor() {
|
|
609
659
|
super(...arguments);
|
|
610
|
-
this._ctor =
|
|
660
|
+
this._ctor = EntityActionList;
|
|
611
661
|
}
|
|
612
662
|
}
|
|
613
|
-
class
|
|
663
|
+
class EntityActionsFactory extends ActionsFactory {
|
|
614
664
|
constructor() {
|
|
615
665
|
super(...arguments);
|
|
616
|
-
this._ctor =
|
|
666
|
+
this._ctor = EntityActions;
|
|
617
667
|
}
|
|
618
668
|
}
|
|
619
|
-
class
|
|
669
|
+
class EntityAction extends Action {
|
|
620
670
|
constructor(options) {
|
|
621
|
-
super(options.
|
|
622
|
-
this.
|
|
623
|
-
this.
|
|
624
|
-
this.valueResolver =
|
|
625
|
-
options.valueResolver || (data => of(escapeHtmlChars(data.record[this.name])));
|
|
626
|
-
this.action = options.action;
|
|
627
|
-
this.component = options.component;
|
|
628
|
-
this.enumList = options.enumList;
|
|
671
|
+
super(options.permission, options.visible, options.action);
|
|
672
|
+
this.text = options.text;
|
|
673
|
+
this.icon = options.icon || '';
|
|
629
674
|
}
|
|
630
675
|
static create(options) {
|
|
631
|
-
return new
|
|
676
|
+
return new EntityAction(options);
|
|
632
677
|
}
|
|
633
678
|
static createMany(arrayOfOptions) {
|
|
634
|
-
return arrayOfOptions.map(
|
|
679
|
+
return arrayOfOptions.map(EntityAction.create);
|
|
635
680
|
}
|
|
636
681
|
}
|
|
637
682
|
|
|
638
|
-
class
|
|
639
|
-
}
|
|
640
|
-
class FormProps extends Props {
|
|
641
|
-
constructor() {
|
|
642
|
-
super(...arguments);
|
|
643
|
-
this._ctor = FormPropList;
|
|
644
|
-
}
|
|
683
|
+
class EntityPropList extends PropList {
|
|
645
684
|
}
|
|
646
|
-
class
|
|
685
|
+
class EntityProps extends Props {
|
|
647
686
|
constructor() {
|
|
648
687
|
super(...arguments);
|
|
649
|
-
this._ctor =
|
|
688
|
+
this._ctor = EntityPropList;
|
|
650
689
|
}
|
|
651
690
|
}
|
|
652
|
-
class
|
|
691
|
+
class EntityPropsFactory extends PropsFactory {
|
|
653
692
|
constructor() {
|
|
654
693
|
super(...arguments);
|
|
655
|
-
this._ctor =
|
|
694
|
+
this._ctor = EntityProps;
|
|
656
695
|
}
|
|
657
696
|
}
|
|
658
|
-
class
|
|
697
|
+
class EntityProp extends Prop {
|
|
659
698
|
constructor(options) {
|
|
660
|
-
super(options.type, options.name, options.displayName, options.permission, options.visible, options.isExtra
|
|
661
|
-
this.
|
|
662
|
-
this.
|
|
663
|
-
this.
|
|
664
|
-
|
|
665
|
-
this.
|
|
666
|
-
this.
|
|
667
|
-
this.
|
|
668
|
-
const defaultValue = options.defaultValue;
|
|
669
|
-
this.defaultValue = isFalsyValue(defaultValue) ? defaultValue : defaultValue || null;
|
|
699
|
+
super(options.type, options.name, options.displayName, options.permission, options.visible, options.isExtra);
|
|
700
|
+
this.columnWidth = options.columnWidth;
|
|
701
|
+
this.sortable = options.sortable || false;
|
|
702
|
+
this.valueResolver =
|
|
703
|
+
options.valueResolver || (data => of(escapeHtmlChars(data.record[this.name])));
|
|
704
|
+
this.action = options.action;
|
|
705
|
+
this.component = options.component;
|
|
706
|
+
this.enumList = options.enumList;
|
|
670
707
|
}
|
|
671
708
|
static create(options) {
|
|
672
|
-
return new
|
|
709
|
+
return new EntityProp(options);
|
|
673
710
|
}
|
|
674
711
|
static createMany(arrayOfOptions) {
|
|
675
|
-
return arrayOfOptions.map(
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
class FormPropData extends PropData {
|
|
679
|
-
constructor(injector, record) {
|
|
680
|
-
super();
|
|
681
|
-
this.record = record;
|
|
682
|
-
this.getInjected = injector.get.bind(injector);
|
|
712
|
+
return arrayOfOptions.map(EntityProp.create);
|
|
683
713
|
}
|
|
684
|
-
}
|
|
685
|
-
function isFalsyValue(defaultValue) {
|
|
686
|
-
return [0, '', false].indexOf(defaultValue) > -1;
|
|
687
714
|
}
|
|
688
715
|
|
|
689
716
|
class ToolbarActionList extends ActionList {
|
|
@@ -738,9 +765,9 @@ class ExtensionsService {
|
|
|
738
765
|
this.editFormProps = new EditFormPropsFactory();
|
|
739
766
|
}
|
|
740
767
|
}
|
|
741
|
-
ExtensionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
742
|
-
ExtensionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
743
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
768
|
+
ExtensionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: ExtensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
769
|
+
ExtensionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: ExtensionsService, providedIn: 'root' });
|
|
770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: ExtensionsService, decorators: [{
|
|
744
771
|
type: Injectable,
|
|
745
772
|
args: [{
|
|
746
773
|
providedIn: 'root',
|
|
@@ -766,9 +793,9 @@ class PropDataDirective extends PropData {
|
|
|
766
793
|
this.vcRef.clear();
|
|
767
794
|
}
|
|
768
795
|
}
|
|
769
|
-
PropDataDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
770
|
-
PropDataDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
771
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
796
|
+
PropDataDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PropDataDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
797
|
+
PropDataDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: PropDataDirective, selector: "[abpPropData]", inputs: { propList: ["abpPropDataFromList", "propList"], record: ["abpPropDataWithRecord", "record"], index: ["abpPropDataAtIndex", "index"] }, exportAs: ["abpPropData"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PropDataDirective, decorators: [{
|
|
772
799
|
type: Directive,
|
|
773
800
|
args: [{
|
|
774
801
|
exportAs: 'abpPropData',
|
|
@@ -796,9 +823,17 @@ class ExtensibleFormComponent {
|
|
|
796
823
|
}
|
|
797
824
|
set selectedRecord(record) {
|
|
798
825
|
const type = !record || JSON.stringify(record) === '{}' ? 'create' : 'edit';
|
|
799
|
-
|
|
826
|
+
const propList = this.extensions[`${type}FormProps`].get(this.identifier).props;
|
|
827
|
+
this.groupedPropList = this.createGroupedList(propList);
|
|
800
828
|
this.record = record;
|
|
801
829
|
}
|
|
830
|
+
createGroupedList(propList) {
|
|
831
|
+
const groupedFormPropList = new GroupedFormPropList();
|
|
832
|
+
propList.forEach(item => {
|
|
833
|
+
groupedFormPropList.addItem(item.value);
|
|
834
|
+
});
|
|
835
|
+
return groupedFormPropList;
|
|
836
|
+
}
|
|
802
837
|
get form() {
|
|
803
838
|
return (this.container ? this.container.control : { controls: {} });
|
|
804
839
|
}
|
|
@@ -806,15 +841,15 @@ class ExtensibleFormComponent {
|
|
|
806
841
|
return (this.form.controls.extraProperties || { controls: {} });
|
|
807
842
|
}
|
|
808
843
|
}
|
|
809
|
-
ExtensibleFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
810
|
-
ExtensibleFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
844
|
+
ExtensibleFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: ExtensibleFormComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TrackByService }, { token: i2.ControlContainer }, { token: ExtensionsService }, { token: EXTENSIONS_IDENTIFIER }], target: i0.ɵɵFactoryTarget.Component });
|
|
845
|
+
ExtensibleFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: { selectedRecord: "selectedRecord" }, viewQueries: [{ propertyName: "formProps", predicate: ExtensibleFormPropComponent, descendants: true }], exportAs: ["abpExtensibleForm"], ngImport: i0, template: "<ng-container *ngIf=\"form\">\r\n\r\n <ng-container *ngFor=\"let groupedProp of groupedPropList.items\">\r\n <ng-container *abpPropData=\"let data; fromList: groupedProp.formPropList; withRecord: record\">\r\n\r\n <div *ngIf=\"groupedProp.group?.className; else withoutClassName\"\r\n [class]=\"groupedProp.group?.className\" [attr.data-name]=\"groupedProp.group?.className\">\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </div>\r\n\r\n <ng-template #withoutClassName>\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n\r\n </ng-container>\r\n</ng-container>\r\n\r\n\r\n<ng-template let-groupedProp=\"groupedProp\" let-data=\"data\" #propListTemplate>\r\n <ng-container *ngFor=\"let prop of groupedProp.formPropList; let first = first; trackBy: track.by('name')\">\r\n <ng-container *ngIf=\"prop.visible(data)\">\r\n <ng-container\r\n [formGroupName]=\"extraPropertiesKey\"\r\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\r\n >\r\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"\r\n [class]=\"prop.className\">\r\n </abp-extensible-form-prop>\r\n </ng-container>\r\n\r\n <ng-template #tempDefault>\r\n <abp-extensible-form-prop\r\n [class]=\"prop.className\"\r\n *ngIf=\"form.get(prop.name)\"\r\n [prop]=\"prop\"\r\n [data]=\"data\"\r\n [first]=\"first\"\r\n ></abp-extensible-form-prop>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: ["data", "prop", "first"] }, { kind: "directive", type: PropDataDirective, selector: "[abpPropData]", inputs: ["abpPropDataFromList", "abpPropDataWithRecord", "abpPropDataAtIndex"], exportAs: ["abpPropData"] }], viewProviders: [
|
|
811
846
|
{
|
|
812
847
|
provide: ControlContainer,
|
|
813
848
|
useFactory: selfFactory,
|
|
814
849
|
deps: [[new Optional(), new SkipSelf(), ControlContainer]],
|
|
815
850
|
},
|
|
816
851
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: ExtensibleFormComponent, decorators: [{
|
|
818
853
|
type: Component,
|
|
819
854
|
args: [{ exportAs: 'abpExtensibleForm', selector: 'abp-extensible-form', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
|
|
820
855
|
{
|
|
@@ -822,9 +857,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
822
857
|
useFactory: selfFactory,
|
|
823
858
|
deps: [[new Optional(), new SkipSelf(), ControlContainer]],
|
|
824
859
|
},
|
|
825
|
-
], template: "<ng-container *ngIf=\"form\">\r\n <ng-container *abpPropData=\"let data; fromList:
|
|
860
|
+
], template: "<ng-container *ngIf=\"form\">\r\n\r\n <ng-container *ngFor=\"let groupedProp of groupedPropList.items\">\r\n <ng-container *abpPropData=\"let data; fromList: groupedProp.formPropList; withRecord: record\">\r\n\r\n <div *ngIf=\"groupedProp.group?.className; else withoutClassName\"\r\n [class]=\"groupedProp.group?.className\" [attr.data-name]=\"groupedProp.group?.className\">\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </div>\r\n\r\n <ng-template #withoutClassName>\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n\r\n </ng-container>\r\n</ng-container>\r\n\r\n\r\n<ng-template let-groupedProp=\"groupedProp\" let-data=\"data\" #propListTemplate>\r\n <ng-container *ngFor=\"let prop of groupedProp.formPropList; let first = first; trackBy: track.by('name')\">\r\n <ng-container *ngIf=\"prop.visible(data)\">\r\n <ng-container\r\n [formGroupName]=\"extraPropertiesKey\"\r\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\r\n >\r\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"\r\n [class]=\"prop.className\">\r\n </abp-extensible-form-prop>\r\n </ng-container>\r\n\r\n <ng-template #tempDefault>\r\n <abp-extensible-form-prop\r\n [class]=\"prop.className\"\r\n *ngIf=\"form.get(prop.name)\"\r\n [prop]=\"prop\"\r\n [data]=\"data\"\r\n [first]=\"first\"\r\n ></abp-extensible-form-prop>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n" }]
|
|
826
861
|
}], ctorParameters: function () {
|
|
827
|
-
return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i2
|
|
862
|
+
return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i2.ControlContainer }, { type: ExtensionsService }, { type: undefined, decorators: [{
|
|
828
863
|
type: Inject,
|
|
829
864
|
args: [EXTENSIONS_IDENTIFIER]
|
|
830
865
|
}] }];
|
|
@@ -847,9 +882,9 @@ class AbstractActionsComponent extends ActionData {
|
|
|
847
882
|
this.actionList = extensions[type].get(name).actions;
|
|
848
883
|
}
|
|
849
884
|
}
|
|
850
|
-
AbstractActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
851
|
-
AbstractActionsComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
885
|
+
AbstractActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: AbstractActionsComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
886
|
+
AbstractActionsComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: AbstractActionsComponent, inputs: { record: "record" }, usesInheritance: true, ngImport: i0 });
|
|
887
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: AbstractActionsComponent, decorators: [{
|
|
853
888
|
type: Directive
|
|
854
889
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { record: [{
|
|
855
890
|
type: Input
|
|
@@ -863,14 +898,14 @@ class GridActionsComponent extends AbstractActionsComponent {
|
|
|
863
898
|
this.trackByFn = (_, item) => item.text;
|
|
864
899
|
}
|
|
865
900
|
}
|
|
866
|
-
GridActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
867
|
-
GridActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
901
|
+
GridActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: GridActionsComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
902
|
+
GridActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: GridActionsComponent, selector: "abp-grid-actions", inputs: { icon: "icon", index: "index", text: "text" }, providers: [
|
|
868
903
|
{
|
|
869
904
|
provide: EXTENSIONS_ACTION_TYPE,
|
|
870
905
|
useValue: 'entityActions',
|
|
871
906
|
},
|
|
872
|
-
], exportAs: ["abpGridActions"], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"actionList.length > 1\" 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 <ng-container\r\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-container\r\n *ngIf=\"actionList.length === 1\"\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n></ng-container>\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n <ng-container *ngIf=\"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 </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\r\n <ng-template #ellipsis>\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n class=\"btn btn-primary text-center\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n",
|
|
873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
907
|
+
], exportAs: ["abpGridActions"], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"actionList.length > 1\" 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 <ng-container\r\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-container\r\n *ngIf=\"actionList.length === 1\"\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n></ng-container>\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n <ng-container *ngIf=\"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 </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\r\n <ng-template #ellipsis>\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n class=\"btn btn-primary text-center\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i4$2.EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }, { kind: "directive", type: i4$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i4$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i4$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i4$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
908
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: GridActionsComponent, decorators: [{
|
|
874
909
|
type: Component,
|
|
875
910
|
args: [{ exportAs: 'abpGridActions', selector: 'abp-grid-actions', providers: [
|
|
876
911
|
{
|
|
@@ -939,15 +974,15 @@ class ExtensibleTableComponent {
|
|
|
939
974
|
getContent(prop, data) {
|
|
940
975
|
return prop.valueResolver(data).pipe(map(value => {
|
|
941
976
|
switch (prop.type) {
|
|
942
|
-
case "boolean" /* Boolean */:
|
|
977
|
+
case "boolean" /* ePropType.Boolean */:
|
|
943
978
|
return this.getIcon(value);
|
|
944
|
-
case "date" /* Date */:
|
|
979
|
+
case "date" /* ePropType.Date */:
|
|
945
980
|
return this.getDate(value, getShortDateFormat(this.config));
|
|
946
|
-
case "time" /* Time */:
|
|
981
|
+
case "time" /* ePropType.Time */:
|
|
947
982
|
return this.getDate(value, getShortTimeFormat(this.config));
|
|
948
|
-
case "datetime" /* DateTime */:
|
|
983
|
+
case "datetime" /* ePropType.DateTime */:
|
|
949
984
|
return this.getDate(value, getShortDateShortTimeFormat(this.config));
|
|
950
|
-
case "enum" /* Enum */:
|
|
985
|
+
case "enum" /* ePropType.Enum */:
|
|
951
986
|
return this.getEnum(value, prop.enumList);
|
|
952
987
|
default:
|
|
953
988
|
return value;
|
|
@@ -985,9 +1020,9 @@ class ExtensibleTableComponent {
|
|
|
985
1020
|
});
|
|
986
1021
|
}
|
|
987
1022
|
}
|
|
988
|
-
ExtensibleTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
989
|
-
ExtensibleTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1023
|
+
ExtensibleTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: ExtensibleTableComponent, deps: [{ token: LOCALE_ID }, { token: i1.ConfigStateService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1024
|
+
ExtensibleTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0, template: "<ngx-datatable default [rows]=\"data\" [count]=\"recordsTotal\" [list]=\"list\">\r\n <ngx-datatable-column\r\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0]\"\r\n [width]=\"columnWidths[0]\"\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 <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\r\n <ngx-datatable-column\r\n [width]=\"columnWidths[i + 1] || 200\"\r\n [name]=\"prop.displayName | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\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 *ngIf=\"row['_' + prop.name]?.visible\">\r\n <div\r\n *ngIf=\"!row['_' + prop.name].component; else component\"\r\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\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 </ng-container>\r\n <ng-template #component>\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 </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ng-container>\r\n</ngx-datatable>\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i3.DatatableComponent, selector: "ngx-datatable", inputs: ["selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "loadingIndicator", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "groupExpansionDefault", "selectAllRowsOnPage", "virtualization", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity", "rows", "groupedRows", "groupRowsBy", "columns", "limit", "count", "offset", "targetMarkerTemplate", "selectionType", "rowClass", "selectCheck", "displayCheck", "trackByProp", "treeFromRelation", "treeToRelation"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i3.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i3.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i4$2.NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { kind: "directive", type: i4$2.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "component", type: GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1025
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: ExtensibleTableComponent, decorators: [{
|
|
991
1026
|
type: Component,
|
|
992
1027
|
args: [{ exportAs: 'abpExtensibleTable', selector: 'abp-extensible-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngx-datatable default [rows]=\"data\" [count]=\"recordsTotal\" [list]=\"list\">\r\n <ngx-datatable-column\r\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0]\"\r\n [width]=\"columnWidths[0]\"\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 <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\r\n <ngx-datatable-column\r\n [width]=\"columnWidths[i + 1] || 200\"\r\n [name]=\"prop.displayName | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\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 *ngIf=\"row['_' + prop.name]?.visible\">\r\n <div\r\n *ngIf=\"!row['_' + prop.name].component; else component\"\r\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\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 </ng-container>\r\n <ng-template #component>\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 </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ng-container>\r\n</ngx-datatable>\r\n" }]
|
|
993
1028
|
}], ctorParameters: function () {
|
|
@@ -1033,9 +1068,9 @@ class CreateInjectorPipe {
|
|
|
1033
1068
|
return { get };
|
|
1034
1069
|
}
|
|
1035
1070
|
}
|
|
1036
|
-
CreateInjectorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1037
|
-
CreateInjectorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
1038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1071
|
+
CreateInjectorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: CreateInjectorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1072
|
+
CreateInjectorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: CreateInjectorPipe, name: "createInjector" });
|
|
1073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: CreateInjectorPipe, decorators: [{
|
|
1039
1074
|
type: Pipe,
|
|
1040
1075
|
args: [{
|
|
1041
1076
|
name: 'createInjector',
|
|
@@ -1051,14 +1086,14 @@ class PageToolbarComponent extends AbstractActionsComponent {
|
|
|
1051
1086
|
this.trackByFn = (_, item) => item.action || item.component;
|
|
1052
1087
|
}
|
|
1053
1088
|
}
|
|
1054
|
-
PageToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1055
|
-
PageToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1089
|
+
PageToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PageToolbarComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1090
|
+
PageToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: PageToolbarComponent, selector: "abp-page-toolbar", providers: [
|
|
1056
1091
|
{
|
|
1057
1092
|
provide: EXTENSIONS_ACTION_TYPE,
|
|
1058
1093
|
useValue: 'toolbarActions',
|
|
1059
1094
|
},
|
|
1060
|
-
], exportAs: ["abpPageToolbar"], usesInheritance: true, ngImport: i0, template: "<div class=\"row justify-content-end mx-0\" id=\"AbpContentToolbar\">\r\n <div\r\n class=\"col-auto px-1 pt-0 pt-md-2\"\r\n [class.pe-0]=\"last\"\r\n *ngFor=\"let action of actionList; trackBy: trackByFn; let last = last\"\r\n >\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <ng-container *abpPermission=\"action.permission;runChangeDetection: false\">\r\n <ng-container *ngIf=\"action.component as component; else button\">\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: record | createInjector: action:this\"\r\n ></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #button>\r\n <button\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [ngClass]=\"action.btnClass ? action.btnClass : defaultBtnClass\"\r\n >\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n {{ action.text | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n",
|
|
1061
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1095
|
+
], exportAs: ["abpPageToolbar"], usesInheritance: true, ngImport: i0, template: "<div class=\"row justify-content-end mx-0\" id=\"AbpContentToolbar\">\r\n <div\r\n class=\"col-auto px-1 pt-0 pt-md-2\"\r\n [class.pe-0]=\"last\"\r\n *ngFor=\"let action of actionList; trackBy: trackByFn; let last = last\"\r\n >\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <ng-container *abpPermission=\"action.permission;runChangeDetection: false\">\r\n <ng-container *ngIf=\"action.component as component; else button\">\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: record | createInjector: action:this\"\r\n ></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #button>\r\n <button\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [ngClass]=\"action.btnClass ? action.btnClass : defaultBtnClass\"\r\n >\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n {{ action.text | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: CreateInjectorPipe, name: "createInjector" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PageToolbarComponent, decorators: [{
|
|
1062
1097
|
type: Component,
|
|
1063
1098
|
args: [{ exportAs: 'abpPageToolbar', selector: 'abp-page-toolbar', providers: [
|
|
1064
1099
|
{
|
|
@@ -1076,8 +1111,8 @@ const EXTENSIBLE_FORM_VIEW_PROVIDER = { provide: ControlContainer, useExisting:
|
|
|
1076
1111
|
|
|
1077
1112
|
class BaseUiExtensionsModule {
|
|
1078
1113
|
}
|
|
1079
|
-
BaseUiExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1080
|
-
BaseUiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1114
|
+
BaseUiExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaseUiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1115
|
+
BaseUiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaseUiExtensionsModule, declarations: [DateTimePickerComponent,
|
|
1081
1116
|
PageToolbarComponent,
|
|
1082
1117
|
GridActionsComponent,
|
|
1083
1118
|
ExtensibleFormPropComponent,
|
|
@@ -1099,16 +1134,14 @@ BaseUiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
|
|
|
1099
1134
|
PropDataDirective,
|
|
1100
1135
|
DisabledDirective,
|
|
1101
1136
|
CreateInjectorPipe] });
|
|
1102
|
-
BaseUiExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
]] });
|
|
1111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: BaseUiExtensionsModule, decorators: [{
|
|
1137
|
+
BaseUiExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaseUiExtensionsModule, imports: [CoreModule,
|
|
1138
|
+
ThemeSharedModule,
|
|
1139
|
+
NgxValidateCoreModule,
|
|
1140
|
+
NgbDatepickerModule,
|
|
1141
|
+
NgbDropdownModule,
|
|
1142
|
+
NgbTimepickerModule,
|
|
1143
|
+
NgbTypeaheadModule] });
|
|
1144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaseUiExtensionsModule, decorators: [{
|
|
1112
1145
|
type: NgModule,
|
|
1113
1146
|
args: [{
|
|
1114
1147
|
exports: [
|
|
@@ -1145,10 +1178,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImpor
|
|
|
1145
1178
|
}] });
|
|
1146
1179
|
class UiExtensionsModule {
|
|
1147
1180
|
}
|
|
1148
|
-
UiExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1149
|
-
UiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1150
|
-
UiExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1181
|
+
UiExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1182
|
+
UiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule], exports: [BaseUiExtensionsModule] });
|
|
1183
|
+
UiExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule, BaseUiExtensionsModule] });
|
|
1184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UiExtensionsModule, decorators: [{
|
|
1152
1185
|
type: NgModule,
|
|
1153
1186
|
args: [{
|
|
1154
1187
|
exports: [BaseUiExtensionsModule],
|
|
@@ -1168,8 +1201,8 @@ function mergeWithDefaultActions(extension, defaultActions, ...contributors) {
|
|
|
1168
1201
|
function generateFormFromProps(data) {
|
|
1169
1202
|
const extensions = data.getInjected(ExtensionsService);
|
|
1170
1203
|
const identifier = data.getInjected(EXTENSIONS_IDENTIFIER);
|
|
1171
|
-
const form = new
|
|
1172
|
-
const extraForm = new
|
|
1204
|
+
const form = new UntypedFormGroup({});
|
|
1205
|
+
const extraForm = new UntypedFormGroup({});
|
|
1173
1206
|
form.addControl(EXTRA_PROPERTIES_KEY, extraForm);
|
|
1174
1207
|
const record = data.record || {};
|
|
1175
1208
|
const type = JSON.stringify(record) === '{}' ? 'create' : 'edit';
|
|
@@ -1184,15 +1217,15 @@ function generateFormFromProps(data) {
|
|
|
1184
1217
|
if (value) {
|
|
1185
1218
|
let adapter;
|
|
1186
1219
|
switch (prop.type) {
|
|
1187
|
-
case "date" /* Date */:
|
|
1220
|
+
case "date" /* ePropType.Date */:
|
|
1188
1221
|
adapter = new DateAdapter();
|
|
1189
1222
|
value = adapter.toModel(adapter.fromModel(value));
|
|
1190
1223
|
break;
|
|
1191
|
-
case "time" /* Time */:
|
|
1224
|
+
case "time" /* ePropType.Time */:
|
|
1192
1225
|
adapter = new TimeAdapter();
|
|
1193
1226
|
value = adapter.toModel(adapter.fromModel(value));
|
|
1194
1227
|
break;
|
|
1195
|
-
case "datetime" /* DateTime */:
|
|
1228
|
+
case "datetime" /* ePropType.DateTime */:
|
|
1196
1229
|
adapter = new DateTimeAdapter();
|
|
1197
1230
|
value = adapter.toModel(adapter.fromModel(value));
|
|
1198
1231
|
break;
|
|
@@ -1200,7 +1233,7 @@ function generateFormFromProps(data) {
|
|
|
1200
1233
|
break;
|
|
1201
1234
|
}
|
|
1202
1235
|
}
|
|
1203
|
-
const formControl = new
|
|
1236
|
+
const formControl = new UntypedFormControl(value, {
|
|
1204
1237
|
asyncValidators: prop.asyncValidators(data),
|
|
1205
1238
|
validators: prop.validators(data),
|
|
1206
1239
|
});
|
|
@@ -1343,8 +1376,8 @@ function createPropertiesToContributorsMapper(generateDisplayName, resource, enu
|
|
|
1343
1376
|
const displayName = generateDN(property.displayName, { name, resource });
|
|
1344
1377
|
if (property.ui.onTable.isVisible) {
|
|
1345
1378
|
const sortable = Boolean(property.ui.onTable.isSortable);
|
|
1346
|
-
const columnWidth = type === "boolean" /* Boolean */ ? 150 : 250;
|
|
1347
|
-
const valueResolver = type === "enum" /* Enum */
|
|
1379
|
+
const columnWidth = type === "boolean" /* ePropType.Boolean */ ? 150 : 250;
|
|
1380
|
+
const valueResolver = type === "enum" /* ePropType.Enum */
|
|
1348
1381
|
? createEnumValueResolver(property.type, enums[property.type], propName)
|
|
1349
1382
|
: createExtraPropertyValueResolver(propName);
|
|
1350
1383
|
const entityProp = new EntityProp({
|
|
@@ -1365,9 +1398,9 @@ function createPropertiesToContributorsMapper(generateDisplayName, resource, enu
|
|
|
1365
1398
|
const defaultValue = property.defaultValue;
|
|
1366
1399
|
const validators = () => getValidatorsFromProperty(property);
|
|
1367
1400
|
let options;
|
|
1368
|
-
if (type === "enum" /* Enum */)
|
|
1401
|
+
if (type === "enum" /* ePropType.Enum */)
|
|
1369
1402
|
options = createEnumOptions(propName, enums[property.type || '']);
|
|
1370
|
-
else if (type === "typeahead" /* Typeahead */)
|
|
1403
|
+
else if (type === "typeahead" /* ePropType.Typeahead */)
|
|
1371
1404
|
options = createTypeaheadOptions(lookup);
|
|
1372
1405
|
const formProp = new FormProp({
|
|
1373
1406
|
type,
|