@apipass/schemas 0.2.9 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-drag-drop'), require('@angular/material/tooltip'), require('@apipass/inputs'), require('@angular/cdk/bidi'), require('@angular/cdk/scrolling')) :
3
- typeof define === 'function' && define.amd ? define('@apipass/schemas', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'ngx-drag-drop', '@angular/material/tooltip', '@apipass/inputs', '@angular/cdk/bidi', '@angular/cdk/scrolling'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.apipass = global.apipass || {}, global.apipass.schemas = {}), global.ng.core, global.ng.common, global.ng.forms, global.i2, global.ng.material.tooltip, global.i7, global.ng.cdk.bidi, global.ng.cdk.scrolling));
5
- }(this, (function (exports, i0, i1, i3, i2, i4, i7, i5, i6) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-drag-drop'), require('@angular/material/tooltip'), require('@apipass/icons'), require('@apipass/inputs'), require('@angular/cdk/bidi'), require('@angular/cdk/scrolling')) :
3
+ typeof define === 'function' && define.amd ? define('@apipass/schemas', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'ngx-drag-drop', '@angular/material/tooltip', '@apipass/icons', '@apipass/inputs', '@angular/cdk/bidi', '@angular/cdk/scrolling'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.apipass = global.apipass || {}, global.apipass.schemas = {}), global.ng.core, global.ng.common, global.ng.forms, global.i2, global.ng.material.tooltip, global.i2$1, global.i7, global.ng.cdk.bidi, global.ng.cdk.scrolling));
5
+ }(this, (function (exports, i0, i1, i3, i2, i4, i2$1, i7, i5, i6) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -665,7 +665,7 @@
665
665
  i0.ɵɵelement(5, "i", 10);
666
666
  i0.ɵɵelementEnd();
667
667
  i0.ɵɵelementStart(6, "input", 11);
668
- i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_0_Template_input_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; return attribute_r5.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_0_Template_input_dndDrop_6_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onDropAttr($event, attribute_r5); });
668
+ i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_0_Template_input_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; return attribute_r5.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_0_Template_input_dndDrop_6_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onDropAttr($event, "value", attribute_r5); });
669
669
  i0.ɵɵelementEnd();
670
670
  i0.ɵɵelementEnd();
671
671
  i0.ɵɵelementEnd();
@@ -694,7 +694,7 @@
694
694
  i0.ɵɵelementEnd();
695
695
  i0.ɵɵelementEnd();
696
696
  i0.ɵɵelementStart(7, "input", 11);
697
- i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.newCustomField.label = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_7_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.onDropAttr($event, ctx_r13.newCustomField.label); });
697
+ i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.newCustomField.label = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_7_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.onDropAttr($event, "label", ctx_r13.newCustomField); });
698
698
  i0.ɵɵelementEnd();
699
699
  i0.ɵɵelementEnd();
700
700
  i0.ɵɵelementEnd();
@@ -707,7 +707,7 @@
707
707
  i0.ɵɵelementEnd();
708
708
  i0.ɵɵelementEnd();
709
709
  i0.ɵɵelementStart(14, "input", 11);
710
- i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_14_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.newCustomField.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_14_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.onDropAttr($event, ctx_r15.newCustomField.value); });
710
+ i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_14_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.newCustomField.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_14_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.onDropAttr($event, "value", ctx_r15.newCustomField); });
711
711
  i0.ɵɵelementEnd();
712
712
  i0.ɵɵelementEnd();
713
713
  i0.ɵɵelementEnd();
@@ -796,11 +796,11 @@
796
796
  this.model.splice(attributeIndex, 1);
797
797
  this.modelChange.emit(this.model);
798
798
  };
799
- SchemaCustomAttributesComponent.prototype.onDropAttr = function ($event, attribute) {
800
- if (!attribute) {
801
- attribute = '';
799
+ SchemaCustomAttributesComponent.prototype.onDropAttr = function ($event, value, newCustomField) {
800
+ if (!newCustomField[value]) {
801
+ newCustomField[value] = '';
802
802
  }
803
- attribute += "{{" + $event.data + "}}";
803
+ newCustomField[value] += "{{" + $event.data + "}}";
804
804
  };
805
805
  return SchemaCustomAttributesComponent;
806
806
  }(BaseSchemaComponent));
@@ -1309,49 +1309,52 @@
1309
1309
  }] });
