@oneteme/jquery-table 0.0.10 → 0.0.13

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.
@@ -6,8 +6,10 @@ import { TableColumnProvider, TableProvider, TableViewConfig } from '../jquery-t
6
6
  import { JqtI18n } from '../jqt-i18n.token';
7
7
  import { JqtCellDefDirective } from '../directive/jqt-cell-def.directive';
8
8
  import { SlicePanelComponent, OrganizerFacade, GroupByManager, OrganizerConfig, OrganizerButtonEvent, OrganizerState } from '@oneteme/jquery-organizer';
9
+ import { VisualCopyFeedbackConfig, VisualSnapshot, VisualSnapshotApplyResult, VisualSnapshotDraft } from '@oneteme/jquery-core';
9
10
  import * as i0 from "@angular/core";
10
11
  export declare class TableComponent<T = any> implements OnChanges, AfterContentInit, AfterViewInit, OnDestroy {
12
+ _isFullscreen: boolean;
11
13
  config?: TableProvider<T>;
12
14
  dataSource?: T[] | {
13
15
  data: T[];
@@ -23,6 +25,7 @@ export declare class TableComponent<T = any> implements OnChanges, AfterContentI
23
25
  view?: TableViewConfig;
24
26
  columnLabels?: Record<string, string>;
25
27
  isLoading: boolean;
28
+ copyFeedback: VisualCopyFeedbackConfig;
26
29
  /** Paramètre de contrôle pour réinitialiser barre de recherche. */
27
30
  set clearSearchInput(value: boolean | null | undefined);
28
31
  addRequested: EventEmitter<void>;
@@ -46,6 +49,7 @@ export declare class TableComponent<T = any> implements OnChanges, AfterContentI
46
49
  groupByChange: EventEmitter<string>;
47
50
  /** Émis quand la liste des colonnes visibles change (clés dans l’ordre d’affichage). */
48
51
  columnsChange: EventEmitter<string[]>;
52
+ visualCopied: EventEmitter<VisualSnapshot>;
49
53
  set paginator(value: MatPaginator | undefined);
50
54
  get paginator(): MatPaginator | undefined;
51
55
  private _paginator?;
@@ -123,6 +127,8 @@ export declare class TableComponent<T = any> implements OnChanges, AfterContentI
123
127
  private _el;
124
128
  private _ngZone;
125
129
  private _i18nRaw;
130
+ copyFeedbackMessage: string;
131
+ private _copyFeedbackTimer?;
126
132
  /** Labels de l’interface. Fusionnés depuis JQT_I18N_DEFAULTS et le token JQT_I18N injecté. */
127
133
  readonly i18n: JqtI18n;
128
134
  isGroupHeader: (_: number, row: any) => boolean;
@@ -160,6 +166,8 @@ export declare class TableComponent<T = any> implements OnChanges, AfterContentI
160
166
  private _resolvedData;
161
167
  private _preservePageIndex;
162
168
  private _lastConfigClearSearchInput;
169
+ private _initialSearchQueryApplied;
170
+ private _lastInitialSearchQuery;
163
171
  private static readonly MAX_GROUP_COUNT;
164
172
  private _allFilteredRows;
165
173
  private _paginatorSubscribed;
@@ -193,6 +201,12 @@ export declare class TableComponent<T = any> implements OnChanges, AfterContentI
193
201
  get isDefaultGroupByActive(): boolean;
194
202
  get hasSavedPreferences(): boolean;
195
203
  get showToolbar(): boolean;
204
+ get fullscreenSupported(): boolean;
205
+ toggleFullscreen(): Promise<void>;
206
+ /** Crée un snapshot autonome et le place dans le stockage partagé. */
207
+ copyVisualSnapshot(label?: string): VisualSnapshot | null;
208
+ private showCopyFeedback;
209
+ onFullscreenChange(): void;
196
210
  expandSlicePanel(): void;
197
211
  get showFields(): boolean;
198
212
  get showGroupBySection(): boolean;
@@ -291,6 +305,10 @@ export declare class TableComponent<T = any> implements OnChanges, AfterContentI
291
305
  isCellEmpty(value: any): boolean;
292
306
  asTitle(value: any): string;
293
307
  onExport(): void;
308
+ /** Capture les lignes et l'état actuellement visibles dans un snapshot autonome. */
309
+ createVisualSnapshot(label?: string): VisualSnapshotDraft;
310
+ /** Applique l'état compatible et retourne les données à fournir au composant cible. */
311
+ applyVisualSnapshot(snapshot: VisualSnapshot): VisualSnapshotApplyResult;
294
312
  private refreshViewModel;
295
313
  /** Retourne uniquement les slices visibles (non cachées par _staticSliceHiddenKeys).
296
314
  * Le SlicePanelComponent affiche tout ce qu'il reçoit — c'est ici que se fait le filtrage. */
@@ -341,5 +359,5 @@ export declare class TableComponent<T = any> implements OnChanges, AfterContentI
341
359
  private attachPaginator;
342
360
  private attachSort;
343
361
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
344
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "jquery-table", never, { "config": { "alias": "config"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "data": { "alias": "data"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "columnsConfig": { "alias": "columnsConfig"; "required": false; }; "view": { "alias": "view"; "required": false; }; "columnLabels": { "alias": "columnLabels"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "clearSearchInput": { "alias": "clearSearchInput"; "required": false; }; }, { "addRequested": "addRequested"; "columnAdded": "columnAdded"; "columnRemoved": "columnRemoved"; "categorySelected": "categorySelected"; "rowSelected": "rowSelected"; "sortChange": "sortChange"; "pageChange": "pageChange"; "searchChange": "searchChange"; "groupByChange": "groupByChange"; "columnsChange": "columnsChange"; }, ["_cellDefs"], never, true, never>;
362
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "jquery-table", never, { "config": { "alias": "config"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "data": { "alias": "data"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "columnsConfig": { "alias": "columnsConfig"; "required": false; }; "view": { "alias": "view"; "required": false; }; "columnLabels": { "alias": "columnLabels"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "copyFeedback": { "alias": "copyFeedback"; "required": false; }; "clearSearchInput": { "alias": "clearSearchInput"; "required": false; }; }, { "addRequested": "addRequested"; "columnAdded": "columnAdded"; "columnRemoved": "columnRemoved"; "categorySelected": "categorySelected"; "rowSelected": "rowSelected"; "sortChange": "sortChange"; "pageChange": "pageChange"; "searchChange": "searchChange"; "groupByChange": "groupByChange"; "columnsChange": "columnsChange"; "visualCopied": "visualCopied"; }, ["_cellDefs"], never, true, never>;
345
363
  }
@@ -125,12 +125,15 @@ export interface SavedTableConfig {
125
125
  hiddenSliceKeys?: string[];
126
126
  /** Clés des colonnes utilisées comme slices dynamiques. */
127
127
  dynamicSliceKeys?: string[];
128
- /** Filtres actifs du slice panel : map sliceIndex → tableau de clés actives. */
129
- sliceFilters?: Record<number, string[]>;
128
+ /** Filtres actifs du slice panel, indexés par clé de colonne stable. */
129
+ sliceFilters?: Record<string, string[]>;
130
130
  }
131
131
  export interface TableProvider<T = any> {
132
132
  columns?: TableColumnProvider<T>[];
133
133
  title?: string;
134
+ showActions?: boolean;
135
+ onCopyVisual?: () => void;
136
+ onToggleFullscreen?: () => void;
134
137
  slices?: SliceConfig<T>[];
135
138
  /** Affiche le bouton toggle pour replier/déplier le panneau de slices. Par défaut : `true`. */
136
139
  enableSliceToggle?: boolean;
@@ -0,0 +1,8 @@
1
+ import { VisualSnapshot } from '@oneteme/jquery-core';
2
+ import { TableProvider } from './jquery-table.model';
3
+ /**
4
+ * Reconstruit la vue autonome d'un snapshot de tableau.
5
+ * Les actions d'édition sont volontairement absentes d'une copie ; la recherche
6
+ * reste disponible et s'appuie sur les données sérialisées du snapshot.
7
+ */
8
+ export declare function tableProviderFromSnapshot(snapshot: VisualSnapshot): TableProvider<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneteme/jquery-table",
3
- "version": "0.0.10",
3
+ "version": "0.0.13",
4
4
  "description": "jquery table lib",
5
5
  "homepage": "https://github.com/oneteme/jquery-charts",
6
6
  "bugs": "https://github.com/oneteme/jquery-charts/issues",
@@ -13,8 +13,8 @@
13
13
  "@angular/core": ">=16.1.0",
14
14
  "@angular/material": "^16.1.0",
15
15
  "@angular/cdk": "^16.1.0",
16
- "@oneteme/jquery-core": "^0.0.33",
17
- "@oneteme/jquery-organizer": "^0.0.3"
16
+ "@oneteme/jquery-core": "^0.0.36",
17
+ "@oneteme/jquery-organizer": "^0.0.5"
18
18
  },
19
19
  "dependencies": {
20
20
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './lib/jquery-table.model';
2
+ export * from './lib/snapshot-table-config';
2
3
  export * from './lib/jqt-i18n.token';
3
4
  export * from './lib/component/table.component';
4
5
  export * from './lib/component/organizer-button/organizer-button.component';