@sinequa/atomic-angular 0.0.140
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 +248 -0
- package/esm2022/lib/assistant/index.mjs +2 -0
- package/esm2022/lib/assistant/signalR.web.service.mjs +81 -0
- package/esm2022/lib/components/dropdown.mjs +127 -0
- package/esm2022/lib/components/index.mjs +5 -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/providers/eager-provider.mjs +24 -0
- package/esm2022/lib/providers/index.mjs +2 -0
- package/esm2022/lib/public-api.mjs +19 -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 +62 -0
- package/esm2022/lib/stores/app.store.mjs +265 -0
- package/esm2022/lib/stores/application.store.mjs +93 -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 +208 -0
- package/esm2022/lib/stores/selection.store.mjs +46 -0
- package/esm2022/lib/stores/theme.store.mjs +116 -0
- package/esm2022/lib/stores/user-settings.store.mjs +272 -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 +4204 -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.d.ts +50 -0
- package/lib/components/index.d.ts +4 -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 +52 -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 +58 -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 +32 -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 +54 -0
- package/lib/providers/eager-provider.d.ts +11 -0
- package/lib/providers/index.d.ts +1 -0
- package/lib/public-api.d.ts +15 -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 +178 -0
- package/lib/services/autocomplete.service.d.ts +91 -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 +117 -0
- package/lib/services/navigation.service.d.ts +33 -0
- package/lib/services/saved-searches.service.d.ts +145 -0
- package/lib/services/search.service.d.ts +155 -0
- package/lib/services/selection-history.service.d.ts +50 -0
- package/lib/services/selection.service.d.ts +127 -0
- package/lib/stores/aggregations.store.d.ts +50 -0
- package/lib/stores/app.store.d.ts +208 -0
- package/lib/stores/application.store.d.ts +106 -0
- package/lib/stores/index.d.ts +8 -0
- package/lib/stores/principal.store.d.ts +53 -0
- package/lib/stores/query-params.store.d.ts +187 -0
- package/lib/stores/selection.store.d.ts +62 -0
- package/lib/stores/theme.store.d.ts +55 -0
- package/lib/stores/user-settings.store.d.ts +161 -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 +60 -0
- package/lib/web-services/app.service.d.ts +30 -0
- package/lib/web-services/audit.service.d.ts +75 -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 +295 -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,117 @@
|
|
|
1
|
+
import { CCWebService, Query } from '@sinequa/atomic';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface LabelsConfig {
|
|
5
|
+
allowPublicLabelsCreation?: boolean;
|
|
6
|
+
allowPublicLabelsModification?: boolean;
|
|
7
|
+
privateLabelsField?: string;
|
|
8
|
+
publicLabelsField?: string;
|
|
9
|
+
defaultPublicLabels?: string;
|
|
10
|
+
labelsAutoSuggestMaxCount?: string;
|
|
11
|
+
labelsAutoSuggestWildcard?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class LabelService {
|
|
14
|
+
appStore: {
|
|
15
|
+
webServices: import("@angular/core").Signal<Record<string, CCWebService>>;
|
|
16
|
+
data: import("@ngrx/signals/src/deep-signal").DeepSignal<import("@sinequa/atomic-angular").CJson>;
|
|
17
|
+
queries: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCQuery>>;
|
|
18
|
+
customJSONs: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJ[]>;
|
|
19
|
+
filters: import("@angular/core").Signal<import("@sinequa/atomic-angular").CFilter[]>;
|
|
20
|
+
sources: import("@angular/core").Signal<import("@sinequa/atomic-angular").CSources | {
|
|
21
|
+
routes?: [];
|
|
22
|
+
filters?: import("@sinequa/atomic-angular").CFilter[];
|
|
23
|
+
}>;
|
|
24
|
+
customizationJson: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJson>;
|
|
25
|
+
update: (app: import("@sinequa/atomic").CCApp) => void;
|
|
26
|
+
initialize: () => Promise<void>;
|
|
27
|
+
initializeWithAppName: (appName: string) => Promise<void>;
|
|
28
|
+
getWebServiceByType: (type: CCWebService["webServiceType"]) => CCWebService | undefined;
|
|
29
|
+
getLabels: () => {
|
|
30
|
+
private: string;
|
|
31
|
+
public: string;
|
|
32
|
+
};
|
|
33
|
+
getQueryByName: (name: string) => import("@sinequa/atomic").CCQuery | undefined;
|
|
34
|
+
getQueryByIndex: (index: number) => import("@sinequa/atomic").CCQuery | undefined;
|
|
35
|
+
getDefaultQuery: () => import("@sinequa/atomic").CCQuery | undefined;
|
|
36
|
+
allowEmptySearch: (queryName: string) => boolean;
|
|
37
|
+
getNamedCustomizationJson: (name: string) => any | undefined;
|
|
38
|
+
getColumnAlias: (column: string) => string;
|
|
39
|
+
getAggregationIcon: (column: string) => string | undefined;
|
|
40
|
+
getAggregationItemsCustomization: (column: string) => import("@sinequa/atomic-angular").CFilterItem[] | undefined;
|
|
41
|
+
getAggregationCustomization: (column: string) => import("@sinequa/atomic-angular").CFilter | undefined;
|
|
42
|
+
getAuthorizedFilters: (route: import("@angular/router").ActivatedRoute) => import("@sinequa/atomic").Aggregation[];
|
|
43
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
44
|
+
webServices: Record<string, CCWebService>;
|
|
45
|
+
data: import("@sinequa/atomic-angular").CJson;
|
|
46
|
+
queries: Record<string, import("@sinequa/atomic").CCQuery>;
|
|
47
|
+
customJSONs: import("@sinequa/atomic-angular").CJ[];
|
|
48
|
+
}>;
|
|
49
|
+
hasAccess: import("@angular/core").WritableSignal<boolean | undefined>;
|
|
50
|
+
/**
|
|
51
|
+
* Check user rights to verify if they can access labels handling
|
|
52
|
+
* @returns if has the rights
|
|
53
|
+
*/
|
|
54
|
+
canHandleLabels(): Promise<boolean>;
|
|
55
|
+
/**
|
|
56
|
+
* Get relevant config info from the labels web service
|
|
57
|
+
* @returns the LabelsConfig or undefined if no rights
|
|
58
|
+
*/
|
|
59
|
+
getLabelsConfig(): Observable<LabelsConfig | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* Fetch labels from string
|
|
62
|
+
* @param prefix the string prefix to filter with
|
|
63
|
+
* @param publicOnly whether they should be public or not
|
|
64
|
+
* @param locale optional locale filtering
|
|
65
|
+
* @returns list of label strings
|
|
66
|
+
*/
|
|
67
|
+
fetch(prefix: string, publicOnly?: boolean, locale?: string): Observable<string[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Add some labels to many documents
|
|
70
|
+
* @param labelsToAdd list of labels to add
|
|
71
|
+
* @param ids list of document id to add the label
|
|
72
|
+
* @param publicOnly whether the operation should be public only
|
|
73
|
+
* @returns a promise that resolves when the operation is complete
|
|
74
|
+
*/
|
|
75
|
+
add(labelsToAdd: string[], ids: string[], publicOnly?: boolean): Observable<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Remove some labels from many documents
|
|
78
|
+
* @param labelsToRemove list of labels to remove
|
|
79
|
+
* @param ids list of document id to add the label
|
|
80
|
+
* @param publicOnly whether the operation should be public only
|
|
81
|
+
* @returns a promise that resolves when the operation is complete
|
|
82
|
+
*/
|
|
83
|
+
remove(labelsToRemove: string[], ids: string[], publicOnly?: boolean): Observable<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Name some labels to a new name
|
|
86
|
+
* @param labelsToRename list of labels to rename
|
|
87
|
+
* @param newLabel the new label name
|
|
88
|
+
* @param publicOnly whether the operation should be public only
|
|
89
|
+
* @returns a promise that resolves when the operation is complete
|
|
90
|
+
*/
|
|
91
|
+
rename(labelsToRename: string[], newLabel: string, publicOnly?: boolean): Observable<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Delete some labels
|
|
94
|
+
* @param labelsToDelete the labels to delete
|
|
95
|
+
* @param publicOnly whether the operation should be public only
|
|
96
|
+
* @returns a promise that resolves when the operation is complete
|
|
97
|
+
*/
|
|
98
|
+
delete(labelsToDelete: string[], publicOnly?: boolean): Observable<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Create some labels for a query
|
|
101
|
+
* @param labelstoAdd the labels to create
|
|
102
|
+
* @param query the query object to which the labels will be added
|
|
103
|
+
* @param publicOnly whether the operation should be public only
|
|
104
|
+
* @returns a promise that resolves when the operation is complete
|
|
105
|
+
*/
|
|
106
|
+
bulkAdd(labelstoAdd: string[], query: Query, publicOnly?: boolean): Observable<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Delete some labels from a query
|
|
109
|
+
* @param labelsToRemove the labels to remove
|
|
110
|
+
* @param query the query object to which the labels will be removed
|
|
111
|
+
* @param publicOnly whether the operation should be public only
|
|
112
|
+
* @returns a promise that resolves when the operation is complete
|
|
113
|
+
*/
|
|
114
|
+
bulkRemove(labelsToRemove: string[], query: Query, publicOnly?: boolean): Observable<void>;
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LabelService, never>;
|
|
116
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LabelService>;
|
|
117
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NavigationEnd } from "@angular/router";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NavigationService {
|
|
4
|
+
private readonly router;
|
|
5
|
+
private readonly auditService;
|
|
6
|
+
urlAfterNavigation: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Observable that emits events of type `NavigationEnd` from the Angular Router.
|
|
9
|
+
*
|
|
10
|
+
* This observable performs the following operations:
|
|
11
|
+
* - Maps all router events to `RouterEvent`.
|
|
12
|
+
* - Filters the events to only include instances of `NavigationEnd`.
|
|
13
|
+
* - Taps into the event stream to extract the route name from the URL and notify the audit service of route changes,
|
|
14
|
+
* excluding the "loading" route and duplicate navigations.
|
|
15
|
+
* - Updates the `urlAfterNavigation` property with the current URL after navigation.
|
|
16
|
+
* - Shares the replayed value with a buffer size of 1 to ensure subscribers receive the latest emitted value.
|
|
17
|
+
*
|
|
18
|
+
* @type Observable<RouterEvent>
|
|
19
|
+
*/
|
|
20
|
+
navigationEnd$: import("rxjs").Observable<NavigationEnd>;
|
|
21
|
+
/**
|
|
22
|
+
* An observable that emits the tab extracted from the URL pathname or the last part of the URL.
|
|
23
|
+
*
|
|
24
|
+
* This observable listens to navigation end events and processes the URL to determine the current tab.
|
|
25
|
+
* It creates a fake URL object to extract the pathname and then uses the `getQueryParamsFromUrl` function
|
|
26
|
+
* to extract the tab from the URL pathname or defaults to the last part of the URL if no tab is found.
|
|
27
|
+
*
|
|
28
|
+
* @type Observable<string> - An observable that emits the current tab as a string.
|
|
29
|
+
*/
|
|
30
|
+
path$: import("rxjs").Observable<string | undefined>;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
|
|
32
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { SavedSearch } from '../models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SavedSearchesService {
|
|
4
|
+
protected readonly userSettingsStore: {
|
|
5
|
+
bookmarks: import("@angular/core").Signal<import("../models").Bookmark[]>;
|
|
6
|
+
recentSearches: import("@angular/core").Signal<import("../models").RecentSearch[]>;
|
|
7
|
+
savedSearches: import("@angular/core").Signal<SavedSearch[]>;
|
|
8
|
+
assistants: import("@angular/core").Signal<Record<string, unknown>>;
|
|
9
|
+
language?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
10
|
+
initialize: () => Promise<void>;
|
|
11
|
+
reset: () => Promise<void>;
|
|
12
|
+
updateBookmarks: (bookmarks: import("../models").UserSettings["bookmarks"], auditEvents?: import("@sinequa/atomic").AuditEvents) => Promise<void>;
|
|
13
|
+
bookmark: (article: import("@sinequa/atomic").Article, queryName?: string) => Promise<void>;
|
|
14
|
+
unbookmark: (id: string) => Promise<void>;
|
|
15
|
+
isBookmarked: (article: Partial<import("@sinequa/atomic").Article>) => boolean;
|
|
16
|
+
toggleBookmark: (article: import("@sinequa/atomic").Article) => Promise<void>;
|
|
17
|
+
deleteRecentSearch: (index: number) => Promise<void>;
|
|
18
|
+
updateRecentSearches: (recentSearches: import("../models").UserSettings["recentSearches"], auditEvents?: import("@sinequa/atomic").AuditEvents) => Promise<void>;
|
|
19
|
+
addCurrentSearch: (queryParams: import("@sinequa/atomic").QueryParams) => Promise<void>;
|
|
20
|
+
deleteSavedSearch: (index: number) => Promise<void>;
|
|
21
|
+
updateSavedSearches: (savedSearches: import("../models").UserSettings["savedSearches"]) => Promise<void>;
|
|
22
|
+
updateAssistantSettings: (assistantSettings: import("../models").UserSettings["assistants"]) => Promise<void>;
|
|
23
|
+
updateLanguage: (language: import("../models").UserSettings["language"], auditEvents?: import("@sinequa/atomic").AuditEvents) => Promise<void>;
|
|
24
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
25
|
+
bookmarks: import("../models").Bookmark[];
|
|
26
|
+
recentSearches: import("../models").RecentSearch[];
|
|
27
|
+
savedSearches: SavedSearch[];
|
|
28
|
+
assistants: Record<string, unknown>;
|
|
29
|
+
language?: string | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
protected readonly queryParamsStore: {
|
|
32
|
+
id?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
33
|
+
text?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
34
|
+
filters?: import("@angular/core").Signal<import("@sinequa/atomic").LegacyFilter[] | undefined> | undefined;
|
|
35
|
+
name?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
36
|
+
action?: import("@angular/core").Signal<"" | "open" | "search" | "aggregate" | undefined> | undefined;
|
|
37
|
+
select?: import("@angular/core").Signal<import("@sinequa/atomic").Select[] | undefined> | undefined;
|
|
38
|
+
open?: import("@angular/core").Signal<import("@sinequa/atomic").Open[] | undefined> | undefined;
|
|
39
|
+
page?: import("@angular/core").Signal<number | undefined> | undefined;
|
|
40
|
+
pageSize?: import("@angular/core").Signal<number | undefined> | undefined;
|
|
41
|
+
tab?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
42
|
+
scope?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
43
|
+
sort?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
44
|
+
basket?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
45
|
+
isFirstPage?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
46
|
+
strictRefine?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
47
|
+
globalRelevance?: import("@angular/core").Signal<number | undefined> | undefined;
|
|
48
|
+
questionLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
49
|
+
questionDefaultLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
50
|
+
spellingCorrectionMode?: import("@angular/core").Signal<import("@sinequa/atomic").SpellingCorrectionMode | undefined> | undefined;
|
|
51
|
+
spellingCorrectionFilter?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
52
|
+
documentWeight?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
53
|
+
textPartWeights?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
54
|
+
relevanceTransforms?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
55
|
+
removeDuplicates?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
56
|
+
queryId?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
57
|
+
aggregations?: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").AggregationOptions> | string[] | undefined> | undefined;
|
|
58
|
+
orderBy?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
59
|
+
groupBy?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
60
|
+
neuralSearch?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
61
|
+
path?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
62
|
+
setFromUrl: (url: string) => void;
|
|
63
|
+
addFilter: (filter: import("@sinequa/atomic").LegacyFilter) => void;
|
|
64
|
+
updateFilter: (filter: import("@sinequa/atomic").LegacyFilter) => void;
|
|
65
|
+
removeFilter: (field?: string) => void;
|
|
66
|
+
removeFilterByName: (name?: string) => void;
|
|
67
|
+
clearFilters: () => void;
|
|
68
|
+
patch: (params: Partial<Partial<Omit<import("@sinequa/atomic").Query, "filters">> & {
|
|
69
|
+
path?: string;
|
|
70
|
+
filters?: import("@sinequa/atomic").LegacyFilter[];
|
|
71
|
+
id?: string;
|
|
72
|
+
}>) => void;
|
|
73
|
+
getFilter: (fieldOrName?: string) => Partial<import("@sinequa/atomic").LegacyFilter & {
|
|
74
|
+
count: number;
|
|
75
|
+
}> | null;
|
|
76
|
+
getQuery: () => import("@sinequa/atomic").Query;
|
|
77
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
78
|
+
id?: string | undefined;
|
|
79
|
+
text?: string | undefined;
|
|
80
|
+
filters?: import("@sinequa/atomic").LegacyFilter[] | undefined;
|
|
81
|
+
name?: string | undefined;
|
|
82
|
+
action?: ("" | "search" | "open" | "aggregate") | undefined;
|
|
83
|
+
select?: import("@sinequa/atomic").Select[] | undefined;
|
|
84
|
+
open?: import("@sinequa/atomic").Open[] | undefined;
|
|
85
|
+
page?: number | undefined;
|
|
86
|
+
pageSize?: number | undefined;
|
|
87
|
+
tab?: string | undefined;
|
|
88
|
+
scope?: string | undefined;
|
|
89
|
+
sort?: string | undefined;
|
|
90
|
+
basket?: string | undefined;
|
|
91
|
+
isFirstPage?: boolean | undefined;
|
|
92
|
+
strictRefine?: boolean | undefined;
|
|
93
|
+
globalRelevance?: number | undefined;
|
|
94
|
+
questionLanguage?: string | undefined;
|
|
95
|
+
questionDefaultLanguage?: string | undefined;
|
|
96
|
+
spellingCorrectionMode?: import("@sinequa/atomic").SpellingCorrectionMode | undefined;
|
|
97
|
+
spellingCorrectionFilter?: string | undefined;
|
|
98
|
+
documentWeight?: string | undefined;
|
|
99
|
+
textPartWeights?: string | undefined;
|
|
100
|
+
relevanceTransforms?: string | undefined;
|
|
101
|
+
removeDuplicates?: boolean | undefined;
|
|
102
|
+
queryId?: string | undefined;
|
|
103
|
+
aggregations?: (Record<string, import("@sinequa/atomic").AggregationOptions> | string[]) | undefined;
|
|
104
|
+
orderBy?: string | undefined;
|
|
105
|
+
groupBy?: string | undefined;
|
|
106
|
+
neuralSearch?: boolean | undefined;
|
|
107
|
+
path?: string | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
/**
|
|
110
|
+
* Retrieves the list of saved searches from the user settings store.
|
|
111
|
+
*
|
|
112
|
+
* @returns {SavedSearch[]} An array of saved searches.
|
|
113
|
+
*/
|
|
114
|
+
getSavedSearches(): SavedSearch[];
|
|
115
|
+
/**
|
|
116
|
+
* Saves the current search query to the user's saved searches.
|
|
117
|
+
*
|
|
118
|
+
* This method retrieves the current search text from the query parameters store.
|
|
119
|
+
* If the search text is empty, it logs an error and exits.
|
|
120
|
+
* Otherwise, it creates a new saved search object with the current URL, date, and search text.
|
|
121
|
+
*
|
|
122
|
+
* The new saved search is added to the beginning of the saved searches array.
|
|
123
|
+
* If the array exceeds the maximum allowed storage, the oldest search is removed.
|
|
124
|
+
*
|
|
125
|
+
* Finally, the updated saved searches array is saved back to the user settings store,
|
|
126
|
+
* and a success message is displayed to the user.
|
|
127
|
+
*
|
|
128
|
+
* @throws {Error} If saving an empty search is attempted.
|
|
129
|
+
*/
|
|
130
|
+
saveSearch(): void;
|
|
131
|
+
/**
|
|
132
|
+
* Updates the saved searches in the user settings store.
|
|
133
|
+
*
|
|
134
|
+
* @param savedSearches - An array of SavedSearch objects to update.
|
|
135
|
+
*/
|
|
136
|
+
updateSavedSearches(savedSearches: SavedSearch[]): void;
|
|
137
|
+
/**
|
|
138
|
+
* Deletes a saved search from the user settings store.
|
|
139
|
+
*
|
|
140
|
+
* @param index - The index of the saved search to delete.
|
|
141
|
+
*/
|
|
142
|
+
deleteSavedSearch(index: number): void;
|
|
143
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SavedSearchesService, never>;
|
|
144
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SavedSearchesService>;
|
|
145
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Article, AuditEvents, Query, Result } from '@sinequa/atomic';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type SearchOptions = {
|
|
6
|
+
appendFilters?: boolean;
|
|
7
|
+
audit?: AuditEvents;
|
|
8
|
+
};
|
|
9
|
+
export declare class SearchService {
|
|
10
|
+
private readonly router;
|
|
11
|
+
private readonly route;
|
|
12
|
+
private readonly queryService;
|
|
13
|
+
result: Result;
|
|
14
|
+
audit?: AuditEvents;
|
|
15
|
+
protected readonly queryParamsStore: {
|
|
16
|
+
id?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
17
|
+
text?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
18
|
+
filters?: import("@angular/core").Signal<import("@sinequa/atomic").LegacyFilter[] | undefined> | undefined;
|
|
19
|
+
name?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
20
|
+
action?: import("@angular/core").Signal<"" | "open" | "search" | "aggregate" | undefined> | undefined;
|
|
21
|
+
select?: import("@angular/core").Signal<import("@sinequa/atomic").Select[] | undefined> | undefined;
|
|
22
|
+
open?: import("@angular/core").Signal<import("@sinequa/atomic").Open[] | undefined> | undefined;
|
|
23
|
+
page?: import("@angular/core").Signal<number | undefined> | undefined;
|
|
24
|
+
pageSize?: import("@angular/core").Signal<number | undefined> | undefined;
|
|
25
|
+
tab?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
26
|
+
scope?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
27
|
+
sort?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
28
|
+
basket?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
29
|
+
isFirstPage?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
30
|
+
strictRefine?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
31
|
+
globalRelevance?: import("@angular/core").Signal<number | undefined> | undefined;
|
|
32
|
+
questionLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
33
|
+
questionDefaultLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
34
|
+
spellingCorrectionMode?: import("@angular/core").Signal<import("@sinequa/atomic").SpellingCorrectionMode | undefined> | undefined;
|
|
35
|
+
spellingCorrectionFilter?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
36
|
+
documentWeight?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
37
|
+
textPartWeights?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
38
|
+
relevanceTransforms?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
39
|
+
removeDuplicates?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
40
|
+
queryId?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
41
|
+
aggregations?: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").AggregationOptions> | string[] | undefined> | undefined;
|
|
42
|
+
orderBy?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
43
|
+
groupBy?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
44
|
+
neuralSearch?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
45
|
+
path?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
46
|
+
setFromUrl: (url: string) => void;
|
|
47
|
+
addFilter: (filter: import("@sinequa/atomic").LegacyFilter) => void;
|
|
48
|
+
updateFilter: (filter: import("@sinequa/atomic").LegacyFilter) => void;
|
|
49
|
+
removeFilter: (field?: string) => void;
|
|
50
|
+
removeFilterByName: (name?: string) => void;
|
|
51
|
+
clearFilters: () => void;
|
|
52
|
+
patch: (params: Partial<Partial<Omit<Query, "filters">> & {
|
|
53
|
+
path?: string;
|
|
54
|
+
filters?: import("@sinequa/atomic").LegacyFilter[];
|
|
55
|
+
id?: string;
|
|
56
|
+
}>) => void;
|
|
57
|
+
getFilter: (fieldOrName?: string) => Partial<import("@sinequa/atomic").LegacyFilter & {
|
|
58
|
+
count: number;
|
|
59
|
+
}> | null;
|
|
60
|
+
getQuery: () => Query;
|
|
61
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
62
|
+
id?: string | undefined;
|
|
63
|
+
text?: string | undefined;
|
|
64
|
+
filters?: import("@sinequa/atomic").LegacyFilter[] | undefined;
|
|
65
|
+
name?: string | undefined;
|
|
66
|
+
action?: ("" | "search" | "open" | "aggregate") | undefined;
|
|
67
|
+
select?: import("@sinequa/atomic").Select[] | undefined;
|
|
68
|
+
open?: import("@sinequa/atomic").Open[] | undefined;
|
|
69
|
+
page?: number | undefined;
|
|
70
|
+
pageSize?: number | undefined;
|
|
71
|
+
tab?: string | undefined;
|
|
72
|
+
scope?: string | undefined;
|
|
73
|
+
sort?: string | undefined;
|
|
74
|
+
basket?: string | undefined;
|
|
75
|
+
isFirstPage?: boolean | undefined;
|
|
76
|
+
strictRefine?: boolean | undefined;
|
|
77
|
+
globalRelevance?: number | undefined;
|
|
78
|
+
questionLanguage?: string | undefined;
|
|
79
|
+
questionDefaultLanguage?: string | undefined;
|
|
80
|
+
spellingCorrectionMode?: import("@sinequa/atomic").SpellingCorrectionMode | undefined;
|
|
81
|
+
spellingCorrectionFilter?: string | undefined;
|
|
82
|
+
documentWeight?: string | undefined;
|
|
83
|
+
textPartWeights?: string | undefined;
|
|
84
|
+
relevanceTransforms?: string | undefined;
|
|
85
|
+
removeDuplicates?: boolean | undefined;
|
|
86
|
+
queryId?: string | undefined;
|
|
87
|
+
aggregations?: (Record<string, import("@sinequa/atomic").AggregationOptions> | string[]) | undefined;
|
|
88
|
+
orderBy?: string | undefined;
|
|
89
|
+
groupBy?: string | undefined;
|
|
90
|
+
neuralSearch?: boolean | undefined;
|
|
91
|
+
path?: string | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
protected readonly userSettingsStore: {
|
|
94
|
+
bookmarks: import("@angular/core").Signal<import("@sinequa/atomic-angular").Bookmark[]>;
|
|
95
|
+
recentSearches: import("@angular/core").Signal<import("@sinequa/atomic-angular").RecentSearch[]>;
|
|
96
|
+
savedSearches: import("@angular/core").Signal<import("@sinequa/atomic-angular").SavedSearch[]>;
|
|
97
|
+
assistants: import("@angular/core").Signal<Record<string, unknown>>;
|
|
98
|
+
language?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
99
|
+
initialize: () => Promise<void>;
|
|
100
|
+
reset: () => Promise<void>;
|
|
101
|
+
updateBookmarks: (bookmarks: import("@sinequa/atomic-angular").UserSettings["bookmarks"], auditEvents?: AuditEvents) => Promise<void>;
|
|
102
|
+
bookmark: (article: Article, queryName?: string) => Promise<void>;
|
|
103
|
+
unbookmark: (id: string) => Promise<void>;
|
|
104
|
+
isBookmarked: (article: Partial<Article>) => boolean;
|
|
105
|
+
toggleBookmark: (article: Article) => Promise<void>;
|
|
106
|
+
deleteRecentSearch: (index: number) => Promise<void>;
|
|
107
|
+
updateRecentSearches: (recentSearches: import("@sinequa/atomic-angular").UserSettings["recentSearches"], auditEvents?: AuditEvents) => Promise<void>;
|
|
108
|
+
addCurrentSearch: (queryParams: import("@sinequa/atomic").QueryParams) => Promise<void>;
|
|
109
|
+
deleteSavedSearch: (index: number) => Promise<void>;
|
|
110
|
+
updateSavedSearches: (savedSearches: import("@sinequa/atomic-angular").UserSettings["savedSearches"]) => Promise<void>;
|
|
111
|
+
updateAssistantSettings: (assistantSettings: import("@sinequa/atomic-angular").UserSettings["assistants"]) => Promise<void>;
|
|
112
|
+
updateLanguage: (language: import("@sinequa/atomic-angular").UserSettings["language"], auditEvents?: AuditEvents) => Promise<void>;
|
|
113
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
114
|
+
bookmarks: import("@sinequa/atomic-angular").Bookmark[];
|
|
115
|
+
recentSearches: import("@sinequa/atomic-angular").RecentSearch[];
|
|
116
|
+
savedSearches: import("@sinequa/atomic-angular").SavedSearch[];
|
|
117
|
+
assistants: Record<string, unknown>;
|
|
118
|
+
language?: string | undefined;
|
|
119
|
+
}>;
|
|
120
|
+
protected readonly injector: Injector;
|
|
121
|
+
/**
|
|
122
|
+
* Executes a search operation with the given commands and options.
|
|
123
|
+
*
|
|
124
|
+
* @param commands - An array of strings representing the search commands.
|
|
125
|
+
* @param options - An optional object containing search options.
|
|
126
|
+
* @param options.appendFilters - A boolean indicating whether to append existing filters to the search query. Defaults to true.
|
|
127
|
+
* @param options.audit - An optional audit trail object to be stored in the navigation state.
|
|
128
|
+
*
|
|
129
|
+
* The method constructs query parameters based on the current state and the provided options,
|
|
130
|
+
* then navigates to the specified commands with the constructed query parameters and audit trail.
|
|
131
|
+
*/
|
|
132
|
+
search(commands: string[], options?: SearchOptions): void;
|
|
133
|
+
/**
|
|
134
|
+
* Retrieves the search result based on the provided query.
|
|
135
|
+
*
|
|
136
|
+
* @param q - A partial query object containing search parameters.
|
|
137
|
+
* @returns An Observable of the search result.
|
|
138
|
+
*
|
|
139
|
+
* This method performs the following actions:
|
|
140
|
+
* - Creates an audit event with the type "Search_Text" and the query text.
|
|
141
|
+
* - Resets the audit property to undefined.
|
|
142
|
+
* - Calls the search method of the queryService with the query, a flag to include the query name in records, and the audit event.
|
|
143
|
+
* - Handles any errors by returning an empty Result object.
|
|
144
|
+
* - Maps the search result to the service's result property.
|
|
145
|
+
*/
|
|
146
|
+
getResult(q: Partial<Query>): Observable<Result>;
|
|
147
|
+
/**
|
|
148
|
+
* Navigates to the specified page and returns the search result.
|
|
149
|
+
* @param page - The page number to navigate to.
|
|
150
|
+
* @returns A promise that resolves to the search result.
|
|
151
|
+
*/
|
|
152
|
+
gotoPage(page: number): void;
|
|
153
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchService, never>;
|
|
154
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SearchService>;
|
|
155
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Article } from '@sinequa/atomic';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export type SelectionHistoryEvent = 'back' | 'new';
|
|
5
|
+
export declare class SelectionHistoryService {
|
|
6
|
+
readonly selectionHistoryEvent: EventEmitter<SelectionHistoryEvent>;
|
|
7
|
+
private readonly selectionService;
|
|
8
|
+
private readonly selectionStore;
|
|
9
|
+
private readonly history;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves the index of the current selection.
|
|
13
|
+
*
|
|
14
|
+
* @returns {number} The index of the current selection, which is the last element in the history array.
|
|
15
|
+
*/
|
|
16
|
+
getCurrentSelectionIndex(): number;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves an article from the selection history at the specified index.
|
|
19
|
+
*
|
|
20
|
+
* @param index - The index of the article to retrieve.
|
|
21
|
+
* @returns The article at the specified index, or `undefined` if the index is out of bounds.
|
|
22
|
+
*/
|
|
23
|
+
getSelection(index: number): Article | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves the length of the history array.
|
|
26
|
+
*
|
|
27
|
+
* @returns {number} The number of entries in the history.
|
|
28
|
+
*/
|
|
29
|
+
getHistoryLength(): number;
|
|
30
|
+
/**
|
|
31
|
+
* Clears the selection history and resets the current article selection.
|
|
32
|
+
*
|
|
33
|
+
* This method performs the following actions:
|
|
34
|
+
* - Empties the history array.
|
|
35
|
+
* - Calls the `clearCurrentArticle` method on the `selectionService` to reset the current article selection.
|
|
36
|
+
*/
|
|
37
|
+
clearHistory(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Navigates back in the selection history.
|
|
40
|
+
*
|
|
41
|
+
* Removes the most recent entry from the history. If the history is empty after this operation,
|
|
42
|
+
* it returns `undefined`. Otherwise, it sets the current article to the last entry in the history,
|
|
43
|
+
* triggers a 'back' event, and returns the last entry.
|
|
44
|
+
*
|
|
45
|
+
* @returns {Article | undefined} The last article in the history, or `undefined` if the history is empty.
|
|
46
|
+
*/
|
|
47
|
+
back(): Article | undefined;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionHistoryService, never>;
|
|
49
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SelectionHistoryService>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Article } from '@sinequa/atomic';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SelectionService {
|
|
4
|
+
private readonly route;
|
|
5
|
+
private readonly router;
|
|
6
|
+
private readonly location;
|
|
7
|
+
private readonly selectionStore;
|
|
8
|
+
queryParamsStore: {
|
|
9
|
+
id?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
10
|
+
text?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
11
|
+
filters?: import("@angular/core").Signal<import("@sinequa/atomic").LegacyFilter[] | undefined> | undefined;
|
|
12
|
+
name?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
13
|
+
action?: import("@angular/core").Signal<"" | "open" | "search" | "aggregate" | undefined> | undefined;
|
|
14
|
+
select?: import("@angular/core").Signal<import("@sinequa/atomic").Select[] | undefined> | undefined;
|
|
15
|
+
open?: import("@angular/core").Signal<import("@sinequa/atomic").Open[] | undefined> | undefined;
|
|
16
|
+
page?: import("@angular/core").Signal<number | undefined> | undefined;
|
|
17
|
+
pageSize?: import("@angular/core").Signal<number | undefined> | undefined;
|
|
18
|
+
tab?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
19
|
+
scope?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
20
|
+
sort?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
21
|
+
basket?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
22
|
+
isFirstPage?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
23
|
+
strictRefine?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
24
|
+
globalRelevance?: import("@angular/core").Signal<number | undefined> | undefined;
|
|
25
|
+
questionLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
26
|
+
questionDefaultLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
27
|
+
spellingCorrectionMode?: import("@angular/core").Signal<import("@sinequa/atomic").SpellingCorrectionMode | undefined> | undefined;
|
|
28
|
+
spellingCorrectionFilter?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
29
|
+
documentWeight?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
30
|
+
textPartWeights?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
31
|
+
relevanceTransforms?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
32
|
+
removeDuplicates?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
33
|
+
queryId?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
34
|
+
aggregations?: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").AggregationOptions> | string[] | undefined> | undefined;
|
|
35
|
+
orderBy?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
36
|
+
groupBy?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
37
|
+
neuralSearch?: import("@angular/core").Signal<boolean | undefined> | undefined;
|
|
38
|
+
path?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
39
|
+
setFromUrl: (url: string) => void;
|
|
40
|
+
addFilter: (filter: import("@sinequa/atomic").LegacyFilter) => void;
|
|
41
|
+
updateFilter: (filter: import("@sinequa/atomic").LegacyFilter) => void;
|
|
42
|
+
removeFilter: (field?: string) => void;
|
|
43
|
+
removeFilterByName: (name?: string) => void;
|
|
44
|
+
clearFilters: () => void;
|
|
45
|
+
patch: (params: Partial<Partial<Omit<import("@sinequa/atomic").Query, "filters">> & {
|
|
46
|
+
path?: string;
|
|
47
|
+
filters?: import("@sinequa/atomic").LegacyFilter[];
|
|
48
|
+
id?: string;
|
|
49
|
+
}>) => void;
|
|
50
|
+
getFilter: (fieldOrName?: string) => Partial<import("@sinequa/atomic").LegacyFilter & {
|
|
51
|
+
count: number;
|
|
52
|
+
}> | null;
|
|
53
|
+
getQuery: () => import("@sinequa/atomic").Query;
|
|
54
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
55
|
+
id?: string | undefined;
|
|
56
|
+
text?: string | undefined;
|
|
57
|
+
filters?: import("@sinequa/atomic").LegacyFilter[] | undefined;
|
|
58
|
+
name?: string | undefined;
|
|
59
|
+
action?: ("" | "search" | "open" | "aggregate") | undefined;
|
|
60
|
+
select?: import("@sinequa/atomic").Select[] | undefined;
|
|
61
|
+
open?: import("@sinequa/atomic").Open[] | undefined;
|
|
62
|
+
page?: number | undefined;
|
|
63
|
+
pageSize?: number | undefined;
|
|
64
|
+
tab?: string | undefined;
|
|
65
|
+
scope?: string | undefined;
|
|
66
|
+
sort?: string | undefined;
|
|
67
|
+
basket?: string | undefined;
|
|
68
|
+
isFirstPage?: boolean | undefined;
|
|
69
|
+
strictRefine?: boolean | undefined;
|
|
70
|
+
globalRelevance?: number | undefined;
|
|
71
|
+
questionLanguage?: string | undefined;
|
|
72
|
+
questionDefaultLanguage?: string | undefined;
|
|
73
|
+
spellingCorrectionMode?: import("@sinequa/atomic").SpellingCorrectionMode | undefined;
|
|
74
|
+
spellingCorrectionFilter?: string | undefined;
|
|
75
|
+
documentWeight?: string | undefined;
|
|
76
|
+
textPartWeights?: string | undefined;
|
|
77
|
+
relevanceTransforms?: string | undefined;
|
|
78
|
+
removeDuplicates?: boolean | undefined;
|
|
79
|
+
queryId?: string | undefined;
|
|
80
|
+
aggregations?: (Record<string, import("@sinequa/atomic").AggregationOptions> | string[]) | undefined;
|
|
81
|
+
orderBy?: string | undefined;
|
|
82
|
+
groupBy?: string | undefined;
|
|
83
|
+
neuralSearch?: boolean | undefined;
|
|
84
|
+
path?: string | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
/**
|
|
87
|
+
* Sets the current article in the selection store and optionally updates the query text.
|
|
88
|
+
* If the provided article is undefined, it clears the current article.
|
|
89
|
+
*
|
|
90
|
+
* @param article - The article to set as the current article. If undefined, the current article is cleared.
|
|
91
|
+
* @param withQueryText - A boolean indicating whether to update the query text in the selection store. Defaults to true.
|
|
92
|
+
*
|
|
93
|
+
* @returns void
|
|
94
|
+
*/
|
|
95
|
+
setCurrentArticle(article?: Article, withQueryText?: boolean): void;
|
|
96
|
+
/**
|
|
97
|
+
* Clears the current article selection from the selection store and
|
|
98
|
+
* removes the article ID from the query parameters.
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
* This method performs two main actions:
|
|
102
|
+
* 1. Clears the current selection from the `selectionStore`.
|
|
103
|
+
* 2. Removes the article ID from the query parameters to ensure
|
|
104
|
+
* the URL does not reference the cleared article.
|
|
105
|
+
*
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
clearCurrentArticle(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Updates the article ID in the query parameters of the current route.
|
|
111
|
+
* If the provided ID is undefined, it will remove the ID from the query parameters.
|
|
112
|
+
*
|
|
113
|
+
* @param id - The article ID to be set in the query parameters. If undefined, the ID will be removed.
|
|
114
|
+
*/
|
|
115
|
+
private updateArticleIdInQueryParams;
|
|
116
|
+
/**
|
|
117
|
+
* Clears the 'id' parameter from the current route's query parameters.
|
|
118
|
+
*
|
|
119
|
+
* This method creates a copy of the current query parameters, removes the 'id' parameter,
|
|
120
|
+
* and then updates the browser's URL to reflect the change without reloading the page.
|
|
121
|
+
*
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
124
|
+
private clearArticleIdFromQueryParams;
|
|
125
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionService, never>;
|
|
126
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SelectionService>;
|
|
127
|
+
}
|