1310
1310
  })();
1311
1311
 
1312
- var _c0$6 = function () { return { standalone: true }; };
1313
- function InputRenderComponent_input_1_Template(rf, ctx) {
1312
+ function InputRenderComponent_div_1_Template(rf, ctx) {
1314
1313
  if (rf & 1) {
1315
- var _r5_1 = i0.ɵɵgetCurrentView();
1316
- i0.ɵɵelementStart(0, "input", 4);
1317
- i0.ɵɵlistener("ngModelChange", function InputRenderComponent_input_1_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.value = $event; })("ngModelChange", function InputRenderComponent_input_1_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.onChange($event); })("dndDrop", function InputRenderComponent_input_1_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onDropCallBack($event, ctx_r7.value); });
1314
+ var _r6_1 = i0.ɵɵgetCurrentView();
1315
+ i0.ɵɵelementStart(0, "div", 5);
1316
+ i0.ɵɵelementStart(1, "icon", 6);
1317
+ i0.ɵɵlistener("onClick", function InputRenderComponent_div_1_Template_icon_onClick_1_listener() { i0.ɵɵrestoreView(_r6_1); var ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.schema.readOnlyPassword ? ctx_r5.editPassword() : ctx_r5.savePassword(); });
1318
+ i0.ɵɵelementEnd();
1318
1319
  i0.ɵɵelementEnd();
1319
1320
  }
1320
1321
  if (rf & 2) {
1321
1322
  var ctx_r0 = i0.ɵɵnextContext();
1322
- i0.ɵɵpropertyInterpolate("placeholder", ctx_r0.schema.description);
1323
- i0.ɵɵproperty("type", ctx_r0.schema.type === "password" ? "password" : "text")("ngModel", ctx_r0.value)("ngModelOptions", i0.ɵɵpureFunction0(6, _c0$6))("id", ctx_r0.inputId)("maxlength", ctx_r0.schema.maxLength);
1323
+ i0.ɵɵadvance(1);
1324
+ i0.ɵɵproperty("name", ctx_r0.schema.readOnlyPassword ? "fas fa-pencil-alt" : "fas fa-check");
1324
1325
  }
1325
1326
  }
1326
- function InputRenderComponent_select_box_2_Template(rf, ctx) {
1327
+ var _c0$6 = function () { return { standalone: true }; };
1328
+ function InputRenderComponent_input_2_Template(rf, ctx) {
1327
1329
  if (rf & 1) {
1328
- var _r9_1 = i0.ɵɵgetCurrentView();
1329
- i0.ɵɵelementStart(0, "select-box", 5);
1330
- i0.ɵɵlistener("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9_1); var ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.value = $event; })("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9_1); var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onChange($event.key); });
1330
+ var _r8_1 = i0.ɵɵgetCurrentView();
1331
+ i0.ɵɵelementStart(0, "input", 7);
1332
+ i0.ɵɵlistener("ngModelChange", function InputRenderComponent_input_2_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.value = $event; })("ngModelChange", function InputRenderComponent_input_2_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.onChange($event); })("dndDrop", function InputRenderComponent_input_2_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onDropCallBack($event, ctx_r10.value); });
1331
1333
  i0.ɵɵelementEnd();
1332
1334
  }
1333
1335
  if (rf & 2) {
1334
1336
  var ctx_r1 = i0.ɵɵnextContext();
1335
- i0.ɵɵproperty("id", ctx_r1.inputId)("ngModel", ctx_r1.value)("ngModelOptions", i0.ɵɵpureFunction0(12, _c0$6))("placeholder", ctx_r1.schema.description || ctx_r1.selectPlaceHolderLabel)("searchPlaceHolder", ctx_r1.selectSearchPlaceHolderLabel)("clearText", ctx_r1.selectClearLabel)("notFoundText", ctx_r1.selectNotFoundLabel)("bindKey", "key")("bindValue", "value")("enabledSearch", true)("limitItens", 30)("data", ctx_r1.schema.options);
1337
+ i0.ɵɵpropertyInterpolate("placeholder", ctx_r1.schema.type === "password" && ctx_r1.schema.readOnlyPassword ? "*****" : ctx_r1.schema.description);
1338
+ i0.ɵɵproperty("disabled", ctx_r1.schema.readOnlyPassword)("type", ctx_r1.schema.type === "password" ? "password" : "text")("ngModel", ctx_r1.value)("ngModelOptions", i0.ɵɵpureFunction0(7, _c0$6))("id", ctx_r1.inputId)("maxlength", ctx_r1.schema.maxLength);
1336
1339
  }
