@eo-sdk/client 7.12.0-rc.1 → 7.13.0-rc.2

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 (43) hide show
  1. package/app/eo-framework/app-shell/app-bar/app-search/app-search.component.d.ts +3 -1
  2. package/app/eo-framework/stored-query/stored-query/stored-query.component.d.ts +3 -1
  3. package/app/eo-framework/stored-query/stored-query-details/stored-query-details.component.d.ts +3 -1
  4. package/app/eo-framework/ui/query-scope-select/query-scope-select.component.d.ts +11 -0
  5. package/app/eo-framework-core/search/app-search.service.d.ts +2 -1
  6. package/assets/_default/config/main.json +2 -1
  7. package/assets/_default/i18n/de.json +7 -4
  8. package/assets/_default/i18n/en.json +158 -155
  9. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js +26 -4
  10. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js.map +1 -1
  11. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js +2 -2
  12. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js.map +1 -1
  13. package/bundles/eo-sdk-client.umd.js +133 -76
  14. package/bundles/eo-sdk-client.umd.js.map +1 -1
  15. package/bundles/eo-sdk-client.umd.min.js +1 -1
  16. package/bundles/eo-sdk-client.umd.min.js.map +1 -1
  17. package/eo-sdk-client.d.ts +63 -62
  18. package/eo-sdk-client.metadata.json +1 -1
  19. package/esm2015/app/eo-client/about-state/about-state.component.js +3 -3
  20. package/esm2015/app/eo-framework/app-shell/app-bar/app-search/app-search.component.js +7 -3
  21. package/esm2015/app/eo-framework/form-elements/checkbox/checkbox.component.js +2 -2
  22. package/esm2015/app/eo-framework/grid/extensions/filter/text/text-filter.component.js +5 -5
  23. package/esm2015/app/eo-framework/stored-query/stored-query/stored-query.component.js +9 -3
  24. package/esm2015/app/eo-framework/stored-query/stored-query-details/stored-query-details.component.js +7 -2
  25. package/esm2015/app/eo-framework/ui/query-scope-select/query-scope-select.component.js +31 -0
  26. package/esm2015/app/eo-framework/ui/ui.module.js +6 -3
  27. package/esm2015/app/eo-framework-core/search/app-search.service.js +6 -1
  28. package/esm2015/eo-sdk-client.js +64 -63
  29. package/esm2015/projects/eo-sdk/core/lib/service/auth/auth.service.js +13 -5
  30. package/esm2015/projects/eo-sdk/core/lib/service/config/config.service.js +5 -1
  31. package/esm2015/projects/eo-sdk/core/lib/service/search/search-query.model.js +10 -1
  32. package/esm2015/projects/eo-sdk/core/lib/service/search/search.service.js +2 -1
  33. package/esm2015/projects/eo-sdk/core/lib/service/stored-queries/stored-query.model.js +2 -1
  34. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js +28 -5
  35. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js.map +1 -1
  36. package/fesm2015/eo-sdk-client.js +67 -16
  37. package/fesm2015/eo-sdk-client.js.map +1 -1
  38. package/package.json +2 -2
  39. package/projects/eo-sdk/core/eo-sdk-client-projects-eo-sdk-core.metadata.json +1 -1
  40. package/projects/eo-sdk/core/lib/service/auth/auth.service.d.ts +1 -0
  41. package/projects/eo-sdk/core/lib/service/config/config.service.d.ts +1 -0
  42. package/projects/eo-sdk/core/lib/service/search/search-query.model.d.ts +9 -0
  43. package/projects/eo-sdk/core/package.json +1 -1
@@ -604,6 +604,10 @@
604
604
  this.translate.setDefaultLang(this.getDefaultClientLocale());
605
605
  this.initializeGrid();
606
606
  };
607
+ Config.prototype.getLoginBase = function () {
608
+ var lb = this.getUri('loginBase');
609
+ return (lb && lb !== '/') ? lb : '';
610
+ };
607
611
  /**
608
612
  * Returns nested property of config | complete config by default
609
613
  * @param property The name of the property to be retrieved
@@ -3523,6 +3527,7 @@
3523
3527
  * @ignore
3524
3528
  */
