wt-front-shared 1.0.38 → 1.0.40
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/lib/core/+state/router/router.effects.mjs +8 -2
- package/esm2020/lib/core/+state/router/router.facade.mjs +2 -1
- package/esm2020/lib/core/+state/users/users.facade.mjs +1 -2
- package/esm2020/lib/core/components/auto-form/components/form-field-file/form-field-file.component.mjs +1 -8
- package/esm2020/lib/core/components/auto-form/components/form-field-select/form-field-select.component.mjs +13 -4
- package/esm2020/lib/core/components/auto-form/containers/auto-form-main/auto-form-main.component.mjs +54 -25
- package/esm2020/lib/core/components/auto-form/containers/form-field/form-field.component.mjs +5 -3
- package/esm2020/lib/core/components/auto-form/containers/publish-messages/publish-messages.component.mjs +27 -14
- package/esm2020/lib/core/components/auto-form/interfaces/auto-form.interfaces.mjs +2 -0
- package/esm2020/lib/core/components/index.mjs +2 -1
- package/esm2020/lib/core/constants/form-errors.const.mjs +2 -2
- package/esm2020/lib/core/models/forms/form-value.mjs +1 -1
- package/esm2020/lib/core/models/forms/image-form-value.mjs +1 -1
- package/esm2020/lib/core/services/router/router.service.mjs +2 -2
- package/esm2020/lib/core/services/users/users.service.mjs +1 -2
- package/esm2020/public-api.mjs +2 -2
- package/fesm2015/wt-front-shared.mjs +97 -46
- package/fesm2015/wt-front-shared.mjs.map +1 -1
- package/fesm2020/wt-front-shared.mjs +95 -44
- package/fesm2020/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/router/router.effects.d.ts +1 -1
- package/lib/core/components/auto-form/components/form-field-select/form-field-select.component.d.ts +5 -3
- package/lib/core/components/auto-form/containers/auto-form-main/auto-form-main.component.d.ts +19 -22
- package/lib/core/components/auto-form/containers/form-field/form-field.component.d.ts +4 -2
- package/lib/core/components/auto-form/containers/publish-messages/publish-messages.component.d.ts +10 -6
- package/lib/core/components/auto-form/interfaces/auto-form.interfaces.d.ts +18 -0
- package/lib/core/components/index.d.ts +1 -0
- package/lib/core/models/forms/form-value.d.ts +1 -1
- package/lib/core/models/forms/image-form-value.d.ts +1 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, NgModule, PLATFORM_ID, Injectable, Inject, Component, ChangeDetectionStrategy, Injector, Input, ViewChild, EventEmitter, Output, ElementRef, Directive, Optional, ContentChild, forwardRef, Pipe } from '@angular/core';
|
|
3
3
|
import * as i1$3 from '@angular/common';
|
|
4
4
|
import { isPlatformBrowser, isPlatformServer, APP_BASE_HREF, CommonModule } from '@angular/common';
|
|
5
|
-
import { BehaviorSubject, of, throwError, ReplaySubject, Subject, EMPTY, merge, fromEvent } from 'rxjs';
|
|
5
|
+
import { BehaviorSubject, of, throwError, ReplaySubject, Subject, EMPTY, Subscription, merge, fromEvent } from 'rxjs';
|
|
6
6
|
import * as i3 from '@angular/router';
|
|
7
7
|
import { RouterModule } from '@angular/router';
|
|
8
8
|
import * as i1$2 from '@ngrx/effects';
|
|
@@ -229,7 +229,7 @@ const PasswordRules = {
|
|
|
229
229
|
};
|
|
230
230
|
|
|
231
231
|
const SharedFormErrors = {
|
|
232
|
-
REQUIRE: '
|
|
232
|
+
REQUIRE: 'Поле :field является обязательным',
|
|
233
233
|
FORM_SAVE_ERROR: "Произошла ошибка при сохранении формы, проверьте все еще. Если ошибка повторяется напишите в службу поддержки <a href=\"mailto:support@world-travel.uz\">support@world-travel.uz</a>",
|
|
234
234
|
PATTERN: "Не коректное значение",
|
|
235
235
|
};
|
|
@@ -2354,7 +2354,6 @@ class UsersService extends BaseAPIService {
|
|
|
2354
2354
|
this.config = config;
|
|
2355
2355
|
this.requestsFacade = requestsFacade;
|
|
2356
2356
|
this.formsFacade = formsFacade;
|
|
2357
|
-
console.log("CORE_CONFIG", this.config);
|
|
2358
2357
|
this.api = new UsersApi(this.config.apiUrl);
|
|
2359
2358
|
}
|
|
2360
2359
|
loginSend(config) {
|
|
@@ -2476,7 +2475,13 @@ class RouterEffects {
|
|
|
2476
2475
|
const path = this.preparePath(payload.path);
|
|
2477
2476
|
let extras;
|
|
2478
2477
|
if (payload.extras) {
|
|
2479
|
-
extras =
|
|
2478
|
+
extras = {};
|
|
2479
|
+
if (!!payload.extras.queryParams) {
|
|
2480
|
+
extras.queryParams = payload.extras.queryParams;
|
|
2481
|
+
}
|
|
2482
|
+
if (!!payload.extras.fragment) {
|
|
2483
|
+
extras.fragment = payload.extras.fragment;
|
|
2484
|
+
}
|
|
2480
2485
|
}
|
|
2481
2486
|
this.router.navigate(path, extras)
|
|
2482
2487
|
.then(data => {
|
|
@@ -2518,7 +2523,7 @@ class RouterService {
|
|
|
2518
2523
|
this.store = store;
|
|
2519
2524
|
}
|
|
2520
2525
|
goTo(src, extras) {
|
|
2521
|
-
console.info('[ navigation ]', src);
|
|
2526
|
+
console.info('[ router.service.navigation ]', src, extras);
|
|
2522
2527
|
this.store.dispatch(Go({ payload: { path: [src], extras } }));
|
|
2523
2528
|
}
|
|
2524
2529
|
}
|
|
@@ -2826,7 +2831,6 @@ class UsersFacade {
|
|
|
2826
2831
|
this.getUser$ = this.store.pipe(select(usersQuery.getUser));
|
|
2827
2832
|
}
|
|
2828
2833
|
testMethod() {
|
|
2829
|
-
console.log('testMethod');
|
|
2830
2834
|
}
|
|
2831
2835
|
loadAll() {
|
|
2832
2836
|
this.store.dispatch(LoadUsers());
|
|
@@ -5631,6 +5635,7 @@ class RouterFacade {
|
|
|
5631
5635
|
this.store = store;
|
|
5632
5636
|
}
|
|
5633
5637
|
goTo(path, extras = null) {
|
|
5638
|
+
console.info('[ router.facade.navigation ]', path, extras);
|
|
5634
5639
|
return this.store.dispatch(Go({ payload: { path, extras } }));
|
|
5635
5640
|
}
|
|
5636
5641
|
}
|
|
@@ -6954,6 +6959,13 @@ class FormFieldSelectComponent {
|
|
|
6954
6959
|
this.subscribeToFormChanges();
|
|
6955
6960
|
this.placeholder = this.fieldData.options.subscribeToFormChanges.emptyTitle;
|
|
6956
6961
|
}
|
|
6962
|
+
if (this.autoCompleteFields) {
|
|
6963
|
+
const findField = this.autoCompleteFields.find(item => item.field === this.fieldData.field);
|
|
6964
|
+
if (findField === null || findField === void 0 ? void 0 : findField.field) {
|
|
6965
|
+
this.form.get(findField.field).setValue(findField.value);
|
|
6966
|
+
this.form.get(findField.field).disable();
|
|
6967
|
+
}
|
|
6968
|
+
}
|
|
6957
6969
|
this.subscribeToSearchChange();
|
|
6958
6970
|
}
|
|
6959
6971
|
ngOnDestroy() {
|
|
@@ -7103,7 +7115,7 @@ class FormFieldSelectComponent {
|
|
|
7103
7115
|
}
|
|
7104
7116
|
}
|
|
7105
7117
|
FormFieldSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormFieldSelectComponent, deps: [{ token: i1.Store }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7106
|
-
FormFieldSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: { fieldData: "fieldData", form: "form" }, usesOnChanges: true, ngImport: i0, template: "<div [formGroup]=\"form\">\n <mat-form-field appearance=\"outline\"\n class=\"width100\">\n <mat-label>{{fieldData.title}}</mat-label>\n <mat-select [required]=\"fieldData.validators?.includes('required')\"\n [multiple]=\"fieldData.options.multiple\"\n [formControlName]=\"fieldData.field\">\n <mat-option *ngIf=\"fieldData.options.innerSearch\">\n <ngx-mat-select-search\n placeholderLabel=\"\u041F\u043E\u0438\u0441\u043A...\"\n [formControl]=\"searchCtrl\"></ngx-mat-select-search>\n </mat-option>\n <mat-option *ngIf=\"!fieldData.validators?.includes('required')\" value=\"0\">\n -----\n </mat-option>\n <ng-container *ngIf=\"!fieldData.options.loading\">\n <ng-container *ngIf=\"options.length\">\n <mat-option *ngFor=\"let item of options\" [value]=\"item.id\">\n {{item.name || item['title']}}\n </mat-option>\n </ng-container>\n <ng-container *ngIf=\"!options.length\">\n <mat-option>\n \u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442\n </mat-option>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"fieldData.options.loading\">\n <mat-option>\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430....</mat-option>\n </ng-container>\n </mat-select>\n <ng-container *ngIf=\"!options.length && placeholder\">\n <div @appearOpacity class=\"form-select-placeholder\">{{placeholder}}</div>\n </ng-container>\n </mat-form-field>\n</div>\n", styles: [".form-select-placeholder{position:absolute;margin-left:81px;margin-top:-3px;opacity:.8}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }], animations: [appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7118
|
+
FormFieldSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: { fieldData: "fieldData", form: "form", autoCompleteFields: "autoCompleteFields" }, usesOnChanges: true, ngImport: i0, template: "<div [formGroup]=\"form\">\n <mat-form-field appearance=\"outline\"\n class=\"width100\">\n <mat-label>{{fieldData.title}}</mat-label>\n <mat-select [required]=\"fieldData.validators?.includes('required')\"\n [multiple]=\"fieldData.options.multiple\"\n [formControlName]=\"fieldData.field\">\n <mat-option *ngIf=\"fieldData.options.innerSearch\">\n <ngx-mat-select-search\n placeholderLabel=\"\u041F\u043E\u0438\u0441\u043A...\"\n [formControl]=\"searchCtrl\"></ngx-mat-select-search>\n </mat-option>\n <mat-option *ngIf=\"!fieldData.validators?.includes('required')\" value=\"0\">\n -----\n </mat-option>\n <ng-container *ngIf=\"!fieldData.options.loading\">\n <ng-container *ngIf=\"options.length\">\n <mat-option *ngFor=\"let item of options\" [value]=\"item.id\">\n {{item.name || item['title']}}\n </mat-option>\n </ng-container>\n <ng-container *ngIf=\"!options.length\">\n <mat-option>\n \u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442\n </mat-option>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"fieldData.options.loading\">\n <mat-option>\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430....</mat-option>\n </ng-container>\n </mat-select>\n <ng-container *ngIf=\"!options.length && placeholder\">\n <div @appearOpacity class=\"form-select-placeholder\">{{placeholder}}</div>\n </ng-container>\n </mat-form-field>\n</div>\n", styles: [".form-select-placeholder{position:absolute;margin-left:81px;margin-top:-3px;opacity:.8}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }], animations: [appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7107
7119
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormFieldSelectComponent, decorators: [{
|
|
7108
7120
|
type: Component,
|
|
7109
7121
|
args: [{ selector: 'shared-form-field-select', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearOpacity], template: "<div [formGroup]=\"form\">\n <mat-form-field appearance=\"outline\"\n class=\"width100\">\n <mat-label>{{fieldData.title}}</mat-label>\n <mat-select [required]=\"fieldData.validators?.includes('required')\"\n [multiple]=\"fieldData.options.multiple\"\n [formControlName]=\"fieldData.field\">\n <mat-option *ngIf=\"fieldData.options.innerSearch\">\n <ngx-mat-select-search\n placeholderLabel=\"\u041F\u043E\u0438\u0441\u043A...\"\n [formControl]=\"searchCtrl\"></ngx-mat-select-search>\n </mat-option>\n <mat-option *ngIf=\"!fieldData.validators?.includes('required')\" value=\"0\">\n -----\n </mat-option>\n <ng-container *ngIf=\"!fieldData.options.loading\">\n <ng-container *ngIf=\"options.length\">\n <mat-option *ngFor=\"let item of options\" [value]=\"item.id\">\n {{item.name || item['title']}}\n </mat-option>\n </ng-container>\n <ng-container *ngIf=\"!options.length\">\n <mat-option>\n \u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442\n </mat-option>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"fieldData.options.loading\">\n <mat-option>\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430....</mat-option>\n </ng-container>\n </mat-select>\n <ng-container *ngIf=\"!options.length && placeholder\">\n <div @appearOpacity class=\"form-select-placeholder\">{{placeholder}}</div>\n </ng-container>\n </mat-form-field>\n</div>\n", styles: [".form-select-placeholder{position:absolute;margin-left:81px;margin-top:-3px;opacity:.8}\n"] }]
|
|
@@ -7111,6 +7123,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7111
7123
|
type: Input
|
|
7112
7124
|
}], form: [{
|
|
7113
7125
|
type: Input
|
|
7126
|
+
}], autoCompleteFields: [{
|
|
7127
|
+
type: Input
|
|
7114
7128
|
}] } });
|
|
7115
7129
|
|
|
7116
7130
|
class FormFieldSlideToggleComponent {
|
|
@@ -7474,20 +7488,17 @@ class FormFieldFileComponent {
|
|
|
7474
7488
|
untilComponentDestroyed(this)
|
|
7475
7489
|
)
|
|
7476
7490
|
.subscribe(() => {
|
|
7477
|
-
console.log("this.currentPristineValue", this.currentPristineValue, this.form.pristine);
|
|
7478
7491
|
if (!this.currentPristineValue && this.form.pristine) {
|
|
7479
|
-
console.log("ngOnInit");
|
|
7480
7492
|
this.clearFile();
|
|
7481
7493
|
}
|
|
7482
7494
|
this.currentPristineValue = this.form.pristine;
|
|
7483
7495
|
});*/
|
|
7484
7496
|
}
|
|
7485
7497
|
ngOnChanges(changes) {
|
|
7486
|
-
var _a, _b
|
|
7498
|
+
var _a, _b;
|
|
7487
7499
|
const field = this.fieldData.field;
|
|
7488
7500
|
if (field && this.form) {
|
|
7489
|
-
|
|
7490
|
-
this.imageVersions = ((_c = (_b = this.form.get(field)) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.versions) || "";
|
|
7501
|
+
this.imageVersions = ((_b = (_a = this.form.get(field)) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.versions) || "";
|
|
7491
7502
|
if (this.imageVersions) {
|
|
7492
7503
|
this.inputStatus = "0";
|
|
7493
7504
|
}
|
|
@@ -7517,14 +7528,12 @@ class FormFieldFileComponent {
|
|
|
7517
7528
|
}
|
|
7518
7529
|
deleteImage() {
|
|
7519
7530
|
var _a;
|
|
7520
|
-
console.log("deleteImage");
|
|
7521
7531
|
const id = (_a = this.form.get("id")) === null || _a === void 0 ? void 0 : _a.value;
|
|
7522
7532
|
const field = this.fieldData.field;
|
|
7523
7533
|
if (id) {
|
|
7524
7534
|
this.dialogService.openDeleteDialog()
|
|
7525
7535
|
.pipe(untilComponentDestroyed(this))
|
|
7526
7536
|
.subscribe((result) => {
|
|
7527
|
-
console.log("result");
|
|
7528
7537
|
if (result) {
|
|
7529
7538
|
if (!this.imageSource) {
|
|
7530
7539
|
this.initRequest();
|
|
@@ -7545,13 +7554,11 @@ class FormFieldFileComponent {
|
|
|
7545
7554
|
this.request$
|
|
7546
7555
|
.pipe(filter(request => request.status === this.requestStatuses.LOADED), take(1), untilComponentDestroyed(this))
|
|
7547
7556
|
.subscribe((data) => {
|
|
7548
|
-
console.log("data", data);
|
|
7549
7557
|
this.clearFile();
|
|
7550
7558
|
});
|
|
7551
7559
|
}
|
|
7552
7560
|
}
|
|
7553
7561
|
clearFile() {
|
|
7554
|
-
console.log("clearFile");
|
|
7555
7562
|
this.input.nativeElement.value = "";
|
|
7556
7563
|
this.imageSource = "";
|
|
7557
7564
|
this.imageVersions = null;
|
|
@@ -8289,10 +8296,10 @@ class FormFieldComponent {
|
|
|
8289
8296
|
}
|
|
8290
8297
|
}
|
|
8291
8298
|
FormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormFieldComponent, deps: [{ token: CORE_CONFIG }, { token: AuthenticationService }, { token: CoreFacade }, { token: i0.ChangeDetectorRef }, { token: i1$4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
8292
|
-
FormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FormFieldComponent, selector: "shared-form-field", inputs: { fieldData: "fieldData", itemId: "itemId", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", publicationMessages: "publicationMessages", entityTypeUserRoleRights: "entityTypeUserRoleRights" }, outputs: { eventUpdateForm: "eventUpdateForm", eventSendAction: "eventSendAction" }, ngImport: i0, template: "<div *ngIf=\"!fieldData.options.notEditable && !fieldData.options.hide\"\n fxLayout=\"column\"\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle\n }\">\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</label>\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{form.get(fieldData.field).value?.length || 0}}</b>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</label>\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{fieldData.description}}\n </div>\n <ckeditor [formControlName]=\"fieldData.field\"\n [config]=\"ckeConfig\"></ckeditor>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{form.get(fieldData.field).value?.length || 0}}</b>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n <shared-form-field-files\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <shared-form-field-input\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{action.title}}</div>\n </ng-container>\n </div>\n\n <shared-form-field-spinner *ngIf=\"fieldData.options.loading\"></shared-form-field-spinner>\n\n <ng-container *ngIf=\"fieldData.options.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options.hint)\">help_outline</mat-icon>\n </ng-container>\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl.touched && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:rgba(0,156,229,.2588235294)}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px}.hint-icons{position:absolute;right:0;margin-top:9px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FormFieldErrorComponent, selector: "shared-form-field-error", inputs: ["fieldData", "form", "errorMessageTexts"] }, { kind: "component", type: FormFieldPublishErrorComponent, selector: "shared-form-field-publish-error", inputs: ["fieldData", "form", "entity", "errorMessageTexts"] }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i6.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: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i9.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11.CKEditorComponent, selector: "ckeditor", inputs: ["editorUrl", "tagName", "type", "data", "readOnly", "config"], outputs: ["namespaceLoaded", "ready", "dataReady", "change", "dataChange", "dragStart", "dragEnd", "drop", "fileUploadResponse", "fileUploadRequest", "focus", "paste", "afterPaste", "blur"] }, { kind: "component", type: FormFieldSpinnerComponent, selector: "shared-form-field-spinner" }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["fieldData", "form"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["fieldData", "form"] }, { kind: "component", type: FormFieldFileComponent, selector: "shared-form-field-file", inputs: ["fieldData", "form", "entity"] }, { kind: "component", type: FormFieldFilesComponent, selector: "shared-form-field-files", inputs: ["fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldTagsComponent, selector: "shared-form-field-tags", inputs: ["fieldData", "form", "itemId"] }], animations: [appearFromLeft], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8299
|
+
FormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FormFieldComponent, selector: "shared-form-field", inputs: { fieldData: "fieldData", itemId: "itemId", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", publicationMessages: "publicationMessages", entityTypeUserRoleRights: "entityTypeUserRoleRights", autoCompleteFields: "autoCompleteFields" }, outputs: { eventUpdateForm: "eventUpdateForm", eventSendAction: "eventSendAction" }, ngImport: i0, template: "<div *ngIf=\"!fieldData.options.notEditable && !fieldData.options.hide\"\n fxLayout=\"column\"\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle\n }\">\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</label>\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{form.get(fieldData.field).value?.length || 0}}</b>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</label>\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{fieldData.description}}\n </div>\n <ckeditor [formControlName]=\"fieldData.field\"\n [config]=\"ckeConfig\"></ckeditor>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{form.get(fieldData.field).value?.length || 0}}</b>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n <shared-form-field-files\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <shared-form-field-input\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{action.title}}</div>\n </ng-container>\n </div>\n\n <shared-form-field-spinner *ngIf=\"fieldData.options.loading\"></shared-form-field-spinner>\n\n <ng-container *ngIf=\"fieldData.options.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options.hint)\">help_outline</mat-icon>\n </ng-container>\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl.touched && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:rgba(0,156,229,.2588235294)}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px}.hint-icons{position:absolute;right:0;margin-top:9px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FormFieldErrorComponent, selector: "shared-form-field-error", inputs: ["fieldData", "form", "errorMessageTexts"] }, { kind: "component", type: FormFieldPublishErrorComponent, selector: "shared-form-field-publish-error", inputs: ["fieldData", "form", "entity", "errorMessageTexts"] }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i6.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: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i9.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11.CKEditorComponent, selector: "ckeditor", inputs: ["editorUrl", "tagName", "type", "data", "readOnly", "config"], outputs: ["namespaceLoaded", "ready", "dataReady", "change", "dataChange", "dragStart", "dragEnd", "drop", "fileUploadResponse", "fileUploadRequest", "focus", "paste", "afterPaste", "blur"] }, { kind: "component", type: FormFieldSpinnerComponent, selector: "shared-form-field-spinner" }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["fieldData", "form", "autoCompleteFields"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["fieldData", "form"] }, { kind: "component", type: FormFieldFileComponent, selector: "shared-form-field-file", inputs: ["fieldData", "form", "entity"] }, { kind: "component", type: FormFieldFilesComponent, selector: "shared-form-field-files", inputs: ["fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldTagsComponent, selector: "shared-form-field-tags", inputs: ["fieldData", "form", "itemId"] }], animations: [appearFromLeft], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8293
8300
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
8294
8301
|
type: Component,
|
|
8295
|
-
args: [{ selector: 'shared-form-field', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft], template: "<div *ngIf=\"!fieldData.options.notEditable && !fieldData.options.hide\"\n fxLayout=\"column\"\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle\n }\">\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</label>\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{form.get(fieldData.field).value?.length || 0}}</b>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</label>\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{fieldData.description}}\n </div>\n <ckeditor [formControlName]=\"fieldData.field\"\n [config]=\"ckeConfig\"></ckeditor>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{form.get(fieldData.field).value?.length || 0}}</b>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n <shared-form-field-files\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <shared-form-field-input\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{action.title}}</div>\n </ng-container>\n </div>\n\n <shared-form-field-spinner *ngIf=\"fieldData.options.loading\"></shared-form-field-spinner>\n\n <ng-container *ngIf=\"fieldData.options.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options.hint)\">help_outline</mat-icon>\n </ng-container>\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl.touched && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:rgba(0,156,229,.2588235294)}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px}.hint-icons{position:absolute;right:0;margin-top:9px}\n"] }]
|
|
8302
|
+
args: [{ selector: 'shared-form-field', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft], template: "<div *ngIf=\"!fieldData.options.notEditable && !fieldData.options.hide\"\n fxLayout=\"column\"\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle\n }\">\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</label>\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{form.get(fieldData.field).value?.length || 0}}</b>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</label>\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{fieldData.description}}\n </div>\n <ckeditor [formControlName]=\"fieldData.field\"\n [config]=\"ckeConfig\"></ckeditor>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{form.get(fieldData.field).value?.length || 0}}</b>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n <shared-form-field-files\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <shared-form-field-input\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{action.title}}</div>\n </ng-container>\n </div>\n\n <shared-form-field-spinner *ngIf=\"fieldData.options.loading\"></shared-form-field-spinner>\n\n <ng-container *ngIf=\"fieldData.options.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options.hint)\">help_outline</mat-icon>\n </ng-container>\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl.touched && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:rgba(0,156,229,.2588235294)}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px}.hint-icons{position:absolute;right:0;margin-top:9px}\n"] }]
|
|
8296
8303
|
}], ctorParameters: function () {
|
|
8297
8304
|
return [{ type: undefined, decorators: [{
|
|
8298
8305
|
type: Inject,
|
|
@@ -8314,6 +8321,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
8314
8321
|
type: Input
|
|
8315
8322
|
}], entityTypeUserRoleRights: [{
|
|
8316
8323
|
type: Input
|
|
8324
|
+
}], autoCompleteFields: [{
|
|
8325
|
+
type: Input
|
|
8317
8326
|
}], eventUpdateForm: [{
|
|
8318
8327
|
type: Output
|
|
8319
8328
|
}], eventSendAction: [{
|
|
@@ -8613,11 +8622,12 @@ class PublicationMessagesComponent {
|
|
|
8613
8622
|
this.autoFormService = autoFormService;
|
|
8614
8623
|
this.cd = cd;
|
|
8615
8624
|
this.config = { needToPublish: true };
|
|
8625
|
+
this.havePublication = true;
|
|
8616
8626
|
this.scrollToField = new EventEmitter();
|
|
8617
8627
|
this.errorOpened = false;
|
|
8618
8628
|
this.messagesOpened = false;
|
|
8619
8629
|
this.publishedTitle = 'Позиция опубликована до';
|
|
8620
|
-
this.unPublishedTitle = 'Внимание позиция
|
|
8630
|
+
this.unPublishedTitle = 'Внимание позиция НЕ опубликована';
|
|
8621
8631
|
this.unPublishedMessage = 'Для публикации позиции нужно заполнить все поля и нажать на кнопку ОПУБЛИКОВАТЬ';
|
|
8622
8632
|
this.errorTitleSource = 'Для публикации Вам обязательно нужно исправить <b>${pointCount}</b> пункт(а/ов)';
|
|
8623
8633
|
this.recommendationTitleSource = 'Мы также рекомендуем Вам исправить <b>${pointCount}</b> пункт(а/ов)';
|
|
@@ -8627,28 +8637,38 @@ class PublicationMessagesComponent {
|
|
|
8627
8637
|
this.itemPublishFinishedField = 'publishFinishedAt';
|
|
8628
8638
|
this.itemPublishFinishedAt = '';
|
|
8629
8639
|
this.itemPublishFinishedAtTmp = '';
|
|
8640
|
+
this.globalSubscription = new Subscription();
|
|
8630
8641
|
}
|
|
8631
8642
|
ngOnInit() {
|
|
8632
|
-
this.
|
|
8633
|
-
this.definitionPublicationMessages();
|
|
8643
|
+
this.preparingComponent();
|
|
8634
8644
|
}
|
|
8635
8645
|
ngOnDestroy() {
|
|
8646
|
+
this.globalSubscription.unsubscribe();
|
|
8636
8647
|
}
|
|
8637
8648
|
ngOnChanges(changes) {
|
|
8638
8649
|
var _a;
|
|
8639
8650
|
if ((_a = changes === null || changes === void 0 ? void 0 : changes.form) === null || _a === void 0 ? void 0 : _a.currentValue.value[this.itemPublishFinishedField]) {
|
|
8640
8651
|
this.updateItemPublishFinishAt(changes.form.currentValue.value[this.itemPublishFinishedField]);
|
|
8641
8652
|
}
|
|
8653
|
+
if (changes.entity || changes.itemId) {
|
|
8654
|
+
this.globalSubscription.unsubscribe();
|
|
8655
|
+
this.globalSubscription = new Subscription();
|
|
8656
|
+
this.preparingComponent();
|
|
8657
|
+
}
|
|
8658
|
+
}
|
|
8659
|
+
preparingComponent() {
|
|
8660
|
+
this.subscribeToFormChanges();
|
|
8661
|
+
this.definitionPublicationMessages();
|
|
8642
8662
|
}
|
|
8643
8663
|
showScrollToFieldMethod(field) {
|
|
8644
8664
|
this.scrollToField.emit(field);
|
|
8645
8665
|
}
|
|
8646
8666
|
subscribeToFormChanges() {
|
|
8647
|
-
this.form.valueChanges
|
|
8648
|
-
.pipe(untilComponentDestroyed(this))
|
|
8667
|
+
const subscription = this.form.valueChanges
|
|
8649
8668
|
.subscribe((data) => {
|
|
8650
8669
|
this.updateItemPublishFinishAt(data === null || data === void 0 ? void 0 : data.publishFinishedAt);
|
|
8651
8670
|
});
|
|
8671
|
+
this.globalSubscription.add(subscription);
|
|
8652
8672
|
}
|
|
8653
8673
|
updateItemPublishFinishAt(itemPublishFinishedAt) {
|
|
8654
8674
|
if (this.itemPublishFinishedAtTmp !== itemPublishFinishedAt) {
|
|
@@ -8660,8 +8680,7 @@ class PublicationMessagesComponent {
|
|
|
8660
8680
|
definitionPublicationMessages() {
|
|
8661
8681
|
var _a;
|
|
8662
8682
|
if (typeof this.entity === 'string') {
|
|
8663
|
-
this.publicationMessagesFacade.getPublicationMessage((_a = this.entity) === null || _a === void 0 ? void 0 : _a.toLowerCase(), this.itemId)
|
|
8664
|
-
.pipe(untilComponentDestroyed(this))
|
|
8683
|
+
const subscription = this.publicationMessagesFacade.getPublicationMessage((_a = this.entity) === null || _a === void 0 ? void 0 : _a.toLowerCase(), this.itemId)
|
|
8665
8684
|
.subscribe((messages) => {
|
|
8666
8685
|
if (messages === null || messages === void 0 ? void 0 : messages.length) {
|
|
8667
8686
|
const tmpErrors = this.filterMessages(true, messages);
|
|
@@ -8681,6 +8700,7 @@ class PublicationMessagesComponent {
|
|
|
8681
8700
|
}
|
|
8682
8701
|
this.cd.markForCheck();
|
|
8683
8702
|
});
|
|
8703
|
+
this.globalSubscription.add(subscription);
|
|
8684
8704
|
}
|
|
8685
8705
|
else {
|
|
8686
8706
|
console.error('[ publish-messages ][ entity-type ]', { entity: this.entity }, 'INCORRECT_ENTITY_TYPE');
|
|
@@ -8706,10 +8726,10 @@ class PublicationMessagesComponent {
|
|
|
8706
8726
|
}
|
|
8707
8727
|
}
|
|
8708
8728
|
PublicationMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PublicationMessagesComponent, deps: [{ token: PublicationMessagesFacade }, { token: AutoFormService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8709
|
-
PublicationMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: PublicationMessagesComponent, selector: "shared-publication-messages", inputs: { entity: "entity", form: "form", itemId: "itemId", fields: "fields", config: "config" }, outputs: { scrollToField: "scrollToField" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"itemPublishFinishedAt\" @appearFromLeftWithDelay class=\"message-box success mb-10\">\n <div>{{publishedTitle}} <b>{{itemPublishFinishedAt| date : 'MMM d, y'}}</b></div>\n</div>\n<div *ngIf=\"!itemPublishFinishedAt &&
|
|
8729
|
+
PublicationMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: PublicationMessagesComponent, selector: "shared-publication-messages", inputs: { entity: "entity", form: "form", itemId: "itemId", fields: "fields", config: "config", havePublication: "havePublication" }, outputs: { scrollToField: "scrollToField" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"itemPublishFinishedAt\" @appearFromLeftWithDelay class=\"message-box success mb-10\">\n <div>{{publishedTitle}} <b>{{itemPublishFinishedAt| date : 'MMM d, y'}}</b></div>\n</div>\n<div *ngIf=\"!itemPublishFinishedAt && havePublication\" @appearFromLeftWithDelay class=\"message-box error mb-10\">\n <div class=\"no-publish-error\">\n <mat-icon class=\"no-publish-error-ico\">assignment_late</mat-icon>\n <div class=\"no-publish-error-text\">\n <div>{{unPublishedTitle}}</div>\n <div class=\"fs-12 pt-0\">{{unPublishedMessage}}</div>\n </div>\n </div>\n</div>\n<ng-container *ngIf=\"errors?.length\">\n <ng-container\n *ngTemplateOutlet=\"listMessages; context: {title: errorTitle, isError: true, messages: errors}\"></ng-container>\n</ng-container>\n<ng-container *ngIf=\"recommendation?.length\">\n <ng-container\n *ngTemplateOutlet=\"listMessages; context: {title: recommendationTitle, isError: false, messages: recommendation}\"></ng-container>\n</ng-container>\n<ng-template #listMessages let-title=\"title\" let-isError=\"isError\" let-messages=\"messages\">\n <div class=\"publish-messages mb-10\"\n [ngClass]=\"{'error-messages': isError, 'warning-messages': !isError}\">\n <div class=\"title cursor-pointer\"\n fxLayout=\"row\"\n fxLayoutAlign=\"space-between center\"\n (click)=\"toggleExpand(isError)\">\n <div fxLayout=\"row\" fxLayoutAlign=\"left center\">\n <mat-icon class=\"f-28 ml-10 mr-20\">{{isError ? 'error' : 'report_problem'}}</mat-icon>\n <h4 [innerHTML]=\"title\"></h4>\n </div>\n <shared-button\n color=\"basic\"\n iconColor=\"orange_gray\"\n size=\"large\"\n [icon]=\"(isError && errorOpened) || (!isError && messagesOpened) ? 'keyboard_arrow_up' : 'keyboard_arrow_down'\"></shared-button>\n </div>\n <div *ngIf=\"(errorOpened && isError) || (messagesOpened && !isError)\"\n [@expandCollapse]\n class=\"publish-messages-list\">\n <div *ngFor=\"let messageData of messages;trackBy: truckByField\" class=\"mb-10\">\n <shared-panel [title]=\"messageData.title\"\n [description]=\"messageData.description\"\n color=\"red-light\"\n buttonColor=\"accent\"\n ></shared-panel>\n <a class=\"cursor-pointer color-grey fs-12\" (click)=\"showScrollToFieldMethod(messageData.field)\">\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C\n \u043F\u043E\u043B\u0435</a>\n </div>\n </div>\n </div>\n</ng-template>\n<div *ngIf=\"errors?.length || recommendation?.length\" fxLayout=\"row\" fxLayoutAlign=\"end center\" class=\"fs-12\">\n \u0415\u0441\u043B\u0438 \u0443 \u0412\u0430\u0441 \u0435\u0441\u0442\u044C \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438 \u043F\u0438\u0448\u0438\u0442\u0435 \u0432 <a class=\"pl-5\" href=\"mailto:support@world-travel.uz\">support@world-travel.uz</a>\n</div>\n", styles: [".publish-messages{border-radius:8px;overflow:hidden}.publish-messages.error-messages{background:linear-gradient(90deg,#ef847c,#f190af)}.publish-messages.error-messages .title{background:#f44336;background:linear-gradient(to bottom,#f44336,#af3b32);color:#fff}.publish-messages.warning-messages{background:linear-gradient(260deg,#faf0cd,#fab397)}.publish-messages.warning-messages .title{background:#e28d0b;background:linear-gradient(to bottom,#ffb646,#e28d0b);color:#fff}.publish-messages .title{padding:10px;border-top-left-radius:8px;border-top-right-radius:8px;text-shadow:0 0 6px rgba(56,56,56,.5803921569);font-size:16px}.publish-messages .publish-messages-list{padding:10px}.publish-messages .h4,.publish-messages h4{cursor:pointer}.no-publish-error{display:flex}.no-publish-error .no-publish-error-ico{font-size:43px;margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i9.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PanelComponent, selector: "shared-panel", inputs: ["title", "smallDescription", "description", "color", "buttonColor"], outputs: ["close"] }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "pipe", type: i1$3.DatePipe, name: "date" }], animations: [expandCollapse, appearFromLeftWithDelay], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8710
8730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PublicationMessagesComponent, decorators: [{
|
|
8711
8731
|
type: Component,
|
|
8712
|
-
args: [{ selector: 'shared-publication-messages', animations: [expandCollapse, appearFromLeftWithDelay], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"itemPublishFinishedAt\" @appearFromLeftWithDelay class=\"message-box success mb-10\">\n <div>{{publishedTitle}} <b>{{itemPublishFinishedAt| date : 'MMM d, y'}}</b></div>\n</div>\n<div *ngIf=\"!itemPublishFinishedAt &&
|
|
8732
|
+
args: [{ selector: 'shared-publication-messages', animations: [expandCollapse, appearFromLeftWithDelay], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"itemPublishFinishedAt\" @appearFromLeftWithDelay class=\"message-box success mb-10\">\n <div>{{publishedTitle}} <b>{{itemPublishFinishedAt| date : 'MMM d, y'}}</b></div>\n</div>\n<div *ngIf=\"!itemPublishFinishedAt && havePublication\" @appearFromLeftWithDelay class=\"message-box error mb-10\">\n <div class=\"no-publish-error\">\n <mat-icon class=\"no-publish-error-ico\">assignment_late</mat-icon>\n <div class=\"no-publish-error-text\">\n <div>{{unPublishedTitle}}</div>\n <div class=\"fs-12 pt-0\">{{unPublishedMessage}}</div>\n </div>\n </div>\n</div>\n<ng-container *ngIf=\"errors?.length\">\n <ng-container\n *ngTemplateOutlet=\"listMessages; context: {title: errorTitle, isError: true, messages: errors}\"></ng-container>\n</ng-container>\n<ng-container *ngIf=\"recommendation?.length\">\n <ng-container\n *ngTemplateOutlet=\"listMessages; context: {title: recommendationTitle, isError: false, messages: recommendation}\"></ng-container>\n</ng-container>\n<ng-template #listMessages let-title=\"title\" let-isError=\"isError\" let-messages=\"messages\">\n <div class=\"publish-messages mb-10\"\n [ngClass]=\"{'error-messages': isError, 'warning-messages': !isError}\">\n <div class=\"title cursor-pointer\"\n fxLayout=\"row\"\n fxLayoutAlign=\"space-between center\"\n (click)=\"toggleExpand(isError)\">\n <div fxLayout=\"row\" fxLayoutAlign=\"left center\">\n <mat-icon class=\"f-28 ml-10 mr-20\">{{isError ? 'error' : 'report_problem'}}</mat-icon>\n <h4 [innerHTML]=\"title\"></h4>\n </div>\n <shared-button\n color=\"basic\"\n iconColor=\"orange_gray\"\n size=\"large\"\n [icon]=\"(isError && errorOpened) || (!isError && messagesOpened) ? 'keyboard_arrow_up' : 'keyboard_arrow_down'\"></shared-button>\n </div>\n <div *ngIf=\"(errorOpened && isError) || (messagesOpened && !isError)\"\n [@expandCollapse]\n class=\"publish-messages-list\">\n <div *ngFor=\"let messageData of messages;trackBy: truckByField\" class=\"mb-10\">\n <shared-panel [title]=\"messageData.title\"\n [description]=\"messageData.description\"\n color=\"red-light\"\n buttonColor=\"accent\"\n ></shared-panel>\n <a class=\"cursor-pointer color-grey fs-12\" (click)=\"showScrollToFieldMethod(messageData.field)\">\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C\n \u043F\u043E\u043B\u0435</a>\n </div>\n </div>\n </div>\n</ng-template>\n<div *ngIf=\"errors?.length || recommendation?.length\" fxLayout=\"row\" fxLayoutAlign=\"end center\" class=\"fs-12\">\n \u0415\u0441\u043B\u0438 \u0443 \u0412\u0430\u0441 \u0435\u0441\u0442\u044C \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438 \u043F\u0438\u0448\u0438\u0442\u0435 \u0432 <a class=\"pl-5\" href=\"mailto:support@world-travel.uz\">support@world-travel.uz</a>\n</div>\n", styles: [".publish-messages{border-radius:8px;overflow:hidden}.publish-messages.error-messages{background:linear-gradient(90deg,#ef847c,#f190af)}.publish-messages.error-messages .title{background:#f44336;background:linear-gradient(to bottom,#f44336,#af3b32);color:#fff}.publish-messages.warning-messages{background:linear-gradient(260deg,#faf0cd,#fab397)}.publish-messages.warning-messages .title{background:#e28d0b;background:linear-gradient(to bottom,#ffb646,#e28d0b);color:#fff}.publish-messages .title{padding:10px;border-top-left-radius:8px;border-top-right-radius:8px;text-shadow:0 0 6px rgba(56,56,56,.5803921569);font-size:16px}.publish-messages .publish-messages-list{padding:10px}.publish-messages .h4,.publish-messages h4{cursor:pointer}.no-publish-error{display:flex}.no-publish-error .no-publish-error-ico{font-size:43px;margin-right:10px}\n"] }]
|
|
8713
8733
|
}], ctorParameters: function () { return [{ type: PublicationMessagesFacade }, { type: AutoFormService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { entity: [{
|
|
8714
8734
|
type: Input
|
|
8715
8735
|
}], form: [{
|
|
@@ -8720,16 +8740,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
8720
8740
|
type: Input
|
|
8721
8741
|
}], config: [{
|
|
8722
8742
|
type: Input
|
|
8743
|
+
}], havePublication: [{
|
|
8744
|
+
type: Input
|
|
8723
8745
|
}], scrollToField: [{
|
|
8724
8746
|
type: Output
|
|
8725
8747
|
}] } });
|
|
8726
8748
|
|
|
8727
8749
|
class AutoFormMainComponent {
|
|
8728
|
-
constructor(formErrors, formsFacade, publicationMessagesFacade,
|
|
8750
|
+
constructor(formErrors, formsFacade, publicationMessagesFacade, route, cd) {
|
|
8729
8751
|
this.formErrors = formErrors;
|
|
8730
8752
|
this.formsFacade = formsFacade;
|
|
8731
8753
|
this.publicationMessagesFacade = publicationMessagesFacade;
|
|
8732
|
-
this.
|
|
8754
|
+
this.route = route;
|
|
8733
8755
|
this.cd = cd;
|
|
8734
8756
|
this.showPublicationMessages = false;
|
|
8735
8757
|
this.editorImageUploadUrl = '';
|
|
@@ -8737,7 +8759,7 @@ class AutoFormMainComponent {
|
|
|
8737
8759
|
this.config = { needToPublish: true };
|
|
8738
8760
|
this.changed = new EventEmitter();
|
|
8739
8761
|
this.formCompleted = new EventEmitter();
|
|
8740
|
-
this.
|
|
8762
|
+
this.globalSubscription = new Subscription();
|
|
8741
8763
|
this.object_ = Object;
|
|
8742
8764
|
this.dataStored = false;
|
|
8743
8765
|
this.dataStoredTitle = 'Данные сохранены';
|
|
@@ -8745,20 +8767,48 @@ class AutoFormMainComponent {
|
|
|
8745
8767
|
this.groupsState = {};
|
|
8746
8768
|
}
|
|
8747
8769
|
ngOnInit() {
|
|
8770
|
+
this.currentEntity = this.entity;
|
|
8771
|
+
this.currentItemId = this.itemId;
|
|
8748
8772
|
if (this.itemId) {
|
|
8749
8773
|
this.dataStored = true;
|
|
8750
8774
|
}
|
|
8751
8775
|
this.storedFormValue = this.form.value;
|
|
8776
|
+
this.preparingData();
|
|
8777
|
+
this.getQueryParams();
|
|
8778
|
+
}
|
|
8779
|
+
ngOnDestroy() {
|
|
8780
|
+
this.globalSubscription.unsubscribe();
|
|
8781
|
+
}
|
|
8782
|
+
ngOnChanges(changes) {
|
|
8783
|
+
if ((changes.entity && changes.entity.currentValue !== this.currentEntity) ||
|
|
8784
|
+
(changes.itemId && changes.itemId.currentValue !== this.currentItemId)) {
|
|
8785
|
+
this.globalSubscription.unsubscribe();
|
|
8786
|
+
this.globalSubscription = new Subscription();
|
|
8787
|
+
this.preparingData();
|
|
8788
|
+
}
|
|
8789
|
+
}
|
|
8790
|
+
getQueryParams() {
|
|
8791
|
+
this.route.queryParamMap
|
|
8792
|
+
.pipe(untilComponentDestroyed(this))
|
|
8793
|
+
.subscribe(params => {
|
|
8794
|
+
this.autoCompleteFields = [];
|
|
8795
|
+
const fields = params.getAll('fields');
|
|
8796
|
+
const fieldsValue = params.getAll('fieldsvalue');
|
|
8797
|
+
for (let i = 0; i < fields.length; i++) {
|
|
8798
|
+
this.autoCompleteFields.push({
|
|
8799
|
+
field: fields[i],
|
|
8800
|
+
value: Number(fieldsValue[i])
|
|
8801
|
+
});
|
|
8802
|
+
}
|
|
8803
|
+
});
|
|
8804
|
+
}
|
|
8805
|
+
preparingData() {
|
|
8752
8806
|
this.groupFields();
|
|
8753
8807
|
this.subscribeToFormErrors();
|
|
8754
8808
|
this.subscribeToFormStatus();
|
|
8755
8809
|
this.subscribeToFormChanges();
|
|
8756
8810
|
this.subscribeToPublicationMessages();
|
|
8757
8811
|
}
|
|
8758
|
-
ngOnDestroy() {
|
|
8759
|
-
this.unSubscribeSubject$.next();
|
|
8760
|
-
this.unSubscribeSubject$.complete();
|
|
8761
|
-
}
|
|
8762
8812
|
groupFields() {
|
|
8763
8813
|
var _a;
|
|
8764
8814
|
this.groupedFields = {};
|
|
@@ -8788,8 +8838,8 @@ class AutoFormMainComponent {
|
|
|
8788
8838
|
}, 0);
|
|
8789
8839
|
}
|
|
8790
8840
|
subscribeToFormErrors() {
|
|
8791
|
-
this.formErrors.getFormErrors(this.formId)
|
|
8792
|
-
.pipe(
|
|
8841
|
+
const newSubscription = this.formErrors.getFormErrors(this.formId)
|
|
8842
|
+
.pipe(filter((errors) => !!(errors && errors.length)))
|
|
8793
8843
|
.subscribe((errors) => {
|
|
8794
8844
|
if (errors && errors.length) {
|
|
8795
8845
|
errors.forEach(error => {
|
|
@@ -8807,14 +8857,14 @@ class AutoFormMainComponent {
|
|
|
8807
8857
|
this.cd.markForCheck();
|
|
8808
8858
|
}
|
|
8809
8859
|
});
|
|
8860
|
+
this.globalSubscription.add(newSubscription);
|
|
8810
8861
|
}
|
|
8811
8862
|
subscribeToFormStatus() {
|
|
8812
8863
|
this.formsFacade.initForm({
|
|
8813
8864
|
formId: this.formId,
|
|
8814
8865
|
loading: false
|
|
8815
8866
|
});
|
|
8816
|
-
this.formsFacade.getForm(this.formId)
|
|
8817
|
-
.pipe(takeUntil(this.unSubscribeSubject$))
|
|
8867
|
+
const newSubscription = this.formsFacade.getForm(this.formId)
|
|
8818
8868
|
.subscribe((form) => {
|
|
8819
8869
|
if (form.isComplete) {
|
|
8820
8870
|
this.formCompleted.emit({ newId: form.data.itemId });
|
|
@@ -8829,10 +8879,10 @@ class AutoFormMainComponent {
|
|
|
8829
8879
|
this.cd.markForCheck();
|
|
8830
8880
|
}
|
|
8831
8881
|
});
|
|
8882
|
+
this.globalSubscription.add(newSubscription);
|
|
8832
8883
|
}
|
|
8833
8884
|
subscribeToFormChanges() {
|
|
8834
|
-
this.form.valueChanges
|
|
8835
|
-
.pipe(takeUntil(this.unSubscribeSubject$))
|
|
8885
|
+
const newSubscription = this.form.valueChanges
|
|
8836
8886
|
.subscribe((formValue) => {
|
|
8837
8887
|
const areEquals = this.areObjectsEquals(formValue, this.storedFormValue);
|
|
8838
8888
|
if (!areEquals) {
|
|
@@ -8841,6 +8891,7 @@ class AutoFormMainComponent {
|
|
|
8841
8891
|
this.dataStored = areEquals;
|
|
8842
8892
|
this.changed.emit({ valueChanged: !areEquals });
|
|
8843
8893
|
});
|
|
8894
|
+
this.globalSubscription.add(newSubscription);
|
|
8844
8895
|
}
|
|
8845
8896
|
groupClick(groupName) {
|
|
8846
8897
|
this.groupsState[groupName] = !this.groupsState[groupName];
|
|
@@ -8865,20 +8916,20 @@ class AutoFormMainComponent {
|
|
|
8865
8916
|
}
|
|
8866
8917
|
subscribeToPublicationMessages() {
|
|
8867
8918
|
if (this.itemId) {
|
|
8868
|
-
this.publicationMessagesFacade.getPublicationMessage(this.entity, this.itemId)
|
|
8869
|
-
.pipe(takeUntil(this.unSubscribeSubject$))
|
|
8919
|
+
const newSubscription = this.publicationMessagesFacade.getPublicationMessage(this.entity, this.itemId)
|
|
8870
8920
|
.subscribe((publicationMessages) => {
|
|
8871
8921
|
this.allPublicationMessages = publicationMessages;
|
|
8872
8922
|
});
|
|
8923
|
+
this.globalSubscription.add(newSubscription);
|
|
8873
8924
|
}
|
|
8874
8925
|
}
|
|
8875
8926
|
}
|
|
8876
|
-
AutoFormMainComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoFormMainComponent, deps: [{ token: FormErrorsFacade }, { token: FormsFacade }, { token: PublicationMessagesFacade }, { token:
|
|
8877
|
-
AutoFormMainComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: { fields: "fields", itemId: "itemId", formId: "formId", showPublicationMessages: "showPublicationMessages", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", havePublication: "havePublication", config: "config" }, outputs: { changed: "changed", formCompleted: "formCompleted" }, ngImport: i0, template: "<shared-smart-progress-bar *ngIf=\"storedFormValue._occupancyRating\"\n [value]=\"storedFormValue._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n <h2 *ngIf=\"group\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{group}}\n </h2>\n <div *ngIf=\"groupsState[group]\"\n class=\"form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row col-md-12\"\n [ngClass]=\"item.options.col ? 'col-lg-'+item.options.col : ''\">\n\n <div [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [publicationMessages]=\"allPublicationMessages\"\n ></shared-form-field>\n </div>\n </div>\n </div>\n</div>\n<div @appearFromLeft *ngIf=\"dataStored && form.valid\" class=\"message-box warning mt-20 mb-10\">\n <ul>\n <li>{{dataStoredTitle}}</li>\n </ul>\n</div>\n<shred-form-message-box\n class=\"mt-20 mb-10\"\n [form]=\"form\"\n [fields]=\"fields\"\n [errorMessageTexts]=\"errorMessageTexts\"></shred-form-message-box>\n\n<ng-container *ngIf=\"havePublication\">\n <ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #publicationMessages let-form=\"form\" let-entity=\"entity\" let-itemId=\"itemId\" let-fields=\"fields\">\n <shared-publication-messages\n [@appearFromLeft]\n [form]=\"form\"\n [entity]=\"entity\"\n [itemId]=\"itemId\"\n [fields]=\"fields\"\n [
|
|
8927
|
+
AutoFormMainComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoFormMainComponent, deps: [{ token: FormErrorsFacade }, { token: FormsFacade }, { token: PublicationMessagesFacade }, { token: i3.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8928
|
+
AutoFormMainComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: { fields: "fields", itemId: "itemId", formId: "formId", showPublicationMessages: "showPublicationMessages", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", havePublication: "havePublication", config: "config" }, outputs: { changed: "changed", formCompleted: "formCompleted" }, usesOnChanges: true, ngImport: i0, template: "<shared-smart-progress-bar *ngIf=\"storedFormValue._occupancyRating\"\n [value]=\"storedFormValue._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n <h2 *ngIf=\"group\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{group}}\n </h2>\n <div *ngIf=\"groupsState[group]\"\n class=\"form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row col-md-12\"\n [ngClass]=\"item.options.col ? 'col-lg-'+item.options.col : ''\">\n\n <div [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [publicationMessages]=\"allPublicationMessages\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field>\n </div>\n </div>\n </div>\n</div>\n<div @appearFromLeft *ngIf=\"dataStored && form.valid\" class=\"message-box warning mt-20 mb-10\">\n <ul>\n <li>{{dataStoredTitle}}</li>\n </ul>\n</div>\n<shred-form-message-box\n class=\"mt-20 mb-10\"\n [form]=\"form\"\n [fields]=\"fields\"\n [errorMessageTexts]=\"errorMessageTexts\"></shred-form-message-box>\n\n<ng-container *ngIf=\"havePublication\">\n <ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #publicationMessages let-form=\"form\" let-entity=\"entity\" let-itemId=\"itemId\" let-fields=\"fields\">\n <shared-publication-messages\n *ngIf=\"itemId\"\n [@appearFromLeft]\n [form]=\"form\"\n [entity]=\"entity\"\n [itemId]=\"itemId\"\n [fields]=\"fields\"\n [havePublication]=\"havePublication\"\n (scrollToField)=\"scrollToField($event)\"></shared-publication-messages>\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;flex-wrap:wrap}.form-group{cursor:pointer}.form-group h2{display:flex;transition:color .3s}.progress-bar{margin-bottom:10px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SmartProgressBarComponent, selector: "shared-smart-progress-bar", inputs: ["value", "title", "showValue"] }, { kind: "component", type: FormFieldComponent, selector: "shared-form-field", inputs: ["fieldData", "itemId", "form", "editorImageUploadUrl", "errorMessageTexts", "entity", "publicationMessages", "entityTypeUserRoleRights", "autoCompleteFields"], outputs: ["eventUpdateForm", "eventSendAction"] }, { kind: "component", type: FormMessageBoxComponent, selector: "shred-form-message-box", inputs: ["form", "fields", "errorMessageTexts"] }, { kind: "component", type: PublicationMessagesComponent, selector: "shared-publication-messages", inputs: ["entity", "form", "itemId", "fields", "config", "havePublication"], outputs: ["scrollToField"] }], animations: [appearFromLeft, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8878
8929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoFormMainComponent, decorators: [{
|
|
8879
8930
|
type: Component,
|
|
8880
|
-
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], template: "<shared-smart-progress-bar *ngIf=\"storedFormValue._occupancyRating\"\n [value]=\"storedFormValue._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n <h2 *ngIf=\"group\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{group}}\n </h2>\n <div *ngIf=\"groupsState[group]\"\n class=\"form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row col-md-12\"\n [ngClass]=\"item.options.col ? 'col-lg-'+item.options.col : ''\">\n\n <div [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [publicationMessages]=\"allPublicationMessages\"\n ></shared-form-field>\n </div>\n </div>\n </div>\n</div>\n<div @appearFromLeft *ngIf=\"dataStored && form.valid\" class=\"message-box warning mt-20 mb-10\">\n <ul>\n <li>{{dataStoredTitle}}</li>\n </ul>\n</div>\n<shred-form-message-box\n class=\"mt-20 mb-10\"\n [form]=\"form\"\n [fields]=\"fields\"\n [errorMessageTexts]=\"errorMessageTexts\"></shred-form-message-box>\n\n<ng-container *ngIf=\"havePublication\">\n <ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #publicationMessages let-form=\"form\" let-entity=\"entity\" let-itemId=\"itemId\" let-fields=\"fields\">\n <shared-publication-messages\n [@appearFromLeft]\n [form]=\"form\"\n [entity]=\"entity\"\n [itemId]=\"itemId\"\n [fields]=\"fields\"\n [
|
|
8881
|
-
}], ctorParameters: function () { return [{ type: FormErrorsFacade }, { type: FormsFacade }, { type: PublicationMessagesFacade }, { type:
|
|
8931
|
+
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], template: "<shared-smart-progress-bar *ngIf=\"storedFormValue._occupancyRating\"\n [value]=\"storedFormValue._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n <h2 *ngIf=\"group\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{group}}\n </h2>\n <div *ngIf=\"groupsState[group]\"\n class=\"form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row col-md-12\"\n [ngClass]=\"item.options.col ? 'col-lg-'+item.options.col : ''\">\n\n <div [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [publicationMessages]=\"allPublicationMessages\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field>\n </div>\n </div>\n </div>\n</div>\n<div @appearFromLeft *ngIf=\"dataStored && form.valid\" class=\"message-box warning mt-20 mb-10\">\n <ul>\n <li>{{dataStoredTitle}}</li>\n </ul>\n</div>\n<shred-form-message-box\n class=\"mt-20 mb-10\"\n [form]=\"form\"\n [fields]=\"fields\"\n [errorMessageTexts]=\"errorMessageTexts\"></shred-form-message-box>\n\n<ng-container *ngIf=\"havePublication\">\n <ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #publicationMessages let-form=\"form\" let-entity=\"entity\" let-itemId=\"itemId\" let-fields=\"fields\">\n <shared-publication-messages\n *ngIf=\"itemId\"\n [@appearFromLeft]\n [form]=\"form\"\n [entity]=\"entity\"\n [itemId]=\"itemId\"\n [fields]=\"fields\"\n [havePublication]=\"havePublication\"\n (scrollToField)=\"scrollToField($event)\"></shared-publication-messages>\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;flex-wrap:wrap}.form-group{cursor:pointer}.form-group h2{display:flex;transition:color .3s}.progress-bar{margin-bottom:10px}\n"] }]
|
|
8932
|
+
}], ctorParameters: function () { return [{ type: FormErrorsFacade }, { type: FormsFacade }, { type: PublicationMessagesFacade }, { type: i3.ActivatedRoute }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { fields: [{
|
|
8882
8933
|
type: Input
|
|
8883
8934
|
}], itemId: [{
|
|
8884
8935
|
type: Input
|