1337
1340
  }
1338
- function InputRenderComponent_number_input_3_Template(rf, ctx) {
1341
+ function InputRenderComponent_select_box_3_Template(rf, ctx) {
1339
1342
  if (rf & 1) {
1340
1343
  var _r12_1 = i0.ɵɵgetCurrentView();
1341
- i0.ɵɵelementStart(0, "number-input", 6);
1342
- i0.ɵɵlistener("modelChange", function InputRenderComponent_number_input_3_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.value = $event; })("modelChange", function InputRenderComponent_number_input_3_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.onChange($event); });
1344
+ i0.ɵɵelementStart(0, "select-box", 8);
1345
+ i0.ɵɵlistener("ngModelChange", function InputRenderComponent_select_box_3_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.value = $event; })("ngModelChange", function InputRenderComponent_select_box_3_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.onChange($event.key); });
1343
1346
  i0.ɵɵelementEnd();
1344
1347
  }
1345
1348
  if (rf & 2) {
1346
1349
  var ctx_r2 = i0.ɵɵnextContext();
1347
- i0.ɵɵproperty("model", ctx_r2.value)("inputId", ctx_r2.inputId)("placeholder", ctx_r2.schema.description)("maxLength", ctx_r2.schema.maxLength);
1350
+ i0.ɵɵproperty("id", ctx_r2.inputId)("ngModel", ctx_r2.value)("ngModelOptions", i0.ɵɵpureFunction0(12, _c0$6))("placeholder", ctx_r2.schema.description || ctx_r2.selectPlaceHolderLabel)("searchPlaceHolder", ctx_r2.selectSearchPlaceHolderLabel)("clearText", ctx_r2.selectClearLabel)("notFoundText", ctx_r2.selectNotFoundLabel)("bindKey", "key")("bindValue", "value")("enabledSearch", true)("limitItens", 30)("data", ctx_r2.schema.options);
1348
1351
  }
1349
1352
  }
1350
- function InputRenderComponent_boolean_input_4_Template(rf, ctx) {
1353
+ function InputRenderComponent_number_input_4_Template(rf, ctx) {
1351
1354
  if (rf & 1) {
1352
1355
  var _r15_1 = i0.ɵɵgetCurrentView();
1353
- i0.ɵɵelementStart(0, "boolean-input", 6);
1354
- i0.ɵɵlistener("modelChange", function InputRenderComponent_boolean_input_4_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r15_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.value = $event; })("modelChange", function InputRenderComponent_boolean_input_4_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r15_1); var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onChange($event); });
1356
+ i0.ɵɵelementStart(0, "number-input", 9);
1357
+ i0.ɵɵlistener("modelChange", function InputRenderComponent_number_input_4_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r15_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.value = $event; })("modelChange", function InputRenderComponent_number_input_4_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r15_1); var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onChange($event); });
1355
1358
  i0.ɵɵelementEnd();
1356
1359
  }
1357
1360
  if (rf & 2) {
@@ -1359,6 +1362,19 @@
1359
1362
  i0.ɵɵproperty("model", ctx_r3.value)("inputId", ctx_r3.inputId)("placeholder", ctx_r3.schema.description)("maxLength", ctx_r3.schema.maxLength);
1360
1363
  }
1361
1364
  }
