@seniorsistemas/angular-components 17.8.9 → 17.8.10

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.
Files changed (24) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +23 -1
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/dynamic-form/configurations/fields/profile-picture.d.ts +2 -2
  6. package/components/dynamic-form/dynamic-form.d.ts +1 -0
  7. package/components/dynamic-form/dynamic-form.directive.d.ts +3 -2
  8. package/components/profile-picture-picker/index.d.ts +1 -1
  9. package/esm2015/components/country-phone-picker/country-phone-picker.component.js +1 -1
  10. package/esm2015/components/dynamic-form/configurations/fields/profile-picture.js +1 -1
  11. package/esm2015/components/dynamic-form/dynamic-form.directive.js +5 -2
  12. package/esm2015/components/dynamic-form/dynamic-form.js +23 -4
  13. package/esm2015/components/profile-picture-picker/index.js +1 -1
  14. package/esm5/components/country-phone-picker/country-phone-picker.component.js +1 -1
  15. package/esm5/components/dynamic-form/configurations/fields/profile-picture.js +1 -1
  16. package/esm5/components/dynamic-form/dynamic-form.directive.js +5 -2
  17. package/esm5/components/dynamic-form/dynamic-form.js +23 -4
  18. package/esm5/components/profile-picture-picker/index.js +1 -1
  19. package/fesm2015/seniorsistemas-angular-components.js +23 -1
  20. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  21. package/fesm5/seniorsistemas-angular-components.js +23 -1
  22. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  23. package/package.json +1 -1
  24. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -4112,7 +4112,7 @@ CountryPhonePickerComponent = CountryPhonePickerComponent_1 = __decorate([
4112
4112
  useExisting: forwardRef(() => CountryPhonePickerComponent_1),
4113
4113
  multi: true,
4114
4114
  }],
4115
- styles: [".country-phone-picker .phone-input{background-color:#fff;border:1px solid #d8d8d8;border-radius:4px;display:-ms-flexbox;display:flex;line-height:normal}.country-phone-picker .phone-input .drop{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex}.country-phone-picker .phone-input .drop .drop-flag{margin-left:12px}.country-phone-picker .phone-input .drop .drop-icon{font-size:12px;margin:0 8px}.country-phone-picker .phone-input .phone-ddi{margin:8px 0}.country-phone-picker .phone-input input{border:none;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:150%;margin-left:8px}.country-phone-picker .phone-input input:focus{color:#697882;outline:0}.country-phone-picker .dropdown{background-color:#fff;border-radius:4px;box-shadow:0 4px 5px #00000033;padding:4px 0;position:absolute;margin:2px 0;z-index:999999}.country-phone-picker .dropdown .search{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:8px 12px}.country-phone-picker .dropdown .search .search-field{border:1px solid #d8d8d8;border-radius:4px;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;height:36px;line-height:150%;padding:0 32px 0 8px}.country-phone-picker .dropdown .search .search-icon{color:#333;font-size:12px;position:relative;right:24px}.country-phone-picker .dropdown .search .search-clear{color:#333;cursor:pointer;font-size:1rem}.country-phone-picker .dropdown .select-list{list-style:none;max-height:234px;min-width:360px;max-width:100vw;overflow:scroll;padding:0}.country-phone-picker .dropdown .select-list .select-option{cursor:pointer;display:-ms-flexbox;display:flex;padding:12px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.country-phone-picker .dropdown .select-list .select-option .select-option__flag{margin-right:12px}.country-phone-picker .dropdown .select-list .select-option .select-option__name{margin-right:.5rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.country-phone-picker .dropdown .select-list .select-option .select-option__ddi{color:#697882;font-size:14px;font-family:\"Open Sans\",sans-serif;font-weight:400;line-height:150%}.country-phone-picker .dropdown .select-list .select-option--focused,.country-phone-picker .dropdown .select-list .select-option:hover{background-color:#e5eaea}"]
4115
+ styles: [".country-phone-picker .phone-input{background-color:#fff;border:1px solid #d8d8d8;border-radius:4px;display:-ms-flexbox;display:flex;line-height:normal;overflow:hidden}.country-phone-picker .phone-input .drop{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex}.country-phone-picker .phone-input .drop .drop-flag{margin-left:12px}.country-phone-picker .phone-input .drop .drop-icon{font-size:12px;margin:0 8px}.country-phone-picker .phone-input .phone-ddi{margin:8px 0}.country-phone-picker .phone-input input{border:none;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:150%;margin-left:8px}.country-phone-picker .phone-input input:focus{color:#697882;outline:0}.country-phone-picker .dropdown{background-color:#fff;border-radius:4px;box-shadow:0 4px 5px #00000033;padding:4px 0;position:absolute;margin:2px 0;z-index:999999}.country-phone-picker .dropdown .search{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:8px 12px}.country-phone-picker .dropdown .search .search-field{border:1px solid #d8d8d8;border-radius:4px;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;height:36px;line-height:150%;padding:0 32px 0 8px}.country-phone-picker .dropdown .search .search-icon{color:#333;font-size:12px;position:relative;right:24px}.country-phone-picker .dropdown .search .search-clear{color:#333;cursor:pointer;font-size:1rem}.country-phone-picker .dropdown .select-list{list-style:none;max-height:234px;min-width:360px;max-width:100vw;overflow:scroll;padding:0}.country-phone-picker .dropdown .select-list .select-option{cursor:pointer;display:-ms-flexbox;display:flex;padding:12px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.country-phone-picker .dropdown .select-list .select-option .select-option__flag{margin-right:12px}.country-phone-picker .dropdown .select-list .select-option .select-option__name{margin-right:.5rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.country-phone-picker .dropdown .select-list .select-option .select-option__ddi{color:#697882;font-size:14px;font-family:\"Open Sans\",sans-serif;font-weight:400;line-height:150%}.country-phone-picker .dropdown .select-list .select-option--focused,.country-phone-picker .dropdown .select-list .select-option:hover{background-color:#e5eaea}"]
4116
4116
  })
