wt-front-shared 18.0.10 → 18.0.11
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/esm2022/lib/core/+state/actions/actions.effects.mjs +5 -2
- package/esm2022/lib/core/+state/actions/actions.facade.mjs +2 -2
- package/esm2022/lib/core/+state/cache-data/cache-data.effects.mjs +5 -2
- package/esm2022/lib/core/+state/cache-data/cache-data.facade.mjs +2 -2
- package/esm2022/lib/core/+state/core.facade.mjs +2 -2
- package/esm2022/lib/core/+state/files/files.effects.mjs +6 -2
- package/esm2022/lib/core/+state/files/files.facade.mjs +2 -2
- package/esm2022/lib/core/+state/form-delete-file/form-delete-file.effects.mjs +5 -2
- package/esm2022/lib/core/+state/form-delete-file/form-delete-file.facade.mjs +2 -1
- package/esm2022/lib/core/+state/form-errors/form-errors.effects.mjs +3 -1
- package/esm2022/lib/core/+state/form-errors/form-errors.facade.mjs +2 -2
- package/esm2022/lib/core/+state/form-validation/form-validation.effects.mjs +5 -2
- package/esm2022/lib/core/+state/form-validation/form-validation.facade.mjs +2 -2
- package/esm2022/lib/core/+state/forms/forms.effects.mjs +4 -2
- package/esm2022/lib/core/+state/forms/forms.facade.mjs +2 -2
- package/esm2022/lib/core/+state/main/main.effects.mjs +3 -2
- package/esm2022/lib/core/+state/main/main.facade.mjs +2 -2
- package/esm2022/lib/core/+state/notifications/notifications.effects.mjs +6 -2
- package/esm2022/lib/core/+state/notifications/notifications.facade.mjs +2 -1
- package/esm2022/lib/core/+state/publication-messages/publication-messages.effects.mjs +5 -2
- package/esm2022/lib/core/+state/publication-messages/publication-messages.facade.mjs +2 -2
- package/esm2022/lib/core/+state/reports/reports.effects.mjs +5 -2
- package/esm2022/lib/core/+state/reports/reports.facade.mjs +2 -2
- package/esm2022/lib/core/+state/requests/requests.effects.mjs +3 -1
- package/esm2022/lib/core/+state/requests/requests.facade.mjs +2 -2
- package/esm2022/lib/core/+state/router/router.effects.mjs +5 -2
- package/esm2022/lib/core/+state/router/router.facade.mjs +2 -1
- package/esm2022/lib/core/+state/static-data/static-data.effects.mjs +7 -2
- package/esm2022/lib/core/+state/static-data/static-data.facade.mjs +2 -2
- package/esm2022/lib/core/+state/tags/tags.effects.mjs +5 -2
- package/esm2022/lib/core/+state/tags/tags.facade.mjs +2 -2
- package/esm2022/lib/core/+state/uiUnits/uiUnits.effects.mjs +4 -1
- package/esm2022/lib/core/+state/uiUnits/uiUnits.facade.mjs +2 -2
- package/esm2022/lib/core/+state/update-entities/update-entities.effects.mjs +3 -3
- package/esm2022/lib/core/+state/users/users.effects.mjs +8 -2
- package/esm2022/lib/core/+state/users/users.facade.mjs +2 -2
- package/esm2022/lib/core/components/auto-form/auto-form.module.mjs +2 -2
- package/esm2022/lib/core/components/auto-form/components/form-field-file/form-field-file.component.mjs +6 -2
- package/esm2022/lib/core/components/auto-form/components/form-field-file-show/form-field-file-show.component.mjs +2 -1
- package/esm2022/lib/core/components/auto-form/components/form-field-files/form-field-files.component.mjs +3 -2
- package/esm2022/lib/core/components/auto-form/components/form-field-files-show/form-field-files-show.component.mjs +2 -1
- package/esm2022/lib/core/components/auto-form/components/form-field-input/form-field-input.component.mjs +3 -2
- package/esm2022/lib/core/components/auto-form/components/form-field-select/form-field-select.component.mjs +4 -3
- package/esm2022/lib/core/components/auto-form/components/form-field-select-show/form-field-select-show.component.mjs +3 -2
- package/esm2022/lib/core/components/auto-form/components/form-field-slide-toggle/form-field-slide-toggle.component.mjs +2 -1
- package/esm2022/lib/core/components/auto-form/components/form-field-tags/form-field-tags.component.mjs +5 -3
- package/esm2022/lib/core/components/auto-form/components/form-field-textarea-show/form-field-textarea-show.component.mjs +2 -2
- package/esm2022/lib/core/components/auto-form/components/form-message-box/form-message-box.component.mjs +4 -2
- package/esm2022/lib/core/components/auto-form/containers/auto-form-main/auto-form-main.component.mjs +15 -5
- package/esm2022/lib/core/components/auto-form/containers/form-field/form-field.component.mjs +9 -4
- package/esm2022/lib/core/components/auto-form/containers/publish-messages/publish-messages.component.mjs +5 -2
- package/esm2022/lib/core/components/chips-input/chips-input.component.mjs +3 -2
- package/esm2022/lib/core/components/files-upload/file-list-card/file-list-card.component.mjs +6 -2
- package/esm2022/lib/core/components/files-upload/files-upload/files-upload.component.mjs +4 -2
- package/esm2022/lib/core/components/files-upload/files-upload-list-images/files-upload-list-images.component.mjs +2 -1
- package/esm2022/lib/core/components/files-upload/table-files-uploading/table-files-uploading.component.mjs +5 -2
- package/esm2022/lib/core/components/form-field-error/form-field-error.component.mjs +3 -1
- package/esm2022/lib/core/components/form-field-publish-error/form-field-publish-error.component.mjs +4 -1
- package/esm2022/lib/core/components/image/image.component.mjs +2 -1
- package/esm2022/lib/core/components/site-helper/site-helper.component.mjs +7 -3
- package/esm2022/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.mjs +6 -2
- package/esm2022/lib/core/components/static-data/containers/static-data-details/static-data-details.component.mjs +17 -3
- package/esm2022/lib/core/components/static-data/containers/static-data-items/static-data-items.component.mjs +4 -1
- package/esm2022/lib/core/components/static-data/containers/static-data-list/static-data-list.component.mjs +3 -1
- package/esm2022/lib/core/components/sticky-sidebar/sticky-sidebar.directive.mjs +3 -2
- package/esm2022/lib/core/dialogs/common-dialog/common-dialog.component.mjs +4 -2
- package/esm2022/lib/core/dialogs/delete/delete.component.mjs +2 -2
- package/esm2022/lib/core/dialogs/dialog.service.mjs +2 -1
- package/esm2022/lib/core/dialogs/select-dialog/select-dialog.component.mjs +2 -2
- package/esm2022/lib/core/interceptors/headers.interceptor.mjs +11 -1
- package/esm2022/lib/core/interceptors/jwt.interceptor.mjs +2 -1
- package/esm2022/lib/core/pipes/safe.pipe.mjs +2 -1
- package/esm2022/lib/core/services/actions/actions.service.mjs +4 -1
- package/esm2022/lib/core/services/auth/authentication.service.mjs +2 -1
- package/esm2022/lib/core/services/auto-form/auto-form.service.mjs +3 -1
- package/esm2022/lib/core/services/cache-data/cache-data.service.mjs +4 -1
- package/esm2022/lib/core/services/cookies/browser/browser-cookies.service.mjs +2 -2
- package/esm2022/lib/core/services/cookies/cookies.service.mjs +2 -2
- package/esm2022/lib/core/services/files/files.service.mjs +4 -1
- package/esm2022/lib/core/services/form-delete-file/form-delete-file.service.mjs +4 -1
- package/esm2022/lib/core/services/form-validation/form-validation.service.mjs +4 -1
- package/esm2022/lib/core/services/model-services/tags/tags.service.mjs +4 -1
- package/esm2022/lib/core/services/publish/publish.service.mjs +4 -1
- package/esm2022/lib/core/services/reports/reports.service.mjs +4 -1
- package/esm2022/lib/core/services/right-service.mjs +2 -1
- package/esm2022/lib/core/services/router/router.service.mjs +2 -1
- package/esm2022/lib/core/services/seo.service.mjs +2 -1
- package/esm2022/lib/core/services/static-data/static-data.service.mjs +4 -1
- package/esm2022/lib/core/services/users/users.service.mjs +4 -1
- package/esm2022/lib/core/services/websocket.service.mjs +4 -1
- package/esm2022/lib/wt-front-shared.module.mjs +1 -1
- package/fesm2022/wt-front-shared.mjs +284 -280
- package/fesm2022/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/index.d.ts +1 -1
- package/lib/core/+state/users/users.effects.d.ts +4 -4
- package/lib/core/components/auto-form/auto-form.module.d.ts +1 -1
- package/package.json +1 -1
|
@@ -13,11 +13,12 @@ import { createAction, props, createReducer, on, createFeatureSelector, createSe
|
|
|
13
13
|
import { get } from 'lodash';
|
|
14
14
|
import * as i1$1 from '@angular/common/http';
|
|
15
15
|
import { filter } from 'rxjs/internal/operators/filter';
|
|
16
|
+
import * as i3$1 from 'ngx-toastr';
|
|
16
17
|
import * as i1$4 from '@angular/material/dialog';
|
|
17
18
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
18
|
-
import { trigger, transition, animate, keyframes, style, state } from '@angular/animations';
|
|
19
19
|
import * as i3 from '@angular/forms';
|
|
20
20
|
import { Validators, FormControl, UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
21
|
+
import { trigger, transition, animate, keyframes, style, state } from '@angular/animations';
|
|
21
22
|
import * as i5 from '@angular/material/button';
|
|
22
23
|
import { MatButtonModule } from '@angular/material/button';
|
|
23
24
|
import * as i2$3 from '@angular/material/tooltip';
|
|
@@ -28,12 +29,9 @@ import * as i2$2 from '@angular/material/progress-spinner';
|
|
|
28
29
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
29
30
|
import * as i7 from '@angular/flex-layout';
|
|
30
31
|
import { FlexModule, FlexLayoutModule } from '@angular/flex-layout';
|
|
31
|
-
import * as i3$1 from 'ngx-toastr';
|
|
32
32
|
import { switchMap as switchMap$2 } from 'rxjs/internal/operators/switchMap';
|
|
33
33
|
import * as i3$2 from 'ngx-cookie-service';
|
|
34
34
|
import * as i1$5 from '@angular/platform-browser';
|
|
35
|
-
import * as i11 from 'ckeditor4-angular';
|
|
36
|
-
import { CKEditorModule } from 'ckeditor4-angular';
|
|
37
35
|
import * as i2$4 from '@angular/material/form-field';
|
|
38
36
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
39
37
|
import * as i3$3 from '@angular/material/input';
|
|
@@ -51,6 +49,8 @@ import { NgxMaskDirective, NgxMaskPipe, provideNgxMask } from 'ngx-mask';
|
|
|
51
49
|
import * as i7$1 from 'ngx-mat-select-search';
|
|
52
50
|
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
53
51
|
import * as i5$1 from '@angular/material/core';
|
|
52
|
+
import * as i11 from '@ckeditor/ckeditor5-angular';
|
|
53
|
+
import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
|
|
54
54
|
import * as i3$4 from '@angular/cdk/drag-drop';
|
|
55
55
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
56
56
|
import * as i6 from 'ng2-file-upload';
|
|
@@ -4417,161 +4417,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
4417
4417
|
args: [{ providedIn: "root" }]
|
|
4418
4418
|
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
4419
4419
|
|
|
4420
|
-
class FilesLoadBehavior extends Behavior {
|
|
4421
|
-
constructor(action, result) {
|
|
4422
|
-
super(action);
|
|
4423
|
-
this.action = action;
|
|
4424
|
-
this.result = result;
|
|
4425
|
-
}
|
|
4426
|
-
resolve() {
|
|
4427
|
-
const status = this.result.data.status;
|
|
4428
|
-
let returnedActions;
|
|
4429
|
-
switch (status) {
|
|
4430
|
-
case ResponseStatus.STATUS_200: {
|
|
4431
|
-
const response = this.result.data;
|
|
4432
|
-
const { data } = response.body;
|
|
4433
|
-
const fileData = this.modelAdapter.convertItems(FileModel, data);
|
|
4434
|
-
returnedActions = [
|
|
4435
|
-
FilesLoadSuccess({ payload: { files: fileData } })
|
|
4436
|
-
];
|
|
4437
|
-
break;
|
|
4438
|
-
}
|
|
4439
|
-
case ResponseStatus.STATUS_400:
|
|
4440
|
-
case ResponseStatus.STATUS_404:
|
|
4441
|
-
case ResponseStatus.STATUS_422:
|
|
4442
|
-
case ResponseStatus.STATUS_401:
|
|
4443
|
-
const errorResponse = this.result.data;
|
|
4444
|
-
const error = errorResponse.body.errors ? errorResponse.body.errors[0].title : 'Unknown error';
|
|
4445
|
-
returnedActions = [
|
|
4446
|
-
FilesLoadFail({ payload: { error } })
|
|
4447
|
-
];
|
|
4448
|
-
break;
|
|
4449
|
-
default: {
|
|
4450
|
-
returnedActions = [
|
|
4451
|
-
FilesLoadFail({ payload: { error: 'Unhandled error' } })
|
|
4452
|
-
];
|
|
4453
|
-
}
|
|
4454
|
-
}
|
|
4455
|
-
return [...returnedActions];
|
|
4456
|
-
}
|
|
4457
|
-
}
|
|
4458
|
-
|
|
4459
|
-
class FileUpdateBehavior extends Behavior {
|
|
4460
|
-
constructor(action, result) {
|
|
4461
|
-
super(action);
|
|
4462
|
-
this.action = action;
|
|
4463
|
-
this.result = result;
|
|
4464
|
-
}
|
|
4465
|
-
resolve() {
|
|
4466
|
-
const status = this.result.data.status;
|
|
4467
|
-
let returnedActions;
|
|
4468
|
-
switch (status) {
|
|
4469
|
-
case ResponseStatus.STATUS_200: {
|
|
4470
|
-
const response = this.result.data;
|
|
4471
|
-
const { data } = response.body;
|
|
4472
|
-
const fileData = this.modelAdapter.convertItems(FileModel, data);
|
|
4473
|
-
returnedActions = [
|
|
4474
|
-
FileUpdateSuccess({ payload: { files: fileData } })
|
|
4475
|
-
];
|
|
4476
|
-
break;
|
|
4477
|
-
}
|
|
4478
|
-
case ResponseStatus.STATUS_400:
|
|
4479
|
-
case ResponseStatus.STATUS_404:
|
|
4480
|
-
case ResponseStatus.STATUS_422:
|
|
4481
|
-
case ResponseStatus.STATUS_401:
|
|
4482
|
-
const errorResponse = this.result.data;
|
|
4483
|
-
const error = errorResponse.body.errors[0].title;
|
|
4484
|
-
returnedActions = [
|
|
4485
|
-
FileUpdateFail({ payload: { error } })
|
|
4486
|
-
];
|
|
4487
|
-
break;
|
|
4488
|
-
default: {
|
|
4489
|
-
returnedActions = [
|
|
4490
|
-
FileUpdateFail({ payload: { error: 'Unhandled error' } })
|
|
4491
|
-
];
|
|
4492
|
-
}
|
|
4493
|
-
}
|
|
4494
|
-
return [...returnedActions];
|
|
4495
|
-
}
|
|
4496
|
-
}
|
|
4497
|
-
|
|
4498
|
-
class FileDeleteBehavior extends Behavior {
|
|
4499
|
-
constructor(action, result) {
|
|
4500
|
-
super(action);
|
|
4501
|
-
this.action = action;
|
|
4502
|
-
this.result = result;
|
|
4503
|
-
}
|
|
4504
|
-
resolve() {
|
|
4505
|
-
const status = this.result.data.status;
|
|
4506
|
-
let returnedActions;
|
|
4507
|
-
switch (status) {
|
|
4508
|
-
case ResponseStatus.STATUS_200: {
|
|
4509
|
-
const response = this.result.data;
|
|
4510
|
-
const { data } = response.body;
|
|
4511
|
-
returnedActions = [
|
|
4512
|
-
FileDeleteSuccess({ payload: { deleteId: data.delete_id } })
|
|
4513
|
-
];
|
|
4514
|
-
break;
|
|
4515
|
-
}
|
|
4516
|
-
case ResponseStatus.STATUS_400:
|
|
4517
|
-
case ResponseStatus.STATUS_404:
|
|
4518
|
-
case ResponseStatus.STATUS_422:
|
|
4519
|
-
case ResponseStatus.STATUS_401:
|
|
4520
|
-
const errorResponse = this.result.data;
|
|
4521
|
-
const error = errorResponse.body.errors[0].title;
|
|
4522
|
-
returnedActions = [
|
|
4523
|
-
FileDeleteFail({ payload: { error } })
|
|
4524
|
-
];
|
|
4525
|
-
break;
|
|
4526
|
-
default: {
|
|
4527
|
-
returnedActions = [
|
|
4528
|
-
FileDeleteFail({ payload: { error: 'Unhandled error' } })
|
|
4529
|
-
];
|
|
4530
|
-
}
|
|
4531
|
-
}
|
|
4532
|
-
return [...returnedActions];
|
|
4533
|
-
}
|
|
4534
|
-
}
|
|
4535
|
-
|
|
4536
|
-
class FilesSortBehavior extends Behavior {
|
|
4537
|
-
constructor(action, result) {
|
|
4538
|
-
super(action);
|
|
4539
|
-
this.action = action;
|
|
4540
|
-
this.result = result;
|
|
4541
|
-
}
|
|
4542
|
-
resolve() {
|
|
4543
|
-
const status = this.result.data.status;
|
|
4544
|
-
let returnedActions;
|
|
4545
|
-
switch (status) {
|
|
4546
|
-
case ResponseStatus.STATUS_200: {
|
|
4547
|
-
const response = this.result.data;
|
|
4548
|
-
const { data } = response.body;
|
|
4549
|
-
const fileData = this.modelAdapter.convertItems(FileModel, data);
|
|
4550
|
-
returnedActions = [
|
|
4551
|
-
FilesSortSuccess({ payload: { files: fileData } })
|
|
4552
|
-
];
|
|
4553
|
-
break;
|
|
4554
|
-
}
|
|
4555
|
-
case ResponseStatus.STATUS_400:
|
|
4556
|
-
case ResponseStatus.STATUS_404:
|
|
4557
|
-
case ResponseStatus.STATUS_422:
|
|
4558
|
-
case ResponseStatus.STATUS_401:
|
|
4559
|
-
const errorResponse = this.result.data;
|
|
4560
|
-
const error = errorResponse.body.errors[0].title;
|
|
4561
|
-
returnedActions = [
|
|
4562
|
-
FilesSortFail({ payload: { error } })
|
|
4563
|
-
];
|
|
4564
|
-
break;
|
|
4565
|
-
default: {
|
|
4566
|
-
returnedActions = [
|
|
4567
|
-
FilesSortFail({ payload: { error: 'Unhandled error' } })
|
|
4568
|
-
];
|
|
4569
|
-
}
|
|
4570
|
-
}
|
|
4571
|
-
return [...returnedActions];
|
|
4572
|
-
}
|
|
4573
|
-
}
|
|
4574
|
-
|
|
4575
4420
|
class FilesApi extends BaseAPI {
|
|
4576
4421
|
constructor(domain) {
|
|
4577
4422
|
super(domain);
|
|
@@ -4714,13 +4559,168 @@ class UiUnitsFacade {
|
|
|
4714
4559
|
getUIUnits(id) {
|
|
4715
4560
|
return this.store.pipe(select(getUIUnit(id)));
|
|
4716
4561
|
}
|
|
4717
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UiUnitsFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4718
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UiUnitsFacade, providedIn: "root" }); }
|
|
4562
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UiUnitsFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4563
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UiUnitsFacade, providedIn: "root" }); }
|
|
4564
|
+
}
|
|
4565
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UiUnitsFacade, decorators: [{
|
|
4566
|
+
type: Injectable,
|
|
4567
|
+
args: [{ providedIn: "root" }]
|
|
4568
|
+
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
4569
|
+
|
|
4570
|
+
class FilesLoadBehavior extends Behavior {
|
|
4571
|
+
constructor(action, result) {
|
|
4572
|
+
super(action);
|
|
4573
|
+
this.action = action;
|
|
4574
|
+
this.result = result;
|
|
4575
|
+
}
|
|
4576
|
+
resolve() {
|
|
4577
|
+
const status = this.result.data.status;
|
|
4578
|
+
let returnedActions;
|
|
4579
|
+
switch (status) {
|
|
4580
|
+
case ResponseStatus.STATUS_200: {
|
|
4581
|
+
const response = this.result.data;
|
|
4582
|
+
const { data } = response.body;
|
|
4583
|
+
const fileData = this.modelAdapter.convertItems(FileModel, data);
|
|
4584
|
+
returnedActions = [
|
|
4585
|
+
FilesLoadSuccess({ payload: { files: fileData } })
|
|
4586
|
+
];
|
|
4587
|
+
break;
|
|
4588
|
+
}
|
|
4589
|
+
case ResponseStatus.STATUS_400:
|
|
4590
|
+
case ResponseStatus.STATUS_404:
|
|
4591
|
+
case ResponseStatus.STATUS_422:
|
|
4592
|
+
case ResponseStatus.STATUS_401:
|
|
4593
|
+
const errorResponse = this.result.data;
|
|
4594
|
+
const error = errorResponse.body.errors ? errorResponse.body.errors[0].title : 'Unknown error';
|
|
4595
|
+
returnedActions = [
|
|
4596
|
+
FilesLoadFail({ payload: { error } })
|
|
4597
|
+
];
|
|
4598
|
+
break;
|
|
4599
|
+
default: {
|
|
4600
|
+
returnedActions = [
|
|
4601
|
+
FilesLoadFail({ payload: { error: 'Unhandled error' } })
|
|
4602
|
+
];
|
|
4603
|
+
}
|
|
4604
|
+
}
|
|
4605
|
+
return [...returnedActions];
|
|
4606
|
+
}
|
|
4607
|
+
}
|
|
4608
|
+
|
|
4609
|
+
class FileUpdateBehavior extends Behavior {
|
|
4610
|
+
constructor(action, result) {
|
|
4611
|
+
super(action);
|
|
4612
|
+
this.action = action;
|
|
4613
|
+
this.result = result;
|
|
4614
|
+
}
|
|
4615
|
+
resolve() {
|
|
4616
|
+
const status = this.result.data.status;
|
|
4617
|
+
let returnedActions;
|
|
4618
|
+
switch (status) {
|
|
4619
|
+
case ResponseStatus.STATUS_200: {
|
|
4620
|
+
const response = this.result.data;
|
|
4621
|
+
const { data } = response.body;
|
|
4622
|
+
const fileData = this.modelAdapter.convertItems(FileModel, data);
|
|
4623
|
+
returnedActions = [
|
|
4624
|
+
FileUpdateSuccess({ payload: { files: fileData } })
|
|
4625
|
+
];
|
|
4626
|
+
break;
|
|
4627
|
+
}
|
|
4628
|
+
case ResponseStatus.STATUS_400:
|
|
4629
|
+
case ResponseStatus.STATUS_404:
|
|
4630
|
+
case ResponseStatus.STATUS_422:
|
|
4631
|
+
case ResponseStatus.STATUS_401:
|
|
4632
|
+
const errorResponse = this.result.data;
|
|
4633
|
+
const error = errorResponse.body.errors[0].title;
|
|
4634
|
+
returnedActions = [
|
|
4635
|
+
FileUpdateFail({ payload: { error } })
|
|
4636
|
+
];
|
|
4637
|
+
break;
|
|
4638
|
+
default: {
|
|
4639
|
+
returnedActions = [
|
|
4640
|
+
FileUpdateFail({ payload: { error: 'Unhandled error' } })
|
|
4641
|
+
];
|
|
4642
|
+
}
|
|
4643
|
+
}
|
|
4644
|
+
return [...returnedActions];
|
|
4645
|
+
}
|
|
4646
|
+
}
|
|
4647
|
+
|
|
4648
|
+
class FileDeleteBehavior extends Behavior {
|
|
4649
|
+
constructor(action, result) {
|
|
4650
|
+
super(action);
|
|
4651
|
+
this.action = action;
|
|
4652
|
+
this.result = result;
|
|
4653
|
+
}
|
|
4654
|
+
resolve() {
|
|
4655
|
+
const status = this.result.data.status;
|
|
4656
|
+
let returnedActions;
|
|
4657
|
+
switch (status) {
|
|
4658
|
+
case ResponseStatus.STATUS_200: {
|
|
4659
|
+
const response = this.result.data;
|
|
4660
|
+
const { data } = response.body;
|
|
4661
|
+
returnedActions = [
|
|
4662
|
+
FileDeleteSuccess({ payload: { deleteId: data.delete_id } })
|
|
4663
|
+
];
|
|
4664
|
+
break;
|
|
4665
|
+
}
|
|
4666
|
+
case ResponseStatus.STATUS_400:
|
|
4667
|
+
case ResponseStatus.STATUS_404:
|
|
4668
|
+
case ResponseStatus.STATUS_422:
|
|
4669
|
+
case ResponseStatus.STATUS_401:
|
|
4670
|
+
const errorResponse = this.result.data;
|
|
4671
|
+
const error = errorResponse.body.errors[0].title;
|
|
4672
|
+
returnedActions = [
|
|
4673
|
+
FileDeleteFail({ payload: { error } })
|
|
4674
|
+
];
|
|
4675
|
+
break;
|
|
4676
|
+
default: {
|
|
4677
|
+
returnedActions = [
|
|
4678
|
+
FileDeleteFail({ payload: { error: 'Unhandled error' } })
|
|
4679
|
+
];
|
|
4680
|
+
}
|
|
4681
|
+
}
|
|
4682
|
+
return [...returnedActions];
|
|
4683
|
+
}
|
|
4684
|
+
}
|
|
4685
|
+
|
|
4686
|
+
class FilesSortBehavior extends Behavior {
|
|
4687
|
+
constructor(action, result) {
|
|
4688
|
+
super(action);
|
|
4689
|
+
this.action = action;
|
|
4690
|
+
this.result = result;
|
|
4691
|
+
}
|
|
4692
|
+
resolve() {
|
|
4693
|
+
const status = this.result.data.status;
|
|
4694
|
+
let returnedActions;
|
|
4695
|
+
switch (status) {
|
|
4696
|
+
case ResponseStatus.STATUS_200: {
|
|
4697
|
+
const response = this.result.data;
|
|
4698
|
+
const { data } = response.body;
|
|
4699
|
+
const fileData = this.modelAdapter.convertItems(FileModel, data);
|
|
4700
|
+
returnedActions = [
|
|
4701
|
+
FilesSortSuccess({ payload: { files: fileData } })
|
|
4702
|
+
];
|
|
4703
|
+
break;
|
|
4704
|
+
}
|
|
4705
|
+
case ResponseStatus.STATUS_400:
|
|
4706
|
+
case ResponseStatus.STATUS_404:
|
|
4707
|
+
case ResponseStatus.STATUS_422:
|
|
4708
|
+
case ResponseStatus.STATUS_401:
|
|
4709
|
+
const errorResponse = this.result.data;
|
|
4710
|
+
const error = errorResponse.body.errors[0].title;
|
|
4711
|
+
returnedActions = [
|
|
4712
|
+
FilesSortFail({ payload: { error } })
|
|
4713
|
+
];
|
|
4714
|
+
break;
|
|
4715
|
+
default: {
|
|
4716
|
+
returnedActions = [
|
|
4717
|
+
FilesSortFail({ payload: { error: 'Unhandled error' } })
|
|
4718
|
+
];
|
|
4719
|
+
}
|
|
4720
|
+
}
|
|
4721
|
+
return [...returnedActions];
|
|
4722
|
+
}
|
|
4719
4723
|
}
|
|
4720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UiUnitsFacade, decorators: [{
|
|
4721
|
-
type: Injectable,
|
|
4722
|
-
args: [{ providedIn: "root" }]
|
|
4723
|
-
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
4724
4724
|
|
|
4725
4725
|
class FilesEffects {
|
|
4726
4726
|
constructor(actions$, store, filesService, uiUnitsFacade, authenticationService) {
|
|
@@ -5760,48 +5760,6 @@ class PublicationErrorsPostBehavior extends Behavior {
|
|
|
5760
5760
|
}
|
|
5761
5761
|
}
|
|
5762
5762
|
|
|
5763
|
-
class UnPublicationPostBehavior extends Behavior {
|
|
5764
|
-
constructor(action, result) {
|
|
5765
|
-
super(action);
|
|
5766
|
-
this.action = action;
|
|
5767
|
-
this.result = result;
|
|
5768
|
-
}
|
|
5769
|
-
resolve() {
|
|
5770
|
-
const status = this.result.data.status;
|
|
5771
|
-
let returnedActions;
|
|
5772
|
-
switch (status) {
|
|
5773
|
-
case ResponseStatus.STATUS_200: {
|
|
5774
|
-
const response = this.result.data;
|
|
5775
|
-
const { itemId, publishFinishedAt, publishedAt, status } = response.body.data;
|
|
5776
|
-
const meta = response.body.meta;
|
|
5777
|
-
const updates = {
|
|
5778
|
-
publishedAt,
|
|
5779
|
-
publishFinishedAt,
|
|
5780
|
-
status
|
|
5781
|
-
};
|
|
5782
|
-
const entity = meta?.staticDataType;
|
|
5783
|
-
const subStaticDataType = meta?.subStaticDataType;
|
|
5784
|
-
returnedActions = [
|
|
5785
|
-
EntityUpdate({
|
|
5786
|
-
payload: {
|
|
5787
|
-
entity,
|
|
5788
|
-
entityId: itemId,
|
|
5789
|
-
updates,
|
|
5790
|
-
subeEntity: subStaticDataType
|
|
5791
|
-
}
|
|
5792
|
-
}),
|
|
5793
|
-
UnPublishPostSuccess({ payload: {} })
|
|
5794
|
-
];
|
|
5795
|
-
break;
|
|
5796
|
-
}
|
|
5797
|
-
default: {
|
|
5798
|
-
returnedActions = [UnPublishPostFail({ payload: { error: '' } })];
|
|
5799
|
-
}
|
|
5800
|
-
}
|
|
5801
|
-
return [...returnedActions];
|
|
5802
|
-
}
|
|
5803
|
-
}
|
|
5804
|
-
|
|
5805
5763
|
class PublishApi extends BaseAPI {
|
|
5806
5764
|
constructor(domain) {
|
|
5807
5765
|
super(domain);
|
|
@@ -5865,6 +5823,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5865
5823
|
args: [CORE_CONFIG]
|
|
5866
5824
|
}] }, { type: RequestsFacade }, { type: FormsFacade }] });
|
|
5867
5825
|
|
|
5826
|
+
class UnPublicationPostBehavior extends Behavior {
|
|
5827
|
+
constructor(action, result) {
|
|
5828
|
+
super(action);
|
|
5829
|
+
this.action = action;
|
|
5830
|
+
this.result = result;
|
|
5831
|
+
}
|
|
5832
|
+
resolve() {
|
|
5833
|
+
const status = this.result.data.status;
|
|
5834
|
+
let returnedActions;
|
|
5835
|
+
switch (status) {
|
|
5836
|
+
case ResponseStatus.STATUS_200: {
|
|
5837
|
+
const response = this.result.data;
|
|
5838
|
+
const { itemId, publishFinishedAt, publishedAt, status } = response.body.data;
|
|
5839
|
+
const meta = response.body.meta;
|
|
5840
|
+
const updates = {
|
|
5841
|
+
publishedAt,
|
|
5842
|
+
publishFinishedAt,
|
|
5843
|
+
status
|
|
5844
|
+
};
|
|
5845
|
+
const entity = meta?.staticDataType;
|
|
5846
|
+
const subStaticDataType = meta?.subStaticDataType;
|
|
5847
|
+
returnedActions = [
|
|
5848
|
+
EntityUpdate({
|
|
5849
|
+
payload: {
|
|
5850
|
+
entity,
|
|
5851
|
+
entityId: itemId,
|
|
5852
|
+
updates,
|
|
5853
|
+
subeEntity: subStaticDataType
|
|
5854
|
+
}
|
|
5855
|
+
}),
|
|
5856
|
+
UnPublishPostSuccess({ payload: {} })
|
|
5857
|
+
];
|
|
5858
|
+
break;
|
|
5859
|
+
}
|
|
5860
|
+
default: {
|
|
5861
|
+
returnedActions = [UnPublishPostFail({ payload: { error: '' } })];
|
|
5862
|
+
}
|
|
5863
|
+
}
|
|
5864
|
+
return [...returnedActions];
|
|
5865
|
+
}
|
|
5866
|
+
}
|
|
5867
|
+
|
|
5868
5868
|
class PublicationMessagesEffects {
|
|
5869
5869
|
constructor(actions$, store, publishService, notificationsFacade) {
|
|
5870
5870
|
this.actions$ = actions$;
|
|
@@ -6238,75 +6238,6 @@ class StaticDataGetListCategoriesBehavior extends Behavior {
|
|
|
6238
6238
|
}
|
|
6239
6239
|
}
|
|
6240
6240
|
|
|
6241
|
-
class StaticDataPatchUpdateBehavior extends Behavior {
|
|
6242
|
-
constructor(action, result) {
|
|
6243
|
-
super(action);
|
|
6244
|
-
this.action = action;
|
|
6245
|
-
this.result = result;
|
|
6246
|
-
}
|
|
6247
|
-
resolve() {
|
|
6248
|
-
const status = this.result.data?.status;
|
|
6249
|
-
let returnedActions;
|
|
6250
|
-
const error = this.result.data.body?.error;
|
|
6251
|
-
switch (status) {
|
|
6252
|
-
case ResponseStatus.STATUS_200:
|
|
6253
|
-
case ResponseStatus.STATUS_201: {
|
|
6254
|
-
const response = this.result.data;
|
|
6255
|
-
const { data, meta } = response.body;
|
|
6256
|
-
returnedActions = [
|
|
6257
|
-
StaticDataPatchUpdateSuccess({ payload: { data, contentType: meta?.staticDataType, itemId: data.id } })
|
|
6258
|
-
];
|
|
6259
|
-
break;
|
|
6260
|
-
}
|
|
6261
|
-
default: {
|
|
6262
|
-
returnedActions = [
|
|
6263
|
-
StaticDataPatchUpdateFail({
|
|
6264
|
-
payload: {
|
|
6265
|
-
error,
|
|
6266
|
-
contentType: error?.payload?.contentType,
|
|
6267
|
-
itemId: error?.payload?.itemId
|
|
6268
|
-
}
|
|
6269
|
-
})
|
|
6270
|
-
];
|
|
6271
|
-
}
|
|
6272
|
-
}
|
|
6273
|
-
return [...returnedActions];
|
|
6274
|
-
}
|
|
6275
|
-
}
|
|
6276
|
-
|
|
6277
|
-
class StaticDataBulkUpdateOrCreateBehavior extends Behavior {
|
|
6278
|
-
constructor(action, result) {
|
|
6279
|
-
super(action);
|
|
6280
|
-
this.action = action;
|
|
6281
|
-
this.result = result;
|
|
6282
|
-
}
|
|
6283
|
-
resolve() {
|
|
6284
|
-
const status = this.result.data.status;
|
|
6285
|
-
const error = this.result.data?.body?.error;
|
|
6286
|
-
let returnedActions;
|
|
6287
|
-
const response = this.result.data;
|
|
6288
|
-
switch (status) {
|
|
6289
|
-
case ResponseStatus.STATUS_200: {
|
|
6290
|
-
const { data, meta } = response.body;
|
|
6291
|
-
returnedActions = [
|
|
6292
|
-
StaticDataBulkUpdateOrCreateSuccess({
|
|
6293
|
-
payload: {
|
|
6294
|
-
items: data,
|
|
6295
|
-
contentType: meta.staticDataType,
|
|
6296
|
-
bulkFilter: meta.bulkFilter
|
|
6297
|
-
}
|
|
6298
|
-
}),
|
|
6299
|
-
];
|
|
6300
|
-
break;
|
|
6301
|
-
}
|
|
6302
|
-
default: {
|
|
6303
|
-
returnedActions = [];
|
|
6304
|
-
}
|
|
6305
|
-
}
|
|
6306
|
-
return [...returnedActions];
|
|
6307
|
-
}
|
|
6308
|
-
}
|
|
6309
|
-
|
|
6310
6241
|
var IFormFieldFormat;
|
|
6311
6242
|
(function (IFormFieldFormat) {
|
|
6312
6243
|
IFormFieldFormat["Date"] = "date";
|
|
@@ -7318,6 +7249,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
7318
7249
|
args: [{ providedIn: "root" }]
|
|
7319
7250
|
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
7320
7251
|
|
|
7252
|
+
class StaticDataPatchUpdateBehavior extends Behavior {
|
|
7253
|
+
constructor(action, result) {
|
|
7254
|
+
super(action);
|
|
7255
|
+
this.action = action;
|
|
7256
|
+
this.result = result;
|
|
7257
|
+
}
|
|
7258
|
+
resolve() {
|
|
7259
|
+
const status = this.result.data?.status;
|
|
7260
|
+
let returnedActions;
|
|
7261
|
+
const error = this.result.data.body?.error;
|
|
7262
|
+
switch (status) {
|
|
7263
|
+
case ResponseStatus.STATUS_200:
|
|
7264
|
+
case ResponseStatus.STATUS_201: {
|
|
7265
|
+
const response = this.result.data;
|
|
7266
|
+
const { data, meta } = response.body;
|
|
7267
|
+
returnedActions = [
|
|
7268
|
+
StaticDataPatchUpdateSuccess({ payload: { data, contentType: meta?.staticDataType, itemId: data.id } })
|
|
7269
|
+
];
|
|
7270
|
+
break;
|
|
7271
|
+
}
|
|
7272
|
+
default: {
|
|
7273
|
+
returnedActions = [
|
|
7274
|
+
StaticDataPatchUpdateFail({
|
|
7275
|
+
payload: {
|
|
7276
|
+
error,
|
|
7277
|
+
contentType: error?.payload?.contentType,
|
|
7278
|
+
itemId: error?.payload?.itemId
|
|
7279
|
+
}
|
|
7280
|
+
})
|
|
7281
|
+
];
|
|
7282
|
+
}
|
|
7283
|
+
}
|
|
7284
|
+
return [...returnedActions];
|
|
7285
|
+
}
|
|
7286
|
+
}
|
|
7287
|
+
|
|
7288
|
+
class StaticDataBulkUpdateOrCreateBehavior extends Behavior {
|
|
7289
|
+
constructor(action, result) {
|
|
7290
|
+
super(action);
|
|
7291
|
+
this.action = action;
|
|
7292
|
+
this.result = result;
|
|
7293
|
+
}
|
|
7294
|
+
resolve() {
|
|
7295
|
+
const status = this.result.data.status;
|
|
7296
|
+
const error = this.result.data?.body?.error;
|
|
7297
|
+
let returnedActions;
|
|
7298
|
+
const response = this.result.data;
|
|
7299
|
+
switch (status) {
|
|
7300
|
+
case ResponseStatus.STATUS_200: {
|
|
7301
|
+
const { data, meta } = response.body;
|
|
7302
|
+
returnedActions = [
|
|
7303
|
+
StaticDataBulkUpdateOrCreateSuccess({
|
|
7304
|
+
payload: {
|
|
7305
|
+
items: data,
|
|
7306
|
+
contentType: meta.staticDataType,
|
|
7307
|
+
bulkFilter: meta.bulkFilter
|
|
7308
|
+
}
|
|
7309
|
+
}),
|
|
7310
|
+
];
|
|
7311
|
+
break;
|
|
7312
|
+
}
|
|
7313
|
+
default: {
|
|
7314
|
+
returnedActions = [];
|
|
7315
|
+
}
|
|
7316
|
+
}
|
|
7317
|
+
return [...returnedActions];
|
|
7318
|
+
}
|
|
7319
|
+
}
|
|
7320
|
+
|
|
7321
7321
|
class StaticDataEffects extends BaseEffects {
|
|
7322
7322
|
constructor(actions$, store, authenticationService, staticDataService, routerService, notificationsFacade) {
|
|
7323
7323
|
super(actions$, store);
|
|
@@ -9862,6 +9862,7 @@ class FormFieldComponent {
|
|
|
9862
9862
|
panelUrl: this.appConfig.panelUrl
|
|
9863
9863
|
};
|
|
9864
9864
|
this.ckeConfig = {
|
|
9865
|
+
licenseKey: 'GPL',
|
|
9865
9866
|
extraPlugins: 'image,uploadimage,tabletools,undo,indent,justify,showblocks',
|
|
9866
9867
|
fileTools_requestHeaders: {
|
|
9867
9868
|
'Authorization': `JWT ${token}`
|
|
@@ -9890,7 +9891,7 @@ class FormFieldComponent {
|
|
|
9890
9891
|
*/
|
|
9891
9892
|
}
|
|
9892
9893
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldComponent, deps: [{ token: CORE_CONFIG }, { token: AuthenticationService }, { token: CoreFacade }, { token: i0.ChangeDetectorRef }, { token: i1$4.MatDialog }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9893
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormFieldComponent, selector: "shared-form-field", inputs: { fields: "fields", formData: "formData", config: "config", fieldData: "fieldData", itemId: "itemId", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", publicationMessages: "publicationMessages", entityTypeUserRoleRights: "entityTypeUserRoleRights", autoCompleteFields: "autoCompleteFields", entityPermissionUpdateDanyFields: "entityPermissionUpdateDanyFields" }, outputs: { eventUpdateForm: "eventUpdateForm", eventSendAction: "eventSendAction" }, ngImport: i0, template: "<div *ngIf=\"!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 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\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 <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\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 </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n } @else {\n <shared-form-field-input-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-input-show>\n }\n </ng-container>\n </ng-container>\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 <!-- <shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>-->\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 } @else {\n <ng-container *ngComponentOutlet=\"fieldData.options?.showing?.customEditViewComponent;\n injector: componentDataInjector;\"/>\n }\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl && 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:#009ce542}.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;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:9px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width label{position:absolute;margin-top:-9px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { 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$3.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: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.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$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11.CKEditorComponent, selector: "ckeditor", inputs: ["config", "editorUrl", "tagName", "type", "data", "readOnly"], outputs: ["namespaceLoaded", "ready", "dataReady", "change", "dataChange", "dragStart", "dragEnd", "drop", "fileUploadResponse", "fileUploadRequest", "focus", "paste", "afterPaste", "blur"] }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["config", "fieldData", "form", "autoCompleteFields"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldFileComponent, selector: "shared-form-field-file", inputs: ["config", "fieldData", "form", "entity"] }, { kind: "component", type: FormFieldFilesComponent, selector: "shared-form-field-files", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldFileShowComponent, selector: "shared-form-field-file-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleShowComponent, selector: "shared-form-field-slide-toggle-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldInputShowComponent, selector: "shared-form-field-input-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldFilesShowComponent, selector: "shared-form-field-files-show", inputs: ["config", "fieldData", "entityId", "entitySection"] }, { kind: "component", type: FormFieldJsonShowComponent, selector: "shared-form-field-json-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldTagsComponent, selector: "shared-form-field-tags", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldTextareaShowComponent, selector: "shared-form-field-textarea-show", inputs: ["config", "fieldData", "value"] }], animations: [appearFromLeft], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9894
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormFieldComponent, selector: "shared-form-field", inputs: { fields: "fields", formData: "formData", config: "config", fieldData: "fieldData", itemId: "itemId", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", publicationMessages: "publicationMessages", entityTypeUserRoleRights: "entityTypeUserRoleRights", autoCompleteFields: "autoCompleteFields", entityPermissionUpdateDanyFields: "entityPermissionUpdateDanyFields" }, outputs: { eventUpdateForm: "eventUpdateForm", eventSendAction: "eventSendAction" }, ngImport: i0, template: "<div *ngIf=\"!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 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\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 <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\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 </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n } @else {\n <shared-form-field-input-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-input-show>\n }\n </ng-container>\n </ng-container>\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 <!-- <shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>-->\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 } @else {\n <ng-container *ngComponentOutlet=\"fieldData.options?.showing?.customEditViewComponent;\n injector: componentDataInjector;\"/>\n }\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl && 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:#009ce542}.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;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:9px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width label{position:absolute;margin-top:-9px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { 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$3.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: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.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$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["config", "fieldData", "form", "autoCompleteFields"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldFileComponent, selector: "shared-form-field-file", inputs: ["config", "fieldData", "form", "entity"] }, { kind: "component", type: FormFieldFilesComponent, selector: "shared-form-field-files", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldFileShowComponent, selector: "shared-form-field-file-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleShowComponent, selector: "shared-form-field-slide-toggle-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldInputShowComponent, selector: "shared-form-field-input-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldFilesShowComponent, selector: "shared-form-field-files-show", inputs: ["config", "fieldData", "entityId", "entitySection"] }, { kind: "component", type: FormFieldJsonShowComponent, selector: "shared-form-field-json-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldTagsComponent, selector: "shared-form-field-tags", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldTextareaShowComponent, selector: "shared-form-field-textarea-show", inputs: ["config", "fieldData", "value"] }], animations: [appearFromLeft], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9894
9895
|
}
|
|
9895
9896
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
9896
9897
|
type: Component,
|
|
@@ -10285,6 +10286,7 @@ class AutoFormMainComponent {
|
|
|
10285
10286
|
this.globalSubscription.unsubscribe();
|
|
10286
10287
|
}
|
|
10287
10288
|
ngOnChanges(changes) {
|
|
10289
|
+
console.log('ngOnChanges', changes);
|
|
10288
10290
|
if ((changes.entity && changes.entity.currentValue !== this.currentEntity) ||
|
|
10289
10291
|
(changes.itemId && changes.itemId.currentValue !== this.currentItemId)) {
|
|
10290
10292
|
this.globalSubscription.unsubscribe();
|
|
@@ -10293,6 +10295,7 @@ class AutoFormMainComponent {
|
|
|
10293
10295
|
}
|
|
10294
10296
|
}
|
|
10295
10297
|
groupClick(groupName) {
|
|
10298
|
+
console.log('2');
|
|
10296
10299
|
this.groupsState[groupName] = !this.groupsState[groupName];
|
|
10297
10300
|
}
|
|
10298
10301
|
truckByFieldName(index, item) {
|
|
@@ -10379,6 +10382,7 @@ class AutoFormMainComponent {
|
|
|
10379
10382
|
this.groupedFields[groupName].push({ ...formField });
|
|
10380
10383
|
}
|
|
10381
10384
|
});
|
|
10385
|
+
console.log('1');
|
|
10382
10386
|
Object.keys(this.groupedFields)?.forEach((group, index) => {
|
|
10383
10387
|
this.groupsState[group] = index === 0;
|
|
10384
10388
|
});
|
|
@@ -10442,7 +10446,7 @@ class AutoFormMainComponent {
|
|
|
10442
10446
|
.subscribe((formValue) => {
|
|
10443
10447
|
// Need to update controls for fields with "option.showIf"
|
|
10444
10448
|
this.checkShowIfFieldsAndAddRequiredValidations();
|
|
10445
|
-
this.groupFields();
|
|
10449
|
+
// this.groupFields();
|
|
10446
10450
|
const areEquals = this.areObjectsEquals(formValue, this.storedFormValue);
|
|
10447
10451
|
if (!areEquals) {
|
|
10448
10452
|
this.storedFormValue = formValue;
|
|
@@ -10547,11 +10551,11 @@ class AutoFormMainComponent {
|
|
|
10547
10551
|
return result;
|
|
10548
10552
|
}
|
|
10549
10553
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AutoFormMainComponent, deps: [{ token: FormErrorsFacade }, { token: FormsFacade }, { token: BaseAutoFormService }, { token: AutoFormService }, { token: PublicationMessagesFacade }, { token: i2.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10550
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: { fields: "fields", itemId: ["itemId", "itemId", numberAttribute], formId: "formId", showPublicationMessages: "showPublicationMessages", useEntityPermissions: "useEntityPermissions", showProgressBar: "showProgressBar", showFormMessageBox: "showFormMessageBox", 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=\"showProgressBar && 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
|
|
10554
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: { fields: "fields", itemId: ["itemId", "itemId", numberAttribute], formId: "formId", showPublicationMessages: "showPublicationMessages", useEntityPermissions: "useEntityPermissions", showProgressBar: "showProgressBar", showFormMessageBox: "showFormMessageBox", 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=\"showProgressBar && 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<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" 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 [ngClass]=\"{'small-form-width': config?.smallFormWidth}\"\n class=\"row form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row\"\n [ngClass]=\"getFormFieldClass(item)\">\n <div *ngIf=\"isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [config]=\"config\"\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [fields]=\"fields\"\n [formData]=\"form.value\"\n [publicationMessages]=\"allPublicationMessages\"\n [autoCompleteFields]=\"autoCompleteFields\"\n [entityPermissionUpdateDanyFields]=\"entityPermissionUpdateDanyFields\"\n ></shared-form-field>\n </div>\n <div *ngIf=\"!isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-auto-form-show-field\n [config]=\"config\"\n [fieldData]=\"item\"\n [data]=\"form.value\"\n [entityId]=\"itemId\"\n [entitySection]=\"entity\"\n ></shared-auto-form-show-field>\n </div>\n </div>\n </div>\n</div>\n\n<div @appearFromLeft *ngIf=\"showFormMessageBox && 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 *ngIf=\"showFormMessageBox\"\n class=\"mt-20 mb-10\"\n [form]=\"form\"\n [fields]=\"fields\"\n [errorMessageTexts]=\"errorMessageTexts\"></shred-form-message-box>\n\n<ng-container *ngIf=\"showFormMessageBox && 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\n<ng-container *ngIf=\"isAvailableToUpdate\">\n <ng-content select=\"[submitButton]\"></ng-content>\n</ng-container>\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,.small-form-width .form-field-row{margin-bottom:10px}.small-form-width .show-label{margin-bottom:0!important}.form-field-group-title{font-size:18px;display:flex;margin-top:15px;background:#f5f5f5;padding:10px;border-radius:8px}\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$1.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: ["fields", "formData", "config", "fieldData", "itemId", "form", "editorImageUploadUrl", "errorMessageTexts", "entity", "publicationMessages", "entityTypeUserRoleRights", "autoCompleteFields", "entityPermissionUpdateDanyFields"], outputs: ["eventUpdateForm", "eventSendAction"] }, { kind: "component", type: AutoFormShowFieldComponent, selector: "shared-auto-form-show-field", inputs: ["fieldData", "data", "entityId", "entitySection", "config"] }, { 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 }); }
|
|
10551
10555
|
}
|
|
10552
10556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AutoFormMainComponent, decorators: [{
|
|
10553
10557
|
type: Component,
|
|
10554
|
-
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && 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
|
|
10558
|
+
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && 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<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" 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 [ngClass]=\"{'small-form-width': config?.smallFormWidth}\"\n class=\"row form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row\"\n [ngClass]=\"getFormFieldClass(item)\">\n <div *ngIf=\"isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [config]=\"config\"\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [fields]=\"fields\"\n [formData]=\"form.value\"\n [publicationMessages]=\"allPublicationMessages\"\n [autoCompleteFields]=\"autoCompleteFields\"\n [entityPermissionUpdateDanyFields]=\"entityPermissionUpdateDanyFields\"\n ></shared-form-field>\n </div>\n <div *ngIf=\"!isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-auto-form-show-field\n [config]=\"config\"\n [fieldData]=\"item\"\n [data]=\"form.value\"\n [entityId]=\"itemId\"\n [entitySection]=\"entity\"\n ></shared-auto-form-show-field>\n </div>\n </div>\n </div>\n</div>\n\n<div @appearFromLeft *ngIf=\"showFormMessageBox && 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 *ngIf=\"showFormMessageBox\"\n class=\"mt-20 mb-10\"\n [form]=\"form\"\n [fields]=\"fields\"\n [errorMessageTexts]=\"errorMessageTexts\"></shred-form-message-box>\n\n<ng-container *ngIf=\"showFormMessageBox && 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\n<ng-container *ngIf=\"isAvailableToUpdate\">\n <ng-content select=\"[submitButton]\"></ng-content>\n</ng-container>\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,.small-form-width .form-field-row{margin-bottom:10px}.small-form-width .show-label{margin-bottom:0!important}.form-field-group-title{font-size:18px;display:flex;margin-top:15px;background:#f5f5f5;padding:10px;border-radius:8px}\n"] }]
|
|
10555
10559
|
}], ctorParameters: () => [{ type: FormErrorsFacade }, { type: FormsFacade }, { type: BaseAutoFormService }, { type: AutoFormService }, { type: PublicationMessagesFacade }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }], propDecorators: { fields: [{
|
|
10556
10560
|
type: Input,
|
|
10557
10561
|
args: [{ required: true }]
|