wt-front-shared 19.0.38 → 19.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/fesm2022/wt-front-shared.mjs +1238 -381
- package/fesm2022/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/form-validation/form-validation.effects.d.ts +2 -2
- package/lib/core/+state/static-data/static-data.actions.d.ts +7 -0
- package/lib/core/+state/static-data/static-data.facade.d.ts +8 -2
- package/lib/core/components/auto-form/auto-form.module.d.ts +4 -2
- package/lib/core/components/auto-form/components/form-field-file/form-field-file.component.d.ts +7 -1
- package/lib/core/components/auto-form/components/form-field-file-show/form-field-file-show.component.d.ts +5 -0
- package/lib/core/components/auto-form/components/form-field-rating/form-field-rating.component.d.ts +12 -0
- package/lib/core/components/auto-form/components/form-field-select/form-field-select.component.d.ts +22 -4
- package/lib/core/components/auto-form/components/form-field-select-show/form-field-select-show.component.d.ts +1 -0
- package/lib/core/components/auto-form/containers/auto-form-main/auto-form-main.component.d.ts +2 -1
- package/lib/core/components/auto-form/containers/auto-form-show/auto-form-show.component.d.ts +13 -4
- package/lib/core/components/auto-form/containers/form-field/form-field.component.d.ts +1 -1
- package/lib/core/components/auto-form/interfaces/dynamic-form-question-type.d.ts +7 -0
- package/lib/core/components/auto-form/interfaces/form-field-others.d.ts +12 -3
- package/lib/core/components/files-upload/files-upload/files-upload.component.d.ts +3 -3
- package/lib/core/components/index.d.ts +2 -0
- package/lib/core/components/star-rating/star-rating.component.d.ts +4 -2
- package/lib/core/components/star-rating/star-rating.module.d.ts +2 -1
- package/lib/core/components/static-data/components/static-data-create-new-dialog/static-data-create-new-dialog.component.d.ts +15 -0
- package/lib/core/components/static-data/components/static-data-create-new-dynamic-form-dialog/static-data-create-new-dynamic-form-dialog.component.d.ts +24 -0
- package/lib/core/components/static-data/components/static-data-create-new-item-dialog/static-data-create-new-item-dialog.component.d.ts +26 -0
- package/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.d.ts +20 -7
- package/lib/core/components/static-data/components/view-static-data-details-dialog/view-static-data-details-dialog.component.d.ts +2 -4
- package/lib/core/components/static-data/containers/static-data-details/static-data-details.component.d.ts +16 -6
- package/lib/core/components/static-data/containers/static-data-items/static-data-items.component.d.ts +14 -5
- package/lib/core/components/static-data/containers/static-data-list/static-data-list.component.d.ts +17 -4
- package/lib/core/components/static-data/containers/static-data-view/static-data-view.component.d.ts +8 -5
- package/lib/core/components/static-data/interfaces/static-data.interface.d.ts +11 -0
- package/lib/core/components/static-data/services/static-data.service.service.d.ts +13 -0
- package/lib/core/tokens/index.d.ts +5 -1
- package/lib/models/config/app-config.d.ts +4 -0
- package/lib/models/endpoints/static-data/static-data-create/request/static-data-create-request-config.d.ts +4 -0
- package/lib/models/endpoints/static-data/static-data-update/request/static-data-update-request-config.d.ts +4 -0
- package/lib/models/models/static-data/static-data.model.d.ts +1 -0
- package/package.json +1 -1
- package/lib/core/components/auto-form/components/form-field-dynamic-form/form-field-relation-entity.component.d.ts +0 -26
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, Inject, PLATFORM_ID, Injector, NgModule, Input, ChangeDetectionStrategy, Component, EventEmitter, Output, ViewChild, numberAttribute,
|
|
2
|
+
import { InjectionToken, Injectable, Inject, PLATFORM_ID, Injector, NgModule, Input, ChangeDetectionStrategy, Component, EventEmitter, Output, signal, Optional, ViewChild, numberAttribute, ViewChildren, inject, ElementRef, forwardRef, ContentChild, Directive, Pipe } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common/http';
|
|
4
|
-
import { of, BehaviorSubject, throwError, switchMap, ReplaySubject, Subject, EMPTY, Subscription, merge, fromEvent } from 'rxjs';
|
|
4
|
+
import { of, BehaviorSubject, throwError, switchMap, ReplaySubject, Subject, EMPTY, Subscription, combineLatest, Observable, merge, fromEvent } from 'rxjs';
|
|
5
5
|
import { map, catchError, take, filter as filter$1, tap, distinctUntilChanged, switchMap as switchMap$1, flatMap, withLatestFrom, first, mergeMap, takeUntil, startWith } from 'rxjs/operators';
|
|
6
6
|
import { get } from 'lodash';
|
|
7
7
|
import * as i1 from '@ngrx/store';
|
|
8
8
|
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, select } from '@ngrx/store';
|
|
9
9
|
import { filter } from 'rxjs/internal/operators/filter';
|
|
10
10
|
import * as i1$4 from '@angular/common';
|
|
11
|
-
import { isPlatformBrowser, isPlatformServer, APP_BASE_HREF, DatePipe, NgIf, CommonModule, NgForOf, AsyncPipe, NgClass, NgComponentOutlet } from '@angular/common';
|
|
11
|
+
import { isPlatformBrowser, isPlatformServer, APP_BASE_HREF, DatePipe, NgIf, CommonModule, NgForOf, AsyncPipe, JsonPipe, NgClass, NgComponentOutlet } from '@angular/common';
|
|
12
12
|
import * as i1$2 from '@angular/router';
|
|
13
13
|
import { RouterModule, NavigationEnd, RouterLink } from '@angular/router';
|
|
14
14
|
import * as i2 from 'ngx-cookie-service';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i3 from '@angular/forms';
|
|
16
16
|
import { Validators, FormControl, FormGroup, UntypedFormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
17
17
|
import * as i1$3 from '@ngrx/effects';
|
|
18
18
|
import { createEffect, ofType } from '@ngrx/effects';
|
|
19
19
|
import objectHash from 'object-hash';
|
|
20
20
|
import * as i1$5 from '@angular/platform-browser';
|
|
21
21
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
22
|
-
import * as i3 from 'ngx-toastr';
|
|
22
|
+
import * as i3$1 from 'ngx-toastr';
|
|
23
23
|
import * as i1$6 from '@angular/material/dialog';
|
|
24
24
|
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogActions, MatDialogContent, MatDialogRef } from '@angular/material/dialog';
|
|
25
25
|
import { trigger, transition, animate, keyframes, style, state } from '@angular/animations';
|
|
@@ -34,25 +34,29 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
|
34
34
|
import { switchMap as switchMap$2 } from 'rxjs/internal/operators/switchMap';
|
|
35
35
|
import * as i2$4 from '@angular/material/form-field';
|
|
36
36
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
37
|
-
import * as i3$
|
|
37
|
+
import * as i3$2 from '@angular/material/input';
|
|
38
38
|
import { MatInputModule, MatFormField, MatInput, MatSuffix } from '@angular/material/input';
|
|
39
39
|
import * as i2$5 from '@angular/material/slide-toggle';
|
|
40
40
|
import { MatSlideToggleModule, MatSlideToggle } from '@angular/material/slide-toggle';
|
|
41
|
-
import * as
|
|
41
|
+
import * as i6 from '@angular/material/select';
|
|
42
42
|
import { MatSelectModule, MatSelect, MatOption } from '@angular/material/select';
|
|
43
|
-
import * as i7$
|
|
43
|
+
import * as i7$1 from '@angular/material/chips';
|
|
44
44
|
import { MatChipsModule } from '@angular/material/chips';
|
|
45
45
|
import * as i8 from '@angular/material/autocomplete';
|
|
46
46
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
47
|
-
import * as i7
|
|
47
|
+
import * as i7 from 'ngx-mask';
|
|
48
48
|
import { NgxMaskDirective, NgxMaskPipe, provideNgxMask } from 'ngx-mask';
|
|
49
|
-
import * as
|
|
49
|
+
import * as i9 from 'ngx-mat-select-search';
|
|
50
50
|
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
51
|
-
import * as
|
|
51
|
+
import * as i10 from '@angular/material/checkbox';
|
|
52
|
+
import { MatCheckbox } from '@angular/material/checkbox';
|
|
53
|
+
import * as i11 from '@angular/material/radio';
|
|
54
|
+
import { MatRadioButton, MatRadioGroup } from '@angular/material/radio';
|
|
55
|
+
import * as i3$3 from '@angular/cdk/drag-drop';
|
|
52
56
|
import { moveItemInArray, DragDropModule, CdkDropList, CdkDragPlaceholder, CdkDrag } from '@angular/cdk/drag-drop';
|
|
53
|
-
import * as i6 from 'ng2-file-upload';
|
|
57
|
+
import * as i6$1 from 'ng2-file-upload';
|
|
54
58
|
import { FileUploader, FileUploadModule } from 'ng2-file-upload';
|
|
55
|
-
import * as i5$
|
|
59
|
+
import * as i5$1 from '@angular/material/progress-bar';
|
|
56
60
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
57
61
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
58
62
|
import * as i2$6 from '@ckeditor/ckeditor5-angular';
|
|
@@ -66,8 +70,7 @@ import { MatCardSubtitle, MatCardHeader, MatCardContent, MatCardTitle, MatCard }
|
|
|
66
70
|
import { MatSort } from '@angular/material/sort';
|
|
67
71
|
import * as i2$7 from '@angular/material/menu';
|
|
68
72
|
import { MatMenu, MatMenuTrigger, MatMenuItem, MatMenuModule } from '@angular/material/menu';
|
|
69
|
-
import
|
|
70
|
-
import * as i6$1 from '@angular/material/datepicker';
|
|
73
|
+
import * as i6$2 from '@angular/material/datepicker';
|
|
71
74
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
72
75
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
73
76
|
import { MatGridListModule } from '@angular/material/grid-list';
|
|
@@ -1305,12 +1308,13 @@ class StaticDataCreateRequest extends PostRequest {
|
|
|
1305
1308
|
return null;
|
|
1306
1309
|
}
|
|
1307
1310
|
get body() {
|
|
1308
|
-
const { data, formId, contentType } = this.config;
|
|
1311
|
+
const { data, formId, contentType, options } = this.config;
|
|
1309
1312
|
const comment = {
|
|
1310
1313
|
data,
|
|
1311
1314
|
meta: {
|
|
1312
1315
|
formId,
|
|
1313
|
-
contentType
|
|
1316
|
+
contentType,
|
|
1317
|
+
dynamicFormKey: options?.dynamicFormKey,
|
|
1314
1318
|
}
|
|
1315
1319
|
};
|
|
1316
1320
|
return this.makeFormData({ ...this.cleanParams(comment) });
|
|
@@ -1333,13 +1337,14 @@ class StaticDataUpdateRequest extends PutRequest {
|
|
|
1333
1337
|
return null;
|
|
1334
1338
|
}
|
|
1335
1339
|
get body() {
|
|
1336
|
-
const { data, formId, contentType, itemId } = this.config;
|
|
1340
|
+
const { data, formId, contentType, itemId, options } = this.config;
|
|
1337
1341
|
const comment = {
|
|
1338
1342
|
data,
|
|
1339
1343
|
meta: {
|
|
1340
1344
|
formId,
|
|
1341
1345
|
contentType,
|
|
1342
|
-
itemId
|
|
1346
|
+
itemId,
|
|
1347
|
+
dynamicFormKey: options?.dynamicFormKey,
|
|
1343
1348
|
}
|
|
1344
1349
|
};
|
|
1345
1350
|
return this.makeFormData({ ...this.cleanParams(comment) });
|
|
@@ -1858,6 +1863,10 @@ class ActionsApi extends BaseAPI {
|
|
|
1858
1863
|
|
|
1859
1864
|
const CORE_CONFIG = new InjectionToken('SHARED_CORE_CONFIG');
|
|
1860
1865
|
// export const AUTH_SERVICE_CONFIG: InjectionToken<SocialAuthServiceConfig> = new InjectionToken<SocialAuthServiceConfig>('AUTH_SERVICE_CONFIG');
|
|
1866
|
+
const STATIC_DATA_CREATE_NEW_DIALOG = new InjectionToken('STATIC_DATA_CREATE_NEW_DIALOG');
|
|
1867
|
+
const STATIC_DATA_CREATE_NEW_DYNAMIC_FORM_DIALOG = new InjectionToken('STATIC_DATA_CREATE_NEW_DYNAMIC_FORM_DIALOG');
|
|
1868
|
+
const STATIC_DATA_CREATE_NEW_ITEM_DIALOG = new InjectionToken('STATIC_DATA_CREATE_NEW_ITEM_DIALOG');
|
|
1869
|
+
const STATIC_DATA_VIEW_ITEM_DIALOG = new InjectionToken('STATIC_DATA_VIEW_ITEM_DIALOG');
|
|
1861
1870
|
|
|
1862
1871
|
const CreateRequestListener = createAction('[Requests] Create Request listener', props());
|
|
1863
1872
|
const CreateRequestListenerByFormId = createAction('[Requests] Create Request listener by formId', props());
|
|
@@ -2648,6 +2657,9 @@ var ValidatorsType;
|
|
|
2648
2657
|
class BaseAutoFormService {
|
|
2649
2658
|
getPreparedFields(fields, formData) {
|
|
2650
2659
|
const result = {};
|
|
2660
|
+
if (!fields?.length) {
|
|
2661
|
+
throw new Error('[ base-auto-form.service ][ Fields is empty ]');
|
|
2662
|
+
}
|
|
2651
2663
|
fields
|
|
2652
2664
|
.filter(field => !field.options || !field.options.hide)
|
|
2653
2665
|
.forEach((item) => {
|
|
@@ -4692,7 +4704,7 @@ const getStaticDataForListContentTypes = (contentTypes, langId) => createSelecto
|
|
|
4692
4704
|
});
|
|
4693
4705
|
return result;
|
|
4694
4706
|
});
|
|
4695
|
-
const getStaticDataItem = (contentType, subSection, itemIdOrSlug, langId) => createSelector(getStaticDataState$1, (state) => {
|
|
4707
|
+
const getStaticDataItem = (contentType, subSection = 'list', itemIdOrSlug, langId) => createSelector(getStaticDataState$1, (state) => {
|
|
4696
4708
|
const foundItem = state.list[contentType]?.[subSection]?.find(item => {
|
|
4697
4709
|
if (langId) {
|
|
4698
4710
|
return Number(item.id) === Number(itemIdOrSlug) || (item._langId === langId && (item?.slug === itemIdOrSlug || item?.slug + '.html' === itemIdOrSlug));
|
|
@@ -4835,13 +4847,14 @@ class StaticDataFacade {
|
|
|
4835
4847
|
payload: { data: newRevisions }
|
|
4836
4848
|
}));
|
|
4837
4849
|
}
|
|
4838
|
-
create(formId, contentType, data, publicApi = false) {
|
|
4850
|
+
create(formId, contentType, data, publicApi = false, options = { redirectAfterSave: true }) {
|
|
4839
4851
|
this.store.dispatch(StaticDataCreate({
|
|
4840
4852
|
payload: {
|
|
4841
4853
|
formId,
|
|
4842
4854
|
contentType,
|
|
4843
4855
|
data,
|
|
4844
|
-
publicApi
|
|
4856
|
+
publicApi,
|
|
4857
|
+
options
|
|
4845
4858
|
}
|
|
4846
4859
|
}));
|
|
4847
4860
|
}
|
|
@@ -4856,14 +4869,15 @@ class StaticDataFacade {
|
|
|
4856
4869
|
}
|
|
4857
4870
|
}));
|
|
4858
4871
|
}
|
|
4859
|
-
update(formId, contentType, itemId, data, publicApi = false) {
|
|
4872
|
+
update(formId, contentType, itemId, data, publicApi = false, options = { redirectAfterSave: true }) {
|
|
4860
4873
|
this.store.dispatch(StaticDataUpdate({
|
|
4861
4874
|
payload: {
|
|
4862
4875
|
formId,
|
|
4863
4876
|
contentType,
|
|
4864
4877
|
itemId,
|
|
4865
4878
|
data,
|
|
4866
|
-
publicApi
|
|
4879
|
+
publicApi,
|
|
4880
|
+
options
|
|
4867
4881
|
}
|
|
4868
4882
|
}));
|
|
4869
4883
|
}
|
|
@@ -5280,9 +5294,7 @@ let RefreshTokenBehavior = class RefreshTokenBehavior extends Behavior {
|
|
|
5280
5294
|
const userData = this.modelAdapter.convertItem(UserModel, user);
|
|
5281
5295
|
console.info('[ refresh-token-behavior ][ STATUS_200 ][ RefreshTokenSuccess ]', currentToken, '!==', userData.token);
|
|
5282
5296
|
if (currentToken !== userData.token) {
|
|
5283
|
-
console.log('appConfig', this.appConfig, this.appConfig?.['SSOCookies']?.['accessTokenCookeName']);
|
|
5284
5297
|
if (this.appConfig?.['env'] === 'local-prod' && this.appConfig?.['SSOCookies']?.['accessTokenCookeName']) {
|
|
5285
|
-
console.log('cookie.saved');
|
|
5286
5298
|
this.cookiesService.setItem(this.appConfig['SSOCookies']?.['accessTokenCookeName'], userData.token);
|
|
5287
5299
|
this.cookiesService.setItem(this.appConfig['SSOCookies']?.['refreshTokenCookeName'], userData.refreshToken);
|
|
5288
5300
|
}
|
|
@@ -5328,7 +5340,7 @@ const initialState$9 = {
|
|
|
5328
5340
|
loaded: false
|
|
5329
5341
|
};
|
|
5330
5342
|
const _userReducer = createReducer(initialState$9, on(LoadUsersSuccess, (state, action) => {
|
|
5331
|
-
console.
|
|
5343
|
+
console.info('[ reduce ][ LoadUsersSuccess ]', { ...state });
|
|
5332
5344
|
if (!state.loaded) {
|
|
5333
5345
|
return {
|
|
5334
5346
|
...state,
|
|
@@ -5337,7 +5349,7 @@ const _userReducer = createReducer(initialState$9, on(LoadUsersSuccess, (state,
|
|
|
5337
5349
|
}
|
|
5338
5350
|
return state;
|
|
5339
5351
|
}), on(SetLoaded, RefreshToken, (state, action) => {
|
|
5340
|
-
console.
|
|
5352
|
+
console.info('[ reduce ][ RefreshToken/SetLoaded ]', { ...state });
|
|
5341
5353
|
if (state.loaded) {
|
|
5342
5354
|
return {
|
|
5343
5355
|
...state,
|
|
@@ -5381,7 +5393,7 @@ const getError$3 = createSelector(getUsersState, (state) => {
|
|
|
5381
5393
|
return state;
|
|
5382
5394
|
});
|
|
5383
5395
|
const getUser = createSelector(getUsersState, (state) => {
|
|
5384
|
-
console.
|
|
5396
|
+
console.info('[ users.selector ][ getUser ]');
|
|
5385
5397
|
return state?.token ? state : null;
|
|
5386
5398
|
});
|
|
5387
5399
|
const getUserAuthData = createSelector(getUsersState, (userSate) => {
|
|
@@ -5579,15 +5591,15 @@ class UsersEffects {
|
|
|
5579
5591
|
this.refreshToken$ = createEffect(() => this.actions$.pipe(ofType(RefreshToken), switchMap$1((action) => {
|
|
5580
5592
|
const { refreshToken } = action.payload;
|
|
5581
5593
|
const config = { refreshToken };
|
|
5582
|
-
console.
|
|
5594
|
+
console.info('[ user.effects ][ UsersAction.RefreshToken ]');
|
|
5583
5595
|
return this.usersService.refreshToken(config)
|
|
5584
5596
|
.pipe(tap((r) => {
|
|
5585
|
-
console.
|
|
5597
|
+
console.info('[ user.effects ][ UsersAction.RefreshToken ][ tap ]', r);
|
|
5586
5598
|
}), flatMap((r) => new RefreshTokenBehavior(this.appConfig, action, r, this.authenticationService, this.cookiesService).resolve()));
|
|
5587
5599
|
}), catchError(error => of(RefreshTokenFail(error)))));
|
|
5588
5600
|
this.refreshTokenSuccess$ = createEffect(() => this.actions$.pipe(ofType(RefreshTokenSuccess), withLatestFrom(this.store.select(usersQuery.getUser)), filter$1(([action, user]) => !user.loaded), tap(([action, user]) => {
|
|
5589
5601
|
const { token, refreshToken, tokenExp } = action.payload;
|
|
5590
|
-
console.
|
|
5602
|
+
console.info('[ user.effects ]refreshTokenSuccess$', action.payload);
|
|
5591
5603
|
this.authenticationService.saveRefreshToken(token, tokenExp, refreshToken);
|
|
5592
5604
|
})), { dispatch: false });
|
|
5593
5605
|
}
|
|
@@ -5870,7 +5882,7 @@ class ButtonComponent {
|
|
|
5870
5882
|
}
|
|
5871
5883
|
}
|
|
5872
5884
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5873
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ButtonComponent, isStandalone: false, selector: "shared-button", inputs: { icon: "icon", iconColor: "iconColor", iconSize: "iconSize", rightIcon: "rightIcon", disabled: "disabled", loading: "loading", active: "active", stopPropagation: "stopPropagation", type: "type", color: "color", fullWidth: "fullWidth", size: "size", styleTheme: "styleTheme", tooltip: "tooltip", tooltipPosition: "tooltipPosition" }, outputs: { clickButton: "clickButton" }, usesOnChanges: true, ngImport: i0, template: "<button\n *ngIf=\"styleTheme === 'basic'\"\n mat-button\n class=\"button-effect\"\n [color]=\"'accent'\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'raised'\"\n mat-raised-button\n class=\"button-effect\"\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'stroked'\"\n mat-stroked-button\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'flat'\"\n mat-flat-button\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container\n *ngTemplateOutlet=\"innerButton; context:{loading: loading, icon: icon, color: color, size: size}\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'fab'\"\n mat-fab\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'mini-fab'\"\n mat-mini-fab\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<ng-template #innerButton\n let-loading=\"loading\"\n let-iconColor=\"iconColor\"\n let-buttonIconSize=\"buttonIconSize\"\n let-icon=\"icon\"\n let-disabled=\"disabled\">\n <shared-ui-icon *ngIf=\"icon\"\n [color]=\"iconColor\"\n [size]=\"buttonIconSize\"\n [icon]=\"icon\"\n [ngClass]=\"[icon]\"></shared-ui-icon>\n <span @appearOpacity\n class=\"text\"\n #text>\n <ng-content></ng-content>\n </span>\n <shared-spinner\n @spinnerAnimation\n *ngIf=\"loading\"\n class=\"loader button-loader\"\n [diameter]=\"spinnerDiameter\"></shared-spinner>\n</ng-template>\n", styles: ["shared-ui-icon{margin-left:0!important;margin-right:5px!important}.button-loader{position:absolute}.width-100{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: IconComponent, selector: "shared-ui-icon", inputs: ["icon", "size", "color"] }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }], animations: [
|
|
5885
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ButtonComponent, isStandalone: false, selector: "shared-button", inputs: { icon: "icon", iconColor: "iconColor", iconSize: "iconSize", rightIcon: "rightIcon", disabled: "disabled", loading: "loading", active: "active", stopPropagation: "stopPropagation", type: "type", color: "color", fullWidth: "fullWidth", size: "size", styleTheme: "styleTheme", tooltip: "tooltip", tooltipPosition: "tooltipPosition" }, outputs: { clickButton: "clickButton" }, usesOnChanges: true, ngImport: i0, template: "<button\n *ngIf=\"styleTheme === 'basic'\"\n mat-button\n class=\"button-effect\"\n [color]=\"'accent'\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'raised'\"\n mat-raised-button\n class=\"button-effect\"\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'stroked'\"\n mat-stroked-button\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'flat'\"\n mat-flat-button\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container\n *ngTemplateOutlet=\"innerButton; context:{loading: loading, icon: icon, color: color, size: size}\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'fab'\"\n mat-fab\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'mini-fab'\"\n mat-mini-fab\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<ng-template #innerButton\n let-loading=\"loading\"\n let-iconColor=\"iconColor\"\n let-buttonIconSize=\"buttonIconSize\"\n let-icon=\"icon\"\n let-disabled=\"disabled\">\n <shared-ui-icon *ngIf=\"icon\"\n [color]=\"iconColor\"\n [size]=\"buttonIconSize\"\n [icon]=\"icon\"\n [ngClass]=\"[icon]\"></shared-ui-icon>\n <span @appearOpacity\n class=\"text\"\n #text>\n <ng-content></ng-content>\n </span>\n <shared-spinner\n @spinnerAnimation\n *ngIf=\"loading\"\n class=\"loader button-loader\"\n [diameter]=\"spinnerDiameter\"></shared-spinner>\n</ng-template>\n", styles: ["shared-ui-icon{margin-left:0!important;margin-right:5px!important}.button-loader{position:absolute}.width-100{width:100%}.small{padding:5px 10px!important}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: IconComponent, selector: "shared-ui-icon", inputs: ["icon", "size", "color"] }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }], animations: [
|
|
5874
5886
|
trigger('spinnerAnimation', [
|
|
5875
5887
|
transition(':enter', [
|
|
5876
5888
|
animate('300ms', keyframes([
|
|
@@ -5906,7 +5918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
5906
5918
|
])
|
|
5907
5919
|
]),
|
|
5908
5920
|
appearOpacity
|
|
5909
|
-
], standalone: false, template: "<button\n *ngIf=\"styleTheme === 'basic'\"\n mat-button\n class=\"button-effect\"\n [color]=\"'accent'\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'raised'\"\n mat-raised-button\n class=\"button-effect\"\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'stroked'\"\n mat-stroked-button\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'flat'\"\n mat-flat-button\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container\n *ngTemplateOutlet=\"innerButton; context:{loading: loading, icon: icon, color: color, size: size}\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'fab'\"\n mat-fab\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'mini-fab'\"\n mat-mini-fab\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<ng-template #innerButton\n let-loading=\"loading\"\n let-iconColor=\"iconColor\"\n let-buttonIconSize=\"buttonIconSize\"\n let-icon=\"icon\"\n let-disabled=\"disabled\">\n <shared-ui-icon *ngIf=\"icon\"\n [color]=\"iconColor\"\n [size]=\"buttonIconSize\"\n [icon]=\"icon\"\n [ngClass]=\"[icon]\"></shared-ui-icon>\n <span @appearOpacity\n class=\"text\"\n #text>\n <ng-content></ng-content>\n </span>\n <shared-spinner\n @spinnerAnimation\n *ngIf=\"loading\"\n class=\"loader button-loader\"\n [diameter]=\"spinnerDiameter\"></shared-spinner>\n</ng-template>\n", styles: ["shared-ui-icon{margin-left:0!important;margin-right:5px!important}.button-loader{position:absolute}.width-100{width:100%}\n"] }]
|
|
5921
|
+
], standalone: false, template: "<button\n *ngIf=\"styleTheme === 'basic'\"\n mat-button\n class=\"button-effect\"\n [color]=\"'accent'\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'raised'\"\n mat-raised-button\n class=\"button-effect\"\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'stroked'\"\n mat-stroked-button\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'flat'\"\n mat-flat-button\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container\n *ngTemplateOutlet=\"innerButton; context:{loading: loading, icon: icon, color: color, size: size}\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'fab'\"\n mat-fab\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<button\n *ngIf=\"styleTheme === 'mini-fab'\"\n mat-mini-fab\n [color]=\"color\"\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class.small]=\"size === 'small'\"\n [class.normal]=\"size === 'normal'\"\n [class.large]=\"size === 'large'\"\n [class.big]=\"size === 'big'\"\n [ngClass]=\"{'width-100': fullWidth}\"\n [matTooltip]=\"tooltip\"\n [matTooltipPosition]=\"tooltipPosition\"\n [matTooltipDisabled]=\"disabled\"\n (click)=\"onClick($event)\"\n [class.active]=\"active\"\n [class.has-right-icon]=\"rightIcon\">\n <ng-container *ngTemplateOutlet=\"innerButton; context: context\"></ng-container>\n</button>\n<ng-template #innerButton\n let-loading=\"loading\"\n let-iconColor=\"iconColor\"\n let-buttonIconSize=\"buttonIconSize\"\n let-icon=\"icon\"\n let-disabled=\"disabled\">\n <shared-ui-icon *ngIf=\"icon\"\n [color]=\"iconColor\"\n [size]=\"buttonIconSize\"\n [icon]=\"icon\"\n [ngClass]=\"[icon]\"></shared-ui-icon>\n <span @appearOpacity\n class=\"text\"\n #text>\n <ng-content></ng-content>\n </span>\n <shared-spinner\n @spinnerAnimation\n *ngIf=\"loading\"\n class=\"loader button-loader\"\n [diameter]=\"spinnerDiameter\"></shared-spinner>\n</ng-template>\n", styles: ["shared-ui-icon{margin-left:0!important;margin-right:5px!important}.button-loader{position:absolute}.width-100{width:100%}.small{padding:5px 10px!important}\n"] }]
|
|
5910
5922
|
}], ctorParameters: () => [], propDecorators: { icon: [{
|
|
5911
5923
|
type: Input
|
|
5912
5924
|
}], iconColor: [{
|
|
@@ -5980,7 +5992,7 @@ class CommonDialogComponent {
|
|
|
5980
5992
|
this.dialogRef.close(undefined);
|
|
5981
5993
|
}
|
|
5982
5994
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CommonDialogComponent, deps: [{ token: i1$6.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5983
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CommonDialogComponent, isStandalone: false, selector: "app-common-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10\"\n @appearFromRightWithDelay\n [class.modal-size-big]=\"data.size === sizeValues.big\"\n [class.modal-size-middle]=\"data.size === sizeValues.middle\"\n [class.modal-size-small]=\"data.size === sizeValues.small\"\n [class.modal-style-success]=\"data.messageType === typesValues.success\"\n [class.modal-style-error]=\"data.messageType === typesValues.error\"\n [class.modal-style-info]=\"data.messageType === typesValues.info\">\n <div [class.display-none]=\"!data.hideButton\"\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n x\n </div>\n\n <h1 class=\"mat-dialog-title\" [class.display-none]=\"!data.title\">{{data.title}}</h1>\n <div mat-dialog-content>\n <p *ngIf=\"data.message\" [innerHTML]=\"data.message\"></p>\n <ng-container *ngIf=\"data.formConfig\">\n <form [formGroup]=\"form\">\n\n <!--<div *ngIf=\"staticSection.actions\" class=\"global-actions\">\n <div *ngFor=\"let action of staticSection.globalActions\"\n (click)=\"globalActionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>-->\n <div @appearFromLeftWithDelay\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n class=\"mt-20\">\n <shared-button\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C</shared-button>\n </div>\n </form>\n </ng-container>\n </div>\n <div [class.display-none]=\"data.hideButton\" mat-dialog-actions class=\"text-align-center mt-20\">\n <button mat-button (click)=\"onNoClick()\"\n class=\"mat-raised-button mr-10\"\n cdkFocusInitial>{{data.falseButtonTitle || '\u041D\u0435\u0442' }}</button>\n <button mat-button\n *ngIf=\"!data.formConfig\"\n [class.display-none]=\"data.hideTrueButton\"\n [class.green-text]=\"data.trueButtonTextColorClass === 'green'\"\n (click)=\"onYesClick()\"\n class=\"mat-raised-button mat-warn\">{{data.trueButtonTitle || '\u0414\u0430' }}</button>\n </div>\n</div>\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-success{border-left:5px solid #4caf50;background:linear-gradient(15deg,#6dcf71c9,#f0f8f0)}.green-text{color:#4caf50}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.style-error{border-left:5px solid #f44336;background:linear-gradient(15deg,#f2686494,#f7e6e4)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}.display-none{display:none}\n"], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$6.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$6.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "directive", type:
|
|
5995
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CommonDialogComponent, isStandalone: false, selector: "app-common-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10\"\n @appearFromRightWithDelay\n [class.modal-size-big]=\"data.size === sizeValues.big\"\n [class.modal-size-middle]=\"data.size === sizeValues.middle\"\n [class.modal-size-small]=\"data.size === sizeValues.small\"\n [class.modal-style-success]=\"data.messageType === typesValues.success\"\n [class.modal-style-error]=\"data.messageType === typesValues.error\"\n [class.modal-style-info]=\"data.messageType === typesValues.info\">\n <div [class.display-none]=\"!data.hideButton\"\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n x\n </div>\n\n <h1 class=\"mat-dialog-title\" [class.display-none]=\"!data.title\">{{data.title}}</h1>\n <div mat-dialog-content>\n <p *ngIf=\"data.message\" [innerHTML]=\"data.message\"></p>\n <ng-container *ngIf=\"data.formConfig\">\n <form [formGroup]=\"form\">\n\n <!--<div *ngIf=\"staticSection.actions\" class=\"global-actions\">\n <div *ngFor=\"let action of staticSection.globalActions\"\n (click)=\"globalActionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>-->\n <div @appearFromLeftWithDelay\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n class=\"mt-20\">\n <shared-button\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C</shared-button>\n </div>\n </form>\n </ng-container>\n </div>\n <div [class.display-none]=\"data.hideButton\" mat-dialog-actions class=\"text-align-center mt-20\">\n <button mat-button (click)=\"onNoClick()\"\n class=\"mat-raised-button mr-10\"\n cdkFocusInitial>{{data.falseButtonTitle || '\u041D\u0435\u0442' }}</button>\n <button mat-button\n *ngIf=\"!data.formConfig\"\n [class.display-none]=\"data.hideTrueButton\"\n [class.green-text]=\"data.trueButtonTextColorClass === 'green'\"\n (click)=\"onYesClick()\"\n class=\"mat-raised-button mat-warn\">{{data.trueButtonTitle || '\u0414\u0430' }}</button>\n </div>\n</div>\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-success{border-left:5px solid #4caf50;background:linear-gradient(15deg,#6dcf71c9,#f0f8f0)}.green-text{color:#4caf50}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.style-error{border-left:5px solid #f44336;background:linear-gradient(15deg,#f2686494,#f7e6e4)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}.display-none{display:none}\n"], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$6.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$6.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5984
5996
|
}
|
|
5985
5997
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CommonDialogComponent, decorators: [{
|
|
5986
5998
|
type: Component,
|
|
@@ -6480,12 +6492,12 @@ class NotificationsEffects {
|
|
|
6480
6492
|
this.notificationsFacade.addNotifications(notification);
|
|
6481
6493
|
}), catchError(error => of(FilesSortFail(error)))), { dispatch: false });
|
|
6482
6494
|
}
|
|
6483
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NotificationsEffects, deps: [{ token: i1$3.Actions }, { token: i1.Store }, { token: i3.ToastrService }, { token: NotificationsFacade }, { token: i1$6.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6495
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NotificationsEffects, deps: [{ token: i1$3.Actions }, { token: i1.Store }, { token: i3$1.ToastrService }, { token: NotificationsFacade }, { token: i1$6.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6484
6496
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NotificationsEffects }); }
|
|
6485
6497
|
}
|
|
6486
6498
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NotificationsEffects, decorators: [{
|
|
6487
6499
|
type: Injectable
|
|
6488
|
-
}], ctorParameters: () => [{ type: i1$3.Actions }, { type: i1.Store }, { type: i3.ToastrService }, { type: NotificationsFacade }, { type: i1$6.MatDialog }] });
|
|
6500
|
+
}], ctorParameters: () => [{ type: i1$3.Actions }, { type: i1.Store }, { type: i3$1.ToastrService }, { type: NotificationsFacade }, { type: i1$6.MatDialog }] });
|
|
6489
6501
|
|
|
6490
6502
|
const TagsLoad = createAction('[Tags] Tags Load', props());
|
|
6491
6503
|
const TagsLoadSuccess = createAction('[Tags] Tags Load Success', props());
|
|
@@ -7511,7 +7523,14 @@ class StaticDataCreateBehavior extends Behavior {
|
|
|
7511
7523
|
case ResponseStatus.STATUS_200: {
|
|
7512
7524
|
const { data, meta } = response.body;
|
|
7513
7525
|
returnedActions = [
|
|
7514
|
-
StaticDataCreateSuccess({
|
|
7526
|
+
StaticDataCreateSuccess({
|
|
7527
|
+
payload: {
|
|
7528
|
+
data,
|
|
7529
|
+
contentType: meta.staticDataType,
|
|
7530
|
+
itemId: data.id,
|
|
7531
|
+
options: this.action?.['payload']?.options
|
|
7532
|
+
}
|
|
7533
|
+
}),
|
|
7515
7534
|
];
|
|
7516
7535
|
break;
|
|
7517
7536
|
}
|
|
@@ -7771,6 +7790,7 @@ class StaticDataEffects extends BaseEffects {
|
|
|
7771
7790
|
formId: action.payload.formId,
|
|
7772
7791
|
contentType: action.payload.contentType,
|
|
7773
7792
|
publicApi: action.payload.publicApi,
|
|
7793
|
+
options: action.payload.options,
|
|
7774
7794
|
};
|
|
7775
7795
|
return this.staticDataService.create(config)
|
|
7776
7796
|
.pipe(flatMap((r) => new StaticDataCreateBehavior(action, r).resolve()));
|
|
@@ -7823,6 +7843,7 @@ class StaticDataEffects extends BaseEffects {
|
|
|
7823
7843
|
formId: action.payload.formId,
|
|
7824
7844
|
contentType: action.payload.contentType,
|
|
7825
7845
|
itemId: action.payload.itemId,
|
|
7846
|
+
options: action.payload.options,
|
|
7826
7847
|
};
|
|
7827
7848
|
return this.staticDataService.update(config)
|
|
7828
7849
|
.pipe(flatMap((r) => new StaticDataUpdateBehavior(action, r).resolve()));
|
|
@@ -8648,10 +8669,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
8648
8669
|
}] });
|
|
8649
8670
|
|
|
8650
8671
|
class FormFieldSelectComponent {
|
|
8651
|
-
constructor(store, staticDataFacade, cd) {
|
|
8672
|
+
constructor(appConfig, store, staticDataFacade, dialog, cd, createNewDialog, createNewDynamicFormDialog) {
|
|
8673
|
+
this.appConfig = appConfig;
|
|
8652
8674
|
this.store = store;
|
|
8653
8675
|
this.staticDataFacade = staticDataFacade;
|
|
8676
|
+
this.dialog = dialog;
|
|
8654
8677
|
this.cd = cd;
|
|
8678
|
+
this.createNewDialog = createNewDialog;
|
|
8679
|
+
this.createNewDynamicFormDialog = createNewDynamicFormDialog;
|
|
8655
8680
|
this.searchCtrl = new FormControl();
|
|
8656
8681
|
this.loaded = false;
|
|
8657
8682
|
this.options = [];
|
|
@@ -8664,6 +8689,7 @@ class FormFieldSelectComponent {
|
|
|
8664
8689
|
this.destroy$ = new Subject();
|
|
8665
8690
|
this.searchValue = '';
|
|
8666
8691
|
this.storeSubList = 'list';
|
|
8692
|
+
this.selectedItem = signal(null);
|
|
8667
8693
|
}
|
|
8668
8694
|
ngOnInit() {
|
|
8669
8695
|
const { subscribeToFormChanges } = this.fieldData.options;
|
|
@@ -8672,9 +8698,11 @@ class FormFieldSelectComponent {
|
|
|
8672
8698
|
this.storeSubList = `form_${this.form.get('id').value || 'new'}_${randomNumber}_${this.fieldData.field}`;
|
|
8673
8699
|
}
|
|
8674
8700
|
if (subscribeToFormChanges) {
|
|
8675
|
-
|
|
8701
|
+
if (subscribeToFormChanges.relatedField) {
|
|
8702
|
+
this.checkRelatedFieldValue();
|
|
8703
|
+
this.placeholder = subscribeToFormChanges.emptyTitle;
|
|
8704
|
+
}
|
|
8676
8705
|
this.subscribeToFormChanges();
|
|
8677
|
-
this.placeholder = subscribeToFormChanges.emptyTitle;
|
|
8678
8706
|
if (subscribeToFormChanges.loadOptionsParameters) {
|
|
8679
8707
|
const relatedFieldValue = this.form.get(subscribeToFormChanges.relatedField).value;
|
|
8680
8708
|
if (relatedFieldValue) {
|
|
@@ -8688,6 +8716,17 @@ class FormFieldSelectComponent {
|
|
|
8688
8716
|
}
|
|
8689
8717
|
}
|
|
8690
8718
|
}
|
|
8719
|
+
if (this.fieldData.options?.loadOptionsAllStaticDataTypes) {
|
|
8720
|
+
this.allOptions = Object.keys(this.appConfig?.staticDataMapping)
|
|
8721
|
+
.map(configItemKey => {
|
|
8722
|
+
return {
|
|
8723
|
+
id: configItemKey,
|
|
8724
|
+
name: this.appConfig?.staticDataMapping[configItemKey].title
|
|
8725
|
+
};
|
|
8726
|
+
});
|
|
8727
|
+
this.isLoading = false;
|
|
8728
|
+
this.options = [...this.allOptions];
|
|
8729
|
+
}
|
|
8691
8730
|
if (this.autoCompleteFields) {
|
|
8692
8731
|
const findField = this.autoCompleteFields.find(item => item.field === this.fieldData.field);
|
|
8693
8732
|
if (findField?.field) {
|
|
@@ -8703,6 +8742,7 @@ class FormFieldSelectComponent {
|
|
|
8703
8742
|
if (this.fieldData.options?.selectOptions?.length) {
|
|
8704
8743
|
this.isLoading = false;
|
|
8705
8744
|
this.options = this.fieldData.options?.selectOptions;
|
|
8745
|
+
this.setSelectedItem();
|
|
8706
8746
|
}
|
|
8707
8747
|
}
|
|
8708
8748
|
ngOnDestroy() {
|
|
@@ -8714,6 +8754,7 @@ class FormFieldSelectComponent {
|
|
|
8714
8754
|
const { loadOptionFromStore, selectOptions } = changes.fieldData.currentValue.options;
|
|
8715
8755
|
if (selectOptions && selectOptions.length) {
|
|
8716
8756
|
this.options = selectOptions;
|
|
8757
|
+
this.setSelectedItem();
|
|
8717
8758
|
}
|
|
8718
8759
|
if (loadOptionFromStore) {
|
|
8719
8760
|
// this.loadOptionsFromStore(loadOptionFromStore);
|
|
@@ -8724,6 +8765,70 @@ class FormFieldSelectComponent {
|
|
|
8724
8765
|
}
|
|
8725
8766
|
}
|
|
8726
8767
|
}
|
|
8768
|
+
checkActiveCheckBox(valueId) {
|
|
8769
|
+
return this.form.get(this.fieldData.field).value?.includes(valueId);
|
|
8770
|
+
}
|
|
8771
|
+
changeCheckbox(event, data) {
|
|
8772
|
+
if (event.checked) {
|
|
8773
|
+
const newValue = [];
|
|
8774
|
+
if (this.form.get(this.fieldData.field).value) {
|
|
8775
|
+
newValue.push(...this.form.get(this.fieldData.field).value);
|
|
8776
|
+
}
|
|
8777
|
+
newValue.push(data.id);
|
|
8778
|
+
this.form.get(this.fieldData.field).setValue(newValue);
|
|
8779
|
+
}
|
|
8780
|
+
else {
|
|
8781
|
+
this.form.get(this.fieldData.field).setValue(this.form.get(this.fieldData.field).value.filter(item => item !== data.id));
|
|
8782
|
+
}
|
|
8783
|
+
}
|
|
8784
|
+
setSelectedItem() {
|
|
8785
|
+
const fieldValue = this.form.get(this.fieldData.field).value;
|
|
8786
|
+
if (fieldValue && this.options?.length) {
|
|
8787
|
+
const findItem = this.options.find(item => +item.id === +fieldValue);
|
|
8788
|
+
if (findItem) {
|
|
8789
|
+
this.selectedItem.set({
|
|
8790
|
+
id: String(findItem.id),
|
|
8791
|
+
name: findItem.name,
|
|
8792
|
+
});
|
|
8793
|
+
}
|
|
8794
|
+
}
|
|
8795
|
+
}
|
|
8796
|
+
addNewClick() {
|
|
8797
|
+
if (this.fieldData?.options?.relationToEntity?.isPossibleCreateNew) {
|
|
8798
|
+
if (!this.createNewDialog) {
|
|
8799
|
+
console.error('[ form-field-select.component ] STATIC_DATA_CREATE_NEW_DIALOG token is not provided!');
|
|
8800
|
+
return;
|
|
8801
|
+
}
|
|
8802
|
+
const isDynamicForm = this.fieldData?.options?.relationToEntity?.isDynamicForm || false;
|
|
8803
|
+
let component;
|
|
8804
|
+
if (isDynamicForm) {
|
|
8805
|
+
component = this.createNewDynamicFormDialog;
|
|
8806
|
+
}
|
|
8807
|
+
else {
|
|
8808
|
+
component = this.createNewDialog;
|
|
8809
|
+
}
|
|
8810
|
+
this.dialog.open(component, {
|
|
8811
|
+
panelClass: 'right-modal',
|
|
8812
|
+
height: '100vh',
|
|
8813
|
+
width: '600px',
|
|
8814
|
+
position: { right: '0' },
|
|
8815
|
+
data: {
|
|
8816
|
+
option: { ...this.fieldData?.options?.relationToEntity },
|
|
8817
|
+
},
|
|
8818
|
+
})
|
|
8819
|
+
.afterClosed()
|
|
8820
|
+
.toPromise()
|
|
8821
|
+
.then((result) => {
|
|
8822
|
+
if (result?.id) {
|
|
8823
|
+
this.form.get(this.fieldData.field).setValue(result.id);
|
|
8824
|
+
this.selectedItem.set({
|
|
8825
|
+
id: result.id,
|
|
8826
|
+
name: result.name,
|
|
8827
|
+
});
|
|
8828
|
+
}
|
|
8829
|
+
});
|
|
8830
|
+
}
|
|
8831
|
+
}
|
|
8727
8832
|
subscribeToSearchChange() {
|
|
8728
8833
|
if (this.searchCtrl) {
|
|
8729
8834
|
this.searchCtrl.valueChanges
|
|
@@ -8758,6 +8863,7 @@ class FormFieldSelectComponent {
|
|
|
8758
8863
|
}
|
|
8759
8864
|
}
|
|
8760
8865
|
}
|
|
8866
|
+
this.setSelectedItem();
|
|
8761
8867
|
});
|
|
8762
8868
|
}
|
|
8763
8869
|
}
|
|
@@ -8766,32 +8872,36 @@ class FormFieldSelectComponent {
|
|
|
8766
8872
|
*/
|
|
8767
8873
|
subscribeToFormChanges() {
|
|
8768
8874
|
const { relatedField, currentFieldProperty, loadOptionsParameters } = this.fieldData.options?.subscribeToFormChanges;
|
|
8769
|
-
|
|
8770
|
-
.
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8875
|
+
if (relatedField) {
|
|
8876
|
+
this.form.get(relatedField).valueChanges
|
|
8877
|
+
.pipe(takeUntil(this.destroy$))
|
|
8878
|
+
.subscribe(changes => {
|
|
8879
|
+
this.checkRelatedFieldValue();
|
|
8880
|
+
if (loadOptionsParameters) {
|
|
8881
|
+
const params = {
|
|
8882
|
+
where: { [currentFieldProperty]: changes },
|
|
8883
|
+
paging: {
|
|
8884
|
+
perPage: -1
|
|
8885
|
+
}
|
|
8886
|
+
};
|
|
8887
|
+
this.staticDataFacade.loadStaticData(loadOptionsParameters.entity, params, this.storeSubList);
|
|
8888
|
+
}
|
|
8889
|
+
this.filterOptionsByRelatedFieldValue(changes);
|
|
8890
|
+
this.defaultOptions = [...this.options];
|
|
8891
|
+
this.cd.markForCheck();
|
|
8892
|
+
});
|
|
8893
|
+
}
|
|
8786
8894
|
}
|
|
8787
8895
|
checkRelatedFieldValue() {
|
|
8788
8896
|
const { relatedField } = this.fieldData.options?.subscribeToFormChanges;
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8897
|
+
if (relatedField) {
|
|
8898
|
+
const relatedFieldValue = this.form.get(relatedField).value;
|
|
8899
|
+
if (Array.isArray(relatedFieldValue)) {
|
|
8900
|
+
this.hasRelatedData = !!relatedFieldValue?.length;
|
|
8901
|
+
}
|
|
8902
|
+
else {
|
|
8903
|
+
this.hasRelatedData = !!relatedFieldValue;
|
|
8904
|
+
}
|
|
8795
8905
|
}
|
|
8796
8906
|
}
|
|
8797
8907
|
// 'staticData.list.business-settings[0].settings.notifications.telegram.channels'
|
|
@@ -8842,8 +8952,9 @@ class FormFieldSelectComponent {
|
|
|
8842
8952
|
this.defaultOptions = [...newOptions];
|
|
8843
8953
|
}
|
|
8844
8954
|
this.isLoading = false;
|
|
8845
|
-
if (!this.fieldData.options?.subscribeToFormChanges) {
|
|
8955
|
+
if (!this.fieldData.options?.subscribeToFormChanges?.relatedField) {
|
|
8846
8956
|
this.options = newOptions?.length ? newOptions.map(item => ({ id: item.id, name: item.name })) : [];
|
|
8957
|
+
this.setSelectedItem();
|
|
8847
8958
|
}
|
|
8848
8959
|
else {
|
|
8849
8960
|
this.filterOptionsByRelatedFieldValue(this.form.value);
|
|
@@ -8856,6 +8967,9 @@ class FormFieldSelectComponent {
|
|
|
8856
8967
|
* @param data
|
|
8857
8968
|
*/
|
|
8858
8969
|
filterOptionsByRelatedFieldValue(data) {
|
|
8970
|
+
if (!this.fieldData.options?.subscribeToFormChanges?.relatedField) {
|
|
8971
|
+
return;
|
|
8972
|
+
}
|
|
8859
8973
|
const { relatedField, currentFieldProperty } = this.fieldData.options?.subscribeToFormChanges;
|
|
8860
8974
|
const relatedFieldValue = data[relatedField];
|
|
8861
8975
|
let newOptions = [];
|
|
@@ -8870,13 +8984,14 @@ class FormFieldSelectComponent {
|
|
|
8870
8984
|
newOptions = this.allOptions.filter(item => item[currentFieldProperty] === relatedFieldValue);
|
|
8871
8985
|
}
|
|
8872
8986
|
this.options = newOptions.map(item => ({ id: item.id, name: item.name }));
|
|
8987
|
+
this.setSelectedItem();
|
|
8873
8988
|
}
|
|
8874
8989
|
groupItemsByNestedField(items) {
|
|
8875
8990
|
let newItems = [];
|
|
8876
8991
|
items.filter(item => !item[this.fieldData.options?.nestedByField])
|
|
8877
8992
|
.forEach(item => {
|
|
8878
8993
|
const newItem = { ...item };
|
|
8879
|
-
const subItems = this.groupItemsByNestedFieldRecursion(items, item.id);
|
|
8994
|
+
const subItems = this.groupItemsByNestedFieldRecursion(items, +item.id);
|
|
8880
8995
|
newItems.push(newItem);
|
|
8881
8996
|
if (subItems?.length) {
|
|
8882
8997
|
newItems = [...newItems, ...subItems];
|
|
@@ -8891,7 +9006,7 @@ class FormFieldSelectComponent {
|
|
|
8891
9006
|
let newItems = [];
|
|
8892
9007
|
findItems.forEach(item => {
|
|
8893
9008
|
newItems.push({ ...item, name: `${prefix} ${item.name}` });
|
|
8894
|
-
const subItems = this.groupItemsByNestedFieldRecursion(items, item.id, prefix + '---');
|
|
9009
|
+
const subItems = this.groupItemsByNestedFieldRecursion(items, +item.id, prefix + '---');
|
|
8895
9010
|
if (subItems?.length) {
|
|
8896
9011
|
newItems = [...newItems, ...subItems];
|
|
8897
9012
|
}
|
|
@@ -8910,13 +9025,26 @@ class FormFieldSelectComponent {
|
|
|
8910
9025
|
return 0;
|
|
8911
9026
|
});
|
|
8912
9027
|
}
|
|
8913
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldSelectComponent, deps: [{ token: i1.Store }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8914
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormFieldSelectComponent, isStandalone: false, selector: "shared-form-field-select", inputs: { config: "config", fieldData: "fieldData", form: "form", autoCompleteFields: "autoCompleteFields" }, usesOnChanges: true, ngImport: i0, template: "<div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <mat-form-field appearance=\"outline\"\n
|
|
9028
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldSelectComponent, deps: [{ token: CORE_CONFIG }, { token: i1.Store }, { token: StaticDataFacade }, { token: i1$6.MatDialog }, { token: i0.ChangeDetectorRef }, { token: STATIC_DATA_CREATE_NEW_DIALOG, optional: true }, { token: STATIC_DATA_CREATE_NEW_DYNAMIC_FORM_DIALOG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9029
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormFieldSelectComponent, isStandalone: false, selector: "shared-form-field-select", inputs: { config: "config", fieldData: "fieldData", form: "form", autoCompleteFields: "autoCompleteFields" }, usesOnChanges: true, ngImport: i0, template: "<div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <ng-container *ngIf=\"!fieldData?.options?.relationToEntity?.isPossibleCreateNew\">\n\n <ng-container *ngIf=\"!fieldData.options?.selectShowAllOptions\">\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 @if (options.length) {\n <mat-option *ngFor=\"let item of options\" [value]=\"item.id\">\n {{ item.name || item['title'] }}\n </mat-option>\n }\n\n <ng-container *ngIf=\"isLoading\">\n <mat-option>\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430....</mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"fieldData.options?.selectShowAllOptions\">\n <div class=\"form-select-list-options\">\n <mat-label class=\"field-label\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n @if (options.length) {\n\n @if (fieldData.options?.multiple) {\n <input [formControlName]=\"fieldData.field\" [hidden]=\"true\"/>\n <p *ngFor=\"let item of options\">\n <mat-checkbox\n [value]=\"item.id\"\n [required]=\"fieldData.validators?.includes('required')\"\n [checked]=\"checkActiveCheckBox(item.id)\"\n (change)=\"changeCheckbox($event, item)\"\n >\n {{ item.name }}\n </mat-checkbox>\n </p>\n }\n\n @if (!fieldData.options?.multiple) {\n <mat-radio-group [formControlName]=\"fieldData.field\"\n [required]=\"fieldData.validators?.includes('required')\">\n <p *ngFor=\"let item of options\">\n <mat-radio-button [value]=\"item.id\">\n {{ item.name }}\n </mat-radio-button>\n </p>\n </mat-radio-group>\n }\n }\n\n <ng-container *ngIf=\"isLoading\">\n \u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430....\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!hasRelatedData && placeholder\">\n <div @appearOpacity class=\"form-select-placeholder\">{{ placeholder }}</div>\n </ng-container>\n </ng-container>\n</div>\n<ng-container *ngIf=\"fieldData?.options?.relationToEntity?.isPossibleCreateNew\">\n <mat-label class=\"field-label\">{{ fieldData.title }}</mat-label>\n <div class=\"field-border\">\n <div *ngIf=\"selectedItem()?.id\" class=\"form-selected-item d-flex align-items-center justify-content-left\">\n <div class=\"form-selected-item-id mr-5\">Id: {{ selectedItem().id }}</div>\n <div class=\"form-selected-item-name mr-10\">\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435: {{ selectedItem().name }}</div>\n </div>\n <shared-button\n size=\"small\"\n type=\"button\"\n color=\"basic\"\n styleTheme=\"flat\"\n (click)=\"addNewClick()\"\n [icon]=\"'select'\">\u0412\u044B\u0431\u0440\u0430\u0442\u044C\n </shared-button>\n </div>\n</ng-container>\n<shared-form-field-spinner *ngIf=\"isLoading\"></shared-form-field-spinner>\n", styles: [".form-select-placeholder{position:absolute;margin-right:25px;margin-top:-22px;opacity:.8;right:0;color:#e53935}.field-border{border:1px solid #a3a3a3;padding:10px;border-radius:8px;display:flex;align-items:center}.field-label{position:absolute;background:#f8f8f8;font-size:12px;left:15px;top:-13px;padding:0 5px}.form-select-list-options{border:1px solid #a3a3a3;padding:10px;border-radius:4px;max-height:300px;overflow:auto}.form-select-list-options p{margin-bottom:5px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["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: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "component", type: i9.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", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i11.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i11.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: FormFieldSpinnerComponent, selector: "shared-form-field-spinner" }], animations: [appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8915
9030
|
}
|
|
8916
9031
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldSelectComponent, decorators: [{
|
|
8917
9032
|
type: Component,
|
|
8918
|
-
args: [{ selector: 'shared-form-field-select', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearOpacity], standalone: false, template: "<div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <mat-form-field appearance=\"outline\"\n
|
|
8919
|
-
}], ctorParameters: () => [{ type:
|
|
9033
|
+
args: [{ selector: 'shared-form-field-select', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearOpacity], standalone: false, template: "<div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <ng-container *ngIf=\"!fieldData?.options?.relationToEntity?.isPossibleCreateNew\">\n\n <ng-container *ngIf=\"!fieldData.options?.selectShowAllOptions\">\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 @if (options.length) {\n <mat-option *ngFor=\"let item of options\" [value]=\"item.id\">\n {{ item.name || item['title'] }}\n </mat-option>\n }\n\n <ng-container *ngIf=\"isLoading\">\n <mat-option>\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430....</mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"fieldData.options?.selectShowAllOptions\">\n <div class=\"form-select-list-options\">\n <mat-label class=\"field-label\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n @if (options.length) {\n\n @if (fieldData.options?.multiple) {\n <input [formControlName]=\"fieldData.field\" [hidden]=\"true\"/>\n <p *ngFor=\"let item of options\">\n <mat-checkbox\n [value]=\"item.id\"\n [required]=\"fieldData.validators?.includes('required')\"\n [checked]=\"checkActiveCheckBox(item.id)\"\n (change)=\"changeCheckbox($event, item)\"\n >\n {{ item.name }}\n </mat-checkbox>\n </p>\n }\n\n @if (!fieldData.options?.multiple) {\n <mat-radio-group [formControlName]=\"fieldData.field\"\n [required]=\"fieldData.validators?.includes('required')\">\n <p *ngFor=\"let item of options\">\n <mat-radio-button [value]=\"item.id\">\n {{ item.name }}\n </mat-radio-button>\n </p>\n </mat-radio-group>\n }\n }\n\n <ng-container *ngIf=\"isLoading\">\n \u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430....\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!hasRelatedData && placeholder\">\n <div @appearOpacity class=\"form-select-placeholder\">{{ placeholder }}</div>\n </ng-container>\n </ng-container>\n</div>\n<ng-container *ngIf=\"fieldData?.options?.relationToEntity?.isPossibleCreateNew\">\n <mat-label class=\"field-label\">{{ fieldData.title }}</mat-label>\n <div class=\"field-border\">\n <div *ngIf=\"selectedItem()?.id\" class=\"form-selected-item d-flex align-items-center justify-content-left\">\n <div class=\"form-selected-item-id mr-5\">Id: {{ selectedItem().id }}</div>\n <div class=\"form-selected-item-name mr-10\">\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435: {{ selectedItem().name }}</div>\n </div>\n <shared-button\n size=\"small\"\n type=\"button\"\n color=\"basic\"\n styleTheme=\"flat\"\n (click)=\"addNewClick()\"\n [icon]=\"'select'\">\u0412\u044B\u0431\u0440\u0430\u0442\u044C\n </shared-button>\n </div>\n</ng-container>\n<shared-form-field-spinner *ngIf=\"isLoading\"></shared-form-field-spinner>\n", styles: [".form-select-placeholder{position:absolute;margin-right:25px;margin-top:-22px;opacity:.8;right:0;color:#e53935}.field-border{border:1px solid #a3a3a3;padding:10px;border-radius:8px;display:flex;align-items:center}.field-label{position:absolute;background:#f8f8f8;font-size:12px;left:15px;top:-13px;padding:0 5px}.form-select-list-options{border:1px solid #a3a3a3;padding:10px;border-radius:4px;max-height:300px;overflow:auto}.form-select-list-options p{margin-bottom:5px}\n"] }]
|
|
9034
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
9035
|
+
type: Inject,
|
|
9036
|
+
args: [CORE_CONFIG]
|
|
9037
|
+
}] }, { type: i1.Store }, { type: StaticDataFacade }, { type: i1$6.MatDialog }, { type: i0.ChangeDetectorRef }, { type: i0.Type, decorators: [{
|
|
9038
|
+
type: Optional
|
|
9039
|
+
}, {
|
|
9040
|
+
type: Inject,
|
|
9041
|
+
args: [STATIC_DATA_CREATE_NEW_DIALOG]
|
|
9042
|
+
}] }, { type: i0.Type, decorators: [{
|
|
9043
|
+
type: Optional
|
|
9044
|
+
}, {
|
|
9045
|
+
type: Inject,
|
|
9046
|
+
args: [STATIC_DATA_CREATE_NEW_DYNAMIC_FORM_DIALOG]
|
|
9047
|
+
}] }], propDecorators: { config: [{
|
|
8920
9048
|
type: Input
|
|
8921
9049
|
}], fieldData: [{
|
|
8922
9050
|
type: Input
|
|
@@ -8928,7 +9056,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
8928
9056
|
|
|
8929
9057
|
class FormFieldSlideToggleComponent {
|
|
8930
9058
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldSlideToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8931
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldSlideToggleComponent, isStandalone: false, selector: "shared-form-field-slide-toggle", inputs: { config: "config", fieldData: "fieldData", form: "form" }, ngImport: i0, template: "<div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\" class=\"field-slide-toggle\">\n <mat-slide-toggle\n [color]=\"'warn'\"\n [formControlName]=\"fieldData.field\">\n {{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}\n </mat-slide-toggle>\n</div>\n", styles: [".field-slide-toggle{margin-bottom:15px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$5.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type:
|
|
9059
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldSlideToggleComponent, isStandalone: false, selector: "shared-form-field-slide-toggle", inputs: { config: "config", fieldData: "fieldData", form: "form" }, ngImport: i0, template: "<div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\" class=\"field-slide-toggle\">\n <mat-slide-toggle\n [color]=\"'warn'\"\n [formControlName]=\"fieldData.field\">\n {{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}\n </mat-slide-toggle>\n</div>\n", styles: [".field-slide-toggle{margin-bottom:15px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$5.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8932
9060
|
}
|
|
8933
9061
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldSlideToggleComponent, decorators: [{
|
|
8934
9062
|
type: Component,
|
|
@@ -9168,7 +9296,18 @@ class FormFieldSelectShowComponent {
|
|
|
9168
9296
|
let values = !Array.isArray(this.value) ? [this.value] : this.value;
|
|
9169
9297
|
const loadOptionFromStore = this.fieldData.options?.loadOptionFromStore;
|
|
9170
9298
|
if (!this.listItems.length) {
|
|
9171
|
-
|
|
9299
|
+
if (loadOptionFromStore) {
|
|
9300
|
+
this.getItemsFromStore(loadOptionFromStore, values);
|
|
9301
|
+
}
|
|
9302
|
+
else if (this.fieldData.options?.selectOptions) {
|
|
9303
|
+
this.listItems = this.fieldData.options?.selectOptions
|
|
9304
|
+
.filter(item => values.includes(item.id) || values.includes(String(item.id)))
|
|
9305
|
+
.map(item => item.name || `Номер ${item.id}`);
|
|
9306
|
+
if (values.length && !this.listItems?.length) {
|
|
9307
|
+
this.listItems = ([...values]);
|
|
9308
|
+
}
|
|
9309
|
+
this.loading = false;
|
|
9310
|
+
}
|
|
9172
9311
|
}
|
|
9173
9312
|
}
|
|
9174
9313
|
}
|
|
@@ -9188,15 +9327,31 @@ class FormFieldSelectShowComponent {
|
|
|
9188
9327
|
}
|
|
9189
9328
|
});
|
|
9190
9329
|
}
|
|
9330
|
+
getItemsFromFieldSettings(keyFromStore, ids) {
|
|
9331
|
+
this.coreFacade.getStoreByName(keyFromStore)
|
|
9332
|
+
.pipe(takeUntil(this.destroy$))
|
|
9333
|
+
.subscribe(items => {
|
|
9334
|
+
if (items?.list?.length) {
|
|
9335
|
+
this.listItems = items.list
|
|
9336
|
+
.filter(item => ids.includes(item.id) || ids.includes(String(item.id)))
|
|
9337
|
+
.map(item => item.name || `Номер ${item.id}`);
|
|
9338
|
+
if (ids.length && !this.listItems?.length) {
|
|
9339
|
+
this.listItems = ([...ids]);
|
|
9340
|
+
}
|
|
9341
|
+
this.loading = false;
|
|
9342
|
+
this.cd.markForCheck();
|
|
9343
|
+
}
|
|
9344
|
+
});
|
|
9345
|
+
}
|
|
9191
9346
|
trackById(index, item) {
|
|
9192
9347
|
return item?.id || undefined;
|
|
9193
9348
|
}
|
|
9194
9349
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldSelectShowComponent, deps: [{ token: CoreFacade }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9195
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldSelectShowComponent, isStandalone: false, selector: "shared-form-field-select-show", inputs: { config: "config", fieldData: "fieldData", value: "value" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"d-flex align-items-
|
|
9350
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldSelectShowComponent, isStandalone: false, selector: "shared-form-field-select-show", inputs: { config: "config", fieldData: "fieldData", value: "value" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"d-flex align-items-flex-start align-content-flex-start\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label class=\"show-label\">{{ fieldData.title }}:</label>\n <div class=\"d-flex align-items-flex-start form-field-value\">\n <span *ngFor=\"let value of listItems;trackBy: trackById\">{{ value }}</span>\n </div>\n</div>\n<shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>\n", styles: [".form-field-value{display:flex;flex-direction:column}.small-form-width-form-field .show-label{margin-bottom:0}span{margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FormFieldSpinnerComponent, selector: "shared-form-field-spinner" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9196
9351
|
}
|
|
9197
9352
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldSelectShowComponent, decorators: [{
|
|
9198
9353
|
type: Component,
|
|
9199
|
-
args: [{ selector: 'shared-form-field-select-show', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"d-flex align-items-
|
|
9354
|
+
args: [{ selector: 'shared-form-field-select-show', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"d-flex align-items-flex-start align-content-flex-start\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label class=\"show-label\">{{ fieldData.title }}:</label>\n <div class=\"d-flex align-items-flex-start form-field-value\">\n <span *ngFor=\"let value of listItems;trackBy: trackById\">{{ value }}</span>\n </div>\n</div>\n<shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>\n", styles: [".form-field-value{display:flex;flex-direction:column}.small-form-width-form-field .show-label{margin-bottom:0}span{margin-left:5px}\n"] }]
|
|
9200
9355
|
}], ctorParameters: () => [{ type: CoreFacade }, { type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
9201
9356
|
type: Input
|
|
9202
9357
|
}], fieldData: [{
|
|
@@ -9269,7 +9424,7 @@ class FormFieldInputComponent {
|
|
|
9269
9424
|
}
|
|
9270
9425
|
}
|
|
9271
9426
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9272
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldInputComponent, isStandalone: false, selector: "shared-form-field-input", inputs: { config: "config", fieldData: "fieldData", form: "form" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"form.get(fieldData.field) as field\">\n <div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <mat-form-field appearance=\"outline\"\n class=\"width100\">\n <mat-label>{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</mat-label>\n <div class=\"display-flex align-baseline \">\n <ng-container *ngIf=\"inputMask\">\n <input matInput\n #input\n [type]=\"inputType\"\n [placeholder]=\"placeholder\"\n [mask]=\"inputMask\"\n [formControlName]=\"fieldData.field\">\n </ng-container>\n <ng-container *ngIf=\"!inputMask\">\n <input matInput\n #input\n [type]=\"inputType\"\n [placeholder]=\"placeholder\"\n [formControlName]=\"fieldData.field\">\n </ng-container>\n <div class=\"form-field-suffix\"\n [ngClass]=\"{'input-field-icon-red': !field.valid}\"\n *ngIf=\"fieldData.asyncValidators && fieldData.asyncValidators.length\">\n <mat-icon *ngIf=\"field.status !== pendingStatus\"\n class=\"secondary-text mat-icon notranslate material-icons mat-icon-no-color\"\n role=\"img\" aria-hidden=\"true\">\n {{field.valid ? 'done' : field.errors['itemUniqValue'] ? 'assignment_late' : ''}}\n </mat-icon>\n <shared-spinner *ngIf=\"field.status === pendingStatus\"\n [diameter]=\"24\"></shared-spinner>\n </div>\n </div>\n </mat-form-field>\n </div>\n</ng-container>\n", styles: [".form-field-suffix{width:17px;height:17px}.form-field-suffix mat-icon{color:#4caf50;font-size:17px;height:17px!important;width:17px!important;min-width:17px;min-height:17px;font-weight:700!important}.form-field-suffix.input-field-icon-red mat-icon{color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$
|
|
9427
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldInputComponent, isStandalone: false, selector: "shared-form-field-input", inputs: { config: "config", fieldData: "fieldData", form: "form" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"form.get(fieldData.field) as field\">\n <div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <mat-form-field appearance=\"outline\"\n class=\"width100\">\n <mat-label>{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</mat-label>\n <div class=\"display-flex align-baseline \">\n <ng-container *ngIf=\"inputMask\">\n <input matInput\n #input\n [type]=\"inputType\"\n [placeholder]=\"placeholder\"\n [mask]=\"inputMask\"\n [formControlName]=\"fieldData.field\">\n </ng-container>\n <ng-container *ngIf=\"!inputMask\">\n <input matInput\n #input\n [type]=\"inputType\"\n [placeholder]=\"placeholder\"\n [formControlName]=\"fieldData.field\">\n </ng-container>\n <div class=\"form-field-suffix\"\n [ngClass]=\"{'input-field-icon-red': !field.valid}\"\n *ngIf=\"fieldData.asyncValidators && fieldData.asyncValidators.length\">\n <mat-icon *ngIf=\"field.status !== pendingStatus\"\n class=\"secondary-text mat-icon notranslate material-icons mat-icon-no-color\"\n role=\"img\" aria-hidden=\"true\">\n {{field.valid ? 'done' : field.errors['itemUniqValue'] ? 'assignment_late' : ''}}\n </mat-icon>\n <shared-spinner *ngIf=\"field.status === pendingStatus\"\n [diameter]=\"24\"></shared-spinner>\n </div>\n </div>\n </mat-form-field>\n </div>\n</ng-container>\n", styles: [".form-field-suffix{width:17px;height:17px}.form-field-suffix mat-icon{color:#4caf50;font-size:17px;height:17px!important;width:17px!important;min-width:17px;min-height:17px;font-weight:700!important}.form-field-suffix.input-field-icon-red mat-icon{color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { 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", "disabledInteractive"], 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: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { 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: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9273
9428
|
}
|
|
9274
9429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldInputComponent, decorators: [{
|
|
9275
9430
|
type: Component,
|
|
@@ -9340,13 +9495,13 @@ class FormFieldStringListInputComponent {
|
|
|
9340
9495
|
}
|
|
9341
9496
|
this.form.updateValueAndValidity();
|
|
9342
9497
|
}
|
|
9343
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldStringListInputComponent, deps: [{ token:
|
|
9344
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldStringListInputComponent, isStandalone: false, selector: "shared-form-field-string-list-input", inputs: { config: "config", fieldData: "fieldData", form: "form" }, ngImport: i0, template: "<div class=\"textarea-field-width string-list-field\">\n <form [formGroup]=\"mainForm\">\n <mat-label\n class=\"label-field\"\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n\n <div class=\"items\" formArrayName=\"items\">\n <div class=\"row\" *ngFor=\"let item of items.controls; let i = index\">\n <div class=\"col-11\">\n <input class=\"list-item\" matInput [formControlName]=\"i\" placeholder=\"\u0417\u0430\u043F\u0438\u0441\u044C {{ i + 1 }}\">\n </div>\n <div class=\"col-1 d-flex justify-content-center align-items-center\">\n <button class=\"no-border\" type=\"button\" (click)=\"removeItem(i)\">\n <shared-ui-icon icon=\"close\" color=\"red\"></shared-ui-icon>\n </button>\n </div>\n </div>\n <div class=\"text-center mt-10\">\n <button class=\"no-border\" type=\"button\" (click)=\"addItem()\">\n <shared-ui-icon icon=\"add\" size=\"xs\" color=\"green\"></shared-ui-icon>\n </button>\n </div>\n </div>\n </form>\n</div>\n", styles: [".label-field{position:absolute;background:#f8f8f8;margin:-11px 0 0 13px;padding:0 10px;font-size:12px}.items{border:1px solid #bfb7b7;border-radius:8px;padding:10px}.list-item{background:#efefef}.list-item .row{margin-bottom:5px}.no-border{border:none;background:transparent!important}\n"], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$
|
|
9498
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldStringListInputComponent, deps: [{ token: i3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9499
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldStringListInputComponent, isStandalone: false, selector: "shared-form-field-string-list-input", inputs: { config: "config", fieldData: "fieldData", form: "form" }, ngImport: i0, template: "<div class=\"textarea-field-width string-list-field\">\n <form [formGroup]=\"mainForm\">\n <mat-label\n class=\"label-field\"\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n\n <div class=\"items\" formArrayName=\"items\">\n <div class=\"row\" *ngFor=\"let item of items.controls; let i = index\">\n <div class=\"col-11\">\n <input class=\"list-item\" matInput [formControlName]=\"i\" placeholder=\"\u0417\u0430\u043F\u0438\u0441\u044C {{ i + 1 }}\">\n </div>\n <div class=\"col-1 d-flex justify-content-center align-items-center\">\n <button class=\"no-border\" type=\"button\" (click)=\"removeItem(i)\">\n <shared-ui-icon icon=\"close\" color=\"red\"></shared-ui-icon>\n </button>\n </div>\n </div>\n <div class=\"text-center mt-10\">\n <button class=\"no-border\" type=\"button\" (click)=\"addItem()\">\n <shared-ui-icon icon=\"add\" size=\"xs\" color=\"green\"></shared-ui-icon>\n </button>\n </div>\n </div>\n </form>\n</div>\n", styles: [".label-field{position:absolute;background:#f8f8f8;margin:-11px 0 0 13px;padding:0 10px;font-size:12px}.items{border:1px solid #bfb7b7;border-radius:8px;padding:10px}.list-item{background:#efefef}.list-item .row{margin-bottom:5px}.no-border{border:none;background:transparent!important}\n"], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { 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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: i3.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: IconComponent, selector: "shared-ui-icon", inputs: ["icon", "size", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9345
9500
|
}
|
|
9346
9501
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldStringListInputComponent, decorators: [{
|
|
9347
9502
|
type: Component,
|
|
9348
9503
|
args: [{ selector: 'shared-form-field-string-list-input', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"textarea-field-width string-list-field\">\n <form [formGroup]=\"mainForm\">\n <mat-label\n class=\"label-field\"\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n\n <div class=\"items\" formArrayName=\"items\">\n <div class=\"row\" *ngFor=\"let item of items.controls; let i = index\">\n <div class=\"col-11\">\n <input class=\"list-item\" matInput [formControlName]=\"i\" placeholder=\"\u0417\u0430\u043F\u0438\u0441\u044C {{ i + 1 }}\">\n </div>\n <div class=\"col-1 d-flex justify-content-center align-items-center\">\n <button class=\"no-border\" type=\"button\" (click)=\"removeItem(i)\">\n <shared-ui-icon icon=\"close\" color=\"red\"></shared-ui-icon>\n </button>\n </div>\n </div>\n <div class=\"text-center mt-10\">\n <button class=\"no-border\" type=\"button\" (click)=\"addItem()\">\n <shared-ui-icon icon=\"add\" size=\"xs\" color=\"green\"></shared-ui-icon>\n </button>\n </div>\n </div>\n </form>\n</div>\n", styles: [".label-field{position:absolute;background:#f8f8f8;margin:-11px 0 0 13px;padding:0 10px;font-size:12px}.items{border:1px solid #bfb7b7;border-radius:8px;padding:10px}.list-item{background:#efefef}.list-item .row{margin-bottom:5px}.no-border{border:none;background:transparent!important}\n"] }]
|
|
9349
|
-
}], ctorParameters: () => [{ type:
|
|
9504
|
+
}], ctorParameters: () => [{ type: i3.FormBuilder }], propDecorators: { config: [{
|
|
9350
9505
|
type: Input
|
|
9351
9506
|
}], fieldData: [{
|
|
9352
9507
|
type: Input
|
|
@@ -9415,10 +9570,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
9415
9570
|
}] } });
|
|
9416
9571
|
|
|
9417
9572
|
class FormFieldFileComponent {
|
|
9418
|
-
constructor(cd, dialogService, requestsFacade, formDeleteFileFacade) {
|
|
9573
|
+
constructor(cd, dialogService, requestsFacade, notificationsFacade, formDeleteFileFacade) {
|
|
9419
9574
|
this.cd = cd;
|
|
9420
9575
|
this.dialogService = dialogService;
|
|
9421
9576
|
this.requestsFacade = requestsFacade;
|
|
9577
|
+
this.notificationsFacade = notificationsFacade;
|
|
9422
9578
|
this.formDeleteFileFacade = formDeleteFileFacade;
|
|
9423
9579
|
this.inputStatus = "1";
|
|
9424
9580
|
this.formDeleteFile = "form-delete-file";
|
|
@@ -9426,6 +9582,7 @@ class FormFieldFileComponent {
|
|
|
9426
9582
|
this.requestStatuses = RequestStatus;
|
|
9427
9583
|
this.currentPristineValue = false;
|
|
9428
9584
|
this.destroy$ = new Subject();
|
|
9585
|
+
this.Math = Math;
|
|
9429
9586
|
}
|
|
9430
9587
|
ngOnInit() {
|
|
9431
9588
|
this.statusChanges$ = this.form.valueChanges;
|
|
@@ -9446,8 +9603,9 @@ class FormFieldFileComponent {
|
|
|
9446
9603
|
ngOnChanges(changes) {
|
|
9447
9604
|
const field = this.fieldData.field;
|
|
9448
9605
|
if (field && this.form) {
|
|
9606
|
+
this.fileName = this.form.get(field)?.value || "";
|
|
9449
9607
|
this.imageVersions = this.form.get(field)?.value?.versions || "";
|
|
9450
|
-
if (this.imageVersions) {
|
|
9608
|
+
if (this.fileName || this.imageVersions) {
|
|
9451
9609
|
this.inputStatus = "0";
|
|
9452
9610
|
}
|
|
9453
9611
|
}
|
|
@@ -9466,15 +9624,54 @@ class FormFieldFileComponent {
|
|
|
9466
9624
|
onFileChange(event) {
|
|
9467
9625
|
if (event.target.files.length > 0) {
|
|
9468
9626
|
const file = event.target.files[0];
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9627
|
+
if (this.isFileValid(file)) {
|
|
9628
|
+
this.selectedFile = file;
|
|
9629
|
+
this.form.get(this.fieldData.field).setValue(file);
|
|
9630
|
+
const reader = new FileReader();
|
|
9631
|
+
reader.readAsDataURL(file);
|
|
9632
|
+
reader.onload = (_event) => {
|
|
9633
|
+
this.imageSource = reader.result;
|
|
9634
|
+
this.inputStatus = "0";
|
|
9635
|
+
this.cd.markForCheck();
|
|
9636
|
+
};
|
|
9637
|
+
}
|
|
9638
|
+
else {
|
|
9639
|
+
this.input.nativeElement.value = "";
|
|
9640
|
+
}
|
|
9641
|
+
}
|
|
9642
|
+
}
|
|
9643
|
+
isFileValid(file) {
|
|
9644
|
+
let result = true;
|
|
9645
|
+
const allowedExtensions = this.fieldData.options?.fileSettings?.allowedExtensions;
|
|
9646
|
+
const sizeLimit = this.fieldData.options?.fileSettings?.sizeLimit;
|
|
9647
|
+
if (allowedExtensions) {
|
|
9648
|
+
const findType = allowedExtensions.split(',').find(type => {
|
|
9649
|
+
return file.type.toLowerCase().indexOf(type.trim().toLowerCase()) !== -1;
|
|
9650
|
+
});
|
|
9651
|
+
if (!findType) {
|
|
9652
|
+
const notification = {
|
|
9653
|
+
id: 5,
|
|
9654
|
+
type: 'error',
|
|
9655
|
+
text: 'Не допустимый тип файла',
|
|
9656
|
+
title: 'Ошибка загрузки файла',
|
|
9657
|
+
timeout: 2000
|
|
9658
|
+
};
|
|
9659
|
+
this.notificationsFacade.addNotifications(notification);
|
|
9660
|
+
result = false;
|
|
9661
|
+
}
|
|
9662
|
+
}
|
|
9663
|
+
if (result && sizeLimit && (file.size / 1024) > sizeLimit) {
|
|
9664
|
+
const notification = {
|
|
9665
|
+
id: 5,
|
|
9666
|
+
type: 'error',
|
|
9667
|
+
text: 'Не допустимый размер файла',
|
|
9668
|
+
title: 'Ошибка загрузки файла',
|
|
9669
|
+
timeout: 2000
|
|
9476
9670
|
};
|
|
9671
|
+
this.notificationsFacade.addNotifications(notification);
|
|
9672
|
+
result = false;
|
|
9477
9673
|
}
|
|
9674
|
+
return result;
|
|
9478
9675
|
}
|
|
9479
9676
|
deleteImage() {
|
|
9480
9677
|
const id = this.form.get("id")?.value;
|
|
@@ -9495,6 +9692,13 @@ class FormFieldFileComponent {
|
|
|
9495
9692
|
}
|
|
9496
9693
|
});
|
|
9497
9694
|
}
|
|
9695
|
+
else if (this.selectedFile) {
|
|
9696
|
+
this.selectedFile = null;
|
|
9697
|
+
this.inputStatus = '1';
|
|
9698
|
+
this.input.nativeElement.value = "";
|
|
9699
|
+
this.form.get(this.fieldData.field).setValue("");
|
|
9700
|
+
this.cd.markForCheck();
|
|
9701
|
+
}
|
|
9498
9702
|
}
|
|
9499
9703
|
initRequest() {
|
|
9500
9704
|
if (!this.request$ && this.form.get("id")) {
|
|
@@ -9514,15 +9718,17 @@ class FormFieldFileComponent {
|
|
|
9514
9718
|
this.inputStatus = "1";
|
|
9515
9719
|
this.cd.markForCheck();
|
|
9516
9720
|
}
|
|
9517
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldFileComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DialogService }, { token: RequestsFacade }, { token: FormDeleteFileFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9518
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldFileComponent, isStandalone: false, selector: "shared-form-field-file", inputs: { config: "config", fieldData: "fieldData", form: "form", entity: "entity" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"form-field-file\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"pb-10 width100\">\n <
|
|
9721
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldFileComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DialogService }, { token: RequestsFacade }, { token: NotificationsFacade }, { token: FormDeleteFileFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9722
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldFileComponent, isStandalone: false, selector: "shared-form-field-file", inputs: { config: "config", fieldData: "fieldData", form: "form", entity: "entity" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"form-field-file\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"form-select-list-options pb-10 width100\">\n <mat-label\n class=\"field-label\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}\n </mat-label>\n <div\n @appearFromLeft\n *ngIf=\"selectedFile || fileName\"\n class=\"form-field-file-image\">\n <div *ngIf=\"selectedFile\" class=\"position-relative mat-elevation-z3 image-block\">\n <div class=\"form-field-file-close mat-elevation-z4\" (click)=\"deleteImage()\">\n <mat-icon class=\"fs-14\">close</mat-icon>\n </div>\n <ng-container *ngIf=\"fieldData.options?.fileSettings?.isImage\">\n <img [src]=\"imageSource\" [alt]=\"selectedFile.name\">\n </ng-container>\n <ng-container *ngIf=\"!fieldData.options?.fileSettings?.isImage\">\n <div class=\"form-field-file-selected-file\">\n \u0424\u0430\u0439\u043B: {{ selectedFile.name }} ( {{ Math.round(selectedFile.size / 1024) }}kb )\n </div>\n </ng-container>\n\n </div>\n <ng-container *ngIf=\"fileName && !selectedFile\">\n <div *ngIf=\"fieldData.options?.fileSettings?.isImage && fileName\" class=\"position-relative image-block\">\n <shared-image\n class=\"width150100 display-block\"\n [versions]=\"imageVersions\"\n [version]=\"1\"\n (delete)=\"deleteImage()\"></shared-image>\n </div>\n <div *ngIf=\"!fieldData.options?.fileSettings?.isImage && fileName\" class=\"position-relative image-block\">\n \u0424\u0430\u0439\u043B: {{ fileName }} Downloaded???\n </div>\n </ng-container>\n </div>\n <div\n [@inputAnim]=\"inputStatus\"\n class=\"input\">\n <input #input\n type=\"file\"\n (change)=\"onFileChange($event)\"/>\n </div>\n <div *ngIf=\"fieldData.options?.fileSettings?.allowedExtensions || fieldData.options?.fileSettings?.sizeLimit\"\n class=\"form-field-file-text\">\n <div *ngIf=\"fieldData.options?.fileSettings?.allowedExtensions\">\n \u0414\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u0442\u0438\u043F\u044B: <b>{{ fieldData.options?.fileSettings?.allowedExtensions }}</b>\n </div>\n <div *ngIf=\"fieldData.options?.fileSettings?.sizeLimit\">\n \u0414\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: <b>{{ fieldData.options?.fileSettings?.sizeLimit }}kb</b>\n </div>\n </div>\n </div>\n <shared-spinner\n *ngIf=\"(request$ | async)?.status === requestStatuses.LOADING\"\n [overlay]=\"true\"\n [diameter]=\"20\"\n [color]=\"'blue'\"></shared-spinner>\n</div>\n", styles: [".form-field-file .form-field-input{transition:all .2s ease;min-height:66px;align-items:center;padding-top:0;padding-bottom:0;position:relative}.form-field-file .form-field-input.height-0{height:0;padding:0;border:0}.form-field-file .form-field-file-image{position:relative;transition:all .2s ease;overflow:hidden;display:flex;justify-content:flex-start;margin:10px 0}.form-field-file .form-field-file-image.height-100{height:100px}.form-field-file .form-field-file-image img{object-fit:cover;width:150px;height:100px;border-radius:4px;overflow:hidden;background:#fff}.form-field-file .form-field-file-image .form-field-file-close{right:0;top:0;cursor:pointer;background:#fff;position:absolute;width:15px;height:15px;display:flex;align-items:center;justify-content:center;border-bottom-left-radius:4px;color:#f44336;transition:all .15s ease;opacity:.6}.form-field-file .form-field-file-image .form-field-file-close mat-icon{transition:transform .15s ease;width:15px;height:15px;min-width:15px;min-height:15px;margin-left:1px;margin-top:3px;font-size:14px}.form-field-file .form-field-file-image .form-field-file-close:hover{opacity:1}.form-field-file .form-field-file-image .form-field-file-close:hover mat-icon{transform:rotate(90deg);font-size:16px}.form-field-file .form-field-file-image .image-block:hover .form-field-file-close{width:25px;height:25px;opacity:.8}.form-field-file .form-field-file-image .image-block:hover .form-field-file-close mat-icon{width:18px;min-width:18px;height:18px;min-height:18px;font-size:18px}.form-field-file .position-absolute{position:absolute}.form-select-list-options{border:1px solid #a3a3a3;padding:10px;border-radius:4px}.field-label{position:absolute;background:#f8f8f8;font-size:12px;left:15px;top:-13px;padding:0 5px}.form-field-file-text{font-size:12px;margin-top:10px;margin-left:13px}.form-field-file-selected-file{padding:15px 30px 15px 15px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: ImageComponent, selector: "shared-image", inputs: ["versions", "url", "version", "title", "index", "haveZoom", "imgClass"], outputs: ["clickEvent", "delete"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], animations: [
|
|
9519
9723
|
appearFromLeft,
|
|
9520
9724
|
trigger("inputAnim", [
|
|
9521
9725
|
state("0", style({
|
|
9522
|
-
opacity: 0
|
|
9726
|
+
opacity: 0,
|
|
9727
|
+
height: "0px"
|
|
9523
9728
|
})),
|
|
9524
9729
|
state("1", style({
|
|
9525
|
-
opacity: 1
|
|
9730
|
+
opacity: 1,
|
|
9731
|
+
height: "auto"
|
|
9526
9732
|
})),
|
|
9527
9733
|
transition("0 => 1", [
|
|
9528
9734
|
animate("500ms")
|
|
@@ -9539,10 +9745,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
9539
9745
|
appearFromLeft,
|
|
9540
9746
|
trigger("inputAnim", [
|
|
9541
9747
|
state("0", style({
|
|
9542
|
-
opacity: 0
|
|
9748
|
+
opacity: 0,
|
|
9749
|
+
height: "0px"
|
|
9543
9750
|
})),
|
|
9544
9751
|
state("1", style({
|
|
9545
|
-
opacity: 1
|
|
9752
|
+
opacity: 1,
|
|
9753
|
+
height: "auto"
|
|
9546
9754
|
})),
|
|
9547
9755
|
transition("0 => 1", [
|
|
9548
9756
|
animate("500ms")
|
|
@@ -9551,8 +9759,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
9551
9759
|
animate("500ms")
|
|
9552
9760
|
])
|
|
9553
9761
|
])
|
|
9554
|
-
], standalone: false, template: "<div class=\"form-field-file\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"pb-10 width100\">\n <
|
|
9555
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: DialogService }, { type: RequestsFacade }, { type: FormDeleteFileFacade }], propDecorators: { config: [{
|
|
9762
|
+
], standalone: false, template: "<div class=\"form-field-file\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"form-select-list-options pb-10 width100\">\n <mat-label\n class=\"field-label\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}\n </mat-label>\n <div\n @appearFromLeft\n *ngIf=\"selectedFile || fileName\"\n class=\"form-field-file-image\">\n <div *ngIf=\"selectedFile\" class=\"position-relative mat-elevation-z3 image-block\">\n <div class=\"form-field-file-close mat-elevation-z4\" (click)=\"deleteImage()\">\n <mat-icon class=\"fs-14\">close</mat-icon>\n </div>\n <ng-container *ngIf=\"fieldData.options?.fileSettings?.isImage\">\n <img [src]=\"imageSource\" [alt]=\"selectedFile.name\">\n </ng-container>\n <ng-container *ngIf=\"!fieldData.options?.fileSettings?.isImage\">\n <div class=\"form-field-file-selected-file\">\n \u0424\u0430\u0439\u043B: {{ selectedFile.name }} ( {{ Math.round(selectedFile.size / 1024) }}kb )\n </div>\n </ng-container>\n\n </div>\n <ng-container *ngIf=\"fileName && !selectedFile\">\n <div *ngIf=\"fieldData.options?.fileSettings?.isImage && fileName\" class=\"position-relative image-block\">\n <shared-image\n class=\"width150100 display-block\"\n [versions]=\"imageVersions\"\n [version]=\"1\"\n (delete)=\"deleteImage()\"></shared-image>\n </div>\n <div *ngIf=\"!fieldData.options?.fileSettings?.isImage && fileName\" class=\"position-relative image-block\">\n \u0424\u0430\u0439\u043B: {{ fileName }} Downloaded???\n </div>\n </ng-container>\n </div>\n <div\n [@inputAnim]=\"inputStatus\"\n class=\"input\">\n <input #input\n type=\"file\"\n (change)=\"onFileChange($event)\"/>\n </div>\n <div *ngIf=\"fieldData.options?.fileSettings?.allowedExtensions || fieldData.options?.fileSettings?.sizeLimit\"\n class=\"form-field-file-text\">\n <div *ngIf=\"fieldData.options?.fileSettings?.allowedExtensions\">\n \u0414\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u0442\u0438\u043F\u044B: <b>{{ fieldData.options?.fileSettings?.allowedExtensions }}</b>\n </div>\n <div *ngIf=\"fieldData.options?.fileSettings?.sizeLimit\">\n \u0414\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: <b>{{ fieldData.options?.fileSettings?.sizeLimit }}kb</b>\n </div>\n </div>\n </div>\n <shared-spinner\n *ngIf=\"(request$ | async)?.status === requestStatuses.LOADING\"\n [overlay]=\"true\"\n [diameter]=\"20\"\n [color]=\"'blue'\"></shared-spinner>\n</div>\n", styles: [".form-field-file .form-field-input{transition:all .2s ease;min-height:66px;align-items:center;padding-top:0;padding-bottom:0;position:relative}.form-field-file .form-field-input.height-0{height:0;padding:0;border:0}.form-field-file .form-field-file-image{position:relative;transition:all .2s ease;overflow:hidden;display:flex;justify-content:flex-start;margin:10px 0}.form-field-file .form-field-file-image.height-100{height:100px}.form-field-file .form-field-file-image img{object-fit:cover;width:150px;height:100px;border-radius:4px;overflow:hidden;background:#fff}.form-field-file .form-field-file-image .form-field-file-close{right:0;top:0;cursor:pointer;background:#fff;position:absolute;width:15px;height:15px;display:flex;align-items:center;justify-content:center;border-bottom-left-radius:4px;color:#f44336;transition:all .15s ease;opacity:.6}.form-field-file .form-field-file-image .form-field-file-close mat-icon{transition:transform .15s ease;width:15px;height:15px;min-width:15px;min-height:15px;margin-left:1px;margin-top:3px;font-size:14px}.form-field-file .form-field-file-image .form-field-file-close:hover{opacity:1}.form-field-file .form-field-file-image .form-field-file-close:hover mat-icon{transform:rotate(90deg);font-size:16px}.form-field-file .form-field-file-image .image-block:hover .form-field-file-close{width:25px;height:25px;opacity:.8}.form-field-file .form-field-file-image .image-block:hover .form-field-file-close mat-icon{width:18px;min-width:18px;height:18px;min-height:18px;font-size:18px}.form-field-file .position-absolute{position:absolute}.form-select-list-options{border:1px solid #a3a3a3;padding:10px;border-radius:4px}.field-label{position:absolute;background:#f8f8f8;font-size:12px;left:15px;top:-13px;padding:0 5px}.form-field-file-text{font-size:12px;margin-top:10px;margin-left:13px}.form-field-file-selected-file{padding:15px 30px 15px 15px}\n"] }]
|
|
9763
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: DialogService }, { type: RequestsFacade }, { type: NotificationsFacade }, { type: FormDeleteFileFacade }], propDecorators: { config: [{
|
|
9556
9764
|
type: Input
|
|
9557
9765
|
}], fieldData: [{
|
|
9558
9766
|
type: Input
|
|
@@ -9754,7 +9962,7 @@ class FilesUploadListImagesComponent {
|
|
|
9754
9962
|
this.changeSort.emit({ newSorting, storedSorting: this.storedFirstSorting });
|
|
9755
9963
|
}
|
|
9756
9964
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FilesUploadListImagesComponent, deps: [{ token: FilesFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9757
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FilesUploadListImagesComponent, isStandalone: false, selector: "shared-files-upload-list-images", inputs: { section: "section", filesType: "filesType", itemId: "itemId", mode: "mode" }, outputs: { changeSort: "changeSort" }, ngImport: i0, template: "<div class=\"cards position-relative\">\n <ng-container *ngIf=\"files$ | async as files; else loading\">\n <div *ngIf=\"files.length\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n class=\"card-list\">\n <!-- trackBy: trackById -->\n <shared-file-list-card\n cdkDrag\n *ngFor=\"let file of files;\"\n @hideToTopOpacity\n [file]=\"file\"\n [section]=\"section\"\n [itemId]=\"itemId\"></shared-file-list-card>\n </div>\n <div *ngIf=\"!files.length\" class=\"empty-list\">\n \u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442\n </div>\n </ng-container>\n</div>\n<ng-template #loading>\n <shared-spinner [overlay]=\"true\"></shared-spinner>\n</ng-template>\n", styles: [".image{text-align:center;background-size:cover;background-position:center top;width:318px;height:200px;border-radius:6px;overflow:hidden}.custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}.cards,.card-list{display:flex;flex-wrap:wrap}.card-list-sort{flex-direction:column;flex-wrap:nowrap;overflow:hidden}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.fuse-card:last-child{border:none}.card-list.cdk-drop-list-dragging .fuse-card:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$
|
|
9965
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FilesUploadListImagesComponent, isStandalone: false, selector: "shared-files-upload-list-images", inputs: { section: "section", filesType: "filesType", itemId: "itemId", mode: "mode" }, outputs: { changeSort: "changeSort" }, ngImport: i0, template: "<div class=\"cards position-relative\">\n <ng-container *ngIf=\"files$ | async as files; else loading\">\n <div *ngIf=\"files.length\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n class=\"card-list\">\n <!-- trackBy: trackById -->\n <shared-file-list-card\n cdkDrag\n *ngFor=\"let file of files;\"\n @hideToTopOpacity\n [file]=\"file\"\n [section]=\"section\"\n [itemId]=\"itemId\"></shared-file-list-card>\n </div>\n <div *ngIf=\"!files.length\" class=\"empty-list\">\n \u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442\n </div>\n </ng-container>\n</div>\n<ng-template #loading>\n <shared-spinner [overlay]=\"true\"></shared-spinner>\n</ng-template>\n", styles: [".image{text-align:center;background-size:cover;background-position:center top;width:318px;height:200px;border-radius:6px;overflow:hidden}.custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}.cards,.card-list{display:flex;flex-wrap:wrap}.card-list-sort{flex-direction:column;flex-wrap:nowrap;overflow:hidden}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.fuse-card:last-child{border:none}.card-list.cdk-drop-list-dragging .fuse-card:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "component", type: FileListCardComponent, selector: "shared-file-list-card", inputs: ["file", "section", "itemId", "mode"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], animations: [hideToTopOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9758
9966
|
}
|
|
9759
9967
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FilesUploadListImagesComponent, decorators: [{
|
|
9760
9968
|
type: Component,
|
|
@@ -9852,7 +10060,7 @@ class TableFilesUploadingComponent {
|
|
|
9852
10060
|
});
|
|
9853
10061
|
}
|
|
9854
10062
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TableFilesUploadingComponent, deps: [{ token: FilesFacade }, { token: NotificationsFacade }, { token: i0.ChangeDetectorRef }, { token: AuthenticationService }, { token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9855
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TableFilesUploadingComponent, isStandalone: false, selector: "shared-table-files-uploading", inputs: { section: "section", itemId: "itemId", haveElevation: "haveElevation" }, outputs: { loadingCompleted: "loadingCompleted" }, ngImport: i0, template: "<div\n class=\"page-layout simple fullwidth fileUploads\"\n fxLayout=\"column\">\n <!-- CONTENT -->\n <div class=\"p-24\"\n [ngClass]=\"{'mat-card mat-elevation-z4': haveElevation}\">\n <div class=\"row\">\n <div class=\"col-md-12\" *ngIf=\"!uploader.queue.length\" [@appearFromLeftHideToRight]>\n <div class=\"h2 mb-24\">\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B</div>\n <div ng2FileDrop\n [ngClass]=\"{'nv-file-over': hasBaseDropZoneOver}\"\n (fileOver)=\"fileOverBase($event)\"\n [uploader]=\"uploader\"\n class=\"well my-drop-zone\">\n \u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B\n </div>\n <div class=\"p-5\">\n \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B: <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple/><br/>\n </div>\n </div>\n\n <div *ngIf=\"uploader && uploader.queue.length\" [@appearFromLeftHideToRight] class=\"col-md-12\">\n <ng-container *ngIf=\"allProgress$ | async as allProgress\">\n <ng-container *ngIf=\"itemsProgress$ | async as itemsProgress\">\n <ng-container *ngIf=\"allProgress !== 100\">\n <h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043E\u043A</h3>\n <table class=\"table\">\n <thead>\n <tr>\n <th width=\"50%\">\u0424\u0430\u0439\u043B</th>\n <th>\u0420\u0430\u0437\u043C\u0435\u0440</th>\n <th>\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of uploader.queue\">\n <tr [@appearFromLeftHideToRight] *ngIf=\"itemsProgress[item?.file?.name] !== 100\">\n <td><strong>{{ item?.file?.name }}</strong></td>\n <td nowrap>{{ item?.file?.size / 1024 / 1024 | number:'.2' }} MB</td>\n <td>\n <div class=\"progress\">\n <mat-progress-bar\n class=\"example-margin\"\n color=\"warn\"\n mode=\"determinate\"\n [value]=\"itemsProgress[item?.file?.name] || 0\">\n </mat-progress-bar>\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <div>\n <div class=\"progress-block\">\n Queue progress:\n <div class=\"progress\">\n <mat-progress-bar\n class=\"example-margin\"\n color=\"warn\"\n mode=\"determinate\"\n [value]=\"allProgress\">\n </mat-progress-bar>\n </div>\n </div>\n <!--<div class=\"text-right\">\n <button mat-flat-button color=\"accent\"\n class=\"mr-5\"\n (click)=\"uploader.uploadAll()\"\n [disabled]=\"!uploader.getNotUploadedItems().length\">\n <mat-icon class=\"fs-18\">get_app</mat-icon>\n \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0432\u0441\u0435\n </button>\n <button mat-flat-button color=\"primary\"\n class=\"mr-5\"\n (click)=\"uploader.cancelAll()\"\n [disabled]=\"!uploader.isUploading\">\n <mat-icon class=\"fs-18\">clear</mat-icon>\n \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435\n </button>\n <button mat-flat-button color=\"warn\"\n class=\"mr-5\"\n (click)=\"uploader.clearQueue()\"\n [disabled]=\"!uploader.queue.length\">\n <mat-icon class=\"fs-18\">delete_outline</mat-icon>\n \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435\n </button>\n </div>-->\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}.fileUploads{margin-bottom:10px;margin-left:-5px}.fileUploads .mat-card{margin:5px}.nv-file-over{border:dotted 3px red}.cursor-no-pointer{cursor:auto}.table{width:100%}.table tr{line-height:40px;border-top:1px solid #efefef}.table thead{background:#efefef}.table thead th{padding:0 10px}.my-drop-zone{border:dotted 3px lightgray;padding:10px;margin-bottom:10px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$
|
|
10063
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TableFilesUploadingComponent, isStandalone: false, selector: "shared-table-files-uploading", inputs: { section: "section", itemId: "itemId", haveElevation: "haveElevation" }, outputs: { loadingCompleted: "loadingCompleted" }, ngImport: i0, template: "<div\n class=\"page-layout simple fullwidth fileUploads\"\n fxLayout=\"column\">\n <!-- CONTENT -->\n <div class=\"p-24\"\n [ngClass]=\"{'mat-card mat-elevation-z4': haveElevation}\">\n <div class=\"row\">\n <div class=\"col-md-12\" *ngIf=\"!uploader.queue.length\" [@appearFromLeftHideToRight]>\n <div class=\"h2 mb-24\">\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B</div>\n <div ng2FileDrop\n [ngClass]=\"{'nv-file-over': hasBaseDropZoneOver}\"\n (fileOver)=\"fileOverBase($event)\"\n [uploader]=\"uploader\"\n class=\"well my-drop-zone\">\n \u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B\n </div>\n <div class=\"p-5\">\n \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B: <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple/><br/>\n </div>\n </div>\n\n <div *ngIf=\"uploader && uploader.queue.length\" [@appearFromLeftHideToRight] class=\"col-md-12\">\n <ng-container *ngIf=\"allProgress$ | async as allProgress\">\n <ng-container *ngIf=\"itemsProgress$ | async as itemsProgress\">\n <ng-container *ngIf=\"allProgress !== 100\">\n <h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043E\u043A</h3>\n <table class=\"table\">\n <thead>\n <tr>\n <th width=\"50%\">\u0424\u0430\u0439\u043B</th>\n <th>\u0420\u0430\u0437\u043C\u0435\u0440</th>\n <th>\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of uploader.queue\">\n <tr [@appearFromLeftHideToRight] *ngIf=\"itemsProgress[item?.file?.name] !== 100\">\n <td><strong>{{ item?.file?.name }}</strong></td>\n <td nowrap>{{ item?.file?.size / 1024 / 1024 | number:'.2' }} MB</td>\n <td>\n <div class=\"progress\">\n <mat-progress-bar\n class=\"example-margin\"\n color=\"warn\"\n mode=\"determinate\"\n [value]=\"itemsProgress[item?.file?.name] || 0\">\n </mat-progress-bar>\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <div>\n <div class=\"progress-block\">\n Queue progress:\n <div class=\"progress\">\n <mat-progress-bar\n class=\"example-margin\"\n color=\"warn\"\n mode=\"determinate\"\n [value]=\"allProgress\">\n </mat-progress-bar>\n </div>\n </div>\n <!--<div class=\"text-right\">\n <button mat-flat-button color=\"accent\"\n class=\"mr-5\"\n (click)=\"uploader.uploadAll()\"\n [disabled]=\"!uploader.getNotUploadedItems().length\">\n <mat-icon class=\"fs-18\">get_app</mat-icon>\n \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0432\u0441\u0435\n </button>\n <button mat-flat-button color=\"primary\"\n class=\"mr-5\"\n (click)=\"uploader.cancelAll()\"\n [disabled]=\"!uploader.isUploading\">\n <mat-icon class=\"fs-18\">clear</mat-icon>\n \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435\n </button>\n <button mat-flat-button color=\"warn\"\n class=\"mr-5\"\n (click)=\"uploader.clearQueue()\"\n [disabled]=\"!uploader.queue.length\">\n <mat-icon class=\"fs-18\">delete_outline</mat-icon>\n \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435\n </button>\n </div>-->\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}.fileUploads{margin-bottom:10px;margin-left:-5px}.fileUploads .mat-card{margin:5px}.nv-file-over{border:dotted 3px red}.cursor-no-pointer{cursor:auto}.table{width:100%}.table tr{line-height:40px;border-top:1px solid #efefef}.table thead{background:#efefef}.table thead th{padding:0 10px}.my-drop-zone{border:dotted 3px lightgray;padding:10px;margin-bottom:10px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i6$1.FileDropDirective, selector: "[ng2FileDrop]", inputs: ["uploader"], outputs: ["fileOver", "onFileDrop"] }, { kind: "directive", type: i6$1.FileSelectDirective, selector: "[ng2FileSelect]", inputs: ["uploader"], outputs: ["onFileSelected"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$4.DecimalPipe, name: "number" }], animations: [
|
|
9856
10064
|
hideToTopOpacity,
|
|
9857
10065
|
appearFromLeftHideToRight
|
|
9858
10066
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -10044,8 +10252,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
10044
10252
|
}] } });
|
|
10045
10253
|
|
|
10046
10254
|
class FormFieldFileShowComponent {
|
|
10047
|
-
|
|
10048
|
-
|
|
10255
|
+
constructor(platformId, authenticationService) {
|
|
10256
|
+
this.platformId = platformId;
|
|
10257
|
+
this.authenticationService = authenticationService;
|
|
10258
|
+
}
|
|
10259
|
+
downloadFileHandler() {
|
|
10260
|
+
const fullFileUrl = `http://localhost:3020/api/static-data/files?fileUrl=${this.value}`;
|
|
10261
|
+
event.preventDefault();
|
|
10262
|
+
const userData = this.authenticationService.currentUserValue;
|
|
10263
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
10264
|
+
// 2. Fetch the file from your API
|
|
10265
|
+
fetch(fullFileUrl, {
|
|
10266
|
+
method: 'GET',
|
|
10267
|
+
headers: {
|
|
10268
|
+
'Authorization': `Bearer ${userData.token}`,
|
|
10269
|
+
}
|
|
10270
|
+
})
|
|
10271
|
+
.then(response => {
|
|
10272
|
+
if (!response.ok)
|
|
10273
|
+
throw new Error('Network response failed');
|
|
10274
|
+
return response.blob(); // Crucial: Parse response as a binary blob
|
|
10275
|
+
})
|
|
10276
|
+
.then(blob => {
|
|
10277
|
+
// 3. Create a local URL representing the file object
|
|
10278
|
+
const fileUrl = URL.createObjectURL(blob);
|
|
10279
|
+
// 4. Open the generated file URL in a new browser tab
|
|
10280
|
+
window.open(fileUrl, '_blank');
|
|
10281
|
+
// 5. Optional: Clean up memory after a short delay
|
|
10282
|
+
setTimeout(() => URL.revokeObjectURL(fileUrl), 100);
|
|
10283
|
+
})
|
|
10284
|
+
.catch(error => {
|
|
10285
|
+
console.error('Error opening file:', error);
|
|
10286
|
+
});
|
|
10287
|
+
}
|
|
10288
|
+
else {
|
|
10289
|
+
console.error('[ form-field-file-show ][ action possible only in a browser ]');
|
|
10290
|
+
}
|
|
10291
|
+
}
|
|
10292
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldFileShowComponent, deps: [{ token: PLATFORM_ID }, { token: AuthenticationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10293
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldFileShowComponent, isStandalone: false, selector: "shared-form-field-file-show", inputs: { config: "config", fieldData: "fieldData", value: "value" }, ngImport: i0, template: "<div [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"width100\">\n <label class=\"show-label\">{{fieldData.title}}</label>\n <div\n @appearFromLeft\n *ngIf=\"value\"\n class=\"form-field-file-image\">\n <div *ngIf=\"fieldData.options?.fileSettings?.isImage\" class=\"image-block mlr--5\">\n <shared-image class=\"mlr-5 mat-elevation-z3 width150100\"\n [versions]=\"value.versions\"\n [version]=\"1\"\n [haveZoom]=\"true\"></shared-image>\n </div>\n <div *ngIf=\"!fieldData.options?.fileSettings?.isImage\" class=\"image-block mlr--5\">\n \u0424\u0430\u0439\u043B: <a (click)=\"downloadFileHandler()\">{{value}}</a>\n </div>\n </div>\n </div>\n</div>\n", styles: [".image-block{display:flex;margin-bottom:10px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ImageComponent, selector: "shared-image", inputs: ["versions", "url", "version", "title", "index", "haveZoom", "imgClass"], outputs: ["clickEvent", "delete"] }], animations: [
|
|
10049
10294
|
appearFromLeft,
|
|
10050
10295
|
trigger('inputAnim', [
|
|
10051
10296
|
state('0', style({
|
|
@@ -10081,8 +10326,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
10081
10326
|
animate('500ms')
|
|
10082
10327
|
])
|
|
10083
10328
|
])
|
|
10084
|
-
], standalone: false, template: "<div [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"width100\">\n <label class=\"show-label\">{{fieldData.title}}</label>\n <div\n @appearFromLeft\n *ngIf=\"value\"\n class=\"form-field-file-image\">\n <div class=\"image-block mlr--5\">\n <shared-image class=\"mlr-5 mat-elevation-z3 width150100\"\n [versions]=\"value.versions\"\n [version]=\"1\"\n [haveZoom]=\"true\"></shared-image>\n </div>\n </div>\n </div>\n</div>\n", styles: [".image-block{display:flex;margin-bottom:10px}\n"] }]
|
|
10085
|
-
}],
|
|
10329
|
+
], standalone: false, template: "<div [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"width100\">\n <label class=\"show-label\">{{fieldData.title}}</label>\n <div\n @appearFromLeft\n *ngIf=\"value\"\n class=\"form-field-file-image\">\n <div *ngIf=\"fieldData.options?.fileSettings?.isImage\" class=\"image-block mlr--5\">\n <shared-image class=\"mlr-5 mat-elevation-z3 width150100\"\n [versions]=\"value.versions\"\n [version]=\"1\"\n [haveZoom]=\"true\"></shared-image>\n </div>\n <div *ngIf=\"!fieldData.options?.fileSettings?.isImage\" class=\"image-block mlr--5\">\n \u0424\u0430\u0439\u043B: <a (click)=\"downloadFileHandler()\">{{value}}</a>\n </div>\n </div>\n </div>\n</div>\n", styles: [".image-block{display:flex;margin-bottom:10px}\n"] }]
|
|
10330
|
+
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
10331
|
+
type: Inject,
|
|
10332
|
+
args: [PLATFORM_ID]
|
|
10333
|
+
}] }, { type: AuthenticationService }], propDecorators: { config: [{
|
|
10086
10334
|
type: Input
|
|
10087
10335
|
}], fieldData: [{
|
|
10088
10336
|
type: Input
|
|
@@ -10303,7 +10551,7 @@ class FormFieldTagsComponent {
|
|
|
10303
10551
|
}]);
|
|
10304
10552
|
}
|
|
10305
10553
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldTagsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: StaticDataFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10306
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldTagsComponent, isStandalone: false, selector: "shared-form-field-tags", inputs: { config: "config", fieldData: "fieldData", form: "form", itemId: "itemId" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }, { propertyName: "matAutocomplete", first: true, predicate: ["auto"], descendants: true }], ngImport: i0, template: "<!--[ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\"-->\n<div [formGroup]=\"form\">\n <mat-form-field class=\"example-chip-list w-100\" appearance=\"outline\">\n <mat-label>\u0422\u044D\u0433\u0438</mat-label>\n <mat-chip-grid #chipGrid aria-label=\"\u0422\u0435\u0433\u0438\">\n <mat-chip-row *ngFor=\"let tag of selectedTags\"\n (removed)=\"remove(tag.id, tag.name)\">\n {{ tag.name }}\n <button matChipRemove [attr.aria-label]=\"'\u0443\u0434\u0430\u043B\u0438\u0442\u044C ' + tag.name\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n </mat-chip-grid>\n <input placeholder=\"\u041D\u043E\u0432\u044B\u0439 \u0442\u044D\u0433...\"\n #tagInput\n [formControl]=\"tagInputControl\"\n [matChipInputFor]=\"chipGrid\"\n [matAutocomplete]=\"auto\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"add($event)\"\n (ngModelChange)=\"enterNew($event)\"/>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let item of tagsList$ | async\" [value]=\"item.id\">\n {{ item['name'] }}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n</div>\n", styles: [".form-field-suffix{width:17px;height:17px}.form-field-suffix mat-icon{color:#4caf50;font-size:17px;height:17px!important;width:17px!important;min-width:17px;min-height:17px;font-weight:700!important}.form-field-suffix.input-field-icon-red mat-icon{color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "component", type:
|
|
10554
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldTagsComponent, isStandalone: false, selector: "shared-form-field-tags", inputs: { config: "config", fieldData: "fieldData", form: "form", itemId: "itemId" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }, { propertyName: "matAutocomplete", first: true, predicate: ["auto"], descendants: true }], ngImport: i0, template: "<!--[ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\"-->\n<div [formGroup]=\"form\">\n <mat-form-field class=\"example-chip-list w-100\" appearance=\"outline\">\n <mat-label>\u0422\u044D\u0433\u0438</mat-label>\n <mat-chip-grid #chipGrid aria-label=\"\u0422\u0435\u0433\u0438\">\n <mat-chip-row *ngFor=\"let tag of selectedTags\"\n (removed)=\"remove(tag.id, tag.name)\">\n {{ tag.name }}\n <button matChipRemove [attr.aria-label]=\"'\u0443\u0434\u0430\u043B\u0438\u0442\u044C ' + tag.name\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n </mat-chip-grid>\n <input placeholder=\"\u041D\u043E\u0432\u044B\u0439 \u0442\u044D\u0433...\"\n #tagInput\n [formControl]=\"tagInputControl\"\n [matChipInputFor]=\"chipGrid\"\n [matAutocomplete]=\"auto\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"add($event)\"\n (ngModelChange)=\"enterNew($event)\"/>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let item of tagsList$ | async\" [value]=\"item.id\">\n {{ item['name'] }}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n</div>\n", styles: [".form-field-suffix{width:17px;height:17px}.form-field-suffix mat-icon{color:#4caf50;font-size:17px;height:17px!important;width:17px!important;min-width:17px;min-height:17px;font-weight:700!important}.form-field-suffix.input-field-icon-red mat-icon{color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7$1.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7$1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$1.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: i8.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10307
10555
|
}
|
|
10308
10556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldTagsComponent, decorators: [{
|
|
10309
10557
|
type: Component,
|
|
@@ -10359,6 +10607,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
10359
10607
|
type: Input
|
|
10360
10608
|
}] } });
|
|
10361
10609
|
|
|
10610
|
+
class FormFieldRatingComponent {
|
|
10611
|
+
constructor() {
|
|
10612
|
+
this.options = new Array(10).fill(0);
|
|
10613
|
+
}
|
|
10614
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldRatingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10615
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldRatingComponent, isStandalone: false, selector: "shared-form-field-rating", inputs: { config: "config", fieldData: "fieldData", form: "form" }, ngImport: i0, template: "<div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"width100 form-select-list-options\">\n <mat-label class=\"field-label\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n <div class=\"display-flex align-baseline\">\n\n <mat-radio-group [formControlName]=\"fieldData.field\"\n [required]=\"fieldData.validators?.includes('required')\">\n <mat-radio-button\n *ngFor=\"let item of options; let i = index\"\n [value]=\"i + 1\">\n {{ i + 1 }}\n </mat-radio-button>\n\n </mat-radio-group>\n\n </div>\n </div>\n</div>\n", styles: [".field-label{position:absolute;background:#f8f8f8;font-size:12px;left:15px;top:-13px;padding:0 5px}.form-select-list-options{border:1px solid #a3a3a3;padding:10px;border-radius:4px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: "component", type: i11.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i11.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10616
|
+
}
|
|
10617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldRatingComponent, decorators: [{
|
|
10618
|
+
type: Component,
|
|
10619
|
+
args: [{ selector: 'shared-form-field-rating', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"width100 form-select-list-options\">\n <mat-label class=\"field-label\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n <div class=\"display-flex align-baseline\">\n\n <mat-radio-group [formControlName]=\"fieldData.field\"\n [required]=\"fieldData.validators?.includes('required')\">\n <mat-radio-button\n *ngFor=\"let item of options; let i = index\"\n [value]=\"i + 1\">\n {{ i + 1 }}\n </mat-radio-button>\n\n </mat-radio-group>\n\n </div>\n </div>\n</div>\n", styles: [".field-label{position:absolute;background:#f8f8f8;font-size:12px;left:15px;top:-13px;padding:0 5px}.form-select-list-options{border:1px solid #a3a3a3;padding:10px;border-radius:4px}\n"] }]
|
|
10620
|
+
}], propDecorators: { config: [{
|
|
10621
|
+
type: Input
|
|
10622
|
+
}], fieldData: [{
|
|
10623
|
+
type: Input
|
|
10624
|
+
}], form: [{
|
|
10625
|
+
type: Input
|
|
10626
|
+
}] } });
|
|
10627
|
+
|
|
10362
10628
|
class FormFieldCheditorComponent {
|
|
10363
10629
|
constructor(appConfig, platformId, authenticationService, cd) {
|
|
10364
10630
|
this.appConfig = appConfig;
|
|
@@ -10601,7 +10867,7 @@ class FormFieldComponent {
|
|
|
10601
10867
|
this.isDenyToUpdate = this.entityPermissionUpdateDanyFields?.includes(this.field);
|
|
10602
10868
|
this.fieldControl = !this.fieldData.options?.notNeedFormControl ? this.form.get(this.field) : undefined;
|
|
10603
10869
|
if (!this.fieldData.options?.notNeedFormControl) {
|
|
10604
|
-
this.
|
|
10870
|
+
this.subscribeToFormChange();
|
|
10605
10871
|
}
|
|
10606
10872
|
this.setComponentInjector();
|
|
10607
10873
|
this.isBrowser = isPlatformBrowser(this.platformId);
|
|
@@ -10648,19 +10914,29 @@ class FormFieldComponent {
|
|
|
10648
10914
|
parent: this.injector
|
|
10649
10915
|
});
|
|
10650
10916
|
}
|
|
10651
|
-
|
|
10917
|
+
subscribeToFormChange() {
|
|
10652
10918
|
this.form.get(this.field).statusChanges
|
|
10653
10919
|
.pipe(takeUntil(this.unSubscribeSubject$))
|
|
10654
10920
|
.subscribe(() => {
|
|
10655
10921
|
this.cd.markForCheck();
|
|
10656
10922
|
});
|
|
10923
|
+
this.form.get(this.field).valueChanges
|
|
10924
|
+
.pipe(takeUntil(this.unSubscribeSubject$))
|
|
10925
|
+
.subscribe((data) => {
|
|
10926
|
+
if (data?.[this.field] !== this.form.get(this.field)?.value) {
|
|
10927
|
+
if (this.fieldData?.options?.subscribeToFormChanges?.handleChanges) {
|
|
10928
|
+
this.fieldData?.options?.subscribeToFormChanges?.handleChanges(this.form, this.field);
|
|
10929
|
+
}
|
|
10930
|
+
}
|
|
10931
|
+
this.cd.markForCheck();
|
|
10932
|
+
});
|
|
10657
10933
|
}
|
|
10658
10934
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldComponent, deps: [{ token: PLATFORM_ID }, { token: CoreFacade }, { token: i0.ChangeDetectorRef }, { token: i1$6.MatDialog }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10659
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormFieldComponent, isStandalone: false, 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 #formField\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 <label *ngIf=\"config.formFormat === formFormateType.LABEL_INPUT\">{{ fieldData.title }}: </label>\n <div class=\"form-field-container\">\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 text-area-editor editor-field\">\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 @defer (on viewport(formField)) {\n <shared-form-field-cheditor [fieldDataField]=\"fieldData.field\"\n [form]=\"form\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"></shared-form-field-cheditor>\n } @placeholder {\n shared-form-field-cheditor\n }\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.FieldTypeInputStringList\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-string-list-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-string-list-input>\n } @else {\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 }\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\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</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:11px;top:0;font-size:20px;margin-right:-22px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width.text-area-editor label{margin-top:-13px!important}.textarea-field-width label{position:absolute;margin-top:-8px!important;color:#939393;padding:0 5px;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;padding:10px}.form-field{display:flex}.form-field label{margin-right:10px;margin-top:14px}.form-field .form-field-container{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$4.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$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: FormFieldStringListInputComponent, selector: "shared-form-field-string-list-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, deferBlockDependencies: [() => [FormFieldCheditorComponent]] }); }
|
|
10935
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormFieldComponent, isStandalone: false, 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 #formField\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 <label *ngIf=\"config.formFormat === formFormateType.LABEL_INPUT\">{{ fieldData.title }}: </label>\n <div class=\"form-field-container\">\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 text-area-editor editor-field\">\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 @defer (on viewport(formField)) {\n <shared-form-field-cheditor [fieldDataField]=\"fieldData.field\"\n [form]=\"form\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"></shared-form-field-cheditor>\n } @placeholder {\n shared-form-field-cheditor\n }\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.FieldTypeInputStringList\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-string-list-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-string-list-input>\n } @else {\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 }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeRating\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-rating\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-rating>\n } @else {\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 }\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\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</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:11px;top:0;font-size:20px;margin-right:-22px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width.text-area-editor label{margin-top:-13px!important}.textarea-field-width label{position:absolute;margin-top:-8px!important;color:#939393;padding:0 5px;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;padding:10px}.form-field{display:flex}.form-field label{margin-right:10px;margin-top:14px}.form-field .form-field-container{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$4.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", "disabledInteractive"], 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: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: FormFieldStringListInputComponent, selector: "shared-form-field-string-list-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"] }, { kind: "component", type: FormFieldRatingComponent, selector: "shared-form-field-rating", inputs: ["config", "fieldData", "form"] }], animations: [appearFromLeft], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [FormFieldCheditorComponent]] }); }
|
|
10660
10936
|
}
|
|
10661
10937
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
10662
10938
|
type: Component,
|
|
10663
|
-
args: [{ selector: 'shared-form-field', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft], standalone: false, template: "<div *ngIf=\"!fieldData.options?.hide\"\n #formField\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 <label *ngIf=\"config.formFormat === formFormateType.LABEL_INPUT\">{{ fieldData.title }}: </label>\n <div class=\"form-field-container\">\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 text-area-editor editor-field\">\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 @defer (on viewport(formField)) {\n <shared-form-field-cheditor [fieldDataField]=\"fieldData.field\"\n [form]=\"form\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"></shared-form-field-cheditor>\n } @placeholder {\n shared-form-field-cheditor\n }\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.FieldTypeInputStringList\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-string-list-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-string-list-input>\n } @else {\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 }\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\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</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:11px;top:0;font-size:20px;margin-right:-22px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width.text-area-editor label{margin-top:-13px!important}.textarea-field-width label{position:absolute;margin-top:-8px!important;color:#939393;padding:0 5px;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;padding:10px}.form-field{display:flex}.form-field label{margin-right:10px;margin-top:14px}.form-field .form-field-container{width:100%}\n"] }]
|
|
10939
|
+
args: [{ selector: 'shared-form-field', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft], standalone: false, template: "<div *ngIf=\"!fieldData.options?.hide\"\n #formField\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 <label *ngIf=\"config.formFormat === formFormateType.LABEL_INPUT\">{{ fieldData.title }}: </label>\n <div class=\"form-field-container\">\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 text-area-editor editor-field\">\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 @defer (on viewport(formField)) {\n <shared-form-field-cheditor [fieldDataField]=\"fieldData.field\"\n [form]=\"form\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"></shared-form-field-cheditor>\n } @placeholder {\n shared-form-field-cheditor\n }\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.FieldTypeInputStringList\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-string-list-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-string-list-input>\n } @else {\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 }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeRating\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-rating\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-rating>\n } @else {\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 }\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\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</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:11px;top:0;font-size:20px;margin-right:-22px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width.text-area-editor label{margin-top:-13px!important}.textarea-field-width label{position:absolute;margin-top:-8px!important;color:#939393;padding:0 5px;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;padding:10px}.form-field{display:flex}.form-field label{margin-right:10px;margin-top:14px}.form-field .form-field-container{width:100%}\n"] }]
|
|
10664
10940
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
10665
10941
|
type: Inject,
|
|
10666
10942
|
args: [PLATFORM_ID]
|
|
@@ -10700,17 +10976,19 @@ class StarRatingComponent {
|
|
|
10700
10976
|
constructor() {
|
|
10701
10977
|
this.rating = 0;
|
|
10702
10978
|
this.size = 'normal';
|
|
10703
|
-
this.arrayList =
|
|
10979
|
+
this.arrayList = Array(10).fill(0);
|
|
10704
10980
|
}
|
|
10705
10981
|
ngOnInit() {
|
|
10706
10982
|
}
|
|
10707
10983
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StarRatingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10708
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StarRatingComponent, isStandalone: false, selector: "shared-star-rating", inputs: { rating: "rating", size: "size", config: "config" }, ngImport: i0, template: "<div class=\"star-rating-block\"\n [ngClass]=\"{'block-big': size === 'big', 'small-form-width-form-field': config?.smallFormWidth}\">\n <
|
|
10984
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StarRatingComponent, isStandalone: false, selector: "shared-star-rating", inputs: { fieldData: "fieldData", rating: "rating", size: "size", config: "config" }, ngImport: i0, template: "<div class=\"star-rating-block\"\n [ngClass]=\"{'block-big': size === 'big', 'small-form-width-form-field': config?.smallFormWidth}\">\n <label class=\"show-label\">{{ fieldData.title }}</label>\n <span class=\"d-flex align-items-center\">\n <mat-icon *ngFor=\"let number of arrayList; let i=index\"\n [ngClass]=\"{'yellow': i < rating}\">fiber_manual_record</mat-icon>\n </span>\n</div>\n", styles: [".star-rating-block{overflow:hidden;position:relative}.star-rating-block mat-icon{color:#afafaf}.star-rating-block mat-icon.yellow{color:#f8d521}.star-rating-block span.yellow-starts{position:absolute;left:0;top:0}.star-rating-block span.yellow-starts i{color:#fdae5c!important}.star-rating-block span i{font-size:15px;color:#faae5c73!important}.star-rating-block.block-big i{font-size:20px!important}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10709
10985
|
}
|
|
10710
10986
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StarRatingComponent, decorators: [{
|
|
10711
10987
|
type: Component,
|
|
10712
|
-
args: [{ selector: 'shared-star-rating', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"star-rating-block\"\n [ngClass]=\"{'block-big': size === 'big', 'small-form-width-form-field': config?.smallFormWidth}\">\n <
|
|
10713
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
10988
|
+
args: [{ selector: 'shared-star-rating', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"star-rating-block\"\n [ngClass]=\"{'block-big': size === 'big', 'small-form-width-form-field': config?.smallFormWidth}\">\n <label class=\"show-label\">{{ fieldData.title }}</label>\n <span class=\"d-flex align-items-center\">\n <mat-icon *ngFor=\"let number of arrayList; let i=index\"\n [ngClass]=\"{'yellow': i < rating}\">fiber_manual_record</mat-icon>\n </span>\n</div>\n", styles: [".star-rating-block{overflow:hidden;position:relative}.star-rating-block mat-icon{color:#afafaf}.star-rating-block mat-icon.yellow{color:#f8d521}.star-rating-block span.yellow-starts{position:absolute;left:0;top:0}.star-rating-block span.yellow-starts i{color:#fdae5c!important}.star-rating-block span i{font-size:15px;color:#faae5c73!important}.star-rating-block.block-big i{font-size:20px!important}\n"] }]
|
|
10989
|
+
}], ctorParameters: () => [], propDecorators: { fieldData: [{
|
|
10990
|
+
type: Input
|
|
10991
|
+
}], rating: [{
|
|
10714
10992
|
type: Input
|
|
10715
10993
|
}], size: [{
|
|
10716
10994
|
type: Input
|
|
@@ -10741,11 +11019,11 @@ class AutoFormShowFieldComponent {
|
|
|
10741
11019
|
}
|
|
10742
11020
|
}
|
|
10743
11021
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormShowFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10744
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: AutoFormShowFieldComponent, isStandalone: false, selector: "shared-auto-form-show-field", inputs: { fieldData: "fieldData", data: "data", entityId: "entityId", entity: "entity", config: "config" }, ngImport: i0, template: "<div class=\"position-relative form-field\">\n <ng-container [ngSwitch]=\"fieldData.type\">\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <shared-form-field-json-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-json-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelectMultiple\">\n <shared-form-field-select-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle-show\n [config]=\"config\"\n [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <label class=\"show-label\">{{fieldData.title}}</label>\n <div class=\"form-field-value\">{{value}}</div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <label class=\"show-label\">{{fieldData.title}}: </label>\n <div class=\"form-field-value\" [innerHTML]=\"value\"></div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file-show\n [config]=\"config\"\n [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeRating\">\n <shared-star-rating\n [config]=\"config\"\n [rating]=\"value\"></shared-star-rating>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n <shared-form-field-files-show [fieldData]=\"fieldData\"\n [entityId]=\"entityId\"\n [entitySection]=\"entity\"></shared-form-field-files-show>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <shared-form-field-input-show [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-input-show>\n </ng-container>\n </ng-container>\n</div>\n", styles: [".form-field{margin-bottom:20px}.form-field:last-child{margin-bottom:0}.show-label{font-size:12px;opacity:.5}.form-field-value{font-size:16px}.mb-21{margin-bottom:21px}.textarea-field-width{width:100%;max-width:1000px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: StarRatingComponent, selector: "shared-star-rating", inputs: ["rating", "size", "config"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11022
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: AutoFormShowFieldComponent, isStandalone: false, selector: "shared-auto-form-show-field", inputs: { fieldData: "fieldData", data: "data", entityId: "entityId", entity: "entity", config: "config" }, ngImport: i0, template: "<div class=\"position-relative form-field\">\n <ng-container [ngSwitch]=\"fieldData.type\">\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <shared-form-field-json-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-json-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelectMultiple\">\n <shared-form-field-select-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle-show\n [config]=\"config\"\n [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <label class=\"show-label\">{{fieldData.title}}</label>\n <div class=\"form-field-value\">{{value}}</div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <label class=\"show-label\">{{fieldData.title}}: </label>\n <div class=\"form-field-value\" [innerHTML]=\"value\"></div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file-show\n [config]=\"config\"\n [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeRating\">\n <shared-star-rating\n [fieldData]=\"fieldData\"\n [config]=\"config\"\n [rating]=\"value\"></shared-star-rating>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n <shared-form-field-files-show [fieldData]=\"fieldData\"\n [entityId]=\"entityId\"\n [entitySection]=\"entity\"></shared-form-field-files-show>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <shared-form-field-input-show [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-input-show>\n </ng-container>\n </ng-container>\n</div>\n", styles: [".form-field{margin-bottom:20px}.form-field:last-child{margin-bottom:0}.show-label{font-size:12px;opacity:.5}.form-field-value{font-size:16px}.mb-21{margin-bottom:21px}.textarea-field-width{width:100%;max-width:1000px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: StarRatingComponent, selector: "shared-star-rating", inputs: ["fieldData", "rating", "size", "config"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10745
11023
|
}
|
|
10746
11024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormShowFieldComponent, decorators: [{
|
|
10747
11025
|
type: Component,
|
|
10748
|
-
args: [{ selector: "shared-auto-form-show-field", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"position-relative form-field\">\n <ng-container [ngSwitch]=\"fieldData.type\">\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <shared-form-field-json-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-json-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelectMultiple\">\n <shared-form-field-select-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle-show\n [config]=\"config\"\n [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <label class=\"show-label\">{{fieldData.title}}</label>\n <div class=\"form-field-value\">{{value}}</div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <label class=\"show-label\">{{fieldData.title}}: </label>\n <div class=\"form-field-value\" [innerHTML]=\"value\"></div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file-show\n [config]=\"config\"\n [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeRating\">\n <shared-star-rating\n [config]=\"config\"\n [rating]=\"value\"></shared-star-rating>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n <shared-form-field-files-show [fieldData]=\"fieldData\"\n [entityId]=\"entityId\"\n [entitySection]=\"entity\"></shared-form-field-files-show>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <shared-form-field-input-show [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-input-show>\n </ng-container>\n </ng-container>\n</div>\n", styles: [".form-field{margin-bottom:20px}.form-field:last-child{margin-bottom:0}.show-label{font-size:12px;opacity:.5}.form-field-value{font-size:16px}.mb-21{margin-bottom:21px}.textarea-field-width{width:100%;max-width:1000px}\n"] }]
|
|
11026
|
+
args: [{ selector: "shared-auto-form-show-field", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"position-relative form-field\">\n <ng-container [ngSwitch]=\"fieldData.type\">\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <shared-form-field-json-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-json-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelectMultiple\">\n <shared-form-field-select-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle-show\n [config]=\"config\"\n [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <label class=\"show-label\">{{fieldData.title}}</label>\n <div class=\"form-field-value\">{{value}}</div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <label class=\"show-label\">{{fieldData.title}}: </label>\n <div class=\"form-field-value\" [innerHTML]=\"value\"></div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file-show\n [config]=\"config\"\n [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeRating\">\n <shared-star-rating\n [fieldData]=\"fieldData\"\n [config]=\"config\"\n [rating]=\"value\"></shared-star-rating>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n <shared-form-field-files-show [fieldData]=\"fieldData\"\n [entityId]=\"entityId\"\n [entitySection]=\"entity\"></shared-form-field-files-show>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <shared-form-field-input-show [fieldData]=\"fieldData\" [value]=\"value\"></shared-form-field-input-show>\n </ng-container>\n </ng-container>\n</div>\n", styles: [".form-field{margin-bottom:20px}.form-field:last-child{margin-bottom:0}.show-label{font-size:12px;opacity:.5}.form-field-value{font-size:16px}.mb-21{margin-bottom:21px}.textarea-field-width{width:100%;max-width:1000px}\n"] }]
|
|
10749
11027
|
}], ctorParameters: () => [], propDecorators: { fieldData: [{
|
|
10750
11028
|
type: Input
|
|
10751
11029
|
}], data: [{
|
|
@@ -11045,6 +11323,10 @@ class AutoFormMainComponent {
|
|
|
11045
11323
|
this.storedFormValue = this.form.value;
|
|
11046
11324
|
// @TODO Need to test 31.01
|
|
11047
11325
|
// this.preparingData();
|
|
11326
|
+
this.autoCompleteFields = [];
|
|
11327
|
+
if (this.autoCompleteFieldInput) {
|
|
11328
|
+
this.autoCompleteFields = [...this.autoCompleteFieldInput];
|
|
11329
|
+
}
|
|
11048
11330
|
this.getQueryParams();
|
|
11049
11331
|
if (this.useEntityPermissions) {
|
|
11050
11332
|
this.loadEntityPermissions();
|
|
@@ -11113,7 +11395,6 @@ class AutoFormMainComponent {
|
|
|
11113
11395
|
this.route.queryParamMap
|
|
11114
11396
|
.pipe(takeUntil(this.destroy$))
|
|
11115
11397
|
.subscribe(params => {
|
|
11116
|
-
this.autoCompleteFields = [];
|
|
11117
11398
|
const fields = params.getAll('fields');
|
|
11118
11399
|
const fieldsValue = params.getAll('fieldsvalue');
|
|
11119
11400
|
for (let i = 0; i < fields.length; i++) {
|
|
@@ -11332,11 +11613,11 @@ class AutoFormMainComponent {
|
|
|
11332
11613
|
}
|
|
11333
11614
|
}
|
|
11334
11615
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormMainComponent, deps: [{ token: FormErrorsFacade }, { token: FormsFacade }, { token: BaseAutoFormService }, { token: AutoFormService }, { token: PublicationMessagesFacade }, { token: i1$2.ActivatedRoute }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11335
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.14", type: AutoFormMainComponent, isStandalone: false, 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\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 }}
|
|
11616
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.14", type: AutoFormMainComponent, isStandalone: false, 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", autoCompleteFieldInput: "autoCompleteFieldInput", 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\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\n [ngClass]=\"{\n 'small-form-width': config?.smallFormWidth,\n 'form-group-field-open': groupsState[group]\n }\"\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 [entity]=\"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 [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-fields{display:none}.form-group-fields.form-group-field-open{display:flex;margin-left:0}.form-group{cursor:pointer;margin-bottom:0}.form-group h2{display:flex;transition:color .3s;align-items:center}.progress-bar{margin-bottom:10px}.form-field-row{margin:8px 0}.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$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.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", "entity", "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 }); }
|
|
11336
11617
|
}
|
|
11337
11618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormMainComponent, decorators: [{
|
|
11338
11619
|
type: Component,
|
|
11339
|
-
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], standalone: false, 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\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 }}
|
|
11620
|
+
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], standalone: false, 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\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\n [ngClass]=\"{\n 'small-form-width': config?.smallFormWidth,\n 'form-group-field-open': groupsState[group]\n }\"\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 [entity]=\"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 [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-fields{display:none}.form-group-fields.form-group-field-open{display:flex;margin-left:0}.form-group{cursor:pointer;margin-bottom:0}.form-group h2{display:flex;transition:color .3s;align-items:center}.progress-bar{margin-bottom:10px}.form-field-row{margin:8px 0}.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"] }]
|
|
11340
11621
|
}], ctorParameters: () => [{ type: FormErrorsFacade }, { type: FormsFacade }, { type: BaseAutoFormService }, { type: AutoFormService }, { type: PublicationMessagesFacade }, { type: i1$2.ActivatedRoute }, { type: StaticDataFacade }, { type: i0.ChangeDetectorRef }], propDecorators: { fields: [{
|
|
11341
11622
|
type: Input,
|
|
11342
11623
|
args: [{ required: true }]
|
|
@@ -11365,6 +11646,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11365
11646
|
args: [{ required: true }]
|
|
11366
11647
|
}], havePublication: [{
|
|
11367
11648
|
type: Input
|
|
11649
|
+
}], autoCompleteFieldInput: [{
|
|
11650
|
+
type: Input
|
|
11368
11651
|
}], config: [{
|
|
11369
11652
|
type: Input
|
|
11370
11653
|
}], changed: [{
|
|
@@ -11373,36 +11656,198 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11373
11656
|
type: Output
|
|
11374
11657
|
}] } });
|
|
11375
11658
|
|
|
11659
|
+
var DynamicFormQuestionType;
|
|
11660
|
+
(function (DynamicFormQuestionType) {
|
|
11661
|
+
DynamicFormQuestionType["FreeQuestion"] = "free-question";
|
|
11662
|
+
DynamicFormQuestionType["QuestionWithAnswers"] = "question-with-answers";
|
|
11663
|
+
DynamicFormQuestionType["File"] = "file";
|
|
11664
|
+
DynamicFormQuestionType["Dictionary"] = "dictionary";
|
|
11665
|
+
DynamicFormQuestionType["Rating"] = "rating";
|
|
11666
|
+
})(DynamicFormQuestionType || (DynamicFormQuestionType = {}));
|
|
11667
|
+
|
|
11668
|
+
class StaticDataServiceService {
|
|
11669
|
+
constructor(staticDataFacade, config) {
|
|
11670
|
+
this.staticDataFacade = staticDataFacade;
|
|
11671
|
+
this.config = config;
|
|
11672
|
+
}
|
|
11673
|
+
getDynamicFormFields(dynamicFormKey, dynamicFormId) {
|
|
11674
|
+
let dynamicFormFields = [];
|
|
11675
|
+
return new Promise((resolve, reject) => {
|
|
11676
|
+
const result = [];
|
|
11677
|
+
const preLoadSections = [
|
|
11678
|
+
'dynamic-forms(paging:{perPage:-1})',
|
|
11679
|
+
'dynamic-form-questions(paging:{perPage:-1})',
|
|
11680
|
+
'dynamic-form-answers(paging:{perPage:-1})',
|
|
11681
|
+
];
|
|
11682
|
+
this.staticDataFacade.staticDataLoadCategories(preLoadSections);
|
|
11683
|
+
const dynamicForms$ = this.staticDataFacade.getStaticData$('dynamic-forms')
|
|
11684
|
+
.pipe(filter$1(items => !!items?.length));
|
|
11685
|
+
const dynamicFormQuestions$ = this.staticDataFacade.getStaticData$('dynamic-form-questions')
|
|
11686
|
+
.pipe(filter$1(items => !!items?.length));
|
|
11687
|
+
const dynamicFormAnswers$ = this.staticDataFacade.getStaticData$('dynamic-form-answers')
|
|
11688
|
+
.pipe(filter$1(items => !!items?.length));
|
|
11689
|
+
combineLatest({ dynamicForms$, dynamicFormQuestions$, dynamicFormAnswers$ })
|
|
11690
|
+
.pipe(take(1))
|
|
11691
|
+
.subscribe((data) => {
|
|
11692
|
+
const form = data?.dynamicForms$.find(item => item.key === dynamicFormKey || item.id === dynamicFormId);
|
|
11693
|
+
if (!form) {
|
|
11694
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No form with this key ] key: ' + dynamicFormKey + '; id: ' + dynamicFormId);
|
|
11695
|
+
}
|
|
11696
|
+
const questions = data?.dynamicFormQuestions$.filter(item => item.dynamicFormId === form.id);
|
|
11697
|
+
if (!questions?.length) {
|
|
11698
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No questions in the form ]' + dynamicFormKey);
|
|
11699
|
+
}
|
|
11700
|
+
questions.sort((a, b) => (a?.pos || 0) - (b?.pos || 0))
|
|
11701
|
+
.forEach(question => {
|
|
11702
|
+
let selectOptions;
|
|
11703
|
+
if (question.type === DynamicFormQuestionType.QuestionWithAnswers) {
|
|
11704
|
+
const answers = data?.dynamicFormAnswers$.filter(item => item.dynamicFormQuestionId === question.id);
|
|
11705
|
+
selectOptions = answers.map(item => {
|
|
11706
|
+
return {
|
|
11707
|
+
id: item.id,
|
|
11708
|
+
name: item.name
|
|
11709
|
+
};
|
|
11710
|
+
});
|
|
11711
|
+
}
|
|
11712
|
+
if (!question.key) {
|
|
11713
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No key for question ]' + question.id);
|
|
11714
|
+
}
|
|
11715
|
+
const newField = {
|
|
11716
|
+
field: question.key,
|
|
11717
|
+
title: question.name,
|
|
11718
|
+
validators: [],
|
|
11719
|
+
type: this.getNewFieldType(question.type),
|
|
11720
|
+
description: question.description,
|
|
11721
|
+
options: {
|
|
11722
|
+
groupName: question.groupName,
|
|
11723
|
+
selectOptions: selectOptions,
|
|
11724
|
+
selectShowAllOptions: question.showAllOptions || false,
|
|
11725
|
+
multiple: question.multiAnswers,
|
|
11726
|
+
saving: {
|
|
11727
|
+
parentProperty: 'answers',
|
|
11728
|
+
},
|
|
11729
|
+
}
|
|
11730
|
+
};
|
|
11731
|
+
if (question.type === DynamicFormQuestionType.Dictionary) {
|
|
11732
|
+
this.staticDataFacade.loadStaticData(question.dictionaryKey, {});
|
|
11733
|
+
newField.options.loading = true;
|
|
11734
|
+
if (!question.dictionaryKey) {
|
|
11735
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No dictionaryKey for question ] questionId: ' + question.id);
|
|
11736
|
+
}
|
|
11737
|
+
const staticDataSettingKey = Object.keys(this.config.staticDataConfig).find(itemKey => {
|
|
11738
|
+
return this.config.staticDataConfig[itemKey].key === question.dictionaryKey;
|
|
11739
|
+
});
|
|
11740
|
+
if (!staticDataSettingKey) {
|
|
11741
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No staticDataSettings for question ] dictionaryKey: ' + question.dictionaryKey);
|
|
11742
|
+
}
|
|
11743
|
+
newField.options.loadOptionFromStore = this.config.staticDataConfig[staticDataSettingKey].store;
|
|
11744
|
+
}
|
|
11745
|
+
if (question.type === DynamicFormQuestionType.File) {
|
|
11746
|
+
newField.options.fileSettings = {
|
|
11747
|
+
isImage: false,
|
|
11748
|
+
sizeLimit: question.fileLimitSize,
|
|
11749
|
+
allowedExtensions: question.fileLimitTypes,
|
|
11750
|
+
};
|
|
11751
|
+
}
|
|
11752
|
+
if (question.isMandatory) {
|
|
11753
|
+
newField.validators.push(ValidatorsType.Required);
|
|
11754
|
+
}
|
|
11755
|
+
result.push(newField);
|
|
11756
|
+
});
|
|
11757
|
+
resolve([...result]);
|
|
11758
|
+
}, (error) => {
|
|
11759
|
+
console.error('[ static-data ][ getDynamicFormFields ]', error);
|
|
11760
|
+
reject(error);
|
|
11761
|
+
});
|
|
11762
|
+
});
|
|
11763
|
+
}
|
|
11764
|
+
getNewFieldType(type) {
|
|
11765
|
+
let result = FieldType.FieldTypeInput;
|
|
11766
|
+
switch (type) {
|
|
11767
|
+
case DynamicFormQuestionType.Dictionary:
|
|
11768
|
+
case DynamicFormQuestionType.QuestionWithAnswers:
|
|
11769
|
+
result = FieldType.FieldTypeSelect;
|
|
11770
|
+
break;
|
|
11771
|
+
case DynamicFormQuestionType.File:
|
|
11772
|
+
result = FieldType.FieldTypeFile;
|
|
11773
|
+
break;
|
|
11774
|
+
case DynamicFormQuestionType.Rating:
|
|
11775
|
+
result = FieldType.FieldTypeRating;
|
|
11776
|
+
break;
|
|
11777
|
+
}
|
|
11778
|
+
return result;
|
|
11779
|
+
}
|
|
11780
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataServiceService, deps: [{ token: StaticDataFacade }, { token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11781
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataServiceService, providedIn: 'root' }); }
|
|
11782
|
+
}
|
|
11783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataServiceService, decorators: [{
|
|
11784
|
+
type: Injectable,
|
|
11785
|
+
args: [{
|
|
11786
|
+
providedIn: 'root'
|
|
11787
|
+
}]
|
|
11788
|
+
}], ctorParameters: () => [{ type: StaticDataFacade }, { type: undefined, decorators: [{
|
|
11789
|
+
type: Inject,
|
|
11790
|
+
args: [CORE_CONFIG]
|
|
11791
|
+
}] }] });
|
|
11792
|
+
|
|
11376
11793
|
class AutoFormShowComponent {
|
|
11377
|
-
constructor(cd) {
|
|
11794
|
+
constructor(cd, staticDataServiceService) {
|
|
11378
11795
|
this.cd = cd;
|
|
11796
|
+
this.staticDataServiceService = staticDataServiceService;
|
|
11379
11797
|
this.config = { needToPublish: true, smallFormWidth: false };
|
|
11798
|
+
this.groupedFields = signal({});
|
|
11380
11799
|
this.fieldGrouped = false;
|
|
11381
11800
|
this.object_ = Object;
|
|
11801
|
+
this.loading = signal(true);
|
|
11382
11802
|
}
|
|
11383
11803
|
ngOnInit() {
|
|
11384
11804
|
}
|
|
11385
|
-
ngOnChanges(changes) {
|
|
11805
|
+
async ngOnChanges(changes) {
|
|
11386
11806
|
if (changes.fields || changes.data || changes.entity) {
|
|
11807
|
+
await this.preparingFields();
|
|
11387
11808
|
this.fieldGrouped = false;
|
|
11809
|
+
if (this.entitySection.options.isDynamicForm) {
|
|
11810
|
+
this.allData = { ...this.data, ...this.data?.answers };
|
|
11811
|
+
}
|
|
11812
|
+
else {
|
|
11813
|
+
this.allData = { ...this.data };
|
|
11814
|
+
}
|
|
11388
11815
|
this.groupFields();
|
|
11389
11816
|
}
|
|
11390
11817
|
}
|
|
11391
11818
|
truckByFieldName(index, item) {
|
|
11392
11819
|
return item.field;
|
|
11393
11820
|
}
|
|
11821
|
+
async preparingFields() {
|
|
11822
|
+
if (this.entitySection.options.isDynamicForm) {
|
|
11823
|
+
if (!this.data?.dynamicFormId) {
|
|
11824
|
+
throw new Error('[ auto-form-show.component ][ no dynamic form id ]');
|
|
11825
|
+
}
|
|
11826
|
+
this.dynamicFormFields = await this.staticDataServiceService.getDynamicFormFields(null, this.data?.dynamicFormId);
|
|
11827
|
+
if (!this.dynamicFormFields?.length) {
|
|
11828
|
+
throw new Error('[ auto-form-show.component ][ no dynamic form fields ] dynamicFormId: ' + this.data?.dynamicFormId);
|
|
11829
|
+
}
|
|
11830
|
+
this.loading.set(false);
|
|
11831
|
+
this.allFields = [...this.fields.filter(item => item.field !== 'answers'), ...this.dynamicFormFields];
|
|
11832
|
+
}
|
|
11833
|
+
else {
|
|
11834
|
+
this.loading.set(false);
|
|
11835
|
+
this.allFields = [...this.fields];
|
|
11836
|
+
}
|
|
11837
|
+
}
|
|
11394
11838
|
groupFields() {
|
|
11395
11839
|
if (!this.fieldGrouped) {
|
|
11396
|
-
|
|
11397
|
-
this.
|
|
11840
|
+
const newGroupedFields = {};
|
|
11841
|
+
this.allFields
|
|
11398
11842
|
.filter(formField => !formField.options?.hide)
|
|
11399
11843
|
.forEach(formField => {
|
|
11400
11844
|
const groupName = formField?.options?.groupName || '';
|
|
11401
|
-
if (!
|
|
11402
|
-
|
|
11845
|
+
if (!newGroupedFields[groupName]) {
|
|
11846
|
+
newGroupedFields[groupName] = [];
|
|
11403
11847
|
}
|
|
11404
|
-
|
|
11848
|
+
newGroupedFields[groupName].push({ ...formField });
|
|
11405
11849
|
});
|
|
11850
|
+
this.groupedFields.set(newGroupedFields);
|
|
11406
11851
|
this.fieldGrouped = true;
|
|
11407
11852
|
}
|
|
11408
11853
|
}
|
|
@@ -11437,13 +11882,13 @@ class AutoFormShowComponent {
|
|
|
11437
11882
|
}
|
|
11438
11883
|
return className.join(' ');
|
|
11439
11884
|
}
|
|
11440
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormShowComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11441
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: AutoFormShowComponent, isStandalone: false, selector: "shared-auto-form-show", inputs: { fields: "fields", data: "data", entity: "entity", entityId: "entityId", entitySection: "entitySection", config: "config" }, usesOnChanges: true, ngImport: i0, template: "<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n
|
|
11885
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormShowComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: StaticDataServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11886
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: AutoFormShowComponent, isStandalone: false, selector: "shared-auto-form-show", inputs: { fields: "fields", data: "data", entity: "entity", entityId: "entityId", entitySection: "entitySection", config: "config" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!loading()\">\n <div *ngFor=\"let group of object_.keys(groupedFields()); trackBy: truckByFieldName\"\n class=\"form-group\">\n <h4 *ngIf=\"group\" class=\"form-field-group-title mb-0 text-left\">\n {{ group }}\n </h4>\n <div class=\"row form-group-fields mb-30 pt-10\">\n <div *ngFor=\"let item of groupedFields()[group]; trackBy: truckByFieldName\"\n class=\"form-field-row\"\n [ngClass]=\"getFormFieldClass(item)\">\n <!-- [ngClass]=\"item.options.col ? 'form-field-col-'+item.options.col : ''\" -->\n <div [ngClass]=\"{'field-tab': group}\">\n <shared-auto-form-show-field\n [config]=\"config\"\n [fieldData]=\"item\"\n [data]=\"allData\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"\n ></shared-auto-form-show-field>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n<div *ngIf=\"loading()\">\n <shared-spinner [color]=\"'grey'\" [diameter]=\"30\" [overlay]=\"true\"></shared-spinner>\n</div>\n", styles: [":host{display:flex;flex-direction:column}.form-field-group-title{padding:0 20px;text-align:left}.form-group-fields{overflow:hidden;padding-left:20px;padding-right:20px}.form-group{margin-left:20px;width:calc(100% - 40px);margin-right:20px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "component", type: AutoFormShowFieldComponent, selector: "shared-auto-form-show-field", inputs: ["fieldData", "data", "entityId", "entity", "config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11442
11887
|
}
|
|
11443
11888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormShowComponent, decorators: [{
|
|
11444
11889
|
type: Component,
|
|
11445
|
-
args: [{ selector: 'shared-auto-form-show', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n
|
|
11446
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { fields: [{
|
|
11890
|
+
args: [{ selector: 'shared-auto-form-show', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-container *ngIf=\"!loading()\">\n <div *ngFor=\"let group of object_.keys(groupedFields()); trackBy: truckByFieldName\"\n class=\"form-group\">\n <h4 *ngIf=\"group\" class=\"form-field-group-title mb-0 text-left\">\n {{ group }}\n </h4>\n <div class=\"row form-group-fields mb-30 pt-10\">\n <div *ngFor=\"let item of groupedFields()[group]; trackBy: truckByFieldName\"\n class=\"form-field-row\"\n [ngClass]=\"getFormFieldClass(item)\">\n <!-- [ngClass]=\"item.options.col ? 'form-field-col-'+item.options.col : ''\" -->\n <div [ngClass]=\"{'field-tab': group}\">\n <shared-auto-form-show-field\n [config]=\"config\"\n [fieldData]=\"item\"\n [data]=\"allData\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"\n ></shared-auto-form-show-field>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n<div *ngIf=\"loading()\">\n <shared-spinner [color]=\"'grey'\" [diameter]=\"30\" [overlay]=\"true\"></shared-spinner>\n</div>\n", styles: [":host{display:flex;flex-direction:column}.form-field-group-title{padding:0 20px;text-align:left}.form-group-fields{overflow:hidden;padding-left:20px;padding-right:20px}.form-group{margin-left:20px;width:calc(100% - 40px);margin-right:20px}\n"] }]
|
|
11891
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: StaticDataServiceService }], propDecorators: { fields: [{
|
|
11447
11892
|
type: Input
|
|
11448
11893
|
}], data: [{
|
|
11449
11894
|
type: Input
|
|
@@ -11657,8 +12102,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11657
12102
|
|
|
11658
12103
|
class StarRatingModule {
|
|
11659
12104
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StarRatingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
11660
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: StarRatingModule, declarations: [StarRatingComponent], imports: [CommonModule
|
|
11661
|
-
|
|
12105
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: StarRatingModule, declarations: [StarRatingComponent], imports: [CommonModule,
|
|
12106
|
+
MatIcon], exports: [StarRatingComponent] }); }
|
|
12107
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StarRatingModule, imports: [CommonModule,
|
|
12108
|
+
MatIcon] }); }
|
|
11662
12109
|
}
|
|
11663
12110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StarRatingModule, decorators: [{
|
|
11664
12111
|
type: NgModule,
|
|
@@ -11668,7 +12115,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11668
12115
|
StarRatingComponent
|
|
11669
12116
|
],
|
|
11670
12117
|
imports: [
|
|
11671
|
-
CommonModule
|
|
12118
|
+
CommonModule,
|
|
12119
|
+
MatIcon
|
|
11672
12120
|
]
|
|
11673
12121
|
}]
|
|
11674
12122
|
}] });
|
|
@@ -11687,75 +12135,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11687
12135
|
}]
|
|
11688
12136
|
}] });
|
|
11689
12137
|
|
|
11690
|
-
class FormFieldRelationEntityComponent {
|
|
11691
|
-
constructor(cd) {
|
|
11692
|
-
this.cd = cd;
|
|
11693
|
-
this.pendingStatus = 'PENDING';
|
|
11694
|
-
this.inputType = InputType.Text;
|
|
11695
|
-
this.inputMask = null;
|
|
11696
|
-
this.placeholder = '';
|
|
11697
|
-
this.destroy$ = new Subject();
|
|
11698
|
-
}
|
|
11699
|
-
ngOnInit() {
|
|
11700
|
-
this.checkInputType();
|
|
11701
|
-
this.checkInputMask();
|
|
11702
|
-
this.subscribeToFieldStatus();
|
|
11703
|
-
}
|
|
11704
|
-
ngOnDestroy() {
|
|
11705
|
-
this.destroy$.next();
|
|
11706
|
-
this.destroy$.complete();
|
|
11707
|
-
}
|
|
11708
|
-
subscribeToFieldStatus() {
|
|
11709
|
-
this.form.get(this.fieldData.field).statusChanges
|
|
11710
|
-
.pipe(takeUntil(this.destroy$))
|
|
11711
|
-
.subscribe((data) => {
|
|
11712
|
-
this.cd.markForCheck();
|
|
11713
|
-
});
|
|
11714
|
-
}
|
|
11715
|
-
checkInputType() {
|
|
11716
|
-
switch (this.fieldData.options?.format) {
|
|
11717
|
-
case IFormFieldFormat.Email:
|
|
11718
|
-
this.inputType = InputType.Email;
|
|
11719
|
-
break;
|
|
11720
|
-
case IFormFieldFormat.Phone:
|
|
11721
|
-
this.inputType = InputType.Tel;
|
|
11722
|
-
break;
|
|
11723
|
-
case IFormFieldFormat.Number:
|
|
11724
|
-
this.inputType = InputType.Number;
|
|
11725
|
-
break;
|
|
11726
|
-
case IFormFieldFormat.Password:
|
|
11727
|
-
this.inputType = InputType.Password;
|
|
11728
|
-
break;
|
|
11729
|
-
default:
|
|
11730
|
-
this.inputType = InputType.Text;
|
|
11731
|
-
}
|
|
11732
|
-
}
|
|
11733
|
-
checkInputMask() {
|
|
11734
|
-
this.placeholder = this.fieldData.options?.placeholder;
|
|
11735
|
-
switch (this.fieldData.options?.format) {
|
|
11736
|
-
case IFormFieldFormat.Phone:
|
|
11737
|
-
this.inputMask = '+0(0000)000-00-00';
|
|
11738
|
-
this.placeholder = '+0(0000)000-00-00';
|
|
11739
|
-
break;
|
|
11740
|
-
}
|
|
11741
|
-
}
|
|
11742
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldRelationEntityComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11743
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldRelationEntityComponent, isStandalone: false, selector: "shared-form-field-relation-entity", inputs: { config: "config", fieldData: "fieldData", form: "form" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<B>Dynamic form</B>\n<ng-container *ngIf=\"form.get(fieldData.field) as field\">\n <div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <mat-form-field appearance=\"outline\"\n class=\"width100\">\n <mat-label>{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</mat-label>\n <div class=\"display-flex align-baseline \">\n <ng-container *ngIf=\"inputMask\">\n <input matInput\n #input\n [type]=\"inputType\"\n [placeholder]=\"placeholder\"\n [mask]=\"inputMask\"\n [formControlName]=\"fieldData.field\">\n </ng-container>\n <ng-container *ngIf=\"!inputMask\">\n <input matInput\n #input\n [type]=\"inputType\"\n [placeholder]=\"placeholder\"\n [formControlName]=\"fieldData.field\">\n </ng-container>\n <div class=\"form-field-suffix\"\n [ngClass]=\"{'input-field-icon-red': !field.valid}\"\n *ngIf=\"fieldData.asyncValidators && fieldData.asyncValidators.length\">\n <mat-icon *ngIf=\"field.status !== pendingStatus\"\n class=\"secondary-text mat-icon notranslate material-icons mat-icon-no-color\"\n role=\"img\" aria-hidden=\"true\">\n {{field.valid ? 'done' : field.errors['itemUniqValue'] ? 'assignment_late' : ''}}\n </mat-icon>\n <shared-spinner *ngIf=\"field.status === pendingStatus\"\n [diameter]=\"24\"></shared-spinner>\n </div>\n </div>\n </mat-form-field>\n </div>\n</ng-container>\n", styles: [".form-field-suffix{width:17px;height:17px}.form-field-suffix mat-icon{color:#4caf50;font-size:17px;height:17px!important;width:17px!important;min-width:17px;min-height:17px;font-weight:700!important}.form-field-suffix.input-field-icon-red mat-icon{color:#f44336}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11744
|
-
}
|
|
11745
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldRelationEntityComponent, decorators: [{
|
|
11746
|
-
type: Component,
|
|
11747
|
-
args: [{ selector: 'shared-form-field-relation-entity', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<B>Dynamic form</B>\n<ng-container *ngIf=\"form.get(fieldData.field) as field\">\n <div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <mat-form-field appearance=\"outline\"\n class=\"width100\">\n <mat-label>{{fieldData.title}}{{fieldData.validators && fieldData.validators.includes('required') ? ' *' : ''}}</mat-label>\n <div class=\"display-flex align-baseline \">\n <ng-container *ngIf=\"inputMask\">\n <input matInput\n #input\n [type]=\"inputType\"\n [placeholder]=\"placeholder\"\n [mask]=\"inputMask\"\n [formControlName]=\"fieldData.field\">\n </ng-container>\n <ng-container *ngIf=\"!inputMask\">\n <input matInput\n #input\n [type]=\"inputType\"\n [placeholder]=\"placeholder\"\n [formControlName]=\"fieldData.field\">\n </ng-container>\n <div class=\"form-field-suffix\"\n [ngClass]=\"{'input-field-icon-red': !field.valid}\"\n *ngIf=\"fieldData.asyncValidators && fieldData.asyncValidators.length\">\n <mat-icon *ngIf=\"field.status !== pendingStatus\"\n class=\"secondary-text mat-icon notranslate material-icons mat-icon-no-color\"\n role=\"img\" aria-hidden=\"true\">\n {{field.valid ? 'done' : field.errors['itemUniqValue'] ? 'assignment_late' : ''}}\n </mat-icon>\n <shared-spinner *ngIf=\"field.status === pendingStatus\"\n [diameter]=\"24\"></shared-spinner>\n </div>\n </div>\n </mat-form-field>\n </div>\n</ng-container>\n", styles: [".form-field-suffix{width:17px;height:17px}.form-field-suffix mat-icon{color:#4caf50;font-size:17px;height:17px!important;width:17px!important;min-width:17px;min-height:17px;font-weight:700!important}.form-field-suffix.input-field-icon-red mat-icon{color:#f44336}\n"] }]
|
|
11748
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
11749
|
-
type: Input
|
|
11750
|
-
}], fieldData: [{
|
|
11751
|
-
type: Input
|
|
11752
|
-
}], form: [{
|
|
11753
|
-
type: Input
|
|
11754
|
-
}], input: [{
|
|
11755
|
-
type: ViewChild,
|
|
11756
|
-
args: ['input', { static: false }]
|
|
11757
|
-
}] } });
|
|
11758
|
-
|
|
11759
12138
|
class AutoFormModule {
|
|
11760
12139
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
11761
12140
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: AutoFormModule, declarations: [FormFieldComponent,
|
|
@@ -11779,7 +12158,7 @@ class AutoFormModule {
|
|
|
11779
12158
|
PublicationMessagesComponent,
|
|
11780
12159
|
FormFieldTagsComponent,
|
|
11781
12160
|
FormFieldTextareaShowComponent,
|
|
11782
|
-
|
|
12161
|
+
FormFieldRatingComponent], imports: [CommonModule,
|
|
11783
12162
|
FormFieldErrorModule,
|
|
11784
12163
|
FormFieldPublishErrorModule,
|
|
11785
12164
|
MatFormFieldModule,
|
|
@@ -11803,7 +12182,10 @@ class AutoFormModule {
|
|
|
11803
12182
|
NgxMaskDirective,
|
|
11804
12183
|
NgxMaskPipe,
|
|
11805
12184
|
FormFieldCheditorComponent,
|
|
11806
|
-
SharedIconModule
|
|
12185
|
+
SharedIconModule,
|
|
12186
|
+
MatCheckbox,
|
|
12187
|
+
MatRadioButton,
|
|
12188
|
+
MatRadioGroup], exports: [AutoFormMainComponent,
|
|
11807
12189
|
AutoFormShowComponent] }); }
|
|
11808
12190
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormModule, imports: [CommonModule,
|
|
11809
12191
|
FormFieldErrorModule,
|
|
@@ -11827,7 +12209,9 @@ class AutoFormModule {
|
|
|
11827
12209
|
MatAutocompleteModule,
|
|
11828
12210
|
NgxMatSelectSearchModule,
|
|
11829
12211
|
FormFieldCheditorComponent,
|
|
11830
|
-
SharedIconModule
|
|
12212
|
+
SharedIconModule,
|
|
12213
|
+
MatCheckbox,
|
|
12214
|
+
MatRadioButton] }); }
|
|
11831
12215
|
}
|
|
11832
12216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormModule, decorators: [{
|
|
11833
12217
|
type: NgModule,
|
|
@@ -11854,7 +12238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11854
12238
|
PublicationMessagesComponent,
|
|
11855
12239
|
FormFieldTagsComponent,
|
|
11856
12240
|
FormFieldTextareaShowComponent,
|
|
11857
|
-
|
|
12241
|
+
FormFieldRatingComponent
|
|
11858
12242
|
],
|
|
11859
12243
|
imports: [
|
|
11860
12244
|
CommonModule,
|
|
@@ -11881,7 +12265,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11881
12265
|
NgxMaskDirective,
|
|
11882
12266
|
NgxMaskPipe,
|
|
11883
12267
|
FormFieldCheditorComponent,
|
|
11884
|
-
SharedIconModule
|
|
12268
|
+
SharedIconModule,
|
|
12269
|
+
MatCheckbox,
|
|
12270
|
+
MatRadioButton,
|
|
12271
|
+
MatRadioGroup
|
|
11885
12272
|
],
|
|
11886
12273
|
exports: [
|
|
11887
12274
|
AutoFormMainComponent,
|
|
@@ -11962,13 +12349,13 @@ class FormDialogComponent {
|
|
|
11962
12349
|
this.dialogRef.close(undefined);
|
|
11963
12350
|
}
|
|
11964
12351
|
}
|
|
11965
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormDialogComponent, deps: [{ token: i1$6.MatDialogRef }, { token: StaticDataFacade }, { token:
|
|
11966
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormDialogComponent, isStandalone: false, selector: "app-form-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10\"\n @appearFromRightWithDelay\n [class.modal-size-big]=\"data.size === sizeValues.big\"\n [class.modal-size-middle]=\"data.size === sizeValues.middle\"\n [class.modal-size-small]=\"data.size === sizeValues.small\"\n [class.modal-style-success]=\"data.messageType === typesValues.success\"\n [class.modal-style-error]=\"data.messageType === typesValues.error\"\n [class.modal-style-info]=\"data.messageType === typesValues.info\">\n <div [class.display-none]=\"!data.hideButton\"\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n x\n </div>\n\n <h1 class=\"mat-dialog-title\" [class.display-none]=\"!data.title\">{{data.title}}</h1>\n <div mat-dialog-content>\n <p *ngIf=\"data.message\" [innerHTML]=\"data.message\"></p>\n <ng-container *ngIf=\"data.formConfig\">\n <form [formGroup]=\"form\">\n <shared-auto-form\n class=\"mb-20\"\n [entity]=\"data.formConfig.entity\"\n [itemId]=\"data.formConfig.itemId\"\n [formId]=\"formId\"\n [fields]=\"data.formConfig.fields\"\n [form]=\"form\"\n [config]=\"{needToPublish: false}\"\n [errorMessageTexts]=\"globalErrorMessageTexts\"\n (changed)=\"changedFormValue()\"\n (formCompleted)=\"formCompleted($event)\"\n ></shared-auto-form>\n\n <!--<div *ngIf=\"staticSection.actions\" class=\"global-actions\">\n <div *ngFor=\"let action of staticSection.globalActions\"\n (click)=\"globalActionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>-->\n <div @appearFromLeftWithDelay\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n class=\"mt-20\">\n <shared-button\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C</shared-button>\n </div>\n </form>\n </ng-container>\n </div>\n <div [class.display-none]=\"data.hideButton\" mat-dialog-actions class=\"text-align-center mt-20\">\n <button mat-button (click)=\"onNoClick()\"\n class=\"mat-raised-button mr-10\"\n cdkFocusInitial>{{data.falseButtonTitle || '\u041D\u0435\u0442' }}</button>\n <button mat-button\n *ngIf=\"!data.formConfig\"\n [class.display-none]=\"data.hideTrueButton\"\n (click)=\"onYesClick()\"\n class=\"mat-raised-button mat-warn\">{{data.trueButtonTitle || '\u0414\u0430' }}</button>\n </div>\n</div>\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-success{border-left:5px solid #4caf50;background:linear-gradient(15deg,#6dcf71c9,#f0f8f0)}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.style-error{border-left:5px solid #f44336;background:linear-gradient(15deg,#f2686494,#f7e6e4)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}.display-none{display:none}\n"], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$6.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$6.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: ["fields", "itemId", "formId", "showPublicationMessages", "useEntityPermissions", "showProgressBar", "showFormMessageBox", "form", "editorImageUploadUrl", "errorMessageTexts", "entity", "havePublication", "config"], outputs: ["changed", "formCompleted"] }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "directive", type:
|
|
12352
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormDialogComponent, deps: [{ token: i1$6.MatDialogRef }, { token: StaticDataFacade }, { token: i3.UntypedFormBuilder }, { token: AutoFormService }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12353
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormDialogComponent, isStandalone: false, selector: "app-form-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10\"\n @appearFromRightWithDelay\n [class.modal-size-big]=\"data.size === sizeValues.big\"\n [class.modal-size-middle]=\"data.size === sizeValues.middle\"\n [class.modal-size-small]=\"data.size === sizeValues.small\"\n [class.modal-style-success]=\"data.messageType === typesValues.success\"\n [class.modal-style-error]=\"data.messageType === typesValues.error\"\n [class.modal-style-info]=\"data.messageType === typesValues.info\">\n <div [class.display-none]=\"!data.hideButton\"\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n x\n </div>\n\n <h1 class=\"mat-dialog-title\" [class.display-none]=\"!data.title\">{{data.title}}</h1>\n <div mat-dialog-content>\n <p *ngIf=\"data.message\" [innerHTML]=\"data.message\"></p>\n <ng-container *ngIf=\"data.formConfig\">\n <form [formGroup]=\"form\">\n <shared-auto-form\n class=\"mb-20\"\n [entity]=\"data.formConfig.entity\"\n [itemId]=\"data.formConfig.itemId\"\n [formId]=\"formId\"\n [fields]=\"data.formConfig.fields\"\n [form]=\"form\"\n [config]=\"{needToPublish: false}\"\n [errorMessageTexts]=\"globalErrorMessageTexts\"\n (changed)=\"changedFormValue()\"\n (formCompleted)=\"formCompleted($event)\"\n ></shared-auto-form>\n\n <!--<div *ngIf=\"staticSection.actions\" class=\"global-actions\">\n <div *ngFor=\"let action of staticSection.globalActions\"\n (click)=\"globalActionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>-->\n <div @appearFromLeftWithDelay\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n class=\"mt-20\">\n <shared-button\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C</shared-button>\n </div>\n </form>\n </ng-container>\n </div>\n <div [class.display-none]=\"data.hideButton\" mat-dialog-actions class=\"text-align-center mt-20\">\n <button mat-button (click)=\"onNoClick()\"\n class=\"mat-raised-button mr-10\"\n cdkFocusInitial>{{data.falseButtonTitle || '\u041D\u0435\u0442' }}</button>\n <button mat-button\n *ngIf=\"!data.formConfig\"\n [class.display-none]=\"data.hideTrueButton\"\n (click)=\"onYesClick()\"\n class=\"mat-raised-button mat-warn\">{{data.trueButtonTitle || '\u0414\u0430' }}</button>\n </div>\n</div>\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-success{border-left:5px solid #4caf50;background:linear-gradient(15deg,#6dcf71c9,#f0f8f0)}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.style-error{border-left:5px solid #f44336;background:linear-gradient(15deg,#f2686494,#f7e6e4)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}.display-none{display:none}\n"], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$6.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$6.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: ["fields", "itemId", "formId", "showPublicationMessages", "useEntityPermissions", "showProgressBar", "showFormMessageBox", "form", "editorImageUploadUrl", "errorMessageTexts", "entity", "havePublication", "autoCompleteFieldInput", "config"], outputs: ["changed", "formCompleted"] }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11967
12354
|
}
|
|
11968
12355
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormDialogComponent, decorators: [{
|
|
11969
12356
|
type: Component,
|
|
11970
12357
|
args: [{ selector: 'app-form-dialog', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], standalone: false, template: "<div class=\"text-center position-relative p-10\"\n @appearFromRightWithDelay\n [class.modal-size-big]=\"data.size === sizeValues.big\"\n [class.modal-size-middle]=\"data.size === sizeValues.middle\"\n [class.modal-size-small]=\"data.size === sizeValues.small\"\n [class.modal-style-success]=\"data.messageType === typesValues.success\"\n [class.modal-style-error]=\"data.messageType === typesValues.error\"\n [class.modal-style-info]=\"data.messageType === typesValues.info\">\n <div [class.display-none]=\"!data.hideButton\"\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n x\n </div>\n\n <h1 class=\"mat-dialog-title\" [class.display-none]=\"!data.title\">{{data.title}}</h1>\n <div mat-dialog-content>\n <p *ngIf=\"data.message\" [innerHTML]=\"data.message\"></p>\n <ng-container *ngIf=\"data.formConfig\">\n <form [formGroup]=\"form\">\n <shared-auto-form\n class=\"mb-20\"\n [entity]=\"data.formConfig.entity\"\n [itemId]=\"data.formConfig.itemId\"\n [formId]=\"formId\"\n [fields]=\"data.formConfig.fields\"\n [form]=\"form\"\n [config]=\"{needToPublish: false}\"\n [errorMessageTexts]=\"globalErrorMessageTexts\"\n (changed)=\"changedFormValue()\"\n (formCompleted)=\"formCompleted($event)\"\n ></shared-auto-form>\n\n <!--<div *ngIf=\"staticSection.actions\" class=\"global-actions\">\n <div *ngFor=\"let action of staticSection.globalActions\"\n (click)=\"globalActionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>-->\n <div @appearFromLeftWithDelay\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n class=\"mt-20\">\n <shared-button\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C</shared-button>\n </div>\n </form>\n </ng-container>\n </div>\n <div [class.display-none]=\"data.hideButton\" mat-dialog-actions class=\"text-align-center mt-20\">\n <button mat-button (click)=\"onNoClick()\"\n class=\"mat-raised-button mr-10\"\n cdkFocusInitial>{{data.falseButtonTitle || '\u041D\u0435\u0442' }}</button>\n <button mat-button\n *ngIf=\"!data.formConfig\"\n [class.display-none]=\"data.hideTrueButton\"\n (click)=\"onYesClick()\"\n class=\"mat-raised-button mat-warn\">{{data.trueButtonTitle || '\u0414\u0430' }}</button>\n </div>\n</div>\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-success{border-left:5px solid #4caf50;background:linear-gradient(15deg,#6dcf71c9,#f0f8f0)}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.style-error{border-left:5px solid #f44336;background:linear-gradient(15deg,#f2686494,#f7e6e4)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}.display-none{display:none}\n"] }]
|
|
11971
|
-
}], ctorParameters: () => [{ type: i1$6.MatDialogRef }, { type: StaticDataFacade }, { type:
|
|
12358
|
+
}], ctorParameters: () => [{ type: i1$6.MatDialogRef }, { type: StaticDataFacade }, { type: i3.UntypedFormBuilder }, { type: AutoFormService }, { type: undefined, decorators: [{
|
|
11972
12359
|
type: Inject,
|
|
11973
12360
|
args: [MAT_DIALOG_DATA]
|
|
11974
12361
|
}] }] });
|
|
@@ -12442,6 +12829,11 @@ var SubEntityOptionsViewTypes;
|
|
|
12442
12829
|
SubEntityOptionsViewTypes["BIG_BLOCK"] = "big-block";
|
|
12443
12830
|
SubEntityOptionsViewTypes["SMALL_BLOCK"] = "small-block";
|
|
12444
12831
|
})(SubEntityOptionsViewTypes || (SubEntityOptionsViewTypes = {}));
|
|
12832
|
+
var StaticDataListComponentModes;
|
|
12833
|
+
(function (StaticDataListComponentModes) {
|
|
12834
|
+
StaticDataListComponentModes["inline"] = "inline";
|
|
12835
|
+
StaticDataListComponentModes["modal"] = "modal";
|
|
12836
|
+
})(StaticDataListComponentModes || (StaticDataListComponentModes = {}));
|
|
12445
12837
|
|
|
12446
12838
|
var RightBlocks;
|
|
12447
12839
|
(function (RightBlocks) {
|
|
@@ -12602,8 +12994,8 @@ class FieldSettingsDialogComponent {
|
|
|
12602
12994
|
});
|
|
12603
12995
|
this.form = this.fb.group(preparedFields);
|
|
12604
12996
|
}
|
|
12605
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FieldSettingsDialogComponent, deps: [{ token: i1$6.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: StaticDataFacade }, { token: i1.Store }, { token:
|
|
12606
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FieldSettingsDialogComponent, isStandalone: true, selector: "app-field-settings-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\"\n @appearFromRightWithDelay>\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n\n <h5 class=\"mat-dialog-title\">\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u043E\u043B\u0435\u0439</h5>\n <div mat-dialog-content>\n <form [formGroup]=\"form\">\n <div cdkDropList class=\"example-list\" (cdkDropListDropped)=\"drop($event)\">\n @for (fieldData of sectionField; track fieldData) {\n <div class=\"example-box\" cdkDrag>\n <div class=\"example-custom-placeholder\" *cdkDragPlaceholder></div>\n <mat-icon class=\"example-drag-cursor\">view_headline</mat-icon>\n <mat-slide-toggle [formControlName]=\"fieldData.field\">{{ fieldData.title }}</mat-slide-toggle>\n </div>\n }\n </div>\n </form>\n </div>\n <div @appearFromLeftWithDelay\n mat-dialog-actions class=\"text-align-center mt-20\">\n <button mat-button (click)=\"onNoClick()\"\n class=\"mat-raised-button mr-10\">\u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button mat-button\n (click)=\"submitClick()\"\n class=\"mat-raised-button mat-warn\">\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C\n </button>\n </div>\n</div>\n\n\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}.filter-form-field{text-align:left;font-size:13px;padding-right:10px}.small-form-field{margin-bottom:5px}.setting-item{text-align:left}.example-list{width:500px;max-width:100%;border:solid 1px #ccc;min-height:60px;display:block;background:#fff;border-radius:4px;overflow:hidden;font-family:sans-serif}.example-box{padding:10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;box-sizing:border-box;cursor:move;background:#fff;font-size:14px;font-family:sans-serif}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.example-custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:45px;transition:transform .25s cubic-bezier(0,0,.2,1)}.example-drag-cursor{margin-right:16px;cursor:move}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type:
|
|
12997
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FieldSettingsDialogComponent, deps: [{ token: i1$6.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: StaticDataFacade }, { token: i1.Store }, { token: i3.UntypedFormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12998
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FieldSettingsDialogComponent, isStandalone: true, selector: "app-field-settings-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\"\n @appearFromRightWithDelay>\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n\n <h5 class=\"mat-dialog-title\">\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u043E\u043B\u0435\u0439</h5>\n <div mat-dialog-content>\n <form [formGroup]=\"form\">\n <div cdkDropList class=\"example-list\" (cdkDropListDropped)=\"drop($event)\">\n @for (fieldData of sectionField; track fieldData) {\n <div class=\"example-box\" cdkDrag>\n <div class=\"example-custom-placeholder\" *cdkDragPlaceholder></div>\n <mat-icon class=\"example-drag-cursor\">view_headline</mat-icon>\n <mat-slide-toggle [formControlName]=\"fieldData.field\">{{ fieldData.title }}</mat-slide-toggle>\n </div>\n }\n </div>\n </form>\n </div>\n <div @appearFromLeftWithDelay\n mat-dialog-actions class=\"text-align-center mt-20\">\n <button mat-button (click)=\"onNoClick()\"\n class=\"mat-raised-button mr-10\">\u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button mat-button\n (click)=\"submitClick()\"\n class=\"mat-raised-button mat-warn\">\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C\n </button>\n </div>\n</div>\n\n\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}.filter-form-field{text-align:left;font-size:13px;padding-right:10px}.small-form-field{margin-bottom:5px}.setting-item{text-align:left}.example-list{width:500px;max-width:100%;border:solid 1px #ccc;min-height:60px;display:block;background:#fff;border-radius:4px;overflow:hidden;font-family:sans-serif}.example-box{padding:10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;box-sizing:border-box;cursor:move;background:#fff;font-size:14px;font-family:sans-serif}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.example-custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:45px;transition:transform .25s cubic-bezier(0,0,.2,1)}.example-drag-cursor{margin-right:16px;cursor:move}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12607
12999
|
}
|
|
12608
13000
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FieldSettingsDialogComponent, decorators: [{
|
|
12609
13001
|
type: Component,
|
|
@@ -12622,7 +13014,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
12622
13014
|
}], ctorParameters: () => [{ type: i1$6.MatDialogRef }, { type: undefined, decorators: [{
|
|
12623
13015
|
type: Inject,
|
|
12624
13016
|
args: [MAT_DIALOG_DATA]
|
|
12625
|
-
}] }, { type: StaticDataFacade }, { type: i1.Store }, { type:
|
|
13017
|
+
}] }, { type: StaticDataFacade }, { type: i1.Store }, { type: i3.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }] });
|
|
12626
13018
|
|
|
12627
13019
|
class FilteringDialogComponent {
|
|
12628
13020
|
constructor(dialogRef, data, staticDataFacade, store, fb, cd) {
|
|
@@ -12716,8 +13108,8 @@ class FilteringDialogComponent {
|
|
|
12716
13108
|
};
|
|
12717
13109
|
});
|
|
12718
13110
|
}
|
|
12719
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FilteringDialogComponent, deps: [{ token: i1$6.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: StaticDataFacade }, { token: i1.Store }, { token:
|
|
12720
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FilteringDialogComponent, isStandalone: true, selector: "app-filtering-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\"\n @appearFromRightWithDelay>\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n x\n </div>\n\n <h5 class=\"mat-dialog-title\">\u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F</h5>\n <div mat-dialog-content>\n <form [formGroup]=\"form\">\n\n <table class=\"filter-form\" [formGroup]=\"form\">\n <tr *ngFor=\"let field of filterFields\">\n <th class=\"filter-form-field\">{{ field.title }}</th>\n <td class=\"filter-form-value\">\n <mat-form-field class=\"small-form-field\">\n @switch (field.type) {\n @default {\n <input matInput type=\"text\" [formControlName]=\"field.field\"/>\n }\n @case (StaticDataSectionFilteringFieldTypes.TOGGLE) {\n <mat-select [formControlName]=\"field.field\">\n <mat-option value=\"\"> ---</mat-option>\n <mat-option [value]=\"'1:\u0414\u0430'\">\u0414\u0430</mat-option>\n <mat-option [value]=\"'0:\u041D\u0435\u0442'\">\u041D\u0435\u0442</mat-option>\n </mat-select>\n }\n @case (StaticDataSectionFilteringFieldTypes.SELECT) {\n <mat-select [formControlName]=\"field.field\" [multiple]=\"true\">\n <mat-option value=\"\"> --</mat-option>\n <mat-option *ngFor=\"let option of storedOption[field.field]\"\n [value]=\"option.value + ':' + option.title\">{{ option.title }}\n </mat-option>\n </mat-select>\n }\n }\n </mat-form-field>\n </td>\n </tr>\n </table>\n </form>\n </div>\n <div @appearFromLeftWithDelay\n mat-dialog-actions class=\"text-align-center mt-20\">\n <button mat-button (click)=\"onNoClick()\"\n class=\"mat-raised-button mr-10\"\n cdkFocusInitial>\u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button mat-button\n (click)=\"submitClick()\"\n class=\"mat-raised-button mat-warn\">\u0424\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u0442\u044C\n </button>\n </div>\n</div>\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}.filter-form-field{text-align:left;font-size:13px;padding-right:10px}.small-form-field{margin-bottom:5px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type:
|
|
13111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FilteringDialogComponent, deps: [{ token: i1$6.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: StaticDataFacade }, { token: i1.Store }, { token: i3.UntypedFormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13112
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FilteringDialogComponent, isStandalone: true, selector: "app-filtering-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\"\n @appearFromRightWithDelay>\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n x\n </div>\n\n <h5 class=\"mat-dialog-title\">\u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F</h5>\n <div mat-dialog-content>\n <form [formGroup]=\"form\">\n\n <table class=\"filter-form\" [formGroup]=\"form\">\n <tr *ngFor=\"let field of filterFields\">\n <th class=\"filter-form-field\">{{ field.title }}</th>\n <td class=\"filter-form-value\">\n <mat-form-field class=\"small-form-field\">\n @switch (field.type) {\n @default {\n <input matInput type=\"text\" [formControlName]=\"field.field\"/>\n }\n @case (StaticDataSectionFilteringFieldTypes.TOGGLE) {\n <mat-select [formControlName]=\"field.field\">\n <mat-option value=\"\"> ---</mat-option>\n <mat-option [value]=\"'1:\u0414\u0430'\">\u0414\u0430</mat-option>\n <mat-option [value]=\"'0:\u041D\u0435\u0442'\">\u041D\u0435\u0442</mat-option>\n </mat-select>\n }\n @case (StaticDataSectionFilteringFieldTypes.SELECT) {\n <mat-select [formControlName]=\"field.field\" [multiple]=\"true\">\n <mat-option value=\"\"> --</mat-option>\n <mat-option *ngFor=\"let option of storedOption[field.field]\"\n [value]=\"option.value + ':' + option.title\">{{ option.title }}\n </mat-option>\n </mat-select>\n }\n }\n </mat-form-field>\n </td>\n </tr>\n </table>\n </form>\n </div>\n <div @appearFromLeftWithDelay\n mat-dialog-actions class=\"text-align-center mt-20\">\n <button mat-button (click)=\"onNoClick()\"\n class=\"mat-raised-button mr-10\"\n cdkFocusInitial>\u041E\u0442\u043C\u0435\u043D\u0430\n </button>\n <button mat-button\n (click)=\"submitClick()\"\n class=\"mat-raised-button mat-warn\">\u0424\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u0442\u044C\n </button>\n </div>\n</div>\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}.filter-form-field{text-align:left;font-size:13px;padding-right:10px}.small-form-field{margin-bottom:5px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12721
13113
|
}
|
|
12722
13114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FilteringDialogComponent, decorators: [{
|
|
12723
13115
|
type: Component,
|
|
@@ -12736,7 +13128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
12736
13128
|
}], ctorParameters: () => [{ type: i1$6.MatDialogRef }, { type: undefined, decorators: [{
|
|
12737
13129
|
type: Inject,
|
|
12738
13130
|
args: [MAT_DIALOG_DATA]
|
|
12739
|
-
}] }, { type: StaticDataFacade }, { type: i1.Store }, { type:
|
|
13131
|
+
}] }, { type: StaticDataFacade }, { type: i1.Store }, { type: i3.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }] });
|
|
12740
13132
|
|
|
12741
13133
|
class StaticDataListFilteringComponent {
|
|
12742
13134
|
constructor(staticDataFacade, store, cd, dialog, fb) {
|
|
@@ -12834,13 +13226,13 @@ class StaticDataListFilteringComponent {
|
|
|
12834
13226
|
});
|
|
12835
13227
|
this.form = this.fb.group(preparedFields);
|
|
12836
13228
|
}
|
|
12837
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataListFilteringComponent, deps: [{ token: StaticDataFacade }, { token: i1.Store }, { token: i0.ChangeDetectorRef }, { token: i1$6.MatDialog }, { token:
|
|
13229
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataListFilteringComponent, deps: [{ token: StaticDataFacade }, { token: i1.Store }, { token: i0.ChangeDetectorRef }, { token: i1$6.MatDialog }, { token: i3.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12838
13230
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataListFilteringComponent, isStandalone: true, selector: "app-static-data-list-filtering", inputs: { filteringConfig: "filteringConfig", sectionFields: "sectionFields" }, outputs: { filterSubmit: "filterSubmit" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"filter-block\">\n <div class=\"filter-link\" (click)=\"openDialog()\">\u0424\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u0442\u044C </div>\n <!--<mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title> \u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F</mat-panel-title>\n </mat-expansion-panel-header>\n\n <table class=\"filter-form\" [formGroup]=\"form\">\n <tr *ngFor=\"let field of filterFields\">\n <th class=\"filter-form-field\">{{ field.title }}</th>\n <td class=\"filter-form-value\">\n <mat-form-field>\n @switch (field.type) {\n @case (FieldType.FieldTypeInput) {\n <input matInput type=\"text\" [formControlName]=\"field.field\"/>\n }\n @case (FieldType.FieldTypeSlideToggle) {\n <mat-select [formControlName]=\"field.field\">\n <mat-option value=\"\"> ---</mat-option>\n <mat-option [value]=\"1\">\u0414\u0430</mat-option>\n <mat-option [value]=\"0\">\u041D\u0435\u0442</mat-option>\n </mat-select>\n }\n @case (FieldType.FieldTypeSelect) {\n <mat-select [formControlName]=\"field.field\" [multiple]=\"true\">\n <mat-option value=\"\"> ---</mat-option>\n <mat-option *ngFor=\"let option of storedOption[field.field]\" [value]=\"option.value\">{{ option.title }}\n </mat-option>\n </mat-select>\n }\n }\n </mat-form-field>\n </td>\n </tr>\n </table>\n <div class=\"mt-10\">\n <shared-button\n class=\"mr-5\"\n color=\"basic\"\n styleTheme=\"raised\"\n size=\"small\"\n (click)=\"clearFilter()\">\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C\n </shared-button>\n <shared-button\n color=\"accent\"\n styleTheme=\"raised\"\n size=\"small\"\n (click)=\"filterFormSubmit()\">\u0424\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u0442\u044C\n </shared-button>\n </div>\n </mat-expansion-panel>-->\n</div>\n", styles: [".filter-block{display:flex;align-items:center}.filter-link{cursor:pointer}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12839
13231
|
}
|
|
12840
13232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataListFilteringComponent, decorators: [{
|
|
12841
13233
|
type: Component,
|
|
12842
13234
|
args: [{ selector: 'app-static-data-list-filtering', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"filter-block\">\n <div class=\"filter-link\" (click)=\"openDialog()\">\u0424\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u0442\u044C </div>\n <!--<mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title> \u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F</mat-panel-title>\n </mat-expansion-panel-header>\n\n <table class=\"filter-form\" [formGroup]=\"form\">\n <tr *ngFor=\"let field of filterFields\">\n <th class=\"filter-form-field\">{{ field.title }}</th>\n <td class=\"filter-form-value\">\n <mat-form-field>\n @switch (field.type) {\n @case (FieldType.FieldTypeInput) {\n <input matInput type=\"text\" [formControlName]=\"field.field\"/>\n }\n @case (FieldType.FieldTypeSlideToggle) {\n <mat-select [formControlName]=\"field.field\">\n <mat-option value=\"\"> ---</mat-option>\n <mat-option [value]=\"1\">\u0414\u0430</mat-option>\n <mat-option [value]=\"0\">\u041D\u0435\u0442</mat-option>\n </mat-select>\n }\n @case (FieldType.FieldTypeSelect) {\n <mat-select [formControlName]=\"field.field\" [multiple]=\"true\">\n <mat-option value=\"\"> ---</mat-option>\n <mat-option *ngFor=\"let option of storedOption[field.field]\" [value]=\"option.value\">{{ option.title }}\n </mat-option>\n </mat-select>\n }\n }\n </mat-form-field>\n </td>\n </tr>\n </table>\n <div class=\"mt-10\">\n <shared-button\n class=\"mr-5\"\n color=\"basic\"\n styleTheme=\"raised\"\n size=\"small\"\n (click)=\"clearFilter()\">\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C\n </shared-button>\n <shared-button\n color=\"accent\"\n styleTheme=\"raised\"\n size=\"small\"\n (click)=\"filterFormSubmit()\">\u0424\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u0442\u044C\n </shared-button>\n </div>\n </mat-expansion-panel>-->\n</div>\n", styles: [".filter-block{display:flex;align-items:center}.filter-link{cursor:pointer}\n"] }]
|
|
12843
|
-
}], ctorParameters: () => [{ type: StaticDataFacade }, { type: i1.Store }, { type: i0.ChangeDetectorRef }, { type: i1$6.MatDialog }, { type:
|
|
13235
|
+
}], ctorParameters: () => [{ type: StaticDataFacade }, { type: i1.Store }, { type: i0.ChangeDetectorRef }, { type: i1$6.MatDialog }, { type: i3.UntypedFormBuilder }], propDecorators: { filteringConfig: [{
|
|
12844
13236
|
type: Input
|
|
12845
13237
|
}], sectionFields: [{
|
|
12846
13238
|
type: Input
|
|
@@ -12905,59 +13297,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
12905
13297
|
type: Output
|
|
12906
13298
|
}] } });
|
|
12907
13299
|
|
|
12908
|
-
class ViewStaticDataDetailsDialogComponent {
|
|
12909
|
-
constructor(data) {
|
|
12910
|
-
this.data = data;
|
|
12911
|
-
this.isShowAutoFormShow = false;
|
|
12912
|
-
this.dialogRef = inject((MatDialogRef));
|
|
12913
|
-
}
|
|
12914
|
-
ngOnInit() {
|
|
12915
|
-
if (this.data) {
|
|
12916
|
-
this.isShowAutoFormShow = true;
|
|
12917
|
-
this.contentType = this.data.contentType;
|
|
12918
|
-
this.itemData = this.data.itemData;
|
|
12919
|
-
this.staticSection = this.data.staticSection;
|
|
12920
|
-
this.sectionFields = this.data.staticSection.fields;
|
|
12921
|
-
this.itemId = this.data.itemId;
|
|
12922
|
-
}
|
|
12923
|
-
}
|
|
12924
|
-
onNoClick() {
|
|
12925
|
-
this.dialogRef.close({ status: false });
|
|
12926
|
-
}
|
|
12927
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ViewStaticDataDetailsDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12928
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ViewStaticDataDetailsDialogComponent, isStandalone: true, selector: "app-view-static-data-details-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\"\n @appearFromRightWithDelay>\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n\n <div mat-dialog-content>\n <shared-auto-form-show\n *ngIf=\"isShowAutoFormShow\"\n class=\"mb-20\"\n [entity]=\"contentType\"\n [data]=\"itemData\"\n [entityId]=\"itemId\"\n [fields]=\"sectionFields\"\n [config]=\"{needToPublish: false}\"\n [entitySection]=\"staticSection\"\n ></shared-auto-form-show>\n </div>\n</div>\n\n\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$6.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: AutoFormModule }, { kind: "component", type: AutoFormShowComponent, selector: "shared-auto-form-show", inputs: ["fields", "data", "entity", "entityId", "entitySection", "config"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12929
|
-
}
|
|
12930
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ViewStaticDataDetailsDialogComponent, decorators: [{
|
|
12931
|
-
type: Component,
|
|
12932
|
-
args: [{ selector: 'app-view-static-data-details-dialog', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], imports: [
|
|
12933
|
-
ButtonModule,
|
|
12934
|
-
ReactiveFormsModule,
|
|
12935
|
-
MatIconModule,
|
|
12936
|
-
MatDialogModule,
|
|
12937
|
-
AutoFormModule,
|
|
12938
|
-
NgIf
|
|
12939
|
-
], template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\"\n @appearFromRightWithDelay>\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n\n <div mat-dialog-content>\n <shared-auto-form-show\n *ngIf=\"isShowAutoFormShow\"\n class=\"mb-20\"\n [entity]=\"contentType\"\n [data]=\"itemData\"\n [entityId]=\"itemId\"\n [fields]=\"sectionFields\"\n [config]=\"{needToPublish: false}\"\n [entitySection]=\"staticSection\"\n ></shared-auto-form-show>\n </div>\n</div>\n\n\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"] }]
|
|
12940
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
12941
|
-
type: Inject,
|
|
12942
|
-
args: [MAT_DIALOG_DATA]
|
|
12943
|
-
}] }] });
|
|
12944
|
-
|
|
12945
13300
|
class StaticDataItemsComponent {
|
|
12946
|
-
constructor(routerFacade, staticDataFacade, cd, dialog, matIconReg) {
|
|
13301
|
+
constructor(routerFacade, staticDataFacade, cd, dialog, matIconReg, createNewDialog, viewDialog) {
|
|
12947
13302
|
this.routerFacade = routerFacade;
|
|
12948
13303
|
this.staticDataFacade = staticDataFacade;
|
|
12949
13304
|
this.cd = cd;
|
|
12950
13305
|
this.dialog = dialog;
|
|
12951
13306
|
this.matIconReg = matIconReg;
|
|
13307
|
+
this.createNewDialog = createNewDialog;
|
|
13308
|
+
this.viewDialog = viewDialog;
|
|
13309
|
+
this.selectIsRequired = false;
|
|
12952
13310
|
this.viewMode = false;
|
|
12953
13311
|
this.queryParams = null;
|
|
12954
13312
|
this.delete = new EventEmitter();
|
|
12955
13313
|
this.changeSorting = new EventEmitter();
|
|
13314
|
+
this.selectingItem = new EventEmitter();
|
|
12956
13315
|
this.sortingState = { field: 'id', type: 'asc' };
|
|
12957
13316
|
}
|
|
12958
13317
|
ngOnInit() {
|
|
12959
13318
|
const displayedColumnsStrings = this.displayedColumns.map(item => item.field);
|
|
12960
|
-
this.
|
|
13319
|
+
if (!this.selectIsRequired) {
|
|
13320
|
+
this.displayedColumnsStrings = [...displayedColumnsStrings, 'actions'];
|
|
13321
|
+
}
|
|
13322
|
+
else {
|
|
13323
|
+
this.displayedColumnsStrings = ['selecting', ...displayedColumnsStrings, 'actions'];
|
|
13324
|
+
}
|
|
12961
13325
|
this.displayedFormFields = this.staticSection.fields.filter(item => displayedColumnsStrings.includes(item.field));
|
|
12962
13326
|
this.matIconReg.setDefaultFontSetClass('material-symbols-outlined');
|
|
12963
13327
|
}
|
|
@@ -12965,7 +13329,12 @@ class StaticDataItemsComponent {
|
|
|
12965
13329
|
if (changes.displayedColumns) {
|
|
12966
13330
|
const displayedColumnsStrings = changes.displayedColumns.currentValue.map(item => item.field);
|
|
12967
13331
|
this.displayedFormFields = this.staticSection.fields.filter(item => displayedColumnsStrings.includes(item.field));
|
|
12968
|
-
this.
|
|
13332
|
+
if (this.mode === StaticDataListComponentModes.inline) {
|
|
13333
|
+
this.displayedColumnsStrings = [...displayedColumnsStrings, 'actions'];
|
|
13334
|
+
}
|
|
13335
|
+
else {
|
|
13336
|
+
this.displayedColumnsStrings = ['selecting', ...displayedColumnsStrings, 'actions'];
|
|
13337
|
+
}
|
|
12969
13338
|
}
|
|
12970
13339
|
if (changes.items) {
|
|
12971
13340
|
this.editUrlArray = ['/static-data', this.contentType];
|
|
@@ -12978,24 +13347,44 @@ class StaticDataItemsComponent {
|
|
|
12978
13347
|
}
|
|
12979
13348
|
}*/
|
|
12980
13349
|
}
|
|
13350
|
+
popupModeSelectItem(id, name) {
|
|
13351
|
+
if (this.mode === StaticDataListComponentModes.modal) {
|
|
13352
|
+
this.selectingItem.emit({ id, name });
|
|
13353
|
+
}
|
|
13354
|
+
}
|
|
12981
13355
|
clickAction(id, itemData) {
|
|
12982
13356
|
if (this.staticSection.actions?.defaultListAction === 'view' || this.viewMode) {
|
|
12983
|
-
|
|
12984
|
-
this.openViewInModal(id, itemData);
|
|
12985
|
-
}
|
|
12986
|
-
else {
|
|
12987
|
-
this.view(id, itemData);
|
|
12988
|
-
}
|
|
13357
|
+
this.view(id, itemData);
|
|
12989
13358
|
}
|
|
12990
13359
|
else {
|
|
12991
13360
|
this.edit(id);
|
|
12992
13361
|
}
|
|
12993
13362
|
}
|
|
12994
13363
|
edit(id) {
|
|
12995
|
-
|
|
13364
|
+
if (this.mode === StaticDataListComponentModes.modal) {
|
|
13365
|
+
this.dialog.open(this.createNewDialog, {
|
|
13366
|
+
minHeight: '400px',
|
|
13367
|
+
width: '600px',
|
|
13368
|
+
data: {
|
|
13369
|
+
entity: this.contentType,
|
|
13370
|
+
entityId: id,
|
|
13371
|
+
staticDataConfiguration: {
|
|
13372
|
+
configuration: { [this.contentType]: this.staticSection },
|
|
13373
|
+
languages: [],
|
|
13374
|
+
},
|
|
13375
|
+
},
|
|
13376
|
+
})
|
|
13377
|
+
.afterClosed()
|
|
13378
|
+
.toPromise()
|
|
13379
|
+
.then((result) => {
|
|
13380
|
+
});
|
|
13381
|
+
}
|
|
13382
|
+
else {
|
|
13383
|
+
this.routerFacade.goTo([...this.editUrlArray, id], { queryParams: this.queryParams });
|
|
13384
|
+
}
|
|
12996
13385
|
}
|
|
12997
13386
|
view(id, itemData) {
|
|
12998
|
-
if (this.subEntityConfig?.options?.viewSettings?.viewMode?.openInModal) {
|
|
13387
|
+
if (this.mode === StaticDataListComponentModes.modal || this.subEntityConfig?.options?.viewSettings?.viewMode?.openInModal) {
|
|
12999
13388
|
this.openViewInModal(id, itemData);
|
|
13000
13389
|
}
|
|
13001
13390
|
else {
|
|
@@ -13007,7 +13396,7 @@ class StaticDataItemsComponent {
|
|
|
13007
13396
|
}
|
|
13008
13397
|
}
|
|
13009
13398
|
openViewInModal(id, itemData) {
|
|
13010
|
-
this.dialog.open(
|
|
13399
|
+
this.dialog.open(this.viewDialog, {
|
|
13011
13400
|
panelClass: 'dialog-without-margin',
|
|
13012
13401
|
data: {
|
|
13013
13402
|
itemId: id,
|
|
@@ -13088,8 +13477,8 @@ class StaticDataItemsComponent {
|
|
|
13088
13477
|
});
|
|
13089
13478
|
return preparedRow;
|
|
13090
13479
|
}
|
|
13091
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataItemsComponent, deps: [{ token: RouterFacade }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }, { token: i1$6.MatDialog }, { token: i2$1.MatIconRegistry }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13092
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataItemsComponent, isStandalone: true, selector: "app-static-data-items", inputs: { items: "items", displayedColumns: "displayedColumns", contentType: "contentType", viewMode: "viewMode", queryParams: "queryParams", userRights: "userRights", subEntityConfig: "subEntityConfig", staticSection: "staticSection", parentSection: "parentSection", parentItemId: "parentItemId" }, outputs: { delete: "delete", changeSorting: "changeSorting" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"( preparedItems$ | async ) as items\">\n <table mat-table [dataSource]=\"items\" class=\"static-data-table\">\n <ng-container *ngFor=\"let fieldData of displayedFormFields\" [matColumnDef]=\"fieldData.field\">\n <th mat-header-cell *matHeaderCellDef>\n <div>\n <div class=\"column-title\">{{ fieldData.title }}</div>\n <div class=\"sorting\">\n <mat-icon\n [class.active]=\"fieldData.field === sortingState.field && sortingState.type === 'asc'\"\n (click)=\"sorting(fieldData.field, 'asc')\">arrow_drop_up\n </mat-icon>\n <mat-icon\n [class.active]=\"fieldData.field === sortingState.field && sortingState.type === 'desc'\"\n (click)=\"sorting(fieldData.field, 'desc')\">arrow_drop_down\n </mat-icon>\n </div>\n </div>\n </th>\n <td mat-cell (click)=\"clickAction(element.id, element)\" *matCellDef=\"let element\"> {{ element[fieldData.field] }}</td>\n </ng-container>\n\n <ng-container [matColumnDef]=\"'actions'\">\n <th mat-header-cell *matHeaderCellDef class=\"action-column\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F</th>\n <td mat-cell *matCellDef=\"let element\" class=\"action-column\">\n <mat-icon *ngIf=\"!staticSection.actions?.isNoViewAction\" class=\"mr-1 view-icon view-icon-visibility\"\n (click)=\"view(element.id, element)\">visibility\n </mat-icon>\n <mat-icon *ngIf=\"!viewMode\" class=\"mr-1 view-icon\" (click)=\"edit(element.id)\">edit</mat-icon>\n <mat-icon *ngIf=\"!viewMode\" class=\"view-icon view-icon-delete\" (click)=\"deleteAction(element)\">delete</mat-icon>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsStrings\"></tr>\n <tr mat-row\n *matRowDef=\"let row; columns: displayedColumnsStrings;\"\n ></tr>\n\n </table>\n</ng-container>\n", styles: [".static-data-table{width:100%}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.action-column{text-align:right!important}.view-icon{font-size:20px}.view-icon.view-icon-visibility{color:#605dff}.view-icon.view-icon-delete{color:#ff4023}th div{display:flex}th div .column-title{margin-top:2px}th div .sorting{display:flex;flex-direction:column}th div .sorting mat-icon{font-size:17px;width:15px;height:11px;color:#938c8c;font-weight:700;cursor:pointer}th div .sorting mat-icon.active{color:#ff4023}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13480
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataItemsComponent, deps: [{ token: RouterFacade }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }, { token: i1$6.MatDialog }, { token: i2$1.MatIconRegistry }, { token: STATIC_DATA_CREATE_NEW_ITEM_DIALOG, optional: true }, { token: STATIC_DATA_VIEW_ITEM_DIALOG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13481
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataItemsComponent, isStandalone: true, selector: "app-static-data-items", inputs: { mode: "mode", selectIsRequired: "selectIsRequired", items: "items", displayedColumns: "displayedColumns", contentType: "contentType", viewMode: "viewMode", queryParams: "queryParams", userRights: "userRights", subEntityConfig: "subEntityConfig", staticSection: "staticSection", parentSection: "parentSection", parentItemId: "parentItemId" }, outputs: { delete: "delete", changeSorting: "changeSorting", selectingItem: "selectingItem" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"( preparedItems$ | async ) as items\">\n <table mat-table [dataSource]=\"items\" class=\"static-data-table\">\n <ng-container *ngFor=\"let fieldData of displayedFormFields\" [matColumnDef]=\"fieldData.field\">\n <th mat-header-cell *matHeaderCellDef>\n <div>\n <div class=\"column-title\">{{ fieldData.title }}</div>\n <div class=\"sorting\">\n <mat-icon\n [class.active]=\"fieldData.field === sortingState.field && sortingState.type === 'asc'\"\n (click)=\"sorting(fieldData.field, 'asc')\">arrow_drop_up\n </mat-icon>\n <mat-icon\n [class.active]=\"fieldData.field === sortingState.field && sortingState.type === 'desc'\"\n (click)=\"sorting(fieldData.field, 'desc')\">arrow_drop_down\n </mat-icon>\n </div>\n </div>\n </th>\n <td mat-cell (click)=\"clickAction(element.id, element)\" *matCellDef=\"let element\"> {{ element[fieldData.field] }}</td>\n </ng-container>\n\n <ng-container [matColumnDef]=\"'selecting'\">\n <th mat-header-cell *matHeaderCellDef class=\"selecting-column\">\u0412\u044B\u0431\u043E\u0440</th>\n <td mat-cell *matCellDef=\"let element\" class=\"selecting-column\">\n <mat-icon class=\"mr-1 view-icon\" (click)=\"popupModeSelectItem(element.id, element.name)\">select_all</mat-icon>\n </td>\n </ng-container>\n\n <ng-container [matColumnDef]=\"'actions'\">\n <th mat-header-cell *matHeaderCellDef class=\"action-column\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F</th>\n <td mat-cell *matCellDef=\"let element\" class=\"action-column\">\n <mat-icon *ngIf=\"!staticSection.actions?.isNoViewAction\" class=\"mr-1 view-icon view-icon-visibility\"\n (click)=\"view(element.id, element)\">visibility\n </mat-icon>\n <mat-icon *ngIf=\"!viewMode && !staticSection.options?.viewSettings?.listMode?.hideEditAction\" class=\"mr-1 view-icon\" (click)=\"edit(element.id)\">edit</mat-icon>\n <mat-icon *ngIf=\"!viewMode && !staticSection.options?.viewSettings?.listMode?.hideDeleteAction\" class=\"view-icon view-icon-delete\" (click)=\"deleteAction(element)\">delete</mat-icon>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsStrings\"></tr>\n <tr mat-row\n *matRowDef=\"let row; columns: displayedColumnsStrings;\"\n ></tr>\n\n </table>\n</ng-container>\n", styles: [".static-data-table{width:100%}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.action-column{text-align:right!important}.selecting-column{text-align:left!important}.view-icon{font-size:20px}.view-icon.view-icon-visibility{color:#605dff}.view-icon.view-icon-delete{color:#ff4023}th div{display:flex}th div .column-title{margin-top:2px}th div .sorting{display:flex;flex-direction:column}th div .sorting mat-icon{font-size:17px;width:15px;height:11px;color:#938c8c;font-weight:700;cursor:pointer}th div .sorting mat-icon.active{color:#ff4023}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13093
13482
|
}
|
|
13094
13483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataItemsComponent, decorators: [{
|
|
13095
13484
|
type: Component,
|
|
@@ -13108,8 +13497,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
13108
13497
|
MatRowDef,
|
|
13109
13498
|
MatCellDef,
|
|
13110
13499
|
MatHeaderRowDef
|
|
13111
|
-
], template: "<ng-container *ngIf=\"( preparedItems$ | async ) as items\">\n <table mat-table [dataSource]=\"items\" class=\"static-data-table\">\n <ng-container *ngFor=\"let fieldData of displayedFormFields\" [matColumnDef]=\"fieldData.field\">\n <th mat-header-cell *matHeaderCellDef>\n <div>\n <div class=\"column-title\">{{ fieldData.title }}</div>\n <div class=\"sorting\">\n <mat-icon\n [class.active]=\"fieldData.field === sortingState.field && sortingState.type === 'asc'\"\n (click)=\"sorting(fieldData.field, 'asc')\">arrow_drop_up\n </mat-icon>\n <mat-icon\n [class.active]=\"fieldData.field === sortingState.field && sortingState.type === 'desc'\"\n (click)=\"sorting(fieldData.field, 'desc')\">arrow_drop_down\n </mat-icon>\n </div>\n </div>\n </th>\n <td mat-cell (click)=\"clickAction(element.id, element)\" *matCellDef=\"let element\"> {{ element[fieldData.field] }}</td>\n </ng-container>\n\n <ng-container [matColumnDef]=\"'actions'\">\n <th mat-header-cell *matHeaderCellDef class=\"action-column\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F</th>\n <td mat-cell *matCellDef=\"let element\" class=\"action-column\">\n <mat-icon *ngIf=\"!staticSection.actions?.isNoViewAction\" class=\"mr-1 view-icon view-icon-visibility\"\n (click)=\"view(element.id, element)\">visibility\n </mat-icon>\n <mat-icon *ngIf=\"!viewMode\" class=\"mr-1 view-icon\" (click)=\"edit(element.id)\">edit</mat-icon>\n <mat-icon *ngIf=\"!viewMode\" class=\"view-icon view-icon-delete\" (click)=\"deleteAction(element)\">delete</mat-icon>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsStrings\"></tr>\n <tr mat-row\n *matRowDef=\"let row; columns: displayedColumnsStrings;\"\n ></tr>\n\n </table>\n</ng-container>\n", styles: [".static-data-table{width:100%}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.action-column{text-align:right!important}.view-icon{font-size:20px}.view-icon.view-icon-visibility{color:#605dff}.view-icon.view-icon-delete{color:#ff4023}th div{display:flex}th div .column-title{margin-top:2px}th div .sorting{display:flex;flex-direction:column}th div .sorting mat-icon{font-size:17px;width:15px;height:11px;color:#938c8c;font-weight:700;cursor:pointer}th div .sorting mat-icon.active{color:#ff4023}\n"] }]
|
|
13112
|
-
}], ctorParameters: () => [{ type: RouterFacade }, { type: StaticDataFacade }, { type: i0.ChangeDetectorRef }, { type: i1$6.MatDialog }, { type: i2$1.MatIconRegistry }
|
|
13500
|
+
], template: "<ng-container *ngIf=\"( preparedItems$ | async ) as items\">\n <table mat-table [dataSource]=\"items\" class=\"static-data-table\">\n <ng-container *ngFor=\"let fieldData of displayedFormFields\" [matColumnDef]=\"fieldData.field\">\n <th mat-header-cell *matHeaderCellDef>\n <div>\n <div class=\"column-title\">{{ fieldData.title }}</div>\n <div class=\"sorting\">\n <mat-icon\n [class.active]=\"fieldData.field === sortingState.field && sortingState.type === 'asc'\"\n (click)=\"sorting(fieldData.field, 'asc')\">arrow_drop_up\n </mat-icon>\n <mat-icon\n [class.active]=\"fieldData.field === sortingState.field && sortingState.type === 'desc'\"\n (click)=\"sorting(fieldData.field, 'desc')\">arrow_drop_down\n </mat-icon>\n </div>\n </div>\n </th>\n <td mat-cell (click)=\"clickAction(element.id, element)\" *matCellDef=\"let element\"> {{ element[fieldData.field] }}</td>\n </ng-container>\n\n <ng-container [matColumnDef]=\"'selecting'\">\n <th mat-header-cell *matHeaderCellDef class=\"selecting-column\">\u0412\u044B\u0431\u043E\u0440</th>\n <td mat-cell *matCellDef=\"let element\" class=\"selecting-column\">\n <mat-icon class=\"mr-1 view-icon\" (click)=\"popupModeSelectItem(element.id, element.name)\">select_all</mat-icon>\n </td>\n </ng-container>\n\n <ng-container [matColumnDef]=\"'actions'\">\n <th mat-header-cell *matHeaderCellDef class=\"action-column\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F</th>\n <td mat-cell *matCellDef=\"let element\" class=\"action-column\">\n <mat-icon *ngIf=\"!staticSection.actions?.isNoViewAction\" class=\"mr-1 view-icon view-icon-visibility\"\n (click)=\"view(element.id, element)\">visibility\n </mat-icon>\n <mat-icon *ngIf=\"!viewMode && !staticSection.options?.viewSettings?.listMode?.hideEditAction\" class=\"mr-1 view-icon\" (click)=\"edit(element.id)\">edit</mat-icon>\n <mat-icon *ngIf=\"!viewMode && !staticSection.options?.viewSettings?.listMode?.hideDeleteAction\" class=\"view-icon view-icon-delete\" (click)=\"deleteAction(element)\">delete</mat-icon>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsStrings\"></tr>\n <tr mat-row\n *matRowDef=\"let row; columns: displayedColumnsStrings;\"\n ></tr>\n\n </table>\n</ng-container>\n", styles: [".static-data-table{width:100%}.mat-mdc-row .mat-mdc-cell{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row:hover .mat-mdc-cell{border-color:currentColor}.action-column{text-align:right!important}.selecting-column{text-align:left!important}.view-icon{font-size:20px}.view-icon.view-icon-visibility{color:#605dff}.view-icon.view-icon-delete{color:#ff4023}th div{display:flex}th div .column-title{margin-top:2px}th div .sorting{display:flex;flex-direction:column}th div .sorting mat-icon{font-size:17px;width:15px;height:11px;color:#938c8c;font-weight:700;cursor:pointer}th div .sorting mat-icon.active{color:#ff4023}\n"] }]
|
|
13501
|
+
}], ctorParameters: () => [{ type: RouterFacade }, { type: StaticDataFacade }, { type: i0.ChangeDetectorRef }, { type: i1$6.MatDialog }, { type: i2$1.MatIconRegistry }, { type: i0.Type, decorators: [{
|
|
13502
|
+
type: Optional
|
|
13503
|
+
}, {
|
|
13504
|
+
type: Inject,
|
|
13505
|
+
args: [STATIC_DATA_CREATE_NEW_ITEM_DIALOG]
|
|
13506
|
+
}] }, { type: i0.Type, decorators: [{
|
|
13507
|
+
type: Optional
|
|
13508
|
+
}, {
|
|
13509
|
+
type: Inject,
|
|
13510
|
+
args: [STATIC_DATA_VIEW_ITEM_DIALOG]
|
|
13511
|
+
}] }], propDecorators: { mode: [{
|
|
13512
|
+
type: Input
|
|
13513
|
+
}], selectIsRequired: [{
|
|
13514
|
+
type: Input
|
|
13515
|
+
}], items: [{
|
|
13113
13516
|
type: Input
|
|
13114
13517
|
}], displayedColumns: [{
|
|
13115
13518
|
type: Input
|
|
@@ -13133,21 +13536,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
13133
13536
|
type: Output
|
|
13134
13537
|
}], changeSorting: [{
|
|
13135
13538
|
type: Output
|
|
13539
|
+
}], selectingItem: [{
|
|
13540
|
+
type: Output
|
|
13136
13541
|
}] } });
|
|
13137
13542
|
|
|
13138
13543
|
/**
|
|
13139
13544
|
* @title Data table with sorting, pagination, and filtering.
|
|
13140
13545
|
*/
|
|
13141
13546
|
class StaticDataListItemsComponent {
|
|
13142
|
-
constructor(platformId, dialog, rightService, staticDataFacade, changeDetectorRef, routerFacade) {
|
|
13547
|
+
constructor(platformId, dialog, rightService, staticDataFacade, changeDetectorRef, routerFacade, createNewDialog, config) {
|
|
13143
13548
|
this.platformId = platformId;
|
|
13144
13549
|
this.dialog = dialog;
|
|
13145
13550
|
this.rightService = rightService;
|
|
13146
13551
|
this.staticDataFacade = staticDataFacade;
|
|
13147
13552
|
this.changeDetectorRef = changeDetectorRef;
|
|
13148
13553
|
this.routerFacade = routerFacade;
|
|
13554
|
+
this.createNewDialog = createNewDialog;
|
|
13555
|
+
this.config = config;
|
|
13556
|
+
this.selectIsRequired = false;
|
|
13149
13557
|
this.viewMode = false;
|
|
13150
13558
|
this.showPanelHeader = false;
|
|
13559
|
+
this.selectingItem = new EventEmitter();
|
|
13151
13560
|
this.isLoaded = false;
|
|
13152
13561
|
this.perPage = 10;
|
|
13153
13562
|
this.pageIndex = 0;
|
|
@@ -13156,7 +13565,10 @@ class StaticDataListItemsComponent {
|
|
|
13156
13565
|
this.isBrowser = isPlatformBrowser(this.platformId);
|
|
13157
13566
|
}
|
|
13158
13567
|
ngOnInit() {
|
|
13159
|
-
this.staticSection = this.
|
|
13568
|
+
this.staticSection = this.config?.staticDataMapping?.[this.contentType];
|
|
13569
|
+
if (!this.staticSection) {
|
|
13570
|
+
throw new Error(`[ static-data-list-items ][ Init ][ NOT_FOUND_STATIC_DATA_SECTION ] contentType: ${this.contentType}`);
|
|
13571
|
+
}
|
|
13160
13572
|
this.displayedColumns = this.staticSection?.options?.fieldsOnListPage || this.defaultFieldsList;
|
|
13161
13573
|
if (this.subEntity?.options?.itemsCountPerPage) {
|
|
13162
13574
|
this.perPage = this.subEntity.options.itemsCountPerPage;
|
|
@@ -13170,7 +13582,10 @@ class StaticDataListItemsComponent {
|
|
|
13170
13582
|
if (this.subEntity?.options?.itemsCountPerPage) {
|
|
13171
13583
|
this.perPage = this.subEntity.options.itemsCountPerPage;
|
|
13172
13584
|
}
|
|
13173
|
-
this.staticSection = this.
|
|
13585
|
+
this.staticSection = this.config?.staticDataMapping?.[this.contentType];
|
|
13586
|
+
if (!this.staticSection) {
|
|
13587
|
+
throw new Error(`[ static-data-list-items ][ ngOnChanges ][ NOT_FOUND_STATIC_DATA_SECTION ] contentType: ${this.contentType}`);
|
|
13588
|
+
}
|
|
13174
13589
|
this.displayedColumns = this.staticSection?.options?.fieldsOnListPage || this.defaultFieldsList;
|
|
13175
13590
|
this.preparingData();
|
|
13176
13591
|
}
|
|
@@ -13184,8 +13599,28 @@ class StaticDataListItemsComponent {
|
|
|
13184
13599
|
this.preLoadSections();
|
|
13185
13600
|
}
|
|
13186
13601
|
addHandle() {
|
|
13187
|
-
|
|
13188
|
-
|
|
13602
|
+
if (this.staticSection.options?.viewSettings?.listMode?.hideAddAction) {
|
|
13603
|
+
return;
|
|
13604
|
+
}
|
|
13605
|
+
if (!this.mode || this.mode === StaticDataListComponentModes.inline) {
|
|
13606
|
+
const urlParameters = ['/static-data', this.contentType, 'new'];
|
|
13607
|
+
this.routerFacade.goTo(urlParameters, { queryParams: this.queryParams });
|
|
13608
|
+
}
|
|
13609
|
+
else {
|
|
13610
|
+
this.dialog.open(this.createNewDialog, {
|
|
13611
|
+
minHeight: '400px',
|
|
13612
|
+
width: '600px',
|
|
13613
|
+
data: {
|
|
13614
|
+
entity: this.contentType,
|
|
13615
|
+
fields: this.staticSection.fields,
|
|
13616
|
+
autoCompleteFields: this.getAutoCompleteFieldsWithValue(),
|
|
13617
|
+
},
|
|
13618
|
+
})
|
|
13619
|
+
.afterClosed()
|
|
13620
|
+
.toPromise()
|
|
13621
|
+
.then((result) => {
|
|
13622
|
+
});
|
|
13623
|
+
}
|
|
13189
13624
|
}
|
|
13190
13625
|
searchHandle(searchValue) {
|
|
13191
13626
|
this.loadStaticData(1, this.perPage, searchValue);
|
|
@@ -13219,6 +13654,18 @@ class StaticDataListItemsComponent {
|
|
|
13219
13654
|
}
|
|
13220
13655
|
}
|
|
13221
13656
|
}
|
|
13657
|
+
getAutoCompleteFieldsWithValue() {
|
|
13658
|
+
const result = [];
|
|
13659
|
+
if (this.autoCompleteFields) {
|
|
13660
|
+
this.autoCompleteFields.forEach(fieldData => {
|
|
13661
|
+
result.push({
|
|
13662
|
+
field: fieldData.field,
|
|
13663
|
+
value: fieldData.getValue(this.parentData)
|
|
13664
|
+
});
|
|
13665
|
+
});
|
|
13666
|
+
}
|
|
13667
|
+
return result;
|
|
13668
|
+
}
|
|
13222
13669
|
loadData() {
|
|
13223
13670
|
if (this.staticSection) {
|
|
13224
13671
|
this.userRights$ = this.rightService.getUserRoleRightsForSection('static-data', this.contentType);
|
|
@@ -13231,6 +13678,9 @@ class StaticDataListItemsComponent {
|
|
|
13231
13678
|
console.error('[ wt-front-shared ][ static-data-items ][ loadData ]', 'NOT_FOUND_STATIC_DATA_SECTION', { contentType: this.contentType });
|
|
13232
13679
|
}
|
|
13233
13680
|
}
|
|
13681
|
+
selectItemHandle(data) {
|
|
13682
|
+
this.selectingItem.emit(data);
|
|
13683
|
+
}
|
|
13234
13684
|
changedFilterHandler(newFilterOptions) {
|
|
13235
13685
|
this.filterFormData = newFilterOptions?.value;
|
|
13236
13686
|
this.loadStaticData(1, this.perPage);
|
|
@@ -13244,7 +13694,7 @@ class StaticDataListItemsComponent {
|
|
|
13244
13694
|
panelClass: 'dialog-without-margin',
|
|
13245
13695
|
data: {
|
|
13246
13696
|
displayedColumns: this.displayedColumns,
|
|
13247
|
-
sectionFields: this.
|
|
13697
|
+
sectionFields: this.config?.staticDataMapping?.[this.contentType].fields,
|
|
13248
13698
|
}
|
|
13249
13699
|
})
|
|
13250
13700
|
.afterClosed()
|
|
@@ -13298,7 +13748,7 @@ class StaticDataListItemsComponent {
|
|
|
13298
13748
|
}
|
|
13299
13749
|
params['where'] = { _langId: languageId };
|
|
13300
13750
|
}
|
|
13301
|
-
const staticSectionKey = this.
|
|
13751
|
+
const staticSectionKey = this.config?.staticDataMapping?.[this.contentType].key || this.contentType;
|
|
13302
13752
|
this.staticDataFacade.loadStaticData(staticSectionKey, params);
|
|
13303
13753
|
this.staticData$ = this.staticDataFacade.getStaticData$(this.staticSection.key, undefined, null, params['where'])
|
|
13304
13754
|
.pipe(map((staticData) => {
|
|
@@ -13343,7 +13793,7 @@ class StaticDataListItemsComponent {
|
|
|
13343
13793
|
return null;
|
|
13344
13794
|
}
|
|
13345
13795
|
loadStaticDataMeta() {
|
|
13346
|
-
const staticSectionKey = this.
|
|
13796
|
+
const staticSectionKey = this.config?.staticDataMapping?.[this.contentType]?.key || this.contentType;
|
|
13347
13797
|
this.staticDataMeta$ = this.staticDataFacade.getStaticDataMeta$(staticSectionKey)
|
|
13348
13798
|
.pipe(startWith({ meta: {} }), map((staticDataMeta) => {
|
|
13349
13799
|
return { meta: staticDataMeta };
|
|
@@ -13368,7 +13818,7 @@ class StaticDataListItemsComponent {
|
|
|
13368
13818
|
});
|
|
13369
13819
|
}
|
|
13370
13820
|
preLoadSections() {
|
|
13371
|
-
let preLoadSections = this.
|
|
13821
|
+
let preLoadSections = this.config?.staticDataMapping?.[this.contentType]?.preLoadSections;
|
|
13372
13822
|
if (preLoadSections) {
|
|
13373
13823
|
if (this.parentItemId) {
|
|
13374
13824
|
const newPreLoadSections = [];
|
|
@@ -13386,14 +13836,16 @@ class StaticDataListItemsComponent {
|
|
|
13386
13836
|
}
|
|
13387
13837
|
}
|
|
13388
13838
|
deleteEvent(item) {
|
|
13389
|
-
this.
|
|
13839
|
+
if (!this.staticSection.options?.viewSettings?.listMode?.hideAddAction) {
|
|
13840
|
+
this.openDeleteDialog(item);
|
|
13841
|
+
}
|
|
13390
13842
|
}
|
|
13391
13843
|
changePage(data) {
|
|
13392
13844
|
this.pageIndex = data.pageIndex;
|
|
13393
13845
|
this.loadStaticData(this.pageIndex + 1, data.pageSize);
|
|
13394
13846
|
}
|
|
13395
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataListItemsComponent, deps: [{ token: PLATFORM_ID }, { token: i1$6.MatDialog }, { token: RightService }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }, { token: RouterFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13396
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataListItemsComponent, isStandalone: true, selector: "app-static-data-list-items", inputs: { staticDataConfiguration: "staticDataConfiguration", viewMode: "viewMode", contentType: "contentType", customTitle: "customTitle", addTitle: "addTitle", icon: "icon", parentSection: "parentSection", parentItemId: "parentItemId", showPanelHeader: "showPanelHeader", parentData: "parentData", parentSectionHashtag: "parentSectionHashtag", autoCompleteFields: "autoCompleteFields", filteringQuery: "filteringQuery", subEntity: "subEntity", leftBlockFilterParamData: "leftBlockFilterParamData", defaultLanguageId: "defaultLanguageId" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "searchInput", first: true, predicate: ["search"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"center-block-inner\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <mat-card-header>\n <mat-card-title class=\"custom-card-title\">\n <mat-icon *ngIf=\"icon\"\n class=\"static-data-tab-icon\">{{ icon }}\n </mat-icon>\n <h5 class=\"mb-0\">{{ title }}</h5>\n </mat-card-title>\n <mat-card-subtitle class=\"w-100 sub-title-block\">\n <ng-container *ngIf=\"(!viewMode && ( staticSection?.options?.search || staticSection?.options?.filtering ) ) ||\n (viewMode && ( subEntity?.options?.hasSearch || subEntity?.options?.hasFiltering) )\">\n <form class=\"search-box position-relative w-100\">\n <div class=\"row w-100\">\n <div *ngIf=\"staticSection?.options?.search || subEntity?.options?.hasSearch\"\n class=\"col-4 search-block\">\n <input #search class=\"search-input\" placeholder=\"\u041F\u043E\u0438\u0441\u043A\">\n <shared-ui-icon class=\"search-icon\"\n [color]=\"'black'\"\n [size]=\"'small'\"\n [icon]=\"'search'\"\n (click)=\"searchHandle(search.value)\"></shared-ui-icon>\n <shared-ui-icon *ngIf=\"search.value\"\n class=\"ml-1 search-icon\"\n [color]=\"'black'\"\n [size]=\"'small'\"\n [icon]=\"'cancel'\"\n (click)=\"searchCancelHandle()\"></shared-ui-icon>\n </div>\n <ng-container *ngIf=\"!staticSection?.options?.filteringType || staticSection?.options?.filteringType === 'modal'\">\n <app-static-data-list-filtering\n *ngIf=\"staticSection?.options?.filtering || subEntity?.options?.hasFiltering\"\n class=\"col-3\"\n [filteringConfig]=\"staticSection?.options?.filtering\"\n [sectionFields]=\"staticSection.fields\"\n (filterSubmit)=\"filterHandle($event)\"></app-static-data-list-filtering>\n </ng-container>\n </div>\n </form>\n </ng-container>\n\n <div class=\"settings\">\n <button matIconButton [matMenuTriggerFor]=\"menu\" aria-label=\"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438\">\n <mat-icon>settings</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item>\n <mat-icon>contextual_token</mat-icon>\n <span (click)=\"openFieldSettings()\">\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043F\u043E\u043B\u0435\u0439</span>\n </button>\n </mat-menu>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <div *ngIf=\"filterFormData\" class=\"filter-options\">\n <app-static-data-filter-options\n [staticSectionFields]=\"staticSection.fields\"\n [filterFormDataValues]=\"filterFormDataValues\"\n (changedFilter)=\"changedFilterHandler($event)\"></app-static-data-filter-options>\n </div>\n <div class=\"table-responsive\">\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.texts?.list?.topText\"\n [innerHTML]=\"staticSection.texts?.list?.topText\"\n class=\"static-data-list-top-text\">\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\"\n [style.max-height.px]=\"viewMode ? ( subEntity.options?.maxHeight || 400 ) : 'auto'\">\n <app-static-data-items [items]=\"staticData\"\n [viewMode]=\"viewMode\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [subEntityConfig]=\"subEntity\"\n [displayedColumns]=\"displayedColumns\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n [parentSection]=\"parentSection\"\n [parentItemId]=\"parentData?.id\"\n (changeSorting)=\"changeSortingHandle($event)\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1 && staticDataObj.meta?.totalCount > perPage\">\n <mat-paginator\n *ngIf=\"totalCount\"\n aria-label=\"\u0412\u044B\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\n (page)=\"changePage($event)\"></mat-paginator>\n </div>\n </ng-container>\n <div *ngIf=\"isLoaded && !totalCount\">\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442</div>\n <div *ngIf=\"staticSection.texts?.list?.bottomText\"\n [innerHTML]=\"staticSection.texts?.list?.bottomText\"\n class=\"static-data-list-bottom-text\">\n </div>\n <div *ngIf=\"!viewMode && userRights[0]\" class=\"text-center mt-30 mb-30\">\n <shared-button\n id=\"go-to-create-form-button\"\n class=\"mr-5\"\n iconSize=\"small\"\n icon=\"add\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"accent\"\n (click)=\"addHandle()\">{{ addTitle || '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C' }}\n </shared-button>\n </div>\n </div>\n <ng-container *ngIf=\"loaded$|async; let loaded;\">\n <shared-spinner *ngIf=\"!loaded\"></shared-spinner>\n </ng-container>\n </div>\n </mat-card-content>\n </ng-container>\n </ng-container>\n</div>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.search-block{display:flex;align-content:center;align-items:center}.search-block .search-input{background-color:#f6f7f9!important;padding:11px 10px!important;margin-right:3px;width:100%}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}.static-data-list-top-text,.static-data-list-bottom-text{margin:25px 0;border:1px solid rgba(175,175,175,.3215686275);padding:10px;background:#efefef69}.search-icon{font-size:20px}.custom-card-title{display:flex;align-items:center;margin-left:10px}.custom-card-title mat-icon{margin-right:10px}.custom-card-title h1,.custom-card-title h5{margin-right:30px;white-space:nowrap}.settings button{border:0;background:transparent;color:#64758b}.sub-title-block{display:flex;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatCardHeader, selector: "mat-card-header" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: SharedIconModule }, { kind: "component", type: IconComponent, selector: "shared-ui-icon", inputs: ["icon", "size", "color"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "ngmodule", type: SharedSpinnerModule }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "component", type: StaticDataListFilteringComponent, selector: "app-static-data-list-filtering", inputs: ["filteringConfig", "sectionFields"], outputs: ["filterSubmit"] }, { kind: "component", type: StaticDataFilterOptionsComponent, selector: "app-static-data-filter-options", inputs: ["staticSectionFields", "filterFormDataValues"], outputs: ["changedFilter"] }, { kind: "component", type: StaticDataItemsComponent, selector: "app-static-data-items", inputs: ["items", "displayedColumns", "contentType", "viewMode", "queryParams", "userRights", "subEntityConfig", "staticSection", "parentSection", "parentItemId"], outputs: ["delete", "changeSorting"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13847
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataListItemsComponent, deps: [{ token: PLATFORM_ID }, { token: i1$6.MatDialog }, { token: RightService }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }, { token: RouterFacade }, { token: STATIC_DATA_CREATE_NEW_ITEM_DIALOG, optional: true }, { token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13848
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataListItemsComponent, isStandalone: true, selector: "app-static-data-list-items", inputs: { mode: "mode", selectIsRequired: "selectIsRequired", staticDataConfiguration: "staticDataConfiguration", viewMode: "viewMode", contentType: "contentType", customTitle: "customTitle", addTitle: "addTitle", icon: "icon", parentSection: "parentSection", parentItemId: "parentItemId", showPanelHeader: "showPanelHeader", parentData: "parentData", parentSectionHashtag: "parentSectionHashtag", autoCompleteFields: "autoCompleteFields", filteringQuery: "filteringQuery", subEntity: "subEntity", leftBlockFilterParamData: "leftBlockFilterParamData", defaultLanguageId: "defaultLanguageId" }, outputs: { selectingItem: "selectingItem" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "searchInput", first: true, predicate: ["search"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"center-block-inner\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <mat-card-header>\n <mat-card-title class=\"custom-card-title\">\n <mat-icon *ngIf=\"icon\"\n class=\"static-data-tab-icon\">{{ icon }}\n </mat-icon>\n <h5 class=\"mb-0\">{{ title }}</h5>\n </mat-card-title>\n <mat-card-subtitle class=\"w-100 sub-title-block\">\n <ng-container *ngIf=\"(!viewMode && ( staticSection?.options?.search || staticSection?.options?.filtering ) ) ||\n (viewMode && ( subEntity?.options?.hasSearch || subEntity?.options?.hasFiltering) )\">\n <form class=\"search-box position-relative w-100\">\n <div class=\"row w-100\">\n <div *ngIf=\"staticSection?.options?.search || subEntity?.options?.hasSearch\"\n class=\"col-4 search-block\">\n <input #search class=\"search-input\" placeholder=\"\u041F\u043E\u0438\u0441\u043A\">\n <shared-ui-icon class=\"search-icon\"\n [color]=\"'black'\"\n [size]=\"'small'\"\n [icon]=\"'search'\"\n (click)=\"searchHandle(search.value)\"></shared-ui-icon>\n <shared-ui-icon *ngIf=\"search.value\"\n class=\"ml-1 search-icon\"\n [color]=\"'black'\"\n [size]=\"'small'\"\n [icon]=\"'cancel'\"\n (click)=\"searchCancelHandle()\"></shared-ui-icon>\n </div>\n <ng-container *ngIf=\"!staticSection?.options?.filteringType || staticSection?.options?.filteringType === 'modal'\">\n <app-static-data-list-filtering\n *ngIf=\"staticSection?.options?.filtering || subEntity?.options?.hasFiltering\"\n class=\"col-3\"\n [filteringConfig]=\"staticSection?.options?.filtering\"\n [sectionFields]=\"staticSection.fields\"\n (filterSubmit)=\"filterHandle($event)\"></app-static-data-list-filtering>\n </ng-container>\n </div>\n </form>\n </ng-container>\n\n <div class=\"settings\">\n <button matIconButton [matMenuTriggerFor]=\"menu\" aria-label=\"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438\">\n <mat-icon>settings</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item>\n <mat-icon>contextual_token</mat-icon>\n <span (click)=\"openFieldSettings()\">\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043F\u043E\u043B\u0435\u0439</span>\n </button>\n </mat-menu>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <div *ngIf=\"filterFormData\" class=\"filter-options\">\n <app-static-data-filter-options\n [staticSectionFields]=\"staticSection.fields\"\n [filterFormDataValues]=\"filterFormDataValues\"\n (changedFilter)=\"changedFilterHandler($event)\"></app-static-data-filter-options>\n </div>\n <div class=\"table-responsive\">\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.texts?.list?.topText\"\n [innerHTML]=\"staticSection.texts?.list?.topText\"\n class=\"static-data-list-top-text\">\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\"\n [style.max-height.px]=\"viewMode ? ( subEntity.options?.maxHeight || 400 ) : 'auto'\">\n <app-static-data-items [items]=\"staticData\"\n [mode]=\"mode\"\n [selectIsRequired]=\"selectIsRequired\"\n [viewMode]=\"viewMode\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [subEntityConfig]=\"subEntity\"\n [displayedColumns]=\"displayedColumns\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n [parentSection]=\"parentSection\"\n [parentItemId]=\"parentData?.id\"\n (changeSorting)=\"changeSortingHandle($event)\"\n (selectingItem)=\"selectItemHandle($event)\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1 && staticDataObj.meta?.totalCount > perPage\">\n <mat-paginator\n *ngIf=\"totalCount\"\n aria-label=\"\u0412\u044B\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\n (page)=\"changePage($event)\"></mat-paginator>\n </div>\n </ng-container>\n <div *ngIf=\"isLoaded && !totalCount\">\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442</div>\n <div *ngIf=\"staticSection.texts?.list?.bottomText\"\n [innerHTML]=\"staticSection.texts?.list?.bottomText\"\n class=\"static-data-list-bottom-text\">\n </div>\n\n <div *ngIf=\"!viewMode && userRights[0] && !staticSection.options?.viewSettings?.listMode?.hideAddAction\" class=\"text-center mt-30 mb-30\">\n <shared-button\n id=\"go-to-create-form-button\"\n class=\"mr-5\"\n iconSize=\"small\"\n icon=\"add\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"accent\"\n (click)=\"addHandle()\">{{ addTitle || '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C' }}\n </shared-button>\n </div>\n </div>\n <ng-container *ngIf=\"loaded$|async; let loaded;\">\n <shared-spinner *ngIf=\"!loaded\"></shared-spinner>\n </ng-container>\n </div>\n </mat-card-content>\n </ng-container>\n </ng-container>\n</div>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.search-block{display:flex;align-content:center;align-items:center}.search-block .search-input{background-color:#f6f7f9!important;padding:11px 10px!important;margin-right:3px;width:100%}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}.static-data-list-top-text,.static-data-list-bottom-text{margin:25px 0;border:1px solid rgba(175,175,175,.3215686275);padding:10px;background:#efefef69}.search-icon{font-size:20px}.custom-card-title{display:flex;align-items:center;margin-left:10px}.custom-card-title mat-icon{margin-right:10px}.custom-card-title h1,.custom-card-title h5{margin-right:30px;white-space:nowrap}.settings button{border:0;background:transparent;color:#64758b}.sub-title-block{display:flex;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatCardHeader, selector: "mat-card-header" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: SharedIconModule }, { kind: "component", type: IconComponent, selector: "shared-ui-icon", inputs: ["icon", "size", "color"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "ngmodule", type: SharedSpinnerModule }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "component", type: StaticDataListFilteringComponent, selector: "app-static-data-list-filtering", inputs: ["filteringConfig", "sectionFields"], outputs: ["filterSubmit"] }, { kind: "component", type: StaticDataFilterOptionsComponent, selector: "app-static-data-filter-options", inputs: ["staticSectionFields", "filterFormDataValues"], outputs: ["changedFilter"] }, { kind: "component", type: StaticDataItemsComponent, selector: "app-static-data-items", inputs: ["mode", "selectIsRequired", "items", "displayedColumns", "contentType", "viewMode", "queryParams", "userRights", "subEntityConfig", "staticSection", "parentSection", "parentItemId"], outputs: ["delete", "changeSorting", "selectingItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13397
13849
|
}
|
|
13398
13850
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataListItemsComponent, decorators: [{
|
|
13399
13851
|
type: Component,
|
|
@@ -13415,11 +13867,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
13415
13867
|
StaticDataListFilteringComponent,
|
|
13416
13868
|
StaticDataFilterOptionsComponent,
|
|
13417
13869
|
StaticDataItemsComponent,
|
|
13418
|
-
|
|
13870
|
+
JsonPipe,
|
|
13871
|
+
], template: "<div class=\"center-block-inner\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <mat-card-header>\n <mat-card-title class=\"custom-card-title\">\n <mat-icon *ngIf=\"icon\"\n class=\"static-data-tab-icon\">{{ icon }}\n </mat-icon>\n <h5 class=\"mb-0\">{{ title }}</h5>\n </mat-card-title>\n <mat-card-subtitle class=\"w-100 sub-title-block\">\n <ng-container *ngIf=\"(!viewMode && ( staticSection?.options?.search || staticSection?.options?.filtering ) ) ||\n (viewMode && ( subEntity?.options?.hasSearch || subEntity?.options?.hasFiltering) )\">\n <form class=\"search-box position-relative w-100\">\n <div class=\"row w-100\">\n <div *ngIf=\"staticSection?.options?.search || subEntity?.options?.hasSearch\"\n class=\"col-4 search-block\">\n <input #search class=\"search-input\" placeholder=\"\u041F\u043E\u0438\u0441\u043A\">\n <shared-ui-icon class=\"search-icon\"\n [color]=\"'black'\"\n [size]=\"'small'\"\n [icon]=\"'search'\"\n (click)=\"searchHandle(search.value)\"></shared-ui-icon>\n <shared-ui-icon *ngIf=\"search.value\"\n class=\"ml-1 search-icon\"\n [color]=\"'black'\"\n [size]=\"'small'\"\n [icon]=\"'cancel'\"\n (click)=\"searchCancelHandle()\"></shared-ui-icon>\n </div>\n <ng-container *ngIf=\"!staticSection?.options?.filteringType || staticSection?.options?.filteringType === 'modal'\">\n <app-static-data-list-filtering\n *ngIf=\"staticSection?.options?.filtering || subEntity?.options?.hasFiltering\"\n class=\"col-3\"\n [filteringConfig]=\"staticSection?.options?.filtering\"\n [sectionFields]=\"staticSection.fields\"\n (filterSubmit)=\"filterHandle($event)\"></app-static-data-list-filtering>\n </ng-container>\n </div>\n </form>\n </ng-container>\n\n <div class=\"settings\">\n <button matIconButton [matMenuTriggerFor]=\"menu\" aria-label=\"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438\">\n <mat-icon>settings</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item>\n <mat-icon>contextual_token</mat-icon>\n <span (click)=\"openFieldSettings()\">\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043F\u043E\u043B\u0435\u0439</span>\n </button>\n </mat-menu>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <div *ngIf=\"filterFormData\" class=\"filter-options\">\n <app-static-data-filter-options\n [staticSectionFields]=\"staticSection.fields\"\n [filterFormDataValues]=\"filterFormDataValues\"\n (changedFilter)=\"changedFilterHandler($event)\"></app-static-data-filter-options>\n </div>\n <div class=\"table-responsive\">\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.texts?.list?.topText\"\n [innerHTML]=\"staticSection.texts?.list?.topText\"\n class=\"static-data-list-top-text\">\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\"\n [style.max-height.px]=\"viewMode ? ( subEntity.options?.maxHeight || 400 ) : 'auto'\">\n <app-static-data-items [items]=\"staticData\"\n [mode]=\"mode\"\n [selectIsRequired]=\"selectIsRequired\"\n [viewMode]=\"viewMode\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [subEntityConfig]=\"subEntity\"\n [displayedColumns]=\"displayedColumns\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n [parentSection]=\"parentSection\"\n [parentItemId]=\"parentData?.id\"\n (changeSorting)=\"changeSortingHandle($event)\"\n (selectingItem)=\"selectItemHandle($event)\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1 && staticDataObj.meta?.totalCount > perPage\">\n <mat-paginator\n *ngIf=\"totalCount\"\n aria-label=\"\u0412\u044B\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\n (page)=\"changePage($event)\"></mat-paginator>\n </div>\n </ng-container>\n <div *ngIf=\"isLoaded && !totalCount\">\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442</div>\n <div *ngIf=\"staticSection.texts?.list?.bottomText\"\n [innerHTML]=\"staticSection.texts?.list?.bottomText\"\n class=\"static-data-list-bottom-text\">\n </div>\n\n <div *ngIf=\"!viewMode && userRights[0] && !staticSection.options?.viewSettings?.listMode?.hideAddAction\" class=\"text-center mt-30 mb-30\">\n <shared-button\n id=\"go-to-create-form-button\"\n class=\"mr-5\"\n iconSize=\"small\"\n icon=\"add\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"accent\"\n (click)=\"addHandle()\">{{ addTitle || '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C' }}\n </shared-button>\n </div>\n </div>\n <ng-container *ngIf=\"loaded$|async; let loaded;\">\n <shared-spinner *ngIf=\"!loaded\"></shared-spinner>\n </ng-container>\n </div>\n </mat-card-content>\n </ng-container>\n </ng-container>\n</div>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.search-block{display:flex;align-content:center;align-items:center}.search-block .search-input{background-color:#f6f7f9!important;padding:11px 10px!important;margin-right:3px;width:100%}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}.static-data-list-top-text,.static-data-list-bottom-text{margin:25px 0;border:1px solid rgba(175,175,175,.3215686275);padding:10px;background:#efefef69}.search-icon{font-size:20px}.custom-card-title{display:flex;align-items:center;margin-left:10px}.custom-card-title mat-icon{margin-right:10px}.custom-card-title h1,.custom-card-title h5{margin-right:30px;white-space:nowrap}.settings button{border:0;background:transparent;color:#64758b}.sub-title-block{display:flex;justify-content:flex-end}\n"] }]
|
|
13419
13872
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
13420
13873
|
type: Inject,
|
|
13421
13874
|
args: [PLATFORM_ID]
|
|
13422
|
-
}] }, { type: i1$6.MatDialog }, { type: RightService }, { type: StaticDataFacade }, { type: i0.ChangeDetectorRef }, { type: RouterFacade }
|
|
13875
|
+
}] }, { type: i1$6.MatDialog }, { type: RightService }, { type: StaticDataFacade }, { type: i0.ChangeDetectorRef }, { type: RouterFacade }, { type: i0.Type, decorators: [{
|
|
13876
|
+
type: Optional
|
|
13877
|
+
}, {
|
|
13878
|
+
type: Inject,
|
|
13879
|
+
args: [STATIC_DATA_CREATE_NEW_ITEM_DIALOG]
|
|
13880
|
+
}] }, { type: undefined, decorators: [{
|
|
13881
|
+
type: Inject,
|
|
13882
|
+
args: [CORE_CONFIG]
|
|
13883
|
+
}] }], propDecorators: { mode: [{
|
|
13884
|
+
type: Input
|
|
13885
|
+
}], selectIsRequired: [{
|
|
13886
|
+
type: Input
|
|
13887
|
+
}], staticDataConfiguration: [{
|
|
13423
13888
|
type: Input
|
|
13424
13889
|
}], viewMode: [{
|
|
13425
13890
|
type: Input
|
|
@@ -13451,6 +13916,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
13451
13916
|
type: Input
|
|
13452
13917
|
}], defaultLanguageId: [{
|
|
13453
13918
|
type: Input
|
|
13919
|
+
}], selectingItem: [{
|
|
13920
|
+
type: Output
|
|
13454
13921
|
}], paginator: [{
|
|
13455
13922
|
type: ViewChild,
|
|
13456
13923
|
args: [MatPaginator, { static: true }]
|
|
@@ -13463,7 +13930,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
13463
13930
|
}] } });
|
|
13464
13931
|
|
|
13465
13932
|
class StaticDataDetailsComponent {
|
|
13466
|
-
constructor(fb, router, route, autoFormService, routerFacade, formErrors, formsFacade, requestsFacade, staticDataFacade, rightService, dialog, notificationsFacade, coreFacade, publicationMessagesFacade, actionsFacade, injector, cd, matIconReg, authService) {
|
|
13933
|
+
constructor(fb, router, route, autoFormService, routerFacade, formErrors, formsFacade, requestsFacade, staticDataFacade, rightService, dialog, notificationsFacade, coreFacade, publicationMessagesFacade, actionsFacade, injector, cd, matIconReg, authService, staticDataServiceService, config) {
|
|
13467
13934
|
this.fb = fb;
|
|
13468
13935
|
this.router = router;
|
|
13469
13936
|
this.route = route;
|
|
@@ -13483,6 +13950,10 @@ class StaticDataDetailsComponent {
|
|
|
13483
13950
|
this.cd = cd;
|
|
13484
13951
|
this.matIconReg = matIconReg;
|
|
13485
13952
|
this.authService = authService;
|
|
13953
|
+
this.staticDataServiceService = staticDataServiceService;
|
|
13954
|
+
this.config = config;
|
|
13955
|
+
this.mode = StaticDataListComponentModes.inline;
|
|
13956
|
+
this.closePopup = new EventEmitter();
|
|
13486
13957
|
this.data = {};
|
|
13487
13958
|
this.storedFormValues = null;
|
|
13488
13959
|
this.dataStored = false;
|
|
@@ -13512,6 +13983,7 @@ class StaticDataDetailsComponent {
|
|
|
13512
13983
|
this.publishInTelegramAction = 'publish-in-telegram';
|
|
13513
13984
|
this.publishInTelegramActionId = Math.random();
|
|
13514
13985
|
this.currentUserData = this.authService.currentUserValue;
|
|
13986
|
+
this.dynamicFormFields = [];
|
|
13515
13987
|
}
|
|
13516
13988
|
ngOnInit() {
|
|
13517
13989
|
this.matIconReg.setDefaultFontSetClass('material-symbols-outlined');
|
|
@@ -13543,8 +14015,9 @@ class StaticDataDetailsComponent {
|
|
|
13543
14015
|
if (this.subscriptionToRequestStatus$) {
|
|
13544
14016
|
this.subscriptionToRequestStatus$.unsubscribe();
|
|
13545
14017
|
}
|
|
13546
|
-
|
|
13547
|
-
this.
|
|
14018
|
+
const method = this.itemId ? 'put' : 'post';
|
|
14019
|
+
this.requestsFacade.createRequestListener(`static-data/${this.contentType}`, method, this.itemId);
|
|
14020
|
+
this.subscriptionToRequestStatus$ = this.requestsFacade.getRequestUpdates('static-data', method, this.itemId)
|
|
13548
14021
|
.pipe(map((item) => ({ value: item?.status })))
|
|
13549
14022
|
.subscribe(data => {
|
|
13550
14023
|
this.formStatus = data.value;
|
|
@@ -13573,7 +14046,12 @@ class StaticDataDetailsComponent {
|
|
|
13573
14046
|
this.currentItemId = data.newId;
|
|
13574
14047
|
let urlExtras = this.getUrlExtras();
|
|
13575
14048
|
this.itemId = data.newId;
|
|
13576
|
-
|
|
14049
|
+
if (this.mode === StaticDataListComponentModes.inline) {
|
|
14050
|
+
this.routerFacade.goTo(['/static-data', this.contentType, data.newId], urlExtras);
|
|
14051
|
+
}
|
|
14052
|
+
if (this.mode === StaticDataListComponentModes.modal) {
|
|
14053
|
+
this.closePopup.emit();
|
|
14054
|
+
}
|
|
13577
14055
|
this.staticDataSubscription();
|
|
13578
14056
|
notificationParams = {
|
|
13579
14057
|
id: `form-message-create-${this.contentType}-${this.itemId}`,
|
|
@@ -13732,13 +14210,9 @@ class StaticDataDetailsComponent {
|
|
|
13732
14210
|
}
|
|
13733
14211
|
}
|
|
13734
14212
|
loadStaticDataConfiguration() {
|
|
13735
|
-
this.
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
this.staticDataConfiguration = staticDataConfiguration?.configuration;
|
|
13739
|
-
this.languageList = staticDataConfiguration?.languages;
|
|
13740
|
-
this.defaultLanguageId = this.languageList?.find(item => item.default)?.id;
|
|
13741
|
-
});
|
|
14213
|
+
this.staticDataConfiguration = this.config?.staticDataMapping;
|
|
14214
|
+
this.languageList = []; // this.configurationInput?.languages;
|
|
14215
|
+
this.defaultLanguageId = this.languageList?.find(item => item.default)?.id;
|
|
13742
14216
|
}
|
|
13743
14217
|
subscribeToRoute() {
|
|
13744
14218
|
this.router.events
|
|
@@ -13756,14 +14230,27 @@ class StaticDataDetailsComponent {
|
|
|
13756
14230
|
});
|
|
13757
14231
|
}
|
|
13758
14232
|
init() {
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
|
|
13763
|
-
|
|
13764
|
-
|
|
13765
|
-
|
|
14233
|
+
let activeTabHashTag;
|
|
14234
|
+
if (!this.entityInput) {
|
|
14235
|
+
this.itemId = +this.route?.snapshot?.params?.id || null;
|
|
14236
|
+
this.currentLanguageId = +this.route?.snapshot?.params?.langId || null;
|
|
14237
|
+
this.parentSection = this.route?.snapshot?.queryParams?.parentSection;
|
|
14238
|
+
this.parentItemId = this.route?.snapshot?.queryParams?.parentItemId;
|
|
14239
|
+
this.parentParentHashTag = this.route?.snapshot?.queryParams?.parentHashTag;
|
|
14240
|
+
activeTabHashTag = this.route?.snapshot?.fragment || this.activeTabHashTag;
|
|
14241
|
+
this.contentType = this.route?.snapshot?.params?.contentType;
|
|
14242
|
+
}
|
|
14243
|
+
else {
|
|
14244
|
+
this.itemId = this.entityIdInput;
|
|
14245
|
+
this.contentType = this.entityInput;
|
|
14246
|
+
if (!this.contentType) {
|
|
14247
|
+
throw new Error('[ static-data-details.component ][ init ][ No contentType ]');
|
|
14248
|
+
}
|
|
14249
|
+
}
|
|
13766
14250
|
this.staticSection = this.staticDataConfiguration[this.contentType];
|
|
14251
|
+
if (!this.staticSection) {
|
|
14252
|
+
throw new Error('[ static-data-details.component ][ init ][ Incorrect contentType ]' + this.contentType);
|
|
14253
|
+
}
|
|
13767
14254
|
if (this.staticSection?.actions?.isNoEditAction) {
|
|
13768
14255
|
console.error(`[ No edit action for ${this.contentType} ]`);
|
|
13769
14256
|
this.routerFacade.goTo(['/404']);
|
|
@@ -13777,15 +14264,14 @@ class StaticDataDetailsComponent {
|
|
|
13777
14264
|
this.activeTabIndex = 0;
|
|
13778
14265
|
this.currentItemId = this.itemId;
|
|
13779
14266
|
this.currentContentType = this.contentType;
|
|
13780
|
-
|
|
13781
|
-
|
|
14267
|
+
this.initForm()
|
|
14268
|
+
.then(() => {
|
|
13782
14269
|
this.subscribeToDataStatus();
|
|
13783
14270
|
this.staticDataSubscription();
|
|
13784
14271
|
this.preLoadSections();
|
|
13785
|
-
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
}
|
|
14272
|
+
this.subscribeToRequestStatusStatus();
|
|
14273
|
+
this.cd.markForCheck();
|
|
14274
|
+
});
|
|
13789
14275
|
}
|
|
13790
14276
|
if (this.blocks && activeTabHashTag) {
|
|
13791
14277
|
this.blocks.forEach((item, index) => {
|
|
@@ -13835,7 +14321,8 @@ class StaticDataDetailsComponent {
|
|
|
13835
14321
|
const staticSectionKey = this.staticDataConfiguration[this.contentType].key || this.contentType;
|
|
13836
14322
|
const loadStaticDataParams = {
|
|
13837
14323
|
where: { id: this.itemId },
|
|
13838
|
-
fields: { fields: [...this.getEntityFields(this.staticSection.fields)], ...this.staticSection.embeddedFields }
|
|
14324
|
+
fields: { fields: [...this.getEntityFields(this.staticSection.fields)], ...this.staticSection.embeddedFields },
|
|
14325
|
+
keepState: true
|
|
13839
14326
|
};
|
|
13840
14327
|
if (this.staticSection?.options?.hasMultiLanguage) {
|
|
13841
14328
|
loadStaticDataParams.where['_langId'] = this.currentLanguageId || this.defaultLanguageId;
|
|
@@ -13879,15 +14366,155 @@ class StaticDataDetailsComponent {
|
|
|
13879
14366
|
return result;
|
|
13880
14367
|
}
|
|
13881
14368
|
initForm() {
|
|
13882
|
-
|
|
13883
|
-
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13889
|
-
|
|
14369
|
+
return new Promise(async (resolve, reject) => {
|
|
14370
|
+
const staticDataConfiguration = this.staticDataConfiguration[this.contentType];
|
|
14371
|
+
if (this.contentType && staticDataConfiguration) {
|
|
14372
|
+
if (!staticDataConfiguration?.options?.isDynamicForm) {
|
|
14373
|
+
this.fields = staticDataConfiguration.fields;
|
|
14374
|
+
}
|
|
14375
|
+
else {
|
|
14376
|
+
this.fields = await this.staticDataServiceService.getDynamicFormFields(this.dynamicFormKey);
|
|
14377
|
+
this.dynamicFormFields = [...this.fields];
|
|
14378
|
+
}
|
|
14379
|
+
if (!this.fields?.length) {
|
|
14380
|
+
throw new Error('[ static-data ][ initForm ][ No fields ]' + this.contentType);
|
|
14381
|
+
}
|
|
14382
|
+
const preparedFields = this.autoFormService.getPreparedFields(this.fields);
|
|
14383
|
+
this.form = this.fb.group(preparedFields);
|
|
14384
|
+
resolve();
|
|
14385
|
+
}
|
|
14386
|
+
else {
|
|
14387
|
+
console.error('[ static-data ][ initForm ][ Incorrect contentType ]', { contentType: this.contentType });
|
|
14388
|
+
throw new Error('[ static-data ][ initForm ][ Incorrect contentType ]' + this.contentType);
|
|
14389
|
+
reject();
|
|
14390
|
+
}
|
|
14391
|
+
});
|
|
13890
14392
|
}
|
|
14393
|
+
/*private getDynamicFormFields(dynamicFormKey: string): Promise<IFormField[]> {
|
|
14394
|
+
return new Promise((resolve, reject) => {
|
|
14395
|
+
const result: IFormField[] = [];
|
|
14396
|
+
|
|
14397
|
+
const preLoadSections = [
|
|
14398
|
+
'dynamic-forms(paging:{perPage:-1})',
|
|
14399
|
+
'dynamic-form-questions(paging:{perPage:-1})',
|
|
14400
|
+
'dynamic-form-answers(paging:{perPage:-1})',
|
|
14401
|
+
];
|
|
14402
|
+
this.staticDataFacade.staticDataLoadCategories(preLoadSections);
|
|
14403
|
+
|
|
14404
|
+
const dynamicForms$ = this.staticDataFacade.getStaticData$('dynamic-forms')
|
|
14405
|
+
.pipe(
|
|
14406
|
+
filter(items => !!items?.length)
|
|
14407
|
+
);
|
|
14408
|
+
const dynamicFormQuestions$ = this.staticDataFacade.getStaticData$('dynamic-form-questions')
|
|
14409
|
+
.pipe(
|
|
14410
|
+
filter(items => !!items?.length)
|
|
14411
|
+
);
|
|
14412
|
+
const dynamicFormAnswers$ = this.staticDataFacade.getStaticData$('dynamic-form-answers')
|
|
14413
|
+
.pipe(
|
|
14414
|
+
filter(items => !!items?.length)
|
|
14415
|
+
);
|
|
14416
|
+
|
|
14417
|
+
combineLatest({dynamicForms$, dynamicFormQuestions$, dynamicFormAnswers$})
|
|
14418
|
+
.pipe(
|
|
14419
|
+
take(1)
|
|
14420
|
+
)
|
|
14421
|
+
.subscribe((data) => {
|
|
14422
|
+
const form = data?.dynamicForms$.find(item => item.key === dynamicFormKey);
|
|
14423
|
+
if (!form) {
|
|
14424
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No form with this key ]' + dynamicFormKey);
|
|
14425
|
+
}
|
|
14426
|
+
|
|
14427
|
+
const questions = data?.dynamicFormQuestions$.filter(item => item.dynamicFormId === form.id);
|
|
14428
|
+
if (!questions?.length) {
|
|
14429
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No questions in the form ]' + dynamicFormKey);
|
|
14430
|
+
}
|
|
14431
|
+
|
|
14432
|
+
questions.sort((a, b) => ( a?.pos || 0 ) - ( b?.pos || 0))
|
|
14433
|
+
.forEach(question => {
|
|
14434
|
+
let selectOptions;
|
|
14435
|
+
if (question.type === DynamicFormQuestionType.QuestionWithAnswers) {
|
|
14436
|
+
const answers = data?.dynamicFormAnswers$.filter(item => item.dynamicFormQuestionId === question.id);
|
|
14437
|
+
selectOptions = answers.map(item => {
|
|
14438
|
+
return {
|
|
14439
|
+
id: item.id,
|
|
14440
|
+
name: item.name
|
|
14441
|
+
};
|
|
14442
|
+
});
|
|
14443
|
+
}
|
|
14444
|
+
|
|
14445
|
+
if (!question.key) {
|
|
14446
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No key for question ]' + question.id);
|
|
14447
|
+
}
|
|
14448
|
+
|
|
14449
|
+
const newField: IFormField = {
|
|
14450
|
+
field: question.key,
|
|
14451
|
+
title: question.name,
|
|
14452
|
+
validators: [],
|
|
14453
|
+
type: this.getNewFieldType(question.type),
|
|
14454
|
+
description: question.description,
|
|
14455
|
+
options: {
|
|
14456
|
+
groupName: question.groupName,
|
|
14457
|
+
selectOptions: selectOptions,
|
|
14458
|
+
selectShowAllOptions: question.showAllOptions || false,
|
|
14459
|
+
multiple: question.multiAnswers,
|
|
14460
|
+
saving: {
|
|
14461
|
+
parentProperty: 'answers',
|
|
14462
|
+
}
|
|
14463
|
+
}
|
|
14464
|
+
}
|
|
14465
|
+
|
|
14466
|
+
if (question.type === DynamicFormQuestionType.Dictionary) {
|
|
14467
|
+
this.staticDataFacade.loadStaticData(question.dictionaryKey, {});
|
|
14468
|
+
newField.options.loading = true;
|
|
14469
|
+
if (!question.dictionaryKey) {
|
|
14470
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No dictionaryKey for question ] questionId: ' + question.id);
|
|
14471
|
+
}
|
|
14472
|
+
|
|
14473
|
+
const staticDataSettingKey = Object.keys(this.config.staticDataConfig).find(itemKey => {
|
|
14474
|
+
return this.config.staticDataConfig[itemKey].key === question.dictionaryKey;
|
|
14475
|
+
});
|
|
14476
|
+
|
|
14477
|
+
if (!staticDataSettingKey) {
|
|
14478
|
+
throw new Error('[ static-data ][ getDynamicFormFields ][ No staticDataSettings for question ] dictionaryKey: ' + question.dictionaryKey);
|
|
14479
|
+
}
|
|
14480
|
+
|
|
14481
|
+
newField.options.loadOptionFromStore = this.config.staticDataConfig[staticDataSettingKey].store;
|
|
14482
|
+
}
|
|
14483
|
+
|
|
14484
|
+
if (question.isMandatory) {
|
|
14485
|
+
newField.validators.push(ValidatorsType.Required);
|
|
14486
|
+
}
|
|
14487
|
+
|
|
14488
|
+
result.push(newField);
|
|
14489
|
+
});
|
|
14490
|
+
|
|
14491
|
+
this.dynamicFormFields = [...result];
|
|
14492
|
+
resolve(result);
|
|
14493
|
+
},
|
|
14494
|
+
(error) => {
|
|
14495
|
+
console.error('[ static-data ][ getDynamicFormFields ]', error);
|
|
14496
|
+
reject(error);
|
|
14497
|
+
});
|
|
14498
|
+
})
|
|
14499
|
+
}*/
|
|
14500
|
+
/*private getNewFieldType(type: string): FieldType {
|
|
14501
|
+
let result = FieldType.FieldTypeInput;
|
|
14502
|
+
|
|
14503
|
+
switch (type) {
|
|
14504
|
+
case DynamicFormQuestionType.Dictionary:
|
|
14505
|
+
case DynamicFormQuestionType.QuestionWithAnswers:
|
|
14506
|
+
result = FieldType.FieldTypeSelect;
|
|
14507
|
+
break;
|
|
14508
|
+
case DynamicFormQuestionType.File:
|
|
14509
|
+
result = FieldType.FieldTypeFile;
|
|
14510
|
+
break;
|
|
14511
|
+
case DynamicFormQuestionType.Rating:
|
|
14512
|
+
result = FieldType.FieldTypeRating;
|
|
14513
|
+
break;
|
|
14514
|
+
}
|
|
14515
|
+
|
|
14516
|
+
return result;
|
|
14517
|
+
}*/
|
|
13891
14518
|
subscribeToDataStatus() {
|
|
13892
14519
|
if (this.itemId) {
|
|
13893
14520
|
this.status$ = this.staticDataFacade.getStatus$(this.staticSectionKey)
|
|
@@ -13901,20 +14528,30 @@ class StaticDataDetailsComponent {
|
|
|
13901
14528
|
}
|
|
13902
14529
|
submitClickHandler() {
|
|
13903
14530
|
this.storedFormValues = this.form.value;
|
|
13904
|
-
|
|
13905
|
-
|
|
13906
|
-
|
|
14531
|
+
let fieldForSaving;
|
|
14532
|
+
if (!this.dynamicFormKey) {
|
|
14533
|
+
fieldForSaving = this.staticDataConfiguration[this.contentType].fields
|
|
14534
|
+
.filter(fieldData => !fieldData.options?.notEditable)
|
|
14535
|
+
.map(fieldData => fieldData.field);
|
|
14536
|
+
}
|
|
14537
|
+
else {
|
|
14538
|
+
fieldForSaving = this.dynamicFormFields
|
|
14539
|
+
.map(fieldData => fieldData.field);
|
|
14540
|
+
}
|
|
13907
14541
|
const formValue = {};
|
|
14542
|
+
if (this.dynamicFormKey) {
|
|
14543
|
+
formValue['dynamicFormKey'] = this.dynamicFormKey;
|
|
14544
|
+
}
|
|
13908
14545
|
Object.keys(this.form.value)
|
|
13909
14546
|
.filter(field => fieldForSaving.includes(field))
|
|
13910
14547
|
.forEach(field => {
|
|
13911
14548
|
formValue[field] = this.form.value[field];
|
|
13912
14549
|
});
|
|
13913
14550
|
this.dataStored = true;
|
|
13914
|
-
|
|
14551
|
+
let params = {
|
|
13915
14552
|
...formValue,
|
|
13916
14553
|
formId: this.formId,
|
|
13917
|
-
id: this.form.value?.id
|
|
14554
|
+
id: this.form.value?.id,
|
|
13918
14555
|
};
|
|
13919
14556
|
// Check options.parentProperty (Example: save in settings:JSONB)
|
|
13920
14557
|
this.fields
|
|
@@ -13933,10 +14570,10 @@ class StaticDataDetailsComponent {
|
|
|
13933
14570
|
params[item.field] = fileField?.origin ? fileField.origin : fileField;
|
|
13934
14571
|
});
|
|
13935
14572
|
if (!this.itemId) {
|
|
13936
|
-
this.staticDataFacade.create(this.formId, this.contentType, formValue);
|
|
14573
|
+
this.staticDataFacade.create(this.formId, this.contentType, formValue, null, { dynamicFormKey: this.dynamicFormKey });
|
|
13937
14574
|
}
|
|
13938
14575
|
else {
|
|
13939
|
-
this.staticDataFacade.update(this.formId, this.contentType, this.itemId, formValue);
|
|
14576
|
+
this.staticDataFacade.update(this.formId, this.contentType, this.itemId, formValue, null, { dynamicFormKey: this.dynamicFormKey });
|
|
13940
14577
|
}
|
|
13941
14578
|
this.formErrors.clearFormErrors(this.formId);
|
|
13942
14579
|
this.formsFacade.updateForm({
|
|
@@ -13962,8 +14599,8 @@ class StaticDataDetailsComponent {
|
|
|
13962
14599
|
trackByKey(index, subEntity) {
|
|
13963
14600
|
return subEntity ? subEntity.hashTag : undefined;
|
|
13964
14601
|
}
|
|
13965
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataDetailsComponent, deps: [{ token:
|
|
13966
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: StaticDataDetailsComponent, isStandalone: true, selector: "app-static-data-details", viewQueries: [{ propertyName: "tabs", predicate: MatTab, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n>\n <ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"form.get('name')\" [parentTitle]=\"staticSection.title\"\n [parentUrl]=\"['/static-data', contentType]\"\n [title]=\"form.get('name')?.value\">>\n </shared-panel-header>\n\n <div class=\"content p-24\">\n <div class=\"center-block bg-white\">\n <div class=\"center-block-header position-relative\">\n <h1 @appearFromLeftWithDelay class=\"center-block-header-title\">\n {{ form.get('name')?.value || '\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435' }}\n </h1>\n </div>\n <mat-tab-group [selectedIndex]=\"activeTabIndex\">\n <mat-tab id=\"edit\" tabindex=\"-1\">\n <ng-template mat-tab-label>\n <mat-icon class=\"static-data-tab-icon\">edit</mat-icon>\n \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435\n </ng-template>\n <ng-template matTabContent>\n <div *ngIf=\"staticSection?.options?.hasMultiLanguage\" class=\"languages\">\n <div *ngFor=\"let item of languageList\" class=\"language-item\">\n <a\n [ngClass]=\"{'activeLang': currentLanguageId ? item.id === currentLanguageId : defaultLanguageId ? item.id === defaultLanguageId : false }\"\n [routerLink]=\"['/static-data', contentType, itemId, item.id]\">[ {{ item.slug }} ]</a>\n </div>\n </div>\n <div class=\"center-block-inner\">\n <form [formGroup]=\"form\">\n <shared-auto-form\n *ngIf=\"status.value === statusType.LOADED\"\n class=\"mb-20\"\n [showPublicationMessages]=\"staticSection.options?.havePublication || false\"\n [entity]=\"contentType\"\n [itemId]=\"itemId\"\n [formId]=\"formId\"\n [fields]=\"fields\"\n [form]=\"form\"\n [config]=\"{needToPublish: false}\"\n [havePublication]=\"staticSection.options?.havePublication || false\"\n [errorMessageTexts]=\"globalErrorMessageTexts\"\n (changed)=\"changedFormValue($event)\"\n (formCompleted)=\"formCompleted($event)\"\n ></shared-auto-form>\n\n <div *ngIf=\"itemId && additionalActions?.length\" class=\"global-actions\">\n <div *ngFor=\"let action of additionalActions\"\n (click)=\"actionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>\n <div @appearFromLeftWithDelay\n class=\"mt-20 text-center\">\n <shared-button\n id=\"back-to-list-button\"\n class=\"mr-8\"\n icon=\"chevron_left\"\n type=\"button\"\n styleTheme=\"raised\"\n color=\"basic\"\n iconColor=\"black\"\n (click)=\"goBack()\"\n >{{ parentSection ? '\u041D\u0430\u0437\u0430\u0434' : '\u041A \u0441\u043F\u0438\u0441\u043A\u0443' }}\n </shared-button>\n <shared-button\n *ngIf=\"userRights[0]\"\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [loading]=\"status.value === statusType.LOADING\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >{{ itemId ? '\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C' : '\u0421\u043E\u0437\u0434\u0430\u0442\u044C' }}\n <!-- [disabled]=\"!form.valid dataStored\" -->\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.havePublication\">\n <shared-button\n *ngIf=\"!form.get('status')?.value\"\n id=\"publish-button\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"!itemId || publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C\n </shared-button>\n <shared-button\n *ngIf=\"form.get('status')?.value === publishStatus\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u0421\u043D\u044F\u0442\u044C \u0441 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438\n </shared-button>\n </ng-container>\n <shared-button\n *ngIf=\"!staticSection?.actions?.isNoDeleteAction && userRights[3]\"\n id=\"delete-button\"\n [disabled]=\"!itemId\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n (click)=\"deleteAction(staticData.value)\"\n >\u0423\u0434\u0430\u043B\u0438\u0442\u044C\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.publicationInTelegramBot\">\n <shared-button\n icon=\"send\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n (click)=\"publishInTelegram()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 Telegram\n </shared-button>\n </ng-container>\n </div>\n </form>\n </div>\n </ng-template>\n </mat-tab>\n <ng-container *ngFor=\"let subEntity of blocks; let i = index; trackBy: trackByKey\">\n <mat-tab [id]=\"subEntity.hashTag\" [tabIndex]=\"i\">\n <ng-template mat-tab-label>\n <mat-icon *ngIf=\"subEntity.titleIcon\"\n class=\"static-data-tab-icon\">{{ subEntity.titleIcon }}\n </mat-icon>\n {{ subEntity.title }}\n </ng-template>\n <ng-template matTabContent>\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"subEntity.subEntitiesType === 'static-data'\">\n <ng-container *ngIf=\"staticData.value?.id\">\n <ng-container *ngIf=\"staticData.value?.id\" class=\"center-block-inner\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"subEntity.entity\"\n [customTitle]=\"subEntity.title + ' ' + staticData.value?.['name']\"\n [addTitle]=\"subEntity.addTitle + ' ' + staticData.value?.['name']\"\n [filteringQuery]=\"subEntity.getFilteringQuery(staticData.value)\"\n [parentSection]=\"contentType\"\n [parentItemId]=\"itemId\"\n [parentSectionHashtag]=\"subEntity.hashTag\"\n [parentData]=\"form.value\"\n [autoCompleteFields]=\"subEntity.autoCompleteFields\"\n ></app-static-data-list-items>\n </ng-container>\n <shared-spinner *ngIf=\"!staticData.value?.id\"\n [overlay]=\"true\"></shared-spinner>\n </ng-container>\n @if (!staticData.value?.id) {\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!subEntity.entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"subEntity.emptyTitle\">\n {{ subEntity.emptyTitle }}\n </ng-container>\n </div>\n }\n </ng-container>\n @if (subEntity!.subEntitiesType === 'component') {\n <ng-container *ngComponentOutlet=\"\n subEntity.component;\n injector: componentDataInjector;\n \"/> <!-- subEntity.getInputData(form.value) -->\n }\n </div>\n </ng-template>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <shared-spinner *ngIf=\"status.value !== statusType.LOADED || formStatus === 'loading'\"\n [overlay]=\"true\"></shared-spinner>\n </ng-container>\n</mat-card>\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:#485860a6;height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}.languages{display:flex;justify-content:center;margin:5px 0 10px}.languages .language-item .activeLang{background:#007bff;color:#fff}.center-block-header-title{margin-top:25px;font-size:20px}\n"], dependencies: [{ kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: PanelHeaderModule }, { kind: "component", type: PanelHeaderComponent, selector: "shared-panel-header", inputs: ["title", "parentTitle", "parentUrl"] }, { kind: "component", type: MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "directive", type: MatTabContent, selector: "[matTabContent]" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: AutoFormModule }, { kind: "component", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: ["fields", "itemId", "formId", "showPublicationMessages", "useEntityPermissions", "showProgressBar", "showFormMessageBox", "form", "editorImageUploadUrl", "errorMessageTexts", "entity", "havePublication", "config"], outputs: ["changed", "formCompleted"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "component", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: ["staticDataConfiguration", "viewMode", "contentType", "customTitle", "addTitle", "icon", "parentSection", "parentItemId", "showPanelHeader", "parentData", "parentSectionHashtag", "autoCompleteFields", "filteringQuery", "subEntity", "leftBlockFilterParamData", "defaultLanguageId"] }, { kind: "ngmodule", type: SharedSpinnerModule }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14602
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataDetailsComponent, deps: [{ token: i3.UntypedFormBuilder }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: AutoFormService }, { token: RouterFacade }, { token: FormErrorsFacade }, { token: FormsFacade }, { token: RequestsFacade }, { token: StaticDataFacade }, { token: RightService }, { token: i1$6.MatDialog }, { token: NotificationsFacade }, { token: CoreFacade }, { token: PublicationMessagesFacade }, { token: ActionsFacade }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i2$1.MatIconRegistry }, { token: AuthenticationService }, { token: StaticDataServiceService }, { token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14603
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: StaticDataDetailsComponent, isStandalone: true, selector: "app-static-data-details", inputs: { dynamicFormKey: "dynamicFormKey", entityInput: "entityInput", entityIdInput: "entityIdInput", autoCompleteFields: "autoCompleteFields", mode: "mode" }, outputs: { closePopup: "closePopup" }, viewQueries: [{ propertyName: "tabs", predicate: MatTab, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n>\n <ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"!entityInput && form.get('name')\" [parentTitle]=\"staticSection.title\"\n [parentUrl]=\"['/static-data', contentType]\"\n [title]=\"form.get('name')?.value\">\n </shared-panel-header>\n\n <div class=\"content p-24\">\n <div class=\"center-block bg-white\">\n <div class=\"center-block-header position-relative\">\n <h1 @appearFromLeftWithDelay class=\"center-block-header-title\">\n {{ form.get('name')?.value || '\u0421\u043E\u0437\u0434\u0430\u043D\u0438\u0435' }}\n </h1>\n </div>\n <mat-tab-group [selectedIndex]=\"activeTabIndex\">\n <mat-tab id=\"edit\" tabindex=\"-1\">\n <ng-template mat-tab-label>\n <mat-icon class=\"static-data-tab-icon\">edit</mat-icon>\n \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435\n </ng-template>\n <ng-template matTabContent>\n <div *ngIf=\"staticSection?.options?.hasMultiLanguage\" class=\"languages\">\n <div *ngFor=\"let item of languageList\" class=\"language-item\">\n <a\n [ngClass]=\"{'activeLang': currentLanguageId ? item.id === currentLanguageId : defaultLanguageId ? item.id === defaultLanguageId : false }\"\n [routerLink]=\"['/static-data', contentType, itemId, item.id]\">[ {{ item.slug }} ]</a>\n </div>\n </div>\n <div class=\"center-block-inner\">\n <form [formGroup]=\"form\">\n <shared-auto-form\n *ngIf=\"status.value === statusType.LOADED\"\n class=\"mb-20\"\n [showPublicationMessages]=\"staticSection.options?.havePublication || false\"\n [entity]=\"contentType\"\n [itemId]=\"itemId\"\n [formId]=\"formId\"\n [fields]=\"fields\"\n [form]=\"form\"\n [config]=\"{needToPublish: false}\"\n [havePublication]=\"staticSection.options?.havePublication || false\"\n [errorMessageTexts]=\"globalErrorMessageTexts\"\n [autoCompleteFieldInput]=\"autoCompleteFields\"\n (changed)=\"changedFormValue($event)\"\n (formCompleted)=\"formCompleted($event)\"\n ></shared-auto-form>\n\n <div *ngIf=\"itemId && additionalActions?.length\" class=\"global-actions\">\n <div *ngFor=\"let action of additionalActions\"\n (click)=\"actionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>\n <div @appearFromLeftWithDelay\n class=\"mt-20 text-center\">\n <shared-button\n *ngIf=\"!entityInput\"\n id=\"back-to-list-button\"\n class=\"mr-8\"\n icon=\"chevron_left\"\n type=\"button\"\n styleTheme=\"raised\"\n color=\"basic\"\n iconColor=\"black\"\n (click)=\"goBack()\"\n >{{ parentSection ? '\u041D\u0430\u0437\u0430\u0434' : '\u041A \u0441\u043F\u0438\u0441\u043A\u0443' }}\n </shared-button>\n <shared-button\n *ngIf=\"userRights[0]\"\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [loading]=\"status.value === statusType.LOADING\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >{{ itemId ? '\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C' : '\u0421\u043E\u0437\u0434\u0430\u0442\u044C' }}\n <!-- [disabled]=\"!form.valid dataStored\" -->\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.havePublication\">\n <shared-button\n *ngIf=\"!form.get('status')?.value\"\n id=\"publish-button\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"!itemId || publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C\n </shared-button>\n <shared-button\n *ngIf=\"form.get('status')?.value === publishStatus\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u0421\u043D\u044F\u0442\u044C \u0441 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438\n </shared-button>\n </ng-container>\n <shared-button\n *ngIf=\"itemId && !staticSection?.actions?.isNoDeleteAction && userRights[3]\"\n id=\"delete-button\"\n [disabled]=\"!itemId\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n (click)=\"deleteAction(staticData.value)\"\n >\u0423\u0434\u0430\u043B\u0438\u0442\u044C\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.publicationInTelegramBot\">\n <shared-button\n icon=\"send\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n (click)=\"publishInTelegram()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 Telegram\n </shared-button>\n </ng-container>\n </div>\n </form>\n </div>\n </ng-template>\n </mat-tab>\n <ng-container *ngFor=\"let subEntity of blocks; let i = index; trackBy: trackByKey\">\n <mat-tab\n [disabled]=\"!staticData.value?.id\"\n [id]=\"subEntity.hashTag\" [tabIndex]=\"i\">\n <ng-template mat-tab-label>\n <mat-icon *ngIf=\"subEntity.titleIcon\"\n class=\"static-data-tab-icon\">{{ subEntity.titleIcon }}\n </mat-icon>\n {{ subEntity.title }}\n </ng-template>\n <ng-template matTabContent>\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"subEntity.subEntitiesType === 'static-data'\">\n <ng-container *ngIf=\"staticData.value?.id\" class=\"center-block-inner\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"subEntity.entity\"\n [customTitle]=\"staticData.value?.['name']+': '+ subEntity.title\"\n [filteringQuery]=\"subEntity.getFilteringQuery(staticData.value)\"\n [parentSection]=\"contentType\"\n [parentItemId]=\"itemId\"\n [parentSectionHashtag]=\"subEntity.hashTag\"\n [parentData]=\"form.value\"\n [autoCompleteFields]=\"subEntity.autoCompleteFields\"\n [mode]=\"mode\"\n ></app-static-data-list-items>\n <!--\n [addTitle]=\"subEntity.addTitle + ' ' + staticData.value?.['name']\"\n -->\n </ng-container>\n <shared-spinner *ngIf=\"!staticData.value?.id\"\n [overlay]=\"true\"></shared-spinner>\n\n @if (!staticData.value?.id) {\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!subEntity.entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"subEntity.emptyTitle\">\n {{ subEntity.emptyTitle }}\n </ng-container>\n </div>\n }\n </ng-container>\n @if (subEntity!.subEntitiesType === 'component') {\n <ng-container *ngComponentOutlet=\"\n subEntity.component;\n injector: componentDataInjector;\n \"/> <!-- subEntity.getInputData(form.value) -->\n }\n </div>\n </ng-template>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <shared-spinner *ngIf=\"status.value !== statusType.LOADED || formStatus === 'loading'\"\n [overlay]=\"true\"></shared-spinner>\n </ng-container>\n</mat-card>\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:#485860a6;height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}.languages{display:flex;justify-content:center;margin:5px 0 10px}.languages .language-item .activeLang{background:#007bff;color:#fff}.center-block-header-title{margin-top:25px;font-size:20px}\n"], dependencies: [{ kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: PanelHeaderModule }, { kind: "component", type: PanelHeaderComponent, selector: "shared-panel-header", inputs: ["title", "parentTitle", "parentUrl"] }, { kind: "component", type: MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "directive", type: MatTabContent, selector: "[matTabContent]" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "ngmodule", type: AutoFormModule }, { kind: "component", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: ["fields", "itemId", "formId", "showPublicationMessages", "useEntityPermissions", "showProgressBar", "showFormMessageBox", "form", "editorImageUploadUrl", "errorMessageTexts", "entity", "havePublication", "autoCompleteFieldInput", "config"], outputs: ["changed", "formCompleted"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "component", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: ["mode", "selectIsRequired", "staticDataConfiguration", "viewMode", "contentType", "customTitle", "addTitle", "icon", "parentSection", "parentItemId", "showPanelHeader", "parentData", "parentSectionHashtag", "autoCompleteFields", "filteringQuery", "subEntity", "leftBlockFilterParamData", "defaultLanguageId"], outputs: ["selectingItem"] }, { kind: "ngmodule", type: SharedSpinnerModule }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13967
14604
|
}
|
|
13968
14605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataDetailsComponent, decorators: [{
|
|
13969
14606
|
type: Component,
|
|
@@ -13986,8 +14623,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
13986
14623
|
StaticDataListItemsComponent,
|
|
13987
14624
|
SharedSpinnerModule,
|
|
13988
14625
|
NgComponentOutlet
|
|
13989
|
-
], template: "<mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n>\n <ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"form.get('name')\" [parentTitle]=\"staticSection.title\"\n [parentUrl]=\"['/static-data', contentType]\"\n [title]=\"form.get('name')?.value\">>\n </shared-panel-header>\n\n <div class=\"content p-24\">\n <div class=\"center-block bg-white\">\n <div class=\"center-block-header position-relative\">\n <h1 @appearFromLeftWithDelay class=\"center-block-header-title\">\n {{ form.get('name')?.value || '\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435' }}\n </h1>\n </div>\n <mat-tab-group [selectedIndex]=\"activeTabIndex\">\n <mat-tab id=\"edit\" tabindex=\"-1\">\n <ng-template mat-tab-label>\n <mat-icon class=\"static-data-tab-icon\">edit</mat-icon>\n \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435\n </ng-template>\n <ng-template matTabContent>\n <div *ngIf=\"staticSection?.options?.hasMultiLanguage\" class=\"languages\">\n <div *ngFor=\"let item of languageList\" class=\"language-item\">\n <a\n [ngClass]=\"{'activeLang': currentLanguageId ? item.id === currentLanguageId : defaultLanguageId ? item.id === defaultLanguageId : false }\"\n [routerLink]=\"['/static-data', contentType, itemId, item.id]\">[ {{ item.slug }} ]</a>\n </div>\n </div>\n <div class=\"center-block-inner\">\n <form [formGroup]=\"form\">\n <shared-auto-form\n *ngIf=\"status.value === statusType.LOADED\"\n class=\"mb-20\"\n [showPublicationMessages]=\"staticSection.options?.havePublication || false\"\n [entity]=\"contentType\"\n [itemId]=\"itemId\"\n [formId]=\"formId\"\n [fields]=\"fields\"\n [form]=\"form\"\n [config]=\"{needToPublish: false}\"\n [havePublication]=\"staticSection.options?.havePublication || false\"\n [errorMessageTexts]=\"globalErrorMessageTexts\"\n (changed)=\"changedFormValue($event)\"\n (formCompleted)=\"formCompleted($event)\"\n ></shared-auto-form>\n\n <div *ngIf=\"itemId && additionalActions?.length\" class=\"global-actions\">\n <div *ngFor=\"let action of additionalActions\"\n (click)=\"actionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>\n <div @appearFromLeftWithDelay\n class=\"mt-20 text-center\">\n <shared-button\n id=\"back-to-list-button\"\n class=\"mr-8\"\n icon=\"chevron_left\"\n type=\"button\"\n styleTheme=\"raised\"\n color=\"basic\"\n iconColor=\"black\"\n (click)=\"goBack()\"\n >{{ parentSection ? '\u041D\u0430\u0437\u0430\u0434' : '\u041A \u0441\u043F\u0438\u0441\u043A\u0443' }}\n </shared-button>\n <shared-button\n *ngIf=\"userRights[0]\"\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [loading]=\"status.value === statusType.LOADING\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >{{ itemId ? '\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C' : '\u0421\u043E\u0437\u0434\u0430\u0442\u044C' }}\n <!-- [disabled]=\"!form.valid dataStored\" -->\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.havePublication\">\n <shared-button\n *ngIf=\"!form.get('status')?.value\"\n id=\"publish-button\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"!itemId || publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C\n </shared-button>\n <shared-button\n *ngIf=\"form.get('status')?.value === publishStatus\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u0421\u043D\u044F\u0442\u044C \u0441 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438\n </shared-button>\n </ng-container>\n <shared-button\n *ngIf=\"!staticSection?.actions?.isNoDeleteAction && userRights[3]\"\n id=\"delete-button\"\n [disabled]=\"!itemId\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n (click)=\"deleteAction(staticData.value)\"\n >\u0423\u0434\u0430\u043B\u0438\u0442\u044C\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.publicationInTelegramBot\">\n <shared-button\n icon=\"send\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n (click)=\"publishInTelegram()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 Telegram\n </shared-button>\n </ng-container>\n </div>\n </form>\n </div>\n </ng-template>\n </mat-tab>\n <ng-container *ngFor=\"let subEntity of blocks; let i = index; trackBy: trackByKey\">\n <mat-tab [id]=\"subEntity.hashTag\" [tabIndex]=\"i\">\n <ng-template mat-tab-label>\n <mat-icon *ngIf=\"subEntity.titleIcon\"\n class=\"static-data-tab-icon\">{{ subEntity.titleIcon }}\n </mat-icon>\n {{ subEntity.title }}\n </ng-template>\n <ng-template matTabContent>\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"subEntity.subEntitiesType === 'static-data'\">\n <ng-container *ngIf=\"staticData.value?.id\">\n <ng-container *ngIf=\"staticData.value?.id\" class=\"center-block-inner\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"subEntity.entity\"\n [customTitle]=\"subEntity.title + ' ' + staticData.value?.['name']\"\n [addTitle]=\"subEntity.addTitle + ' ' + staticData.value?.['name']\"\n [filteringQuery]=\"subEntity.getFilteringQuery(staticData.value)\"\n [parentSection]=\"contentType\"\n [parentItemId]=\"itemId\"\n [parentSectionHashtag]=\"subEntity.hashTag\"\n [parentData]=\"form.value\"\n [autoCompleteFields]=\"subEntity.autoCompleteFields\"\n ></app-static-data-list-items>\n </ng-container>\n <shared-spinner *ngIf=\"!staticData.value?.id\"\n [overlay]=\"true\"></shared-spinner>\n </ng-container>\n @if (!staticData.value?.id) {\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!subEntity.entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"subEntity.emptyTitle\">\n {{ subEntity.emptyTitle }}\n </ng-container>\n </div>\n }\n </ng-container>\n @if (subEntity!.subEntitiesType === 'component') {\n <ng-container *ngComponentOutlet=\"\n subEntity.component;\n injector: componentDataInjector;\n \"/> <!-- subEntity.getInputData(form.value) -->\n }\n </div>\n </ng-template>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <shared-spinner *ngIf=\"status.value !== statusType.LOADED || formStatus === 'loading'\"\n [overlay]=\"true\"></shared-spinner>\n </ng-container>\n</mat-card>\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:#485860a6;height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}.languages{display:flex;justify-content:center;margin:5px 0 10px}.languages .language-item .activeLang{background:#007bff;color:#fff}.center-block-header-title{margin-top:25px;font-size:20px}\n"] }]
|
|
13990
|
-
}], ctorParameters: () => [{ type:
|
|
14626
|
+
], template: "<mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n>\n <ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"!entityInput && form.get('name')\" [parentTitle]=\"staticSection.title\"\n [parentUrl]=\"['/static-data', contentType]\"\n [title]=\"form.get('name')?.value\">\n </shared-panel-header>\n\n <div class=\"content p-24\">\n <div class=\"center-block bg-white\">\n <div class=\"center-block-header position-relative\">\n <h1 @appearFromLeftWithDelay class=\"center-block-header-title\">\n {{ form.get('name')?.value || '\u0421\u043E\u0437\u0434\u0430\u043D\u0438\u0435' }}\n </h1>\n </div>\n <mat-tab-group [selectedIndex]=\"activeTabIndex\">\n <mat-tab id=\"edit\" tabindex=\"-1\">\n <ng-template mat-tab-label>\n <mat-icon class=\"static-data-tab-icon\">edit</mat-icon>\n \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435\n </ng-template>\n <ng-template matTabContent>\n <div *ngIf=\"staticSection?.options?.hasMultiLanguage\" class=\"languages\">\n <div *ngFor=\"let item of languageList\" class=\"language-item\">\n <a\n [ngClass]=\"{'activeLang': currentLanguageId ? item.id === currentLanguageId : defaultLanguageId ? item.id === defaultLanguageId : false }\"\n [routerLink]=\"['/static-data', contentType, itemId, item.id]\">[ {{ item.slug }} ]</a>\n </div>\n </div>\n <div class=\"center-block-inner\">\n <form [formGroup]=\"form\">\n <shared-auto-form\n *ngIf=\"status.value === statusType.LOADED\"\n class=\"mb-20\"\n [showPublicationMessages]=\"staticSection.options?.havePublication || false\"\n [entity]=\"contentType\"\n [itemId]=\"itemId\"\n [formId]=\"formId\"\n [fields]=\"fields\"\n [form]=\"form\"\n [config]=\"{needToPublish: false}\"\n [havePublication]=\"staticSection.options?.havePublication || false\"\n [errorMessageTexts]=\"globalErrorMessageTexts\"\n [autoCompleteFieldInput]=\"autoCompleteFields\"\n (changed)=\"changedFormValue($event)\"\n (formCompleted)=\"formCompleted($event)\"\n ></shared-auto-form>\n\n <div *ngIf=\"itemId && additionalActions?.length\" class=\"global-actions\">\n <div *ngFor=\"let action of additionalActions\"\n (click)=\"actionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>\n <div @appearFromLeftWithDelay\n class=\"mt-20 text-center\">\n <shared-button\n *ngIf=\"!entityInput\"\n id=\"back-to-list-button\"\n class=\"mr-8\"\n icon=\"chevron_left\"\n type=\"button\"\n styleTheme=\"raised\"\n color=\"basic\"\n iconColor=\"black\"\n (click)=\"goBack()\"\n >{{ parentSection ? '\u041D\u0430\u0437\u0430\u0434' : '\u041A \u0441\u043F\u0438\u0441\u043A\u0443' }}\n </shared-button>\n <shared-button\n *ngIf=\"userRights[0]\"\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [loading]=\"status.value === statusType.LOADING\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >{{ itemId ? '\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C' : '\u0421\u043E\u0437\u0434\u0430\u0442\u044C' }}\n <!-- [disabled]=\"!form.valid dataStored\" -->\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.havePublication\">\n <shared-button\n *ngIf=\"!form.get('status')?.value\"\n id=\"publish-button\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"!itemId || publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C\n </shared-button>\n <shared-button\n *ngIf=\"form.get('status')?.value === publishStatus\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u0421\u043D\u044F\u0442\u044C \u0441 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438\n </shared-button>\n </ng-container>\n <shared-button\n *ngIf=\"itemId && !staticSection?.actions?.isNoDeleteAction && userRights[3]\"\n id=\"delete-button\"\n [disabled]=\"!itemId\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n (click)=\"deleteAction(staticData.value)\"\n >\u0423\u0434\u0430\u043B\u0438\u0442\u044C\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.publicationInTelegramBot\">\n <shared-button\n icon=\"send\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n (click)=\"publishInTelegram()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 Telegram\n </shared-button>\n </ng-container>\n </div>\n </form>\n </div>\n </ng-template>\n </mat-tab>\n <ng-container *ngFor=\"let subEntity of blocks; let i = index; trackBy: trackByKey\">\n <mat-tab\n [disabled]=\"!staticData.value?.id\"\n [id]=\"subEntity.hashTag\" [tabIndex]=\"i\">\n <ng-template mat-tab-label>\n <mat-icon *ngIf=\"subEntity.titleIcon\"\n class=\"static-data-tab-icon\">{{ subEntity.titleIcon }}\n </mat-icon>\n {{ subEntity.title }}\n </ng-template>\n <ng-template matTabContent>\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"subEntity.subEntitiesType === 'static-data'\">\n <ng-container *ngIf=\"staticData.value?.id\" class=\"center-block-inner\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"subEntity.entity\"\n [customTitle]=\"staticData.value?.['name']+': '+ subEntity.title\"\n [filteringQuery]=\"subEntity.getFilteringQuery(staticData.value)\"\n [parentSection]=\"contentType\"\n [parentItemId]=\"itemId\"\n [parentSectionHashtag]=\"subEntity.hashTag\"\n [parentData]=\"form.value\"\n [autoCompleteFields]=\"subEntity.autoCompleteFields\"\n [mode]=\"mode\"\n ></app-static-data-list-items>\n <!--\n [addTitle]=\"subEntity.addTitle + ' ' + staticData.value?.['name']\"\n -->\n </ng-container>\n <shared-spinner *ngIf=\"!staticData.value?.id\"\n [overlay]=\"true\"></shared-spinner>\n\n @if (!staticData.value?.id) {\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!subEntity.entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"subEntity.emptyTitle\">\n {{ subEntity.emptyTitle }}\n </ng-container>\n </div>\n }\n </ng-container>\n @if (subEntity!.subEntitiesType === 'component') {\n <ng-container *ngComponentOutlet=\"\n subEntity.component;\n injector: componentDataInjector;\n \"/> <!-- subEntity.getInputData(form.value) -->\n }\n </div>\n </ng-template>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <shared-spinner *ngIf=\"status.value !== statusType.LOADED || formStatus === 'loading'\"\n [overlay]=\"true\"></shared-spinner>\n </ng-container>\n</mat-card>\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:#485860a6;height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}.languages{display:flex;justify-content:center;margin:5px 0 10px}.languages .language-item .activeLang{background:#007bff;color:#fff}.center-block-header-title{margin-top:25px;font-size:20px}\n"] }]
|
|
14627
|
+
}], ctorParameters: () => [{ type: i3.UntypedFormBuilder }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: AutoFormService }, { type: RouterFacade }, { type: FormErrorsFacade }, { type: FormsFacade }, { type: RequestsFacade }, { type: StaticDataFacade }, { type: RightService }, { type: i1$6.MatDialog }, { type: NotificationsFacade }, { type: CoreFacade }, { type: PublicationMessagesFacade }, { type: ActionsFacade }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i2$1.MatIconRegistry }, { type: AuthenticationService }, { type: StaticDataServiceService }, { type: undefined, decorators: [{
|
|
14628
|
+
type: Inject,
|
|
14629
|
+
args: [CORE_CONFIG]
|
|
14630
|
+
}] }], propDecorators: { dynamicFormKey: [{
|
|
14631
|
+
type: Input
|
|
14632
|
+
}], entityInput: [{
|
|
14633
|
+
type: Input
|
|
14634
|
+
}], entityIdInput: [{
|
|
14635
|
+
type: Input
|
|
14636
|
+
}], autoCompleteFields: [{
|
|
14637
|
+
type: Input
|
|
14638
|
+
}], mode: [{
|
|
14639
|
+
type: Input
|
|
14640
|
+
}], closePopup: [{
|
|
14641
|
+
type: Output
|
|
14642
|
+
}], tabs: [{
|
|
13991
14643
|
type: ViewChildren,
|
|
13992
14644
|
args: [MatTab]
|
|
13993
14645
|
}] } });
|
|
@@ -14143,8 +14795,8 @@ class FilteringFormComponent {
|
|
|
14143
14795
|
};
|
|
14144
14796
|
});
|
|
14145
14797
|
}
|
|
14146
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FilteringFormComponent, deps: [{ token: StaticDataFacade }, { token: i1.Store }, { token:
|
|
14147
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FilteringFormComponent, isStandalone: true, selector: "app-filtering-form", inputs: { contentType: "contentType", data: "data", modalView: "modalView" }, outputs: { filterData: "filterData", close: "close" }, ngImport: i0, template: "<div [ngClass]=\"{'modal-view': modalView}\"\n class=\"text-center position-relative p-10 modal-style-info modal-size-middle\">\n <b *ngIf=\"modalView\" class=\"mat-dialog-title\">\u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F</b>\n <div mat-dialog-content>\n <form [formGroup]=\"form\">\n @if (modalView) {\n <table class=\"filter-form\" [formGroup]=\"form\">\n <tr *ngFor=\"let field of filterFields\">\n <th class=\"filter-form-field\">{{ field.title }}</th>\n <td class=\"filter-form-value\">\n <mat-form-field class=\"small-form-field\">\n @switch (field.type) {\n @default {\n <input matInput type=\"text\" [formControlName]=\"field.field\"/>\n }\n @case (FieldType.FieldTypeSlideToggle) {\n <mat-select [formControlName]=\"field.field\">\n <mat-option value=\"\"> ---</mat-option>\n <mat-option [value]=\"'1:\u0414\u0430'\">\u0414\u0430</mat-option>\n <mat-option [value]=\"'0:\u041D\u0435\u0442'\">\u041D\u0435\u0442</mat-option>\n </mat-select>\n }\n @case (FieldType.FieldTypeSelect) {\n <mat-select [formControlName]=\"field.field\" [multiple]=\"true\">\n <mat-option value=\"\"> --</mat-option>\n <mat-option *ngFor=\"let option of storedOption[field.field]\"\n [value]=\"option.value + ':' + option.title\">{{ option.title }}\n </mat-option>\n </mat-select>\n }\n }\n </mat-form-field>\n </td>\n </tr>\n </table>\n\n } @else {\n <div class=\"filter-fields\">\n\n <ng-container *ngFor=\"let field of filterFields\">\n <div class=\"filter-field-row mb-10\">\n <div class=\"filter-field\">{{ field.title }}</div>\n <div class=\"filter-value\">\n\n @switch (field.filterType) {\n @default {\n @if (field.fieldType !== FieldType.FieldTypeSelect) {\n @if (field.options.format === IFormFieldFormat.Date) {\n <mat-form-field class=\"mat-form-field-small\">\n <mat-date-range-input [rangePicker]=\"picker\">\n <input matStartDate [formControlName]=\"field.field\" placeholder=\"\u041E\u0442\">\n <input matEndDate [formControlName]=\"field.field + '2'\" placeholder=\"\u0414\u043E\">\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-date-range-picker #picker></mat-date-range-picker>\n </mat-form-field>\n } @else {\n <input class=\"mat-input-small\" matInput [formControlName]=\"field.field\" type=\"text\"/>\n }\n }\n\n @if (field.fieldType === FieldType.FieldTypeSelect) {\n <mat-radio-group\n aria-labelledby=\"example-radio-group-label\"\n class=\"d-flex flex-column\"\n [formControlName]=\"field.field\">\n @for (option of storedOption[field.field]; let idx = $index; track option.value) {\n @if (idx < 6 || moreOpenedState[field.field]) {\n <mat-radio-button class=\"mat-radio-button-small\" [value]=\"option.value\">{{ option.title }}\n </mat-radio-button>\n }\n }\n @if (storedOption[field.field]?.length > 5) {\n <div class=\"filter-show-more\" (click)=\"moreClick(field.field)\">\n {{ moreOpenedState[field.field] ? '\u041C\u0435\u043D\u044C\u0448\u0435' : '\u0411\u043E\u043B\u044C\u0448\u0435' }}\n </div>\n }\n </mat-radio-group>\n }\n }\n @case (StaticDataSectionFilteringFieldTypes.TOGGLE) {\n <mat-slide-toggle class=\"mat-slide-toggle-small\"\n [formControlName]=\"field.field\"></mat-slide-toggle>\n }\n @case (StaticDataSectionFilteringFieldTypes.BETWEEN) {\n @if (field.fieldType === FieldType.FieldTypeInput) {\n <input class=\"mat-input-small mb-3\" matInput [formControlName]=\"field.field\" type=\"number\" step=\"1\" placeholder=\"\u043E\u0442\"/>\n <input class=\"mat-input-small\" matInput [formControlName]=\"field.field + '2'\" type=\"number\" step=\"1\" placeholder=\"\u0434\u043E\"/>\n }\n }\n }\n\n </div>\n </div>\n </ng-container>\n </div>\n }\n\n </form>\n <div *ngIf=\"!modalView\">\n <shared-button\n class=\"mb-1\"\n size=\"small\"\n type=\"submit\"\n color=\"accent\"\n styleTheme=\"flat\"\n (click)=\"submitClick()\"\n >\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C\n </shared-button>\n <shared-button\n type=\"button\"\n size=\"small\"\n styleTheme=\"flat\"\n color=\"basic\"\n (click)=\"resetForm()\"\n > \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C\n </shared-button>\n </div>\n </div>\n</div>\n", styles: [".filter-form-field{text-align:left;font-size:13px;padding-right:10px}.small-form-field{margin-bottom:5px}.filter-fields{display:flex;flex-wrap:wrap}.filter-fields .filter-field-row{width:100%}.filter-fields .filter-field-row .filter-field{font-weight:700;width:100%;text-align:left}.filter-fields .filter-field-row .filter-value{width:100%;text-align:left;word-break:break-all}.filter-show-more{color:#3d2eb3;font-size:12px;text-align:center;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.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: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i6$1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i6$1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i6$1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i6$1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14798
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FilteringFormComponent, deps: [{ token: StaticDataFacade }, { token: i1.Store }, { token: i3.UntypedFormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14799
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FilteringFormComponent, isStandalone: true, selector: "app-filtering-form", inputs: { contentType: "contentType", data: "data", modalView: "modalView" }, outputs: { filterData: "filterData", close: "close" }, ngImport: i0, template: "<div [ngClass]=\"{'modal-view': modalView}\"\n class=\"text-center position-relative p-10 modal-style-info modal-size-middle\">\n <b *ngIf=\"modalView\" class=\"mat-dialog-title\">\u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F</b>\n <div mat-dialog-content>\n <form [formGroup]=\"form\">\n @if (modalView) {\n <table class=\"filter-form\" [formGroup]=\"form\">\n <tr *ngFor=\"let field of filterFields\">\n <th class=\"filter-form-field\">{{ field.title }}</th>\n <td class=\"filter-form-value\">\n <mat-form-field class=\"small-form-field\">\n @switch (field.type) {\n @default {\n <input matInput type=\"text\" [formControlName]=\"field.field\"/>\n }\n @case (FieldType.FieldTypeSlideToggle) {\n <mat-select [formControlName]=\"field.field\">\n <mat-option value=\"\"> ---</mat-option>\n <mat-option [value]=\"'1:\u0414\u0430'\">\u0414\u0430</mat-option>\n <mat-option [value]=\"'0:\u041D\u0435\u0442'\">\u041D\u0435\u0442</mat-option>\n </mat-select>\n }\n @case (FieldType.FieldTypeSelect) {\n <mat-select [formControlName]=\"field.field\" [multiple]=\"true\">\n <mat-option value=\"\"> --</mat-option>\n <mat-option *ngFor=\"let option of storedOption[field.field]\"\n [value]=\"option.value + ':' + option.title\">{{ option.title }}\n </mat-option>\n </mat-select>\n }\n }\n </mat-form-field>\n </td>\n </tr>\n </table>\n\n } @else {\n <div class=\"filter-fields\">\n\n <ng-container *ngFor=\"let field of filterFields\">\n <div class=\"filter-field-row mb-10\">\n <div class=\"filter-field\">{{ field.title }}</div>\n <div class=\"filter-value\">\n\n @switch (field.filterType) {\n @default {\n @if (field.fieldType !== FieldType.FieldTypeSelect) {\n @if (field.options.format === IFormFieldFormat.Date) {\n <mat-form-field class=\"mat-form-field-small\">\n <mat-date-range-input [rangePicker]=\"picker\">\n <input matStartDate [formControlName]=\"field.field\" placeholder=\"\u041E\u0442\">\n <input matEndDate [formControlName]=\"field.field + '2'\" placeholder=\"\u0414\u043E\">\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-date-range-picker #picker></mat-date-range-picker>\n </mat-form-field>\n } @else {\n <input class=\"mat-input-small\" matInput [formControlName]=\"field.field\" type=\"text\"/>\n }\n }\n\n @if (field.fieldType === FieldType.FieldTypeSelect) {\n <mat-radio-group\n aria-labelledby=\"example-radio-group-label\"\n class=\"d-flex flex-column\"\n [formControlName]=\"field.field\">\n @for (option of storedOption[field.field]; let idx = $index; track option.value) {\n @if (idx < 6 || moreOpenedState[field.field]) {\n <mat-radio-button class=\"mat-radio-button-small\" [value]=\"option.value\">{{ option.title }}\n </mat-radio-button>\n }\n }\n @if (storedOption[field.field]?.length > 5) {\n <div class=\"filter-show-more\" (click)=\"moreClick(field.field)\">\n {{ moreOpenedState[field.field] ? '\u041C\u0435\u043D\u044C\u0448\u0435' : '\u0411\u043E\u043B\u044C\u0448\u0435' }}\n </div>\n }\n </mat-radio-group>\n }\n }\n @case (StaticDataSectionFilteringFieldTypes.TOGGLE) {\n <mat-slide-toggle class=\"mat-slide-toggle-small\"\n [formControlName]=\"field.field\"></mat-slide-toggle>\n }\n @case (StaticDataSectionFilteringFieldTypes.BETWEEN) {\n @if (field.fieldType === FieldType.FieldTypeInput) {\n <input class=\"mat-input-small mb-3\" matInput [formControlName]=\"field.field\" type=\"number\" step=\"1\" placeholder=\"\u043E\u0442\"/>\n <input class=\"mat-input-small\" matInput [formControlName]=\"field.field + '2'\" type=\"number\" step=\"1\" placeholder=\"\u0434\u043E\"/>\n }\n }\n }\n\n </div>\n </div>\n </ng-container>\n </div>\n }\n\n </form>\n <div *ngIf=\"!modalView\">\n <shared-button\n class=\"mb-1\"\n size=\"small\"\n type=\"submit\"\n color=\"accent\"\n styleTheme=\"flat\"\n (click)=\"submitClick()\"\n >\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C\n </shared-button>\n <shared-button\n type=\"button\"\n size=\"small\"\n styleTheme=\"flat\"\n color=\"basic\"\n (click)=\"resetForm()\"\n > \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C\n </shared-button>\n </div>\n </div>\n</div>\n", styles: [".filter-form-field{text-align:left;font-size:13px;padding-right:10px}.small-form-field{margin-bottom:5px}.filter-fields{display:flex;flex-wrap:wrap}.filter-fields .filter-field-row{width:100%}.filter-fields .filter-field-row .filter-field{font-weight:700;width:100%;text-align:left}.filter-fields .filter-field-row .filter-value{width:100%;text-align:left;word-break:break-all}.filter-show-more{color:#3d2eb3;font-size:12px;text-align:center;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i6$2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i6$2.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i6$2.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i6$2.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14148
14800
|
}
|
|
14149
14801
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FilteringFormComponent, decorators: [{
|
|
14150
14802
|
type: Component,
|
|
@@ -14166,7 +14818,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
14166
14818
|
MatSuffix,
|
|
14167
14819
|
MatInput
|
|
14168
14820
|
], template: "<div [ngClass]=\"{'modal-view': modalView}\"\n class=\"text-center position-relative p-10 modal-style-info modal-size-middle\">\n <b *ngIf=\"modalView\" class=\"mat-dialog-title\">\u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F</b>\n <div mat-dialog-content>\n <form [formGroup]=\"form\">\n @if (modalView) {\n <table class=\"filter-form\" [formGroup]=\"form\">\n <tr *ngFor=\"let field of filterFields\">\n <th class=\"filter-form-field\">{{ field.title }}</th>\n <td class=\"filter-form-value\">\n <mat-form-field class=\"small-form-field\">\n @switch (field.type) {\n @default {\n <input matInput type=\"text\" [formControlName]=\"field.field\"/>\n }\n @case (FieldType.FieldTypeSlideToggle) {\n <mat-select [formControlName]=\"field.field\">\n <mat-option value=\"\"> ---</mat-option>\n <mat-option [value]=\"'1:\u0414\u0430'\">\u0414\u0430</mat-option>\n <mat-option [value]=\"'0:\u041D\u0435\u0442'\">\u041D\u0435\u0442</mat-option>\n </mat-select>\n }\n @case (FieldType.FieldTypeSelect) {\n <mat-select [formControlName]=\"field.field\" [multiple]=\"true\">\n <mat-option value=\"\"> --</mat-option>\n <mat-option *ngFor=\"let option of storedOption[field.field]\"\n [value]=\"option.value + ':' + option.title\">{{ option.title }}\n </mat-option>\n </mat-select>\n }\n }\n </mat-form-field>\n </td>\n </tr>\n </table>\n\n } @else {\n <div class=\"filter-fields\">\n\n <ng-container *ngFor=\"let field of filterFields\">\n <div class=\"filter-field-row mb-10\">\n <div class=\"filter-field\">{{ field.title }}</div>\n <div class=\"filter-value\">\n\n @switch (field.filterType) {\n @default {\n @if (field.fieldType !== FieldType.FieldTypeSelect) {\n @if (field.options.format === IFormFieldFormat.Date) {\n <mat-form-field class=\"mat-form-field-small\">\n <mat-date-range-input [rangePicker]=\"picker\">\n <input matStartDate [formControlName]=\"field.field\" placeholder=\"\u041E\u0442\">\n <input matEndDate [formControlName]=\"field.field + '2'\" placeholder=\"\u0414\u043E\">\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-date-range-picker #picker></mat-date-range-picker>\n </mat-form-field>\n } @else {\n <input class=\"mat-input-small\" matInput [formControlName]=\"field.field\" type=\"text\"/>\n }\n }\n\n @if (field.fieldType === FieldType.FieldTypeSelect) {\n <mat-radio-group\n aria-labelledby=\"example-radio-group-label\"\n class=\"d-flex flex-column\"\n [formControlName]=\"field.field\">\n @for (option of storedOption[field.field]; let idx = $index; track option.value) {\n @if (idx < 6 || moreOpenedState[field.field]) {\n <mat-radio-button class=\"mat-radio-button-small\" [value]=\"option.value\">{{ option.title }}\n </mat-radio-button>\n }\n }\n @if (storedOption[field.field]?.length > 5) {\n <div class=\"filter-show-more\" (click)=\"moreClick(field.field)\">\n {{ moreOpenedState[field.field] ? '\u041C\u0435\u043D\u044C\u0448\u0435' : '\u0411\u043E\u043B\u044C\u0448\u0435' }}\n </div>\n }\n </mat-radio-group>\n }\n }\n @case (StaticDataSectionFilteringFieldTypes.TOGGLE) {\n <mat-slide-toggle class=\"mat-slide-toggle-small\"\n [formControlName]=\"field.field\"></mat-slide-toggle>\n }\n @case (StaticDataSectionFilteringFieldTypes.BETWEEN) {\n @if (field.fieldType === FieldType.FieldTypeInput) {\n <input class=\"mat-input-small mb-3\" matInput [formControlName]=\"field.field\" type=\"number\" step=\"1\" placeholder=\"\u043E\u0442\"/>\n <input class=\"mat-input-small\" matInput [formControlName]=\"field.field + '2'\" type=\"number\" step=\"1\" placeholder=\"\u0434\u043E\"/>\n }\n }\n }\n\n </div>\n </div>\n </ng-container>\n </div>\n }\n\n </form>\n <div *ngIf=\"!modalView\">\n <shared-button\n class=\"mb-1\"\n size=\"small\"\n type=\"submit\"\n color=\"accent\"\n styleTheme=\"flat\"\n (click)=\"submitClick()\"\n >\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C\n </shared-button>\n <shared-button\n type=\"button\"\n size=\"small\"\n styleTheme=\"flat\"\n color=\"basic\"\n (click)=\"resetForm()\"\n > \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C\n </shared-button>\n </div>\n </div>\n</div>\n", styles: [".filter-form-field{text-align:left;font-size:13px;padding-right:10px}.small-form-field{margin-bottom:5px}.filter-fields{display:flex;flex-wrap:wrap}.filter-fields .filter-field-row{width:100%}.filter-fields .filter-field-row .filter-field{font-weight:700;width:100%;text-align:left}.filter-fields .filter-field-row .filter-value{width:100%;text-align:left;word-break:break-all}.filter-show-more{color:#3d2eb3;font-size:12px;text-align:center;cursor:pointer}\n"] }]
|
|
14169
|
-
}], ctorParameters: () => [{ type: StaticDataFacade }, { type: i1.Store }, { type:
|
|
14821
|
+
}], ctorParameters: () => [{ type: StaticDataFacade }, { type: i1.Store }, { type: i3.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }], propDecorators: { contentType: [{
|
|
14170
14822
|
type: Input
|
|
14171
14823
|
}], data: [{
|
|
14172
14824
|
type: Input
|
|
@@ -14262,7 +14914,7 @@ class ListSubEntitiesComponent {
|
|
|
14262
14914
|
});
|
|
14263
14915
|
}
|
|
14264
14916
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ListSubEntitiesComponent, deps: [{ token: i2$1.MatIconRegistry }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14265
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: ListSubEntitiesComponent, isStandalone: true, selector: "app-list-sub-entities", inputs: { staticDataConfiguration: "staticDataConfiguration", parentSubEntities: "parentSubEntities", position: "position", parentData: "parentData", parentContentType: "parentContentType", isViewMode: "isViewMode", isListMode: "isListMode", isEditMode: "isEditMode" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"row align-content-flex-start-top\">\n\n <ng-container *ngFor=\"let subEntity of blocks\">\n <div *ngIf=\"!$any(subEntity).subEntities\"\n class=\"col-sm-12 mb-10\"\n [ngClass]=\"['col-lg-' + ( $any(subEntity).options?.viewSettings?.viewMode?.cols || '12' )]\">\n <div class=\"static-data-view-block\">\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"$any(subEntity).subEntitiesType === 'static-data'\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <ng-container *ngIf=\"parentData?.id\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [viewMode]=\"true\"\n [contentType]=\"$any(subEntity).entity\"\n [customTitle]=\"$any(subEntity).title\"\n [filteringQuery]=\"$any(subEntity).getFilteringQuery(parentData)\"\n [parentSection]=\"parentContentType\"\n [parentItemId]=\"parentData?.id\"\n [parentSectionHashtag]=\"$any(subEntity).hashTag\"\n [parentData]=\"parentData\"\n [autoCompleteFields]=\"$any(subEntity).autoCompleteFields\"\n [subEntity]=\"$any(subEntity)\"\n [icon]=\"$any(subEntity).titleIcon\"\n ></app-static-data-list-items>\n </ng-container>\n <shared-spinner *ngIf=\"!parentData?.id\"\n [overlay]=\"true\"></shared-spinner>\n @if (!parentData?.id) {\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!$any(subEntity).entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"$any(subEntity).emptyTitle\">\n {{ $any(subEntity).emptyTitle }}\n </ng-container>\n </div>\n }\n </mat-card>\n </ng-container>\n\n @if ($any(subEntity)?.subEntitiesType === 'component') {\n <ng-container *ngComponentOutlet=\"\n $any(subEntity).component;\n injector: componentDataInjector;\n \"/>\n }\n </div>\n </div>\n </div>\n <div *ngIf=\"$any(subEntity).subEntities\" class=\"row align-content-flex-start col-sm-12\"\n [ngClass]=\"['col-lg-' + ( $any(subEntity).options?.group?.cols || '12' )]\">\n <ng-container *ngFor=\"let subEntity2 of $any(subEntity).subEntities\">\n <div *ngIf=\"!$any(subEntity2).subEntities\"\n class=\"col-sm-12 mb-10\"\n [ngClass]=\"['col-lg-' + ( $any(subEntity2).options?.viewSettings?.viewMode?.cols || '12' )]\">\n <div class=\"static-data-view-block\">\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"$any(subEntity2).subEntitiesType === 'static-data'\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <ng-container *ngIf=\"parentData?.id\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [viewMode]=\"true\"\n [contentType]=\"$any(subEntity2).entity\"\n [customTitle]=\"$any(subEntity2).title\"\n [filteringQuery]=\"$any(subEntity2).getFilteringQuery(parentData)\"\n [parentSection]=\"parentContentType\"\n [parentItemId]=\"parentData?.id\"\n [parentSectionHashtag]=\"$any(subEntity2).hashTag\"\n [parentData]=\"parentData\"\n [autoCompleteFields]=\"$any(subEntity2).autoCompleteFields\"\n [subEntity]=\"$any(subEntity2)\"\n [icon]=\"$any(subEntity2).titleIcon\"\n ></app-static-data-list-items>\n </ng-container>\n <shared-spinner *ngIf=\"!parentData?.id\"\n [overlay]=\"true\"></shared-spinner>\n @if (!parentData?.id) {\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!$any(subEntity2).entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"$any(subEntity2).emptyTitle\">\n {{ $any(subEntity2).emptyTitle }}\n </ng-container>\n </div>\n }\n </mat-card>\n </ng-container>\n\n @if ($any(subEntity2)?.subEntitiesType === 'component') {\n <ng-container *ngComponentOutlet=\"\n $any(subEntity2).component;\n injector: componentDataInjector;\n \"/>\n }\n </div>\n </div>\n\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:#485860a6;height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}.languages{display:flex;justify-content:center;margin:5px 0 10px}.languages .language-item .activeLang{background:#007bff;color:#fff}.center-block-header-title{margin-top:25px;font-size:20px}.mat-grid-tile-content{overflow:auto!important}.mat-grid-tile mat-card{width:100%}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: SharedSpinnerModule }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: ["staticDataConfiguration", "viewMode", "contentType", "customTitle", "addTitle", "icon", "parentSection", "parentItemId", "showPanelHeader", "parentData", "parentSectionHashtag", "autoCompleteFields", "filteringQuery", "subEntity", "leftBlockFilterParamData", "defaultLanguageId"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14917
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: ListSubEntitiesComponent, isStandalone: true, selector: "app-list-sub-entities", inputs: { staticDataConfiguration: "staticDataConfiguration", parentSubEntities: "parentSubEntities", position: "position", parentData: "parentData", parentContentType: "parentContentType", isViewMode: "isViewMode", isListMode: "isListMode", isEditMode: "isEditMode" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"row align-content-flex-start-top\">\n\n <ng-container *ngFor=\"let subEntity of blocks\">\n <div *ngIf=\"!$any(subEntity).subEntities\"\n class=\"col-sm-12 mb-10\"\n [ngClass]=\"['col-lg-' + ( $any(subEntity).options?.viewSettings?.viewMode?.cols || '12' )]\">\n <div class=\"static-data-view-block\">\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"$any(subEntity).subEntitiesType === 'static-data'\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <ng-container *ngIf=\"parentData?.id\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [viewMode]=\"true\"\n [contentType]=\"$any(subEntity).entity\"\n [customTitle]=\"$any(subEntity).title\"\n [filteringQuery]=\"$any(subEntity).getFilteringQuery(parentData)\"\n [parentSection]=\"parentContentType\"\n [parentItemId]=\"parentData?.id\"\n [parentSectionHashtag]=\"$any(subEntity).hashTag\"\n [parentData]=\"parentData\"\n [autoCompleteFields]=\"$any(subEntity).autoCompleteFields\"\n [subEntity]=\"$any(subEntity)\"\n [icon]=\"$any(subEntity).titleIcon\"\n ></app-static-data-list-items>\n </ng-container>\n <shared-spinner *ngIf=\"!parentData?.id\"\n [overlay]=\"true\"></shared-spinner>\n @if (!parentData?.id) {\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!$any(subEntity).entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"$any(subEntity).emptyTitle\">\n {{ $any(subEntity).emptyTitle }}\n </ng-container>\n </div>\n }\n </mat-card>\n </ng-container>\n\n @if ($any(subEntity)?.subEntitiesType === 'component') {\n <ng-container *ngComponentOutlet=\"\n $any(subEntity).component;\n injector: componentDataInjector;\n \"/>\n }\n </div>\n </div>\n </div>\n <div *ngIf=\"$any(subEntity).subEntities\" class=\"row align-content-flex-start col-sm-12\"\n [ngClass]=\"['col-lg-' + ( $any(subEntity).options?.group?.cols || '12' )]\">\n <ng-container *ngFor=\"let subEntity2 of $any(subEntity).subEntities\">\n <div *ngIf=\"!$any(subEntity2).subEntities\"\n class=\"col-sm-12 mb-10\"\n [ngClass]=\"['col-lg-' + ( $any(subEntity2).options?.viewSettings?.viewMode?.cols || '12' )]\">\n <div class=\"static-data-view-block\">\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"$any(subEntity2).subEntitiesType === 'static-data'\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <ng-container *ngIf=\"parentData?.id\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [viewMode]=\"true\"\n [contentType]=\"$any(subEntity2).entity\"\n [customTitle]=\"$any(subEntity2).title\"\n [filteringQuery]=\"$any(subEntity2).getFilteringQuery(parentData)\"\n [parentSection]=\"parentContentType\"\n [parentItemId]=\"parentData?.id\"\n [parentSectionHashtag]=\"$any(subEntity2).hashTag\"\n [parentData]=\"parentData\"\n [autoCompleteFields]=\"$any(subEntity2).autoCompleteFields\"\n [subEntity]=\"$any(subEntity2)\"\n [icon]=\"$any(subEntity2).titleIcon\"\n ></app-static-data-list-items>\n </ng-container>\n <shared-spinner *ngIf=\"!parentData?.id\"\n [overlay]=\"true\"></shared-spinner>\n @if (!parentData?.id) {\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!$any(subEntity2).entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"$any(subEntity2).emptyTitle\">\n {{ $any(subEntity2).emptyTitle }}\n </ng-container>\n </div>\n }\n </mat-card>\n </ng-container>\n\n @if ($any(subEntity2)?.subEntitiesType === 'component') {\n <ng-container *ngComponentOutlet=\"\n $any(subEntity2).component;\n injector: componentDataInjector;\n \"/>\n }\n </div>\n </div>\n\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:#485860a6;height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}.languages{display:flex;justify-content:center;margin:5px 0 10px}.languages .language-item .activeLang{background:#007bff;color:#fff}.center-block-header-title{margin-top:25px;font-size:20px}.mat-grid-tile-content{overflow:auto!important}.mat-grid-tile mat-card{width:100%}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: SharedSpinnerModule }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: ["mode", "selectIsRequired", "staticDataConfiguration", "viewMode", "contentType", "customTitle", "addTitle", "icon", "parentSection", "parentItemId", "showPanelHeader", "parentData", "parentSectionHashtag", "autoCompleteFields", "filteringQuery", "subEntity", "leftBlockFilterParamData", "defaultLanguageId"], outputs: ["selectingItem"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14266
14918
|
}
|
|
14267
14919
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ListSubEntitiesComponent, decorators: [{
|
|
14268
14920
|
type: Component,
|
|
@@ -14297,9 +14949,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
14297
14949
|
* @title Data table with sorting, pagination, and filtering.
|
|
14298
14950
|
*/
|
|
14299
14951
|
class StaticDataListComponent {
|
|
14300
|
-
constructor(activatedRoute, matIconReg) {
|
|
14952
|
+
constructor(activatedRoute, matIconReg, config) {
|
|
14301
14953
|
this.activatedRoute = activatedRoute;
|
|
14302
14954
|
this.matIconReg = matIconReg;
|
|
14955
|
+
this.config = config;
|
|
14956
|
+
this.mode = StaticDataListComponentModes.inline; // inline, modal
|
|
14957
|
+
this.selectIsRequired = false;
|
|
14958
|
+
this.selectingItem = new EventEmitter();
|
|
14303
14959
|
this.destroy$ = new Subject();
|
|
14304
14960
|
}
|
|
14305
14961
|
async ngOnInit() {
|
|
@@ -14314,28 +14970,55 @@ class StaticDataListComponent {
|
|
|
14314
14970
|
handleFilterData(data) {
|
|
14315
14971
|
this.filterData = data;
|
|
14316
14972
|
}
|
|
14973
|
+
selectingItemHandler(data) {
|
|
14974
|
+
this.selectingItem.emit(data);
|
|
14975
|
+
}
|
|
14317
14976
|
loadStaticDataConfiguration() {
|
|
14318
|
-
this.
|
|
14319
|
-
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14977
|
+
if (!this.config?.staticDataMapping) {
|
|
14978
|
+
throw new Error('[ static-data-list,component ]staticDataMapping is deprecated. Please use staticDataConfigurationInput instead.');
|
|
14979
|
+
}
|
|
14980
|
+
this.staticDataConfiguration = this.config?.staticDataMapping;
|
|
14981
|
+
const languageList = []; //staticDataConfiguration?.languages;
|
|
14982
|
+
this.defaultLanguageId = languageList?.find(item => item.default)?.id;
|
|
14983
|
+
/* if (!this.contentType) {
|
|
14984
|
+
this.activatedRoute.data
|
|
14985
|
+
.pipe(
|
|
14986
|
+
takeUntil(this.destroy$)
|
|
14987
|
+
)
|
|
14988
|
+
.subscribe(staticDataConfiguration => {
|
|
14989
|
+
this.staticDataConfiguration = staticDataConfiguration?.configuration;
|
|
14990
|
+
const languageList = staticDataConfiguration?.languages;
|
|
14991
|
+
this.defaultLanguageId = languageList?.find(item => item.default)?.id;
|
|
14992
|
+
});
|
|
14993
|
+
} else {
|
|
14994
|
+
this.staticDataConfiguration = this.staticDataConfigurationInput;
|
|
14995
|
+
}*/
|
|
14325
14996
|
}
|
|
14326
14997
|
loadContentType() {
|
|
14327
|
-
this.contentType
|
|
14328
|
-
.
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14998
|
+
if (!this.contentType) {
|
|
14999
|
+
this.contentType$ = this.activatedRoute.url
|
|
15000
|
+
.pipe(map((params) => {
|
|
15001
|
+
const contentType = params?.[0].path;
|
|
15002
|
+
this.filteringData = {
|
|
15003
|
+
filteringConfig: this.staticDataConfiguration[contentType]?.options?.filtering,
|
|
15004
|
+
sectionFields: this.staticDataConfiguration[contentType]?.fields
|
|
15005
|
+
};
|
|
15006
|
+
return contentType;
|
|
15007
|
+
}));
|
|
15008
|
+
}
|
|
15009
|
+
else {
|
|
15010
|
+
this.contentType$ = new Observable(observer => {
|
|
15011
|
+
this.filteringData = {
|
|
15012
|
+
filteringConfig: this.staticDataConfiguration[this.contentType]?.options?.filtering,
|
|
15013
|
+
sectionFields: this.staticDataConfiguration[this.contentType]?.fields
|
|
15014
|
+
};
|
|
15015
|
+
observer.next(this.contentType);
|
|
15016
|
+
observer.complete();
|
|
15017
|
+
});
|
|
15018
|
+
}
|
|
14336
15019
|
}
|
|
14337
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataListComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i2$1.MatIconRegistry }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14338
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataListComponent, isStandalone: true, selector: "app-static-data-list", ngImport: i0, template: "<ng-container *ngIf=\"contentType$ | async as contentType\">\n <app-list-sub-entities\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [parentSubEntities]=\"staticDataConfiguration[contentType]?.options?.subEntities\"\n [position]=\"'top'\"\n [isListMode]=\"true\"\n ></app-list-sub-entities>\n <div class=\"row mb-20\">\n <div *ngIf=\"staticDataConfiguration[contentType]?.options?.filteringType === 'left-block'\" class=\"col-2\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none p-10\"\n >\n <app-filtering-form [modalView]=\"false\"\n [contentType]=\"contentType\"\n [data]=\"filteringData\"\n (filterData)=\"handleFilterData($event)\"></app-filtering-form>\n </mat-card>\n </div>\n <div class=\"col-10\" [ngClass]=\"{\n 'col-10': staticDataConfiguration[contentType]?.options?.filteringType === 'left-block',\n 'col-12': staticDataConfiguration[contentType]?.options?.filteringType === 'modal'\n }\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <app-static-data-list-items\n [defaultLanguageId]=\"defaultLanguageId\"\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"contentType\"\n [showPanelHeader]=\"true\"\n [leftBlockFilterParamData]=\"filterData\"></app-static-data-list-items>\n </mat-card>\n </div>\n </div>\n</ng-container>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.top-bar .search-block{display:flex;align-content:center;align-items:center}.top-bar .search-block .search-input{background-color:#adcde8!important;padding:11px 10px!important}.top-bar .search-block .cancel-button{width:64px;height:40px}\n"], dependencies: [{ kind: "component", type: ListSubEntitiesComponent, selector: "app-list-sub-entities", inputs: ["staticDataConfiguration", "parentSubEntities", "position", "parentData", "parentContentType", "isViewMode", "isListMode", "isEditMode"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: FilteringFormComponent, selector: "app-filtering-form", inputs: ["contentType", "data", "modalView"], outputs: ["filterData", "close"] }, { kind: "component", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: ["staticDataConfiguration", "viewMode", "contentType", "customTitle", "addTitle", "icon", "parentSection", "parentItemId", "showPanelHeader", "parentData", "parentSectionHashtag", "autoCompleteFields", "filteringQuery", "subEntity", "leftBlockFilterParamData", "defaultLanguageId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15020
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataListComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i2$1.MatIconRegistry }, { token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15021
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataListComponent, isStandalone: true, selector: "app-static-data-list", inputs: { mode: "mode", contentType: "contentType", selectIsRequired: "selectIsRequired" }, outputs: { selectingItem: "selectingItem" }, ngImport: i0, template: "<ng-container *ngIf=\"contentType$ | async as contentType\">\n <app-list-sub-entities\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [parentSubEntities]=\"staticDataConfiguration[contentType]?.options?.subEntities\"\n [position]=\"'top'\"\n [isListMode]=\"true\"\n ></app-list-sub-entities>\n <div class=\"row mb-20\">\n <div *ngIf=\"staticDataConfiguration[contentType]?.options?.filteringType === 'left-block'\" class=\"col-2\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none p-10\"\n >\n <app-filtering-form [modalView]=\"false\"\n [contentType]=\"contentType\"\n [data]=\"filteringData\"\n (filterData)=\"handleFilterData($event)\"></app-filtering-form>\n </mat-card>\n </div>\n <div class=\"col-10\" [ngClass]=\"{\n 'col-10': staticDataConfiguration[contentType]?.options?.filteringType === 'left-block',\n 'col-12': staticDataConfiguration[contentType]?.options?.filteringType === 'modal'\n }\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <app-static-data-list-items\n [mode]=\"mode\"\n [selectIsRequired]=\"selectIsRequired\"\n [defaultLanguageId]=\"defaultLanguageId\"\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"contentType\"\n [showPanelHeader]=\"true\"\n [leftBlockFilterParamData]=\"filterData\"\n (selectingItem)=\"selectingItemHandler($event)\"></app-static-data-list-items>\n </mat-card>\n </div>\n </div>\n</ng-container>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.top-bar .search-block{display:flex;align-content:center;align-items:center}.top-bar .search-block .search-input{background-color:#adcde8!important;padding:11px 10px!important}.top-bar .search-block .cancel-button{width:64px;height:40px}\n"], dependencies: [{ kind: "component", type: ListSubEntitiesComponent, selector: "app-list-sub-entities", inputs: ["staticDataConfiguration", "parentSubEntities", "position", "parentData", "parentContentType", "isViewMode", "isListMode", "isEditMode"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: FilteringFormComponent, selector: "app-filtering-form", inputs: ["contentType", "data", "modalView"], outputs: ["filterData", "close"] }, { kind: "component", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: ["mode", "selectIsRequired", "staticDataConfiguration", "viewMode", "contentType", "customTitle", "addTitle", "icon", "parentSection", "parentItemId", "showPanelHeader", "parentData", "parentSectionHashtag", "autoCompleteFields", "filteringQuery", "subEntity", "leftBlockFilterParamData", "defaultLanguageId"], outputs: ["selectingItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14339
15022
|
}
|
|
14340
15023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataListComponent, decorators: [{
|
|
14341
15024
|
type: Component,
|
|
@@ -14347,11 +15030,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
14347
15030
|
AsyncPipe,
|
|
14348
15031
|
FilteringFormComponent,
|
|
14349
15032
|
StaticDataListItemsComponent
|
|
14350
|
-
], template: "<ng-container *ngIf=\"contentType$ | async as contentType\">\n <app-list-sub-entities\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [parentSubEntities]=\"staticDataConfiguration[contentType]?.options?.subEntities\"\n [position]=\"'top'\"\n [isListMode]=\"true\"\n ></app-list-sub-entities>\n <div class=\"row mb-20\">\n <div *ngIf=\"staticDataConfiguration[contentType]?.options?.filteringType === 'left-block'\" class=\"col-2\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none p-10\"\n >\n <app-filtering-form [modalView]=\"false\"\n [contentType]=\"contentType\"\n [data]=\"filteringData\"\n (filterData)=\"handleFilterData($event)\"></app-filtering-form>\n </mat-card>\n </div>\n <div class=\"col-10\" [ngClass]=\"{\n 'col-10': staticDataConfiguration[contentType]?.options?.filteringType === 'left-block',\n 'col-12': staticDataConfiguration[contentType]?.options?.filteringType === 'modal'\n }\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <app-static-data-list-items\n [defaultLanguageId]=\"defaultLanguageId\"\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"contentType\"\n [showPanelHeader]=\"true\"\n [leftBlockFilterParamData]=\"filterData\"></app-static-data-list-items>\n </mat-card>\n </div>\n </div>\n</ng-container>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.top-bar .search-block{display:flex;align-content:center;align-items:center}.top-bar .search-block .search-input{background-color:#adcde8!important;padding:11px 10px!important}.top-bar .search-block .cancel-button{width:64px;height:40px}\n"] }]
|
|
14351
|
-
}], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: i2$1.MatIconRegistry }
|
|
15033
|
+
], template: "<ng-container *ngIf=\"contentType$ | async as contentType\">\n <app-list-sub-entities\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [parentSubEntities]=\"staticDataConfiguration[contentType]?.options?.subEntities\"\n [position]=\"'top'\"\n [isListMode]=\"true\"\n ></app-list-sub-entities>\n <div class=\"row mb-20\">\n <div *ngIf=\"staticDataConfiguration[contentType]?.options?.filteringType === 'left-block'\" class=\"col-2\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none p-10\"\n >\n <app-filtering-form [modalView]=\"false\"\n [contentType]=\"contentType\"\n [data]=\"filteringData\"\n (filterData)=\"handleFilterData($event)\"></app-filtering-form>\n </mat-card>\n </div>\n <div class=\"col-10\" [ngClass]=\"{\n 'col-10': staticDataConfiguration[contentType]?.options?.filteringType === 'left-block',\n 'col-12': staticDataConfiguration[contentType]?.options?.filteringType === 'modal'\n }\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <app-static-data-list-items\n [mode]=\"mode\"\n [selectIsRequired]=\"selectIsRequired\"\n [defaultLanguageId]=\"defaultLanguageId\"\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"contentType\"\n [showPanelHeader]=\"true\"\n [leftBlockFilterParamData]=\"filterData\"\n (selectingItem)=\"selectingItemHandler($event)\"></app-static-data-list-items>\n </mat-card>\n </div>\n </div>\n</ng-container>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.top-bar .search-block{display:flex;align-content:center;align-items:center}.top-bar .search-block .search-input{background-color:#adcde8!important;padding:11px 10px!important}.top-bar .search-block .cancel-button{width:64px;height:40px}\n"] }]
|
|
15034
|
+
}], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: i2$1.MatIconRegistry }, { type: undefined, decorators: [{
|
|
15035
|
+
type: Inject,
|
|
15036
|
+
args: [CORE_CONFIG]
|
|
15037
|
+
}] }], propDecorators: { mode: [{
|
|
15038
|
+
type: Input
|
|
15039
|
+
}], contentType: [{
|
|
15040
|
+
type: Input
|
|
15041
|
+
}], selectIsRequired: [{
|
|
15042
|
+
type: Input
|
|
15043
|
+
}], selectingItem: [{
|
|
15044
|
+
type: Output
|
|
15045
|
+
}] } });
|
|
14352
15046
|
|
|
14353
15047
|
class StaticDataViewComponent {
|
|
14354
|
-
constructor(router, route, routerFacade, staticDataFacade, rightService, dialog, coreFacade, actionsFacade, injector, matIconReg, authService) {
|
|
15048
|
+
constructor(router, route, routerFacade, staticDataFacade, rightService, dialog, coreFacade, actionsFacade, injector, matIconReg, authService, config) {
|
|
14355
15049
|
this.router = router;
|
|
14356
15050
|
this.route = route;
|
|
14357
15051
|
this.routerFacade = routerFacade;
|
|
@@ -14363,6 +15057,8 @@ class StaticDataViewComponent {
|
|
|
14363
15057
|
this.injector = injector;
|
|
14364
15058
|
this.matIconReg = matIconReg;
|
|
14365
15059
|
this.authService = authService;
|
|
15060
|
+
this.config = config;
|
|
15061
|
+
this.mode = StaticDataListComponentModes.inline;
|
|
14366
15062
|
this.data = {};
|
|
14367
15063
|
this.destroy$ = new Subject();
|
|
14368
15064
|
this.statusType = StaticDataMetaStatus$1;
|
|
@@ -14373,6 +15069,7 @@ class StaticDataViewComponent {
|
|
|
14373
15069
|
this.mainBlockClass = 'col-lg-12';
|
|
14374
15070
|
this.menuBlockClass = 'col-lg-3';
|
|
14375
15071
|
this.howError = false;
|
|
15072
|
+
this.StaticDataListComponentModes = StaticDataListComponentModes;
|
|
14376
15073
|
}
|
|
14377
15074
|
ngOnInit() {
|
|
14378
15075
|
this.matIconReg.setDefaultFontSetClass('material-symbols-outlined');
|
|
@@ -14431,9 +15128,11 @@ class StaticDataViewComponent {
|
|
|
14431
15128
|
else {
|
|
14432
15129
|
urlParameters.push(this.contentType);
|
|
14433
15130
|
}
|
|
14434
|
-
this.
|
|
14435
|
-
|
|
14436
|
-
|
|
15131
|
+
if (this.mode === StaticDataListComponentModes.inline) {
|
|
15132
|
+
this.routerFacade.goTo(urlParameters, {
|
|
15133
|
+
fragment: this.parentParentHashTag || null
|
|
15134
|
+
});
|
|
15135
|
+
}
|
|
14437
15136
|
}
|
|
14438
15137
|
deleteAction(item) {
|
|
14439
15138
|
const dialogRef = this.dialog.open(CommonDialogComponent, {
|
|
@@ -14456,14 +15155,20 @@ class StaticDataViewComponent {
|
|
|
14456
15155
|
});
|
|
14457
15156
|
}
|
|
14458
15157
|
loadStaticDataConfiguration() {
|
|
14459
|
-
this.route.data
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
15158
|
+
/* this.route.data
|
|
15159
|
+
.pipe(
|
|
15160
|
+
takeUntil(this.destroy$)
|
|
15161
|
+
)
|
|
15162
|
+
.subscribe(staticDataConfiguration => {
|
|
15163
|
+
this.staticDataConfiguration = staticDataConfiguration?.configuration;
|
|
15164
|
+
this.globalViewSettings = staticDataConfiguration?.viewSettings;
|
|
15165
|
+
this.languageList = staticDataConfiguration?.languages;
|
|
15166
|
+
this.defaultLanguageId = this.languageList?.find(item => item.default)?.id;
|
|
15167
|
+
});*/
|
|
15168
|
+
this.staticDataConfiguration = this.config?.staticDataMapping;
|
|
15169
|
+
this.globalViewSettings = undefined;
|
|
15170
|
+
this.languageList = []; // this.configurationInput?.languages;
|
|
15171
|
+
this.defaultLanguageId = this.languageList?.find(item => item.default)?.id;
|
|
14467
15172
|
}
|
|
14468
15173
|
subscribeToRoute() {
|
|
14469
15174
|
this.router.events
|
|
@@ -14477,21 +15182,33 @@ class StaticDataViewComponent {
|
|
|
14477
15182
|
});
|
|
14478
15183
|
}
|
|
14479
15184
|
init() {
|
|
14480
|
-
|
|
14481
|
-
this.
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
15185
|
+
let urlFragment;
|
|
15186
|
+
if (this.mode === StaticDataListComponentModes.inline) {
|
|
15187
|
+
this.itemId = this.dialogItemId || +this.route?.snapshot?.params?.id || null;
|
|
15188
|
+
this.currentLanguageId = +this.route?.snapshot?.params?.langId || null;
|
|
15189
|
+
this.parentSection = this.route?.snapshot?.queryParams?.parentSection;
|
|
15190
|
+
this.parentItemId = this.route?.snapshot?.queryParams?.parentItemId;
|
|
15191
|
+
this.parentParentHashTag = this.route?.snapshot?.queryParams?.parentHashTag;
|
|
15192
|
+
urlFragment = this.route?.snapshot?.fragment;
|
|
15193
|
+
this.contentType = this.dialogContentType || this.route?.snapshot?.params?.contentType;
|
|
15194
|
+
}
|
|
15195
|
+
else {
|
|
15196
|
+
this.itemId = this.dialogItemId;
|
|
15197
|
+
this.contentType = this.dialogContentType;
|
|
15198
|
+
}
|
|
14487
15199
|
if (!this.contentType || !this.itemId) {
|
|
14488
15200
|
this.howError = true;
|
|
14489
|
-
|
|
15201
|
+
throw new Error(`[ static-data-view.component ][ init ][ No content type or item id ]`);
|
|
14490
15202
|
}
|
|
14491
15203
|
this.staticSection = this.staticDataConfiguration[this.contentType];
|
|
15204
|
+
if (!this.staticSection) {
|
|
15205
|
+
throw new Error(`[ static-data-view.component ][ init ][ No static section for ${this.contentType} ]`);
|
|
15206
|
+
}
|
|
14492
15207
|
if (this.staticSection?.actions?.isNoViewAction) {
|
|
14493
|
-
console.error(`[ No view action for ${this.contentType} ]`);
|
|
14494
|
-
this.
|
|
15208
|
+
console.error(`[ static-data-view.component ][ init ][ No view action for ${this.contentType} ]`);
|
|
15209
|
+
if (this.mode === StaticDataListComponentModes.inline) {
|
|
15210
|
+
this.routerFacade.goTo(['/404']);
|
|
15211
|
+
}
|
|
14495
15212
|
return;
|
|
14496
15213
|
}
|
|
14497
15214
|
this.sectionFields = this.staticSection.fields;
|
|
@@ -14573,8 +15290,8 @@ class StaticDataViewComponent {
|
|
|
14573
15290
|
this.status$ = of({ value: this.statusType.LOADED });
|
|
14574
15291
|
}
|
|
14575
15292
|
}
|
|
14576
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataViewComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: RouterFacade }, { token: StaticDataFacade }, { token: RightService }, { token: i1$6.MatDialog }, { token: CoreFacade }, { token: ActionsFacade }, { token: i0.Injector }, { token: i2$1.MatIconRegistry }, { token: AuthenticationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14577
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataViewComponent, isStandalone: true, selector: "app-static-data-view", inputs: { dialogContentType: "dialogContentType", dialogItemId: "dialogItemId" }, ngImport: i0, template: "<ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div *ngIf=\"!howError\" class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"formData?.['name']\"
|
|
15293
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataViewComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: RouterFacade }, { token: StaticDataFacade }, { token: RightService }, { token: i1$6.MatDialog }, { token: CoreFacade }, { token: ActionsFacade }, { token: i0.Injector }, { token: i2$1.MatIconRegistry }, { token: AuthenticationService }, { token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15294
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataViewComponent, isStandalone: true, selector: "app-static-data-view", inputs: { mode: "mode", dialogContentType: "dialogContentType", dialogItemId: "dialogItemId" }, ngImport: i0, template: "<ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div *ngIf=\"!howError\" class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"mode !== StaticDataListComponentModes.modal && formData?.['name']\"\n [parentTitle]=\"staticSection.title\"\n [parentUrl]=\"['/static-data', contentType]\"\n [title]=\"formData?.['name']\">>\n </shared-panel-header>\n\n <div class=\"content p-24\">\n <div class=\"center-block\">\n <div class=\"center-block-header position-relative\">\n <h1 @appearFromLeftWithDelay class=\"center-block-header-title\">\n {{ formData?.['name'] }}\n </h1>\n </div>\n <div class=\"static-data-view-blocks\">\n <app-list-sub-entities\n *ngIf=\"staticData.value?.id\"\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [parentSubEntities]=\"blocks\"\n [position]=\"'top'\"\n [parentData]=\"staticData.value\"\n [parentContentType]=\"contentType\"\n [isViewMode]=\"true\"\n ></app-list-sub-entities>\n <div class=\"row mb-10\">\n <div [ngClass]=\"mainBlockClass\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <div class=\"center-block-inner\">\n <shared-auto-form-show\n *ngIf=\"status.value === statusType.LOADED\"\n class=\"mb-20\"\n [entity]=\"contentType\"\n [data]=\"staticData.value\"\n [entityId]=\"itemId\"\n [fields]=\"sectionFields\"\n [config]=\"{needToPublish: false}\"\n [entitySection]=\"staticSection\"\n ></shared-auto-form-show>\n\n <div *ngIf=\"itemId && additionalActions?.length\" class=\"global-actions\">\n <div *ngFor=\"let action of additionalActions\"\n (click)=\"actionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>\n <div @appearFromLeftWithDelay\n class=\"mt-20 text-center\">\n <shared-button\n *ngIf=\"mode !== StaticDataListComponentModes.modal\"\n id=\"back-to-list-button\"\n class=\"mr-8\"\n icon=\"chevron_left\"\n type=\"button\"\n styleTheme=\"raised\"\n color=\"basic\"\n iconColor=\"black\"\n (click)=\"goBack()\"\n >{{ parentSection ? '\u041D\u0430\u0437\u0430\u0434' : '\u041A \u0441\u043F\u0438\u0441\u043A\u0443' }}\n </shared-button>\n <!--<shared-button\n *ngIf=\"!staticSection?.actions?.isNoDeleteAction && userRights[3]\"\n id=\"delete-button\"\n [disabled]=\"!itemId\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n (click)=\"deleteAction(staticData.value)\"\n >\u0423\u0434\u0430\u043B\u0438\u0442\u044C\n </shared-button>-->\n <ng-container *ngIf=\"staticSection.options?.publicationInTelegramBot\">\n <shared-button\n icon=\"send\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n (click)=\"publishInTelegram()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 Telegram\n </shared-button>\n </ng-container>\n </div>\n </div>\n </mat-card>\n </div>\n <div *ngIf=\"menuItems?.length\" class=\"col-sm-12\" [class]=\"menuBlockClass\">\n <mat-card\n class=\"table-style-two border-radius d-block bg-white border-0 shadow-none\"\n >\n <div class=\"mb-1\" *ngFor=\"let subEntity of menuItems\">\n <shared-button\n *ngIf=\"userRights[0]\"\n class=\"mr-8\"\n type=\"submit\"\n [icon]=\"subEntity.titleIcon\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n >{{ subEntity.title }}\n </shared-button>\n </div>\n </mat-card>\n </div>\n </div>\n <app-list-sub-entities\n *ngIf=\"staticData.value?.id\"\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [parentSubEntities]=\"blocks\"\n [position]=\"'bottom'\"\n [parentData]=\"staticData.value\"\n [parentContentType]=\"contentType\"\n [isViewMode]=\"true\"\n ></app-list-sub-entities>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"howError\">\n \u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\n </div>\n <shared-spinner *ngIf=\"status.value !== statusType.LOADED\"\n [overlay]=\"true\"></shared-spinner>\n</ng-container>\n\n\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:#485860a6;height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}.languages{display:flex;justify-content:center;margin:5px 0 10px}.languages .language-item .activeLang{background:#007bff;color:#fff}.center-block-header-title{margin-top:25px;font-size:20px}.mat-grid-tile-content{overflow:auto!important}.mat-grid-tile mat-card{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: PanelHeaderModule }, { kind: "component", type: PanelHeaderComponent, selector: "shared-panel-header", inputs: ["title", "parentTitle", "parentUrl"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: ListSubEntitiesComponent, selector: "app-list-sub-entities", inputs: ["staticDataConfiguration", "parentSubEntities", "position", "parentData", "parentContentType", "isViewMode", "isListMode", "isEditMode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: AutoFormModule }, { kind: "component", type: AutoFormShowComponent, selector: "shared-auto-form-show", inputs: ["fields", "data", "entity", "entityId", "entitySection", "config"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "fullWidth", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: SharedSpinnerModule }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14578
15295
|
}
|
|
14579
15296
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataViewComponent, decorators: [{
|
|
14580
15297
|
type: Component,
|
|
@@ -14589,8 +15306,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
14589
15306
|
ButtonModule,
|
|
14590
15307
|
NgForOf,
|
|
14591
15308
|
SharedSpinnerModule
|
|
14592
|
-
], template: "<ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div *ngIf=\"!howError\" class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"formData?.['name']\"
|
|
14593
|
-
}], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: RouterFacade }, { type: StaticDataFacade }, { type: RightService }, { type: i1$6.MatDialog }, { type: CoreFacade }, { type: ActionsFacade }, { type: i0.Injector }, { type: i2$1.MatIconRegistry }, { type: AuthenticationService }
|
|
15309
|
+
], template: "<ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div *ngIf=\"!howError\" class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"mode !== StaticDataListComponentModes.modal && formData?.['name']\"\n [parentTitle]=\"staticSection.title\"\n [parentUrl]=\"['/static-data', contentType]\"\n [title]=\"formData?.['name']\">>\n </shared-panel-header>\n\n <div class=\"content p-24\">\n <div class=\"center-block\">\n <div class=\"center-block-header position-relative\">\n <h1 @appearFromLeftWithDelay class=\"center-block-header-title\">\n {{ formData?.['name'] }}\n </h1>\n </div>\n <div class=\"static-data-view-blocks\">\n <app-list-sub-entities\n *ngIf=\"staticData.value?.id\"\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [parentSubEntities]=\"blocks\"\n [position]=\"'top'\"\n [parentData]=\"staticData.value\"\n [parentContentType]=\"contentType\"\n [isViewMode]=\"true\"\n ></app-list-sub-entities>\n <div class=\"row mb-10\">\n <div [ngClass]=\"mainBlockClass\">\n <mat-card\n class=\"to-do-list-card table-style-two mb-25 border-radius d-block bg-white border-0 shadow-none\"\n >\n <div class=\"center-block-inner\">\n <shared-auto-form-show\n *ngIf=\"status.value === statusType.LOADED\"\n class=\"mb-20\"\n [entity]=\"contentType\"\n [data]=\"staticData.value\"\n [entityId]=\"itemId\"\n [fields]=\"sectionFields\"\n [config]=\"{needToPublish: false}\"\n [entitySection]=\"staticSection\"\n ></shared-auto-form-show>\n\n <div *ngIf=\"itemId && additionalActions?.length\" class=\"global-actions\">\n <div *ngFor=\"let action of additionalActions\"\n (click)=\"actionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>\n <div @appearFromLeftWithDelay\n class=\"mt-20 text-center\">\n <shared-button\n *ngIf=\"mode !== StaticDataListComponentModes.modal\"\n id=\"back-to-list-button\"\n class=\"mr-8\"\n icon=\"chevron_left\"\n type=\"button\"\n styleTheme=\"raised\"\n color=\"basic\"\n iconColor=\"black\"\n (click)=\"goBack()\"\n >{{ parentSection ? '\u041D\u0430\u0437\u0430\u0434' : '\u041A \u0441\u043F\u0438\u0441\u043A\u0443' }}\n </shared-button>\n <!--<shared-button\n *ngIf=\"!staticSection?.actions?.isNoDeleteAction && userRights[3]\"\n id=\"delete-button\"\n [disabled]=\"!itemId\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n (click)=\"deleteAction(staticData.value)\"\n >\u0423\u0434\u0430\u043B\u0438\u0442\u044C\n </shared-button>-->\n <ng-container *ngIf=\"staticSection.options?.publicationInTelegramBot\">\n <shared-button\n icon=\"send\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n (click)=\"publishInTelegram()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 Telegram\n </shared-button>\n </ng-container>\n </div>\n </div>\n </mat-card>\n </div>\n <div *ngIf=\"menuItems?.length\" class=\"col-sm-12\" [class]=\"menuBlockClass\">\n <mat-card\n class=\"table-style-two border-radius d-block bg-white border-0 shadow-none\"\n >\n <div class=\"mb-1\" *ngFor=\"let subEntity of menuItems\">\n <shared-button\n *ngIf=\"userRights[0]\"\n class=\"mr-8\"\n type=\"submit\"\n [icon]=\"subEntity.titleIcon\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n >{{ subEntity.title }}\n </shared-button>\n </div>\n </mat-card>\n </div>\n </div>\n <app-list-sub-entities\n *ngIf=\"staticData.value?.id\"\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [parentSubEntities]=\"blocks\"\n [position]=\"'bottom'\"\n [parentData]=\"staticData.value\"\n [parentContentType]=\"contentType\"\n [isViewMode]=\"true\"\n ></app-list-sub-entities>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"howError\">\n \u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\n </div>\n <shared-spinner *ngIf=\"status.value !== statusType.LOADED\"\n [overlay]=\"true\"></shared-spinner>\n</ng-container>\n\n\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:#485860a6;height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}.languages{display:flex;justify-content:center;margin:5px 0 10px}.languages .language-item .activeLang{background:#007bff;color:#fff}.center-block-header-title{margin-top:25px;font-size:20px}.mat-grid-tile-content{overflow:auto!important}.mat-grid-tile mat-card{width:100%}\n"] }]
|
|
15310
|
+
}], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: RouterFacade }, { type: StaticDataFacade }, { type: RightService }, { type: i1$6.MatDialog }, { type: CoreFacade }, { type: ActionsFacade }, { type: i0.Injector }, { type: i2$1.MatIconRegistry }, { type: AuthenticationService }, { type: undefined, decorators: [{
|
|
15311
|
+
type: Inject,
|
|
15312
|
+
args: [CORE_CONFIG]
|
|
15313
|
+
}] }], propDecorators: { mode: [{
|
|
15314
|
+
type: Input
|
|
15315
|
+
}], dialogContentType: [{
|
|
14594
15316
|
type: Input
|
|
14595
15317
|
}], dialogItemId: [{
|
|
14596
15318
|
type: Input
|
|
@@ -14713,6 +15435,133 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
14713
15435
|
type: Injectable
|
|
14714
15436
|
}] });
|
|
14715
15437
|
|
|
15438
|
+
class StaticDataCreateNewDialogComponent {
|
|
15439
|
+
constructor(data) {
|
|
15440
|
+
this.data = data;
|
|
15441
|
+
this.dialogRef = inject((MatDialogRef));
|
|
15442
|
+
}
|
|
15443
|
+
ngOnInit() {
|
|
15444
|
+
}
|
|
15445
|
+
onNoClick() {
|
|
15446
|
+
this.dialogRef.close({ status: false });
|
|
15447
|
+
}
|
|
15448
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataCreateNewDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15449
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataCreateNewDialogComponent, isStandalone: true, selector: "app-static-data-create-new-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\">\n 1111\n<!--\n@appearFromRightWithDelay\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>-->\n\n<!-- <div mat-dialog-content>\n <shared-auto-form-show\n *ngIf=\"isShowAutoFormShow\"\n class=\"mb-20\"\n [entity]=\"contentType\"\n [data]=\"itemData\"\n [entityId]=\"itemId\"\n [fields]=\"sectionFields\"\n [config]=\"{needToPublish: false}\"\n [entitySection]=\"staticSection\"\n ></shared-auto-form-show>\n </div>-->\n</div>\n\n\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: AutoFormModule }], animations: [appearFromRightWithDelay], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15450
|
+
}
|
|
15451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataCreateNewDialogComponent, decorators: [{
|
|
15452
|
+
type: Component,
|
|
15453
|
+
args: [{ selector: 'app-static-data-create-new-dialog', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromRightWithDelay], imports: [
|
|
15454
|
+
ButtonModule,
|
|
15455
|
+
ReactiveFormsModule,
|
|
15456
|
+
MatIconModule,
|
|
15457
|
+
MatDialogModule,
|
|
15458
|
+
AutoFormModule
|
|
15459
|
+
], template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\">\n 1111\n<!--\n@appearFromRightWithDelay\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>-->\n\n<!-- <div mat-dialog-content>\n <shared-auto-form-show\n *ngIf=\"isShowAutoFormShow\"\n class=\"mb-20\"\n [entity]=\"contentType\"\n [data]=\"itemData\"\n [entityId]=\"itemId\"\n [fields]=\"sectionFields\"\n [config]=\"{needToPublish: false}\"\n [entitySection]=\"staticSection\"\n ></shared-auto-form-show>\n </div>-->\n</div>\n\n\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"] }]
|
|
15460
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
15461
|
+
type: Inject,
|
|
15462
|
+
args: [MAT_DIALOG_DATA]
|
|
15463
|
+
}] }] });
|
|
15464
|
+
|
|
15465
|
+
class StaticDataCreateNewDynamicFormDialogComponent {
|
|
15466
|
+
constructor(data) {
|
|
15467
|
+
this.data = data;
|
|
15468
|
+
this.dialogRef = inject((MatDialogRef));
|
|
15469
|
+
this.dynamicFormsEntity = 'dynamic-forms';
|
|
15470
|
+
this.StaticDataListComponentModes = StaticDataListComponentModes;
|
|
15471
|
+
}
|
|
15472
|
+
ngOnInit() {
|
|
15473
|
+
}
|
|
15474
|
+
onNoClick() {
|
|
15475
|
+
this.dialogRef.close({ status: false });
|
|
15476
|
+
}
|
|
15477
|
+
onSelectItem(data) {
|
|
15478
|
+
this.dialogRef.close(data);
|
|
15479
|
+
}
|
|
15480
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataCreateNewDynamicFormDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15481
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataCreateNewDynamicFormDialogComponent, isStandalone: true, selector: "app-static-data-create-new-dynamic-form-dialog", ngImport: i0, template: "<div @appearFromRightWithDelay class=\"text-center position-relative p-10 modal-style-info modal-size-middle\">\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n <app-static-data-list\n [selectIsRequired]=\"true\"\n [mode]=\"StaticDataListComponentModes.modal\"\n [contentType]=\"dynamicFormsEntity\"\n (selectingItem)=\"onSelectItem($event)\"\n ></app-static-data-list>\n</div>\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: AutoFormModule }, { kind: "component", type: StaticDataListComponent, selector: "app-static-data-list", inputs: ["mode", "contentType", "selectIsRequired"], outputs: ["selectingItem"] }], animations: [appearFromRightWithDelay], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15482
|
+
}
|
|
15483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataCreateNewDynamicFormDialogComponent, decorators: [{
|
|
15484
|
+
type: Component,
|
|
15485
|
+
args: [{ selector: 'app-static-data-create-new-dynamic-form-dialog', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromRightWithDelay], imports: [
|
|
15486
|
+
ButtonModule,
|
|
15487
|
+
ReactiveFormsModule,
|
|
15488
|
+
MatIconModule,
|
|
15489
|
+
MatDialogModule,
|
|
15490
|
+
AutoFormModule,
|
|
15491
|
+
StaticDataListComponent
|
|
15492
|
+
], template: "<div @appearFromRightWithDelay class=\"text-center position-relative p-10 modal-style-info modal-size-middle\">\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n <app-static-data-list\n [selectIsRequired]=\"true\"\n [mode]=\"StaticDataListComponentModes.modal\"\n [contentType]=\"dynamicFormsEntity\"\n (selectingItem)=\"onSelectItem($event)\"\n ></app-static-data-list>\n</div>\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"] }]
|
|
15493
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
15494
|
+
type: Inject,
|
|
15495
|
+
args: [MAT_DIALOG_DATA]
|
|
15496
|
+
}] }] });
|
|
15497
|
+
|
|
15498
|
+
class StaticDataCreateNewItemDialogComponent {
|
|
15499
|
+
constructor(data) {
|
|
15500
|
+
this.data = data;
|
|
15501
|
+
this.dialogRef = inject((MatDialogRef));
|
|
15502
|
+
this.StaticDataListComponentModes = StaticDataListComponentModes;
|
|
15503
|
+
}
|
|
15504
|
+
ngOnInit() {
|
|
15505
|
+
}
|
|
15506
|
+
closePopupHandel() {
|
|
15507
|
+
this.dialogRef.close({ status: true });
|
|
15508
|
+
}
|
|
15509
|
+
onNoClick() {
|
|
15510
|
+
this.dialogRef.close({ status: false });
|
|
15511
|
+
}
|
|
15512
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataCreateNewItemDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15513
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: StaticDataCreateNewItemDialogComponent, isStandalone: true, selector: "app-static-data-create-new-item-dialog", ngImport: i0, template: "<div @appearFromRightWithDelay class=\"text-center position-relative p-10 modal-style-info modal-size-middle\">\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n\n <div mat-dialog-content>\n <app-static-data-details\n [entityInput]=\"data.entity\"\n [entityIdInput]=\"data.entityId\"\n [mode]=\"StaticDataListComponentModes.modal\"\n [autoCompleteFields]=\"data.autoCompleteFields\"\n (closePopup)=\"closePopupHandel()\"\n >\n </app-static-data-details>\n </div>\n</div>\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$6.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: SharedSpinnerModule }, { kind: "component", type: StaticDataDetailsComponent, selector: "app-static-data-details", inputs: ["dynamicFormKey", "entityInput", "entityIdInput", "autoCompleteFields", "mode"], outputs: ["closePopup"] }], animations: [appearFromRightWithDelay], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15514
|
+
}
|
|
15515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataCreateNewItemDialogComponent, decorators: [{
|
|
15516
|
+
type: Component,
|
|
15517
|
+
args: [{ selector: 'app-static-data-create-new-item-dialog', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromRightWithDelay], imports: [
|
|
15518
|
+
ButtonModule,
|
|
15519
|
+
ReactiveFormsModule,
|
|
15520
|
+
MatIconModule,
|
|
15521
|
+
MatDialogModule,
|
|
15522
|
+
SharedSpinnerModule,
|
|
15523
|
+
StaticDataDetailsComponent
|
|
15524
|
+
], template: "<div @appearFromRightWithDelay class=\"text-center position-relative p-10 modal-style-info modal-size-middle\">\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n\n <div mat-dialog-content>\n <app-static-data-details\n [entityInput]=\"data.entity\"\n [entityIdInput]=\"data.entityId\"\n [mode]=\"StaticDataListComponentModes.modal\"\n [autoCompleteFields]=\"data.autoCompleteFields\"\n (closePopup)=\"closePopupHandel()\"\n >\n </app-static-data-details>\n </div>\n</div>\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"] }]
|
|
15525
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
15526
|
+
type: Inject,
|
|
15527
|
+
args: [MAT_DIALOG_DATA]
|
|
15528
|
+
}] }] });
|
|
15529
|
+
|
|
15530
|
+
class ViewStaticDataDetailsDialogComponent {
|
|
15531
|
+
constructor(data) {
|
|
15532
|
+
this.data = data;
|
|
15533
|
+
this.isShowAutoFormShow = false;
|
|
15534
|
+
this.dialogRef = inject((MatDialogRef));
|
|
15535
|
+
this.StaticDataListComponentModes = StaticDataListComponentModes;
|
|
15536
|
+
}
|
|
15537
|
+
ngOnInit() {
|
|
15538
|
+
if (this.data) {
|
|
15539
|
+
this.isShowAutoFormShow = true;
|
|
15540
|
+
this.contentType = this.data.contentType;
|
|
15541
|
+
this.itemData = this.data.itemData;
|
|
15542
|
+
this.itemId = this.data.itemId;
|
|
15543
|
+
}
|
|
15544
|
+
}
|
|
15545
|
+
onNoClick() {
|
|
15546
|
+
this.dialogRef.close({ status: false });
|
|
15547
|
+
}
|
|
15548
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ViewStaticDataDetailsDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15549
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ViewStaticDataDetailsDialogComponent, isStandalone: true, selector: "app-view-static-data-details-dialog", ngImport: i0, template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\"\n @appearFromRightWithDelay>\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n\n <div mat-dialog-content>\n <app-static-data-view\n [dialogContentType]=\"contentType\"\n [dialogItemId]=\"itemId\"\n [mode]=\"StaticDataListComponentModes.modal\">\n </app-static-data-view>\n<!-- <shared-auto-form-show\n *ngIf=\"isShowAutoFormShow\"\n class=\"mb-20\"\n [entity]=\"contentType\"\n [data]=\"itemData\"\n [entityId]=\"itemId\"\n [fields]=\"sectionFields\"\n [config]=\"{needToPublish: false}\"\n [entitySection]=\"staticSection\"\n ></shared-auto-form-show>-->\n </div>\n</div>\n\n\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$6.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: StaticDataViewComponent, selector: "app-static-data-view", inputs: ["mode", "dialogContentType", "dialogItemId"] }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15550
|
+
}
|
|
15551
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ViewStaticDataDetailsDialogComponent, decorators: [{
|
|
15552
|
+
type: Component,
|
|
15553
|
+
args: [{ selector: 'app-view-static-data-details-dialog', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], imports: [
|
|
15554
|
+
ButtonModule,
|
|
15555
|
+
ReactiveFormsModule,
|
|
15556
|
+
MatIconModule,
|
|
15557
|
+
MatDialogModule,
|
|
15558
|
+
StaticDataViewComponent,
|
|
15559
|
+
], template: "<div class=\"text-center position-relative p-10 modal-style-info modal-size-middle\"\n @appearFromRightWithDelay>\n <div\n class=\"modal-close-button\"\n (click)=\"onNoClick()\">\n <mat-icon>close</mat-icon>\n </div>\n\n <div mat-dialog-content>\n <app-static-data-view\n [dialogContentType]=\"contentType\"\n [dialogItemId]=\"itemId\"\n [mode]=\"StaticDataListComponentModes.modal\">\n </app-static-data-view>\n<!-- <shared-auto-form-show\n *ngIf=\"isShowAutoFormShow\"\n class=\"mb-20\"\n [entity]=\"contentType\"\n [data]=\"itemData\"\n [entityId]=\"itemId\"\n [fields]=\"sectionFields\"\n [config]=\"{needToPublish: false}\"\n [entitySection]=\"staticSection\"\n ></shared-auto-form-show>-->\n </div>\n</div>\n\n\n\n", styles: [".size-big{width:800px}.size-middle{width:600px}.size-small{width:300px}.style-success,.style-error,.style-info{padding:24px}.style-info{border-left:5px solid #fcb202;background:linear-gradient(15deg,#fcb20287,#fcb20208)}.close-button{right:0;margin:-9px 10px 0 0;position:absolute;cursor:pointer;font-size:16px;font-weight:700}\n"] }]
|
|
15560
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
15561
|
+
type: Inject,
|
|
15562
|
+
args: [MAT_DIALOG_DATA]
|
|
15563
|
+
}] }] });
|
|
15564
|
+
|
|
14716
15565
|
class StaticDataModule {
|
|
14717
15566
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StaticDataModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
14718
15567
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: StaticDataModule, imports: [CommonModule,
|
|
@@ -14765,7 +15614,11 @@ class StaticDataModule {
|
|
|
14765
15614
|
DialogService,
|
|
14766
15615
|
StaticDataComponentInputData,
|
|
14767
15616
|
provideNgxMask(),
|
|
14768
|
-
{ provide: MatPaginatorIntl, useClass: CustomPaginatorIntl }
|
|
15617
|
+
{ provide: MatPaginatorIntl, useClass: CustomPaginatorIntl },
|
|
15618
|
+
{ provide: STATIC_DATA_CREATE_NEW_DIALOG, useValue: StaticDataCreateNewDialogComponent },
|
|
15619
|
+
{ provide: STATIC_DATA_CREATE_NEW_DYNAMIC_FORM_DIALOG, useValue: StaticDataCreateNewDynamicFormDialogComponent },
|
|
15620
|
+
{ provide: STATIC_DATA_CREATE_NEW_ITEM_DIALOG, useValue: StaticDataCreateNewItemDialogComponent },
|
|
15621
|
+
{ provide: STATIC_DATA_VIEW_ITEM_DIALOG, useValue: ViewStaticDataDetailsDialogComponent }
|
|
14769
15622
|
], imports: [CommonModule,
|
|
14770
15623
|
AutoFormModule,
|
|
14771
15624
|
StaticDataRoutingModule,
|
|
@@ -14861,7 +15714,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
14861
15714
|
DialogService,
|
|
14862
15715
|
StaticDataComponentInputData,
|
|
14863
15716
|
provideNgxMask(),
|
|
14864
|
-
{ provide: MatPaginatorIntl, useClass: CustomPaginatorIntl }
|
|
15717
|
+
{ provide: MatPaginatorIntl, useClass: CustomPaginatorIntl },
|
|
15718
|
+
{ provide: STATIC_DATA_CREATE_NEW_DIALOG, useValue: StaticDataCreateNewDialogComponent },
|
|
15719
|
+
{ provide: STATIC_DATA_CREATE_NEW_DYNAMIC_FORM_DIALOG, useValue: StaticDataCreateNewDynamicFormDialogComponent },
|
|
15720
|
+
{ provide: STATIC_DATA_CREATE_NEW_ITEM_DIALOG, useValue: StaticDataCreateNewItemDialogComponent },
|
|
15721
|
+
{ provide: STATIC_DATA_VIEW_ITEM_DIALOG, useValue: ViewStaticDataDetailsDialogComponent }
|
|
14865
15722
|
]
|
|
14866
15723
|
}]
|
|
14867
15724
|
}] });
|
|
@@ -16175,7 +17032,7 @@ class HeadersInterceptor {
|
|
|
16175
17032
|
reSendQuery(request, next, currentUserToken) {
|
|
16176
17033
|
return this.usersFacade.getUser$
|
|
16177
17034
|
.pipe(filter(item => item?.loaded && !!item.token), filter(item => item.token !== currentUserToken), distinctUntilChanged((prev, curr) => prev.token === curr.token), take(1), switchMap$2((userData) => {
|
|
16178
|
-
console.
|
|
17035
|
+
console.info('[ reSendQuery ][ data ]', 'newToken:', userData.token, 'old:', currentUserToken);
|
|
16179
17036
|
const newRequest = request.clone({ headers: request.headers.set('Authorization', `JWT ${userData.token}`) });
|
|
16180
17037
|
return next.handle(newRequest);
|
|
16181
17038
|
}));
|
|
@@ -16224,5 +17081,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
16224
17081
|
* Generated bundle index. Do not edit.
|
|
16225
17082
|
*/
|
|
16226
17083
|
|
|
16227
|
-
export { AccessDeniedComponent, AccessDeniedModule, ActionsEndpointTypes, ActionsFacade, ActionsMetaStatus, ActionsModel, ActionsSendRequest, ActionsService, AsyncValidators, AsyncValidatorsMessages, AsyncValidatorsType, AuthEndpointTypes, AuthenticationService, AutoFormMainComponent, AutoFormModule, AutoFormService, AutoFormShowComponent, Back, BaseAPI, BaseAPIService, BaseAutoFormService, BaseErrors, BaseModelAdapter, BaseResponseFactory, BreadCrumbsComponent, BreadCrumbsModule, ButtonComponent, ButtonModule, CORE_CONFIG, CacheDataEndpointTypes, CacheDataFacade, CacheDataModel, CacheDataService, ChipsInputComponent, ChipsInputModule, ClearStaticData, CommonDialogComponent, CookiesService, CoreFacade, CoreLoadError, CoreLoaded, CountFormatPipe, CreateRequestListener, CreateRequestListenerByFormId, DateFormatPipe, DeleteComponent, DeleteRequest, DeleteRequestData, DeleteRequestListenerByFormId, DeleteRequestWaiter, DialogService, DialogsModule, EntitiesReportsRequest, Entity, EntityQueryFieldNames, EntitySortType, EntityType, FieldType, FileFieldNames, FileModel, FileUpdateModel, FilesDeleteRequest, FilesDeleteResponseFactory, FilesEndpointTypes, FilesFacade, FilesLoadRequest, FilesLoadResponseFactory, FilesService, FilesSortRequest, FilesSortResponseFactory, FilesUpdateRequest, FilesUpdateResponseFactory, FilesUploadComponent, FilesUploadModule, FormDeleteFileBaseEndpointTypes, FormDeleteFileFacade, FormDeleteFileRequest, FormDeleteFileService, FormErrorModel, FormErrorsFacade, FormFieldErrorComponent, FormFieldErrorModule, FormFieldPublishErrorComponent, FormFieldPublishErrorModule, FormFormateType, FormValidationCheckRequest, FormValidationEndpointTypes, FormValidationFacade, FormValidationService, FormsFacade, Forward, GetCacheDataRequest, GetRequest, GlobalErrorMessages, GlobalEvent, Go, GoFail, HeaderComponent, HeaderModule, HeadersInterceptor, IFormFieldFormat, IconComponent, ImageComponent, ImageModule, InputTagsComponent, InputTagsModule, JwtInterceptor, LoadCore, LoadUsers, LoadUsersFail, LoadUsersSuccess, LoginRequiredAction, LoginSend, LoginSendCreateRequest, LoginSendCreateResponseFactory, LoginSendFail, LoginSendSuccess, MainConst, MainFacade, MapperRegistry, MapperUtil, MetaModel, NOTIFICATION_LONG_TIMEOUT, NOTIFICATION_TIMEOUT, NotificationAdd, NotificationAddFail, NotificationModel, NotificationShowingType, NotificationsEffects, NotificationsFacade, PaginationComponent, PaginationModule, PagingModel, PanelComponent, PanelHeaderComponent, PanelHeaderModule, PanelModule, PasswordRules, PatchRequest, PhonePipe, PipesModule, PostRequest, PublicationMessageFieldNames, PublicationMessagesFacade, PublishDataModel, PublishEndpointTypes, PublishErrors, PublishPostRequest, PublishResultModel, PublishService, PutRequest, QueryFieldsAdapter, ReducerService, RefreshToken, RefreshTokenFail, RefreshTokenSuccess, ReportsEndpointTypes, ReportsFacade, ReportsModel, ReportsService, Request, RequestMethods, RequestStatus, RequestsEffects, RequestsFacade, ResponseStatus, RouterEffects, RouterFacade, RouterService, STICKY_SIDEBAR_OPTIONS, SafePipe, SelectDialogComponent, SeoService, SequelizeUniqueConstraintError, SetLoaded, SetRouterQueryParams, SharedFormErrors, SharedIconModule, SharedReducer, SharedSpinnerModule, SiteHelperComponent, SiteHelperModule, SmartProgressBarComponent, SmartProgressBarModule, SocialAuthService, SpinnerComponent, SsoExchangeTokenRequest, StarRatingComponent, StarRatingModule, StaticDataBulkUpdateOrCreate, StaticDataBulkUpdateOrCreateFail, StaticDataBulkUpdateOrCreateRequest, StaticDataBulkUpdateOrCreateSuccess, StaticDataComponentInputData, StaticDataCreate, StaticDataCreateFail, StaticDataCreateRequest, StaticDataCreateSuccess, StaticDataCreateWithSubEntities, StaticDataCreateWithSubEntitiesSuccess, StaticDataDelete, StaticDataDeleteFail, StaticDataDeleteRequest, StaticDataDeleteSuccess, StaticDataEffects, StaticDataEndpointTypes, StaticDataFacade, StaticDataGet, StaticDataGetFail, StaticDataGetList, StaticDataGetListCategories, StaticDataGetListCategoriesFail, StaticDataGetListCategoriesRequest, StaticDataGetListCategoriesSuccess, StaticDataGetListFail, StaticDataGetListRequest, StaticDataGetListSuccess, StaticDataGetRequest, StaticDataGetSubRouting, StaticDataGetSubRoutingFail, StaticDataGetSubRoutingSuccess, StaticDataGetSuccess, StaticDataLoadRevisions, StaticDataMetaStatus, StaticDataModel, StaticDataModule, StaticDataNewRevisions, StaticDataPartUpdate, StaticDataPatchUpdate, StaticDataPatchUpdateFail, StaticDataPatchUpdateSuccess, StaticDataSectionFilteringFieldTypes, StaticDataService, StaticDataSubRoutingGetRequest, StaticDataUpdate, StaticDataUpdateFail, StaticDataUpdateRequest, StaticDataUpdateSuccess, StaticDataViewComponent, StickySidebarDirective, StickySidebarInnerDirective, StickySidebarModule, StorageProvider, StorageService, SubEntityOptionsViewTypes, TableMenuComponent, TableMenuModule, TagCloudComponent, TagCloudModule, TagEntitiesRequest, TagEntityModel, TagModel, TagsEndpointTypes, TagsFacade, TagsLoadRequest, TagsLoadResponseFactory, TagsService, TextWithLinkMoreComponent, TextWithLinkMoreModule, USERS_FEATURE_KEY, UiUnitIds, UiUnitsEffects, UiUnitsFacade, UnPublishPostRequest, UpdateRequestData, UserDataRequest, UserFieldNames, UserModel, UserRole, UserSectionRightModel, UsersEffects, UsersFacade, UsersService, ValidatorsType, VersionsModel, WebsocketMessageSubTypes, WebsocketMessageTypes, WebsocketService, WtFrontSharedModule, appearFromLeft, appearFromLeftHideToRight, appearFromLeftWithDelay, appearFromRight, appearFromRightWithDelay, appearOpacity, appearOpacity2, componentDestroyed, coreQuery, defaultStickySidebarOptions, entityScheme, expandCollapse, fileMapper, fileScheme, getAll, getAllUiUnits, getRequestInfo, getRequestInfoByFormId, getRouterLastRoute, getRouterLastRouteParams, getRouterQueryParams, getRouterRoot, getRouterUrl, getUIUnit, getUiUnitDataById, getUserAuthData, guid, hideToTopOpacity, initialState$9 as initialState, mappet, notificationQuery, publicationMessageMapper, publicationMessageScheme, requestsQuery, sharedEffects, sharedFacades, staticDataQuery, trackById, uiUnitsQuery, untilComponentDestroyed, userMapper, userReducer, userScheme, usersQuery };
|
|
17084
|
+
export { AccessDeniedComponent, AccessDeniedModule, ActionsEndpointTypes, ActionsFacade, ActionsMetaStatus, ActionsModel, ActionsSendRequest, ActionsService, AsyncValidators, AsyncValidatorsMessages, AsyncValidatorsType, AuthEndpointTypes, AuthenticationService, AutoFormMainComponent, AutoFormModule, AutoFormService, AutoFormShowComponent, Back, BaseAPI, BaseAPIService, BaseAutoFormService, BaseErrors, BaseModelAdapter, BaseResponseFactory, BreadCrumbsComponent, BreadCrumbsModule, ButtonComponent, ButtonModule, CORE_CONFIG, CacheDataEndpointTypes, CacheDataFacade, CacheDataModel, CacheDataService, ChipsInputComponent, ChipsInputModule, ClearStaticData, CommonDialogComponent, CookiesService, CoreFacade, CoreLoadError, CoreLoaded, CountFormatPipe, CreateRequestListener, CreateRequestListenerByFormId, DateFormatPipe, DeleteComponent, DeleteRequest, DeleteRequestData, DeleteRequestListenerByFormId, DeleteRequestWaiter, DialogService, DialogsModule, DynamicFormQuestionType, EntitiesReportsRequest, Entity, EntityQueryFieldNames, EntitySortType, EntityType, FieldType, FileFieldNames, FileModel, FileUpdateModel, FilesDeleteRequest, FilesDeleteResponseFactory, FilesEndpointTypes, FilesFacade, FilesLoadRequest, FilesLoadResponseFactory, FilesService, FilesSortRequest, FilesSortResponseFactory, FilesUpdateRequest, FilesUpdateResponseFactory, FilesUploadComponent, FilesUploadModule, FormDeleteFileBaseEndpointTypes, FormDeleteFileFacade, FormDeleteFileRequest, FormDeleteFileService, FormErrorModel, FormErrorsFacade, FormFieldErrorComponent, FormFieldErrorModule, FormFieldPublishErrorComponent, FormFieldPublishErrorModule, FormFormateType, FormValidationCheckRequest, FormValidationEndpointTypes, FormValidationFacade, FormValidationService, FormsFacade, Forward, GetCacheDataRequest, GetRequest, GlobalErrorMessages, GlobalEvent, Go, GoFail, HeaderComponent, HeaderModule, HeadersInterceptor, IFormFieldFormat, IconComponent, ImageComponent, ImageModule, InputTagsComponent, InputTagsModule, JwtInterceptor, LoadCore, LoadUsers, LoadUsersFail, LoadUsersSuccess, LoginRequiredAction, LoginSend, LoginSendCreateRequest, LoginSendCreateResponseFactory, LoginSendFail, LoginSendSuccess, MainConst, MainFacade, MapperRegistry, MapperUtil, MetaModel, NOTIFICATION_LONG_TIMEOUT, NOTIFICATION_TIMEOUT, NotificationAdd, NotificationAddFail, NotificationModel, NotificationShowingType, NotificationsEffects, NotificationsFacade, PaginationComponent, PaginationModule, PagingModel, PanelComponent, PanelHeaderComponent, PanelHeaderModule, PanelModule, PasswordRules, PatchRequest, PhonePipe, PipesModule, PostRequest, PublicationMessageFieldNames, PublicationMessagesFacade, PublishDataModel, PublishEndpointTypes, PublishErrors, PublishPostRequest, PublishResultModel, PublishService, PutRequest, QueryFieldsAdapter, ReducerService, RefreshToken, RefreshTokenFail, RefreshTokenSuccess, ReportsEndpointTypes, ReportsFacade, ReportsModel, ReportsService, Request, RequestMethods, RequestStatus, RequestsEffects, RequestsFacade, ResponseStatus, RouterEffects, RouterFacade, RouterService, STATIC_DATA_CREATE_NEW_DIALOG, STATIC_DATA_CREATE_NEW_DYNAMIC_FORM_DIALOG, STATIC_DATA_CREATE_NEW_ITEM_DIALOG, STATIC_DATA_VIEW_ITEM_DIALOG, STICKY_SIDEBAR_OPTIONS, SafePipe, SelectDialogComponent, SeoService, SequelizeUniqueConstraintError, SetLoaded, SetRouterQueryParams, SharedFormErrors, SharedIconModule, SharedReducer, SharedSpinnerModule, SiteHelperComponent, SiteHelperModule, SmartProgressBarComponent, SmartProgressBarModule, SocialAuthService, SpinnerComponent, SsoExchangeTokenRequest, StarRatingComponent, StarRatingModule, StaticDataBulkUpdateOrCreate, StaticDataBulkUpdateOrCreateFail, StaticDataBulkUpdateOrCreateRequest, StaticDataBulkUpdateOrCreateSuccess, StaticDataComponentInputData, StaticDataCreate, StaticDataCreateFail, StaticDataCreateRequest, StaticDataCreateSuccess, StaticDataCreateWithSubEntities, StaticDataCreateWithSubEntitiesSuccess, StaticDataDelete, StaticDataDeleteFail, StaticDataDeleteRequest, StaticDataDeleteSuccess, StaticDataDetailsComponent, StaticDataEffects, StaticDataEndpointTypes, StaticDataFacade, StaticDataGet, StaticDataGetFail, StaticDataGetList, StaticDataGetListCategories, StaticDataGetListCategoriesFail, StaticDataGetListCategoriesRequest, StaticDataGetListCategoriesSuccess, StaticDataGetListFail, StaticDataGetListRequest, StaticDataGetListSuccess, StaticDataGetRequest, StaticDataGetSubRouting, StaticDataGetSubRoutingFail, StaticDataGetSubRoutingSuccess, StaticDataGetSuccess, StaticDataListComponentModes, StaticDataLoadRevisions, StaticDataMetaStatus, StaticDataModel, StaticDataModule, StaticDataNewRevisions, StaticDataPartUpdate, StaticDataPatchUpdate, StaticDataPatchUpdateFail, StaticDataPatchUpdateSuccess, StaticDataSectionFilteringFieldTypes, StaticDataService, StaticDataSubRoutingGetRequest, StaticDataUpdate, StaticDataUpdateFail, StaticDataUpdateRequest, StaticDataUpdateSuccess, StaticDataViewComponent, StickySidebarDirective, StickySidebarInnerDirective, StickySidebarModule, StorageProvider, StorageService, SubEntityOptionsViewTypes, TableMenuComponent, TableMenuModule, TagCloudComponent, TagCloudModule, TagEntitiesRequest, TagEntityModel, TagModel, TagsEndpointTypes, TagsFacade, TagsLoadRequest, TagsLoadResponseFactory, TagsService, TextWithLinkMoreComponent, TextWithLinkMoreModule, USERS_FEATURE_KEY, UiUnitIds, UiUnitsEffects, UiUnitsFacade, UnPublishPostRequest, UpdateRequestData, UserDataRequest, UserFieldNames, UserModel, UserRole, UserSectionRightModel, UsersEffects, UsersFacade, UsersService, ValidatorsType, VersionsModel, WebsocketMessageSubTypes, WebsocketMessageTypes, WebsocketService, WtFrontSharedModule, appearFromLeft, appearFromLeftHideToRight, appearFromLeftWithDelay, appearFromRight, appearFromRightWithDelay, appearOpacity, appearOpacity2, componentDestroyed, coreQuery, defaultStickySidebarOptions, entityScheme, expandCollapse, fileMapper, fileScheme, getAll, getAllUiUnits, getRequestInfo, getRequestInfoByFormId, getRouterLastRoute, getRouterLastRouteParams, getRouterQueryParams, getRouterRoot, getRouterUrl, getUIUnit, getUiUnitDataById, getUserAuthData, guid, hideToTopOpacity, initialState$9 as initialState, mappet, notificationQuery, publicationMessageMapper, publicationMessageScheme, requestsQuery, sharedEffects, sharedFacades, staticDataQuery, trackById, uiUnitsQuery, untilComponentDestroyed, userMapper, userReducer, userScheme, usersQuery };
|
|
16228
17085
|
//# sourceMappingURL=wt-front-shared.mjs.map
|