@nexterajs/report-viewer 0.1.0 → 0.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexterajs/report-viewer",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.0.0",
6
6
  "@angular/core": "^22.0.0",
@@ -19,7 +19,7 @@
19
19
  "engines": {
20
20
  "node": "^22.22.3 || ^24.15.0 || >=26.0.0"
21
21
  },
22
- "description": "Angular report viewer for reports served by Nextera.Report.AspNetCore: pages rendered on the server, shown in shadow roots, with a toolbar and a programmatic api.",
22
+ "description": "Angular report viewer for reports served by Nextera.Reports.Angular.NetCore: pages rendered on the server, shown in shadow roots, with a toolbar and a programmatic api.",
23
23
  "keywords": [
24
24
  "angular",
25
25
  "report",
@@ -188,9 +188,21 @@ declare const NXE_ENGLISH: {
188
188
  PrevPage: string;
189
189
  NextPage: string;
190
190
  LastPage: string;
191
- /** The save button's caption and tooltip; its menu items are captioned by the format they write. */
191
+ /** The save button's caption and tooltip, and its menu items, captioned by the format they write. */
192
192
  Save: string;
193
193
  SaveToolTip: string;
194
+ formatPdf: string;
195
+ formatHtml: string;
196
+ /** The resources button's tooltip. */
197
+ Resources: string;
198
+ /** The find button's tooltip, and the find panel's captions. */
199
+ FindToolTip: string;
200
+ FindWhat: string;
201
+ FindPrevious: string;
202
+ FindNext: string;
203
+ MatchCase: string;
204
+ MatchWholeWord: string;
205
+ closeFind: string;
194
206
  /** The view-mode button's tooltip, and its menu items, whose captions are the mode names. */
195
207
  ViewModeToolTip: string;
196
208
  SinglePage: string;
@@ -198,6 +210,7 @@ declare const NXE_ENGLISH: {
198
210
  MultiplePages: string;
199
211
  /** The zoom button's tooltip; its caption is the current percentage, so it has no key. */
200
212
  ZoomToolTip: string;
213
+ /** Fitting a whole page, which Stimulsoft's menu captions by the page's height. */
201
214
  ZoomOnePage: string;
202
215
  ZoomPageWidth: string;
203
216
  errorUnreachable: string;
@@ -337,6 +350,14 @@ declare class NxeViewerSessionService {
337
350
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<NxeViewerSessionService>;
338
351
  }
339
352
 
353
+ /** What the user asked the viewer to find, and which way to go from the current hit. */
354
+ interface NxeFindRequest {
355
+ readonly text: string;
356
+ readonly forward: boolean;
357
+ readonly matchCase: boolean;
358
+ readonly wholeWord: boolean;
359
+ }
360
+
340
361
  /**
341
362
  * What a host reaches through the component's `api`, with Stimulsoft's names and meanings. The
342
363
  * members for zoom, view mode, export, print, email and find arrive with the tasks that implement
@@ -403,6 +424,20 @@ declare class NxeReportViewerComponent implements OnChanges {
403
424
  private scrollingToPage;
404
425
  private scrollSettled;
405
426
  protected readonly toolbarVisible: _angular_core.Signal<boolean>;
427
+ /** See `.nxe-viewer-bookmarks`: the whole of Stimulsoft's bookmarks panel at width 0. */
428
+ protected readonly showBookmarksStrip: _angular_core.Signal<boolean>;
429
+ /** Whether the find panel is open; Stimulsoft's Find button opens and closes it. */
430
+ protected readonly findOpen: _angular_core.WritableSignal<boolean>;
431
+ /** The search on show: what was looked for, the elements found, and which one is current. */
432
+ private findKey;
433
+ private hits;
434
+ private currentHit;
435
+ private lastFind;
436
+ /**
437
+ * The pages whose HTML is on screen, so a search can follow them: in SinglePage the page changes
438
+ * under it, and in the scrolling modes pages keep arriving as they are fetched.
439
+ */
440
+ private readonly renderedPages;
406
441
  protected readonly pageCss: _angular_core.Signal<string>;
407
442
  protected readonly showPageShadow: _angular_core.Signal<boolean>;
408
443
  protected readonly pageBorder: _angular_core.Signal<string | null>;
@@ -425,6 +460,31 @@ declare class NxeReportViewerComponent implements OnChanges {
425
460
  private readonly measuredHeight;
426
461
  protected readonly rootHeight: _angular_core.Signal<string>;
427
462
  constructor();
463
+ /** The Find button opens the panel, or closes it and takes the search's highlights away. */
464
+ protected toggleFind(): void;
465
+ protected closeFind(): void;
466
+ /**
467
+ * A search from the find panel, run as Stimulsoft runs it (angular-viewer-panels-chrome.md §1.3,
468
+ * §1.6): empty text clears the highlights; new text, or a changed option, finds afresh and makes the
469
+ * first hit current; the same search again steps to the next or previous hit, round the ends. Each
470
+ * current hit is scrolled into view. Stimulsoft finds only in the pages it has on screen; this viewer
471
+ * fetches the pages a scrolling mode has not fetched yet, and finds in them as they arrive.
472
+ */
473
+ protected find(request: NxeFindRequest): void;
474
+ /** Finds again over the pages now on screen, keeping the current hit when it is still there. */
475
+ private refreshFind;
476
+ private runFind;
477
+ private resetFind;
478
+ /** Each page on screen keeps its HTML in its own shadow root. */
479
+ private pageRoots;
480
+ private requestAllPages;
481
+ /**
482
+ * Scrolls the current hit to its own height plus 50 px below the top of the report panel, over
483
+ * 350 ms: always after a fresh search, and after a step only when the hit is out of view. That is
484
+ * what Stimulsoft's viewer was seen to do; the exact place it scrolls to also carries offsets of its
485
+ * own page markup, which this viewer's pages do not have.
486
+ */
487
+ private revealHit;
428
488
  /**
429
489
  * A change to any input reloads, as Stimulsoft's viewer does: its `ngOnChanges` never looks at
430
490
  * which input changed, so even a width change asks the server for the options and the report
@@ -468,6 +528,8 @@ declare class NxeReportViewerComponent implements OnChanges {
468
528
  private trackCurrentPage;
469
529
  /** Stimulsoft animates the panel to the page's top over 350 ms, in steps of about 30 ms. */
470
530
  private scrollToPage;
531
+ /** Scrolls the report panel over 350 ms in steps of about 30 ms, as Stimulsoft's scrolls all run. */
532
+ private animateScroll;
471
533
  /**
472
534
  * The getters read the session's signals, so a host that asks between renders gets what is on
473
535
  * screen now. Built from a captured session rather than `this`, because `this` inside an object