@apipass/schemas 0.2.14 → 0.2.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.
@@ -1309,27 +1309,49 @@
1309
1309
  }] });
1310
1310
  })();
1311
1311
 
1312
+ function InputRenderComponent_div_1_icon_1_Template(rf, ctx) {
1313
+ if (rf & 1) {
1314
+ var _r8_1 = i0.ɵɵgetCurrentView();
1315
+ i0.ɵɵelementStart(0, "icon", 8);
1316
+ i0.ɵɵlistener("onClick", function InputRenderComponent_div_1_icon_1_Template_icon_onClick_0_listener() { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(2); return ctx_r7.editPassword(); });
1317
+ i0.ɵɵelementEnd();
1318
+ }
1319
+ if (rf & 2) {
1320
+ i0.ɵɵproperty("name", "fas fa-pencil-alt");
1321
+ }
1322
+ }
1323
+ function InputRenderComponent_div_1_icon_2_Template(rf, ctx) {
1324
+ if (rf & 1) {
1325
+ var _r10_1 = i0.ɵɵgetCurrentView();
1326
+ i0.ɵɵelementStart(0, "icon", 9);
1327
+ i0.ɵɵlistener("mousedown", function InputRenderComponent_div_1_icon_2_Template_icon_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r10_1); var ctx_r9 = i0.ɵɵnextContext(2); ctx_r9.cancelEditPassword(); return $event.stopPropagation(); });
1328
+ i0.ɵɵelementEnd();
1329
+ }
1330
+ if (rf & 2) {
1331
+ i0.ɵɵproperty("name", "fas fa-ban");
1332
+ }
1333
+ }
1312
1334
  function InputRenderComponent_div_1_Template(rf, ctx) {
1313
1335
  if (rf & 1) {
1314
- var _r6_1 = i0.ɵɵgetCurrentView();
1315
1336
  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();
1337
+ i0.ɵɵtemplate(1, InputRenderComponent_div_1_icon_1_Template, 1, 1, "icon", 6);
1338
+ i0.ɵɵtemplate(2, InputRenderComponent_div_1_icon_2_Template, 1, 1, "icon", 7);
1319
1339
  i0.ɵɵelementEnd();
1320
1340
  }
1321
1341
  if (rf & 2) {
1322
1342
  var ctx_r0 = i0.ɵɵnextContext();
1323
1343
  i0.ɵɵadvance(1);
1324
- i0.ɵɵproperty("name", ctx_r0.schema.readOnlyPassword ? "fas fa-pencil-alt" : "fas fa-check");
1344
+ i0.ɵɵproperty("ngIf", ctx_r0.schema.readOnlyPassword);
1345
+ i0.ɵɵadvance(1);
1346
+ i0.ɵɵproperty("ngIf", !ctx_r0.schema.readOnlyPassword);
1325
1347
  }
1326
1348
  }
1327
1349
  var _c0$6 = function () { return { standalone: true }; };
1328
1350
  function InputRenderComponent_input_2_Template(rf, ctx) {
1329
1351
  if (rf & 1) {
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); });
1352
+ var _r12_1 = i0.ɵɵgetCurrentView();
1353
+ i0.ɵɵelementStart(0, "input", 10);
1354
+ i0.ɵɵlistener("blur", function InputRenderComponent_input_2_Template_input_blur_0_listener() { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.onInputBlur(); })("ngModelChange", function InputRenderComponent_input_2_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.value = $event; })("ngModelChange", function InputRenderComponent_input_2_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.onChange($event); })("dndDrop", function InputRenderComponent_input_2_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.onDropCallBack($event, ctx_r15.value); });
1333
1355
  i0.ɵɵelementEnd();
1334
1356
  }
1335
1357
  if (rf & 2) {
@@ -1340,9 +1362,9 @@
1340
1362
  }
1341
1363
  function InputRenderComponent_select_box_3_Template(rf, ctx) {
1342
1364
  if (rf & 1) {
1343
- var _r12_1 = i0.ɵɵgetCurrentView();
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); });
1365
+ var _r17_1 = i0.ɵɵgetCurrentView();
1366
+ i0.ɵɵelementStart(0, "select-box", 11);
1367
+ i0.ɵɵlistener("ngModelChange", function InputRenderComponent_select_box_3_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r17_1); var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.value = $event; })("ngModelChange", function InputRenderComponent_select_box_3_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r17_1); var ctx_r18 = i0.ɵɵnextContext(); return ctx_r18.onChange($event.key); });
1346
1368
  i0.ɵɵelementEnd();
