@arsedizioni/ars-utils 22.0.39 → 22.0.41

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": "@arsedizioni/ars-utils",
3
- "version": "22.0.39",
3
+ "version": "22.0.41",
4
4
  "author": {
5
5
  "email": "software@arsedizioni.it",
6
6
  "name": "Fabio Buscaroli, Alberto Doria"
@@ -1458,112 +1458,6 @@ declare class ClipperCollaborationService {
1458
1458
  static ɵprov: i0.ɵɵInjectableDeclaration<ClipperCollaborationService>;
1459
1459
  }
1460
1460
 
1461
- /**
1462
- * Shared state and bootstrap for the Clipper application.
1463
- *
1464
- * Holds every piece of state used by more than one feature service (service URI,
1465
- * flags, login context, teams, dashboard, working-documents bag, channels and the
1466
- * various UI signals) plus the low-level helpers that mutate that state.
1467
- *
1468
- * The feature services (`ClipperLoginService`, `ClipperDocumentsService`, ...) inject
1469
- * this service to read shared state and call shared helpers. `ClipperService` (the
1470
- * barrel/facade) re-exports the state declared here.
1471
- */
1472
- declare class ClipperCoreService {
1473
- private readonly httpClient;
1474
- private readonly destroyRef;
1475
- private readonly broadcastService;
1476
- /** Used to lazily resolve feature services inside `initialize`, avoiding circular DI. */
1477
- private readonly injector;
1478
- private broadcastInitialized;
1479
- private _appUri?;
1480
- /** @returns The URI of the Clipper web application, or `undefined` if not set. */
1481
- get appUri(): string | undefined;
1482
- private _serviceUri;
1483
- /** @returns The base URI of the Clipper REST API. */
1484
- get serviceUri(): string;
1485
- private _flags;
1486
- /** @returns The active feature flags. */
1487
- get flags(): ClipperServiceFlags;
1488
- private _loginInfo?;
1489
- /**
1490
- * Lazily loads the login context from `localStorage` on first access.
1491
- * @returns The current login context, or `undefined` if not authenticated.
1492
- */
1493
- get loginInfo(): ClipperLoginInfo | undefined;
1494
- private readonly _loggedIn;
1495
- readonly loggedIn: Signal<boolean>;
1496
- readonly loggingIn: i0.WritableSignal<boolean>;
1497
- readonly snapshot: i0.WritableSignal<ClipperSearchResult>;
1498
- readonly supportsRS: i0.WritableSignal<boolean>;
1499
- readonly referencesSnapshot: i0.WritableSignal<ClipperSearchResult>;
1500
- readonly dashboard: ClipperDashboard;
1501
- readonly bag: i0.WritableSignal<ClipperDocumentInfo[]>;
1502
- readonly bagTotal: Signal<number>;
1503
- readonly visible: i0.WritableSignal<boolean>;
1504
- private _teams;
1505
- /** @returns The shared teams collection. */
1506
- get teams(): NameValueItem<string>[];
1507
- readonly availableChannels: i0.WritableSignal<ClipperAvailableChannel[]>;
1508
- readonly activeChannels: Signal<ClipperAvailableChannel[]>;
1509
- readonly allowTags: i0.WritableSignal<boolean>;
1510
- readonly pendingNotes: i0.WritableSignal<number>;
1511
- /**
1512
- * Ensures a login-info object exists and returns it for further mutation.
1513
- * Replaces the inline `if (!this._loginInfo) { ... }` guards now that the field
1514
- * is private to this service.
1515
- * @returns The existing login-info object, or a freshly created empty one.
1516
- */
1517
- ensureLoginInfo(): ClipperLoginInfo;
1518
- /**
1519
- * Sets the logged-in state. The backing signal is read-only to consumers, so the
1520
- * feature services use this method instead.
1521
- * @param value - The new logged-in state.
1522
- */
1523
- setLoggedIn(value: boolean): void;
1524
- /**
1525
- * Replaces the shared teams collection (populated by the calendar, archive and
1526
- * collaboration queries).
1527
- * @param teams - The teams to store.
1528
- */
1529
- setTeams(teams: NameValueItem<string>[]): void;
1530
- /**
1531
- * Persists the current login context to `localStorage`.
1532
- */
1533
- storeContext(): void;
1534
- /**
1535
- * Updates the stored login context with the values from a fresh login result.
1536
- * @param result - The login result containing the new user context and channel settings.
1537
- */
1538
- updateContext(result: ClipperLoginResult): void;
1539
- /**
1540
- * Rebuilds the `availableChannels` signal from the current login context.
1541
- */
1542
- initializeChannels(): void;
1543
- /**
1544
- * Resets the login state, clears the stored login info, and broadcasts `LOGOUT_COMPLETED`.
1545
- */
1546
- reset(): void;
1547
- /**
1548
- * Clears all session-storage authentication keys and resets the login state.
1549
- * @param clearOAuthToken - When `true`, the OAuth bearer token is also removed.
1550
- */
1551
- clear(clearOAuthToken?: boolean): void;
1552
- /**
1553
- * Initialises the service with the API base URI, optional app URI, and feature flags.
1554
- * @param serviceUri - The base URI of the Clipper REST API.
1555
- * @param appUri - Optional URI of the Clipper web application (used to build document links).
1556
- * @param flags - Feature flags that control service behaviour. Defaults to `ClipperServiceFlags.None`.
1557
- */
1558
- initialize(serviceUri: string, appUri?: string, flags?: ClipperServiceFlags): void;
1559
- /**
1560
- * Ping
1561
- */
1562
- ping(): void;
1563
- static ɵfac: i0.ɵɵFactoryDeclaration<ClipperCoreService, never>;
1564
- static ɵprov: i0.ɵɵInjectableDeclaration<ClipperCoreService>;
1565
- }
1566
-
1567
1461
  /**
1568
1462
  * Document search, references, export and metadata, plus the dashboard counters,
1569
1463
  * taxonomy/topics/tags lookups, the working-documents "bag" and saved searches.
@@ -1795,6 +1689,23 @@ declare class ClipperLoginService {
1795
1689
  * @returns An observable emitting the API result wrapping the generated OTP info.
1796
1690
  */
1797
1691
  newOTP(id: string): rxjs.Observable<ApiResult<ClipperOTPInfo>>;
1692
+ /**
1693
+ * Persists the current login context to `localStorage`.
1694
+ * Delegates to `ClipperCoreService.storeContext()`.
1695
+ */
1696
+ storeContext(): void;
1697
+ /**
1698
+ * Updates the stored login context with the values from a fresh login result.
1699
+ * Delegates to `ClipperCoreService.updateContext()`.
1700
+ * @param result - The login result containing the new user context and channel settings.
1701
+ */
1702
+ updateContext(result: ClipperLoginResult): void;
1703
+ /**
1704
+ * Clears all session-storage authentication keys and resets the login state.
1705
+ * Delegates to `ClipperCoreService.clear()`.
1706
+ * @param clearOAuthToken - When `true`, the OAuth bearer token is also removed.
1707
+ */
1708
+ clear(clearOAuthToken?: boolean): void;
1798
1709
  static ɵfac: i0.ɵɵFactoryDeclaration<ClipperLoginService, never>;
1799
1710
  static ɵprov: i0.ɵɵInjectableDeclaration<ClipperLoginService>;
1800
1711
  }
