@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
@@ -4506,7 +4506,7 @@
4506
4506
  useExisting: core.forwardRef(function () { return CountryPhonePickerComponent_1; }),
4507
4507
  multi: true,
4508
4508
  }],
4509
- 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}"]
4509
+ 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}"]
4510
4510
  })
4511
4511
  ], CountryPhonePickerComponent);
4512
4512
  return CountryPhonePickerComponent;
@@ -10044,10 +10044,29 @@
10044
10044
  component.instance.field = this.field;
10045
10045
  // Must be this way because some teams use name like "e070emp.codemp"
10046
10046
  component.instance.formControl = this.group["controls"][this.field.name];
10047
+ this._switchEmptyStringToNull(component);
10047
10048
  component.instance.errorMessages = this.errorMessages;
10048
10049
  this.setVariablesByType(component);
10049
10050
  return component;
10050
10051
  };
10052
+ DynamicField.prototype._switchEmptyStringToNull = function (component) {
10053
+ switch (component.instance.field.type) {
10054
+ case exports.FieldType.Password:
10055
+ case exports.FieldType.String:
10056
+ case exports.FieldType.Text:
10057
+ case exports.FieldType.TextIA:
10058
+ var valueChanges$_1 = component.instance.formControl.valueChanges
10059
+ .subscribe(function (value) {
10060
+ if (value === "") {
10061
+ component.instance.formControl.setValue(null, { emitEvent: false });
10062
+ }
10063
+ });
10064
+ component.onDestroy(function () {
10065
+ valueChanges$_1.unsubscribe();
10066
+ });
10067
+ return;
10068
+ }
10069
+ };
10051
10070
  DynamicField.prototype.setVariablesByType = function (component) {
10052
10071
  if (this.field.type == exports.FieldType.Time) {
10053
10072
  component.instance.timeOnly = true;
@@ -10229,6 +10248,9 @@
10229
10248
  this.component.instance.errorMessages = this.errorMessages;
10230
10249
  }
10231
10250
  };
10251
+ DynamicFormDirective.prototype.ngOnDestroy = function () {
10252
+ this.component.destroy();
10253
+ };
10232
10254
  DynamicFormDirective.prototype.isField = function () {
10233
10255
  return exports.FieldType[this.config.type];
10234
10256
  };