1365
+ function InputRenderComponent_boolean_input_5_Template(rf, ctx) {
1366
+ if (rf & 1) {
1367
+ var _r18_1 = i0.ɵɵgetCurrentView();
1368
+ i0.ɵɵelementStart(0, "boolean-input", 9);
1369
+ i0.ɵɵlistener("modelChange", function InputRenderComponent_boolean_input_5_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r18_1); var ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.value = $event; })("modelChange", function InputRenderComponent_boolean_input_5_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r18_1); var ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.onChange($event); });
1370
+ i0.ɵɵelementEnd();
1371
+ }
1372
+ if (rf & 2) {
1373
+ var ctx_r4 = i0.ɵɵnextContext();
1374
+ i0.ɵɵproperty("model", ctx_r4.value)("inputId", ctx_r4.inputId)("placeholder", ctx_r4.schema.description)("maxLength", ctx_r4.schema.maxLength);
1375
+ }
1376
+ }
1377
+ var _c1$2 = function (a0) { return { "schema-input-container-password": a0 }; };
1362
1378
  var InputRenderComponent = /** @class */ (function (_super) {
1363
1379
  __extends(InputRenderComponent, _super);
1364
1380
  function InputRenderComponent() {
@@ -1374,7 +1390,7 @@
1374
1390
  }
1375
1391
  InputRenderComponent.prototype.ngAfterContentInit = function () {
1376
1392
  var _this = this;
1377
- var _a, _b;
1393
+ var _a, _b, _c;
1378
1394
  if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) !== 'object' && ((_b = this.schema) === null || _b === void 0 ? void 0 : _b.type) !== 'array') {
1379
1395
  if (!this.editing && this.schema.options) {
1380
1396
  var $event = this.schema.options.filter(function (item) { return item.selected === true; });
@@ -1394,28 +1410,48 @@
1394
1410
  this.value = this.model;
1395
1411
  }
1396
1412
  }
1413
+ if (this.editing && ((_c = this.schema) === null || _c === void 0 ? void 0 : _c.type) === 'password') {
1414
+ this.schema.readOnlyPassword = true;
1415
+ }
1397
1416
  };
1398
1417
  InputRenderComponent.prototype.onDropCallBack = function ($event, value) {
1399
1418
  this.value = value = _super.prototype.onDrop.call(this, $event, value);
1400
1419
  this.onChange(value);
1401
1420
  };
1402
1421
  InputRenderComponent.prototype.onChange = function ($event) {
1403
- this.model = $event;
1422
+ if (this.schema.type !== 'password' || !this.editing) {
1423
+ this.model = $event;
1424
+ this.modelChange.emit(this.model);
1425
+ }
1426
+ };
1427
+ InputRenderComponent.prototype.savePassword = function () {
1428
+ this.model = this.value || '';
1404
1429
  this.modelChange.emit(this.model);
1430
+ this.setReadOnlyPassword(true);
1431
+ };
1432
+ InputRenderComponent.prototype.editPassword = function () {
1433
+ this.setReadOnlyPassword(false);
1434
+ };
1435
+ InputRenderComponent.prototype.setReadOnlyPassword = function (value) {
1436
+ this.schema.readOnlyPassword = value;
1405
1437
  };
1406
1438
  return InputRenderComponent;
1407
1439
  }(BaseSchemaComponent));
1408
1440
  InputRenderComponent.ɵfac = function InputRenderComponent_Factory(t) { return ɵInputRenderComponent_BaseFactory(t || InputRenderComponent); };
