wt-front-shared 18.0.11 → 18.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/core/+state/cache-data/cache-data.actions.mjs +1 -1
- package/esm2022/lib/core/+state/cache-data/cache-data.effects.mjs +2 -1
- package/esm2022/lib/core/+state/cache-data/cache-data.facade.mjs +3 -2
- package/esm2022/lib/core/+state/static-data/static-data.actions.mjs +1 -1
- package/esm2022/lib/core/+state/static-data/static-data.effects.mjs +2 -1
- package/esm2022/lib/core/+state/static-data/static-data.facade.mjs +4 -3
- package/esm2022/lib/core/+state/tags/tags.actions.mjs +1 -1
- package/esm2022/lib/core/+state/tags/tags.effects.mjs +6 -4
- package/esm2022/lib/core/+state/tags/tags.facade.mjs +5 -5
- package/esm2022/lib/core/components/auto-form/auto-form.module.mjs +2 -2
- package/esm2022/lib/core/components/auto-form/components/form-field-file/form-field-file.component.mjs +3 -3
- package/esm2022/lib/core/components/auto-form/components/form-field-select/form-field-select.component.mjs +57 -18
- package/esm2022/lib/core/components/auto-form/components/form-field-slide-toggle/form-field-slide-toggle.component.mjs +3 -3
- package/esm2022/lib/core/components/auto-form/components/form-field-slide-toggle-show/form-field-slide-toggle-show.component.mjs +13 -5
- package/esm2022/lib/core/components/auto-form/components/form-field-spinner/form-field-spinner.component.mjs +2 -2
- package/esm2022/lib/core/components/auto-form/components/form-field-tags/form-field-tags.component.mjs +3 -3
- package/esm2022/lib/core/components/auto-form/containers/auto-form-main/auto-form-main.component.mjs +125 -11
- package/esm2022/lib/core/components/auto-form/containers/form-field/form-field.component.mjs +131 -13
- package/esm2022/lib/core/components/auto-form/interfaces/form-field-others.mjs +1 -1
- package/esm2022/lib/core/components/index.mjs +1 -1
- package/esm2022/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.mjs +3 -3
- package/esm2022/lib/core/components/sticky-sidebar/sticky-sidebar.directive.mjs +2 -2
- package/esm2022/lib/core/dialogs/common-dialog/common-dialog.component.mjs +1 -2
- package/esm2022/lib/core/interceptors/headers.interceptor.mjs +20 -13
- package/esm2022/lib/core/services/index.mjs +1 -1
- package/esm2022/lib/core/services/social/providers/base-login-provider.mjs +1 -14
- package/esm2022/lib/core/services/websocket.service.mjs +1 -1
- package/esm2022/lib/models/endpoints/cache-data/get-cache-data/request/get-cache-data-request-config.mjs +1 -1
- package/esm2022/lib/models/endpoints/cache-data/get-cache-data/request/get-cache-data-request.mjs +3 -3
- package/esm2022/lib/models/endpoints/http/request/get-request.mjs +7 -2
- package/esm2022/lib/models/endpoints/static-data/static-data-sub-routing-get/request/static-data-sub-routing-get-request-config.mjs +1 -1
- package/esm2022/lib/models/endpoints/static-data/static-data-sub-routing-get/request/static-data-sub-routing-get-request.mjs +10 -2
- package/esm2022/lib/models/endpoints/static-data/static-data-update/request/static-data-update-request.mjs +1 -3
- package/esm2022/lib/models/endpoints/tags/tag-entities-load/request/tag-entities-load-request-config.mjs +1 -1
- package/esm2022/lib/models/endpoints/tags/tags-load/request/tags-load-request-config.mjs +1 -1
- package/esm2022/lib/models/endpoints/tags/tags-load/request/tags-load-request.mjs +10 -2
- package/fesm2022/wt-front-shared.mjs +408 -101
- package/fesm2022/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/cache-data/cache-data.actions.d.ts +1 -0
- package/lib/core/+state/cache-data/cache-data.facade.d.ts +1 -1
- package/lib/core/+state/static-data/static-data.actions.d.ts +1 -0
- package/lib/core/+state/static-data/static-data.facade.d.ts +1 -1
- package/lib/core/+state/tags/tags.actions.d.ts +2 -0
- package/lib/core/+state/tags/tags.facade.d.ts +2 -2
- package/lib/core/+state/users/users.effects.d.ts +4 -4
- package/lib/core/components/auto-form/components/form-field-select/form-field-select.component.d.ts +6 -1
- package/lib/core/components/auto-form/components/form-field-slide-toggle-show/form-field-slide-toggle-show.component.d.ts +5 -3
- package/lib/core/components/auto-form/containers/auto-form-main/auto-form-main.component.d.ts +5 -2
- package/lib/core/components/auto-form/containers/form-field/form-field.component.d.ts +3 -1
- package/lib/core/components/auto-form/interfaces/form-field-others.d.ts +8 -0
- package/lib/core/services/social/providers/base-login-provider.d.ts +0 -1
- package/lib/core/services/websocket.service.d.ts +2 -0
- package/lib/models/endpoints/cache-data/get-cache-data/request/get-cache-data-request-config.d.ts +1 -0
- package/lib/models/endpoints/static-data/static-data-sub-routing-get/request/static-data-sub-routing-get-request-config.d.ts +1 -0
- package/lib/models/endpoints/tags/tag-entities-load/request/tag-entities-load-request-config.d.ts +1 -0
- package/lib/models/endpoints/tags/tags-load/request/tags-load-request-config.d.ts +1 -0
- package/package.json +1 -1
- package/src/lib/styles.css +43 -3
- package/src/lib/styles.css.map +1 -1
|
@@ -38,22 +38,23 @@ import * as i3$3 from '@angular/material/input';
|
|
|
38
38
|
import { MatInputModule } from '@angular/material/input';
|
|
39
39
|
import * as i2$5 from '@angular/material/slide-toggle';
|
|
40
40
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
41
|
-
import * as
|
|
41
|
+
import * as i5$1 from '@angular/material/select';
|
|
42
42
|
import { MatSelectModule } from '@angular/material/select';
|
|
43
|
-
import * as i7$
|
|
43
|
+
import * as i7$2 from '@angular/material/chips';
|
|
44
44
|
import { MatChipsModule } from '@angular/material/chips';
|
|
45
|
-
import * as i8 from '@angular/material/autocomplete';
|
|
45
|
+
import * as i8$1 from '@angular/material/autocomplete';
|
|
46
46
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
47
|
-
import * as i7$
|
|
47
|
+
import * as i7$1 from 'ngx-mask';
|
|
48
48
|
import { NgxMaskDirective, NgxMaskPipe, provideNgxMask } from 'ngx-mask';
|
|
49
|
-
import * as
|
|
49
|
+
import * as i8 from 'ngx-mat-select-search';
|
|
50
50
|
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
51
|
-
import * as i5$1 from '@angular/material/core';
|
|
52
51
|
import * as i11 from '@ckeditor/ckeditor5-angular';
|
|
53
52
|
import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
|
|
53
|
+
import * as i6 from '@angular/material/core';
|
|
54
|
+
import { ClassicEditor, Essentials, Paragraph, Bold, Italic, List, SourceEditing, Table, TableToolbar, TableProperties, TableCellProperties, TableColumnResize, Alignment, Link, AutoLink, ImageEditing, ImageBlockEditing, Image, ImageInsert, ImageToolbar, ImageCaption, ImageStyle, ImageResize, LinkImage, ImageResizeEditing, ImageResizeHandles, ImageResizeButtons, Fullscreen, Font, Highlight, Heading, ShowBlocks, GeneralHtmlSupport, Style, RemoveFormat, SimpleUploadAdapter } from 'ckeditor5';
|
|
54
55
|
import * as i3$4 from '@angular/cdk/drag-drop';
|
|
55
56
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
56
|
-
import * as i6 from 'ng2-file-upload';
|
|
57
|
+
import * as i6$1 from 'ng2-file-upload';
|
|
57
58
|
import { FileUploader, FileUploadModule } from 'ng2-file-upload';
|
|
58
59
|
import * as i5$2 from '@angular/material/progress-bar';
|
|
59
60
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
@@ -62,7 +63,7 @@ import { driver } from 'driver.js';
|
|
|
62
63
|
import { NgrxFormsModule } from 'ngrx-forms';
|
|
63
64
|
import * as i5$3 from '@angular/material/table';
|
|
64
65
|
import { MatTableModule } from '@angular/material/table';
|
|
65
|
-
import * as i6$
|
|
66
|
+
import * as i6$2 from '@angular/material/paginator';
|
|
66
67
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
67
68
|
import * as i22 from '@angular/material/tabs';
|
|
68
69
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
@@ -532,7 +533,12 @@ class GetRequest extends Request {
|
|
|
532
533
|
if (whereString) {
|
|
533
534
|
whereString += ',';
|
|
534
535
|
}
|
|
535
|
-
|
|
536
|
+
if (!Array.isArray(obj[key])) {
|
|
537
|
+
whereString += `${key}=${obj[key]}`;
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
whereString += `${key}=in(${obj[key]})`;
|
|
541
|
+
}
|
|
536
542
|
});
|
|
537
543
|
if (whereString) {
|
|
538
544
|
whereString = `where=(${whereString})`;
|
|
@@ -731,8 +737,8 @@ class GetCacheDataRequest extends GetRequest {
|
|
|
731
737
|
this.config = config;
|
|
732
738
|
}
|
|
733
739
|
get url() {
|
|
734
|
-
const { type } = this.config;
|
|
735
|
-
return `${this.domain}/api/cache-data/${type}`;
|
|
740
|
+
const { type, revision } = this.config;
|
|
741
|
+
return `${this.domain}/api/cache-data/${type}${revision ? '?revision=' + revision : ''}`;
|
|
736
742
|
}
|
|
737
743
|
get headers() {
|
|
738
744
|
return this.addAuthHeaders(this.config.headers);
|
|
@@ -1187,8 +1193,6 @@ class StaticDataUpdateRequest extends PutRequest {
|
|
|
1187
1193
|
itemId
|
|
1188
1194
|
}
|
|
1189
1195
|
};
|
|
1190
|
-
console.log('comment', comment);
|
|
1191
|
-
console.log('comment2', this.cleanParams(comment));
|
|
1192
1196
|
return this.makeFormData({ ...this.cleanParams(comment) });
|
|
1193
1197
|
}
|
|
1194
1198
|
}
|
|
@@ -1324,11 +1328,19 @@ class StaticDataSubRoutingGetRequest extends GetRequest {
|
|
|
1324
1328
|
}
|
|
1325
1329
|
get url() {
|
|
1326
1330
|
let queryString = '';
|
|
1327
|
-
if (this.config.data) {
|
|
1331
|
+
if (this.config.data && Object.keys(this.config.data).length) {
|
|
1328
1332
|
queryString = '?' + Object.keys(this.config.data)
|
|
1329
1333
|
.map(field => `${field}=${this.config.data[field]}`)
|
|
1330
1334
|
.join('&');
|
|
1331
1335
|
}
|
|
1336
|
+
if (this.config.revision) {
|
|
1337
|
+
if (queryString) {
|
|
1338
|
+
queryString = `${queryString}&revision=${this.config.revision}`;
|
|
1339
|
+
}
|
|
1340
|
+
else {
|
|
1341
|
+
queryString = `?revision=${this.config.revision}`;
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1332
1344
|
return `${this.domain}/api/static-data/${this.config.contentType}/r/${this.config.routing}/${queryString}`;
|
|
1333
1345
|
}
|
|
1334
1346
|
get headers() {
|
|
@@ -1360,11 +1372,19 @@ class TagsLoadRequest extends GetRequest {
|
|
|
1360
1372
|
}
|
|
1361
1373
|
get url() {
|
|
1362
1374
|
const entity = this.config.entity;
|
|
1363
|
-
const paging = this.config
|
|
1375
|
+
const { paging, revision } = this.config;
|
|
1364
1376
|
let dopUrl = '';
|
|
1365
1377
|
if (paging) {
|
|
1366
1378
|
dopUrl += `${dopUrl ? '&' : '?'}${paging}`;
|
|
1367
1379
|
}
|
|
1380
|
+
if (revision) {
|
|
1381
|
+
if (dopUrl) {
|
|
1382
|
+
dopUrl += `&revision=${revision}`;
|
|
1383
|
+
}
|
|
1384
|
+
else {
|
|
1385
|
+
dopUrl = `?revision=${revision}`;
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1368
1388
|
return `${this.domain}/api/tags/entity/${entity}${dopUrl}`;
|
|
1369
1389
|
}
|
|
1370
1390
|
get headers() {
|
|
@@ -3883,12 +3903,13 @@ class StaticDataFacade {
|
|
|
3883
3903
|
}));
|
|
3884
3904
|
});
|
|
3885
3905
|
}
|
|
3886
|
-
loadStaticDataSubRouting(contentType, routing, data) {
|
|
3906
|
+
loadStaticDataSubRouting(contentType, routing, data, revision) {
|
|
3887
3907
|
this.store.dispatch(StaticDataGetSubRouting({
|
|
3888
3908
|
payload: {
|
|
3889
3909
|
contentType,
|
|
3890
3910
|
routing,
|
|
3891
|
-
data
|
|
3911
|
+
data,
|
|
3912
|
+
revision
|
|
3892
3913
|
}
|
|
3893
3914
|
}));
|
|
3894
3915
|
}
|
|
@@ -4231,7 +4252,6 @@ class CommonDialogComponent {
|
|
|
4231
4252
|
}
|
|
4232
4253
|
initForm() {
|
|
4233
4254
|
if (this.data.formConfig?.fields) {
|
|
4234
|
-
console.log('initForm.formConfig', this.data.formConfig?.fields);
|
|
4235
4255
|
/*
|
|
4236
4256
|
this.fields = this.data.formConfig?.fields;
|
|
4237
4257
|
const preparedFields = this.autoFormService.getPreparedFields(this.fields);
|
|
@@ -5017,18 +5037,20 @@ class TagsEffects {
|
|
|
5017
5037
|
this.tagsService = tagsService;
|
|
5018
5038
|
this.authenticationService = authenticationService;
|
|
5019
5039
|
this.tagsLoad$ = createEffect(() => this.actions$.pipe(ofType(TagsLoad), switchMap((action) => {
|
|
5020
|
-
const { entity } = action.payload;
|
|
5040
|
+
const { entity, revision } = action.payload;
|
|
5021
5041
|
const headers = this.authenticationService.loadAuthDataFromLocalStore();
|
|
5022
5042
|
return this.tagsService.tagsLoad({
|
|
5023
5043
|
entity,
|
|
5044
|
+
revision,
|
|
5024
5045
|
headers: { token: headers.token, uid: headers.id }
|
|
5025
5046
|
})
|
|
5026
5047
|
.pipe(flatMap((r) => new TagsLoadBehavior(action, r).resolve()));
|
|
5027
5048
|
}), catchError(error => of(TagsLoadFail(error)))));
|
|
5028
5049
|
this.tagEntitiesLoadLoad$ = createEffect(() => this.actions$.pipe(ofType(TagEntitiesLoad), switchMap((action) => {
|
|
5029
|
-
const { tag } = action.payload;
|
|
5050
|
+
const { tag, revision } = action.payload;
|
|
5030
5051
|
return this.tagsService.tagEntitiesLoad({
|
|
5031
|
-
tag
|
|
5052
|
+
tag,
|
|
5053
|
+
revision
|
|
5032
5054
|
})
|
|
5033
5055
|
.pipe(flatMap((r) => new TagEntitiesLoadBehavior(action, r).resolve()));
|
|
5034
5056
|
}), catchError(error => of(TagsLoadFail(error)))));
|
|
@@ -5156,11 +5178,11 @@ class TagsFacade {
|
|
|
5156
5178
|
this.store = store;
|
|
5157
5179
|
this.loaded$ = this.store.pipe(select(tagsQuery.getLoaded));
|
|
5158
5180
|
}
|
|
5159
|
-
loadEntities(tag) {
|
|
5160
|
-
this.store.dispatch(TagEntitiesLoad({ payload: { tag } }));
|
|
5181
|
+
loadEntities(tag, revision) {
|
|
5182
|
+
this.store.dispatch(TagEntitiesLoad({ payload: { tag, revision } }));
|
|
5161
5183
|
}
|
|
5162
|
-
loadTags(entity, perPage) {
|
|
5163
|
-
this.store.dispatch(TagsLoad({ payload: { entity, perPage } }));
|
|
5184
|
+
loadTags(entity, perPage, revision) {
|
|
5185
|
+
this.store.dispatch(TagsLoad({ payload: { entity, perPage, revision } }));
|
|
5164
5186
|
}
|
|
5165
5187
|
getTags(entity) {
|
|
5166
5188
|
return this.store.pipe(select(tagsQuery.getTagsByEntity(entity)));
|
|
@@ -7352,6 +7374,7 @@ class StaticDataEffects extends BaseEffects {
|
|
|
7352
7374
|
headers: { token: headers.token, uid: headers.id },
|
|
7353
7375
|
contentType: action.payload.contentType,
|
|
7354
7376
|
routing: action.payload.routing,
|
|
7377
|
+
revision: action.payload.revision,
|
|
7355
7378
|
};
|
|
7356
7379
|
return this.staticDataService.getSubRouting(config)
|
|
7357
7380
|
.pipe(flatMap((r) => new StaticDataGetListBehavior(action, r).resolve()));
|
|
@@ -7662,6 +7685,7 @@ class CacheDataEffects extends BaseEffects {
|
|
|
7662
7685
|
...action.payload,
|
|
7663
7686
|
headers: { token: headers.token, uid: headers.id },
|
|
7664
7687
|
type: action.payload.type,
|
|
7688
|
+
revision: action.payload.revision,
|
|
7665
7689
|
};
|
|
7666
7690
|
return this.cacheDataService.getCacheData(config)
|
|
7667
7691
|
.pipe(flatMap((r) => new CacheDataGetBehavior(action, r).resolve()));
|
|
@@ -7909,10 +7933,11 @@ class CacheDataFacade {
|
|
|
7909
7933
|
getCacheData$(type) {
|
|
7910
7934
|
return this.store.pipe(select(cacheDataQuery.getCacheData(type)));
|
|
7911
7935
|
}
|
|
7912
|
-
loadCacheData(type) {
|
|
7936
|
+
loadCacheData(type, revision) {
|
|
7913
7937
|
this.store.dispatch(CacheDataGet({
|
|
7914
7938
|
payload: {
|
|
7915
7939
|
type,
|
|
7940
|
+
revision
|
|
7916
7941
|
}
|
|
7917
7942
|
}));
|
|
7918
7943
|
}
|
|
@@ -8237,16 +8262,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8237
8262
|
|
|
8238
8263
|
class FormFieldSpinnerComponent {
|
|
8239
8264
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8240
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldSpinnerComponent, selector: "shared-form-field-spinner", ngImport: i0, template: "<div class=\"spinner-overlay\">\n <shared-spinner [color]=\"'grey'\" [diameter]=\"30\" [overlay]=\"true\"></shared-spinner>\n</div>\n", styles: [".spinner-overlay{position:absolute;width:100%;height:
|
|
8265
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldSpinnerComponent, selector: "shared-form-field-spinner", ngImport: i0, template: "<div class=\"spinner-overlay\">\n <shared-spinner [color]=\"'grey'\" [diameter]=\"30\" [overlay]=\"true\"></shared-spinner>\n</div>\n", styles: [".spinner-overlay{position:absolute;width:100%;height:46px;top:0;margin-top:0;border-radius:6px;overflow:hidden;opacity:.5}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8241
8266
|
}
|
|
8242
8267
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldSpinnerComponent, decorators: [{
|
|
8243
8268
|
type: Component,
|
|
8244
|
-
args: [{ selector: 'shared-form-field-spinner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"spinner-overlay\">\n <shared-spinner [color]=\"'grey'\" [diameter]=\"30\" [overlay]=\"true\"></shared-spinner>\n</div>\n", styles: [".spinner-overlay{position:absolute;width:100%;height:
|
|
8269
|
+
args: [{ selector: 'shared-form-field-spinner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"spinner-overlay\">\n <shared-spinner [color]=\"'grey'\" [diameter]=\"30\" [overlay]=\"true\"></shared-spinner>\n</div>\n", styles: [".spinner-overlay{position:absolute;width:100%;height:46px;top:0;margin-top:0;border-radius:6px;overflow:hidden;opacity:.5}\n"] }]
|
|
8245
8270
|
}] });
|
|
8246
8271
|
|
|
8247
8272
|
class FormFieldSelectComponent {
|
|
8248
|
-
constructor(store, cd) {
|
|
8273
|
+
constructor(store, staticDataFacade, cd) {
|
|
8249
8274
|
this.store = store;
|
|
8275
|
+
this.staticDataFacade = staticDataFacade;
|
|
8250
8276
|
this.cd = cd;
|
|
8251
8277
|
this.searchCtrl = new FormControl();
|
|
8252
8278
|
this.loaded = false;
|
|
@@ -8254,12 +8280,26 @@ class FormFieldSelectComponent {
|
|
|
8254
8280
|
this.allOptions = [];
|
|
8255
8281
|
this.tempOptions = [];
|
|
8256
8282
|
this.placeholder = '';
|
|
8283
|
+
this.isLoading = true;
|
|
8284
|
+
this.hasRelatedData = false;
|
|
8257
8285
|
this.unSubscribeSubject$ = new Subject();
|
|
8258
8286
|
}
|
|
8259
8287
|
ngOnInit() {
|
|
8260
|
-
|
|
8288
|
+
const { subscribeToFormChanges } = this.fieldData.options;
|
|
8289
|
+
if (subscribeToFormChanges) {
|
|
8290
|
+
this.checkRelatedFieldValue();
|
|
8261
8291
|
this.subscribeToFormChanges();
|
|
8262
|
-
this.placeholder =
|
|
8292
|
+
this.placeholder = subscribeToFormChanges.emptyTitle;
|
|
8293
|
+
if (subscribeToFormChanges.loadOptionsParameters) {
|
|
8294
|
+
const relatedFieldValue = this.form.get(subscribeToFormChanges.relatedField).value;
|
|
8295
|
+
if (relatedFieldValue) {
|
|
8296
|
+
const params = {
|
|
8297
|
+
where: { [subscribeToFormChanges.loadOptionsParameters.filteredField]: relatedFieldValue },
|
|
8298
|
+
limit: -1,
|
|
8299
|
+
};
|
|
8300
|
+
this.staticDataFacade.loadStaticData(subscribeToFormChanges.loadOptionsParameters.entity, params);
|
|
8301
|
+
}
|
|
8302
|
+
}
|
|
8263
8303
|
}
|
|
8264
8304
|
if (this.autoCompleteFields) {
|
|
8265
8305
|
const findField = this.autoCompleteFields.find(item => item.field === this.fieldData.field);
|
|
@@ -8297,7 +8337,7 @@ class FormFieldSelectComponent {
|
|
|
8297
8337
|
if (!this.tempOptions.length) {
|
|
8298
8338
|
this.tempOptions = [...this.options];
|
|
8299
8339
|
}
|
|
8300
|
-
this.options = this.
|
|
8340
|
+
this.options = this.allOptions.filter(item => {
|
|
8301
8341
|
return item.name.toLowerCase().indexOf(searchValue.toLowerCase()) !== -1;
|
|
8302
8342
|
});
|
|
8303
8343
|
}
|
|
@@ -8314,13 +8354,32 @@ class FormFieldSelectComponent {
|
|
|
8314
8354
|
* Subscribe to the form changes for field with the property 'subscribeToFormChanges'
|
|
8315
8355
|
*/
|
|
8316
8356
|
subscribeToFormChanges() {
|
|
8317
|
-
this.
|
|
8357
|
+
const { relatedField, currentFieldProperty, loadOptionsParameters } = this.fieldData.options?.subscribeToFormChanges;
|
|
8358
|
+
this.form.get(relatedField).valueChanges
|
|
8318
8359
|
.pipe(takeUntil(this.unSubscribeSubject$))
|
|
8319
8360
|
.subscribe(changes => {
|
|
8361
|
+
this.checkRelatedFieldValue();
|
|
8362
|
+
if (loadOptionsParameters) {
|
|
8363
|
+
const params = {
|
|
8364
|
+
where: { [currentFieldProperty]: changes },
|
|
8365
|
+
limit: -1,
|
|
8366
|
+
};
|
|
8367
|
+
this.staticDataFacade.loadStaticData(loadOptionsParameters.entity, params);
|
|
8368
|
+
}
|
|
8320
8369
|
this.filterOptionsByRelatedFieldValue(changes);
|
|
8321
8370
|
this.cd.markForCheck();
|
|
8322
8371
|
});
|
|
8323
8372
|
}
|
|
8373
|
+
checkRelatedFieldValue() {
|
|
8374
|
+
const { relatedField } = this.fieldData.options?.subscribeToFormChanges;
|
|
8375
|
+
const relatedFieldValue = this.form.get(relatedField).value;
|
|
8376
|
+
if (Array.isArray(relatedFieldValue)) {
|
|
8377
|
+
this.hasRelatedData = !!relatedFieldValue?.length;
|
|
8378
|
+
}
|
|
8379
|
+
else {
|
|
8380
|
+
this.hasRelatedData = !!relatedFieldValue;
|
|
8381
|
+
}
|
|
8382
|
+
}
|
|
8324
8383
|
loadOptionsFromStore(loadOptionFromStore) {
|
|
8325
8384
|
const listKeys = loadOptionFromStore.split('.');
|
|
8326
8385
|
this.store.select(state => {
|
|
@@ -8347,6 +8406,7 @@ class FormFieldSelectComponent {
|
|
|
8347
8406
|
newOptions = this.groupItemsByNestedField(newOptions);
|
|
8348
8407
|
}
|
|
8349
8408
|
this.allOptions = newOptions;
|
|
8409
|
+
this.isLoading = false;
|
|
8350
8410
|
if (!this.fieldData.options?.subscribeToFormChanges) {
|
|
8351
8411
|
this.options = newOptions?.length ? newOptions.map(item => ({ id: item.id, name: item.name })) : [];
|
|
8352
8412
|
}
|
|
@@ -8366,7 +8426,9 @@ class FormFieldSelectComponent {
|
|
|
8366
8426
|
let newOptions = [];
|
|
8367
8427
|
if (Array.isArray(relatedFieldValue)) {
|
|
8368
8428
|
if (relatedFieldValue?.length) {
|
|
8369
|
-
newOptions = this.allOptions.filter(item =>
|
|
8429
|
+
newOptions = this.allOptions.filter(item => {
|
|
8430
|
+
return relatedFieldValue.includes(item[currentFieldProperty]);
|
|
8431
|
+
});
|
|
8370
8432
|
}
|
|
8371
8433
|
}
|
|
8372
8434
|
else {
|
|
@@ -8413,13 +8475,13 @@ class FormFieldSelectComponent {
|
|
|
8413
8475
|
return 0;
|
|
8414
8476
|
});
|
|
8415
8477
|
}
|
|
8416
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldSelectComponent, deps: [{ token: i1.Store }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8417
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormFieldSelectComponent, 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 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
|
|
8478
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldSelectComponent, deps: [{ token: i1.Store }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8479
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormFieldSelectComponent, 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 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 @if (!options.length) {\n <mat-option>\n \u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442\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 <ng-container *ngIf=\"!hasRelatedData && placeholder\">\n <div @appearOpacity class=\"form-select-placeholder\">{{ placeholder }}</div>\n </ng-container>\n </mat-form-field>\n</div>\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}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "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: i5$1.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"], 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.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: i8.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: FormFieldSpinnerComponent, selector: "shared-form-field-spinner" }], animations: [appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8418
8480
|
}
|
|
8419
8481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldSelectComponent, decorators: [{
|
|
8420
8482
|
type: Component,
|
|
8421
|
-
args: [{ selector: 'shared-form-field-select', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearOpacity], template: "<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 }}</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
|
|
8422
|
-
}], ctorParameters: () => [{ type: i1.Store }, { type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
8483
|
+
args: [{ selector: 'shared-form-field-select', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearOpacity], template: "<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 }}</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 @if (!options.length) {\n <mat-option>\n \u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442\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 <ng-container *ngIf=\"!hasRelatedData && placeholder\">\n <div @appearOpacity class=\"form-select-placeholder\">{{ placeholder }}</div>\n </ng-container>\n </mat-form-field>\n</div>\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}\n"] }]
|
|
8484
|
+
}], ctorParameters: () => [{ type: i1.Store }, { type: StaticDataFacade }, { type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
8423
8485
|
type: Input
|
|
8424
8486
|
}], fieldData: [{
|
|
8425
8487
|
type: Input
|
|
@@ -8431,11 +8493,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8431
8493
|
|
|
8432
8494
|
class FormFieldSlideToggleComponent {
|
|
8433
8495
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldSlideToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8434
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldSlideToggleComponent, 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}\">\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: [""], dependencies: [{ kind: "directive", type: i1$3.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 }); }
|
|
8496
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldSlideToggleComponent, 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$3.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 }); }
|
|
8435
8497
|
}
|
|
8436
8498
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldSlideToggleComponent, decorators: [{
|
|
8437
8499
|
type: Component,
|
|
8438
|
-
args: [{ selector: 'shared-form-field-slide-toggle', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [formGroup]=\"form\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\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" }]
|
|
8500
|
+
args: [{ selector: 'shared-form-field-slide-toggle', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
8439
8501
|
}], propDecorators: { config: [{
|
|
8440
8502
|
type: Input
|
|
8441
8503
|
}], fieldData: [{
|
|
@@ -8444,6 +8506,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8444
8506
|
type: Input
|
|
8445
8507
|
}] } });
|
|
8446
8508
|
|
|
8509
|
+
var FieldType;
|
|
8510
|
+
(function (FieldType) {
|
|
8511
|
+
FieldType["FieldTypeInput"] = "input";
|
|
8512
|
+
FieldType["FieldTypeSelect"] = "select";
|
|
8513
|
+
FieldType["FieldTypeSelectMultiple"] = "select-multiple";
|
|
8514
|
+
FieldType["FieldTypeSlideToggle"] = "slide-toggle";
|
|
8515
|
+
FieldType["FieldTypeTextarea"] = "textarea-editor";
|
|
8516
|
+
FieldType["FieldTypeTextareaEditor"] = "textarea";
|
|
8517
|
+
FieldType["FieldTypeFile"] = "file";
|
|
8518
|
+
FieldType["FieldTypeFiles"] = "files";
|
|
8519
|
+
FieldType["FieldTypeRating"] = "rating";
|
|
8520
|
+
FieldType["FieldTypeTags"] = "tags";
|
|
8521
|
+
FieldType["FieldTypeJSON"] = "json";
|
|
8522
|
+
})(FieldType || (FieldType = {}));
|
|
8523
|
+
|
|
8447
8524
|
class SmartProgressBarComponent {
|
|
8448
8525
|
constructor() {
|
|
8449
8526
|
this.showValue = true;
|
|
@@ -8462,21 +8539,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8462
8539
|
type: Input
|
|
8463
8540
|
}] } });
|
|
8464
8541
|
|
|
8465
|
-
var FieldType;
|
|
8466
|
-
(function (FieldType) {
|
|
8467
|
-
FieldType["FieldTypeInput"] = "input";
|
|
8468
|
-
FieldType["FieldTypeSelect"] = "select";
|
|
8469
|
-
FieldType["FieldTypeSelectMultiple"] = "select-multiple";
|
|
8470
|
-
FieldType["FieldTypeSlideToggle"] = "slide-toggle";
|
|
8471
|
-
FieldType["FieldTypeTextarea"] = "textarea-editor";
|
|
8472
|
-
FieldType["FieldTypeTextareaEditor"] = "textarea";
|
|
8473
|
-
FieldType["FieldTypeFile"] = "file";
|
|
8474
|
-
FieldType["FieldTypeFiles"] = "files";
|
|
8475
|
-
FieldType["FieldTypeRating"] = "rating";
|
|
8476
|
-
FieldType["FieldTypeTags"] = "tags";
|
|
8477
|
-
FieldType["FieldTypeJSON"] = "json";
|
|
8478
|
-
})(FieldType || (FieldType = {}));
|
|
8479
|
-
|
|
8480
8542
|
class StaticDataComponentInputData {
|
|
8481
8543
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StaticDataComponentInputData, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8482
8544
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StaticDataComponentInputData }); }
|
|
@@ -8756,7 +8818,7 @@ class FormFieldInputComponent {
|
|
|
8756
8818
|
}
|
|
8757
8819
|
}
|
|
8758
8820
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8759
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldInputComponent, 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$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.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$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "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$
|
|
8821
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldInputComponent, 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$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.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$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "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$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 }); }
|
|
8760
8822
|
}
|
|
8761
8823
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldInputComponent, decorators: [{
|
|
8762
8824
|
type: Component,
|
|
@@ -8930,7 +8992,7 @@ class FormFieldFileComponent {
|
|
|
8930
8992
|
this.cd.markForCheck();
|
|
8931
8993
|
}
|
|
8932
8994
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldFileComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DialogService }, { token: RequestsFacade }, { token: FormDeleteFileFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8933
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldFileComponent, 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 <div class=\"mb-15 display-flex align-baseline form-field-input border-block\">\n <mat-label>{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n <div\n @appearFromLeft\n *ngIf=\"imageSource || imageVersions\"\n class=\"form-field-file-image\">\n <div *ngIf=\"imageSource\" 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 <img [src]=\"imageSource\" alt=\"\">\n </div>\n <div *ngIf=\"imageVersions\" 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>\n <div\n [@inputAnim]=\"inputStatus\"\n class=\"input\">\n <input #input\n type=\"file\"\n (change)=\"onFileChange($event)\" />\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-input mat-label{color:#5f5b5b;font-size:12px;padding:0 5px;position:absolute;background-color:#fff;top:-10px
|
|
8995
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldFileComponent, 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 <div class=\"mb-15 display-flex align-baseline form-field-input border-block\">\n <mat-label>{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n <div\n @appearFromLeft\n *ngIf=\"imageSource || imageVersions\"\n class=\"form-field-file-image\">\n <div *ngIf=\"imageSource\" 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 <img [src]=\"imageSource\" alt=\"\">\n </div>\n <div *ngIf=\"imageVersions\" 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>\n <div\n [@inputAnim]=\"inputStatus\"\n class=\"input\">\n <input #input\n type=\"file\"\n (change)=\"onFileChange($event)\" />\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-input mat-label{color:#5f5b5b;font-size:12px;padding:0 5px 0 0;position:absolute;background-color:#fff;top:-10px}.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}.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)}.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}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.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$3.AsyncPipe, name: "async" }], animations: [
|
|
8934
8996
|
appearFromLeft,
|
|
8935
8997
|
trigger("inputAnim", [
|
|
8936
8998
|
state("0", style({
|
|
@@ -8966,7 +9028,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8966
9028
|
animate("500ms")
|
|
8967
9029
|
])
|
|
8968
9030
|
])
|
|
8969
|
-
], template: "<div class=\"form-field-file\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"pb-10 width100\">\n <div class=\"mb-15 display-flex align-baseline form-field-input border-block\">\n <mat-label>{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n <div\n @appearFromLeft\n *ngIf=\"imageSource || imageVersions\"\n class=\"form-field-file-image\">\n <div *ngIf=\"imageSource\" 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 <img [src]=\"imageSource\" alt=\"\">\n </div>\n <div *ngIf=\"imageVersions\" 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>\n <div\n [@inputAnim]=\"inputStatus\"\n class=\"input\">\n <input #input\n type=\"file\"\n (change)=\"onFileChange($event)\" />\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-input mat-label{color:#5f5b5b;font-size:12px;padding:0 5px;position:absolute;background-color:#fff;top:-10px
|
|
9031
|
+
], template: "<div class=\"form-field-file\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"pb-10 width100\">\n <div class=\"mb-15 display-flex align-baseline form-field-input border-block\">\n <mat-label>{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n <div\n @appearFromLeft\n *ngIf=\"imageSource || imageVersions\"\n class=\"form-field-file-image\">\n <div *ngIf=\"imageSource\" 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 <img [src]=\"imageSource\" alt=\"\">\n </div>\n <div *ngIf=\"imageVersions\" 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>\n <div\n [@inputAnim]=\"inputStatus\"\n class=\"input\">\n <input #input\n type=\"file\"\n (change)=\"onFileChange($event)\" />\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-input mat-label{color:#5f5b5b;font-size:12px;padding:0 5px 0 0;position:absolute;background-color:#fff;top:-10px}.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}.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)}.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}\n"] }]
|
|
8970
9032
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: DialogService }, { type: RequestsFacade }, { type: FormDeleteFileFacade }], propDecorators: { config: [{
|
|
8971
9033
|
type: Input
|
|
8972
9034
|
}], fieldData: [{
|
|
@@ -9261,7 +9323,7 @@ class TableFilesUploadingComponent {
|
|
|
9261
9323
|
});
|
|
9262
9324
|
}
|
|
9263
9325
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableFilesUploadingComponent, deps: [{ token: FilesFacade }, { token: NotificationsFacade }, { token: i0.ChangeDetectorRef }, { token: AuthenticationService }, { token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9264
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TableFilesUploadingComponent, 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$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i6.FileDropDirective, selector: "[ng2FileDrop]", inputs: ["uploader"], outputs: ["fileOver", "onFileDrop"] }, { kind: "directive", type: i6.FileSelectDirective, selector: "[ng2FileSelect]", inputs: ["uploader"], outputs: ["onFileSelected"] }, { kind: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.DecimalPipe, name: "number" }], animations: [
|
|
9326
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TableFilesUploadingComponent, 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$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$2.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: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$3.DecimalPipe, name: "number" }], animations: [
|
|
9265
9327
|
hideToTopOpacity,
|
|
9266
9328
|
appearFromLeftHideToRight
|
|
9267
9329
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -9501,15 +9563,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9501
9563
|
|
|
9502
9564
|
class FormFieldSlideToggleShowComponent {
|
|
9503
9565
|
constructor() {
|
|
9504
|
-
this.
|
|
9505
|
-
this.
|
|
9566
|
+
this.trueTitle = 'Да';
|
|
9567
|
+
this.falseTitle = 'Нет';
|
|
9568
|
+
}
|
|
9569
|
+
ngOnInit() {
|
|
9570
|
+
if (this.fieldData.options.toggleView?.trueTitle) {
|
|
9571
|
+
this.trueTitle = this.fieldData.options.toggleView?.trueTitle;
|
|
9572
|
+
}
|
|
9573
|
+
if (this.fieldData.options.toggleView?.falseTitle) {
|
|
9574
|
+
this.falseTitle = this.fieldData.options.toggleView?.falseTitle;
|
|
9575
|
+
}
|
|
9506
9576
|
}
|
|
9507
9577
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldSlideToggleShowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9508
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldSlideToggleShowComponent, selector: "shared-form-field-slide-toggle-show", inputs: { config: "config", fieldData: "fieldData", value: "value" }, ngImport: i0, template: "<div [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label class=\"show-label\">{{ fieldData.title }}</label>\n <div class=\"display-flex-align-center form-field-value\" [ngClass]=\"{'color-green': value, 'color-red': !value }\">\n <ng-container *ngIf=\"value\">\n <mat-icon>check</mat-icon>\n {{
|
|
9578
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldSlideToggleShowComponent, selector: "shared-form-field-slide-toggle-show", inputs: { config: "config", fieldData: "fieldData", value: "value" }, ngImport: i0, template: "<div [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\" class=\"field-slide-toggle-show\">\n <label class=\"show-label\">{{ fieldData.title }}: </label>\n <div class=\"display-flex-align-center form-field-value\" [ngClass]=\"{'color-green': value, 'color-red': !value }\">\n <ng-container *ngIf=\"value\">\n <mat-icon>check</mat-icon>\n {{ trueTitle }}\n </ng-container>\n <ng-container *ngIf=\"!value\">\n <mat-icon>clear</mat-icon>\n {{ falseTitle }}\n </ng-container>\n </div>\n</div>\n", styles: [".field-slide-toggle-show{display:flex;align-items:center}.field-slide-toggle-show .show-label{margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9509
9579
|
}
|
|
9510
9580
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldSlideToggleShowComponent, decorators: [{
|
|
9511
9581
|
type: Component,
|
|
9512
|
-
args: [{ selector: 'shared-form-field-slide-toggle-show', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label class=\"show-label\">{{ fieldData.title }}</label>\n <div class=\"display-flex-align-center form-field-value\" [ngClass]=\"{'color-green': value, 'color-red': !value }\">\n <ng-container *ngIf=\"value\">\n <mat-icon>check</mat-icon>\n {{
|
|
9582
|
+
args: [{ selector: 'shared-form-field-slide-toggle-show', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\" class=\"field-slide-toggle-show\">\n <label class=\"show-label\">{{ fieldData.title }}: </label>\n <div class=\"display-flex-align-center form-field-value\" [ngClass]=\"{'color-green': value, 'color-red': !value }\">\n <ng-container *ngIf=\"value\">\n <mat-icon>check</mat-icon>\n {{ trueTitle }}\n </ng-container>\n <ng-container *ngIf=\"!value\">\n <mat-icon>clear</mat-icon>\n {{ falseTitle }}\n </ng-container>\n </div>\n</div>\n", styles: [".field-slide-toggle-show{display:flex;align-items:center}.field-slide-toggle-show .show-label{margin-bottom:0}\n"] }]
|
|
9513
9583
|
}], propDecorators: { config: [{
|
|
9514
9584
|
type: Input
|
|
9515
9585
|
}], fieldData: [{
|
|
@@ -9703,11 +9773,11 @@ class FormFieldTagsComponent {
|
|
|
9703
9773
|
}]);
|
|
9704
9774
|
}
|
|
9705
9775
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldTagsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: StaticDataFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9706
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldTagsComponent, 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: "
|
|
9776
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFieldTagsComponent, 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$3.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$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$2.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: i8$1.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$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9707
9777
|
}
|
|
9708
9778
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldTagsComponent, decorators: [{
|
|
9709
9779
|
type: Component,
|
|
9710
|
-
args: [{ selector: 'shared-form-field-tags', changeDetection: ChangeDetectionStrategy.OnPush, template: "
|
|
9780
|
+
args: [{ selector: 'shared-form-field-tags', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
9711
9781
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: StaticDataFacade }], propDecorators: { config: [{
|
|
9712
9782
|
type: Input
|
|
9713
9783
|
}], fieldData: [{
|
|
@@ -9795,6 +9865,7 @@ class FormFieldComponent {
|
|
|
9795
9865
|
this.invalidStatus = 'INVALID';
|
|
9796
9866
|
this.unSubscribeSubject$ = new Subject();
|
|
9797
9867
|
this.isDenyToUpdate = false;
|
|
9868
|
+
this.Editor = null;
|
|
9798
9869
|
}
|
|
9799
9870
|
ngOnInit() {
|
|
9800
9871
|
this.field = this.fieldData.field;
|
|
@@ -9861,21 +9932,137 @@ class FormFieldComponent {
|
|
|
9861
9932
|
apiUrl: this.appConfig.apiUrl,
|
|
9862
9933
|
panelUrl: this.appConfig.panelUrl
|
|
9863
9934
|
};
|
|
9935
|
+
const customColorPalette = [
|
|
9936
|
+
{
|
|
9937
|
+
color: 'hsl(4, 90%, 58%)',
|
|
9938
|
+
label: 'Red'
|
|
9939
|
+
},
|
|
9940
|
+
{
|
|
9941
|
+
color: 'hsl(340, 82%, 52%)',
|
|
9942
|
+
label: 'Pink'
|
|
9943
|
+
},
|
|
9944
|
+
{
|
|
9945
|
+
color: 'hsl(291, 64%, 42%)',
|
|
9946
|
+
label: 'Purple'
|
|
9947
|
+
},
|
|
9948
|
+
{
|
|
9949
|
+
color: 'hsl(262, 52%, 47%)',
|
|
9950
|
+
label: 'Deep Purple'
|
|
9951
|
+
},
|
|
9952
|
+
{
|
|
9953
|
+
color: 'hsl(231, 48%, 48%)',
|
|
9954
|
+
label: 'Indigo'
|
|
9955
|
+
},
|
|
9956
|
+
{
|
|
9957
|
+
color: 'hsl(207, 90%, 54%)',
|
|
9958
|
+
label: 'Blue'
|
|
9959
|
+
},
|
|
9960
|
+
];
|
|
9961
|
+
this.Editor = ClassicEditor;
|
|
9864
9962
|
this.ckeConfig = {
|
|
9865
9963
|
licenseKey: 'GPL',
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
|
|
9964
|
+
plugins: [
|
|
9965
|
+
Essentials,
|
|
9966
|
+
Paragraph,
|
|
9967
|
+
Bold,
|
|
9968
|
+
Italic,
|
|
9969
|
+
List,
|
|
9970
|
+
SourceEditing,
|
|
9971
|
+
Table, TableToolbar, TableToolbar, TableProperties, TableCellProperties, TableColumnResize,
|
|
9972
|
+
Alignment,
|
|
9973
|
+
Link, AutoLink,
|
|
9974
|
+
ImageEditing, ImageBlockEditing,
|
|
9975
|
+
Image, ImageInsert, ImageToolbar, ImageCaption, ImageStyle, ImageResize, LinkImage,
|
|
9976
|
+
ImageResizeEditing, ImageResizeHandles, ImageResizeButtons,
|
|
9977
|
+
Fullscreen,
|
|
9978
|
+
Font, Highlight,
|
|
9979
|
+
Heading,
|
|
9980
|
+
ShowBlocks,
|
|
9981
|
+
GeneralHtmlSupport, Style, RemoveFormat,
|
|
9982
|
+
SimpleUploadAdapter
|
|
9983
|
+
],
|
|
9984
|
+
toolbar: [
|
|
9985
|
+
'undo', 'redo', '|',
|
|
9986
|
+
'heading', 'style', '|',
|
|
9987
|
+
'bold', 'italic', 'alignment', 'bulletedList', 'numberedList', '|',
|
|
9988
|
+
'insertTable', '|',
|
|
9989
|
+
'insertImage', 'resizeImage', '|', 'link', 'highlight', '|',
|
|
9990
|
+
'fontSize', 'fontColor', 'fontBackgroundColor', '|',
|
|
9991
|
+
'removeFormat', 'showBlocks', 'fullscreen', 'sourceEditing'
|
|
9992
|
+
],
|
|
9993
|
+
table: {
|
|
9994
|
+
contentToolbar: [
|
|
9995
|
+
'tableColumn', 'tableRow', 'mergeTableCells',
|
|
9996
|
+
'tableProperties', 'tableCellProperties'
|
|
9997
|
+
],
|
|
9998
|
+
// Set the palettes for tables.
|
|
9999
|
+
tableProperties: {
|
|
10000
|
+
borderColors: customColorPalette,
|
|
10001
|
+
backgroundColors: customColorPalette
|
|
10002
|
+
},
|
|
10003
|
+
// Set the palettes for table cells.
|
|
10004
|
+
tableCellProperties: {
|
|
10005
|
+
borderColors: customColorPalette,
|
|
10006
|
+
backgroundColors: customColorPalette
|
|
10007
|
+
}
|
|
10008
|
+
},
|
|
10009
|
+
heading: {
|
|
10010
|
+
options: [
|
|
10011
|
+
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
|
|
10012
|
+
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
|
|
10013
|
+
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
|
|
10014
|
+
{ model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
|
|
10015
|
+
{ model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' }
|
|
10016
|
+
]
|
|
10017
|
+
},
|
|
10018
|
+
style: {
|
|
10019
|
+
definitions: [
|
|
10020
|
+
{
|
|
10021
|
+
name: 'Отдельный текст',
|
|
10022
|
+
element: 'p',
|
|
10023
|
+
classes: ['info-box']
|
|
10024
|
+
},
|
|
10025
|
+
]
|
|
10026
|
+
},
|
|
10027
|
+
simpleUpload: {
|
|
10028
|
+
// The URL that the images are uploaded to.
|
|
10029
|
+
uploadUrl: `${newConfig.apiUrl}/api/files/browser/${this.entity.toLowerCase()}/${entityId}`,
|
|
10030
|
+
// Enable the XMLHttpRequest.withCredentials property.
|
|
10031
|
+
withCredentials: true,
|
|
10032
|
+
// Headers sent along with the XMLHttpRequest to the upload server.
|
|
10033
|
+
headers: {
|
|
10034
|
+
Authorization: `JWT ${token}`
|
|
10035
|
+
}
|
|
10036
|
+
},
|
|
10037
|
+
image: {
|
|
10038
|
+
toolbar: [
|
|
10039
|
+
'toggleImageCaption',
|
|
10040
|
+
'imageTextAlternative',
|
|
10041
|
+
'|',
|
|
10042
|
+
'imageStyle:wrapText',
|
|
10043
|
+
'imageStyle:breakText',
|
|
10044
|
+
'|',
|
|
10045
|
+
'resizeImage',
|
|
10046
|
+
'linkImage'
|
|
10047
|
+
],
|
|
9869
10048
|
},
|
|
9870
|
-
imagebrowserUrl: this.entity ? `${newConfig.apiUrl}/api/files/browser/${this.entity.toLowerCase()}/${entityId}` : '',
|
|
9871
|
-
filebrowserBrowseUrl: this.entity ? `${newConfig.panelUrl}/file-browser/${this.entity.toLowerCase()}/${entityId}` : '',
|
|
9872
|
-
filebrowserWindowWidth: '905',
|
|
9873
|
-
filebrowserWindowHeight: '480',
|
|
9874
|
-
filebrowserUploadUrl: this.entity ? `${newConfig.apiUrl}/api/files/${this.entity.toLowerCase()}/${entityId}/editor` : '',
|
|
9875
|
-
uploadUrl: this.entity ? `${newConfig.apiUrl}/api/files/${this.entity.toLowerCase()}/${entityId}/editor` : '',
|
|
9876
|
-
easyimage_toolbar: ['EasyImageAlignLeft', 'EasyImageAlignCenter', 'EasyImageAlignRight']
|
|
9877
10049
|
};
|
|
9878
10050
|
/*
|
|
10051
|
+
extraPlugins:
|
|
10052
|
+
'image,uploadimage,tabletools,undo,indent,justify,showblocks',
|
|
10053
|
+
fileTools_requestHeaders: {
|
|
10054
|
+
'Authorization': `JWT ${token}`
|
|
10055
|
+
},
|
|
10056
|
+
|
|
10057
|
+
imagebrowserUrl: this.entity ? `${newConfig.apiUrl}/api/files/browser/${this.entity.toLowerCase()}/${entityId}` : '',
|
|
10058
|
+
filebrowserBrowseUrl: this.entity ? `${newConfig.panelUrl}/file-browser/${this.entity.toLowerCase()}/${entityId}` : '',
|
|
10059
|
+
filebrowserWindowWidth: '905',
|
|
10060
|
+
filebrowserWindowHeight: '480',
|
|
10061
|
+
filebrowserUploadUrl: this.entity ? `${newConfig.apiUrl}/api/files/${this.entity.toLowerCase()}/${entityId}/editor` : '',
|
|
10062
|
+
uploadUrl: this.entity ? `${newConfig.apiUrl}/api/files/${this.entity.toLowerCase()}/${entityId}/editor` : '',
|
|
10063
|
+
easyimage_toolbar: ['EasyImageAlignLeft', 'EasyImageAlignCenter', 'EasyImageAlignRight']
|
|
10064
|
+
*/
|
|
10065
|
+
/*
|
|
9879
10066
|
removePlugins: 'removePlugins',
|
|
9880
10067
|
extraPlugins:
|
|
9881
10068
|
"image2, easyimage,enhancedimage, uploadimage,dialogui,dialog,a11yhelp,about,basicstyles,bidi,blockquote,clipboard," +
|
|
@@ -9891,11 +10078,11 @@ class FormFieldComponent {
|
|
|
9891
10078
|
*/
|
|
9892
10079
|
}
|
|
9893
10080
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldComponent, deps: [{ token: CORE_CONFIG }, { token: AuthenticationService }, { token: CoreFacade }, { token: i0.ChangeDetectorRef }, { token: i1$4.MatDialog }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9894
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormFieldComponent, selector: "shared-form-field", inputs: { fields: "fields", formData: "formData", config: "config", fieldData: "fieldData", itemId: "itemId", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", publicationMessages: "publicationMessages", entityTypeUserRoleRights: "entityTypeUserRoleRights", autoCompleteFields: "autoCompleteFields", entityPermissionUpdateDanyFields: "entityPermissionUpdateDanyFields" }, outputs: { eventUpdateForm: "eventUpdateForm", eventSendAction: "eventSendAction" }, ngImport: i0, template: "<div *ngIf=\"!fieldData.options?.hide\"\n fxLayout=\"column\"\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle,\n 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{ fieldData.description }}\n </div>\n <ckeditor [formControlName]=\"fieldData.field\"\n [config]=\"ckeConfig\"></ckeditor>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</b>\n </div>\n </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n } @else {\n <shared-form-field-input-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-input-show>\n }\n </ng-container>\n </ng-container>\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{ action.title }}</div>\n </ng-container>\n </div>\n <!-- <shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>-->\n <ng-container *ngIf=\"fieldData.options?.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options?.hint)\">help_outline</mat-icon>\n </ng-container>\n } @else {\n <ng-container *ngComponentOutlet=\"fieldData.options?.showing?.customEditViewComponent;\n injector: componentDataInjector;\"/>\n }\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl && fieldControl['touched'] && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:#009ce542}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:9px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width label{position:absolute;margin-top:-9px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FormFieldErrorComponent, selector: "shared-form-field-error", inputs: ["fieldData", "form", "errorMessageTexts"] }, { kind: "component", type: FormFieldPublishErrorComponent, selector: "shared-form-field-publish-error", inputs: ["fieldData", "form", "entity", "errorMessageTexts"] }, { kind: "directive", type: i3$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["config", "fieldData", "form", "autoCompleteFields"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldFileComponent, selector: "shared-form-field-file", inputs: ["config", "fieldData", "form", "entity"] }, { kind: "component", type: FormFieldFilesComponent, selector: "shared-form-field-files", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldFileShowComponent, selector: "shared-form-field-file-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleShowComponent, selector: "shared-form-field-slide-toggle-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldInputShowComponent, selector: "shared-form-field-input-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldFilesShowComponent, selector: "shared-form-field-files-show", inputs: ["config", "fieldData", "entityId", "entitySection"] }, { kind: "component", type: FormFieldJsonShowComponent, selector: "shared-form-field-json-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldTagsComponent, selector: "shared-form-field-tags", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldTextareaShowComponent, selector: "shared-form-field-textarea-show", inputs: ["config", "fieldData", "value"] }], animations: [appearFromLeft], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10081
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormFieldComponent, selector: "shared-form-field", inputs: { fields: "fields", formData: "formData", config: "config", fieldData: "fieldData", itemId: "itemId", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", publicationMessages: "publicationMessages", entityTypeUserRoleRights: "entityTypeUserRoleRights", autoCompleteFields: "autoCompleteFields", entityPermissionUpdateDanyFields: "entityPermissionUpdateDanyFields" }, outputs: { eventUpdateForm: "eventUpdateForm", eventSendAction: "eventSendAction" }, ngImport: i0, template: "<div *ngIf=\"!fieldData.options?.hide\"\n fxLayout=\"column\"\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle,\n 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width 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 <ckeditor [formControlName]=\"fieldData.field\"\n data=\"<p>Hello, world!</p>\"\n [editor]=\"Editor\"\n [config]=\"ckeConfig\"></ckeditor>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</b>\n </div>\n </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n } @else {\n <shared-form-field-input-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-input-show>\n }\n </ng-container>\n </ng-container>\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{ action.title }}</div>\n </ng-container>\n </div>\n <!-- <shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>-->\n <ng-container *ngIf=\"fieldData.options?.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options?.hint)\">help_outline</mat-icon>\n </ng-container>\n } @else {\n <ng-container *ngComponentOutlet=\"fieldData.options?.showing?.customEditViewComponent;\n injector: componentDataInjector;\"/>\n }\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl && fieldControl['touched'] && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:#009ce542}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:9px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width label{position:absolute;margin-top:-9px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f;padding:10px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FormFieldErrorComponent, selector: "shared-form-field-error", inputs: ["fieldData", "form", "errorMessageTexts"] }, { kind: "component", type: FormFieldPublishErrorComponent, selector: "shared-form-field-publish-error", inputs: ["fieldData", "form", "entity", "errorMessageTexts"] }, { kind: "directive", type: i3$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["config", "fieldData", "form", "autoCompleteFields"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldFileComponent, selector: "shared-form-field-file", inputs: ["config", "fieldData", "form", "entity"] }, { kind: "component", type: FormFieldFilesComponent, selector: "shared-form-field-files", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldFileShowComponent, selector: "shared-form-field-file-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleShowComponent, selector: "shared-form-field-slide-toggle-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldInputShowComponent, selector: "shared-form-field-input-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldFilesShowComponent, selector: "shared-form-field-files-show", inputs: ["config", "fieldData", "entityId", "entitySection"] }, { kind: "component", type: FormFieldJsonShowComponent, selector: "shared-form-field-json-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldTagsComponent, selector: "shared-form-field-tags", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldTextareaShowComponent, selector: "shared-form-field-textarea-show", inputs: ["config", "fieldData", "value"] }], animations: [appearFromLeft], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9895
10082
|
}
|
|
9896
10083
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
9897
10084
|
type: Component,
|
|
9898
|
-
args: [{ selector: 'shared-form-field', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft], template: "<div *ngIf=\"!fieldData.options?.hide\"\n fxLayout=\"column\"\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle,\n 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{ fieldData.description }}\n </div>\n <ckeditor [formControlName]=\"fieldData.field\"\n [config]=\"ckeConfig\"></ckeditor>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</b>\n </div>\n </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n } @else {\n <shared-form-field-input-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-input-show>\n }\n </ng-container>\n </ng-container>\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{ action.title }}</div>\n </ng-container>\n </div>\n <!-- <shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>-->\n <ng-container *ngIf=\"fieldData.options?.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options?.hint)\">help_outline</mat-icon>\n </ng-container>\n } @else {\n <ng-container *ngComponentOutlet=\"fieldData.options?.showing?.customEditViewComponent;\n injector: componentDataInjector;\"/>\n }\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl && fieldControl['touched'] && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:#009ce542}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:9px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width label{position:absolute;margin-top:-9px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f}\n"] }]
|
|
10085
|
+
args: [{ selector: 'shared-form-field', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft], template: "<div *ngIf=\"!fieldData.options?.hide\"\n fxLayout=\"column\"\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle,\n 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width 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 <ckeditor [formControlName]=\"fieldData.field\"\n data=\"<p>Hello, world!</p>\"\n [editor]=\"Editor\"\n [config]=\"ckeConfig\"></ckeditor>\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</b>\n </div>\n </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n } @else {\n <shared-form-field-input-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-input-show>\n }\n </ng-container>\n </ng-container>\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{ action.title }}</div>\n </ng-container>\n </div>\n <!-- <shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>-->\n <ng-container *ngIf=\"fieldData.options?.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options?.hint)\">help_outline</mat-icon>\n </ng-container>\n } @else {\n <ng-container *ngComponentOutlet=\"fieldData.options?.showing?.customEditViewComponent;\n injector: componentDataInjector;\"/>\n }\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl && fieldControl['touched'] && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:#009ce542}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:9px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width label{position:absolute;margin-top:-9px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f;padding:10px}\n"] }]
|
|
9899
10086
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
9900
10087
|
type: Inject,
|
|
9901
10088
|
args: [CORE_CONFIG]
|
|
@@ -10243,13 +10430,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10243
10430
|
}] } });
|
|
10244
10431
|
|
|
10245
10432
|
class AutoFormMainComponent {
|
|
10246
|
-
constructor(formErrors, formsFacade, baseAutoFormService, autoFormService, publicationMessagesFacade, route, cd) {
|
|
10433
|
+
constructor(formErrors, formsFacade, baseAutoFormService, autoFormService, publicationMessagesFacade, route, renderer, cd) {
|
|
10247
10434
|
this.formErrors = formErrors;
|
|
10248
10435
|
this.formsFacade = formsFacade;
|
|
10249
10436
|
this.baseAutoFormService = baseAutoFormService;
|
|
10250
10437
|
this.autoFormService = autoFormService;
|
|
10251
10438
|
this.publicationMessagesFacade = publicationMessagesFacade;
|
|
10252
10439
|
this.route = route;
|
|
10440
|
+
this.renderer = renderer;
|
|
10253
10441
|
this.cd = cd;
|
|
10254
10442
|
this.showPublicationMessages = false;
|
|
10255
10443
|
this.useEntityPermissions = false;
|
|
@@ -10267,6 +10455,7 @@ class AutoFormMainComponent {
|
|
|
10267
10455
|
this.formSaveErrorKey = 'FORM_SAVE_ERROR';
|
|
10268
10456
|
this.groupsState = {};
|
|
10269
10457
|
this.isAvailableToUpdate = true;
|
|
10458
|
+
this.fieldTypes = FieldType;
|
|
10270
10459
|
}
|
|
10271
10460
|
ngOnInit() {
|
|
10272
10461
|
this.currentEntity = this.entity;
|
|
@@ -10281,12 +10470,125 @@ class AutoFormMainComponent {
|
|
|
10281
10470
|
if (this.useEntityPermissions) {
|
|
10282
10471
|
this.loadEntityPermissions();
|
|
10283
10472
|
}
|
|
10473
|
+
/*
|
|
10474
|
+
const customColorPalette = [
|
|
10475
|
+
{
|
|
10476
|
+
color: 'hsl(4, 90%, 58%)',
|
|
10477
|
+
label: 'Red'
|
|
10478
|
+
},
|
|
10479
|
+
{
|
|
10480
|
+
color: 'hsl(340, 82%, 52%)',
|
|
10481
|
+
label: 'Pink'
|
|
10482
|
+
},
|
|
10483
|
+
{
|
|
10484
|
+
color: 'hsl(291, 64%, 42%)',
|
|
10485
|
+
label: 'Purple'
|
|
10486
|
+
},
|
|
10487
|
+
{
|
|
10488
|
+
color: 'hsl(262, 52%, 47%)',
|
|
10489
|
+
label: 'Deep Purple'
|
|
10490
|
+
},
|
|
10491
|
+
{
|
|
10492
|
+
color: 'hsl(231, 48%, 48%)',
|
|
10493
|
+
label: 'Indigo'
|
|
10494
|
+
},
|
|
10495
|
+
{
|
|
10496
|
+
color: 'hsl(207, 90%, 54%)',
|
|
10497
|
+
label: 'Blue'
|
|
10498
|
+
},
|
|
10499
|
+
];
|
|
10500
|
+
this.Editor = ClassicEditor;
|
|
10501
|
+
this.ckeConfig = {
|
|
10502
|
+
licenseKey: 'GPL',
|
|
10503
|
+
plugins: [
|
|
10504
|
+
Essentials,
|
|
10505
|
+
Paragraph,
|
|
10506
|
+
Bold,
|
|
10507
|
+
Italic,
|
|
10508
|
+
List,
|
|
10509
|
+
SourceEditing,
|
|
10510
|
+
Table, TableToolbar, TableToolbar, TableProperties, TableCellProperties, TableColumnResize,
|
|
10511
|
+
Alignment,
|
|
10512
|
+
Link, AutoLink,
|
|
10513
|
+
ImageEditing, ImageBlockEditing,
|
|
10514
|
+
Image, ImageInsert, ImageToolbar, ImageCaption, ImageStyle, ImageResize, LinkImage,
|
|
10515
|
+
Fullscreen,
|
|
10516
|
+
Font, Highlight,
|
|
10517
|
+
Heading,
|
|
10518
|
+
ImageResizeEditing, ImageResizeHandles,
|
|
10519
|
+
ShowBlocks,
|
|
10520
|
+
GeneralHtmlSupport, Style, RemoveFormat,
|
|
10521
|
+
SimpleUploadAdapter
|
|
10522
|
+
],
|
|
10523
|
+
toolbar: [
|
|
10524
|
+
'undo', 'redo', '|',
|
|
10525
|
+
'heading', 'style', '|',
|
|
10526
|
+
'bold', 'italic', 'alignment', 'bulletedList', 'numberedList', '|',
|
|
10527
|
+
'tableProperties',
|
|
10528
|
+
'insertTable','|',
|
|
10529
|
+
'insertImage', '|', 'link', 'highlight', '|',
|
|
10530
|
+
'fontSize', 'fontColor', 'fontBackgroundColor', '|',
|
|
10531
|
+
'removeFormat', 'showBlocks', 'fullscreen', 'sourceEditing'
|
|
10532
|
+
],
|
|
10533
|
+
table: {
|
|
10534
|
+
contentToolbar: [
|
|
10535
|
+
'tableColumn', 'tableRow', 'mergeTableCells',
|
|
10536
|
+
'tableProperties', 'tableCellProperties'
|
|
10537
|
+
],
|
|
10538
|
+
|
|
10539
|
+
// Set the palettes for tables.
|
|
10540
|
+
tableProperties: {
|
|
10541
|
+
borderColors: customColorPalette,
|
|
10542
|
+
backgroundColors: customColorPalette
|
|
10543
|
+
},
|
|
10544
|
+
|
|
10545
|
+
// Set the palettes for table cells.
|
|
10546
|
+
tableCellProperties: {
|
|
10547
|
+
borderColors: customColorPalette,
|
|
10548
|
+
backgroundColors: customColorPalette
|
|
10549
|
+
}
|
|
10550
|
+
},
|
|
10551
|
+
heading: {
|
|
10552
|
+
options: [
|
|
10553
|
+
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
|
|
10554
|
+
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
|
|
10555
|
+
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' }
|
|
10556
|
+
]
|
|
10557
|
+
},
|
|
10558
|
+
style: {
|
|
10559
|
+
definitions: [
|
|
10560
|
+
{
|
|
10561
|
+
name: 'Article category',
|
|
10562
|
+
element: 'h3',
|
|
10563
|
+
classes: [ 'category' ]
|
|
10564
|
+
},
|
|
10565
|
+
{
|
|
10566
|
+
name: 'Info box',
|
|
10567
|
+
element: 'p',
|
|
10568
|
+
classes: [ 'info-box' ]
|
|
10569
|
+
},
|
|
10570
|
+
]
|
|
10571
|
+
},
|
|
10572
|
+
simpleUpload: {
|
|
10573
|
+
// The URL that the images are uploaded to.
|
|
10574
|
+
uploadUrl: `${newConfig.apiUrl}/api/files/browser/${this.entity.toLowerCase()}/${entityId}`,
|
|
10575
|
+
|
|
10576
|
+
// Enable the XMLHttpRequest.withCredentials property.
|
|
10577
|
+
withCredentials: true,
|
|
10578
|
+
|
|
10579
|
+
// Headers sent along with the XMLHttpRequest to the upload server.
|
|
10580
|
+
headers: {
|
|
10581
|
+
'X-CSRF-TOKEN': 'CSRF-Token',
|
|
10582
|
+
Authorization: 'Bearer <JSON Web Token>'
|
|
10583
|
+
}
|
|
10584
|
+
}
|
|
10585
|
+
};
|
|
10586
|
+
*/
|
|
10284
10587
|
}
|
|
10285
10588
|
ngOnDestroy() {
|
|
10286
10589
|
this.globalSubscription.unsubscribe();
|
|
10287
10590
|
}
|
|
10288
10591
|
ngOnChanges(changes) {
|
|
10289
|
-
console.log('ngOnChanges', changes);
|
|
10290
10592
|
if ((changes.entity && changes.entity.currentValue !== this.currentEntity) ||
|
|
10291
10593
|
(changes.itemId && changes.itemId.currentValue !== this.currentItemId)) {
|
|
10292
10594
|
this.globalSubscription.unsubscribe();
|
|
@@ -10295,7 +10597,6 @@ class AutoFormMainComponent {
|
|
|
10295
10597
|
}
|
|
10296
10598
|
}
|
|
10297
10599
|
groupClick(groupName) {
|
|
10298
|
-
console.log('2');
|
|
10299
10600
|
this.groupsState[groupName] = !this.groupsState[groupName];
|
|
10300
10601
|
}
|
|
10301
10602
|
truckByFieldName(index, item) {
|
|
@@ -10382,7 +10683,6 @@ class AutoFormMainComponent {
|
|
|
10382
10683
|
this.groupedFields[groupName].push({ ...formField });
|
|
10383
10684
|
}
|
|
10384
10685
|
});
|
|
10385
|
-
console.log('1');
|
|
10386
10686
|
Object.keys(this.groupedFields)?.forEach((group, index) => {
|
|
10387
10687
|
this.groupsState[group] = index === 0;
|
|
10388
10688
|
});
|
|
@@ -10536,7 +10836,7 @@ class AutoFormMainComponent {
|
|
|
10536
10836
|
}
|
|
10537
10837
|
}
|
|
10538
10838
|
catch (e) {
|
|
10539
|
-
console.
|
|
10839
|
+
console.error('[ auto-form-main ][ parse-current-user-data ]', currentUserDataString);
|
|
10540
10840
|
}
|
|
10541
10841
|
}
|
|
10542
10842
|
}
|
|
@@ -10550,13 +10850,13 @@ class AutoFormMainComponent {
|
|
|
10550
10850
|
}
|
|
10551
10851
|
return result;
|
|
10552
10852
|
}
|
|
10553
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AutoFormMainComponent, deps: [{ token: FormErrorsFacade }, { token: FormsFacade }, { token: BaseAutoFormService }, { token: AutoFormService }, { token: PublicationMessagesFacade }, { token: i2.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10554
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: { fields: "fields", itemId: ["itemId", "itemId", numberAttribute], formId: "formId", showPublicationMessages: "showPublicationMessages", useEntityPermissions: "useEntityPermissions", showProgressBar: "showProgressBar", showFormMessageBox: "showFormMessageBox", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", havePublication: "havePublication", config: "config" }, outputs: { changed: "changed", formCompleted: "formCompleted" }, usesOnChanges: true, ngImport: i0, template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && storedFormValue?._occupancyRating\"\n [value]=\"storedFormValue?._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{ group }}\n </h2>\n <div *ngIf=\"groupsState[group]\"\n [ngClass]=\"{'small-form-width': config?.smallFormWidth}\"\n class=\"row form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row\"\n [ngClass]=\"getFormFieldClass(item)\">\n <div *ngIf=\"isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [config]=\"config\"\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [fields]=\"fields\"\n [formData]=\"form.value\"\n [publicationMessages]=\"allPublicationMessages\"\n [autoCompleteFields]=\"autoCompleteFields\"\n [entityPermissionUpdateDanyFields]=\"entityPermissionUpdateDanyFields\"\n ></shared-form-field>\n </div>\n <div *ngIf=\"!isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-auto-form-show-field\n [config]=\"config\"\n [fieldData]=\"item\"\n [data]=\"form.value\"\n [entityId]=\"itemId\"\n [entitySection]=\"entity\"\n ></shared-auto-form-show-field>\n </div>\n </div>\n </div>\n</div>\n\n<div @appearFromLeft *ngIf=\"showFormMessageBox && dataStored && form.valid\" class=\"message-box warning mt-20 mb-10\">\n <ul>\n <li>{{ dataStoredTitle }}</li>\n </ul>\n</div>\n<shred-form-message-box\n *ngIf=\"showFormMessageBox\"\n
|
|
10853
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AutoFormMainComponent, deps: [{ token: FormErrorsFacade }, { token: FormsFacade }, { token: BaseAutoFormService }, { token: AutoFormService }, { token: PublicationMessagesFacade }, { token: i2.ActivatedRoute }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10854
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: { fields: "fields", itemId: ["itemId", "itemId", numberAttribute], formId: "formId", showPublicationMessages: "showPublicationMessages", useEntityPermissions: "useEntityPermissions", showProgressBar: "showProgressBar", showFormMessageBox: "showFormMessageBox", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", havePublication: "havePublication", config: "config" }, outputs: { changed: "changed", formCompleted: "formCompleted" }, usesOnChanges: true, ngImport: i0, template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && storedFormValue?._occupancyRating\"\n [value]=\"storedFormValue?._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{ group }}\n </h2>\n <div *ngIf=\"groupsState[group]\"\n [ngClass]=\"{'small-form-width': config?.smallFormWidth}\"\n class=\"row form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row\"\n [ngClass]=\"getFormFieldClass(item)\">\n <div *ngIf=\"isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [config]=\"config\"\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [fields]=\"fields\"\n [formData]=\"form.value\"\n [publicationMessages]=\"allPublicationMessages\"\n [autoCompleteFields]=\"autoCompleteFields\"\n [entityPermissionUpdateDanyFields]=\"entityPermissionUpdateDanyFields\"\n ></shared-form-field>\n </div>\n <div *ngIf=\"!isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-auto-form-show-field\n [config]=\"config\"\n [fieldData]=\"item\"\n [data]=\"form.value\"\n [entityId]=\"itemId\"\n [entitySection]=\"entity\"\n ></shared-auto-form-show-field>\n </div>\n </div>\n </div>\n</div>\n\n<div @appearFromLeft *ngIf=\"showFormMessageBox && dataStored && form.valid\" class=\"message-box warning mt-20 mb-10\">\n <ul>\n <li>{{ dataStoredTitle }}</li>\n </ul>\n</div>\n<shred-form-message-box\n *ngIf=\"showFormMessageBox\"\n [form]=\"form\"\n [fields]=\"fields\"\n [errorMessageTexts]=\"errorMessageTexts\"></shred-form-message-box>\n\n<ng-container *ngIf=\"showFormMessageBox && havePublication\">\n <ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #publicationMessages let-form=\"form\" let-entity=\"entity\" let-itemId=\"itemId\" let-fields=\"fields\">\n <shared-publication-messages\n *ngIf=\"itemId\"\n [@appearFromLeft]\n [form]=\"form\"\n [entity]=\"entity\"\n [itemId]=\"itemId\"\n [fields]=\"fields\"\n [havePublication]=\"havePublication\"\n (scrollToField)=\"scrollToField($event)\"></shared-publication-messages>\n</ng-template>\n\n<ng-container *ngIf=\"isAvailableToUpdate\">\n <ng-content select=\"[submitButton]\"></ng-content>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-wrap:wrap}.form-group{cursor:pointer;margin-bottom:0}.form-group h2{display:flex;transition:color .3s;align-items:center}.progress-bar{margin-bottom:10px}.form-field-row{margin:5px 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$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SmartProgressBarComponent, selector: "shared-smart-progress-bar", inputs: ["value", "title", "showValue"] }, { kind: "component", type: FormFieldComponent, selector: "shared-form-field", inputs: ["fields", "formData", "config", "fieldData", "itemId", "form", "editorImageUploadUrl", "errorMessageTexts", "entity", "publicationMessages", "entityTypeUserRoleRights", "autoCompleteFields", "entityPermissionUpdateDanyFields"], outputs: ["eventUpdateForm", "eventSendAction"] }, { kind: "component", type: AutoFormShowFieldComponent, selector: "shared-auto-form-show-field", inputs: ["fieldData", "data", "entityId", "entitySection", "config"] }, { kind: "component", type: FormMessageBoxComponent, selector: "shred-form-message-box", inputs: ["form", "fields", "errorMessageTexts"] }, { kind: "component", type: PublicationMessagesComponent, selector: "shared-publication-messages", inputs: ["entity", "form", "itemId", "fields", "config", "havePublication"], outputs: ["scrollToField"] }], animations: [appearFromLeft, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10555
10855
|
}
|
|
10556
10856
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AutoFormMainComponent, decorators: [{
|
|
10557
10857
|
type: Component,
|
|
10558
|
-
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && storedFormValue?._occupancyRating\"\n [value]=\"storedFormValue?._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{ group }}\n </h2>\n <div *ngIf=\"groupsState[group]\"\n [ngClass]=\"{'small-form-width': config?.smallFormWidth}\"\n class=\"row form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row\"\n [ngClass]=\"getFormFieldClass(item)\">\n <div *ngIf=\"isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [config]=\"config\"\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [fields]=\"fields\"\n [formData]=\"form.value\"\n [publicationMessages]=\"allPublicationMessages\"\n [autoCompleteFields]=\"autoCompleteFields\"\n [entityPermissionUpdateDanyFields]=\"entityPermissionUpdateDanyFields\"\n ></shared-form-field>\n </div>\n <div *ngIf=\"!isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-auto-form-show-field\n [config]=\"config\"\n [fieldData]=\"item\"\n [data]=\"form.value\"\n [entityId]=\"itemId\"\n [entitySection]=\"entity\"\n ></shared-auto-form-show-field>\n </div>\n </div>\n </div>\n</div>\n\n<div @appearFromLeft *ngIf=\"showFormMessageBox && dataStored && form.valid\" class=\"message-box warning mt-20 mb-10\">\n <ul>\n <li>{{ dataStoredTitle }}</li>\n </ul>\n</div>\n<shred-form-message-box\n *ngIf=\"showFormMessageBox\"\n
|
|
10559
|
-
}], ctorParameters: () => [{ type: FormErrorsFacade }, { type: FormsFacade }, { type: BaseAutoFormService }, { type: AutoFormService }, { type: PublicationMessagesFacade }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }], propDecorators: { fields: [{
|
|
10858
|
+
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && storedFormValue?._occupancyRating\"\n [value]=\"storedFormValue?._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{ group }}\n </h2>\n <div *ngIf=\"groupsState[group]\"\n [ngClass]=\"{'small-form-width': config?.smallFormWidth}\"\n class=\"row form-group-fields\">\n <div *ngFor=\"let item of groupedFields[group]; trackBy: truckByFieldName\"\n class=\"form-field-row\"\n [ngClass]=\"getFormFieldClass(item)\">\n <div *ngIf=\"isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-form-field\n [config]=\"config\"\n [itemId]=\"itemId\"\n [fieldData]=\"item\"\n [form]=\"form\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [editorImageUploadUrl]=\"editorImageUploadUrl\"\n [entity]=\"entity\"\n [fields]=\"fields\"\n [formData]=\"form.value\"\n [publicationMessages]=\"allPublicationMessages\"\n [autoCompleteFields]=\"autoCompleteFields\"\n [entityPermissionUpdateDanyFields]=\"entityPermissionUpdateDanyFields\"\n ></shared-form-field>\n </div>\n <div *ngIf=\"!isAvailableToUpdate\" [ngClass]=\"{'field-tab': group}\">\n <shared-auto-form-show-field\n [config]=\"config\"\n [fieldData]=\"item\"\n [data]=\"form.value\"\n [entityId]=\"itemId\"\n [entitySection]=\"entity\"\n ></shared-auto-form-show-field>\n </div>\n </div>\n </div>\n</div>\n\n<div @appearFromLeft *ngIf=\"showFormMessageBox && dataStored && form.valid\" class=\"message-box warning mt-20 mb-10\">\n <ul>\n <li>{{ dataStoredTitle }}</li>\n </ul>\n</div>\n<shred-form-message-box\n *ngIf=\"showFormMessageBox\"\n [form]=\"form\"\n [fields]=\"fields\"\n [errorMessageTexts]=\"errorMessageTexts\"></shred-form-message-box>\n\n<ng-container *ngIf=\"showFormMessageBox && havePublication\">\n <ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #publicationMessages let-form=\"form\" let-entity=\"entity\" let-itemId=\"itemId\" let-fields=\"fields\">\n <shared-publication-messages\n *ngIf=\"itemId\"\n [@appearFromLeft]\n [form]=\"form\"\n [entity]=\"entity\"\n [itemId]=\"itemId\"\n [fields]=\"fields\"\n [havePublication]=\"havePublication\"\n (scrollToField)=\"scrollToField($event)\"></shared-publication-messages>\n</ng-template>\n\n<ng-container *ngIf=\"isAvailableToUpdate\">\n <ng-content select=\"[submitButton]\"></ng-content>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-wrap:wrap}.form-group{cursor:pointer;margin-bottom:0}.form-group h2{display:flex;transition:color .3s;align-items:center}.progress-bar{margin-bottom:10px}.form-field-row{margin:5px 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"] }]
|
|
10859
|
+
}], ctorParameters: () => [{ type: FormErrorsFacade }, { type: FormsFacade }, { type: BaseAutoFormService }, { type: AutoFormService }, { type: PublicationMessagesFacade }, { type: i2.ActivatedRoute }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { fields: [{
|
|
10560
10860
|
type: Input,
|
|
10561
10861
|
args: [{ required: true }]
|
|
10562
10862
|
}], itemId: [{
|
|
@@ -11852,11 +12152,11 @@ class StaticDataListItemsComponent {
|
|
|
11852
12152
|
this.loadStaticData(this.pageIndex + 1, data.pageSize);
|
|
11853
12153
|
}
|
|
11854
12154
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StaticDataListItemsComponent, deps: [{ token: i1$4.MatDialog }, { token: RightService }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }, { token: RouterFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11855
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: { staticDataConfiguration: "staticDataConfiguration", contentType: "contentType", customTitle: "customTitle", addTitle: "addTitle", parentSection: "parentSection", parentItemId: "parentItemId", showPanelHeader: "showPanelHeader", parentData: "parentData", parentSectionHashtag: "parentSectionHashtag", autoCompleteFields: "autoCompleteFields", filteringQuery: "filteringQuery" }, 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: "<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <mat-card-header>\n <mat-card-title>\n <h5 class=\"mb-0\">{{ title }}</h5>\n </mat-card-title>\n <mat-card-subtitle *ngIf=\"staticSection.options?.search\">\n <form class=\"search-box position-relative\">\n <input #search class=\"search-input\" placeholder=\"\u041F\u043E\u0438\u0441\u043A\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </form>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <!--<shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>-->\n <div class=\"table-responsive\">\n <div class=\"content p-24\">\n <!--<div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A: <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>-->\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1 && staticDataObj.meta?.totalCount > 10\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[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=\"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<!--\n<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>\n\n <h1>{{title}}</h1>\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A: <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[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=\"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 </ng-container>\n</ng-container>\n\n-->\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}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { 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: "component", type: i10.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i10.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i10.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i10.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "component", type: StaticDataItemsComponent, selector: "app-static-data-items", inputs: ["items", "contentType", "queryParams", "userRights", "staticSection"], outputs: ["delete"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12155
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: { staticDataConfiguration: "staticDataConfiguration", contentType: "contentType", customTitle: "customTitle", addTitle: "addTitle", parentSection: "parentSection", parentItemId: "parentItemId", showPanelHeader: "showPanelHeader", parentData: "parentData", parentSectionHashtag: "parentSectionHashtag", autoCompleteFields: "autoCompleteFields", filteringQuery: "filteringQuery" }, 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: "<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <mat-card-header>\n <mat-card-title>\n <h1 class=\"mb-0\">{{ title }}</h1>\n </mat-card-title>\n <mat-card-subtitle *ngIf=\"staticSection.options?.search\">\n <form class=\"search-box position-relative\">\n <input #search class=\"search-input\" placeholder=\"\u041F\u043E\u0438\u0441\u043A\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </form>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <!--<shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>-->\n <div class=\"table-responsive\">\n <div class=\"content p-24\">\n <!--<div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A: <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>-->\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1 && staticDataObj.meta?.totalCount > 10\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[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=\"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<!--\n<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>\n\n <h1>{{title}}</h1>\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A: <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[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=\"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 </ng-container>\n</ng-container>\n\n-->\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}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { 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: "component", type: i10.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i10.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i10.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i10.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "component", type: StaticDataItemsComponent, selector: "app-static-data-items", inputs: ["items", "contentType", "queryParams", "userRights", "staticSection"], outputs: ["delete"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11856
12156
|
}
|
|
11857
12157
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StaticDataListItemsComponent, decorators: [{
|
|
11858
12158
|
type: Component,
|
|
11859
|
-
args: [{ selector: 'app-static-data-list-items', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <mat-card-header>\n <mat-card-title>\n <
|
|
12159
|
+
args: [{ selector: 'app-static-data-list-items', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <mat-card-header>\n <mat-card-title>\n <h1 class=\"mb-0\">{{ title }}</h1>\n </mat-card-title>\n <mat-card-subtitle *ngIf=\"staticSection.options?.search\">\n <form class=\"search-box position-relative\">\n <input #search class=\"search-input\" placeholder=\"\u041F\u043E\u0438\u0441\u043A\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </form>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <!--<shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>-->\n <div class=\"table-responsive\">\n <div class=\"content p-24\">\n <!--<div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A: <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>-->\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1 && staticDataObj.meta?.totalCount > 10\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[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=\"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<!--\n<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>\n\n <h1>{{title}}</h1>\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A: <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[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=\"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 </ng-container>\n</ng-container>\n\n-->\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}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}\n"] }]
|
|
11860
12160
|
}], ctorParameters: () => [{ type: i1$4.MatDialog }, { type: RightService }, { type: StaticDataFacade }, { type: i0.ChangeDetectorRef }, { type: RouterFacade }], propDecorators: { staticDataConfiguration: [{
|
|
11861
12161
|
type: Input
|
|
11862
12162
|
}], contentType: [{
|
|
@@ -13263,7 +13563,7 @@ class StickySidebarDirective {
|
|
|
13263
13563
|
}
|
|
13264
13564
|
supportTransform(transform3d = false) {
|
|
13265
13565
|
let result = null;
|
|
13266
|
-
const property = transform3d ? 'perspective' : 'transform', upper = property.charAt(0).toUpperCase() + property.slice(1), prefixes = ['Webkit', 'Moz', 'O', 'ms'], support =
|
|
13566
|
+
const property = transform3d ? 'perspective' : 'transform', upper = property.charAt(0).toUpperCase() + property.slice(1), prefixes = ['Webkit', 'Moz', 'O', 'ms'], support = this.renderer.createElement('support'), style = support.style;
|
|
13267
13567
|
(property + ' ' + prefixes.join(upper + ' ') + upper).split(' ').forEach(function (property, i) {
|
|
13268
13568
|
if (style[property] !== undefined) {
|
|
13269
13569
|
result = property;
|
|
@@ -13609,14 +13909,22 @@ class HeadersInterceptor {
|
|
|
13609
13909
|
this.updateRequestData(request.urlWithParams, request.method, errResponse.status, requestError, errResponse.error?.meta?.formId);
|
|
13610
13910
|
const currentHost = this.getDomainByUrl(window.location.host);
|
|
13611
13911
|
const requestDomain = this.getDomainByUrl(request.url);
|
|
13612
|
-
|
|
13912
|
+
if (errResponse.status !== 401) {
|
|
13913
|
+
const notification = {
|
|
13914
|
+
id: 5,
|
|
13915
|
+
type: 'error',
|
|
13916
|
+
text: 'Произошла ошибка выполнения запроса, проверьте правильность заполненных данных и повторите запрос.',
|
|
13917
|
+
timeout: 10000
|
|
13918
|
+
};
|
|
13919
|
+
this.notificationsFacade.addNotifications(notification);
|
|
13920
|
+
}
|
|
13613
13921
|
if (currentHost === requestDomain) {
|
|
13614
13922
|
if (errResponse.status === 401) {
|
|
13615
13923
|
return this.handle401Error(errResponse, userInfo, request, next);
|
|
13616
13924
|
}
|
|
13617
13925
|
if (errResponse.status === 422 && errResponse.error) {
|
|
13618
13926
|
if (errResponse.error.formErrors) {
|
|
13619
|
-
this.checkErrors(errResponse.error.formErrors);
|
|
13927
|
+
this.checkErrors(errResponse.error.formErrors?.error || errResponse.error.formErrors);
|
|
13620
13928
|
}
|
|
13621
13929
|
if (errResponse.error.formId) {
|
|
13622
13930
|
this.formsFacade.updateForm({
|
|
@@ -13834,21 +14142,20 @@ class HeadersInterceptor {
|
|
|
13834
14142
|
this.publicationMessagesFacade.publishPostFail();
|
|
13835
14143
|
}
|
|
13836
14144
|
}
|
|
13837
|
-
checkErrors(
|
|
14145
|
+
checkErrors(errors) {
|
|
13838
14146
|
let list = [];
|
|
13839
|
-
if (Array.isArray(
|
|
13840
|
-
list =
|
|
14147
|
+
if (Array.isArray(errors)) {
|
|
14148
|
+
list = errors;
|
|
13841
14149
|
}
|
|
13842
|
-
else if (typeof
|
|
13843
|
-
list = Object.values(
|
|
14150
|
+
else if (typeof errors === 'object') {
|
|
14151
|
+
list = Object.values(errors);
|
|
13844
14152
|
}
|
|
13845
14153
|
list.forEach(errorItem => {
|
|
13846
|
-
const { formId, form_id, field, message, errorMessage, errorCode } = errorItem;
|
|
13847
14154
|
const formError = {
|
|
13848
|
-
formId: formId
|
|
13849
|
-
field,
|
|
13850
|
-
message: message || errorMessage,
|
|
13851
|
-
code: errorCode ||
|
|
14155
|
+
formId: errorItem.formId,
|
|
14156
|
+
field: errorItem.field,
|
|
14157
|
+
message: errorItem.message || errorItem.errorMessage,
|
|
14158
|
+
code: errorItem.errorCode || errorItem.errors
|
|
13852
14159
|
};
|
|
13853
14160
|
if (formError.formId) {
|
|
13854
14161
|
this.formErrorsFacade.saveError(formError);
|