@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
@@ -4360,7 +4360,7 @@ var CountryPhonePickerComponent = /** @class */ (function () {
4360
4360
  useExisting: forwardRef(function () { return CountryPhonePickerComponent_1; }),
4361
4361
  multi: true,
4362
4362
  }],
4363
- 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}"]
4363
+ 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}"]
4364
4364
  })
4365
4365
  ], CountryPhonePickerComponent);
4366
4366
  return CountryPhonePickerComponent;
@@ -9898,10 +9898,29 @@ var DynamicField = /** @class */ (function (_super) {
9898
9898
  component.instance.field = this.field;
9899
9899
  // Must be this way because some teams use name like "e070emp.codemp"
9900
9900
  component.instance.formControl = this.group["controls"][this.field.name];
9901
+ this._switchEmptyStringToNull(component);
9901
9902
  component.instance.errorMessages = this.errorMessages;
9902
9903
  this.setVariablesByType(component);
9903
9904
  return component;
9904
9905
  };
9906
+ DynamicField.prototype._switchEmptyStringToNull = function (component) {
9907
+ switch (component.instance.field.type) {
9908
+ case FieldType.Password:
9909
+ case FieldType.String:
9910
+ case FieldType.Text:
9911
+ case FieldType.TextIA:
9912
+ var valueChanges$_1 = component.instance.formControl.valueChanges
9913
+ .subscribe(function (value) {
9914
+ if (value === "") {
9915
+ component.instance.formControl.setValue(null, { emitEvent: false });
9916
+ }
9917
+ });
9918
+ component.onDestroy(function () {
9919
+ valueChanges$_1.unsubscribe();
9920
+ });
9921
+ return;
9922
+ }
9923
+ };
9905
9924
  DynamicField.prototype.setVariablesByType = function (component) {
9906
9925
  if (this.field.type == FieldType.Time) {
9907
9926
  component.instance.timeOnly = true;
@@ -10083,6 +10102,9 @@ var DynamicFormDirective = /** @class */ (function () {
10083
10102
  this.component.instance.errorMessages = this.errorMessages;
10084
10103
  }
10085
10104
  };
10105
+ DynamicFormDirective.prototype.ngOnDestroy = function () {
10106
+ this.component.destroy();
10107
+ };
10086
10108
  DynamicFormDirective.prototype.isField = function () {
10087
10109
  return FieldType[this.config.type];
10088
10110
  };