@arsedizioni/ars-utils 21.1.21 → 21.1.22

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.
@@ -885,9 +885,10 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
885
885
  if (this.dialogData.id) {
886
886
  // Compose query
887
887
  let query = this.dialogData.query ?? '';
888
- if (this.dialogData.queryChunks) {
888
+ if (this.dialogData.queryChunks && this.dialogData.queryChunks.length > 0) {
889
889
  query += '__CHUNKS__' + this.dialogData.id + '_' + this.dialogData.queryChunks;
890
890
  }
891
+ console.log("query:", query);
891
892
  const url = this.clipperService.serviceUri +
892
893
  "/documents/render/?query=" +
893
894
  query +
@@ -895,6 +896,7 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
895
896
  this.dialogData.theme +
896
897
  "&id=" +
897
898
  this.dialogData.id;
899
+ console.log("url:", url);
898
900
  this.navigateByUrl(url);
899
901
  }
900
902
  }
@@ -1070,6 +1072,7 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
1070
1072
  }
1071
1073
  }
1072
1074
  }
1075
+ console.log("Navigating to url1:", url);
1073
1076
  // Theme
1074
1077
  if (url.indexOf('theme=') === -1) {
1075
1078
  p = url.indexOf('id=');
@@ -1077,6 +1080,7 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
1077
1080
  url = url.substring(0, p) + 'theme=' + this.dialogData.theme + '&' + url.substring(p);
1078
1081
  }
1079
1082
  }
1083
+ console.log("Navigating to url2:", url);
1080
1084
  let navigateToFile = url.indexOf('&file=true') !== -1;
1081
1085
  if (navigateToFile === true) {
1082
1086
  // Preview
@@ -2329,6 +2333,7 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
2329
2333
  * @param canUseArchive: true if archive is available
2330
2334
  */
2331
2335
  open(documentId, query, queryChunks, newWindow) {
2336
+ console.log("Opening document " + documentId + " q=" + query + " chunks=" + queryChunks);
2332
2337
  if (!newWindow)
2333
2338
  this.openDocument(documentId, query, queryChunks);
2334
2339
  else {
@@ -2343,7 +2348,7 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
2343
2348
  openDocument(documentId, query, queryChunks) {
2344
2349
  if (!documentId)
2345
2350
  return;
2346
- console.log("Opening document " + documentId);
2351
+ console.log("Opening document " + documentId + " q=" + query + " chunks=" + queryChunks);
2347
2352
  ClipperDocumentsUtils.openDocument(this.injector, documentId, query ?? this.filterParams.text, queryChunks, this.selectionMode(), null, this.themeService.getTheme(), this.canUseArchive(), this.canHandleTooManyResults());
2348
2353
  }
2349
2354
  ///