3525
3529
  function AuthService(config, coreConfig, appCache, envService, http, bpmService, ngZone, location, capabilitiesService, logger, inboxService, prepareService, backend, systemService, userService, eventService, systemStatusService, storage, local) {
3530
+ var _this = this;
3526
3531
  this.config = config;
3527
3532
  this.coreConfig = coreConfig;
3528
3533
  this.appCache = appCache;
@@ -3545,6 +3550,7 @@
3545
3550
  this.TOKEN_STORAGE_KEY = 'eo.auth.cloud.credentials';
3546
3551
  this.userProfileUri = this.userService.USER_FETCH_URI;
3547
3552
  this.authSource = new rxjs.BehaviorSubject(false);
3553
+ this.loggedInCacheKey = 'eo.user.loggedIn';
3548
3554
  /**
3549
3555
  * Observable to subscribe to for getting the state of being authenticated. Will emit true when a user logged in,
3550
3556
  * false when the user logged out or the gateways session timed out.
@@ -3563,6 +3569,12 @@
3563
3569
  auth: null,
3564
3570
  active: false
3565
3571
  };
3572
+ window.addEventListener('storage', function (evt) {
3573
+ if (evt.key === _this.loggedInCacheKey) {
3574
+ var host = JSON.parse(evt.newValue).host;
3575
+ _this.initUser(host).subscribe();
3576
+ }
3577
+ });
3566
3578
  }
3567
3579
  /**
3568
3580
  * Login a user using form based login.
@@ -3580,7 +3592,7 @@
3580
3592
  var loginHeader = new http.HttpHeaders({
3581
3593
  'Content-Type': 'application/x-www-form-urlencoded'
3582
3594
  });
3583
- return this.http.post(host + '/login', "username=" + encodeURIComponent(username) + "&password=" + encodeURIComponent(password), {
3595
+ return this.http.post(host + this.config.getLoginBase() + '/login', "username=" + encodeURIComponent(username) + "&password=" + encodeURIComponent(password), {
3584
3596
  headers: loginHeader,
3585
3597
  responseType: 'text'
3586
3598
  }).pipe(operators.switchMap(function () { return _this.initUser(host); }));
@@ -3716,7 +3728,7 @@
3716
3728
  'Content-Type': 'application/json'
3717
3729
  });
3718
3730
  return this.http
3719
- .get((host || '') + "/auth/info", { headers: headers })
3731
+ .get("" + (host || '') + this.config.getLoginBase() + "/auth/info", { headers: headers })
3720
3732
  .pipe(operators.switchMap(function (info) {
3721
3733
  _this.gatewayInfo = info;
3722
3734
  _this.envService.cloudEnvironment = (_this.gatewayInfo && _this.gatewayInfo.oauth2);
@@ -3758,6 +3770,7 @@
3758
3770
  if (host) {
3759
3771
  _this.addHostConfig(host);
3760
3772
  }
3773
+ window.localStorage.setItem(_this.loggedInCacheKey, JSON.stringify({ userId: user.user.id, host: host }));
3761
3774
  return _this.initApp(user, gatewayInfo.ntlm);
3762
3775
  }), operators.tap(function () { return _this.authSource.next(_this.isLoggedIn()); }));
3763
3776
  };
@@ -3778,14 +3791,14 @@
3778
3791
  // remove stored access data
3779
3792
  this.storage.removeItem(this.TOKEN_STORAGE_KEY).subscribe();
3780
3793
  if (this.coreConfig.environment.production && EnvironmentEnaio.isWebEnvironment()) {
3781
- window.location.href = '/logout';
3794
+ window.location.href = this.config.getLoginBase() + '/logout';
3782
3795
  return;
3783
3796
  }
3784
3797
  }
3785
3798
  if (gatewayLogout) {
3786
3799
  // by default we are just resetting internal state to 'logged out' and in
3787
3800
  // some cases call gateways logout endpoint to do logout stuff there silently
3788
- this.http.get((this.profile.host || '') + "/logout").subscribe();
3801
+ this.http.get("" + (this.profile.host || '') + this.config.getLoginBase() + "/logout").subscribe();
3789
3802
  }
3790
3803
  this.backend.setAuthProfile(this.profile);
3791
3804
  this.eventService.trigger(EnaioEvent.LOGOUT);
@@ -4575,6 +4588,11 @@
4575
4588
  { type: EventService }
4576
4589
  ]; };
4577
4590
 
4591
+ (function (QueryScope) {
4592
+ QueryScope["ALL"] = "all";
4593
+ QueryScope["CONTENT"] = "content";
4594
+ QueryScope["INDEX_DATA"] = "indexdata";
4595
+ })(exports.QueryScope || (exports.QueryScope = {}));
4578
4596
  /**
4579
4597
  * The SearchQuery Class
4580
4598
  *
@@ -4755,6 +4773,7 @@
4755
4773
  // add options when they differ from the default values
4756
4774
  if (this.applyOptions()) {
4757
4775
  queryJson.options = {};
4776
+ queryJson.options.scope = this.scope;
4758
4777
  if (this.suggest) {
4759
4778
  queryJson.options.suggest = true;
4760
4779
  }
@@ -4787,6 +4806,7 @@
4787
4806
  // determines whether or not the query send to the search service should contain options
4788
4807
  SearchQuery.prototype.applyOptions = function () {
4789
4808
  return (this.expertMode ||
4809
+ !!this.scope ||
4790
4810
  this.suggest ||
4791
4811
  this.highlighting ||
4792
4812
  this.resolveReference ||
@@ -5157,6 +5177,7 @@
5157
5177
  this.filters = searchQuery ? searchQuery.filters : [];
5158
5178
  this.suggest = searchQuery ? searchQuery.suggest : false;
5159
5179
  this.expertMode = searchQuery ? searchQuery.expertMode : false;
5180
+ this.scope = searchQuery ? searchQuery.scope : null;
5160
5181
  this.searchMode = searchQuery ? searchQuery.searchMode : 'idx';
5161
5182
  };
5162
5183
  /**
@@ -5336,6 +5357,7 @@
5336
5357
  if (qObj_1.options) {
5337
5358
  q.suggest = qObj_1.options.suggest || false;
5338
5359
  q.expertMode = qObj_1.options.expertmode || false;
5360
+ q.scope = qObj_1.options.scope;
5339
5361
  q.resolveReference = qObj_1.options.resolveReference || true;
5340
5362
  q.searchMode =
5341
5363
  qObj_1.options.searchmode || SearchQuery.DEFAULT_SEARCH_MODE;