@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,187 +0,0 @@
1
- import { LegacyFilter, Query, SpellingCorrectionMode } from '@sinequa/atomic';
2
- type QueryParamsState = Partial<Omit<Query, "filters">> & {
3
- path?: string;
4
- filters?: LegacyFilter[];
5
- id?: string;
6
- };
7
- export declare const QueryParamsStore: import("@angular/core").Type<{
8
- id?: import("@angular/core").Signal<string | undefined> | undefined;
9
- text?: import("@angular/core").Signal<string | undefined> | undefined;
10
- filters?: import("@angular/core").Signal<LegacyFilter[] | undefined> | undefined;
11
- name?: import("@angular/core").Signal<string | undefined> | undefined;
12
- action?: import("@angular/core").Signal<"" | "open" | "search" | "aggregate" | undefined> | undefined;
13
- select?: import("@angular/core").Signal<import("@sinequa/atomic").Select[] | undefined> | undefined;
14
- open?: import("@angular/core").Signal<import("@sinequa/atomic").Open[] | undefined> | undefined;
15
- page?: import("@angular/core").Signal<number | undefined> | undefined;
16
- pageSize?: import("@angular/core").Signal<number | undefined> | undefined;
17
- tab?: import("@angular/core").Signal<string | undefined> | undefined;
18
- scope?: import("@angular/core").Signal<string | undefined> | undefined;
19
- sort?: import("@angular/core").Signal<string | undefined> | undefined;
20
- basket?: import("@angular/core").Signal<string | undefined> | undefined;
21
- isFirstPage?: import("@angular/core").Signal<boolean | undefined> | undefined;
22
- strictRefine?: import("@angular/core").Signal<boolean | undefined> | undefined;
23
- globalRelevance?: import("@angular/core").Signal<number | undefined> | undefined;
24
- questionLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
25
- questionDefaultLanguage?: import("@angular/core").Signal<string | undefined> | undefined;
26
- spellingCorrectionMode?: import("@angular/core").Signal<SpellingCorrectionMode | undefined> | undefined;
27
- spellingCorrectionFilter?: import("@angular/core").Signal<string | undefined> | undefined;
28
- documentWeight?: import("@angular/core").Signal<string | undefined> | undefined;
29
- textPartWeights?: import("@angular/core").Signal<string | undefined> | undefined;
30
- relevanceTransforms?: import("@angular/core").Signal<string | undefined> | undefined;
31
- removeDuplicates?: import("@angular/core").Signal<boolean | undefined> | undefined;
32
- queryId?: import("@angular/core").Signal<string | undefined> | undefined;
33
- aggregations?: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").AggregationOptions> | string[] | undefined> | undefined;
34
- orderBy?: import("@angular/core").Signal<string | undefined> | undefined;
35
- groupBy?: import("@angular/core").Signal<string | undefined> | undefined;
36
- neuralSearch?: import("@angular/core").Signal<boolean | undefined> | undefined;
37
- path?: import("@angular/core").Signal<string | undefined> | undefined;
38
- setFromUrl: (url: string) => void;
39
- addFilter: (filter: LegacyFilter) => void;
40
- updateFilter: (filter: LegacyFilter) => void;
41
- removeFilter: (field?: string) => void;
42
- removeFilterByName: (name?: string) => void;
43
- clearFilters: () => void;
44
- patch: (params: Partial<QueryParamsState>) => void;
45
- getFilter: (fieldOrName?: string) => Partial<LegacyFilter & {
46
- count: number;
47
- }> | null;
48
- getQuery: () => Query;
49
- } & import("@ngrx/signals").StateSignal<{
50
- id?: string | undefined;
51
- text?: string | undefined;
52
- filters?: LegacyFilter[] | undefined;
53
- name?: string | undefined;
54
- action?: ("" | "search" | "open" | "aggregate") | undefined;
55
- select?: import("@sinequa/atomic").Select[] | undefined;
56
- open?: import("@sinequa/atomic").Open[] | undefined;
57
- page?: number | undefined;
58
- pageSize?: number | undefined;
59
- tab?: string | undefined;
60
- scope?: string | undefined;
61
- sort?: string | undefined;
62
- basket?: string | undefined;
63
- isFirstPage?: boolean | undefined;
64
- strictRefine?: boolean | undefined;
65
- globalRelevance?: number | undefined;
66
- questionLanguage?: string | undefined;
67
- questionDefaultLanguage?: string | undefined;
68
- spellingCorrectionMode?: SpellingCorrectionMode | undefined;
69
- spellingCorrectionFilter?: string | undefined;
70
- documentWeight?: string | undefined;
71
- textPartWeights?: string | undefined;
72
- relevanceTransforms?: string | undefined;
73
- removeDuplicates?: boolean | undefined;
74
- queryId?: string | undefined;
75
- aggregations?: (Record<string, import("@sinequa/atomic").AggregationOptions> | string[]) | undefined;
76
- orderBy?: string | undefined;
77
- groupBy?: string | undefined;
78
- neuralSearch?: boolean | undefined;
79
- path?: string | undefined;
80
- }>>;
81
- export declare function withQueryParamsFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
82
- state: Omit<Partial<Omit<Query, "filters">> & {
83
- path?: string;
84
- filters?: LegacyFilter[];
85
- id?: string;
86
- }, "setFromUrl" | "addFilter" | "updateFilter" | "removeFilter" | "removeFilterByName" | "clearFilters" | "patch" | "getFilter" | "getQuery">;
87
- signals: Omit<{}, "setFromUrl" | "addFilter" | "updateFilter" | "removeFilter" | "removeFilterByName" | "clearFilters" | "patch" | "getFilter" | "getQuery">;
88
- methods: Omit<{}, "setFromUrl" | "addFilter" | "updateFilter" | "removeFilter" | "removeFilterByName" | "clearFilters" | "patch" | "getFilter" | "getQuery">;
89
- } & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
90
- methods: {
91
- /**
92
- * Sets the state from the given URL by extracting query parameters and updating the store.
93
- *
94
- * @param url - The URL containing query parameters to set the state from.
95
- *
96
- * The function performs the following steps:
97
- * 1. Extracts the path from the URL.
98
- * 2. Parses the query parameters from the URL.
99
- * 3. Decodes and parses the filters from the query parameters.
100
- * 4. Converts the page parameter to a number if it exists.
101
- * 5. Updates the store state with the extracted and parsed values.
102
- */
103
- setFromUrl(url: string): void;
104
- /**
105
- * Adds a filter to the store's state.
106
- *
107
- * @param filter - The filter to be added to the state.
108
- *
109
- * The function calls the `updateFilter` method to add the filter to the state.
110
- */
111
- addFilter(filter: LegacyFilter): void;
112
- /**
113
- * Updates the filter in the store's state.
114
- *
115
- * @param filter - The filter to be updated. If the filter is `undefined`, the state remains unchanged.
116
- *
117
- * The function performs the following operations:
118
- * - Adds the filter to the state if it doesn't already exist and has values.
119
- * - Removes the filter if the 'between' operator is selected but no values are provided.
120
- * - Removes the filter if no values are selected and the operator is not 'between'.
121
- * - Updates the filter values if the filter already exists.
122
- *
123
- * @remarks
124
- * - If the filter is `undefined`, the state remains unchanged.
125
- * - If the filter's operator is 'between' and both `start` and `end` are `undefined`, the filter is removed.
126
- * - If the filter's operator is not 'between' and `filters`, `value`, and `values` are all `undefined`, the filter is removed.
127
- * - If the filter already exists, its values are updated.
128
- */
129
- updateFilter(filter: LegacyFilter): void;
130
- /**
131
- * Removes a filter from the store based on the specified field.
132
- *
133
- * @param field - The field of the filter to be removed.
134
- */
135
- removeFilter(field?: string): void;
136
- /**
137
- * Removes a filter from the state by its name.
138
- *
139
- * @param name - The name of the filter to be removed.
140
- */
141
- removeFilterByName(name?: string): void;
142
- /**
143
- * Clears all filters from the state.
144
- *
145
- * This method updates the state by setting the `filters` property to an empty array.
146
- * It uses the `patchState` function to apply the state change.
147
- */
148
- clearFilters(): void;
149
- /**
150
- * Updates the current state with the provided query parameters.
151
- *
152
- * @param params - A partial object containing the query parameters to be updated.
153
- */
154
- patch(params: Partial<QueryParamsState>): void;
155
- /**
156
- * Retrieves a filter object based on the provided field or name.
157
- *
158
- * @param {string} fieldOrName - The field or name to search for in the filters.
159
- * @returns {Partial<LegacyFilter & {count: number}> | null} - The filter object with an additional count property, or null if not found.
160
- *
161
- * The method performs the following steps:
162
- * 1. Checks if the `fieldOrName` parameter is provided. If not, returns null.
163
- * 2. Searches for a filter with a matching field in the store's filters.
164
- * 3. If no filter is found by field, searches for a filter with a matching name.
165
- * 4. If a filter is found and has a `value` property, returns the filter with a count of 1.
166
- * 5. If a filter is found and does not have an array of filters, returns the filter with a count of 1.
167
- * 6. If a filter is found and has a `values` property, returns the filter with the count set to the length of the `values` array.
168
- * 7. If a filter is found and has an array of filters, returns the filter with the count set to the length of the `filters` array.
169
- * 8. If none of the above conditions are met, returns the filter with a count of 0.
170
- */
171
- getFilter(fieldOrName?: string): Partial<LegacyFilter & {
172
- count: number;
173
- }> | null;
174
- /**
175
- * Constructs and returns a query object based on the current state of the store.
176
- *
177
- * This method retrieves various parameters from the store's state, such as filters, sort order, tab, query text, query name, and spelling correction mode.
178
- * It processes the filters to separate out "concepts" filters and incorporates them into the query text.
179
- * The remaining filters are combined appropriately.
180
- * Finally, it builds and returns the query object using the processed parameters.
181
- *
182
- * @returns Query The constructed query object.
183
- */
184
- getQuery(): Query;
185
- };
186
- }>;
187
- export {};
@@ -1,62 +0,0 @@
1
- import { Article, CustomHighlights } from "@sinequa/atomic";
2
- export type PreviewHighlights = {
3
- highlights: CustomHighlights[];
4
- snippetId?: number;
5
- };
6
- type SelectionState = {
7
- article: Article;
8
- id: string;
9
- queryText: string;
10
- previewHighlights: PreviewHighlights;
11
- };
12
- /**
13
- * @constant
14
- * @name SelectionStore
15
- * @description
16
- * A store that manages the selection state of articles. It is provided in the root of the application and includes
17
- * development tools for easier debugging. The store maintains the state with the following properties:
18
- * - `article`: The selected article.
19
- * - `id`: The ID of the selected article.
20
- * - `queryText`: The query text associated with the selection.
21
- *
22
- * @methods
23
- * - `update(article: Article, queryText?: string)`: Updates the store with a new article and optional query text.
24
- * - `updateQueryText(queryText: string)`: Updates the query text in the store.
25
- * - `clear()`: Clears the selection state, setting `article`, `id`, and `queryText` to `undefined`.
26
- */
27
- export declare const SelectionStore: import("@angular/core").Type<{
28
- article: import("@ngrx/signals/src/deep-signal").DeepSignal<Article>;
29
- id: import("@angular/core").Signal<string>;
30
- queryText: import("@angular/core").Signal<string>;
31
- previewHighlights: import("@ngrx/signals/src/deep-signal").DeepSignal<PreviewHighlights>;
32
- update: (newState: Partial<SelectionState>) => void;
33
- clear: () => void;
34
- } & import("@ngrx/signals").StateSignal<{
35
- article: Article;
36
- id: string;
37
- queryText: string;
38
- previewHighlights: PreviewHighlights;
39
- }>>;
40
- export declare function withSelectionFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
41
- state: Omit<SelectionState, "update" | "clear">;
42
- signals: Omit<{}, "update" | "clear">;
43
- methods: Omit<{}, "update" | "clear">;
44
- } & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
45
- methods: {
46
- /**
47
- * Updates the state with the provided article and optional query text.
48
- *
49
- * @param article - The article object to update the state with.
50
- * @param queryText - Optional query text to update the state with.
51
- */
52
- update(newState: Partial<SelectionState>): void;
53
- /**
54
- * Clears the current selection state by setting the `article`, `id`, and `queryText` properties to `undefined`.
55
- *
56
- * @remarks
57
- * This method uses the `patchState` function to update the state of the store.
58
- */
59
- clear(): void;
60
- };
61
- }>;
62
- export {};
@@ -1,55 +0,0 @@
1
- export type CssVars = {
2
- light?: Record<string, string>;
3
- dark?: Record<string, string>;
4
- };
5
- export type ThemeScope = {
6
- [key: string]: {
7
- cssVars: CssVars;
8
- darkMode?: boolean;
9
- themeName: string;
10
- };
11
- };
12
- export type ThemeStoreState = {
13
- scopes: ThemeScope;
14
- };
15
- export declare const ThemeStore: import("@angular/core").Type<{
16
- scopes: import("@angular/core").Signal<ThemeScope>;
17
- loadDefaultTheme: (scope: string, darkMode?: boolean) => void;
18
- setCurrentTheme: (scope: string, themeName: string, darkMode?: boolean) => void;
19
- setDarkMode: (scope: string, darkMode: boolean) => void;
20
- } & import("@ngrx/signals").StateSignal<{
21
- scopes: ThemeScope;
22
- }>>;
23
- /**
24
- * Processes the CSS variables for a given theme name.
25
- *
26
- * @param themeName - The name of the theme to process.
27
- * @returns An object containing the CSS variables for both light and dark themes.
28
- * @throws Will throw an error if the theme with the specified name is not found.
29
- */
30
- export declare function processCssVars(themeName: string): CssVars;
31
- /**
32
- * Converts an object of theme colors to CSS variables.
33
- *
34
- * @param colors - An object where keys are theme color names and values are the corresponding color values.
35
- * @returns An object where keys are CSS variable names and values are the corresponding color values.
36
- */
37
- export declare function themeColorsToCssVariables(colors: any): any;
38
- /**
39
- * Converts a camelCase theme color name to a CSS variable format.
40
- *
41
- * This function takes a camelCase string and transforms it into a CSS variable
42
- * name by inserting hyphens between lowercase and uppercase letters and converting
43
- * the entire string to lowercase.
44
- *
45
- * @param name - The camelCase theme color name to be converted.
46
- * @returns The corresponding CSS variable name in kebab-case.
47
- */
48
- export declare function themeColorNameToCssVariable(name: string): string;
49
- /**
50
- * Applies a set of CSS variables to a given HTML element.
51
- *
52
- * @param element - The HTML element to which the CSS variables will be applied.
53
- * @param cssVars - An optional record of CSS variable names and their corresponding values.
54
- */
55
- export declare function applyThemeToNativeElement(element: HTMLElement, cssVars?: Record<string, string>): void;
@@ -1,161 +0,0 @@
1
- import { Article, AuditEvents, QueryParams } from '@sinequa/atomic';
2
- import { RecentSearch, UserSettings } from '../models/user-settings';
3
- export declare const UserSettingsStore: import("@angular/core").Type<{
4
- bookmarks: import("@angular/core").Signal<import("../models/user-settings").Bookmark[]>;
5
- recentSearches: import("@angular/core").Signal<RecentSearch[]>;
6
- savedSearches: import("@angular/core").Signal<import("../models/user-settings").SavedSearch[]>;
7
- assistants: import("@angular/core").Signal<Record<string, unknown>>;
8
- language?: import("@angular/core").Signal<string | undefined> | undefined;
9
- initialize: () => Promise<void>;
10
- reset: () => Promise<void>;
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
- updateAssistantSettings: (assistantSettings: UserSettings["assistants"]) => Promise<void>;
22
- updateLanguage: (language: UserSettings["language"], auditEvents?: AuditEvents) => Promise<void>;
23
- } & import("@ngrx/signals").StateSignal<{
24
- bookmarks: import("../models/user-settings").Bookmark[];
25
- recentSearches: RecentSearch[];
26
- savedSearches: import("../models/user-settings").SavedSearch[];
27
- assistants: Record<string, unknown>;
28
- language?: string | undefined;
29
- }>>;
30
- export declare function withUserSettingsFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
31
- state: Omit<UserSettings, "initialize" | "reset">;
32
- signals: Omit<{}, "initialize" | "reset">;
33
- methods: Omit<{}, "initialize" | "reset">;
34
- } & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
35
- methods: {
36
- /**
37
- * Initializes the user settings store by fetching the user settings from the backend API
38
- * and patching the store with the retrieved settings.
39
- *
40
- * @returns {Promise<void>} A promise that resolves when the initialization is complete.
41
- */
42
- initialize(): Promise<void>;
43
- /**
44
- * Resets the user settings to the initial state.
45
- *
46
- * This method performs the following actions:
47
- * 1. Deletes the current user settings.
48
- * 2. Patches the state with the initial state.
49
- *
50
- * @returns {Promise<void>} A promise that resolves when the reset operation is complete.
51
- */
52
- reset(): Promise<void>;
53
- };
54
- }>;
55
- export declare function withBookmarkFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
56
- state: Omit<UserSettings, "updateBookmarks" | "bookmark" | "unbookmark" | "isBookmarked" | "toggleBookmark">;
57
- signals: Omit<{}, "updateBookmarks" | "bookmark" | "unbookmark" | "isBookmarked" | "toggleBookmark">;
58
- methods: Omit<{}, "updateBookmarks" | "bookmark" | "unbookmark" | "isBookmarked" | "toggleBookmark">;
59
- } & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
60
- methods: {
61
- /**
62
- * Updates the user's bookmarks in the store and optionally logs audit events.
63
- *
64
- * @param bookmarks - An array of bookmarks to update in the user settings.
65
- * @param auditEvents - Optional audit events to log during the update.
66
- * @returns A promise that resolves when the update is complete.
67
- */
68
- updateBookmarks(bookmarks: UserSettings["bookmarks"], auditEvents?: AuditEvents): Promise<void>;
69
- /**
70
- * Adds an article to the bookmarks if it is not already bookmarked.
71
- *
72
- * @param article - The article to be bookmarked.
73
- * @param queryName - Optional name of the query associated with the bookmark.
74
- * @returns A promise that resolves when the bookmark has been added.
75
- */
76
- bookmark(article: Article, queryName?: string): Promise<void>;
77
- /**
78
- * Removes a bookmark by its ID.
79
- *
80
- * @param id - The ID of the bookmark to remove.
81
- * @returns A promise that resolves when the bookmark has been removed and the bookmarks have been updated.
82
- *
83
- * @remarks
84
- * - If the provided ID is falsy, the function will return immediately.
85
- * - If the bookmark with the given ID is not found, the function will return immediately.
86
- * - The function updates the bookmarks and logs the removal action with a type of "Basket_RemoveDoc".
87
- */
88
- unbookmark(id: string): Promise<void>;
89
- /**
90
- * Checks if the given article is bookmarked.
91
- *
92
- * @param article - An optional partial article object to check.
93
- * @returns `true` if the article is bookmarked, `false` otherwise.
94
- */
95
- isBookmarked(article: Partial<Article>): boolean;
96
- /**
97
- * Toggles the bookmark status of a given article.
98
- *
99
- * This method checks if the article is currently bookmarked. If it is,
100
- * it removes the bookmark. If it is not, it adds a bookmark.
101
- *
102
- * @param article - The article to toggle the bookmark status for.
103
- * @returns A promise that resolves when the bookmark status has been toggled.
104
- */
105
- toggleBookmark(article: Article): Promise<void>;
106
- };
107
- }>;
108
- export declare function withRecentSearchFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
109
- state: Omit<UserSettings, "deleteRecentSearch" | "updateRecentSearches" | "addCurrentSearch">;
110
- signals: Omit<{}, "deleteRecentSearch" | "updateRecentSearches" | "addCurrentSearch">;
111
- methods: Omit<{}, "deleteRecentSearch" | "updateRecentSearches" | "addCurrentSearch">;
112
- } & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
113
- methods: {
114
- /**
115
- * Deletes a recent search entry from the user's recent searches list.
116
- *
117
- * @param {number} index - The index of the recent search to delete.
118
- * @returns {Promise<void>} A promise that resolves when the recent search has been deleted and the state has been updated.
119
- */
120
- deleteRecentSearch(index: number): Promise<void>;
121
- /**
122
- * Updates the recent searches in the user settings.
123
- *
124
- * @param recentSearches - An array of recent searches to be updated in the user settings.
125
- * @param auditEvents - Optional audit events to be logged during the update.
126
- * @returns A promise that resolves when the recent searches have been updated.
127
- */
128
- updateRecentSearches(recentSearches: UserSettings["recentSearches"], auditEvents?: AuditEvents): Promise<void>;
129
- /**
130
- * Adds the current search to the recent searches list.
131
- *
132
- * This method checks if a search with the same label already exists in the recent searches.
133
- * If it does, it updates the existing search with the new query parameters and date.
134
- * If it does not, it adds a new search to the recent searches list.
135
- *
136
- * @param queryParams - The parameters of the current search.
137
- * @returns A promise that resolves when the recent searches have been updated.
138
- */
139
- addCurrentSearch(queryParams: QueryParams): Promise<void>;
140
- };
141
- }>;
142
- export declare function withSavedSearchFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
143
- state: Omit<UserSettings, "deleteSavedSearch" | "updateSavedSearches">;
144
- signals: Omit<{}, "deleteSavedSearch" | "updateSavedSearches">;
145
- methods: Omit<{}, "deleteSavedSearch" | "updateSavedSearches">;
146
- } & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
147
- methods: {
148
- deleteSavedSearch(index: number): Promise<void>;
149
- updateSavedSearches(savedSearches: UserSettings["savedSearches"]): Promise<void>;
150
- };
151
- }>;
152
- export declare function withAssistantFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
153
- state: Omit<UserSettings, "updateAssistantSettings" | "updateLanguage">;
154
- signals: Omit<{}, "updateAssistantSettings" | "updateLanguage">;
155
- methods: Omit<{}, "updateAssistantSettings" | "updateLanguage">;
156
- } & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
157
- methods: {
158
- updateAssistantSettings(assistantSettings: UserSettings["assistants"]): Promise<void>;
159
- updateLanguage(language: UserSettings["language"], auditEvents?: AuditEvents): Promise<void>;
160
- };
161
- }>;
@@ -1,8 +0,0 @@
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[]>;
@@ -1 +0,0 @@
1
- export * from "./highlights";
@@ -1,25 +0,0 @@
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>;
@@ -1,7 +0,0 @@
1
- export * from './inline-worker';
2
- export * from './query';
3
- export * from './routes';
4
- export * from './tailwind-utils';
5
- export * from './theme-body-hook';
6
- export * from './theme-registry';
7
- export * from './debounced-signal';
@@ -1,11 +0,0 @@
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
- }
@@ -1,26 +0,0 @@
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;
@@ -1,16 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import { type ClassValue } from 'clsx';
2
- export declare function cn(...inputs: ClassValue[]): string;
@@ -1,6 +0,0 @@
1
- import { ApplicationRef } from "@angular/core";
2
- export type ThemeBodyHookParameters = {
3
- scope: string;
4
- theme: string;
5
- };
6
- export declare function withThemeBodyHook(app: ApplicationRef, params: ThemeBodyHookParameters | undefined): ApplicationRef;
@@ -1,3 +0,0 @@
1
- import { ApplicationRef } from "@angular/core";
2
- import { Theme } from "../resources";
3
- export declare function withThemes(app: ApplicationRef, themes: Theme[]): ApplicationRef;
@@ -1,60 +0,0 @@
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("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCWebService>>;
11
- data: import("@ngrx/signals/src/deep-signal").DeepSignal<import("@sinequa/atomic-angular").CJson>;
12
- queries: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCQuery>>;
13
- customJSONs: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJ[]>;
14
- filters: import("@angular/core").Signal<import("@sinequa/atomic-angular").CFilter[]>;
15
- sources: import("@angular/core").Signal<import("@sinequa/atomic-angular").CSources | {
16
- routes?: [];
17
- filters?: import("@sinequa/atomic-angular").CFilter[];
18
- }>;
19
- customizationJson: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJson>;
20
- update: (app: import("@sinequa/atomic").CCApp) => void;
21
- initialize: () => Promise<void>;
22
- initializeWithAppName: (appName: string) => Promise<void>;
23
- getWebServiceByType: (type: import("@sinequa/atomic").CCWebService["webServiceType"]) => import("@sinequa/atomic").CCWebService | undefined;
24
- getLabels: () => {
25
- private: string;
26
- public: string;
27
- };
28
- getQueryByName: (name: string) => import("@sinequa/atomic").CCQuery | undefined;
29
- getQueryByIndex: (index: number) => import("@sinequa/atomic").CCQuery | undefined;
30
- getDefaultQuery: () => import("@sinequa/atomic").CCQuery | undefined;
31
- allowEmptySearch: (queryName: string) => boolean;
32
- getNamedCustomizationJson: (name: string) => any | undefined;
33
- getColumnAlias: (column: string) => string;
34
- getAggregationIcon: (column: string) => string | undefined;
35
- getAggregationItemsCustomization: (column: string) => import("@sinequa/atomic-angular").CFilterItem[] | undefined;
36
- getAggregationCustomization: (column: string) => import("@sinequa/atomic-angular").CFilter | undefined;
37
- getAuthorizedFilters: (route: import("@angular/router").ActivatedRoute) => Aggregation[];
38
- } & import("@ngrx/signals").StateSignal<{
39
- webServices: Record<string, import("@sinequa/atomic").CCWebService>;
40
- data: import("@sinequa/atomic-angular").CJson;
41
- queries: Record<string, import("@sinequa/atomic").CCQuery>;
42
- customJSONs: import("@sinequa/atomic-angular").CJ[];
43
- }>;
44
- aggregationsStore: {
45
- aggregations: import("@angular/core").Signal<Aggregation[]>;
46
- update: (aggregations: Aggregation[]) => void;
47
- updateAggregation: (aggregation: Aggregation) => void;
48
- clear: () => void;
49
- getAggregation: (name: string, kind?: "column" | "name") => Aggregation | undefined;
50
- } & import("@ngrx/signals").StateSignal<{
51
- aggregations: Aggregation[];
52
- }>;
53
- protected API_URL: string;
54
- loadMore(query: Partial<Query>, aggregation: Aggregation, audit?: AuditEvents): Observable<Aggregation>;
55
- open(query: Partial<Query>, aggregation: TreeAggregation, item: TreeAggregationNode): Observable<TreeAggregation>;
56
- private findNode;
57
- private replaceInTree;
58
- static ɵfac: i0.ɵɵFactoryDeclaration<AggregationsService, never>;
59
- static ɵprov: i0.ɵɵInjectableDeclaration<AggregationsService>;
60
- }