diff options
author | andre.schmid <andre.schmid@est.tech> | 2022-05-12 17:37:43 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-05-17 08:23:38 +0000 |
commit | 61e8668899051e1df738093d1700564fbc22a428 (patch) | |
tree | 0076471bed9a3fee8e5a565ed63c6027a5c76b30 /catalog-ui/src/app/directives/property-types/type-list/type-list-directive.html | |
parent | 69bc5bdb7d464fa38705191f1495fb09474277a8 (diff) |
Support list of map properties in composition
Supports editing list<map<string, string> properties in the
edit properties dialog in the composition screen.
Fixes entry schema of type map not being shown.
Change-Id: Iea1732f51148ae88dedd2242b3b19d19c4548eb4
Issue-ID: SDC-4001
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui/src/app/directives/property-types/type-list/type-list-directive.html')
-rw-r--r-- | catalog-ui/src/app/directives/property-types/type-list/type-list-directive.html | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.html b/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.html index 661514f799..48e441599f 100644 --- a/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.html +++ b/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.html @@ -17,7 +17,8 @@ <div> <div data-ng-if="!isSchemaTypeDataType"> - <div class="i-sdc-form-item list-new-item" data-ng-class="{error:(parentFormObj['listNewItem'+fieldsPrefixName].$dirty && parentFormObj['listNewItem'+fieldsPrefixName].$invalid)}"> + <div class="i-sdc-form-item list-new-item" data-ng-class="{error:(parentFormObj['listNewItem'+fieldsPrefixName].$dirty && parentFormObj['listNewItem'+fieldsPrefixName].$invalid)}" + ng-if="schemaProperty.type !== 'map'"> <input class="i-sdc-form-input" data-tests-id="listNewItem{{fieldsPrefixName}}" ng-if="!constraints && !((schemaProperty.simpleType||schemaProperty.type) == 'boolean')" @@ -66,12 +67,27 @@ </div> </div> <div class="add-btn add-list-item" data-tests-id="add-list-item{{fieldsPrefixName}}" - data-ng-class="{'disabled': readOnly || !schemaProperty.type || parentFormObj['listNewItem'+fieldsPrefixName].$invalid || !listNewItem.value}" data-ng-click="addListItem()">Add</div> + data-ng-class="{'disabled': readOnly || !schemaProperty.type || parentFormObj['listNewItem'+fieldsPrefixName].$invalid || (!listNewItem.value && schemaProperty.type !== 'map')}" data-ng-click="addListItem()">Add</div> <div class="list-value-items"> - <span class="list-value-item" data-ng-repeat="value in valueObjRef track by $index"> - {{value}} - <span ng-if="!readOnly" class="delete-list-item sprite-new small-x-button" data-ng-click="deleteListItem($index)"></span> - </span> + <span class="list-value-item" data-ng-repeat="value in valueObjRef track by $index"> + <span ng-if="!readOnly" class="delete-list-item sprite-new small-x-button" data-ng-click="deleteListItem($index)" + title="{{'PROPERTY_EDIT_LIST_DELETE_ITEM' | translate}}"></span> + <div ng-if="schemaProperty.type === 'map'"> + <type-map value-obj-ref="value" + schema-property="stringSchema" + parent-form-obj="parentFormObj" + fields-prefix-name="fieldsPrefixName+''+$index" + read-only="readOnly" + default-value="{{undefined}}" + max-length="maxLength" + show-add-btn="true" + constraints="constraints"> + </type-map> + </div> + <div ng-if="schemaProperty.type !== 'map'"> + {{value}} + </div> + </span> </div> </div> <div data-ng-if="isSchemaTypeDataType"> |