1409
- InputRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: InputRenderComponent, selectors: [["input-render"]], inputs: { selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", schema: "schema", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing" }, outputs: { onDropEvent: "onDropEvent" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 4, consts: [[1, "schema-input-container"], ["class", "form-control", "dndDropzone", "", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop", 4, "ngIf"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange", 4, "ngIf"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange", 4, "ngIf"], ["dndDropzone", "", 1, "form-control", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange"]], template: function InputRenderComponent_Template(rf, ctx) {
1441
+ InputRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: InputRenderComponent, selectors: [["input-render"]], inputs: { selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", schema: "schema", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing" }, outputs: { onDropEvent: "onDropEvent" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 8, consts: [[1, "schema-input-container", 3, "ngClass"], ["class", "edit-icon", 4, "ngIf"], ["class", "form-control", "dndDropzone", "", 3, "disabled", "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop", 4, "ngIf"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange", 4, "ngIf"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange", 4, "ngIf"], [1, "edit-icon"], ["size", "15", "type", "primary", 3, "name", "onClick"], ["dndDropzone", "", 1, "form-control", 3, "disabled", "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange"]], template: function InputRenderComponent_Template(rf, ctx) {
1410
1442
  if (rf & 1) {
1411
1443
  i0.ɵɵelementStart(0, "div", 0);
1412
- i0.ɵɵtemplate(1, InputRenderComponent_input_1_Template, 1, 7, "input", 1);
1413
- i0.ɵɵtemplate(2, InputRenderComponent_select_box_2_Template, 1, 13, "select-box", 2);
1414
- i0.ɵɵtemplate(3, InputRenderComponent_number_input_3_Template, 1, 4, "number-input", 3);
1415
- i0.ɵɵtemplate(4, InputRenderComponent_boolean_input_4_Template, 1, 4, "boolean-input", 3);
1444
+ i0.ɵɵtemplate(1, InputRenderComponent_div_1_Template, 2, 1, "div", 1);
1445
+ i0.ɵɵtemplate(2, InputRenderComponent_input_2_Template, 1, 8, "input", 2);
1446
+ i0.ɵɵtemplate(3, InputRenderComponent_select_box_3_Template, 1, 13, "select-box", 3);
1447
+ i0.ɵɵtemplate(4, InputRenderComponent_number_input_4_Template, 1, 4, "number-input", 4);
1448
+ i0.ɵɵtemplate(5, InputRenderComponent_boolean_input_5_Template, 1, 4, "boolean-input", 4);
1416
1449
  i0.ɵɵelementEnd();
1417
1450
  }
1418
1451
  if (rf & 2) {
1452
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$2, ctx.schema.type === "password"));
1453
+ i0.ɵɵadvance(1);
1454
+ i0.ɵɵproperty("ngIf", ctx.schema.type === "password" && ctx.editing);
1419
1455
  i0.ɵɵadvance(1);
1420
1456
  i0.ɵɵproperty("ngIf", (ctx.schema.type === "string" || ctx.schema.type === "password") && !ctx.schema.options);
1421
1457
  i0.ɵɵadvance(1);
@@ -1425,7 +1461,7 @@
1425
1461
  i0.ɵɵadvance(1);
1426
1462
  i0.ɵɵproperty("ngIf", ctx.schema.type === "boolean");
1427
1463
  }
1428
- }, directives: [i1.NgIf, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator, i7.SelectBoxComponent, NumberInputComponent, BooleanInputComponent], styles: [""] });
1464
+ }, directives: [i1.NgClass, i1.NgIf, i2$1.IconComponent, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator, i7.SelectBoxComponent, NumberInputComponent, BooleanInputComponent], styles: [".schema-input-container-password[_ngcontent-%COMP%]{position:relative}.schema-input-container-password[_ngcontent-%COMP%] .edit-icon[_ngcontent-%COMP%]{position:absolute;right:-5px;top:10px;z-index:1}.schema-input-container-password[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{display:block;padding-right:40px!important;width:calc(100% - 30px)!important}"] });
1429
1465
  var ɵInputRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(InputRenderComponent);
