@arsedizioni/ars-utils 21.1.23 → 21.1.24

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.
@@ -884,11 +884,15 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
884
884
  if (this.dialogData) {
885
885
  if (this.dialogData.id) {
886
886
  // Compose query
887
+ let id = this.dialogData.id;
888
+ const p = id.indexOf('#');
889
+ if (p != -1) {
890
+ id = id.substring(0, p);
891
+ }
887
892
  let query = this.dialogData.query ?? '';
888
893
  if (this.dialogData.queryChunks && this.dialogData.queryChunks.length > 0) {
889
- query += '__CHUNKS__' + this.dialogData.id + '_' + this.dialogData.queryChunks;
894
+ query += '__CHUNKS__' + id + ':' + this.dialogData.queryChunks;
890
895
  }
891
- console.log("query:", query);
892
896
  const url = this.clipperService.serviceUri +
893
897
  "/documents/render/?query=" +
894
898
  query +
@@ -896,7 +900,6 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
896
900
  this.dialogData.theme +
897
901
  "&id=" +
898
902
  this.dialogData.id;
899
- console.log("url:", url);
900
903
  this.navigateByUrl(url);
901
904
  }
902
905
  }
@@ -1062,7 +1065,7 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
1062
1065
  if (queryParts.length > 0) {
1063
1066
  this.lastQuery = queryParts[0];
1064
1067
  if (queryParts.length > 1) {
1065
- const queryChunksParts = queryParts[1].split('_');
1068
+ const queryChunksParts = queryParts[1].split(':');
1066
1069
  if (queryChunksParts.length > 2) {
1067
1070
  if (queryChunksParts[0] === id) {
1068
1071
  this.lastQueryChunks = queryChunksParts[1];
@@ -1072,7 +1075,6 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
1072
1075
  }
1073
1076
  }
1074
1077
  }
1075
- console.log("Navigating to url1:", url);
1076
1078
  // Theme
1077
1079
  if (url.indexOf('theme=') === -1) {
1078
1080
  p = url.indexOf('id=');
@@ -1080,7 +1082,7 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
1080
1082
  url = url.substring(0, p) + 'theme=' + this.dialogData.theme + '&' + url.substring(p);
1081
1083
  }
1082
1084
  }
1083
- console.log("Navigating to url2:", url);
1085
+ console.log("Navigating to url2", url);
1084
1086
  let navigateToFile = url.indexOf('&file=true') !== -1;
1085
1087
  if (navigateToFile === true) {
1086
1088
  // Preview
@@ -2333,7 +2335,6 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
2333
2335
  * @param canUseArchive: true if archive is available
2334
2336
  */
2335
2337
  open(documentId, query, queryChunks, newWindow) {
2336
- console.log("Opening document " + documentId + " q=" + query + " chunks=" + queryChunks);
2337
2338
  if (!newWindow)
2338
2339
  this.openDocument(documentId, query, queryChunks);
2339
2340
  else {
@@ -2348,7 +2349,6 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
2348
2349
  openDocument(documentId, query, queryChunks) {
2349
2350
  if (!documentId)
2350
2351
  return;
2351
- console.log("Opening document " + documentId + " q=" + query + " chunks=" + queryChunks);
2352
2352
  ClipperDocumentsUtils.openDocument(this.injector, documentId, query ?? this.filterParams.text, queryChunks, this.selectionMode(), null, this.themeService.getTheme(), this.canUseArchive(), this.canHandleTooManyResults());
2353
2353
  }
2354
2354
  ///