@yuuvis/client-core 2.19.0 → 2.20.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.
@@ -2123,10 +2123,10 @@ class SearchService {
2123
2123
  * @param query SearchQuery or CMIS query statement
2124
2124
  * @param page The number of the page to go to
2125
2125
  */
2126
- getPage(query, page, pageSize = SearchService.DEFAULT_QUERY_SIZE) {
2126
+ getPage(query, page, pageSize = SearchService.DEFAULT_QUERY_SIZE, includePermissions = false) {
2127
2127
  const isCmis = typeof query === 'string';
2128
2128
  if (isCmis) {
2129
- return this.#executeCmisSearch(query, pageSize, (page - 1) * pageSize);
2129
+ return this.#executeCmisSearch(query, pageSize, (page - 1) * pageSize, includePermissions);
2130
2130
  }
2131
2131
  else {
2132
2132
  query.from = (page - 1) * (query.size || pageSize);
@@ -3119,16 +3119,20 @@ class AuthService {
3119
3119
  */
3120
3120
  setInitialRequestUri() {
3121
3121
  const ignore = ['/', '/index.html'];
3122
- let uri = `${location.pathname}${location.search}`.replace(Utils.getBaseHref(), '');
3123
- uri = !uri.startsWith('/') ? `/${uri}` : uri;
3124
- if (!ignore.includes(uri)) {
3125
- this.#appCache
3126
- .setItem(this.#INITIAL_REQUEST_STORAGE_KEY, {
3122
+ const baseHref = Utils.getBaseHref();
3123
+ // Check only the pathname against the ignore list so that auth callback
3124
+ // query params (e.g. ?session_state=…) don't bypass the check.
3125
+ let path = location.pathname.replace(baseHref, '');
3126
+ path = !path.startsWith('/') ? `/${path}` : path;
3127
+ if (!ignore.includes(path)) {
3128
+ let uri = `${location.pathname}${location.search}`.replace(baseHref, '');
3129
+ uri = !uri.startsWith('/') ? `/${uri}` : uri;
3130
+ return this.#appCache.setItem(this.#INITIAL_REQUEST_STORAGE_KEY, {
3127
3131
  uri: uri,
3128
3132
  timestamp: Date.now()
3129
- })
3130
- .subscribe();
3133
+ });
3131
3134
  }
3135
+ return of(false);
3132
3136
  }
3133
3137
  /**
3134
3138
  * Get the URL that entered the app. May be a deep link that could then be
@@ -3435,8 +3439,7 @@ const init_moduleFnc = () => {
3435
3439
  const http = inject(HttpClient);
3436
3440
  const configService = inject(ConfigService);
3437
3441
  const authService = inject(AuthService);
3438
- authService.setInitialRequestUri();
3439
- return coreConfig.main
3442
+ return authService.setInitialRequestUri().pipe(switchMap(() => coreConfig.main
3440
3443
  ? !Array.isArray(coreConfig.main)
3441
3444
  ? of([coreConfig.main])
3442
3445
  : forkJoin([...coreConfig.main].map((uri) => http.get(`${Utils.getBaseHref()}${uri}`).pipe(catchError((e) => {
@@ -3451,7 +3454,7 @@ const init_moduleFnc = () => {
3451
3454
  };
3452
3455
  return of(true);
3453
3456
  }))))
3454
- : of(false);
3457
+ : of(false)));
3455
3458
  };
3456
3459
 
3457
3460
  var DeviceScreenOrientation;