@sinequa/atomic-angular 1.16.0 → 2.0.0

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 (80) hide show
  1. package/README.md +23 -18
  2. package/components/navbar-tabs/i18n/de.json +4 -2
  3. package/components/navbar-tabs/i18n/en.json +4 -2
  4. package/components/navbar-tabs/i18n/fr.json +5 -3
  5. package/components/preview/i18n/de.json +12 -0
  6. package/components/preview/i18n/en.json +12 -0
  7. package/components/preview/i18n/fr.json +12 -0
  8. package/components/sort-selector/i18n/de.json +1 -0
  9. package/components/sort-selector/i18n/en.json +1 -0
  10. package/components/sort-selector/i18n/fr.json +1 -0
  11. package/components/sponsored-results/i18n/de.json +3 -0
  12. package/components/sponsored-results/i18n/en.json +3 -0
  13. package/components/sponsored-results/i18n/fr.json +3 -0
  14. package/document-workspaces/i18n/de.json +6 -2
  15. package/document-workspaces/i18n/en.json +6 -2
  16. package/document-workspaces/i18n/fr.json +6 -2
  17. package/document-workspaces/i18n/ja.json +6 -2
  18. package/features/{drawer → advanced-search}/i18n/de.json +12 -1
  19. package/features/{drawer → advanced-search}/i18n/en.json +12 -1
  20. package/features/{drawer → advanced-search}/i18n/fr.json +13 -2
  21. package/features/alerts/i18n/de.json +7 -1
  22. package/features/alerts/i18n/en.json +7 -1
  23. package/features/alerts/i18n/fr.json +7 -1
  24. package/features/auth/i18n/de.json +6 -0
  25. package/features/auth/i18n/en.json +6 -0
  26. package/features/auth/i18n/fr.json +6 -1
  27. package/features/collections/i18n/de.json +4 -1
  28. package/features/collections/i18n/en.json +4 -1
  29. package/features/collections/i18n/fr.json +4 -1
  30. package/features/dialogs/i18n/de.json +11 -1
  31. package/features/dialogs/i18n/en.json +11 -1
  32. package/features/dialogs/i18n/fr.json +11 -1
  33. package/features/export/i18n/de.json +5 -1
  34. package/features/export/i18n/en.json +5 -1
  35. package/features/export/i18n/fr.json +5 -1
  36. package/features/feedback/i18n/de.json +2 -1
  37. package/features/feedback/i18n/en.json +2 -1
  38. package/features/feedback/i18n/fr.json +2 -1
  39. package/features/filters/i18n/de.json +10 -3
  40. package/features/filters/i18n/en.json +10 -3
  41. package/features/filters/i18n/fr.json +11 -4
  42. package/features/labels/i18n/de.json +5 -1
  43. package/features/labels/i18n/en.json +5 -1
  44. package/features/labels/i18n/fr.json +5 -1
  45. package/features/list-panel/i18n/de.json +4 -0
  46. package/features/list-panel/i18n/en.json +4 -0
  47. package/features/list-panel/i18n/fr.json +4 -0
  48. package/features/searches/i18n/de.json +2 -1
  49. package/features/searches/i18n/en.json +2 -1
  50. package/features/searches/i18n/fr.json +3 -2
  51. package/features/sheet/i18n/de.json +3 -0
  52. package/features/sheet/i18n/en.json +3 -0
  53. package/features/sheet/i18n/fr.json +3 -0
  54. package/features/user-profile/i18n/de.json +22 -1
  55. package/features/user-profile/i18n/en.json +22 -1
  56. package/features/user-profile/i18n/fr.json +22 -1
  57. package/fesm2022/sinequa-atomic-angular-charts-heatmap.mjs +294 -0
  58. package/fesm2022/sinequa-atomic-angular-charts-heatmap.mjs.map +1 -0
  59. package/fesm2022/sinequa-atomic-angular-charts.mjs +969 -0
  60. package/fesm2022/sinequa-atomic-angular-charts.mjs.map +1 -0
  61. package/fesm2022/sinequa-atomic-angular-document-workspaces.mjs +11188 -7846
  62. package/fesm2022/sinequa-atomic-angular-document-workspaces.mjs.map +1 -1
  63. package/fesm2022/sinequa-atomic-angular-workspace-elements.mjs +85 -152
  64. package/fesm2022/sinequa-atomic-angular-workspace-elements.mjs.map +1 -1
  65. package/fesm2022/sinequa-atomic-angular.mjs +30683 -17302
  66. package/fesm2022/sinequa-atomic-angular.mjs.map +1 -1
  67. package/package.json +60 -23
  68. package/styles/calendar.css +88 -0
  69. package/types/sinequa-atomic-angular-charts-heatmap.d.ts +154 -0
  70. package/types/sinequa-atomic-angular-charts.d.ts +462 -0
  71. package/types/sinequa-atomic-angular-document-workspaces.d.ts +2527 -0
  72. package/types/sinequa-atomic-angular-workspace-elements.d.ts +49 -0
  73. package/types/sinequa-atomic-angular.d.ts +19918 -0
  74. package/workspace-elements/styles/lexiq-workspaces.css +7310 -4010
  75. package/document-workspaces/index.d.ts +0 -2116
  76. package/elements/index.d.ts +0 -346
  77. package/fesm2022/sinequa-atomic-angular-elements.mjs +0 -7526
  78. package/fesm2022/sinequa-atomic-angular-elements.mjs.map +0 -1
  79. package/index.d.ts +0 -16119
  80. package/workspace-elements/index.d.ts +0 -37
