@oneteme/jquery-table 0.0.9 → 0.0.11
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/esm2022/lib/component/table.component.mjs +164 -11
- package/esm2022/lib/jquery-table.model.mjs +1 -1
- package/esm2022/lib/snapshot-table-config.mjs +42 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/oneteme-jquery-table.mjs +206 -11
- package/fesm2022/oneteme-jquery-table.mjs.map +1 -1
- package/lib/component/table.component.d.ts +19 -1
- package/lib/jquery-table.model.d.ts +3 -0
- package/lib/snapshot-table-config.d.ts +8 -0
- package/package.json +3 -3
- package/public-api.d.ts +1 -0
|
@@ -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
|
}
|
|
@@ -131,6 +131,9 @@ export interface SavedTableConfig {
|
|
|
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.
|
|
3
|
+
"version": "0.0.11",
|
|
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.
|
|
17
|
-
"@oneteme/jquery-organizer": "0.0.
|
|
16
|
+
"@oneteme/jquery-core": "^0.0.35",
|
|
17
|
+
"@oneteme/jquery-organizer": "^0.0.4"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"tslib": "^2.3.0"
|
package/public-api.d.ts
CHANGED