@arsedizioni/ars-utils 18.2.513 → 18.2.515
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.
- package/clipper.common/common/services/clipper.service.d.ts +4 -0
- package/clipper.ui/ui/document-menu/document-menu.component.d.ts +1 -1
- package/esm2022/clipper.common/common/services/clipper.service.mjs +8 -1
- package/esm2022/clipper.ui/ui/document/document.component.mjs +7 -5
- package/esm2022/clipper.ui/ui/search-result-manager/search-result-manager.mjs +16 -7
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +7 -0
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +21 -10
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -1388,19 +1388,28 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
|
|
|
1388
1388
|
return this.clipperService.updateState({ documentIds: documentIds, isRead: value })
|
|
1389
1389
|
.subscribe(r => {
|
|
1390
1390
|
if (r.success) {
|
|
1391
|
+
let changed = 0;
|
|
1391
1392
|
if (item) {
|
|
1392
|
-
item.isRead
|
|
1393
|
-
|
|
1393
|
+
if (item.isRead !== value) {
|
|
1394
|
+
item.isRead = value;
|
|
1395
|
+
this.broadcastService.sendMessage(ClipperMessages.DOCUMENT_READ, { document: item, value: value });
|
|
1396
|
+
changed++;
|
|
1397
|
+
}
|
|
1394
1398
|
}
|
|
1395
1399
|
else if (this.hasAnySelection()) {
|
|
1396
1400
|
this.selection?.all?.forEach(n => {
|
|
1397
|
-
n.isRead
|
|
1398
|
-
|
|
1401
|
+
if (n.isRead !== value) {
|
|
1402
|
+
n.isRead = value;
|
|
1403
|
+
this.broadcastService.sendMessage(ClipperMessages.DOCUMENT_READ, { document: n, value: value });
|
|
1404
|
+
changed++;
|
|
1405
|
+
}
|
|
1399
1406
|
});
|
|
1400
1407
|
}
|
|
1401
1408
|
// Update dashboard
|
|
1402
|
-
|
|
1403
|
-
|
|
1409
|
+
if (changed > 0) {
|
|
1410
|
+
this.clipperService.updateUnreadItems(ClipperUtils.getClipperModuleFromModel(item.model), value ? -1 : 1);
|
|
1411
|
+
this.changeDetector.markForCheck();
|
|
1412
|
+
}
|
|
1404
1413
|
}
|
|
1405
1414
|
});
|
|
1406
1415
|
}
|
|
@@ -2277,10 +2286,12 @@ class ClipperDocumentComponent extends ClipperDocumentManager {
|
|
|
2277
2286
|
this.previewFile(url);
|
|
2278
2287
|
}
|
|
2279
2288
|
else {
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2289
|
+
this.clipperService.preRender().subscribe(() => {
|
|
2290
|
+
// Begin loading only if not downloading a file
|
|
2291
|
+
this.busy.set(url.indexOf('documents/render/item') === -1);
|
|
2292
|
+
// Navigate
|
|
2293
|
+
this.url.set(url);
|
|
2294
|
+
});
|
|
2284
2295
|
}
|
|
2285
2296
|
}
|
|
2286
2297
|
/**
|