@@ -1,346 +0,0 @@
1
- import { UpdateContainerInput, UploadJobStatus } from '@sinequa/atomic';
2
- import { EnvironmentProviders } from '@angular/core';
3
-
4
- type TooltipPlacement = "top" | "right" | "left" | "bottom";
5
- interface TooltipController {
6
- /**
7
- * Shows a tooltip on hover. `key` is a catalog key, not literal text, and is
8
- * resolved on every hover — so a tooltip attached once still follows a later
9
- * language change without re-attaching anything.
10
- */
11
- attach(el: HTMLElement, key: string, placement?: TooltipPlacement, condition?: () => boolean): void;
12
- position(trigger: HTMLElement, placement?: TooltipPlacement): void;
13
- el: HTMLSpanElement;
14
- }
15
- interface MobileSheetController {
16
- open(panelEl: HTMLElement, titleText: string, originEl?: HTMLElement | null): void;
17
- close(): void;
18
- }
19
-
20
- type ContainerRole = "creator" | "owner" | "reader";
21
- interface Collection {
22
- id: string;
23
- name: string;
24
- icon: string;
25
- desc: string;
26
- tags: string[];
27
- docs: number;
28
- creatorId: string;
29
- ownerIds: string[];
30
- readerIds: string[];
31
- currentUserRole: ContainerRole;
32
- }
33
- interface CollectionDocument {
34
- _id: string;
35
- name: string;
36
- containerId?: string;
37
- type: string;
38
- date: string;
39
- size?: string;
40
- source?: string;
41
- status?: "uploading" | "indexing" | "error" | null;
42
- uploadedBy?: string;
43
- percent?: number;
44
- jobId?: string;
45
- }
46
- declare class CollectionsStore extends EventTarget {
47
- collections: Collection[];
48
- documents: Record<string, CollectionDocument[]>;
49
- selectedIds: Set<string>;
50
- private _loaded;
51
- private _loadingPromise;
52
- private _page;
53
- private _total;
54
- private _documentsState;
55
- private _emit;
56
- getAll(): Collection[];
57
- get(id: string): Collection | null;
58
- fetchContainer(id: string): Promise<Collection>;
59
- get hasMoreCollections(): boolean;
60
- ensureLoaded(): Promise<Collection[]>;
61
- reload(): Promise<Collection[]>;
62
- load(): Promise<Collection[]>;
63
- loadMore(): Promise<Collection[]>;
64
- create({ name, desc, tags, owners, readers }: {
65
- name: string;
66
- desc?: string;
67
- tags?: string[];
68
- owners?: string[];
69
- readers?: string[];
70
- }): Promise<Collection>;
71
- update(id: string, patch: UpdateContainerInput): Promise<Collection | null>;
72
- remove(ids: string[]): Promise<{
73
- succeeded: string[];
74
- failed: {
75
- id: string;
76
- error: string;
77
- }[];
78
- }>;
79
- getDocuments(collectionId: string): CollectionDocument[];
80
- hasMoreDocuments(collectionId: string): boolean;
81
- loadDocuments(collectionId: string): Promise<CollectionDocument[]>;
82
- loadMoreDocuments(collectionId: string): Promise<CollectionDocument[]>;
83
- addDocuments(collectionId: string, docs: CollectionDocument[]): void;
84
- saveDocuments(collectionId: string, docs: CollectionDocument[]): Promise<CollectionDocument[]>;
85
- removeDocuments(collectionId: string, docIds: string[]): Promise<void>;
86
- moveDocuments(fromCollectionId: string, toCollectionId: string, docIds: string[]): Promise<void>;
87
- toggleSelected(id: string, checked: boolean): void;
88
- get selectedCount(): number;
89
- }
90
- declare const store: CollectionsStore;
91
-
92
- interface TrackerFileInput {
93
- id: string;
94
- name: string;
95
- type: string;
96
- }
97
- /**
98
- * What the tracker's connection banner is currently saying. Emitted whenever the
99
- * situation changes, and `null` once everything is healthy again.
100
- */
101
- interface ConnectionNotice {
102
- /**
103
- * - `retrying` - a transfer is waiting out `retryAtMs` before its next attempt;
104
- * - `reconnecting` - a session recovery is in flight;
105
- * - `signed-out` - recovery came back negative; nothing moves until the user
106
- * signs in again.
107
- */
108
- phase: "retrying" | "reconnecting" | "signed-out";
109
- /** Transfers held up by this. 0 when only the status poll is affected. */
110
- uploads: number;
111
- /** 1-based number of the attempt about to be made, and the budget it comes from. */
112
- attempt: number;
113
- maxAttempts: number;
114
- /** Epoch ms of the next attempt - the countdown's target (`retrying` only). */
115
- retryAtMs?: number;
116
- /** Epoch ms at which the retry budget runs out (`retrying` only). */
117
- budgetEndsAtMs?: number;
118
- /** Epoch ms the connection was first reported lost - drives "lost N ago". */
119
- sinceMs: number;
120
- /**
121
- * Re-runs the recovery, for the banner's Retry button. Carried on the payload
122
- * rather than published as another controller method because it is the one
123
- * thing the banner can DO, and it is meaningless without the notice it belongs
124
- * to. Absent when there is nothing useful to retry.
125
- */
126
- retry?(): void;
127
- }
128
- interface UploadTrackerController {
129
- addFiles(trackerDocs: TrackerFileInput[], colId: string, colName: string): void;
130
- onProgress(docId: string, pct: number): void;
131
- onIndexing(docId: string): void;
132
- onComplete(docId: string): void;
133
- onError(docId: string): void;
134
- /**
135
- * Feeds in the job-level half of the status API: per-file error messages and
136
- * rejections, which only `GET .../document-upload/status` reports.
137
- *
138
- * Optional on purpose - this interface is published from index.ts and driven
139
- * by hand by the demo app's /document-upload tester, so a required method
140
- * would be a breaking change for it. Returns whether anything actually
141
- * changed, which paces the poller; `void` is accepted so an implementation
142
- * that does not care still satisfies the type.
143
- */
144
- onJobUpdate?(jobs: UploadJobStatus[]): boolean | void;
145
- /**
146
- * Drives the connection banner. `null` clears it.
147
- *
148
- * Optional for the same reason as `onJobUpdate` - this interface is published
149
- * from index.ts and driven by hand by the demo app's /document-upload tester.
150
- */
151
- onConnectionChange?(notice: ConnectionNotice | null): void;
152
- }
153
-
154
- interface CollectionsHost extends HTMLElement {
155
- readonly shadowRoot: ShadowRoot;
156
- _pickerContainer: HTMLDivElement;
157
- _tooltip: TooltipController;
158
- _colCurrentView: "grid" | "list";
159
- _colGridBuilt: boolean;
160
- _colListBuilt: boolean;
161
- _showList(): Promise<void>;
162
- _hideList(): void;
163
- _refreshList?(): Promise<void>;
164
- _buildCollectionCard(col: Collection): HTMLElement;
165
- _updateColTabCounts(): void;
166
- _applyColFilters?(): void;
167
- _exitColSelection(): void;
168
- _updateColSelCount(): void;
169
- _closeColDeleteModal(): void;
170
- _currentCol: Collection | null;
171
- _currentDocs: CollectionDocument[];
172
- _cdvCurrentView: "grid" | "list";
173
- _cdvListBuilt: boolean;
174
- _openColDetail(col: Collection): void;
175
- _closeColDetail(): void;
176
- _refreshCdvEmpty(): void;
177
- _buildDocCard(doc: CollectionDocument): HTMLElement;
178
- _buildDocListView(docs: CollectionDocument[]): void;
179
- _resetDetailSearch?(): void;
180
- _exitDocSelection(): void;
181
- openAddCollectionModal?(): void;
182
- _openRefDocPreview(docRef: RefDocument): void;
183
- _closeColDocPreview(): void;
184
- _syncColDocPreviewView(): void;
185
- _uploadTracker: UploadTrackerController;
186
- _startUploadPolling?(): void;
187
- _stopUploadPolling?(): void;
188
- }
189
-
190
- interface Passage {
191
- page: number;
192
- text: string;
193
- }
194
- interface RefDocument {
195
- title: string;
196
- date: string;
197
- path: string;
198
- passages?: Passage[];
199
- }
200
-
201
- declare class LexiqCollectionsElement extends HTMLElement implements CollectionsHost {
202
- readonly shadowRoot: ShadowRoot;
203
- _initialized: boolean;
204
- _pickerContainer: HTMLDivElement;
205
- _tooltip: TooltipController;
206
- _colCurrentView: "grid" | "list";
207
- _colGridBuilt: boolean;
208
- _colListBuilt: boolean;
209
- _showList: () => Promise<void>;
210
- _hideList: () => void;
211
- _buildCollectionCard: (col: Collection) => HTMLElement;
212
- _updateColTabCounts: () => void;
213
- _exitColSelection: () => void;
214
- _updateColSelCount: () => void;
215
- _closeColDeleteModal: () => void;
216
- _currentCol: Collection | null;
217
- _currentDocs: CollectionDocument[];
218
- _cdvCurrentView: "grid" | "list";
219
- _cdvListBuilt: boolean;
220
- _openColDetail: (col: Collection) => void;
221
- _closeColDetail: () => void;
222
- _refreshCdvEmpty: () => void;
223
- _buildDocCard: (doc: CollectionDocument) => HTMLElement;
224
- _buildDocListView: (docs: CollectionDocument[]) => void;
225
- _exitDocSelection: () => void;
226
- _openRefDocPreview: (docRef: RefDocument) => void;
227
- _closeColDocPreview: () => void;
228
- _syncColDocPreviewView: () => void;
229
- _uploadTracker: UploadTrackerController;
230
- _startUploadPolling?: () => void;
231
- _stopUploadPolling?: () => void;
232
- constructor();
233
- connectedCallback(): void;
234
- disconnectedCallback(): void;
235
- showList(): Promise<void>;
236
- hideList(): void;
237
- showDetail(collectionId: string): Promise<void>;
238
- hideDetail(): void;
239
- openDocumentPreview(docRef: RefDocument): void;
240
- closeDocumentPreview(): void;
241
- get collections(): Collection[];
242
- }
243
-
244
- type IncomingDocument = Partial<Pick<CollectionDocument, "_id">> & Omit<CollectionDocument, "_id">;
245
- interface PickerOptions {
246
- mobileSheet?: MobileSheetController | null;
247
- root?: ShadowRoot | null;
248
- container?: HTMLElement | null;
249
- documents?: IncomingDocument[];
250
- onSave?: ((name: string) => void) | null;
251
- onUnsave?: (() => void) | null;
252
- scrollContainer?: EventTarget | null;
253
- fromCollectionId?: string | null;
254
- onMoved?: (() => void) | null;
255
- }
256
-
257
- declare class LexiqCollectionPickerElement extends HTMLElement {
258
- private _initialized;
259
- private _container;
260
- constructor();
261
- connectedCallback(): void;
262
- disconnectedCallback(): void;
263
- private _withEvents;
264
- openSaveCard(anchorEl: HTMLElement, opts?: Partial<PickerOptions>): void;
265
- closeSaveCard(anchorEl?: HTMLElement | null): void;
266
- triggerSaveFeedback(anchorEl: HTMLElement, opts?: Partial<PickerOptions>): void;
267
- openMoveMenu(anchorEl: HTMLElement, targetItems: HTMLElement[], opts?: Partial<PickerOptions>): void;
268
- closeMoveMenu(): void;
269
- }
270
-
271
- declare class LexiqCollectionMentionListElement extends HTMLElement {
272
- private _initialized;
273
- private _list;
274
- private _onSelectionChanged;
275
- private _onCreated;
276
- private _onCollectionsLoaded;
277
- constructor();
278
- connectedCallback(): void;
279
- disconnectedCallback(): void;
280
- private _renderMessage;
281
- private _build;
282
- private _buildRow;
283
- private _syncChecks;
284
- private _dispatchSelectionChanged;
285
- get items(): {
286
- id: string;
287
- icon: string;
288
- name: string;
289
- desc: string;
290
- }[];
291
- selectById(id: string): void;
292
- }
293
-
294
- declare function defineLexiqCollections(tagName?: string): void;
295
- declare function defineLexiqCollectionPicker(tagName?: string): void;
296
- declare function defineLexiqCollectionMentionList(tagName?: string): void;
297
- declare function registerLexiqCollectionsElements(): void;
298
-
299
- /** Values substituted into `{placeholder}` slots of a catalog entry. */
300
- type TranslateParams = Record<string, string | number>;
301
- /**
302
- * Resolves a catalog key (unscoped, e.g. `list.title`) against the host's
303
- * translation engine. Returns `undefined` when the host cannot resolve the
304
- * key, which makes the bundled English catalog take over.
305
- */
306
- type Translator = (key: string, params?: TranslateParams) => string | undefined;
307
- /** The active BCP 47 language tag, for `Intl` formatters used across the views. */
308
- declare function getLang(): string;
309
- /**
310
- * Installs the host's translation engine and language, then re-translates every
311
- * connected element in place. Call it again on every language change.
312
- *
313
- * @param next - Resolver for catalog keys, or null to return to bundled English.
314
- * @param lang - BCP 47 tag of the language `next` resolves into.
315
- */
316
- declare function setTranslator(next: Translator | null, lang: string): void;
317
- /**
318
- * Switches the language used for plural selection and `Intl` formatting, and
319
- * re-translates connected elements. Prefer {@link setTranslator}; this is for
320
- * hosts that translate through a resolver whose language changes behind it.
321
- *
322
- * @param lang - BCP 47 tag, e.g. `fr` or `fr-FR`.
323
- */
324
- declare function setLang(lang: string): void;
325
-
326
- /**
327
- * Registers the LexiQ Collections native Custom Elements when the Angular
328
- * application environment initializes, and — when the host app uses Transloco —
329
- * bridges its translations into the elements. Add to an app/route `providers`
330
- * array:
331
- *
332
- * ```ts
333
- * export const appConfig: ApplicationConfig = {
334
- * providers: [provideLexiqCollectionsElements()],
335
- * };
336
- * ```
337
- *
338
- * Components using the tags still need `schemas: [CUSTOM_ELEMENTS_SCHEMA]`.
339
- *
340
- * Transloco is optional: without it the elements fall back to their bundled
341
- * English catalog, which is why nothing under `internal/` imports it.
342
- */
343
- declare function provideLexiqCollectionsElements(): EnvironmentProviders;
344
-
345
- export { LexiqCollectionMentionListElement, LexiqCollectionPickerElement, LexiqCollectionsElement, store as collectionsStore, defineLexiqCollectionMentionList, defineLexiqCollectionPicker, defineLexiqCollections, getLang, provideLexiqCollectionsElements, registerLexiqCollectionsElements, setLang, setTranslator };
346
- export type { Collection, CollectionDocument, ConnectionNotice, ContainerRole, PickerOptions, RefDocument, TranslateParams, Translator, UploadTrackerController };