1430
1466
  /*@__PURE__*/ (function () {
1431
1467
  i0.ɵsetClassMetadata(InputRenderComponent, [{
@@ -1737,7 +1773,7 @@
1737
1773
  var SchemaFieldsService = /** @class */ (function () {
1738
1774
  function SchemaFieldsService() {
1739
1775
  }
1740
- SchemaFieldsService.prototype.validateSchemaFields = function (propertiesRendered, model) {
1776
+ SchemaFieldsService.prototype.validateSchemaFields = function (propertiesRendered, model, editing) {
1741
1777
  return __awaiter(this, void 0, void 0, function () {
1742
1778
  var emptyFields, invalidMinLengthFields, invalidMaxLengthFields, structValidationField, _a;
1743
1779
  return __generator(this, function (_b) {
@@ -1749,7 +1785,7 @@
1749
1785
  emptyFields = [];
1750
1786
  invalidMinLengthFields = [];
1751
1787
  invalidMaxLengthFields = [];
1752
- this.processProperties(propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1788
+ this.processProperties(propertiesRendered, model, editing, emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1753
1789
  structValidationField = new SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1754
1790
  _a = structValidationField;
1755
1791
  return [4 /*yield*/, this.getErrorsStringArray(structValidationField)];
@@ -1760,30 +1796,32 @@
1760
1796
  });
1761
1797
  });
1762
1798
  };
1763
- SchemaFieldsService.prototype.processProperties = function (propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, recursive) {
1799
+ SchemaFieldsService.prototype.processProperties = function (propertiesRendered, model, editing, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, recursive) {
1764
1800
  var e_1, _a;
1765
1801
  try {
1766
1802
  for (var propertiesRendered_1 = __values(propertiesRendered), propertiesRendered_1_1 = propertiesRendered_1.next(); !propertiesRendered_1_1.done; propertiesRendered_1_1 = propertiesRendered_1.next()) {
1767
1803
  var property = propertiesRendered_1_1.value;
1768
1804
  if ((property.type === 'object' || property.type === 'array') && property.properties) {
1769
- this.processProperties(property.properties, model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1805
+ this.processProperties(property.properties, model[property.id], editing, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1770
1806
  }
1771
1807
  else if (property.type === 'array' && !property.properties) {
1772
1808
  var newProperty = Object.assign({}, property);
1773
1809
  newProperty.type = 'string';
1774
- this.processProperties([newProperty], model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1810
+ this.processProperties([newProperty], model[property.id], editing, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1775
1811
  }
1776
1812
  else {
1777
1813
  var validateModel = recursive ? model : model[property.id];
1778
- if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0
1779
- && (validateModel === undefined || validateModel === '' || validateModel === null)) {
1780
- emptyFields.push(property);
1781
- }
1782
- else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) < property.minLength)) {
1783
- invalidMinLengthFields.push(property);
1784
- }
1785
- else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.maxLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) > property.maxLength)) {
1786
- invalidMaxLengthFields.push(property);
1814
+ if (property.type !== 'password' || !editing || validateModel !== undefined) {
1815
+ if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0
1816
+ && (validateModel === undefined || validateModel === '' || validateModel === null)) {
1817
+ emptyFields.push(property);
1818
+ }
1819
+ else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) < property.minLength)) {
1820
+ invalidMinLengthFields.push(property);
1821
+ }
1822
+ else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.maxLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) > property.maxLength)) {
1823
+ invalidMaxLengthFields.push(property);
1824
+ }
1787
1825
  }
1788
1826
  }
1789
1827
  }
@@ -1967,7 +2005,7 @@
1967
2005
  if (rf & 2) {
1968
2006
  i0.ɵɵproperty("ngIf", ctx.loaded);
1969
2007
  }
1970
- }, directives: [i1.NgIf, SchemaFormComponent, i1.NgForOf, SchemaCustomAttributesComponent], styles: [".schema[_ngcontent-%COMP%] .info-label{display:block}.schema[_ngcontent-%COMP%] input.form-control{background:#fff;border:1px solid #ddd;border-radius:3px;padding:11px;width:100%}.schema[_ngcontent-%COMP%] select.form-control{border:1px solid #ddd;border-radius:4px;color:#777;cursor:pointer;padding:11px;width:100%}.schema[_ngcontent-%COMP%] .ng-select-container{height:38px!important;min-height:38px!important}.schema[_ngcontent-%COMP%] .btn-outline-primary{background:var(--color-primary);border:1px solid var(--color-secondary);border-radius:4px;color:var(--color-secondary);cursor:pointer;padding:5px 15px}.schema[_ngcontent-%COMP%] .btn-outline-primary:hover{background:var(--color-primary-hover)}.schema[_ngcontent-%COMP%] .subsection-item-title, .schema[_ngcontent-%COMP%] array-session .subsection-element{color:var(--color-primary)}"] });
2008
+ }, directives: [i1.NgIf, SchemaFormComponent, i1.NgForOf, SchemaCustomAttributesComponent], styles: [".schema[_ngcontent-%COMP%] .info-label{display:block}.schema[_ngcontent-%COMP%] input.form-control{background:#fff;border:1px solid #ddd;border-radius:3px;padding:11px;width:100%}.schema[_ngcontent-%COMP%] input.form-control:disabled{background:#ccc}.schema[_ngcontent-%COMP%] select.form-control{border:1px solid #ddd;border-radius:4px;color:#777;cursor:pointer;padding:11px;width:100%}.schema[_ngcontent-%COMP%] .ng-select-container{height:38px!important;min-height:38px!important}.schema[_ngcontent-%COMP%] .btn-outline-primary{background:var(--color-primary);border:1px solid var(--color-secondary);border-radius:4px;color:var(--color-secondary);cursor:pointer;padding:5px 15px}.schema[_ngcontent-%COMP%] .btn-outline-primary:hover{background:var(--color-primary-hover)}.schema[_ngcontent-%COMP%] .subsection-item-title, .schema[_ngcontent-%COMP%] array-session .subsection-element{color:var(--color-primary)}"] });
1971
2009
  var ɵSchemaFormRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaFormRenderComponent);
