1 <div class="add-property-container">
2 <loader [display]="isLoading" [size]="'large'" [relative]="true" [loaderDelay]="500"></loader>
3 <form class="w-sdc-form" [formGroup]="formGroup">
5 <div class="side-by-side">
6 <div class="i-sdc-form-item">
7 <label class="i-sdc-form-label required">{{'PROPERTY_NAME_LABEL' | translate}}</label>
8 <input class="i-sdc-form-input"
10 data-tests-id="property-name"
11 formControlName="name"
12 [readOnly]="readOnly"/>
14 <div class="i-sdc-form-item">
15 <label class="i-sdc-form-label required">{{'PROPERTY_TYPE_LABEL' | translate}}</label>
16 <select formControlName="type" (change)="onTypeChange()" [attr.disabled]="readOnly ? readOnly : null">
17 <option [ngValue]="null">{{'GENERAL_LABEL_SELECT' | translate}}</option>
18 <option *ngFor="let type of typeList"
19 [ngValue]="type">{{type}}</option>
22 <div class="i-sdc-form-item">
23 <input type="checkbox" formControlName="required" [attr.disabled]="readOnly ? readOnly : null"/> {{'PROPERTY_REQUIRED_LABEL' | translate}}
25 <div class="i-sdc-form-item propertySchemaType" *ngIf="showSchema">
26 <label class="i-sdc-form-label required">{{'PROPERTY_SCHEMA_LABEL' | translate}}</label>
27 <select formControlName="schema" (change)="onSchemaChange()" [attr.disabled]="readOnly ? readOnly : null">
28 <option [ngValue]="null">{{'GENERAL_LABEL_SELECT' | translate}}</option>
29 <option *ngFor="let type of schemaTypeList"
30 [ngValue]="type">{{type}}</option>
35 <div class="i-sdc-form-item">
36 <label class="i-sdc-form-label">{{'PROPERTY_DESCRIPTION_LABEL' | translate}}</label>
37 <textarea class="i-sdc-form-textarea"
38 formControlName="description"
39 data-tests-id="property-description"
40 [readOnly]="readOnly">
43 <div class="default-value-container i-sdc-form-item" *ngIf="showDefaultValue()">
44 <label class="i-sdc-form-label">{{'PROPERTY_DEFAULT_VALUE_LABEL' | translate}}</label>
45 <ng-container *ngIf="!readOnly">
46 <input type="checkbox" formControlName="hasDefaultValue" [attr.disabled]="readOnly ? readOnly : null"/> {{'PROPERTY_SET_DEFAULT_VALUE_MSG' | translate}}
48 <ng-container *ngIf="hasDefaultValueForm.value">
51 [name]="nameForm.value"
52 [type]="getDataType(typeForm.value)"
53 [dataTypeMap]="dataTypeMap"
54 [valueObjRef]="defaultValueForm.value"
55 [schema]="buildSchemaGroupProperty()"
57 [isViewOnly]="readOnly"
58 [allowDeletion]="false"
60 (onValueChange)="onPropertyValueChange($event)">
61 </app-input-list-item>