@eo-sdk/client 8.5.0-rc.1 → 8.6.0-rc.1

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 (26) hide show
  1. package/app/eo-framework/settings/change-password/change-password-form/change-password-form.component.d.ts +4 -0
  2. package/assets/_default/i18n/de.json +3 -0
  3. package/assets/_default/i18n/en.json +4 -1
  4. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js +19 -6
  5. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js.map +1 -1
  6. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js +2 -2
  7. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js.map +1 -1
  8. package/bundles/eo-sdk-client.umd.js +10 -4
  9. package/bundles/eo-sdk-client.umd.js.map +1 -1
  10. package/bundles/eo-sdk-client.umd.min.js +1 -1
  11. package/bundles/eo-sdk-client.umd.min.js.map +1 -1
  12. package/eo-sdk-client.metadata.json +1 -1
  13. package/esm2015/app/eo-client/about-state/about-state.component.js +3 -3
  14. package/esm2015/app/eo-framework/settings/change-password/change-password-form/change-password-form.component.js +9 -3
  15. package/esm2015/projects/eo-sdk/core/lib/model/eo-user.model.js +1 -1
  16. package/esm2015/projects/eo-sdk/core/lib/service/auth/auth.service.js +2 -2
  17. package/esm2015/projects/eo-sdk/core/lib/service/user/user.service.js +19 -6
  18. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js +19 -6
  19. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js.map +1 -1
  20. package/fesm2015/eo-sdk-client.js +10 -4
  21. package/fesm2015/eo-sdk-client.js.map +1 -1
  22. package/package.json +2 -2
  23. package/projects/eo-sdk/core/eo-sdk-client-projects-eo-sdk-core.metadata.json +1 -1
  24. package/projects/eo-sdk/core/lib/model/eo-user.model.d.ts +4 -0
  25. package/projects/eo-sdk/core/lib/service/user/user.service.d.ts +7 -2
  26. package/projects/eo-sdk/core/package.json +1 -1
@@ -11,6 +11,10 @@ export declare class ChangePasswordFormComponent {
11
11
  onFormSumbit: EventEmitter<any>;
12
12
  changePasswordForm: FormGroup;
13
13
  passwordIsVisible: boolean;
14
+ passwordValidation: {
15
+ type: string;
16
+ amount: any;
17
+ };
14
18
  constructor(fb: FormBuilder, userService: UserService, translate: TranslateService, toaster: NotificationsService);
15
19
  generateForm(): void;
16
20
  newPasswordValidator(current: any, password: any): ValidatorFn;
@@ -311,6 +311,9 @@
311
311
  "eo.password.reset.error.password.title": "Passwort konte nicht geändert werden.",
312
312
  "eo.password.reset.error.old.password.message": "Das bestehende Passwort ist falsch.",
313
313
  "eo.password.reset.error.new.password.message": "Das neue Passwort ist ungültig.",
314
+ "eo.password.reset.error.new.password.short": "Falsches Passwortformat: Geben Sie mindestens {{amount}} Zeichen ein.",
315
+ "eo.password.reset.error.new.password.number": "Falsches Passwortformat: Verwenden Sie mindestens {{amount}} Ziffer(n).",
316
+ "eo.password.reset.error.new.password.specialchars": "Falsches Passwortformat: Verwenden Sie mindestens {{amount}} Sonderzeichen.",
314
317
  "eo.password.reset.success": "Das Passwort wurde geändert.",
315
318
  "eo.column.config.title": "Spaltenkonfiguration",
316
319
  "eo.column.config.action.save": "Speichern",
@@ -313,6 +313,9 @@
313
313
  "eo.password.reset.error.password.title": "The password could not be changed.",
314
314
  "eo.password.reset.error.old.password.message": "The current password is wrong.",
315
315
  "eo.password.reset.error.new.password.message": "The new password is invalid.",
316
+ "eo.password.reset.error.new.password.short": "Wrong password format: Minimum length: {{amount}}",
317
+ "eo.password.reset.error.new.password.number": "Wrong password format: Minimum amount of numbers: {{amount}}",
318
+ "eo.password.reset.error.new.password.specialchars": "Wrong password format: Minimum amount of special characters: {{amount}}",
316
319
  "eo.password.reset.success": "The password was changed.",
317
320
  "eo.column.config.title": "Column configuration",
318
321
  "eo.column.config.action.save": "Save",
@@ -477,7 +480,7 @@
477
480
  "eo.object.indexdata.save.browsernav": "You are currently editing the metadata of a form that has not been saved. Unsaved data will be lost.",
478
481
  "eo.object.indexdata.form.invalid": "The form contains errors. Correct the errors in order to be able to save the entries.",
479
482
  "eo.references.not.available": "Not available",
480
- "eo.references.deleted": "deleted reference",
483
+ "eo.references.deleted": "Deleted reference",
481
484
  "eo.references.object.notfound": "No references found.",
482
485
  "eo.references.to.label": "To this object",
483
486
  "eo.references.from.label": "To other objects",
@@ -1799,14 +1799,15 @@
1799
1799
  };
