wt-front-shared 19.0.14 → 19.0.16
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.
|
@@ -2411,6 +2411,7 @@ const _requestsStateReducer = createReducer(initialState$f, on(CreateRequestList
|
|
|
2411
2411
|
if (formId) {
|
|
2412
2412
|
ids.push(formId);
|
|
2413
2413
|
}
|
|
2414
|
+
// static-data/infos/no-subRouting/_get_582-zima-u-morya-3
|
|
2414
2415
|
let existsIds = getExistIds(state.ids, ids);
|
|
2415
2416
|
if (existsIds?.length) {
|
|
2416
2417
|
return {
|
|
@@ -5712,6 +5713,7 @@ class AutoFormService extends BaseAutoFormService {
|
|
|
5712
5713
|
return resultValidators;
|
|
5713
5714
|
}
|
|
5714
5715
|
itemUniqValueValidator(controlIn, optionsIn) {
|
|
5716
|
+
console.log('itemUniqValueValidator');
|
|
5715
5717
|
const control = arguments[1];
|
|
5716
5718
|
const options = arguments[0]?.validations.uniq;
|
|
5717
5719
|
const value = control.value;
|
|
@@ -5721,6 +5723,7 @@ class AutoFormService extends BaseAutoFormService {
|
|
|
5721
5723
|
itemId = +form.get('id').value;
|
|
5722
5724
|
}
|
|
5723
5725
|
const type = options.type;
|
|
5726
|
+
console.log('this.validatorsData', this.validatorsData[type]);
|
|
5724
5727
|
// If the value for this type is checked before not need to do this checking again
|
|
5725
5728
|
if (this.validatorsData[type] && this.validatorsData[type].value === value && this.validatorsData[type].valid) {
|
|
5726
5729
|
return Promise.resolve();
|
|
@@ -5731,7 +5734,10 @@ class AutoFormService extends BaseAutoFormService {
|
|
|
5731
5734
|
resolve({ [options.errorKey]: true });
|
|
5732
5735
|
return;
|
|
5733
5736
|
}
|
|
5734
|
-
|
|
5737
|
+
console.log('itemUniqValueValidator 2', value, control, 'touched:', control.touched, 'dirty:', control.dirty);
|
|
5738
|
+
console.log('itemUniqValueValidator 3', value, control, 'pristine:', control.pristine, 'pending:', control.pending);
|
|
5739
|
+
if (value && control.dirty) {
|
|
5740
|
+
console.log('++');
|
|
5735
5741
|
let validatorOption;
|
|
5736
5742
|
if (options.entity && options.entityField) {
|
|
5737
5743
|
validatorOption = {
|
|
@@ -5750,10 +5756,12 @@ class AutoFormService extends BaseAutoFormService {
|
|
|
5750
5756
|
text: options.errorText,
|
|
5751
5757
|
timeout: NOTIFICATION_LONG_TIMEOUT
|
|
5752
5758
|
});
|
|
5759
|
+
control.status = 'INVALID';
|
|
5753
5760
|
resolve({ [options.errorKey]: true });
|
|
5754
5761
|
}
|
|
5755
5762
|
else {
|
|
5756
5763
|
this.validatorsData[type] = { value: value, valid: true };
|
|
5764
|
+
control.status = 'VALID';
|
|
5757
5765
|
resolve();
|
|
5758
5766
|
}
|
|
5759
5767
|
});
|
|
@@ -5765,6 +5773,7 @@ class AutoFormService extends BaseAutoFormService {
|
|
|
5765
5773
|
});
|
|
5766
5774
|
}
|
|
5767
5775
|
itemValueExistsValidator(controlIn, optionsIn) {
|
|
5776
|
+
console.log('itemValueExistsValidator');
|
|
5768
5777
|
const control = arguments[1];
|
|
5769
5778
|
const options = arguments[0]?.validations.uniq;
|
|
5770
5779
|
const value = control.value;
|
|
@@ -9051,7 +9060,7 @@ class FormFieldFileComponent {
|
|
|
9051
9060
|
this.cd.markForCheck();
|
|
9052
9061
|
}
|
|
9053
9062
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldFileComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DialogService }, { token: RequestsFacade }, { token: FormDeleteFileFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9054
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldFileComponent, isStandalone: false, selector: "shared-form-field-file", inputs: { config: "config", fieldData: "fieldData", form: "form", entity: "entity" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"form-field-file\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"pb-10 width100\">\n <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: [
|
|
9063
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormFieldFileComponent, isStandalone: false, selector: "shared-form-field-file", inputs: { config: "config", fieldData: "fieldData", form: "form", entity: "entity" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"form-field-file\" [ngClass]=\"{'small-form-width-form-field': config?.smallFormWidth}\">\n <div class=\"pb-10 width100\">\n <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 && !imageVersions\" 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: [
|
|
9055
9064
|
appearFromLeft,
|
|
9056
9065
|
trigger("inputAnim", [
|
|
9057
9066
|
state("0", style({
|
|
@@ -9087,7 +9096,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
9087
9096
|
animate("500ms")
|
|
9088
9097
|
])
|
|
9089
9098
|
])
|
|
9090
|
-
], standalone: false, 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"] }]
|
|
9099
|
+
], standalone: false, 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 && !imageVersions\" 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"] }]
|
|
9091
9100
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: DialogService }, { type: RequestsFacade }, { type: FormDeleteFileFacade }], propDecorators: { config: [{
|
|
9092
9101
|
type: Input
|
|
9093
9102
|
}], fieldData: [{
|
|
@@ -9670,7 +9679,7 @@ class FormFieldInputShowComponent {
|
|
|
9670
9679
|
this.inputValue = value;
|
|
9671
9680
|
break;
|
|
9672
9681
|
case IFormFieldFormat.Date:
|
|
9673
|
-
const params = value
|
|
9682
|
+
const params = value?.split('-');
|
|
9674
9683
|
this.inputValue = params?.length === 3 ? `${params[2]}.${params[1]}.${params[0]}` : '---';
|
|
9675
9684
|
break;
|
|
9676
9685
|
case IFormFieldFormat.DateTime:
|
|
@@ -10136,9 +10145,7 @@ class FormFieldComponent {
|
|
|
10136
10145
|
}
|
|
10137
10146
|
ngOnInit() {
|
|
10138
10147
|
this.field = this.fieldData.field;
|
|
10139
|
-
console.log('ngOnInit', this.entityPermissionUpdateDanyFields, this.field);
|
|
10140
10148
|
this.isDenyToUpdate = this.entityPermissionUpdateDanyFields?.includes(this.field);
|
|
10141
|
-
console.log('this.isDenyToUpdate', this.isDenyToUpdate);
|
|
10142
10149
|
this.fieldControl = !this.fieldData.options?.notNeedFormControl ? this.form.get(this.field) : undefined;
|
|
10143
10150
|
if (!this.fieldData.options?.notNeedFormControl) {
|
|
10144
10151
|
this.subscribeToChangeStatus();
|
|
@@ -10196,11 +10203,11 @@ class FormFieldComponent {
|
|
|
10196
10203
|
});
|
|
10197
10204
|
}
|
|
10198
10205
|
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$4.MatDialog }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10199
|
-
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 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 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$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { 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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["config", "fieldData", "form", "autoCompleteFields"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: 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]] }); }
|
|
10206
|
+
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$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { 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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FormFieldSelectComponent, selector: "shared-form-field-select", inputs: ["config", "fieldData", "form", "autoCompleteFields"] }, { kind: "component", type: FormFieldSelectShowComponent, selector: "shared-form-field-select-show", inputs: ["config", "fieldData", "value"] }, { kind: "component", type: FormFieldSlideToggleComponent, selector: "shared-form-field-slide-toggle", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: FormFieldInputComponent, selector: "shared-form-field-input", inputs: ["config", "fieldData", "form"] }, { kind: "component", type: 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]] }); }
|
|
10200
10207
|
}
|
|
10201
10208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
10202
10209
|
type: Component,
|
|
10203
|
-
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 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 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"] }]
|
|
10210
|
+
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"] }]
|
|
10204
10211
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
10205
10212
|
type: Inject,
|
|
10206
10213
|
args: [PLATFORM_ID]
|
|
@@ -10708,7 +10715,7 @@ class AutoFormMainComponent {
|
|
|
10708
10715
|
const codeUpperCase = code.toUpperCase();
|
|
10709
10716
|
control.setErrors({ [codeUpperCase]: codeUpperCase });
|
|
10710
10717
|
control.markAsDirty();
|
|
10711
|
-
control.markAsTouched();
|
|
10718
|
+
// control.markAsTouched();
|
|
10712
10719
|
}
|
|
10713
10720
|
}
|
|
10714
10721
|
});
|
|
@@ -10865,11 +10872,11 @@ class AutoFormMainComponent {
|
|
|
10865
10872
|
}
|
|
10866
10873
|
}
|
|
10867
10874
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormMainComponent, deps: [{ token: FormErrorsFacade }, { token: FormsFacade }, { token: BaseAutoFormService }, { token: AutoFormService }, { token: PublicationMessagesFacade }, { token: i2.ActivatedRoute }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10868
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.14", type: AutoFormMainComponent, isStandalone: false, selector: "shared-auto-form", inputs: { fields: "fields", itemId: ["itemId", "itemId", numberAttribute], formId: "formId", showPublicationMessages: "showPublicationMessages", useEntityPermissions: "useEntityPermissions", showProgressBar: "showProgressBar", showFormMessageBox: "showFormMessageBox", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", havePublication: "havePublication", config: "config" }, outputs: { changed: "changed", formCompleted: "formCompleted" }, usesOnChanges: true, ngImport: i0, template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && storedFormValue?._occupancyRating\"\n [value]=\"storedFormValue?._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{ group }}\n </h2>\n <div
|
|
10875
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.14", type: AutoFormMainComponent, isStandalone: false, selector: "shared-auto-form", inputs: { fields: "fields", itemId: ["itemId", "itemId", numberAttribute], formId: "formId", showPublicationMessages: "showPublicationMessages", useEntityPermissions: "useEntityPermissions", showProgressBar: "showProgressBar", showFormMessageBox: "showFormMessageBox", form: "form", editorImageUploadUrl: "editorImageUploadUrl", errorMessageTexts: "errorMessageTexts", entity: "entity", havePublication: "havePublication", config: "config" }, outputs: { changed: "changed", formCompleted: "formCompleted" }, usesOnChanges: true, ngImport: i0, template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && storedFormValue?._occupancyRating\"\n [value]=\"storedFormValue?._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{ group }}\n </h2>\n <div\n [ngClass]=\"{'small-form-width': config?.smallFormWidth, 'form-group-field-open': groupsState[group]}\"\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-fields{display:none}.form-group-fields.form-group-field-open{display:flex}.form-group{cursor:pointer;margin-bottom:0}.form-group h2{display:flex;transition:color .3s;align-items:center}.progress-bar{margin-bottom:10px}.form-field-row{margin:8px 0}.small-form-width .form-field-row{margin-bottom:10px}.small-form-width .show-label{margin-bottom:0!important}.form-field-group-title{font-size:18px;display:flex;margin-top:15px;background:#f5f5f5;padding:10px;border-radius:8px}\n"], dependencies: [{ kind: "directive", type: i1$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 }); }
|
|
10869
10876
|
}
|
|
10870
10877
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AutoFormMainComponent, decorators: [{
|
|
10871
10878
|
type: Component,
|
|
10872
|
-
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], standalone: false, template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && storedFormValue?._occupancyRating\"\n [value]=\"storedFormValue?._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{ group }}\n </h2>\n <div
|
|
10879
|
+
args: [{ selector: 'shared-auto-form', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromLeft, appearOpacity], standalone: false, template: "<shared-smart-progress-bar *ngIf=\"showProgressBar && storedFormValue?._occupancyRating\"\n [value]=\"storedFormValue?._occupancyRating\"\n [title]=\"'\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0441\u0442\u0438 \u0444\u043E\u0440\u043C\u044B'\"></shared-smart-progress-bar>\n\n<ng-container *ngIf=\"showPublicationMessages && fields?.length\">\n <ng-container\n *ngTemplateOutlet=\"publicationMessages, context: {form: form, entity: entity, itemId: itemId, fields: fields}\"></ng-container>\n</ng-container>\n\n<div *ngFor=\"let group of object_.keys(groupedFields); trackBy: truckByFieldName\"\n class=\"form-group container\"\n [ngClass]=\"{'form-group-open': groupsState[group]}\">\n\n <h2 *ngIf=\"group && object_.keys(groupedFields)?.length > 1\" class=\"form-field-group-title\" (click)=\"groupClick(group)\">\n <mat-icon class=\"fs-20 field-group-icon\">expand_more</mat-icon>\n {{ group }}\n </h2>\n <div\n [ngClass]=\"{'small-form-width': config?.smallFormWidth, 'form-group-field-open': groupsState[group]}\"\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-fields{display:none}.form-group-fields.form-group-field-open{display:flex}.form-group{cursor:pointer;margin-bottom:0}.form-group h2{display:flex;transition:color .3s;align-items:center}.progress-bar{margin-bottom:10px}.form-field-row{margin:8px 0}.small-form-width .form-field-row{margin-bottom:10px}.small-form-width .show-label{margin-bottom:0!important}.form-field-group-title{font-size:18px;display:flex;margin-top:15px;background:#f5f5f5;padding:10px;border-radius:8px}\n"] }]
|
|
10873
10880
|
}], ctorParameters: () => [{ type: FormErrorsFacade }, { type: FormsFacade }, { type: BaseAutoFormService }, { type: AutoFormService }, { type: PublicationMessagesFacade }, { type: i2.ActivatedRoute }, { type: StaticDataFacade }, { type: i0.ChangeDetectorRef }], propDecorators: { fields: [{
|
|
10874
10881
|
type: Input,
|
|
10875
10882
|
args: [{ required: true }]
|