@@ -1808,6 +1719,7 @@ declare class ClipperLoginService {
1808
1719
  * `clipper.calendar.queryCalendar(...)`.
1809
1720
  */
1810
1721
  declare class ClipperService {
1722
+ private readonly core;
1811
1723
  /** Authentication: login/logout, MFA, OTP. */
1812
1724
  readonly session: ClipperLoginService;
1813
1725
  /** Document search, references, export, working-documents bag and saved searches. */
@@ -1816,8 +1728,6 @@ declare class ClipperService {
1816
1728
  readonly account: ClipperAccountService;
1817
1729
  /** Archive folders and files. */
1818
1730
  readonly archive: ClipperArchiveService;
1819
- /** Core services and shared state. */
1820
- readonly core: ClipperCoreService;
1821
1731
  /** Calendar deadlines. */
1822
1732
  readonly calendar: ClipperCalendarService;
1823
1733
  /** Teams, contacts and shared notes. */
@@ -1873,5 +1783,111 @@ declare class ClipperService {
1873
1783
  static ɵprov: i0.ɵɵInjectableDeclaration<ClipperService>;
1874
1784
  }
1875
1785
 
1786
+ /**
1787
+ * Shared state and bootstrap for the Clipper application.
1788
+ *
1789
+ * Holds every piece of state used by more than one feature service (service URI,
1790
+ * flags, login context, teams, dashboard, working-documents bag, channels and the
1791
+ * various UI signals) plus the low-level helpers that mutate that state.
1792
+ *
1793
+ * The feature services (`ClipperLoginService`, `ClipperDocumentsService`, ...) inject
1794
+ * this service to read shared state and call shared helpers. `ClipperService` (the
1795
+ * barrel/facade) re-exports the state declared here.
1796
+ */
1797
+ declare class ClipperCoreService {
1798
+ private readonly httpClient;
1799
+ private readonly destroyRef;
1800
+ private readonly broadcastService;
1801
+ /** Used to lazily resolve feature services inside `initialize`, avoiding circular DI. */
1802
+ private readonly injector;
1803
+ private broadcastInitialized;
1804
+ private _appUri?;
1805
+ /** @returns The URI of the Clipper web application, or `undefined` if not set. */
1806
+ get appUri(): string | undefined;
1807
+ private _serviceUri;
1808
+ /** @returns The base URI of the Clipper REST API. */
1809
+ get serviceUri(): string;
1810
+ private _flags;
1811
+ /** @returns The active feature flags. */
1812
+ get flags(): ClipperServiceFlags;
1813
+ private _loginInfo?;
1814
+ /**
1815
+ * Lazily loads the login context from `localStorage` on first access.
1816
+ * @returns The current login context, or `undefined` if not authenticated.
1817
+ */
1818
+ get loginInfo(): ClipperLoginInfo | undefined;
1819
+ private readonly _loggedIn;
1820
+ readonly loggedIn: Signal<boolean>;
1821
+ readonly loggingIn: i0.WritableSignal<boolean>;
1822
+ readonly snapshot: i0.WritableSignal<ClipperSearchResult>;
1823
+ readonly supportsRS: i0.WritableSignal<boolean>;
1824
+ readonly referencesSnapshot: i0.WritableSignal<ClipperSearchResult>;
1825
+ readonly dashboard: ClipperDashboard;
1826
+ readonly bag: i0.WritableSignal<ClipperDocumentInfo[]>;
1827
+ readonly bagTotal: Signal<number>;
1828
+ readonly visible: i0.WritableSignal<boolean>;
1829
+ private _teams;
1830
+ /** @returns The shared teams collection. */
1831
+ get teams(): NameValueItem<string>[];
1832
+ readonly availableChannels: i0.WritableSignal<ClipperAvailableChannel[]>;
1833
+ readonly activeChannels: Signal<ClipperAvailableChannel[]>;
1834
+ readonly allowTags: i0.WritableSignal<boolean>;
1835
+ readonly pendingNotes: i0.WritableSignal<number>;
1836
+ /**
1837
+ * Ensures a login-info object exists and returns it for further mutation.
1838
+ * Replaces the inline `if (!this._loginInfo) { ... }` guards now that the field
1839
+ * is private to this service.
1840
+ * @returns The existing login-info object, or a freshly created empty one.
1841
+ */
1842
+ ensureLoginInfo(): ClipperLoginInfo;
1843
+ /**
1844
+ * Sets the logged-in state. The backing signal is read-only to consumers, so the
1845
+ * feature services use this method instead.
1846
+ * @param value - The new logged-in state.
1847
+ */
1848
+ setLoggedIn(value: boolean): void;
1849
+ /**
1850
+ * Replaces the shared teams collection (populated by the calendar, archive and
1851
+ * collaboration queries).
1852
+ * @param teams - The teams to store.
1853
+ */
1854
+ setTeams(teams: NameValueItem<string>[]): void;
1855
+ /**
1856
+ * Persists the current login context to `localStorage`.
1857
+ */
1858
+ storeContext(): void;
1859
+ /**
1860
+ * Updates the stored login context with the values from a fresh login result.
1861
+ * @param result - The login result containing the new user context and channel settings.
1862
+ */
1863
+ updateContext(result: ClipperLoginResult): void;
1864
+ /**
1865
+ * Rebuilds the `availableChannels` signal from the current login context.
1866
+ */
1867
+ initializeChannels(): void;
1868
+ /**
1869
+ * Resets the login state, clears the stored login info, and broadcasts `LOGOUT_COMPLETED`.
1870
+ */
1871
+ reset(): void;
1872
+ /**
1873
+ * Clears all session-storage authentication keys and resets the login state.
1874
+ * @param clearOAuthToken - When `true`, the OAuth bearer token is also removed.
1875
+ */
1876
+ clear(clearOAuthToken?: boolean): void;
1877
+ /**
1878
+ * Initialises the service with the API base URI, optional app URI, and feature flags.
1879
+ * @param serviceUri - The base URI of the Clipper REST API.
1880
+ * @param appUri - Optional URI of the Clipper web application (used to build document links).
1881
+ * @param flags - Feature flags that control service behaviour. Defaults to `ClipperServiceFlags.None`.
1882
+ */
1883
+ initialize(serviceUri: string, appUri?: string, flags?: ClipperServiceFlags): void;
1884
+ /**
1885
+ * Ping
1886
+ */
1887
+ ping(): void;
1888
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperCoreService, never>;
1889
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipperCoreService>;
1890
+ }
1891
+
1876
1892
  export { ClipperAccountService, ClipperArchiveCopyMode, ClipperArchiveFileStorageType, ClipperArchiveFileStorageTypes, ClipperArchiveFileType, ClipperArchiveFileTypes, ClipperArchiveFilesSearchParams, ClipperArchiveFoldersSearchParams, ClipperArchiveService, ClipperAuthInterceptor, ClipperAuthors, ClipperCalendarCopyMode, ClipperCalendarSearchParams, ClipperCalendarService, ClipperCalendarState, ClipperCalendarStates, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperCollaborationService, ClipperCoreService, ClipperDashboard, ClipperDocumentChangeReasons, ClipperDocumentContainer, ClipperDocumentsService, ClipperExportDocumentsFormat, ClipperFacet, ClipperLoginService, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryDocumentFlags, ClipperQueryReferencesMode, ClipperRecurrenceType, ClipperRecurrenceTypes, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperServiceFlags, ClipperSort, ClipperSources, ClipperTeamInfo, ClipperTeamProduct, ClipperTeamProductPermission, ClipperUpdateChannelsStateParams, ClipperUtils, NotesColors };
1877
1893
  export type { ClipperArchiveFileInfo, ClipperArchiveFilesCopyParams, ClipperArchiveFilesDeleteParams, ClipperArchiveFilesSearchResult, ClipperArchiveFolderTree, ClipperArchiveFoldersImportParams, ClipperArchiveFoldersSearchResult, ClipperArsEventInfo, ClipperAvailableChannel, ClipperCalendarCopyDeadlinesParams, ClipperCalendarSaveDeadlineParams, ClipperCalendarSearchResult, ClipperChannelSettingsItem, ClipperContactInfo, ClipperContactsSearchParams, ClipperDashboardItem, ClipperDashboardModelItem, ClipperDashboardResult, ClipperDayGroup, ClipperDayItem, ClipperDeadlineInfo, ClipperDeleteWorkingDocumentsParams, ClipperDocumentAnchorInfo, ClipperDocumentInfo, ClipperDocumentNote, ClipperDocumentNoteTracking, ClipperDocumentRelevantChunkHit, ClipperDocumentRelevants, ClipperDocumentStructure, ClipperDocumentUpdateStateParams, ClipperExportDocumentsParams, ClipperLastDaysResult, ClipperLoginInfo, ClipperLoginResult, ClipperNotesSearchParams, ClipperNotesSearchResult, ClipperNotifyDocumentNoteParams, ClipperOTPInfo, ClipperReferencesSearchParams, ClipperSearchArsEventsParams, ClipperSearchArsEventsResult, ClipperSearchCalendarSnapshotMonth, ClipperSearchFacet, ClipperSearchFacetGroup, ClipperSearchFacetsResult, ClipperSearchFilter, ClipperSendDocumentsByEmailParams, ClipperSettingsInfo, ClipperTaxonomyParams, ClipperTeamMemberInfo, ClipperTeamMembersSearchResult, ClipperTeamProductInfo, ClipperTeamsSearchParams, ClipperTeamsSearchResult, ClipperTopicInfo, ClipperUserChannelInfo, ClipperUserInfo, ClipperUserLink, ClipperUserSearch, ClipperUserTrialInfo, ClipperUserWorkingDocument, EditDialogCompleted, EditDialogData, EditedEventArgs, SectorInfo };
@@ -1049,7 +1049,7 @@ declare class ClipperDocumentMenuComponent {
1049
1049
  private readonly renderer2;
1050
1050
  private readonly clipperService;
1051
1051
  readonly useSelections: _angular_core.InputSignal<boolean>;
1052
- readonly selectionSource: _angular_core.InputSignal<"selection" | "bag" | "none">;
1052
+ readonly selectionSource: _angular_core.InputSignal<"bag" | "selection" | "none">;
1053
1053
  /**
1054
1054
  * Computed signal that returns the current effective document selection.
1055
1055
  * Re-evaluates when any input signal or the underlying selection model changes.