1972
2010
  /*@__PURE__*/ (function () {
1973
2011
  i0.ɵsetClassMetadata(SchemaFormRenderComponent, [{
@@ -2147,7 +2185,8 @@
2147
2185
  i2.DndModule,
2148
2186
  i3.FormsModule,
2149
2187
  i4.MatTooltipModule,
2150
- i7.InputsModule
2188
+ i7.InputsModule,
2189
+ i2$1.IconsModule
2151
2190
  ]] });
2152
2191
  (function () {
2153
2192
  (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SchemaFormRenderModule, { declarations: [ArraySessionComponent,
@@ -2164,7 +2203,8 @@
2164
2203
  i2.DndModule,
2165
2204
  i3.FormsModule,
2166
2205
  i4.MatTooltipModule,
2167
- i7.InputsModule], exports: [ArraySessionComponent,
2206
+ i7.InputsModule,
2207
+ i2$1.IconsModule], exports: [ArraySessionComponent,
2168
2208
  SchemaArrayComponent,
2169
2209
  FieldRenderComponent,
2170
2210
  InputRenderComponent,
@@ -2185,7 +2225,8 @@
2185
2225
  i2.DndModule,
2186
2226
  i3.FormsModule,
2187
2227
  i4.MatTooltipModule,
2188
- i7.InputsModule
2228
+ i7.InputsModule,
2229
+ i2$1.IconsModule
2189
2230
  ],
2190
2231
  declarations: [
2191
2232
  ArraySessionComponent,
@@ -2220,7 +2261,7 @@
2220
2261
  }]
2221
2262
  }], null, null);
2222
2263
  })();
2223
- i0.ɵɵsetComponentScope(SchemaFormComponent, [i1.NgClass, i1.NgComponentOutlet, i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, i1.NgSwitch, i1.NgSwitchCase, i1.NgSwitchDefault, i1.NgPlural, i1.NgPluralCase, i2.DndDraggableDirective, i2.DndDropzoneDirective, i2.DndHandleDirective, i2.DndPlaceholderRefDirective, i2.DndDragImageRefDirective, i3.ɵangular_packages_forms_forms_y, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.RangeValueAccessor, i3.CheckboxControlValueAccessor, i3.SelectControlValueAccessor, i3.SelectMultipleControlValueAccessor, i3.RadioControlValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.RequiredValidator, i3.MinLengthValidator, i3.MaxLengthValidator, i3.PatternValidator, i3.CheckboxRequiredValidator, i3.EmailValidator, i3.NgModel, i3.NgModelGroup, i3.NgForm, i4.MatTooltip, i4.TooltipComponent, i5.Dir, i6.CdkScrollable, i7.SelectBoxComponent, i7.SelectEnumComponent, i7.InputTextComponent, i7.InputPasswordComponent, i7.InputAvatarComponent, i7.InputFileComponent, i7.CustomSelectComponent, i7.FieldComponent, ArraySessionComponent,
2264
+ i0.ɵɵsetComponentScope(SchemaFormComponent, [i1.NgClass, i1.NgComponentOutlet, i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, i1.NgSwitch, i1.NgSwitchCase, i1.NgSwitchDefault, i1.NgPlural, i1.NgPluralCase, i2.DndDraggableDirective, i2.DndDropzoneDirective, i2.DndHandleDirective, i2.DndPlaceholderRefDirective, i2.DndDragImageRefDirective, i3.ɵangular_packages_forms_forms_y, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.RangeValueAccessor, i3.CheckboxControlValueAccessor, i3.SelectControlValueAccessor, i3.SelectMultipleControlValueAccessor, i3.RadioControlValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.RequiredValidator, i3.MinLengthValidator, i3.MaxLengthValidator, i3.PatternValidator, i3.CheckboxRequiredValidator, i3.EmailValidator, i3.NgModel, i3.NgModelGroup, i3.NgForm, i4.MatTooltip, i4.TooltipComponent, i5.Dir, i6.CdkScrollable, i7.SelectBoxComponent, i7.SelectEnumComponent, i7.InputTextComponent, i7.InputPasswordComponent, i7.InputAvatarComponent, i7.InputFileComponent, i7.CustomSelectComponent, i7.FieldComponent, i2$1.IconComponent, ArraySessionComponent,
2224
2265
  SchemaArrayComponent,
2225
2266
  FieldRenderComponent,
2226
2267
  InputRenderComponent,