4117
4117
  ], CountryPhonePickerComponent);
4118
4118
 
@@ -9275,10 +9275,29 @@ class DynamicField extends DynamicForm {
9275
9275
  component.instance.field = this.field;
9276
9276
  // Must be this way because some teams use name like "e070emp.codemp"
9277
9277
  component.instance.formControl = this.group["controls"][this.field.name];
9278
+ this._switchEmptyStringToNull(component);
9278
9279
  component.instance.errorMessages = this.errorMessages;
9279
9280
  this.setVariablesByType(component);
9280
9281
  return component;
9281
9282
  }
9283
+ _switchEmptyStringToNull(component) {
9284
+ switch (component.instance.field.type) {
9285
+ case FieldType.Password:
9286
+ case FieldType.String:
9287
+ case FieldType.Text:
9288
+ case FieldType.TextIA:
9289
+ const valueChanges$ = component.instance.formControl.valueChanges
9290
+ .subscribe((value) => {
9291
+ if (value === "") {
9292
+ component.instance.formControl.setValue(null, { emitEvent: false });
9293
+ }
9294
+ });
9295
+ component.onDestroy(() => {
9296
+ valueChanges$.unsubscribe();
9297
+ });
9298
+ return;
9299
+ }
9300
+ }
9282
9301
  setVariablesByType(component) {
9283
9302
  if (this.field.type == FieldType.Time) {
9284
9303
  component.instance.timeOnly = true;
@@ -9447,6 +9466,9 @@ let DynamicFormDirective = class DynamicFormDirective {
9447
9466
  this.component.instance.errorMessages = this.errorMessages;
9448
9467
  }
9449
9468
  }
9469
+ ngOnDestroy() {
9470
+ this.component.destroy();
9471
+ }
9450
9472
  isField() {
9451
9473
  return FieldType[this.config.type];
9452
9474
  }