@sinequa/atomic-angular 0.0.146
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/assets/tailwind.css +334 -0
- package/esm2022/lib/assistant/index.mjs +2 -0
- package/esm2022/lib/assistant/signalR.web.service.mjs +81 -0
- package/esm2022/lib/components/dropdown-input.mjs +97 -0
- package/esm2022/lib/components/dropdown-list.mjs +35 -0
- package/esm2022/lib/components/dropdown.mjs +127 -0
- package/esm2022/lib/components/index.mjs +7 -0
- package/esm2022/lib/components/menu/index.mjs +3 -0
- package/esm2022/lib/components/menu/menu-item.mjs +22 -0
- package/esm2022/lib/components/menu/menu.mjs +99 -0
- package/esm2022/lib/components/metadata/index.mjs +2 -0
- package/esm2022/lib/components/metadata/metadata.component.mjs +65 -0
- package/esm2022/lib/components/theme/index.mjs +3 -0
- package/esm2022/lib/components/theme/theme-selector.component.mjs +67 -0
- package/esm2022/lib/components/theme/theme-toggle.component.mjs +67 -0
- package/esm2022/lib/directives/index.mjs +5 -0
- package/esm2022/lib/directives/infinite-scroll.directive.mjs +47 -0
- package/esm2022/lib/directives/select-article-on-click.directive.mjs +39 -0
- package/esm2022/lib/directives/show-bookmark.directive.mjs +55 -0
- package/esm2022/lib/directives/theme-provider.directive.mjs +31 -0
- package/esm2022/lib/guards/auth.guard.mjs +27 -0
- package/esm2022/lib/guards/index.mjs +3 -0
- package/esm2022/lib/guards/initialization.guard.mjs +41 -0
- package/esm2022/lib/interceptors/audit.interceptor.mjs +23 -0
- package/esm2022/lib/interceptors/auth.interceptor.mjs +49 -0
- package/esm2022/lib/interceptors/body.interceptor.mjs +24 -0
- package/esm2022/lib/interceptors/error.interceptor.mjs +35 -0
- package/esm2022/lib/interceptors/index.mjs +7 -0
- package/esm2022/lib/interceptors/toast.interceptor.mjs +27 -0
- package/esm2022/lib/models/aggregation.mjs +2 -0
- package/esm2022/lib/models/article-metadata.mjs +2 -0
- package/esm2022/lib/models/autocomplete.mjs +2 -0
- package/esm2022/lib/models/custom-json.mjs +2 -0
- package/esm2022/lib/models/filter-dropdown.mjs +2 -0
- package/esm2022/lib/models/index.mjs +7 -0
- package/esm2022/lib/models/user-settings.mjs +2 -0
- package/esm2022/lib/pipes/highlight-word.pipe.mjs +33 -0
- package/esm2022/lib/pipes/index.mjs +3 -0
- package/esm2022/lib/pipes/source-icon.pipe.mjs +43 -0
- package/esm2022/lib/public-api.mjs +18 -0
- package/esm2022/lib/resolvers/index.mjs +2 -0
- package/esm2022/lib/resolvers/query-name-resolver.mjs +14 -0
- package/esm2022/lib/resources/index.mjs +2 -0
- package/esm2022/lib/resources/themes.mjs +53 -0
- package/esm2022/lib/services/application.service.mjs +245 -0
- package/esm2022/lib/services/autocomplete.service.mjs +85 -0
- package/esm2022/lib/services/drawer/backdrop.service.mjs +23 -0
- package/esm2022/lib/services/drawer/drawer-stack.service.mjs +152 -0
- package/esm2022/lib/services/drawer/drawer.service.mjs +38 -0
- package/esm2022/lib/services/index.mjs +12 -0
- package/esm2022/lib/services/label.service.mjs +161 -0
- package/esm2022/lib/services/navigation.service.mjs +59 -0
- package/esm2022/lib/services/saved-searches.service.mjs +75 -0
- package/esm2022/lib/services/search.service.mjs +89 -0
- package/esm2022/lib/services/selection-history.service.mjs +92 -0
- package/esm2022/lib/services/selection.service.mjs +87 -0
- package/esm2022/lib/stores/aggregations.store.mjs +59 -0
- package/esm2022/lib/stores/app.store.mjs +270 -0
- package/esm2022/lib/stores/application.store.mjs +87 -0
- package/esm2022/lib/stores/index.mjs +9 -0
- package/esm2022/lib/stores/principal.store.mjs +47 -0
- package/esm2022/lib/stores/query-params.store.mjs +207 -0
- package/esm2022/lib/stores/selection.store.mjs +45 -0
- package/esm2022/lib/stores/theme.store.mjs +116 -0
- package/esm2022/lib/stores/user-settings.store.mjs +391 -0
- package/esm2022/lib/tokens/highlights.mjs +32 -0
- package/esm2022/lib/tokens/index.mjs +2 -0
- package/esm2022/lib/utils/debounced-signal.mjs +38 -0
- package/esm2022/lib/utils/index.mjs +8 -0
- package/esm2022/lib/utils/inline-worker.mjs +40 -0
- package/esm2022/lib/utils/query.mjs +58 -0
- package/esm2022/lib/utils/routes.mjs +28 -0
- package/esm2022/lib/utils/tailwind-utils.mjs +6 -0
- package/esm2022/lib/utils/theme-body-hook.mjs +18 -0
- package/esm2022/lib/utils/theme-registry.mjs +6 -0
- package/esm2022/lib/web-services/aggregations.service.mjs +104 -0
- package/esm2022/lib/web-services/app.service.mjs +48 -0
- package/esm2022/lib/web-services/audit.service.mjs +122 -0
- package/esm2022/lib/web-services/index.mjs +10 -0
- package/esm2022/lib/web-services/json-method-plugin.service.mjs +54 -0
- package/esm2022/lib/web-services/preview.service.mjs +327 -0
- package/esm2022/lib/web-services/principal.service.mjs +46 -0
- package/esm2022/lib/web-services/query.service.mjs +123 -0
- package/esm2022/lib/web-services/text-chunck.service.mjs +46 -0
- package/esm2022/public-api.mjs +5 -0
- package/esm2022/sinequa-atomic-angular.mjs +5 -0
- package/fesm2022/sinequa-atomic-angular.mjs +4420 -0
- package/fesm2022/sinequa-atomic-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/assistant/index.d.ts +1 -0
- package/lib/assistant/signalR.web.service.d.ts +46 -0
- package/lib/components/dropdown-input.d.ts +18 -0
- package/lib/components/dropdown-list.d.ts +8 -0
- package/lib/components/dropdown.d.ts +50 -0
- package/lib/components/index.d.ts +6 -0
- package/lib/components/menu/index.d.ts +2 -0
- package/lib/components/menu/menu-item.d.ts +8 -0
- package/lib/components/menu/menu.d.ts +24 -0
- package/lib/components/metadata/index.d.ts +1 -0
- package/lib/components/metadata/metadata.component.d.ts +24 -0
- package/lib/components/theme/index.d.ts +2 -0
- package/lib/components/theme/theme-selector.component.d.ts +70 -0
- package/lib/components/theme/theme-toggle.component.d.ts +10 -0
- package/lib/directives/index.d.ts +4 -0
- package/lib/directives/infinite-scroll.directive.d.ts +30 -0
- package/lib/directives/select-article-on-click.directive.d.ts +14 -0
- package/lib/directives/show-bookmark.directive.d.ts +60 -0
- package/lib/directives/theme-provider.directive.d.ts +20 -0
- package/lib/guards/auth.guard.d.ts +7 -0
- package/lib/guards/index.d.ts +2 -0
- package/lib/guards/initialization.guard.d.ts +20 -0
- package/lib/interceptors/audit.interceptor.d.ts +13 -0
- package/lib/interceptors/auth.interceptor.d.ts +14 -0
- package/lib/interceptors/body.interceptor.d.ts +11 -0
- package/lib/interceptors/error.interceptor.d.ts +9 -0
- package/lib/interceptors/index.d.ts +5 -0
- package/lib/interceptors/toast.interceptor.d.ts +13 -0
- package/lib/models/aggregation.d.ts +12 -0
- package/lib/models/article-metadata.d.ts +5 -0
- package/lib/models/autocomplete.d.ts +5 -0
- package/lib/models/custom-json.d.ts +69 -0
- package/lib/models/filter-dropdown.d.ts +10 -0
- package/lib/models/index.d.ts +6 -0
- package/lib/models/user-settings.d.ts +38 -0
- package/lib/pipes/highlight-word.pipe.d.ts +22 -0
- package/lib/pipes/index.d.ts +2 -0
- package/lib/pipes/source-icon.pipe.d.ts +51 -0
- package/lib/public-api.d.ts +14 -0
- package/lib/resolvers/index.d.ts +1 -0
- package/lib/resolvers/query-name-resolver.d.ts +9 -0
- package/lib/resources/index.d.ts +1 -0
- package/lib/resources/themes.d.ts +51 -0
- package/lib/services/application.service.d.ts +183 -0
- package/lib/services/autocomplete.service.d.ts +96 -0
- package/lib/services/drawer/backdrop.service.d.ts +9 -0
- package/lib/services/drawer/drawer-stack.service.d.ts +70 -0
- package/lib/services/drawer/drawer.service.d.ts +15 -0
- package/lib/services/index.d.ts +11 -0
- package/lib/services/label.service.d.ts +114 -0
- package/lib/services/navigation.service.d.ts +33 -0
- package/lib/services/saved-searches.service.d.ts +149 -0
- package/lib/services/search.service.d.ts +159 -0
- package/lib/services/selection-history.service.d.ts +50 -0
- package/lib/services/selection.service.d.ts +123 -0
- package/lib/stores/aggregations.store.d.ts +25 -0
- package/lib/stores/app.store.d.ts +110 -0
- package/lib/stores/application.store.d.ts +83 -0
- package/lib/stores/index.d.ts +8 -0
- package/lib/stores/principal.store.d.ts +47 -0
- package/lib/stores/query-params.store.d.ts +128 -0
- package/lib/stores/selection.store.d.ts +52 -0
- package/lib/stores/theme.store.d.ts +66 -0
- package/lib/stores/user-settings.store.d.ts +111 -0
- package/lib/tokens/highlights.d.ts +8 -0
- package/lib/tokens/index.d.ts +1 -0
- package/lib/utils/debounced-signal.d.ts +25 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/inline-worker.d.ts +11 -0
- package/lib/utils/query.d.ts +26 -0
- package/lib/utils/routes.d.ts +16 -0
- package/lib/utils/tailwind-utils.d.ts +2 -0
- package/lib/utils/theme-body-hook.d.ts +6 -0
- package/lib/utils/theme-registry.d.ts +3 -0
- package/lib/web-services/aggregations.service.d.ts +57 -0
- package/lib/web-services/app.service.d.ts +30 -0
- package/lib/web-services/audit.service.d.ts +72 -0
- package/lib/web-services/index.d.ts +9 -0
- package/lib/web-services/json-method-plugin.service.d.ts +41 -0
- package/lib/web-services/preview.service.d.ts +283 -0
- package/lib/web-services/principal.service.d.ts +28 -0
- package/lib/web-services/query.service.d.ts +29 -0
- package/lib/web-services/text-chunck.service.d.ts +22 -0
- package/package.json +28 -0
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Article, AuditEvents, QueryParams } from '@sinequa/atomic';
|
|
2
|
+
import { Basket, RecentSearch, UserSettings } from '../models/user-settings';
|
|
3
|
+
export type UserSettingsState = UserSettings;
|
|
4
|
+
export declare const UserSettingsStore: import("@angular/core").Type<{
|
|
5
|
+
bookmarks: import("@angular/core").Signal<import("../models/user-settings").Bookmark[]>;
|
|
6
|
+
recentSearches: import("@angular/core").Signal<RecentSearch[]>;
|
|
7
|
+
savedSearches: import("@angular/core").Signal<import("../models/user-settings").SavedSearch[]>;
|
|
8
|
+
baskets: import("@angular/core").Signal<Basket[]>;
|
|
9
|
+
assistants: import("@angular/core").Signal<Record<string, unknown>>;
|
|
10
|
+
language?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
11
|
+
updateBookmarks: (bookmarks: UserSettings["bookmarks"], auditEvents?: AuditEvents) => Promise<void>;
|
|
12
|
+
bookmark: (article: Article, queryName?: string) => Promise<void>;
|
|
13
|
+
unbookmark: (id: string) => Promise<void>;
|
|
14
|
+
isBookmarked: (article: Partial<Article>) => boolean;
|
|
15
|
+
toggleBookmark: (article: Article) => Promise<void>;
|
|
16
|
+
deleteRecentSearch: (index: number) => Promise<void>;
|
|
17
|
+
updateRecentSearches: (recentSearches: UserSettings["recentSearches"], auditEvents?: AuditEvents) => Promise<void>;
|
|
18
|
+
addCurrentSearch: (queryParams: QueryParams) => Promise<void>;
|
|
19
|
+
deleteSavedSearch: (index: number) => Promise<void>;
|
|
20
|
+
updateSavedSearches: (savedSearches: UserSettings["savedSearches"]) => Promise<void>;
|
|
21
|
+
deleteBasket: (index: number) => Promise<void>;
|
|
22
|
+
createBasket: (basket: Basket) => Promise<void>;
|
|
23
|
+
updateBaskets: (baskets: UserSettings["baskets"]) => Promise<void>;
|
|
24
|
+
updateBasket: (basket: Basket, index: number) => Promise<void>;
|
|
25
|
+
addToBasket: (name: string, ids: string | string[]) => Promise<void>;
|
|
26
|
+
removeFromBasket: (name: string, ids: string | string[]) => Promise<void>;
|
|
27
|
+
updateAssistantSettings: (assistantSettings: UserSettings["assistants"]) => Promise<void>;
|
|
28
|
+
updateLanguage: (language: UserSettings["language"], auditEvents?: AuditEvents) => Promise<void>;
|
|
29
|
+
initialize: () => Promise<void>;
|
|
30
|
+
reset: () => Promise<void>;
|
|
31
|
+
} & import("@ngrx/signals").StateSource<{
|
|
32
|
+
bookmarks: import("../models/user-settings").Bookmark[];
|
|
33
|
+
recentSearches: RecentSearch[];
|
|
34
|
+
savedSearches: import("../models/user-settings").SavedSearch[];
|
|
35
|
+
baskets: Basket[];
|
|
36
|
+
assistants: Record<string, unknown>;
|
|
37
|
+
language?: string | undefined;
|
|
38
|
+
}>>;
|
|
39
|
+
export declare function withUserSettingsFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals").EmptyFeatureResult, {
|
|
40
|
+
state: {
|
|
41
|
+
bookmarks: import("../models/user-settings").Bookmark[];
|
|
42
|
+
recentSearches: RecentSearch[];
|
|
43
|
+
savedSearches: import("../models/user-settings").SavedSearch[];
|
|
44
|
+
baskets: Basket[];
|
|
45
|
+
assistants: Record<string, unknown>;
|
|
46
|
+
language?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
computed: {};
|
|
49
|
+
methods: {
|
|
50
|
+
initialize: () => Promise<void>;
|
|
51
|
+
reset: () => Promise<void>;
|
|
52
|
+
};
|
|
53
|
+
}>;
|
|
54
|
+
export declare function withBookmarkFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals").EmptyFeatureResult, {
|
|
55
|
+
state: {
|
|
56
|
+
bookmarks: UserSettings["bookmarks"];
|
|
57
|
+
};
|
|
58
|
+
computed: {};
|
|
59
|
+
methods: {
|
|
60
|
+
updateBookmarks: (bookmarks: UserSettings["bookmarks"], auditEvents?: AuditEvents) => Promise<void>;
|
|
61
|
+
bookmark: (article: Article, queryName?: string) => Promise<void>;
|
|
62
|
+
unbookmark: (id: string) => Promise<void>;
|
|
63
|
+
isBookmarked: (article: Partial<Article>) => boolean;
|
|
64
|
+
toggleBookmark: (article: Article) => Promise<void>;
|
|
65
|
+
};
|
|
66
|
+
}>;
|
|
67
|
+
export declare function withRecentSearchFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals").EmptyFeatureResult, {
|
|
68
|
+
state: {
|
|
69
|
+
recentSearches: UserSettings["recentSearches"];
|
|
70
|
+
};
|
|
71
|
+
computed: {};
|
|
72
|
+
methods: {
|
|
73
|
+
deleteRecentSearch: (index: number) => Promise<void>;
|
|
74
|
+
updateRecentSearches: (recentSearches: UserSettings["recentSearches"], auditEvents?: AuditEvents) => Promise<void>;
|
|
75
|
+
addCurrentSearch: (queryParams: QueryParams) => Promise<void>;
|
|
76
|
+
};
|
|
77
|
+
}>;
|
|
78
|
+
export declare function withSavedSearchFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals").EmptyFeatureResult, {
|
|
79
|
+
state: {
|
|
80
|
+
savedSearches: UserSettings["savedSearches"];
|
|
81
|
+
};
|
|
82
|
+
computed: {};
|
|
83
|
+
methods: {
|
|
84
|
+
deleteSavedSearch: (index: number) => Promise<void>;
|
|
85
|
+
updateSavedSearches: (savedSearches: UserSettings["savedSearches"]) => Promise<void>;
|
|
86
|
+
};
|
|
87
|
+
}>;
|
|
88
|
+
export declare function withBasketsFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals").EmptyFeatureResult, {
|
|
89
|
+
state: {
|
|
90
|
+
baskets: UserSettings["baskets"];
|
|
91
|
+
};
|
|
92
|
+
computed: {};
|
|
93
|
+
methods: {
|
|
94
|
+
deleteBasket: (index: number) => Promise<void>;
|
|
95
|
+
createBasket: (basket: Basket) => Promise<void>;
|
|
96
|
+
updateBaskets: (baskets: UserSettings["baskets"]) => Promise<void>;
|
|
97
|
+
updateBasket: (basket: Basket, index: number) => Promise<void>;
|
|
98
|
+
addToBasket: (name: string, ids: string | string[]) => Promise<void>;
|
|
99
|
+
removeFromBasket: (name: string, ids: string | string[]) => Promise<void>;
|
|
100
|
+
};
|
|
101
|
+
}>;
|
|
102
|
+
export declare function withAssistantFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals").EmptyFeatureResult, {
|
|
103
|
+
state: {
|
|
104
|
+
assistants: UserSettings["assistants"];
|
|
105
|
+
};
|
|
106
|
+
computed: {};
|
|
107
|
+
methods: {
|
|
108
|
+
updateAssistantSettings: (assistantSettings: UserSettings["assistants"]) => Promise<void>;
|
|
109
|
+
updateLanguage: (language: UserSettings["language"], auditEvents?: AuditEvents) => Promise<void>;
|
|
110
|
+
};
|
|
111
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InjectionToken } from "@angular/core";
|
|
2
|
+
export type PreviewHighlightName = 'company' | 'geo' | 'person' | 'extractslocations' | 'matchlocations';
|
|
3
|
+
export type PreviewHighlight = {
|
|
4
|
+
name: PreviewHighlightName;
|
|
5
|
+
color: string;
|
|
6
|
+
bgColor: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const HIGHLIGHTS: InjectionToken<PreviewHighlight[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./highlights";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Signal } from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a debounced signal that updates its value after a specified timeout.
|
|
4
|
+
*
|
|
5
|
+
* @template T - The type of the signal value.
|
|
6
|
+
* @param Signal<T> input - The input signal whose value will be debounced.
|
|
7
|
+
* @param number [timeOutMs=0] - The debounce timeout in milliseconds. Defaults to 0.
|
|
8
|
+
* @returns Signal<T> - A new signal that updates its value after the specified debounce timeout.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const input = signal('');
|
|
13
|
+
* const debounced = debouncedSignal(input, 1000);
|
|
14
|
+
*
|
|
15
|
+
* contructor() {
|
|
16
|
+
* effect(() => {
|
|
17
|
+
* console.log(debounced());
|
|
18
|
+
* // will log the input value after 1 second of inactivity.
|
|
19
|
+
* });
|
|
20
|
+
* }
|
|
21
|
+
* ...
|
|
22
|
+
* <input [ngModel]="input()" (ngModelChange)="input.set($event)">
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function debouncedSignal<T>(input: Signal<T>, timeOutMs?: number): Signal<T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare class InlineWorker {
|
|
3
|
+
private readonly worker;
|
|
4
|
+
private onMessage;
|
|
5
|
+
private onError;
|
|
6
|
+
constructor(func: () => void);
|
|
7
|
+
postMessage(data: unknown): void;
|
|
8
|
+
onmessage(): Observable<MessageEvent>;
|
|
9
|
+
onerror(): Observable<ErrorEvent>;
|
|
10
|
+
terminate(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Query } from '@sinequa/atomic';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the query name from the current route.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This function must be used within an injection context.
|
|
7
|
+
*
|
|
8
|
+
* This function traverses the route tree recursively to find the query name.
|
|
9
|
+
* It first checks for a query parameter `t` in the route's snapshot. If the query name is not found
|
|
10
|
+
* in the route data, it attempts to find it in the child routes of the "search" route.
|
|
11
|
+
* If the query name is still not found, it falls back to the `queryName` defined in the route's data.
|
|
12
|
+
*
|
|
13
|
+
* @returns {string | undefined} The query name if found, otherwise `undefined`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getQueryNameFromRoute(): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Builds a query object based on the provided partial query.
|
|
18
|
+
* If any properties are missing in the partial query, default values are used.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* This function must be used within an injection context.
|
|
22
|
+
*
|
|
23
|
+
* @param query - The partial query object.
|
|
24
|
+
* @returns The complete query object.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildQuery(query?: Partial<Query>): Query;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieves the current path from the Angular `ActivatedRoute` service.
|
|
3
|
+
*
|
|
4
|
+
* @returns {string | undefined} The current path as a string, or `undefined` if the path cannot be determined.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getCurrentPath(): string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the current query name based on the current path and router configuration.
|
|
9
|
+
*
|
|
10
|
+
* This function asserts that it is being called within an injection context and then
|
|
11
|
+
* uses Angular's dependency injection to get the router configuration. It matches the
|
|
12
|
+
* current path against the router's configuration to find the corresponding query name.
|
|
13
|
+
*
|
|
14
|
+
* @returns {string | undefined} The name of the current query if found, otherwise undefined.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getCurrentQueryName(): string | undefined;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Aggregation, AuditEvents, Query, TreeAggregation, TreeAggregationNode } from '@sinequa/atomic';
|
|
4
|
+
import { QueryService } from './query.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AggregationsService {
|
|
7
|
+
protected readonly http: HttpClient;
|
|
8
|
+
protected readonly queryService: QueryService;
|
|
9
|
+
appStore: {
|
|
10
|
+
webServices: import("@ngrx/signals").DeepSignal<{}>;
|
|
11
|
+
queries: import("@ngrx/signals").DeepSignal<{}>;
|
|
12
|
+
customJSONs: import("@angular/core").Signal<import("@sinequa/atomic-angular").SideCJson[]>;
|
|
13
|
+
data: import("@ngrx/signals").DeepSignal<{}>;
|
|
14
|
+
customizationJson: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJsonMint>;
|
|
15
|
+
sources: import("@angular/core").Signal<any>;
|
|
16
|
+
filters: import("@angular/core").Signal<any>;
|
|
17
|
+
initialize: () => Promise<void>;
|
|
18
|
+
initializeWithAppName: (appName: string) => Promise<void>;
|
|
19
|
+
update: (app: import("@sinequa/atomic").CCApp) => 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
|
+
getColumnAlias: (column: string) => string;
|
|
30
|
+
getAuthorizedFilters: (route: import("@angular/router").ActivatedRoute) => Aggregation[];
|
|
31
|
+
getNamedCustomizationJson: (name: string) => any | undefined;
|
|
32
|
+
getAggregationIcon: (column: string) => string | undefined;
|
|
33
|
+
getAggregationItemsCustomization: (column: string) => import("@sinequa/atomic-angular").CFilterItem[] | undefined;
|
|
34
|
+
getAggregationCustomization: (column: string) => import("@sinequa/atomic-angular").CFilter | undefined;
|
|
35
|
+
} & import("@ngrx/signals").StateSource<{
|
|
36
|
+
webServices: {};
|
|
37
|
+
queries: {};
|
|
38
|
+
customJSONs: import("@sinequa/atomic-angular").SideCJson[];
|
|
39
|
+
data: {};
|
|
40
|
+
}>;
|
|
41
|
+
aggregationsStore: {
|
|
42
|
+
aggregations: import("@angular/core").Signal<Aggregation[]>;
|
|
43
|
+
update: (aggregations: Aggregation[]) => void;
|
|
44
|
+
updateAggregation: (aggregation: Aggregation) => void;
|
|
45
|
+
clear: () => void;
|
|
46
|
+
getAggregation: (name: string, kind?: "column" | "name") => Aggregation | undefined;
|
|
47
|
+
} & import("@ngrx/signals").StateSource<{
|
|
48
|
+
aggregations: Aggregation[];
|
|
49
|
+
}>;
|
|
50
|
+
protected API_URL: string;
|
|
51
|
+
loadMore(query: Partial<Query>, aggregation: Aggregation, audit?: AuditEvents): Observable<Aggregation>;
|
|
52
|
+
open(query: Partial<Query>, aggregation: TreeAggregation, item: TreeAggregationNode): Observable<TreeAggregation>;
|
|
53
|
+
private findNode;
|
|
54
|
+
private replaceInTree;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AggregationsService, never>;
|
|
56
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AggregationsService>;
|
|
57
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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("@ngrx/signals").DeepSignal<{}>;
|
|
8
|
+
queries: import("@ngrx/signals").DeepSignal<{}>;
|
|
9
|
+
customJSONs: import("@angular/core").Signal<import("@sinequa/atomic-angular").SideCJson[]>;
|
|
10
|
+
data: import("@ngrx/signals").DeepSignal<{}>;
|
|
11
|
+
customizationJson: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJsonMint>;
|
|
12
|
+
sources: import("@angular/core").Signal<any>;
|
|
13
|
+
filters: import("@angular/core").Signal<any>;
|
|
14
|
+
initialize: () => Promise<void>;
|
|
15
|
+
initializeWithAppName: (appName: string) => Promise<void>;
|
|
16
|
+
update: (app: CCApp) => void;
|
|
17
|
+
getWebServiceByType: (type: import("@sinequa/atomic").CCWebService["webServiceType"]) => import("@sinequa/atomic").CCWebService | undefined;
|
|
18
|
+
getLabels: () => {
|
|
19
|
+
private: string;
|
|
20
|
+
public: string;
|
|
21
|
+
};
|
|
22
|
+
getQueryByName: (name: string) => import("@sinequa/atomic").CCQuery | undefined;
|
|
23
|
+
getQueryByIndex: (index: number) => import("@sinequa/atomic").CCQuery | undefined;
|
|
24
|
+
getDefaultQuery: () => import("@sinequa/atomic").CCQuery | undefined;
|
|
25
|
+
allowEmptySearch: (queryName: string) => boolean;
|
|
26
|
+
getColumnAlias: (column: string) => string;
|
|
27
|
+
getAuthorizedFilters: (route: import("@angular/router").ActivatedRoute) => import("@sinequa/atomic").Aggregation[];
|
|
28
|
+
getNamedCustomizationJson: (name: string) => any | undefined;
|
|
29
|
+
getAggregationIcon: (column: string) => string | undefined;
|
|
30
|
+
getAggregationItemsCustomization: (column: string) => import("@sinequa/atomic-angular").CFilterItem[] | undefined;
|
|
31
|
+
getAggregationCustomization: (column: string) => import("@sinequa/atomic-angular").CFilter | undefined;
|
|
32
|
+
} & import("@ngrx/signals").StateSource<{
|
|
33
|
+
webServices: {};
|
|
34
|
+
queries: {};
|
|
35
|
+
customJSONs: import("@sinequa/atomic-angular").SideCJson[];
|
|
36
|
+
data: {};
|
|
37
|
+
}>;
|
|
38
|
+
app: import("@angular/core").Signal<CCApp>;
|
|
39
|
+
protected readonly http: HttpClient;
|
|
40
|
+
protected readonly router: Router;
|
|
41
|
+
protected readonly API_URL: string;
|
|
42
|
+
protected lastClickTime: number;
|
|
43
|
+
/**
|
|
44
|
+
* Notify the Sinequa server of a set of audit events
|
|
45
|
+
*
|
|
46
|
+
* @param auditEvents The audit events
|
|
47
|
+
*/
|
|
48
|
+
notify(auditEvents: AuditEvents): void;
|
|
49
|
+
/**
|
|
50
|
+
* It sends an audit event to the Audit Service.
|
|
51
|
+
*/
|
|
52
|
+
notifyLogin(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Notify logout
|
|
55
|
+
*/
|
|
56
|
+
notifyLogout(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Notify the Sinequa server of a document event
|
|
59
|
+
*
|
|
60
|
+
* @param evt The audit event type
|
|
61
|
+
* @param doc The document (article) in question
|
|
62
|
+
* @param resultId The resultid that contain the document
|
|
63
|
+
* @param parameters Additional parameters
|
|
64
|
+
*/
|
|
65
|
+
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;
|
|
66
|
+
/**
|
|
67
|
+
* Notify route change
|
|
68
|
+
*/
|
|
69
|
+
notifyRouteChange(url: string): void;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuditService, never>;
|
|
71
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuditService>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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";
|
|
@@ -0,0 +1,41 @@
|
|
|
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 {};
|