@sinequa/atomic-angular 0.0.140 → 0.1.3

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.
Files changed (207) hide show
  1. package/README.md +145 -0
  2. package/components/no-result/i18n/en.json +5 -0
  3. package/components/no-result/i18n/fr.json +5 -0
  4. package/components/sort-selector/i18n/en.json +3 -0
  5. package/components/sort-selector/i18n/fr.json +3 -0
  6. package/components/source/i18n/en.json +3 -0
  7. package/components/source/i18n/fr.json +3 -0
  8. package/features/alerts/i18n/en.json +33 -0
  9. package/features/alerts/i18n/fr.json +33 -0
  10. package/features/bookmarks/i18n/en.json +11 -0
  11. package/features/bookmarks/i18n/fr.json +11 -0
  12. package/features/collections/i18n/en.json +17 -0
  13. package/features/collections/i18n/fr.json +16 -0
  14. package/features/dialogs/i18n/en.json +15 -0
  15. package/features/dialogs/i18n/fr.json +15 -0
  16. package/features/did-you-mean/i18n/en.json +5 -0
  17. package/features/did-you-mean/i18n/fr.json +5 -0
  18. package/features/drawer/i18n/en.json +22 -0
  19. package/features/drawer/i18n/fr.json +22 -0
  20. package/features/export/i18n/en.json +7 -0
  21. package/features/export/i18n/fr.json +7 -0
  22. package/features/feedback/i18n/en.json +26 -0
  23. package/features/feedback/i18n/fr.json +26 -0
  24. package/features/filters/i18n/en.json +14 -0
  25. package/features/filters/i18n/fr.json +14 -0
  26. package/features/labels/i18n/en.json +8 -0
  27. package/features/labels/i18n/fr.json +8 -0
  28. package/features/recent-searches/i18n/en.json +6 -0
  29. package/features/recent-searches/i18n/fr.json +6 -0
  30. package/features/saved-searches/i18n/en.json +8 -0
  31. package/features/saved-searches/i18n/fr.json +8 -0
  32. package/features/sign-in/i18n/en.json +12 -0
  33. package/features/sign-in/i18n/fr.json +14 -0
  34. package/fesm2022/sinequa-atomic-angular.mjs +7948 -2383
  35. package/fesm2022/sinequa-atomic-angular.mjs.map +1 -1
  36. package/index.d.ts +6036 -3
  37. package/package.json +68 -10
  38. package/assets/tailwind.css +0 -248
  39. package/esm2022/lib/assistant/index.mjs +0 -2
  40. package/esm2022/lib/assistant/signalR.web.service.mjs +0 -81
  41. package/esm2022/lib/components/dropdown.mjs +0 -127
  42. package/esm2022/lib/components/index.mjs +0 -5
  43. package/esm2022/lib/components/menu/index.mjs +0 -3
  44. package/esm2022/lib/components/menu/menu-item.mjs +0 -22
  45. package/esm2022/lib/components/menu/menu.mjs +0 -99
  46. package/esm2022/lib/components/metadata/index.mjs +0 -2
  47. package/esm2022/lib/components/metadata/metadata.component.mjs +0 -65
  48. package/esm2022/lib/components/theme/index.mjs +0 -3
  49. package/esm2022/lib/components/theme/theme-selector.component.mjs +0 -67
  50. package/esm2022/lib/components/theme/theme-toggle.component.mjs +0 -67
  51. package/esm2022/lib/directives/index.mjs +0 -5
  52. package/esm2022/lib/directives/infinite-scroll.directive.mjs +0 -47
  53. package/esm2022/lib/directives/select-article-on-click.directive.mjs +0 -39
  54. package/esm2022/lib/directives/show-bookmark.directive.mjs +0 -55
  55. package/esm2022/lib/directives/theme-provider.directive.mjs +0 -31
  56. package/esm2022/lib/guards/auth.guard.mjs +0 -27
  57. package/esm2022/lib/guards/index.mjs +0 -3
  58. package/esm2022/lib/guards/initialization.guard.mjs +0 -41
  59. package/esm2022/lib/interceptors/audit.interceptor.mjs +0 -23
  60. package/esm2022/lib/interceptors/auth.interceptor.mjs +0 -49
  61. package/esm2022/lib/interceptors/body.interceptor.mjs +0 -24
  62. package/esm2022/lib/interceptors/error.interceptor.mjs +0 -35
  63. package/esm2022/lib/interceptors/index.mjs +0 -7
  64. package/esm2022/lib/interceptors/toast.interceptor.mjs +0 -27
  65. package/esm2022/lib/models/aggregation.mjs +0 -2
  66. package/esm2022/lib/models/article-metadata.mjs +0 -2
  67. package/esm2022/lib/models/autocomplete.mjs +0 -2
  68. package/esm2022/lib/models/custom-json.mjs +0 -2
  69. package/esm2022/lib/models/filter-dropdown.mjs +0 -2
  70. package/esm2022/lib/models/index.mjs +0 -7
  71. package/esm2022/lib/models/user-settings.mjs +0 -2
  72. package/esm2022/lib/pipes/highlight-word.pipe.mjs +0 -33
  73. package/esm2022/lib/pipes/index.mjs +0 -3
  74. package/esm2022/lib/pipes/source-icon.pipe.mjs +0 -43
  75. package/esm2022/lib/providers/eager-provider.mjs +0 -24
  76. package/esm2022/lib/providers/index.mjs +0 -2
  77. package/esm2022/lib/public-api.mjs +0 -19
  78. package/esm2022/lib/resolvers/index.mjs +0 -2
  79. package/esm2022/lib/resolvers/query-name-resolver.mjs +0 -14
  80. package/esm2022/lib/resources/index.mjs +0 -2
  81. package/esm2022/lib/resources/themes.mjs +0 -53
  82. package/esm2022/lib/services/application.service.mjs +0 -245
  83. package/esm2022/lib/services/autocomplete.service.mjs +0 -85
  84. package/esm2022/lib/services/drawer/backdrop.service.mjs +0 -23
  85. package/esm2022/lib/services/drawer/drawer-stack.service.mjs +0 -152
  86. package/esm2022/lib/services/drawer/drawer.service.mjs +0 -38
  87. package/esm2022/lib/services/index.mjs +0 -12
  88. package/esm2022/lib/services/label.service.mjs +0 -161
  89. package/esm2022/lib/services/navigation.service.mjs +0 -59
  90. package/esm2022/lib/services/saved-searches.service.mjs +0 -75
  91. package/esm2022/lib/services/search.service.mjs +0 -89
  92. package/esm2022/lib/services/selection-history.service.mjs +0 -92
  93. package/esm2022/lib/services/selection.service.mjs +0 -87
  94. package/esm2022/lib/stores/aggregations.store.mjs +0 -62
  95. package/esm2022/lib/stores/app.store.mjs +0 -265
  96. package/esm2022/lib/stores/application.store.mjs +0 -93
  97. package/esm2022/lib/stores/index.mjs +0 -9
  98. package/esm2022/lib/stores/principal.store.mjs +0 -47
  99. package/esm2022/lib/stores/query-params.store.mjs +0 -208
  100. package/esm2022/lib/stores/selection.store.mjs +0 -46
  101. package/esm2022/lib/stores/theme.store.mjs +0 -116
  102. package/esm2022/lib/stores/user-settings.store.mjs +0 -272
  103. package/esm2022/lib/tokens/highlights.mjs +0 -32
  104. package/esm2022/lib/tokens/index.mjs +0 -2
  105. package/esm2022/lib/utils/debounced-signal.mjs +0 -38
  106. package/esm2022/lib/utils/index.mjs +0 -8
  107. package/esm2022/lib/utils/inline-worker.mjs +0 -40
  108. package/esm2022/lib/utils/query.mjs +0 -58
  109. package/esm2022/lib/utils/routes.mjs +0 -28
  110. package/esm2022/lib/utils/tailwind-utils.mjs +0 -6
  111. package/esm2022/lib/utils/theme-body-hook.mjs +0 -18
  112. package/esm2022/lib/utils/theme-registry.mjs +0 -6
  113. package/esm2022/lib/web-services/aggregations.service.mjs +0 -104
  114. package/esm2022/lib/web-services/app.service.mjs +0 -48
  115. package/esm2022/lib/web-services/audit.service.mjs +0 -122
  116. package/esm2022/lib/web-services/index.mjs +0 -10
  117. package/esm2022/lib/web-services/json-method-plugin.service.mjs +0 -54
  118. package/esm2022/lib/web-services/preview.service.mjs +0 -327
  119. package/esm2022/lib/web-services/principal.service.mjs +0 -46
  120. package/esm2022/lib/web-services/query.service.mjs +0 -123
  121. package/esm2022/lib/web-services/text-chunck.service.mjs +0 -46
  122. package/esm2022/public-api.mjs +0 -5
  123. package/esm2022/sinequa-atomic-angular.mjs +0 -5
  124. package/lib/assistant/index.d.ts +0 -1
  125. package/lib/assistant/signalR.web.service.d.ts +0 -46
  126. package/lib/components/dropdown.d.ts +0 -50
  127. package/lib/components/index.d.ts +0 -4
  128. package/lib/components/menu/index.d.ts +0 -2
  129. package/lib/components/menu/menu-item.d.ts +0 -8
  130. package/lib/components/menu/menu.d.ts +0 -24
  131. package/lib/components/metadata/index.d.ts +0 -1
  132. package/lib/components/metadata/metadata.component.d.ts +0 -24
  133. package/lib/components/theme/index.d.ts +0 -2
  134. package/lib/components/theme/theme-selector.component.d.ts +0 -70
  135. package/lib/components/theme/theme-toggle.component.d.ts +0 -10
  136. package/lib/directives/index.d.ts +0 -4
  137. package/lib/directives/infinite-scroll.directive.d.ts +0 -30
  138. package/lib/directives/select-article-on-click.directive.d.ts +0 -14
  139. package/lib/directives/show-bookmark.directive.d.ts +0 -52
  140. package/lib/directives/theme-provider.directive.d.ts +0 -20
  141. package/lib/guards/auth.guard.d.ts +0 -7
  142. package/lib/guards/index.d.ts +0 -2
  143. package/lib/guards/initialization.guard.d.ts +0 -20
  144. package/lib/interceptors/audit.interceptor.d.ts +0 -13
  145. package/lib/interceptors/auth.interceptor.d.ts +0 -14
  146. package/lib/interceptors/body.interceptor.d.ts +0 -11
  147. package/lib/interceptors/error.interceptor.d.ts +0 -9
  148. package/lib/interceptors/index.d.ts +0 -5
  149. package/lib/interceptors/toast.interceptor.d.ts +0 -13
  150. package/lib/models/aggregation.d.ts +0 -12
  151. package/lib/models/article-metadata.d.ts +0 -5
  152. package/lib/models/autocomplete.d.ts +0 -5
  153. package/lib/models/custom-json.d.ts +0 -58
  154. package/lib/models/filter-dropdown.d.ts +0 -10
  155. package/lib/models/index.d.ts +0 -6
  156. package/lib/models/user-settings.d.ts +0 -32
  157. package/lib/pipes/highlight-word.pipe.d.ts +0 -22
  158. package/lib/pipes/index.d.ts +0 -2
  159. package/lib/pipes/source-icon.pipe.d.ts +0 -54
  160. package/lib/providers/eager-provider.d.ts +0 -11
  161. package/lib/providers/index.d.ts +0 -1
  162. package/lib/public-api.d.ts +0 -15
  163. package/lib/resolvers/index.d.ts +0 -1
  164. package/lib/resolvers/query-name-resolver.d.ts +0 -9
  165. package/lib/resources/index.d.ts +0 -1
  166. package/lib/resources/themes.d.ts +0 -51
  167. package/lib/services/application.service.d.ts +0 -178
  168. package/lib/services/autocomplete.service.d.ts +0 -91
  169. package/lib/services/drawer/backdrop.service.d.ts +0 -9
  170. package/lib/services/drawer/drawer-stack.service.d.ts +0 -70
  171. package/lib/services/drawer/drawer.service.d.ts +0 -15
  172. package/lib/services/index.d.ts +0 -11
  173. package/lib/services/label.service.d.ts +0 -117
  174. package/lib/services/navigation.service.d.ts +0 -33
  175. package/lib/services/saved-searches.service.d.ts +0 -145
  176. package/lib/services/search.service.d.ts +0 -155
  177. package/lib/services/selection-history.service.d.ts +0 -50
  178. package/lib/services/selection.service.d.ts +0 -127
  179. package/lib/stores/aggregations.store.d.ts +0 -50
  180. package/lib/stores/app.store.d.ts +0 -208
  181. package/lib/stores/application.store.d.ts +0 -106
  182. package/lib/stores/index.d.ts +0 -8
  183. package/lib/stores/principal.store.d.ts +0 -53
  184. package/lib/stores/query-params.store.d.ts +0 -187
  185. package/lib/stores/selection.store.d.ts +0 -62
  186. package/lib/stores/theme.store.d.ts +0 -55
  187. package/lib/stores/user-settings.store.d.ts +0 -161
  188. package/lib/tokens/highlights.d.ts +0 -8
  189. package/lib/tokens/index.d.ts +0 -1
  190. package/lib/utils/debounced-signal.d.ts +0 -25
  191. package/lib/utils/index.d.ts +0 -7
  192. package/lib/utils/inline-worker.d.ts +0 -11
  193. package/lib/utils/query.d.ts +0 -26
  194. package/lib/utils/routes.d.ts +0 -16
  195. package/lib/utils/tailwind-utils.d.ts +0 -2
  196. package/lib/utils/theme-body-hook.d.ts +0 -6
  197. package/lib/utils/theme-registry.d.ts +0 -3
  198. package/lib/web-services/aggregations.service.d.ts +0 -60
  199. package/lib/web-services/app.service.d.ts +0 -30
  200. package/lib/web-services/audit.service.d.ts +0 -75
  201. package/lib/web-services/index.d.ts +0 -9
  202. package/lib/web-services/json-method-plugin.service.d.ts +0 -41
  203. package/lib/web-services/preview.service.d.ts +0 -295
  204. package/lib/web-services/principal.service.d.ts +0 -28
  205. package/lib/web-services/query.service.d.ts +0 -29
  206. package/lib/web-services/text-chunck.service.d.ts +0 -22
  207. package/public-api.d.ts +0 -1
