wt-front-shared 19.0.29 → 19.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/wt-front-shared.mjs +170 -47
- package/fesm2022/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/static-data/static-data.facade.d.ts +1 -1
- package/lib/core/+state/static-data/static-data.selectors.d.ts +1 -1
- package/lib/core/components/auto-form/auto-form.module.d.ts +36 -34
- package/lib/core/components/auto-form/components/form-field-string-list-input/form-field-string-list-input.component.d.ts +26 -0
- package/lib/core/components/auto-form/interfaces/field-type.d.ts +2 -1
- package/lib/core/components/auto-form/interfaces/form-field-others.d.ts +8 -0
- package/lib/core/components/icon/icon.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ import { MatIconModule, MatIcon } from '@angular/material/icon';
|
|
|
26
26
|
import * as i2$1 from '@angular/material/progress-spinner';
|
|
27
27
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
28
28
|
import * as i4 from '@angular/forms';
|
|
29
|
-
import { Validators, FormControl, UntypedFormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
29
|
+
import { Validators, FormControl, FormGroup, UntypedFormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
30
30
|
import { switchMap as switchMap$2 } from 'rxjs/internal/operators/switchMap';
|
|
31
31
|
import * as i3$1 from 'ngx-cookie-service';
|
|
32
32
|
import objectHash from 'object-hash';
|
|
@@ -2657,7 +2657,6 @@ class UsersService extends BaseAPIService {
|
|
|
2657
2657
|
return this.doRequest(config, AuthEndpointTypes.LOGIN_SEND);
|
|
2658
2658
|
}
|
|
2659
2659
|
refreshToken(config) {
|
|
2660
|
-
console.log('[ user.service ][ refreshToken ]');
|
|
2661
2660
|
return this.doRequest(config, AuthEndpointTypes.REFRESH_TOKEN);
|
|
2662
2661
|
}
|
|
2663
2662
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UsersService, deps: [{ token: i1$2.HttpClient }, { token: CORE_CONFIG }, { token: RequestsFacade }, { token: FormsFacade }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -3380,11 +3379,11 @@ class IconComponent {
|
|
|
3380
3379
|
}
|
|
3381
3380
|
}
|
|
3382
3381
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3383
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: IconComponent, isStandalone: false, selector: "shared-ui-icon", inputs: { icon: "icon", size: "size", color: "color" }, usesOnChanges: true, ngImport: i0, template: "<mat-icon\n [ngClass]=\"'icon-size-' + size + ' color-' + color + ' ' + iconSize\"\n class=\"secondary-text mat-icon notranslate material-icons\"\n role=\"img\"\n aria-hidden=\"true\">{{icon}}</mat-icon>\n", styles: [":host{display:inline-flex;align-items:center}.
|
|
3382
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: IconComponent, isStandalone: false, selector: "shared-ui-icon", inputs: { icon: "icon", size: "size", color: "color" }, usesOnChanges: true, ngImport: i0, template: "<mat-icon\n [ngClass]=\"'icon-size-' + size + ' color-' + color + ' ' + iconSize\"\n class=\"secondary-text mat-icon notranslate material-icons\"\n role=\"img\"\n aria-hidden=\"true\">{{icon}}</mat-icon>\n", styles: [":host{display:inline-flex;align-items:center}.orange-gray{color:#c17e5d!important}.color-yellow{color:#fcb202!important}.color-red{color:#f44336!important}.color-white{color:#fff9!important}.color-green{color:#09b005!important}.color-black{color:#000000de!important}.s-18{font-size:18px}.s-22{font-size:22px}mat-icon{width:auto!important;height:auto!important}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3384
3383
|
}
|
|
3385
3384
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: IconComponent, decorators: [{
|
|
3386
3385
|
type: Component,
|
|
3387
|
-
args: [{ selector: 'shared-ui-icon', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<mat-icon\n [ngClass]=\"'icon-size-' + size + ' color-' + color + ' ' + iconSize\"\n class=\"secondary-text mat-icon notranslate material-icons\"\n role=\"img\"\n aria-hidden=\"true\">{{icon}}</mat-icon>\n", styles: [":host{display:inline-flex;align-items:center}.
|
|
3386
|
+
args: [{ selector: 'shared-ui-icon', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<mat-icon\n [ngClass]=\"'icon-size-' + size + ' color-' + color + ' ' + iconSize\"\n class=\"secondary-text mat-icon notranslate material-icons\"\n role=\"img\"\n aria-hidden=\"true\">{{icon}}</mat-icon>\n", styles: [":host{display:inline-flex;align-items:center}.orange-gray{color:#c17e5d!important}.color-yellow{color:#fcb202!important}.color-red{color:#f44336!important}.color-white{color:#fff9!important}.color-green{color:#09b005!important}.color-black{color:#000000de!important}.s-18{font-size:18px}.s-22{font-size:22px}mat-icon{width:auto!important;height:auto!important}\n"] }]
|
|
3388
3387
|
}], propDecorators: { icon: [{
|
|
3389
3388
|
type: Input
|
|
3390
3389
|
}], size: [{
|
|
@@ -5611,7 +5610,9 @@ var IFormFieldFormat;
|
|
|
5611
5610
|
class BaseAutoFormService {
|
|
5612
5611
|
getPreparedFields(fields, formData) {
|
|
5613
5612
|
const result = {};
|
|
5614
|
-
fields
|
|
5613
|
+
fields
|
|
5614
|
+
.filter(field => !field.options || !field.options.hide)
|
|
5615
|
+
.forEach((item) => {
|
|
5615
5616
|
let validators = [];
|
|
5616
5617
|
let asyncValidators = [];
|
|
5617
5618
|
let needToShow = true;
|
|
@@ -6951,7 +6952,7 @@ const getStaticDataRevisionsList = (contentTypes) => createSelector(getStaticDat
|
|
|
6951
6952
|
}
|
|
6952
6953
|
return result;
|
|
6953
6954
|
});
|
|
6954
|
-
const getStaticData = (contentType, subSection, where) => createSelector(getDataByType(contentType, subSection), getLoaded$1(contentType, subSection), (listDataModels, isLoaded) => {
|
|
6955
|
+
const getStaticData = (contentType, subSection, where, fillStoreKey = '') => createSelector(getDataByType(contentType, subSection), getLoaded$1(contentType, subSection), (listDataModels, isLoaded) => {
|
|
6955
6956
|
// console.log('getStaticData');
|
|
6956
6957
|
let list = isLoaded ? listDataModels : null;
|
|
6957
6958
|
if (where && list?.length) {
|
|
@@ -7061,8 +7062,8 @@ class StaticDataFacade {
|
|
|
7061
7062
|
getStaticDataMeta$(contentType, subSection = 'list') {
|
|
7062
7063
|
return this.store.pipe(select(staticDataQuery.getStaticDataMeta(contentType, subSection)));
|
|
7063
7064
|
}
|
|
7064
|
-
getStaticData$(contentType, subSection = 'list', options, where) {
|
|
7065
|
-
return this.store.pipe(select(staticDataQuery.getStaticData(contentType, subSection, where)), distinctUntilChanged((a, b) => objectHash(a) === objectHash(b)));
|
|
7065
|
+
getStaticData$(contentType, subSection = 'list', options, where, fillStoreKey = '') {
|
|
7066
|
+
return this.store.pipe(select(staticDataQuery.getStaticData(contentType, subSection, where, fillStoreKey)), distinctUntilChanged((a, b) => objectHash(a) === objectHash(b)));
|
|
7066
7067
|
}
|
|
7067
7068
|
getOrLoadStaticData$(contentType, subSection = 'list', options, where, loadParams) {
|
|
7068
7069
|
const defaultParams = {
|
|
@@ -7543,11 +7544,9 @@ class StaticDataCreateWithSubEntitiesBehavior extends Behavior {
|
|
|
7543
7544
|
const error = this.result.data?.body?.error;
|
|
7544
7545
|
let returnedActions;
|
|
7545
7546
|
const response = this.result.data;
|
|
7546
|
-
console.log('status', status);
|
|
7547
7547
|
switch (status) {
|
|
7548
7548
|
case ResponseStatus.STATUS_200: {
|
|
7549
7549
|
const { data, meta } = response.body;
|
|
7550
|
-
console.log('data', data);
|
|
7551
7550
|
returnedActions = [
|
|
7552
7551
|
StaticDataCreateWithSubEntitiesSuccess({ payload: { data, contentType: meta.staticDataType, itemId: data.id } }),
|
|
7553
7552
|
];
|
|
@@ -8238,6 +8237,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
8238
8237
|
const getStore = (storeKey) => {
|
|
8239
8238
|
let rootStore = storeKey;
|
|
8240
8239
|
let nestedStore = '';
|
|
8240
|
+
if (!storeKey) {
|
|
8241
|
+
console.error('[ core.selector ][ storeKey not found ]');
|
|
8242
|
+
return undefined;
|
|
8243
|
+
}
|
|
8241
8244
|
if (storeKey.includes('.')) {
|
|
8242
8245
|
const params = storeKey.split('.');
|
|
8243
8246
|
rootStore = params[0];
|
|
@@ -8557,7 +8560,11 @@ class FormFieldSelectComponent {
|
|
|
8557
8560
|
this.subscribeToSearchChange();
|
|
8558
8561
|
if (this.fieldData.options?.loadOptionFromStore) {
|
|
8559
8562
|
// staticData.list.support-messages
|
|
8560
|
-
this.selectOptionsFromStore(this.fieldData.options.loadOptionFromStore, this.storeSubList);
|
|
8563
|
+
this.selectOptionsFromStore(this.fieldData.options.loadOptionFromStore, this.storeSubList, this.fieldData.options?.loadOptionFromStoreGetItems);
|
|
8564
|
+
}
|
|
8565
|
+
if (this.fieldData.options?.selectOptions?.length) {
|
|
8566
|
+
this.isLoading = false;
|
|
8567
|
+
this.options = this.fieldData.options?.selectOptions;
|
|
8561
8568
|
}
|
|
8562
8569
|
}
|
|
8563
8570
|
ngOnDestroy() {
|
|
@@ -8649,11 +8656,12 @@ class FormFieldSelectComponent {
|
|
|
8649
8656
|
this.hasRelatedData = !!relatedFieldValue;
|
|
8650
8657
|
}
|
|
8651
8658
|
}
|
|
8652
|
-
|
|
8659
|
+
// 'staticData.list.business-settings[0].settings.notifications.telegram.channels'
|
|
8660
|
+
selectOptionsFromStore(loadOptionFromStore, subList, loadOptionFromStoreGetItems = undefined) {
|
|
8653
8661
|
const listKeys = loadOptionFromStore.split('.');
|
|
8654
8662
|
let storeSelector;
|
|
8655
8663
|
if (listKeys[0] === 'staticData') {
|
|
8656
|
-
storeSelector = this.staticDataFacade.getStaticData$(listKeys[2], subList || 'list');
|
|
8664
|
+
storeSelector = this.staticDataFacade.getStaticData$(listKeys[2], subList || 'list', null, null, loadOptionFromStore);
|
|
8657
8665
|
}
|
|
8658
8666
|
else {
|
|
8659
8667
|
storeSelector = this.store.pipe(select(coreQuery.getStore(loadOptionFromStore)));
|
|
@@ -8678,6 +8686,14 @@ class FormFieldSelectComponent {
|
|
|
8678
8686
|
newOptions = [];
|
|
8679
8687
|
}
|
|
8680
8688
|
*/
|
|
8689
|
+
if (newOptions?.length && loadOptionFromStoreGetItems) {
|
|
8690
|
+
try {
|
|
8691
|
+
newOptions = loadOptionFromStoreGetItems(newOptions);
|
|
8692
|
+
}
|
|
8693
|
+
catch (e) {
|
|
8694
|
+
console.error('[ form-list-select ][ loadOptionFromStoreGetItems ]', e, loadOptionFromStoreGetItems);
|
|
8695
|
+
}
|
|
8696
|
+
}
|
|
8681
8697
|
newOptions = this.sortOptionItemsByName(newOptions);
|
|
8682
8698
|
if (this.fieldData.options?.nestedByField) {
|
|
8683
8699
|
newOptions = this.groupItemsByNestedField(newOptions);
|
|
@@ -8800,6 +8816,7 @@ var FieldType;
|
|
|
8800
8816
|
FieldType["FieldTypeRating"] = "rating";
|
|
8801
8817
|
FieldType["FieldTypeTags"] = "tags";
|
|
8802
8818
|
FieldType["FieldTypeJSON"] = "json";
|
|
8819
|
+
FieldType["FieldTypeInputStringList"] = "input--string-list";
|
|
8803
8820
|
})(FieldType || (FieldType = {}));
|
|
8804
8821
|
|
|
8805
8822
|
class SmartProgressBarComponent {
|
|
@@ -9019,12 +9036,10 @@ class FormFieldSelectShowComponent {
|
|
|
9019
9036
|
this.coreFacade.getStoreByName(keyFromStore)
|
|
9020
9037
|
.pipe(takeUntil(this.destroy$))
|
|
9021
9038
|
.subscribe(items => {
|
|
9022
|
-
console.log('items', this.fieldData.field, items, ids);
|
|
9023
9039
|
if (items?.list?.length) {
|
|
9024
9040
|
this.listItems = items.list
|
|
9025
9041
|
.filter(item => ids.includes(item.id) || ids.includes(String(item.id)))
|
|
9026
9042
|
.map(item => item.name || `Номер ${item.id}`);
|
|
9027
|
-
console.log('this.listItems', this.fieldData.field, this.listItems);
|
|
9028
9043
|
if (ids.length && !this.listItems?.length) {
|
|
9029
9044
|
this.listItems = ([...ids]);
|
|
9030
9045
|
}
|
|
@@ -9130,6 +9145,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
9130
9145
|
args: ['input', { static: false }]
|
|
9131
9146
|
}] } });
|
|
9132
9147
|
|
|
9148
|
+
class FormFieldStringListInputComponent {
|
|
9149
|
+
constructor(fb) {
|
|
9150
|
+
this.fb = fb;
|
|
9151
|
+
// @ViewChild('input', {static: false}) input: ElementRef<HTMLInputElement>;
|
|
9152
|
+
this.placeholder = '';
|
|
9153
|
+
this.destroy$ = new Subject();
|
|
9154
|
+
}
|
|
9155
|
+
ngOnInit() {
|
|
9156
|
+
this.initForm();
|
|
9157
|
+
this.subscribeToFormChanges();
|
|
9158
|
+
this.form.valueChanges
|
|
9159
|
+
.pipe(takeUntil(this.destroy$))
|
|
9160
|
+
.subscribe(() => {
|
|
9161
|
+
console.log('form.valueChanges', this.form.value);
|
|
9162
|
+
});
|
|
9163
|
+
}
|
|
9164
|
+
ngOnDestroy() {
|
|
9165
|
+
this.destroy$.next();
|
|
9166
|
+
this.destroy$.complete();
|
|
9167
|
+
}
|
|
9168
|
+
get items() {
|
|
9169
|
+
return this.mainForm.get('items');
|
|
9170
|
+
}
|
|
9171
|
+
addItem() {
|
|
9172
|
+
this.items.push(this.fb.control('', Validators.required));
|
|
9173
|
+
}
|
|
9174
|
+
// Remove a control by index
|
|
9175
|
+
removeItem(index) {
|
|
9176
|
+
this.items.removeAt(index);
|
|
9177
|
+
console.log('removeItem', this.getFormValue());
|
|
9178
|
+
this.setFieldValue();
|
|
9179
|
+
}
|
|
9180
|
+
subscribeToFormChanges() {
|
|
9181
|
+
this.items.valueChanges
|
|
9182
|
+
.pipe(takeUntil(this.destroy$))
|
|
9183
|
+
.subscribe(() => {
|
|
9184
|
+
console.log('items.valueChanges', this.getFormValue());
|
|
9185
|
+
this.setFieldValue();
|
|
9186
|
+
});
|
|
9187
|
+
}
|
|
9188
|
+
setFieldValue() {
|
|
9189
|
+
this.form.patchValue({ [this.fieldData.field]: this.getFormValue() });
|
|
9190
|
+
}
|
|
9191
|
+
getFormValue() {
|
|
9192
|
+
if (this.fieldData.options?.inputStringList?.separator) {
|
|
9193
|
+
return this.items.value.join(this.fieldData.options?.inputStringList?.separator);
|
|
9194
|
+
}
|
|
9195
|
+
return this.items.value;
|
|
9196
|
+
}
|
|
9197
|
+
initForm() {
|
|
9198
|
+
this.mainForm = new FormGroup({
|
|
9199
|
+
items: this.fb.array([]),
|
|
9200
|
+
});
|
|
9201
|
+
const fieldInputValue = this.form.get(this.fieldData.field).value;
|
|
9202
|
+
if (fieldInputValue) {
|
|
9203
|
+
if (this.fieldData.options?.inputStringList?.separator) {
|
|
9204
|
+
fieldInputValue.split(this.fieldData.options?.inputStringList?.separator)
|
|
9205
|
+
.forEach(item => this.items.push(this.fb.control(item)));
|
|
9206
|
+
}
|
|
9207
|
+
}
|
|
9208
|
+
this.form.updateValueAndValidity();
|
|
9209
|
+
}
|
|
9210
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldStringListInputComponent, deps: [{ token: i4.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9211
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldStringListInputComponent, isStandalone: false, selector: "shared-form-field-string-list-input", inputs: { config: "config", fieldData: "fieldData", form: "form" }, ngImport: i0, template: "<div class=\"textarea-field-width string-list-field\">\n <form [formGroup]=\"mainForm\">\n <mat-label\n class=\"label-field\"\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n\n <div class=\"items\" formArrayName=\"items\">\n <div class=\"row\" *ngFor=\"let item of items.controls; let i = index\">\n <div class=\"col-11\">\n <input class=\"list-item\" matInput [formControlName]=\"i\" placeholder=\"\u0417\u0430\u043F\u0438\u0441\u044C {{ i + 1 }}\">\n </div>\n <div class=\"col-1 d-flex justify-content-center align-items-center\">\n <button class=\"no-border\" type=\"button\" (click)=\"removeItem(i)\">\n <shared-ui-icon icon=\"close\" color=\"red\"></shared-ui-icon>\n </button>\n </div>\n </div>\n <div class=\"text-center mt-10\">\n <button class=\"no-border\" type=\"button\" (click)=\"addItem()\">\n <shared-ui-icon icon=\"add\" size=\"xs\" color=\"green\"></shared-ui-icon>\n </button>\n </div>\n </div>\n </form>\n</div>\n", styles: [".label-field{position:absolute;background:#f8f8f8;margin:-11px 0 0 13px;padding:0 10px;font-size:12px}.items{border:1px solid #bfb7b7;border-radius:8px;padding:10px}.list-item{background:#efefef}.list-item .row{margin-bottom:5px}.no-border{border:none;background:transparent!important}\n"], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: IconComponent, selector: "shared-ui-icon", inputs: ["icon", "size", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9212
|
+
}
|
|
9213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldStringListInputComponent, decorators: [{
|
|
9214
|
+
type: Component,
|
|
9215
|
+
args: [{ selector: 'shared-form-field-string-list-input', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"textarea-field-width string-list-field\">\n <form [formGroup]=\"mainForm\">\n <mat-label\n class=\"label-field\"\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</mat-label>\n\n <div class=\"items\" formArrayName=\"items\">\n <div class=\"row\" *ngFor=\"let item of items.controls; let i = index\">\n <div class=\"col-11\">\n <input class=\"list-item\" matInput [formControlName]=\"i\" placeholder=\"\u0417\u0430\u043F\u0438\u0441\u044C {{ i + 1 }}\">\n </div>\n <div class=\"col-1 d-flex justify-content-center align-items-center\">\n <button class=\"no-border\" type=\"button\" (click)=\"removeItem(i)\">\n <shared-ui-icon icon=\"close\" color=\"red\"></shared-ui-icon>\n </button>\n </div>\n </div>\n <div class=\"text-center mt-10\">\n <button class=\"no-border\" type=\"button\" (click)=\"addItem()\">\n <shared-ui-icon icon=\"add\" size=\"xs\" color=\"green\"></shared-ui-icon>\n </button>\n </div>\n </div>\n </form>\n</div>\n", styles: [".label-field{position:absolute;background:#f8f8f8;margin:-11px 0 0 13px;padding:0 10px;font-size:12px}.items{border:1px solid #bfb7b7;border-radius:8px;padding:10px}.list-item{background:#efefef}.list-item .row{margin-bottom:5px}.no-border{border:none;background:transparent!important}\n"] }]
|
|
9216
|
+
}], ctorParameters: () => [{ type: i4.FormBuilder }], propDecorators: { config: [{
|
|
9217
|
+
type: Input
|
|
9218
|
+
}], fieldData: [{
|
|
9219
|
+
type: Input
|
|
9220
|
+
}], form: [{
|
|
9221
|
+
type: Input
|
|
9222
|
+
}] } });
|
|
9223
|
+
|
|
9133
9224
|
class ImageComponent {
|
|
9134
9225
|
constructor() {
|
|
9135
9226
|
this.haveZoom = false;
|
|
@@ -10432,11 +10523,11 @@ class FormFieldComponent {
|
|
|
10432
10523
|
});
|
|
10433
10524
|
}
|
|
10434
10525
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldComponent, deps: [{ token: PLATFORM_ID }, { token: CoreFacade }, { token: i0.ChangeDetectorRef }, { token: i1$5.MatDialog }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10435
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormFieldComponent, isStandalone: false, selector: "shared-form-field", inputs: { fields: "fields", formData: "formData", config: "config", fieldData: "fieldData", itemId: "itemId", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", publicationMessages: "publicationMessages", entityTypeUserRoleRights: "entityTypeUserRoleRights", autoCompleteFields: "autoCompleteFields", entityPermissionUpdateDanyFields: "entityPermissionUpdateDanyFields" }, outputs: { eventUpdateForm: "eventUpdateForm", eventSendAction: "eventSendAction" }, ngImport: i0, template: "<div *ngIf=\"!fieldData.options?.hide\"\n #formField\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle,\n 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n <label *ngIf=\"config.formFormat === formFormateType.LABEL_INPUT\">{{ fieldData.title }}: </label>\n <div class=\"form-field-container\">\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width text-area-editor editor-field\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{ fieldData.description }}\n </div>\n @defer (on viewport(formField)) {\n <shared-form-field-cheditor [fieldDataField]=\"fieldData.field\"\n [form]=\"form\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"></shared-form-field-cheditor>\n } @placeholder {\n shared-form-field-cheditor\n }\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</b>\n </div>\n </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.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</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:#009ce542}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:11px;top:0;font-size:20px;margin-right:-22px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width.text-area-editor label{margin-top:-13px!important}.textarea-field-width label{position:absolute;margin-top:-8px!important;color:#939393;padding:0 5px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f;padding:10px}.form-field{display:flex}.form-field label{margin-right:10px;margin-top:14px}.form-field .form-field-container{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FormFieldErrorComponent, selector: "shared-form-field-error", inputs: ["fieldData", "form", "errorMessageTexts"] }, { kind: "component", type: FormFieldPublishErrorComponent, selector: "shared-form-field-publish-error", inputs: ["fieldData", "form", "entity", "errorMessageTexts"] }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["config", "fieldData", "form", "autoCompleteFields"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldFileComponent, selector: "shared-form-field-file", inputs: ["config", "fieldData", "form", "entity"] }, { kind: "component", type: FormFieldFilesComponent, selector: "shared-form-field-files", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldFileShowComponent, selector: "shared-form-field-file-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleShowComponent, selector: "shared-form-field-slide-toggle-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldInputShowComponent, selector: "shared-form-field-input-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldFilesShowComponent, selector: "shared-form-field-files-show", inputs: ["config", "fieldData", "entityId", "entitySection"] }, { kind: "component", type: FormFieldJsonShowComponent, selector: "shared-form-field-json-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldTagsComponent, selector: "shared-form-field-tags", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldTextareaShowComponent, selector: "shared-form-field-textarea-show", inputs: ["config", "fieldData", "value"] }], animations: [appearFromLeft], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [FormFieldCheditorComponent]] }); }
|
|
10526
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FormFieldComponent, isStandalone: false, selector: "shared-form-field", inputs: { fields: "fields", formData: "formData", config: "config", fieldData: "fieldData", itemId: "itemId", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", publicationMessages: "publicationMessages", entityTypeUserRoleRights: "entityTypeUserRoleRights", autoCompleteFields: "autoCompleteFields", entityPermissionUpdateDanyFields: "entityPermissionUpdateDanyFields" }, outputs: { eventUpdateForm: "eventUpdateForm", eventSendAction: "eventSendAction" }, ngImport: i0, template: "<div *ngIf=\"!fieldData.options?.hide\"\n #formField\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle,\n 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n <label *ngIf=\"config.formFormat === formFormateType.LABEL_INPUT\">{{ fieldData.title }}: </label>\n <div class=\"form-field-container\">\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width text-area-editor editor-field\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{ fieldData.description }}\n </div>\n @defer (on viewport(formField)) {\n <shared-form-field-cheditor [fieldDataField]=\"fieldData.field\"\n [form]=\"form\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"></shared-form-field-cheditor>\n } @placeholder {\n shared-form-field-cheditor\n }\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</b>\n </div>\n </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeInputStringList\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-string-list-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-string-list-input>\n } @else {\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n } @else {\n <shared-form-field-input-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-input-show>\n }\n </ng-container>\n </ng-container>\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{ action.title }}</div>\n </ng-container>\n </div>\n <!-- <shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>-->\n <ng-container *ngIf=\"fieldData.options?.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options?.hint)\">help_outline</mat-icon>\n </ng-container>\n } @else {\n <ng-container *ngComponentOutlet=\"fieldData.options?.showing?.customEditViewComponent;\n injector: componentDataInjector;\"/>\n }\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl && fieldControl['touched'] && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n </div>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:#009ce542}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:11px;top:0;font-size:20px;margin-right:-22px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width.text-area-editor label{margin-top:-13px!important}.textarea-field-width label{position:absolute;margin-top:-8px!important;color:#939393;padding:0 5px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f;padding:10px}.form-field{display:flex}.form-field label{margin-right:10px;margin-top:14px}.form-field .form-field-container{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$4.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FormFieldErrorComponent, selector: "shared-form-field-error", inputs: ["fieldData", "form", "errorMessageTexts"] }, { kind: "component", type: FormFieldPublishErrorComponent, selector: "shared-form-field-publish-error", inputs: ["fieldData", "form", "entity", "errorMessageTexts"] }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["config", "fieldData", "form", "autoCompleteFields"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldStringListInputComponent, selector: "shared-form-field-string-list-input", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldFileComponent, selector: "shared-form-field-file", inputs: ["config", "fieldData", "form", "entity"] }, { kind: "component", type: FormFieldFilesComponent, selector: "shared-form-field-files", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldFileShowComponent, selector: "shared-form-field-file-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleShowComponent, selector: "shared-form-field-slide-toggle-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldInputShowComponent, selector: "shared-form-field-input-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldFilesShowComponent, selector: "shared-form-field-files-show", inputs: ["config", "fieldData", "entityId", "entitySection"] }, { kind: "component", type: FormFieldJsonShowComponent, selector: "shared-form-field-json-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldTagsComponent, selector: "shared-form-field-tags", inputs: ["config", "fieldData", "form", "itemId"] }, { kind: "component", type: FormFieldTextareaShowComponent, selector: "shared-form-field-textarea-show", inputs: ["config", "fieldData", "value"] }], animations: [appearFromLeft], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [FormFieldCheditorComponent]] }); }
|
|
10436
10527
|
}
|
|
10437
10528
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
10438
10529
|
type: Component,
|
|
10439
|
-
args: [{ selector: 'shared-form-field', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft], standalone: false, template: "<div *ngIf=\"!fieldData.options?.hide\"\n #formField\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle,\n 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n <label *ngIf=\"config.formFormat === formFormateType.LABEL_INPUT\">{{ fieldData.title }}: </label>\n <div class=\"form-field-container\">\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width text-area-editor editor-field\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{ fieldData.description }}\n </div>\n @defer (on viewport(formField)) {\n <shared-form-field-cheditor [fieldDataField]=\"fieldData.field\"\n [form]=\"form\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"></shared-form-field-cheditor>\n } @placeholder {\n shared-form-field-cheditor\n }\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</b>\n </div>\n </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.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</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:#009ce542}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:11px;top:0;font-size:20px;margin-right:-22px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width.text-area-editor label{margin-top:-13px!important}.textarea-field-width label{position:absolute;margin-top:-8px!important;color:#939393;padding:0 5px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f;padding:10px}.form-field{display:flex}.form-field label{margin-right:10px;margin-top:14px}.form-field .form-field-container{width:100%}\n"] }]
|
|
10530
|
+
args: [{ selector: 'shared-form-field', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft], standalone: false, template: "<div *ngIf=\"!fieldData.options?.hide\"\n #formField\n class=\"position-relative form-field\"\n [id]=\"'field-' + fieldData.field\"\n [formGroup]=\"form\"\n [ngClass]=\"{\n 'border-block textarea-field mb-21': fieldData.type === fieldTypes.FieldTypeTextarea || fieldData.type === fieldTypes.FieldTypeTextareaEditor,\n 'form-field-error': haveFieldError,\n 'form-field-warning': haveFieldWarning,\n 'check-box-field': fieldData.type === fieldTypes.FieldTypeSlideToggle,\n 'preview-mode': isDenyToUpdate || fieldData.options.notEditable\n }\">\n <label *ngIf=\"config.formFormat === formFormateType.LABEL_INPUT\">{{ fieldData.title }}: </label>\n <div class=\"form-field-container\">\n @if (!fieldData.options?.showing?.customEditViewComponent && !fieldData.options?.notNeedFormControl) {\n <ng-container [ngSwitch]=\"fieldData.type\">\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSelect\">\n <shared-form-field-select\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [autoCompleteFields]=\"autoCompleteFields\"\n ></shared-form-field-select>\n <shared-form-field-select-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-select-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeSlideToggle\">\n <shared-form-field-slide-toggle\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-slide-toggle>\n <shared-form-field-slide-toggle-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-slide-toggle-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextarea\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n <div class=\"textarea-field-length\">\n <span>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\">\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTextareaEditor\">\n <div class=\"textarea-field-width text-area-editor editor-field\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n <ng-container *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\">\n <div *ngIf=\"fieldData.description\" class=\"field-description\">\n {{ fieldData.description }}\n </div>\n @defer (on viewport(formField)) {\n <shared-form-field-cheditor [fieldDataField]=\"fieldData.field\"\n [form]=\"form\"\n [entityId]=\"entityId\"\n [entity]=\"entity\"></shared-form-field-cheditor>\n } @placeholder {\n shared-form-field-cheditor\n }\n <div class=\"textarea-field-length\">\n <b>\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0434\u043B\u0438\u043D\u0430: {{ form.get(fieldData.field).value?.length || 0 }}</b>\n </div>\n </ng-container>\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFile\">\n <shared-form-field-file\n *ngIf=\"!isDenyToUpdate && !fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [entity]=\"entity\"\n ></shared-form-field-file>\n <shared-form-field-file-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-file-show>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeFiles\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-files\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-files>\n } @else {\n <shared-form-field-files-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [entityId]=\"form.get('id').value\"\n [entitySection]=\"entity\"\n ></shared-form-field-files-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeJSON\">\n <div class=\"textarea-field-width\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <label\n [id]=\"'field-' + fieldData.field\">{{ fieldData.title }}{{ fieldData.validators && fieldData.validators.includes('required') ? ' *' : '' }}</label>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <textarea matInput rows=\"6\" [formControlName]=\"fieldData.field\"></textarea>\n } @else {\n <shared-form-field-json-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-json-show>\n }\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeInputStringList\">\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-string-list-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-string-list-input>\n } @else {\n <shared-form-field-textarea-show\n *ngIf=\"isDenyToUpdate || fieldData.options.notEditable\"\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-textarea-show>\n }\n </ng-container>\n\n <ng-container *ngSwitchCase=\"fieldTypes.FieldTypeTags\">\n <shared-form-field-tags\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n [itemId]=\"itemId\"\n ></shared-form-field-tags>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n @if (!isDenyToUpdate && !fieldData.options.notEditable) {\n <shared-form-field-input\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [form]=\"form\"\n ></shared-form-field-input>\n } @else {\n <shared-form-field-input-show\n [config]=\"config\"\n [fieldData]=\"fieldData\"\n [value]=\"form.get(fieldData.field).value\"\n ></shared-form-field-input-show>\n }\n </ng-container>\n </ng-container>\n <div *ngIf=\"fieldData.actions\" class=\"field-actions\">\n <ng-container *ngFor=\"let action of fieldData.actions\">\n <div class=\"field-actions-action\" (click)=\"fieldActionHandler(action)\">{{ action.title }}</div>\n </ng-container>\n </div>\n <!-- <shared-form-field-spinner *ngIf=\"loading\"></shared-form-field-spinner>-->\n <ng-container *ngIf=\"fieldData.options?.hint\">\n <mat-icon class=\"hint-icons\" (click)=\"openHintDialog(fieldData.options?.hint)\">help_outline</mat-icon>\n </ng-container>\n } @else {\n <ng-container *ngComponentOutlet=\"fieldData.options?.showing?.customEditViewComponent;\n injector: componentDataInjector;\"/>\n }\n\n <shared-form-field-error\n @appearFromLeft\n *ngIf=\"fieldControl && fieldControl['touched'] && !fieldControl.valid\"\n [form]=\"form\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-error>\n\n <shared-form-field-publish-error\n [form]=\"form\"\n [entity]=\"entity\"\n [fieldData]=\"fieldData\"\n [errorMessageTexts]=\"errorMessageTexts\"\n [ngClass]=\"{'textarea-error': fieldData.type === fieldTypes.FieldTypeTextarea}\"\n ></shared-form-field-publish-error>\n </div>\n</div>\n", styles: [".mb-21{margin-bottom:21px}.field-description{border-radius:8px;color:#5f5b5b;margin:5px 5px 15px;border-left:3px solid #009ce5;padding:10px 0 10px 10px;background:#009ce542}.field-actions{display:flex;justify-content:flex-end;margin-bottom:5px}.field-actions .field-actions-action{padding:0 10px;text-align:right;background:#007bff;color:#fff;border-radius:4px}.textarea-field-length{background:#f8f8f8;text-align:right;padding-right:10px;color:#989494;border-bottom:1px solid #d1d1d1;font-size:11px;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.hint-icons{position:absolute;right:0;margin-top:11px;top:0;font-size:20px;margin-right:-22px}.textarea-field-width{display:flex;flex-direction:column}.textarea-field-width.editor-field{margin-top:10px}.textarea-field-width.editor-field label{margin-top:-15px}.textarea-field-width.text-area-editor label{margin-top:-13px!important}.textarea-field-width label{position:absolute;margin-top:-8px!important;color:#939393;padding:0 5px;background:#fff;font-family:Inter,sans-serif;font-size:14px;margin-left:14px;line-height:10px}.textarea-field-width textarea{border-radius:7px;border-color:#74777f;padding:10px}.form-field{display:flex}.form-field label{margin-right:10px;margin-top:14px}.form-field .form-field-container{width:100%}\n"] }]
|
|
10440
10531
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
10441
10532
|
type: Inject,
|
|
10442
10533
|
args: [PLATFORM_ID]
|
|
@@ -10856,28 +10947,28 @@ class AutoFormMainComponent {
|
|
|
10856
10947
|
}
|
|
10857
10948
|
getFormFieldClass(data) {
|
|
10858
10949
|
let className = [];
|
|
10859
|
-
if (data.options
|
|
10950
|
+
if (data.options?.col) {
|
|
10860
10951
|
className.push(`col-lg-${data.options.col}`);
|
|
10861
|
-
if (!data.options
|
|
10952
|
+
if (!data.options?.colXl) {
|
|
10862
10953
|
className.push(`col-xl-${data.options.col}`);
|
|
10863
10954
|
}
|
|
10864
10955
|
}
|
|
10865
|
-
if (data.options
|
|
10956
|
+
if (data.options?.colXxl) {
|
|
10866
10957
|
className.push(`col-xxl-${data.options.colXxl}`);
|
|
10867
10958
|
}
|
|
10868
|
-
if (data.options
|
|
10959
|
+
if (data.options?.colXl) {
|
|
10869
10960
|
className.push(`col-xl-${data.options.colXl}`);
|
|
10870
10961
|
}
|
|
10871
|
-
if (data.options
|
|
10962
|
+
if (data.options?.colLg) {
|
|
10872
10963
|
className.push(`col-lg-${data.options.colLg}`);
|
|
10873
10964
|
}
|
|
10874
|
-
if (data.options
|
|
10965
|
+
if (data.options?.colMd) {
|
|
10875
10966
|
className.push(`col-md-${data.options.colMd}`);
|
|
10876
10967
|
}
|
|
10877
10968
|
if (!className.length) {
|
|
10878
10969
|
className.push(`col-lg-12`);
|
|
10879
10970
|
}
|
|
10880
|
-
if (data.options
|
|
10971
|
+
if (data.options?.colSm) {
|
|
10881
10972
|
className.push(`col-sm-${data.options.colSm}`);
|
|
10882
10973
|
}
|
|
10883
10974
|
else {
|
|
@@ -10993,7 +11084,7 @@ class AutoFormMainComponent {
|
|
|
10993
11084
|
.subscribe((formValue) => {
|
|
10994
11085
|
// Need to update controls for fields with "option.showIf"
|
|
10995
11086
|
this.checkShowIfFieldsAndAddRequiredValidations();
|
|
10996
|
-
|
|
11087
|
+
this.groupFields();
|
|
10997
11088
|
const areEquals = this.areObjectsEquals(formValue, this.storedFormValue);
|
|
10998
11089
|
if (!areEquals) {
|
|
10999
11090
|
this.storedFormValue = formValue;
|
|
@@ -11016,13 +11107,15 @@ class AutoFormMainComponent {
|
|
|
11016
11107
|
needToShow = false;
|
|
11017
11108
|
}
|
|
11018
11109
|
this.form.get(item.field).clearValidators();
|
|
11019
|
-
if (
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11110
|
+
if (item.validators?.length) {
|
|
11111
|
+
if (needToShow) {
|
|
11112
|
+
const validators = this.autoFormService.getValidators(item.validators);
|
|
11113
|
+
this.form.get(item.field).addValidators(validators);
|
|
11114
|
+
}
|
|
11115
|
+
else {
|
|
11116
|
+
const validators = this.autoFormService.getValidators(item.validators.filter(validator => validator !== ValidatorsType.Required));
|
|
11117
|
+
this.form.get(item.field).addValidators(validators);
|
|
11118
|
+
}
|
|
11026
11119
|
}
|
|
11027
11120
|
this.form.get(item.field).updateValueAndValidity();
|
|
11028
11121
|
});
|
|
@@ -11180,28 +11273,28 @@ class AutoFormShowComponent {
|
|
|
11180
11273
|
}
|
|
11181
11274
|
getFormFieldClass(data) {
|
|
11182
11275
|
let className = [];
|
|
11183
|
-
if (data.options
|
|
11276
|
+
if (data.options?.col) {
|
|
11184
11277
|
className.push(`col-lg-${data.options.col}`);
|
|
11185
|
-
if (!data.options
|
|
11278
|
+
if (!data.options?.colXl) {
|
|
11186
11279
|
className.push(`col-xl-${data.options.col}`);
|
|
11187
11280
|
}
|
|
11188
11281
|
}
|
|
11189
|
-
if (data.options
|
|
11282
|
+
if (data.options?.colXxl) {
|
|
11190
11283
|
className.push(`col-xxl-${data.options.colXxl}`);
|
|
11191
11284
|
}
|
|
11192
|
-
if (data.options
|
|
11285
|
+
if (data.options?.colXl) {
|
|
11193
11286
|
className.push(`col-xl-${data.options.colXl}`);
|
|
11194
11287
|
}
|
|
11195
|
-
if (data.options
|
|
11288
|
+
if (data.options?.colLg) {
|
|
11196
11289
|
className.push(`col-lg-${data.options.colLg}`);
|
|
11197
11290
|
}
|
|
11198
|
-
if (data.options
|
|
11291
|
+
if (data.options?.colMd) {
|
|
11199
11292
|
className.push(`col-md-${data.options.colMd}`);
|
|
11200
11293
|
}
|
|
11201
11294
|
if (!className.length) {
|
|
11202
11295
|
className.push(`col-lg-12`);
|
|
11203
11296
|
}
|
|
11204
|
-
if (data.options
|
|
11297
|
+
if (data.options?.colSm) {
|
|
11205
11298
|
className.push(`col-sm-${data.options.colSm}`);
|
|
11206
11299
|
}
|
|
11207
11300
|
else {
|
|
@@ -11470,6 +11563,7 @@ class AutoFormModule {
|
|
|
11470
11563
|
AutoFormShowComponent,
|
|
11471
11564
|
AutoFormShowFieldComponent,
|
|
11472
11565
|
FormFieldInputComponent,
|
|
11566
|
+
FormFieldStringListInputComponent,
|
|
11473
11567
|
FormMessageBoxComponent,
|
|
11474
11568
|
FormFieldFileComponent,
|
|
11475
11569
|
FormFieldFilesComponent,
|
|
@@ -11503,7 +11597,8 @@ class AutoFormModule {
|
|
|
11503
11597
|
NgxMatSelectSearchModule,
|
|
11504
11598
|
NgxMaskDirective,
|
|
11505
11599
|
NgxMaskPipe,
|
|
11506
|
-
FormFieldCheditorComponent
|
|
11600
|
+
FormFieldCheditorComponent,
|
|
11601
|
+
SharedIconModule], exports: [AutoFormMainComponent,
|
|
11507
11602
|
AutoFormShowComponent] }); }
|
|
11508
11603
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormModule, imports: [CommonModule,
|
|
11509
11604
|
FormFieldErrorModule,
|
|
@@ -11526,7 +11621,8 @@ class AutoFormModule {
|
|
|
11526
11621
|
MatChipsModule,
|
|
11527
11622
|
MatAutocompleteModule,
|
|
11528
11623
|
NgxMatSelectSearchModule,
|
|
11529
|
-
FormFieldCheditorComponent
|
|
11624
|
+
FormFieldCheditorComponent,
|
|
11625
|
+
SharedIconModule] }); }
|
|
11530
11626
|
}
|
|
11531
11627
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormModule, decorators: [{
|
|
11532
11628
|
type: NgModule,
|
|
@@ -11541,6 +11637,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11541
11637
|
AutoFormShowComponent,
|
|
11542
11638
|
AutoFormShowFieldComponent,
|
|
11543
11639
|
FormFieldInputComponent,
|
|
11640
|
+
FormFieldStringListInputComponent,
|
|
11544
11641
|
FormMessageBoxComponent,
|
|
11545
11642
|
FormFieldFileComponent,
|
|
11546
11643
|
FormFieldFilesComponent,
|
|
@@ -11577,7 +11674,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11577
11674
|
NgxMatSelectSearchModule,
|
|
11578
11675
|
NgxMaskDirective,
|
|
11579
11676
|
NgxMaskPipe,
|
|
11580
|
-
FormFieldCheditorComponent
|
|
11677
|
+
FormFieldCheditorComponent,
|
|
11678
|
+
SharedIconModule
|
|
11581
11679
|
],
|
|
11582
11680
|
exports: [
|
|
11583
11681
|
AutoFormMainComponent,
|
|
@@ -12652,7 +12750,6 @@ class StaticDataItemsComponent {
|
|
|
12652
12750
|
this.sortingState = { field: 'id', type: 'asc' };
|
|
12653
12751
|
}
|
|
12654
12752
|
ngOnInit() {
|
|
12655
|
-
console.log('parentSection', this.parentSection, this.parentItemId);
|
|
12656
12753
|
const displayedColumnsStrings = this.displayedColumns.map(item => item.field);
|
|
12657
12754
|
this.displayedColumnsStrings = [...displayedColumnsStrings, 'actions'];
|
|
12658
12755
|
this.displayedFormFields = this.staticSection.fields.filter(item => displayedColumnsStrings.includes(item.field));
|
|
@@ -13065,8 +13162,20 @@ class StaticDataListItemsComponent {
|
|
|
13065
13162
|
});
|
|
13066
13163
|
}
|
|
13067
13164
|
preLoadSections() {
|
|
13068
|
-
|
|
13165
|
+
let preLoadSections = this.staticDataConfiguration[this.contentType]?.preLoadSections;
|
|
13069
13166
|
if (preLoadSections) {
|
|
13167
|
+
if (this.parentItemId) {
|
|
13168
|
+
const newPreLoadSections = [];
|
|
13169
|
+
// Example: business-processes(paging:{perPage:-1}),where:{id:__parentId__})
|
|
13170
|
+
preLoadSections.forEach((item) => {
|
|
13171
|
+
let newItem = item;
|
|
13172
|
+
if (item.indexOf('__parentId__') !== -1 && this.parentItemId) {
|
|
13173
|
+
newItem = item.replace('__parentId__', String(this.parentItemId));
|
|
13174
|
+
}
|
|
13175
|
+
newPreLoadSections.push(newItem);
|
|
13176
|
+
});
|
|
13177
|
+
preLoadSections = newPreLoadSections;
|
|
13178
|
+
}
|
|
13070
13179
|
this.staticDataFacade.staticDataLoadCategories(preLoadSections, this.defaultLanguageId);
|
|
13071
13180
|
}
|
|
13072
13181
|
}
|
|
@@ -13482,8 +13591,24 @@ class StaticDataDetailsComponent {
|
|
|
13482
13591
|
// this.subscribeToRequestStatusStatus();
|
|
13483
13592
|
}
|
|
13484
13593
|
preLoadSections() {
|
|
13485
|
-
|
|
13594
|
+
let preLoadSections = this.staticDataConfiguration[this.contentType]?.preLoadSections;
|
|
13486
13595
|
if (preLoadSections) {
|
|
13596
|
+
if (this.parentItemId) {
|
|
13597
|
+
const newPreLoadSections = [];
|
|
13598
|
+
// Example: business-processes(paging:{perPage:-1}),where:{id:__parentId__})
|
|
13599
|
+
preLoadSections.forEach((item) => {
|
|
13600
|
+
console.log('item', item, this.parentItemId);
|
|
13601
|
+
let newItem = item;
|
|
13602
|
+
if (item.indexOf('__parentId__') !== -1 && this.parentItemId) {
|
|
13603
|
+
newItem = item.replace('__parentId__', String(this.parentItemId));
|
|
13604
|
+
console.log('item++', item);
|
|
13605
|
+
}
|
|
13606
|
+
console.log('newItem', newItem);
|
|
13607
|
+
newPreLoadSections.push(newItem);
|
|
13608
|
+
});
|
|
13609
|
+
console.log('newPreLoadSections', newPreLoadSections);
|
|
13610
|
+
preLoadSections = newPreLoadSections;
|
|
13611
|
+
}
|
|
13487
13612
|
this.staticDataFacade.staticDataLoadCategories(preLoadSections, this.defaultLanguageId);
|
|
13488
13613
|
}
|
|
13489
13614
|
}
|
|
@@ -14005,7 +14130,6 @@ class StaticDataViewComponent {
|
|
|
14005
14130
|
this.howError = false;
|
|
14006
14131
|
}
|
|
14007
14132
|
ngOnInit() {
|
|
14008
|
-
console.log('ngOnInit.modalData', this.dialogContentType, this.dialogItemId);
|
|
14009
14133
|
this.matIconReg.setDefaultFontSetClass('material-symbols-outlined');
|
|
14010
14134
|
this.currentUserData = this.authService.currentUserValue;
|
|
14011
14135
|
this.loadStaticDataConfiguration();
|
|
@@ -14157,7 +14281,6 @@ class StaticDataViewComponent {
|
|
|
14157
14281
|
preLoadSections() {
|
|
14158
14282
|
const preLoadSections = this.staticDataConfiguration[this.contentType]?.preLoadSections;
|
|
14159
14283
|
if (preLoadSections) {
|
|
14160
|
-
console.log('preLoadSections', this.contentType, preLoadSections);
|
|
14161
14284
|
this.staticDataFacade.staticDataLoadCategories(preLoadSections, this.defaultLanguageId);
|
|
14162
14285
|
}
|
|
14163
14286
|
}
|