1347
1369
  }
1348
1370
  if (rf & 2) {
@@ -1352,9 +1374,9 @@
1352
1374
  }
1353
1375
  function InputRenderComponent_number_input_4_Template(rf, ctx) {
1354
1376
  if (rf & 1) {
1355
- var _r15_1 = i0.ɵɵgetCurrentView();
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); });
1377
+ var _r20_1 = i0.ɵɵgetCurrentView();
1378
+ i0.ɵɵelementStart(0, "number-input", 12);
1379
+ i0.ɵɵlistener("modelChange", function InputRenderComponent_number_input_4_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r20_1); var ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.value = $event; })("modelChange", function InputRenderComponent_number_input_4_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r20_1); var ctx_r21 = i0.ɵɵnextContext(); return ctx_r21.onChange($event); });
1358
1380
  i0.ɵɵelementEnd();
1359
1381
  }
1360
1382
  if (rf & 2) {
@@ -1364,9 +1386,9 @@
1364
1386
  }
1365
1387
  function InputRenderComponent_boolean_input_5_Template(rf, ctx) {
1366
1388
  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); });
1389
+ var _r23_1 = i0.ɵɵgetCurrentView();
1390
+ i0.ɵɵelementStart(0, "boolean-input", 12);
1391
+ i0.ɵɵlistener("modelChange", function InputRenderComponent_boolean_input_5_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r23_1); var ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.value = $event; })("modelChange", function InputRenderComponent_boolean_input_5_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r23_1); var ctx_r24 = i0.ɵɵnextContext(); return ctx_r24.onChange($event); });
1370
1392
  i0.ɵɵelementEnd();
1371
1393
  }
1372
1394
  if (rf & 2) {
@@ -1424,11 +1446,26 @@
1424
1446
  this.modelChange.emit(this.model);
1425
1447
  }
1426
1448
  };
1449
+ InputRenderComponent.prototype.onInputBlur = function () {
1450
+ var _a;
1451
+ if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'password') {
1452
+ this.savePassword();
1453
+ }
1454
+ };
1427
1455
  InputRenderComponent.prototype.savePassword = function () {
1428
1456
  this.model = this.value || '';
1429
1457
  this.modelChange.emit(this.model);
1430
1458
  this.setReadOnlyPassword(true);
1431
1459
  };
1460
+ InputRenderComponent.prototype.cancelEditPassword = function () {
1461
+ var _this = this;
1462
+ setTimeout(function () {
1463
+ _this.value = undefined;
1464
+ _this.model = undefined;
1465
+ _this.modelChange.emit(_this.model);
1466
+ _this.setReadOnlyPassword(true);
1467
+ }, 100);
1468
+ };
1432
1469
  InputRenderComponent.prototype.editPassword = function () {
1433
1470
  this.setReadOnlyPassword(false);
1434
1471
  };
@@ -1438,10 +1475,10 @@
1438
1475
  return InputRenderComponent;
1439
1476
  }(BaseSchemaComponent));
1440
1477
  InputRenderComponent.ɵfac = function InputRenderComponent_Factory(t) { return ɵInputRenderComponent_BaseFactory(t || InputRenderComponent); };
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) {
1478
+ 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", "blur", "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", 4, "ngIf"], ["size", "15", "type", "primary clickable", 3, "name", "mousedown", 4, "ngIf"], ["size", "15", "type", "primary", 3, "name", "onClick"], ["size", "15", "type", "primary clickable", 3, "name", "mousedown"], ["dndDropzone", "", 1, "form-control", 3, "disabled", "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "blur", "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) {
1442
1479
  if (rf & 1) {
1443
1480
  i0.ɵɵelementStart(0, "div", 0);
1444
- i0.ɵɵtemplate(1, InputRenderComponent_div_1_Template, 2, 1, "div", 1);
1481
+ i0.ɵɵtemplate(1, InputRenderComponent_div_1_Template, 3, 2, "div", 1);
1445
1482
  i0.ɵɵtemplate(2, InputRenderComponent_input_2_Template, 1, 8, "input", 2);
1446
1483
  i0.ɵɵtemplate(3, InputRenderComponent_select_box_3_Template, 1, 13, "select-box", 3);
1447
1484
  i0.ɵɵtemplate(4, InputRenderComponent_number_input_4_Template, 1, 4, "number-input", 4);