@@ -1,30 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- import { CCApp } from '@sinequa/atomic';
4
- import * as i0 from "@angular/core";
5
- export declare class AppService {
6
- protected readonly http: HttpClient;
7
- protected readonly API_URL: string;
8
- /**
9
- * Retrieves the application configuration from the server.
10
- *
11
- * @param appName - The name of the application to fetch the configuration for.
12
- *
13
- * @returns {Observable<CCApp>} An observable that emits the application configuration.
14
- *
15
- * @remarks
16
- * This method constructs an HTTP GET request to fetch the application configuration
17
- * using the `app` parameter from the global configuration. If the request fails,
18
- * it logs the error to the console and returns an empty observable.
19
- *
20
- * @example
21
- * ```typescript
22
- * appService.getApp().subscribe(appConfig => {
23
- * console.log(appConfig);
24
- * });
25
- * ```
26
- */
27
- getApp(appName?: string): Observable<CCApp>;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<AppService, never>;
29
- static ɵprov: i0.ɵɵInjectableDeclaration<AppService>;
30
- }
@@ -1,75 +0,0 @@
1
- import { HttpClient } from "@angular/common/http";
2
- import { Router } from "@angular/router";
3
- import { Article, AuditEvents, AuditEventType, AuditEventTypeValues, CCApp, Result } from "@sinequa/atomic";
4
- import * as i0 from "@angular/core";
5
- export declare class AuditService {
6
- appStore: {
7
- webServices: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCWebService>>;
8
- data: import("@ngrx/signals/src/deep-signal").DeepSignal<import("@sinequa/atomic-angular").CJson>;
9
- queries: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCQuery>>;
10
- customJSONs: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJ[]>;
11
- filters: import("@angular/core").Signal<import("@sinequa/atomic-angular").CFilter[]>;
12
- sources: import("@angular/core").Signal<import("@sinequa/atomic-angular").CSources | {
13
- routes?: [];
14
- filters?: import("@sinequa/atomic-angular").CFilter[];
15
- }>;
16
- customizationJson: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJson>;
17
- update: (app: CCApp) => void;
18
- initialize: () => Promise<void>;
19
- initializeWithAppName: (appName: string) => Promise<void>;
20
- getWebServiceByType: (type: import("@sinequa/atomic").CCWebService["webServiceType"]) => import("@sinequa/atomic").CCWebService | undefined;
21
- getLabels: () => {
22
- private: string;
23
- public: string;
24
- };
25
- getQueryByName: (name: string) => import("@sinequa/atomic").CCQuery | undefined;
26
- getQueryByIndex: (index: number) => import("@sinequa/atomic").CCQuery | undefined;
27
- getDefaultQuery: () => import("@sinequa/atomic").CCQuery | undefined;
28
- allowEmptySearch: (queryName: string) => boolean;
29
- getNamedCustomizationJson: (name: string) => any | undefined;
30
- getColumnAlias: (column: string) => string;
31
- getAggregationIcon: (column: string) => string | undefined;
32
- getAggregationItemsCustomization: (column: string) => import("@sinequa/atomic-angular").CFilterItem[] | undefined;
33
- getAggregationCustomization: (column: string) => import("@sinequa/atomic-angular").CFilter | undefined;
34
- getAuthorizedFilters: (route: import("@angular/router").ActivatedRoute) => import("@sinequa/atomic").Aggregation[];
35
- } & import("@ngrx/signals").StateSignal<{
36
- webServices: Record<string, import("@sinequa/atomic").CCWebService>;
37
- data: import("@sinequa/atomic-angular").CJson;
38
- queries: Record<string, import("@sinequa/atomic").CCQuery>;
39
- customJSONs: import("@sinequa/atomic-angular").CJ[];
40
- }>;
41
- app: import("@angular/core").Signal<CCApp>;
42
- protected readonly http: HttpClient;
43
- protected readonly router: Router;
44
- protected readonly API_URL: string;
45
- protected lastClickTime: number;
46
- /**
47
- * Notify the Sinequa server of a set of audit events
48
- *
49
- * @param auditEvents The audit events
50
- */
51
- notify(auditEvents: AuditEvents): void;
52
- /**
53
- * It sends an audit event to the Audit Service.
54
- */
55
- notifyLogin(): void;
56
- /**
57
- * Notify logout
58
- */
59
- notifyLogout(): void;
60
- /**
61
- * Notify the Sinequa server of a document event
62
- *
63
- * @param evt The audit event type
64
- * @param doc The document (article) in question
65
- * @param resultId The resultid that contain the document
66
- * @param parameters Additional parameters
67
- */
68
- notifyDocument(auditEventType: AuditEventType | AuditEventTypeValues | {} & Record<never, never>, doc: Article, resultsOrId: Result | string, parameters?: Record<string, string | number | boolean | undefined>, rfmParameters?: Record<string, string | number | boolean | undefined>): void;
69
- /**
70
- * Notify route change
71
- */
72
- notifyRouteChange(url: string): void;
73
- static ɵfac: i0.ɵɵFactoryDeclaration<AuditService, never>;
74
- static ɵprov: i0.ɵɵInjectableDeclaration<AuditService>;
75
- }
@@ -1,9 +0,0 @@
1
- export * from "./aggregations.service";
2
- export * from "./app.service";
3
- export * from "./json-method-plugin.service";
4
- export * from "./preview.service";
5
- export * from "./principal.service";
6
- export * from "./query.service";
7
- export * from "./text-chunck.service";
8
- export * from "./audit.service";
9
- export * from "./audit.service";
@@ -1,41 +0,0 @@
1
- import { HttpClient, HttpContext, HttpHeaders, HttpParams } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- type Options = {
5
- headers?: HttpHeaders | {
6
- [header: string]: string | string[];
7
- };
8
- context?: HttpContext;
9
- observe?: 'body' | 'events' | 'response';
10
- params?: HttpParams | {
11
- [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
12
- };
13
- reportProgress?: boolean;
14
- responseType: 'arraybuffer' | 'blob' | 'text' | 'json';
15
- withCredentials?: boolean;
16
- };
17
- export declare class JsonMethodPluginService {
18
- protected readonly http: HttpClient;
19
- protected readonly API_URL: string;
20
- /**
21
- * Call a JsonMethod plugin using an HTTP POST
22
- *
23
- * @param method The name of the JsonMethod plugin
24
- * @param query Parameters to pass to the plugin
25
- * @param options HTTP options for the request
26
- * @returns An observable of the plugin's return value
27
- */
28
- post<U>(method: string, query: U, options?: Options): Observable<any>;
29
- /**
30
- * Call a JsonMethod plugin using an HTTP GET
31
- *
32
- * @param method The name of the JsonMethod plugin
33
- * @param query Parameters to pass to the plugin
34
- * @param options HTTP options for the request
35
- * @returns An observable of the plugin's return value
36
- */
37
- get<U extends Record<string, string | boolean | number | Date | object | undefined>>(method: string, query: U, options?: Options): Observable<any>;
38
- static ɵfac: i0.ɵɵFactoryDeclaration<JsonMethodPluginService, never>;
39
- static ɵprov: i0.ɵɵInjectableDeclaration<JsonMethodPluginService>;
40
- }
41
- export {};
@@ -1,295 +0,0 @@
1
- import { HttpClient } from "@angular/common/http";
2
- import { EventEmitter, Injector, OnDestroy } from "@angular/core";
3
- import { DomSanitizer } from "@angular/platform-browser";
4
- import { Observable, Subject } from "rxjs";
5
- import { Article, AuditEvents, CustomHighlights, PreviewData, Query } from "@sinequa/atomic";
6
- import { SearchService } from "../services/search.service";
7
- import { Extract } from "../stores";
8
- import { PreviewHighlight } from "../tokens";
9
- import { InlineWorker } from "../utils";
10
- import { AuditService } from "./audit.service";
11
- import { QueryService } from "./query.service";
12
- import * as i0 from "@angular/core";
13
- export type ExtractsEvents = 'fetching' | 'fetched' | 'error';
14
- export declare class PreviewService implements OnDestroy {
15
- highlights: PreviewHighlight[];
16
- protected readonly http: HttpClient;
17
- protected readonly injector: Injector;
18
- protected readonly API_URL: string;
19
- protected readonly applicationStore: {
20
- assistantReady: import("@angular/core").Signal<boolean>;
21
- ready: import("@angular/core").Signal<boolean>;
22
- extracts: import("@angular/core").Signal<Map<string, Extract[]>>;
23
- hasLabelsAccess: import("@angular/core").Signal<boolean>;
24
- extractsCount: import("@angular/core").Signal<number>;
25
- updateAssistantReady: () => void;
26
- updateReadyState: (value?: boolean) => void;
27
- updateHasLabelsAccess: (value?: boolean) => void;
28
- updateExtracts: (id: string, extracts: Extract[]) => void;
29
- getExtracts: (id: string) => Extract[] | undefined;
30
- } & import("@ngrx/signals").StateSignal<{
31
- assistantReady: boolean;
32
- ready: boolean;
33
- extracts: Map<string, Extract[]>;
34
- hasLabelsAccess: boolean;
35
- }>;
36
- protected readonly selectionStore: {
37
- article: import("@ngrx/signals/src/deep-signal").DeepSignal<Article>;
38
- id: import("@angular/core").Signal<string>;
39
- queryText: import("@angular/core").Signal<string>;
40
- previewHighlights: import("@ngrx/signals/src/deep-signal").DeepSignal<import("../stores").PreviewHighlights>;
41
- update: (newState: Partial<{
42
- article: Article;
43
- id: string;
44
- queryText: string;
45
- previewHighlights: import("../stores").PreviewHighlights;
46
- }>) => void;
47
- clear: () => void;
48
- } & import("@ngrx/signals").StateSignal<{
49
- article: Article;
50
- id: string;
51
- queryText: string;
52
- previewHighlights: import("../stores").PreviewHighlights;
53
- }>;
54
- protected readonly queryParamsStore: {
55
- id?: import("@angular/core").Signal<string | undefined> | undefined;
56
- text?: import("@angular/core").Signal<string | undefined> | undefined;
57
- filters?: import("@angular/core").Signal<import("@sinequa/atomic").LegacyFilter[] | undefined> | undefined;
58
- name?: import("@angular/core").Signal<string | undefined> | undefined;
59
- action?: import("@angular/core").Signal<"" | "open" | "search" | "aggregate" | undefined> | undefined;
60
- select?: import("@angular/core").Signal<import("@sinequa/atomic").Select[] | undefined> | undefined;
61
- open?: import("@angular/core").Signal<import("@sinequa/atomic").Open[] | undefined> | undefined;
62
- page?: import("@angular/core").Signal<number | undefined> | undefined;
63
- pageSize?: import("@angular/core").Signal<number | undefined> | undefined;
64
- tab?: import("@angular/core").Signal<string | undefined> | undefined;
65
- scope?: import("@angular/core").Signal<string | undefined> | undefined;
66
- sort?: import("@angular/core").Signal<string | undefined> | undefined;
67
- basket?: import("@angular/core").Signal<string | undefined> | undefined;
68
- isFirstPage?: import("@angular/core").Signal<boolean | undefined> | undefined;
69
- strictRefine?: import("@angular/core").Signal<boolean | undefined> | undefined;
70
- globalRelevance?: import("@angular/core").Signal<number | undefined> | undefined;
71
- questionLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
72
- questionDefaultLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
73
- spellingCorrectionMode?: import("@angular/core").Signal<import("@sinequa/atomic").SpellingCorrectionMode | undefined> | undefined;
74
- spellingCorrectionFilter?: import("@angular/core").Signal<string | undefined> | undefined;
75
- documentWeight?: import("@angular/core").Signal<string | undefined> | undefined;
76
- textPartWeights?: import("@angular/core").Signal<string | undefined> | undefined;
77
- relevanceTransforms?: import("@angular/core").Signal<string | undefined> | undefined;
78
- removeDuplicates?: import("@angular/core").Signal<boolean | undefined> | undefined;
79
- queryId?: import("@angular/core").Signal<string | undefined> | undefined;
80
- aggregations?: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").AggregationOptions> | string[] | undefined> | undefined;
81
- orderBy?: import("@angular/core").Signal<string | undefined> | undefined;
82
- groupBy?: import("@angular/core").Signal<string | undefined> | undefined;
83
- neuralSearch?: import("@angular/core").Signal<boolean | undefined> | undefined;
84
- path?: import("@angular/core").Signal<string | undefined> | undefined;
85
- setFromUrl: (url: string) => void;
86
- addFilter: (filter: import("@sinequa/atomic").LegacyFilter) => void;
87
- updateFilter: (filter: import("@sinequa/atomic").LegacyFilter) => void;
88
- removeFilter: (field?: string) => void;
89
- removeFilterByName: (name?: string) => void;
90
- clearFilters: () => void;
91
- patch: (params: Partial<Partial<Omit<Query, "filters">> & {
92
- path?: string;
93
- filters?: import("@sinequa/atomic").LegacyFilter[];
94
- id?: string;
95
- }>) => void;
96
- getFilter: (fieldOrName?: string) => Partial<import("@sinequa/atomic").LegacyFilter & {
97
- count: number;
98
- }> | null;
99
- getQuery: () => Query;
100
- } & import("@ngrx/signals").StateSignal<{
101
- id?: string | undefined;
102
- text?: string | undefined;
103
- filters?: import("@sinequa/atomic").LegacyFilter[] | undefined;
104
- name?: string | undefined;
105
- action?: ("" | "search" | "open" | "aggregate") | undefined;
106
- select?: import("@sinequa/atomic").Select[] | undefined;
107
- open?: import("@sinequa/atomic").Open[] | undefined;
108
- page?: number | undefined;
109
- pageSize?: number | undefined;
110
- tab?: string | undefined;
111
- scope?: string | undefined;
112
- sort?: string | undefined;
113
- basket?: string | undefined;
114
- isFirstPage?: boolean | undefined;
115
- strictRefine?: boolean | undefined;
116
- globalRelevance?: number | undefined;
117
- questionLanguage?: string | undefined;
118
- questionDefaultLanguage?: string | undefined;
119
- spellingCorrectionMode?: import("@sinequa/atomic").SpellingCorrectionMode | undefined;
120
- spellingCorrectionFilter?: string | undefined;
121
- documentWeight?: string | undefined;
122
- textPartWeights?: string | undefined;
123
- relevanceTransforms?: string | undefined;
124
- removeDuplicates?: boolean | undefined;
125
- queryId?: string | undefined;
126
- aggregations?: (Record<string, import("@sinequa/atomic").AggregationOptions> | string[]) | undefined;
127
- orderBy?: string | undefined;
128
- groupBy?: string | undefined;
129
- neuralSearch?: boolean | undefined;
130
- path?: string | undefined;
131
- }>;
132
- protected readonly appStore: {
133
- webServices: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCWebService>>;
134
- data: import("@ngrx/signals/src/deep-signal").DeepSignal<import("@sinequa/atomic-angular").CJson>;
135
- queries: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCQuery>>;
136
- customJSONs: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJ[]>;
137
- filters: import("@angular/core").Signal<import("@sinequa/atomic-angular").CFilter[]>;
138
- sources: import("@angular/core").Signal<import("@sinequa/atomic-angular").CSources | {
139
- routes?: [];
140
- filters?: import("@sinequa/atomic-angular").CFilter[];
141
- }>;
142
- customizationJson: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJson>;
143
- update: (app: import("@sinequa/atomic").CCApp) => void;
144
- initialize: () => Promise<void>;
145
- initializeWithAppName: (appName: string) => Promise<void>;
146
- getWebServiceByType: (type: import("@sinequa/atomic").CCWebService["webServiceType"]) => import("@sinequa/atomic").CCWebService | undefined;
147
- getLabels: () => {
148
- private: string;
149
- public: string;
150
- };
151
- getQueryByName: (name: string) => import("@sinequa/atomic").CCQuery | undefined;
152
- getQueryByIndex: (index: number) => import("@sinequa/atomic").CCQuery | undefined;
153
- getDefaultQuery: () => import("@sinequa/atomic").CCQuery | undefined;
154
- allowEmptySearch: (queryName: string) => boolean;
155
- getNamedCustomizationJson: (name: string) => any | undefined;
156
- getColumnAlias: (column: string) => string;
157
- getAggregationIcon: (column: string) => string | undefined;
158
- getAggregationItemsCustomization: (column: string) => import("@sinequa/atomic-angular").CFilterItem[] | undefined;
159
- getAggregationCustomization: (column: string) => import("@sinequa/atomic-angular").CFilter | undefined;
160
- getAuthorizedFilters: (route: import("@angular/router").ActivatedRoute) => import("@sinequa/atomic").Aggregation[];
161
- } & import("@ngrx/signals").StateSignal<{
162
- webServices: Record<string, import("@sinequa/atomic").CCWebService>;
163
- data: import("@sinequa/atomic-angular").CJson;
164
- queries: Record<string, import("@sinequa/atomic").CCQuery>;
165
- customJSONs: import("@sinequa/atomic-angular").CJ[];
166
- }>;
167
- protected readonly sanitizer: DomSanitizer;
168
- protected readonly queryService: QueryService;
169
- protected readonly searchService: SearchService;
170
- protected readonly auditService: AuditService;
171
- events: EventEmitter<ExtractsEvents>;
172
- onMessage: Subject<unknown>;
173
- worker: InlineWorker | undefined;
174
- allowWoker: boolean;
175
- protected previewData: PreviewData | undefined;
176
- protected iframe: Window | null | undefined;
177
- protected highlightCategory: string;
178
- extracts: string[];
179
- entities: string[];
180
- constructor(highlights: PreviewHighlight[]);
181
- ngOnDestroy(): void;
182
- /**
183
- * Handles incoming messages from a MessageEvent.
184
- *
185
- * @param event - The MessageEvent containing the message data.
186
- *
187
- * The function processes messages of type 'ready' and 'get-html-results'.
188
- *
189
- * - For 'ready' messages:
190
- * - Initializes the preview iframe with the app name and highlights.
191
- * - If preview data is available, retrieves HTML content based on the current selection.
192
- *
193
- * - For 'get-html-results' messages:
194
- * - Updates the application store with the extracted HTML results.
195
- * - If no extracts are found, updates the application store with an empty array.
196
- */
197
- receiveMessage(event: MessageEvent): void;
198
- /**
199
- * Generates a preview of the document with the given ID, applying the specified query parameters,
200
- * custom highlights, and audit events.
201
- *
202
- * @param id - The unique identifier of the document to preview.
203
- * @param q - Partial query parameters to customize the preview request.
204
- * @param customHighlights - Optional array of custom highlights to apply to the preview.
205
- * @param audit - Optional audit events to merge with the default audit record.
206
- * @returns An Observable that emits the preview data.
207
- */
208
- preview(id: string, q: Partial<Query>, customHighlights?: CustomHighlights[], audit?: AuditEvents): Observable<PreviewData>;
209
- /**
210
- * Closes the preview with the specified ID and updates the audit log.
211
- *
212
- * @param id - The ID of the preview to close.
213
- * @param query - The partial query object used to retrieve the preview detail.
214
- */
215
- close(id: string, query: Partial<Query>): void;
216
- /**
217
- * Previews an article in a new browser's tab.
218
- *
219
- * @param article - The article to preview.
220
- */
221
- openExternal(article: Article): void;
222
- /**
223
- * Sets the iframe window object.
224
- *
225
- * @param iframe - The window object of the iframe or null to unset.
226
- */
227
- setIframe(iframe: Window | null): void;
228
- /**
229
- * Sets the preview data and updates the highlight category based on the provided data.
230
- *
231
- * @param data - The preview data to be set.
232
- *
233
- * If the provided data contains highlights per category with 'matchingpassages' having values,
234
- * the highlight category is set to "matchingpassages". Otherwise, it is set to "extractslocations".
235
- */
236
- setPreviewData(data: PreviewData): void;
237
- /**
238
- * Sends a message to the iframe if it exists.
239
- *
240
- * @param message - The message to be sent. It can be of any type.
241
- */
242
- sendMessage(message: unknown): void;
243
- /**
244
- * Get preview id for an entity value for an index
245
- * @param entity the entity type (i.e. "geo")
246
- * @param value the entity value (i.e. "AUSTRALIA")
247
- * @param index the entity index from its list
248
- * @returns the html id
249
- */
250
- getEntityId(entity: string, value: string, index: number): number | undefined;
251
- /**
252
- * Send a message to the prewiew iFrame with the required data to retrieve HTML content for a specific highlight category
253
- *
254
- * @param id - The unique identifier for the request.
255
- * @param highlightCategory - The category of highlights to retrieve.
256
- * @param previewData - The data containing highlights and their locations.
257
- */
258
- retrieveHtmlContent(id: string, highlightCategory: string, previewData: PreviewData): void;
259
- /**
260
- * Sends a message to zoom in.
261
- *
262
- * This method triggers a "zoom-in" action by sending a message
263
- * with the specified action type.
264
- */
265
- zoomIn(): void;
266
- /**
267
- * Sends a message to zoom out the preview.
268
- *
269
- * This method triggers a "zoom-out" action by sending a message
270
- * to the relevant service or component.
271
- */
272
- zoomOut(): void;
273
- /**
274
- * Toggles the highlights based on the provided flags for extracts and entities.
275
- *
276
- * @param extracts - A boolean flag indicating whether to include extracts highlights.
277
- * @param entities - A boolean flag indicating whether to include entities highlights.
278
- */
279
- toggle(extracts: boolean, entities: boolean): void;
280
- getAuditPreviewDetail(id: string, q: Partial<Query>): {
281
- docid: string;
282
- rank: number;
283
- collection: string;
284
- source: string;
285
- resultid: string;
286
- querylang: string | undefined;
287
- querytext: string | undefined;
288
- filename: string | undefined;
289
- fileext: string | undefined;
290
- score: number | undefined;
291
- };
292
- private fetchExtracts;
293
- static ɵfac: i0.ɵɵFactoryDeclaration<PreviewService, never>;
294
- static ɵprov: i0.ɵɵInjectableDeclaration<PreviewService>;
295
- }
@@ -1,28 +0,0 @@
1
- import { HttpClient } from "@angular/common/http";
2
- import { Observable } from "rxjs";
3
- import { Principal } from "@sinequa/atomic";
4
- import * as i0 from "@angular/core";
5
- export declare class PrincipalService {
6
- protected readonly http: HttpClient;
7
- protected readonly API_URL: string;
8
- /**
9
- * Retrieves the principal information from the server.
10
- *
11
- * @returns Observable<Principal> An observable that emits the principal information.
12
- *
13
- * @remarks
14
- * This method sends a GET request to the API endpoint to fetch the principal data.
15
- * It includes query parameters to specify the action and to indicate that no authentication is required.
16
- * In case of an error, it logs the error to the console and returns an empty observable.
17
- *
18
- * @example
19
- * ```typescript
20
- * principalService.getPrincipal().subscribe(principal => {
21
- * console.log(principal);
22
- * });
23
- * ```
24
- */
25
- getPrincipal(): Observable<Principal>;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<PrincipalService, never>;
27
- static ɵprov: i0.ɵɵInjectableDeclaration<PrincipalService>;
28
- }
@@ -1,29 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- import { AuditEvents, Query, Result } from '@sinequa/atomic';
4
- import * as i0 from "@angular/core";
5
- export declare class QueryService {
6
- protected readonly http: HttpClient;
7
- private readonly appStore;
8
- private readonly queryParamsStore;
9
- protected readonly API_URL: string;
10
- /**
11
- * Performs a search query.
12
- *
13
- * @param q - The partial query object.
14
- * @param includeQueryParams - Indicates whether to include query parameters automatically in the request.
15
- * @param audit - The audit events object.
16
- * @returns An observable that emits the search results.
17
- */
18
- search(q?: Partial<Query>, includeQueryParams?: boolean, audit?: AuditEvents): Observable<Result>;
19
- /**
20
- * Performs a bulk search operation.
21
- *
22
- * @param q An array of Query objects representing the search queries.
23
- * @param audit An optional AuditEvents object for auditing purposes.
24
- * @returns An Observable that emits an array of Result objects.
25
- */
26
- bulkSearch(q: Query[], audit?: AuditEvents): Observable<Result[]>;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryService, never>;
28
- static ɵprov: i0.ɵɵInjectableDeclaration<QueryService>;
29
- }
@@ -1,22 +0,0 @@
1
- import { HttpClient } from "@angular/common/http";
2
- import { Query, TextChunk, TextLocation } from "@sinequa/atomic";
3
- import { Observable } from "rxjs";
4
- import * as i0 from "@angular/core";
5
- export declare class TextChunkService {
6
- protected readonly http: HttpClient;
7
- protected readonly API_URL: string;
8
- /**
9
- * Retrieves text chunks based on the provided parameters.
10
- *
11
- * @param id - The ID of the record.
12
- * @param textChunks - An array of TextLocation objects representing the location of the text chunks.
13
- * @param highlights - An array of strings representing the highlights to be applied to the text chunks.
14
- * @param query - The query used to retrieve the text chunks.
15
- * @param leftSentencesCount - The number of sentences to include before the text chunks.
16
- * @param rightSentencesCount - The number of sentences to include after the text chunks.
17
- * @returns An Observable that emits an array of TextChunk objects.
18
- */
19
- getTextChunks(id: string, textChunks: TextLocation[], highlights: string[], query: Query, leftSentencesCount: number, rightSentencesCount: number): Observable<TextChunk[]>;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<TextChunkService, never>;
21
- static ɵprov: i0.ɵɵInjectableDeclaration<TextChunkService>;
22
- }
package/public-api.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./lib/public-api";