1800
1800
  /**
1801
1801
  * Set a new current user
1802
- * @param user The user to be set as current user
1802
+ * @param res The user to be set as current user
1803
1803
  */
1804
- UserService.prototype.setCurrentUser = function (user) {
1805
- this.user = user;
1804
+ UserService.prototype.setCurrentUser = function (res) {
1805
+ this.user = new EoUser(res);
1806
+ this.passwordValidationSettings = res.passwortvalidation;
1806
1807
  this.user.setImageBase(this.backend.getServiceBase());
1807
1808
  this.backend.setHeader('Accept-Language', this.user.getSchemaLocale());
1808
1809
  var languages = this.config.getClientLocales().map(function (lang) { return lang.iso; });
1809
- var userLang = user.getClientLocale();
1810
+ var userLang = this.user.getClientLocale();
1810
1811
  if (languages.indexOf(userLang) === -1) {
1811
1812
  userLang = this.config.getDefaultClientLocale();
1812
1813
  }
@@ -1974,7 +1975,19 @@
1974
1975
  */
1975
1976
  UserService.prototype.refreshCurrentUser = function () {
1976
1977
  var _this = this;
1977
- return this.backend.get(this.USER_FETCH_URI).pipe(operators.map(function (res) { return _this.setCurrentUser(new EoUser(res)); }));
1978
+ return this.backend.get(this.USER_FETCH_URI).pipe(operators.map(function (res) { return _this.setCurrentUser(res); }));
1979
+ };
1980
+ UserService.prototype.validatePassword = function (password) {
1981
+ if (password.length < this.passwordValidationSettings.minlength) {
1982
+ return { type: 'short', amount: this.passwordValidationSettings.minlength };
1983
+ }
1984
+ if (password.replace(/[^0-9]/g, '').length < this.passwordValidationSettings.minnumber) {
1985
+ return { type: 'number', amount: this.passwordValidationSettings.minnumber };
1986
+ }
1987
+ if (password.replace(/[a-zA-Z0-9ß ]/g, '').length < this.passwordValidationSettings.minspecialchars) {
1988
+ return { type: 'specialchars', amount: this.passwordValidationSettings.minspecialchars };
1989
+ }
1990
+ return { type: 'valid', amount: null };
1978
1991
  };
1979
1992
  return UserService;
1980
1993
  }());
@@ -3876,7 +3889,7 @@
3876
3889
  AuthService.prototype.initApp = function (user, sso) {
3877
3890
  var currUser = new EoUser(user);
3878
3891
  this.backend.setAuthProfile(this.profile);
3879
- this.userService.setCurrentUser(currUser);
3892
+ this.userService.setCurrentUser(user);
3880
3893
  var capabilities = this.capabilitiesService.setCapabilities(user.capabilities, sso);
3881
3894
  this.systemStatusService.init(this.config.getRaw('systemStatusUpdateInterval'));
3882
3895
  // update states