@datorama/core 22.13.0-beta.5 → 22.13.8-rc.2
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/bundle.scss +4833 -5708
- package/bundles/datorama-core.umd.js +134 -86
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +56 -56
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.d.ts +1 -0
- package/datorama-core.metadata.json +1 -1
- package/esm2015/datorama-core.js +2 -1
- package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +4 -2
- package/esm2015/lib/grid/grid/grid.component.js +5 -5
- package/esm2015/lib/grid-v2/grid/grid-v2.component.js +8 -10
- package/esm2015/lib/grid-v2/grid/grid-v2.config.js +21 -4
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-column-header/grid-column-header.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-column-header/grid-multi-select-header/grid-multi-select-header.component.js +3 -4
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +8 -8
- package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +2 -2
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +1 -1
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +15 -15
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -1
- package/esm2015/lib/rich-text/rich-text.directive.js +20 -38
- package/esm2015/lib/rich-text/rich-text.service.js +50 -0
- package/esm2015/lib/select/select.component.js +4 -9
- package/esm2015/lib/version.js +2 -2
- package/esm5/datorama-core.js +2 -1
- package/esm5/lib/breadcrumbs/breadcrumbs.component.js +4 -2
- package/esm5/lib/grid/grid/grid.component.js +5 -5
- package/esm5/lib/grid-v2/grid/grid-v2.component.js +8 -10
- package/esm5/lib/grid-v2/grid/grid-v2.config.js +21 -4
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-column-header/grid-column-header.component.js +1 -1
- package/esm5/lib/grid-v2/grid-column-header/grid-multi-select-header/grid-multi-select-header.component.js +3 -4
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +8 -8
- package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +2 -2
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.query.js +1 -1
- package/esm5/lib/grid-v2/grid-store/grid.service.js +15 -15
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +20 -1
- package/esm5/lib/rich-text/rich-text.directive.js +21 -39
- package/esm5/lib/rich-text/rich-text.service.js +51 -0
- package/esm5/lib/select/select.component.js +4 -9
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +125 -87
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +134 -88
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid/grid/grid.component.d.ts +2 -2
- package/lib/grid-v2/grid/grid-v2.component.d.ts +2 -2
- package/lib/grid-v2/grid/grid-v2.config.d.ts +1 -0
- package/lib/grid-v2/grid/grid-v2.types.d.ts +1 -0
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +5 -5
- package/lib/grid-v2/grid-settings.d.ts +2 -2
- package/lib/grid-v2/grid-store/grid.query.d.ts +3 -3
- package/lib/grid-v2/grid-store/grid.service.d.ts +6 -2
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +3 -0
- package/lib/rich-text/rich-text.directive.d.ts +4 -6
- package/lib/rich-text/rich-text.service.d.ts +10 -0
- package/package.json +2 -2
- package/testing/src/grid/row.ts +1 -1
|
@@ -14,7 +14,7 @@ import { DatoGridAPI } from '../dato-grid-api';
|
|
|
14
14
|
import { Subject } from 'rxjs';
|
|
15
15
|
import { DatoGridHelper } from '../grid-helper';
|
|
16
16
|
import { DatoTableAlignment } from '../grid.types';
|
|
17
|
-
import {
|
|
17
|
+
import { AgGridNg2 } from 'ag-grid-angular';
|
|
18
18
|
import { DatoGridPaginationComponent } from '../grid-pagination/grid-pagination.component';
|
|
19
19
|
export declare class DatoGridComponent extends BaseCustomControl implements ControlValueAccessor, OnDestroy {
|
|
20
20
|
private gridHelper;
|
|
@@ -26,7 +26,7 @@ export declare class DatoGridComponent extends BaseCustomControl implements Cont
|
|
|
26
26
|
gridOptions: GridOptions;
|
|
27
27
|
rowDataChanged: Subject<RowDataChangedEvent | RowDataUpdatedEvent>;
|
|
28
28
|
hasPagination: boolean;
|
|
29
|
-
gridComponent:
|
|
29
|
+
gridComponent: AgGridNg2;
|
|
30
30
|
paginationComponent: DatoGridPaginationComponent;
|
|
31
31
|
set options(options: GridOptions);
|
|
32
32
|
gridReady: EventEmitter<GridReadyEvent>;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
7
7
|
*/
|
|
8
8
|
import { ElementRef } from '@angular/core';
|
|
9
|
-
import {
|
|
9
|
+
import { AgGridNg2 } from 'ag-grid-angular';
|
|
10
10
|
import { DatoGridControllerComponent } from '../grid-controller/grid-controller.component';
|
|
11
11
|
import { DatoGridOptions } from './grid-v2.types';
|
|
12
12
|
export declare class DatoGridV2Component {
|
|
13
13
|
private controller;
|
|
14
14
|
private host;
|
|
15
|
-
set grid(agGrid:
|
|
15
|
+
set grid(agGrid: AgGridNg2);
|
|
16
16
|
get gridOptions(): DatoGridOptions;
|
|
17
17
|
get enableBackground(): boolean;
|
|
18
18
|
get enableV2_1(): boolean;
|
|
@@ -8,6 +8,7 @@ export declare const DEFAULT_GRID_SEARCH_DEBOUNCE_TIME: {
|
|
|
8
8
|
};
|
|
9
9
|
export declare const defaultGridTreeLabel: DatoGridTreeConfig;
|
|
10
10
|
export declare const gridTreeFilePathKey = "agGridFilePath";
|
|
11
|
+
export declare function setEmptyFolderClass(row: any, node?: any): void;
|
|
11
12
|
/**
|
|
12
13
|
* Convert data into tree shaped structure.
|
|
13
14
|
* @param data
|
|
@@ -71,6 +71,7 @@ export interface DatoGridOptions extends GridOptions {
|
|
|
71
71
|
columnDefs: DatoGridColumnDef[];
|
|
72
72
|
saveSettings?: boolean;
|
|
73
73
|
enableV2_1?: boolean;
|
|
74
|
+
isGlobalSettings?: boolean;
|
|
74
75
|
exportGrid?(params: DatoGridExportParams): void;
|
|
75
76
|
defaultColDef?: DatoGridColumnDef;
|
|
76
77
|
datasource?: {
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
7
7
|
*/
|
|
8
|
-
import { ChangeDetectorRef, ComponentFactoryResolver, ElementRef, EventEmitter, Injector, OnDestroy, QueryList } from '@angular/core';
|
|
8
|
+
import { AfterContentInit, ChangeDetectorRef, ComponentFactoryResolver, ElementRef, EventEmitter, Injector, OnDestroy, QueryList } from '@angular/core';
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
10
|
-
import {
|
|
10
|
+
import { AgGridNg2 } from 'ag-grid-angular';
|
|
11
11
|
import { GridQuery } from '../grid-store/grid.query';
|
|
12
12
|
import { GridService } from '../grid-store/grid.service';
|
|
13
13
|
import { DatoGridOptions, DatoGridSort, GridChangeEvent } from '../grid/grid-v2.types';
|
|
@@ -18,7 +18,7 @@ import { DatoTranslateService } from '../../services/translate.service';
|
|
|
18
18
|
import { GridStorageAPI } from '../grid-settings';
|
|
19
19
|
import { DatoHotkeys } from '../../hotkeys/hotkeys.service';
|
|
20
20
|
import { DatoGridExternalFilter } from '../grid-filter/grid-filter.types';
|
|
21
|
-
export declare class DatoGridControllerComponent implements OnDestroy {
|
|
21
|
+
export declare class DatoGridControllerComponent implements OnDestroy, AfterContentInit {
|
|
22
22
|
gridService: GridService;
|
|
23
23
|
gridQuery: GridQuery;
|
|
24
24
|
private cdr;
|
|
@@ -47,8 +47,8 @@ export declare class DatoGridControllerComponent implements OnDestroy {
|
|
|
47
47
|
private cellMouseOutTimer;
|
|
48
48
|
constructor(gridService: GridService, gridQuery: GridQuery, cdr: ChangeDetectorRef, iconRegistry: IconRegistry, translate: DatoTranslateService, host: ElementRef, injector: Injector, resolver: ComponentFactoryResolver, hotkeys: DatoHotkeys, storageAPI: GridStorageAPI);
|
|
49
49
|
ngOnDestroy(): void;
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
ngAfterContentInit(): void;
|
|
51
|
+
_initializeGrid(agGrid: AgGridNg2, agGridEl: HTMLElement): void;
|
|
52
52
|
private normalizeOptions;
|
|
53
53
|
setGridRows<T>(data: T[]): void;
|
|
54
54
|
setGridFilters(filters: DatoGridExternalFilter[]): void;
|
|
@@ -2,7 +2,7 @@ import { InjectionToken } from '@angular/core';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { DatoGridSettings } from './grid-store/grid.store.types';
|
|
4
4
|
export interface GridStorageAPI {
|
|
5
|
-
get(gridName: string): Observable<Partial<DatoGridSettings>>;
|
|
6
|
-
set(gridName: string, state: Partial<DatoGridSettings
|
|
5
|
+
get(gridName: string, isGlobal?: boolean): Observable<Partial<DatoGridSettings>>;
|
|
6
|
+
set(gridName: string, state: Partial<DatoGridSettings>, isGlobal?: boolean): void;
|
|
7
7
|
}
|
|
8
8
|
export declare const DATO_GRID_STORAGE_API: InjectionToken<GridStorageAPI>;
|
|
@@ -4,7 +4,7 @@ import { GridStore } from './grid.store';
|
|
|
4
4
|
import { DatoGridSettings, GridStoreState, ServerSidePaginationConfig } from './grid.store.types';
|
|
5
5
|
import { Column, RowNode } from 'ag-grid-community';
|
|
6
6
|
import { DatoGridApi } from '../grid-controller/grid-controller.types';
|
|
7
|
-
import {
|
|
7
|
+
import { AgGridNg2 } from 'ag-grid-angular';
|
|
8
8
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
9
9
|
import { DatoGridAlignment, DatoGridDataChangedEvent, DatoGridOptions, DatoGridSort, GridRowsSelectionData } from '../grid/grid-v2.types';
|
|
10
10
|
import { DatoGridExternalFilter, DatoGridFiltersMap } from '../grid-filter/grid-filter.types';
|
|
@@ -12,7 +12,7 @@ import { HashMap } from '../../utils/types';
|
|
|
12
12
|
export declare class GridQuery extends Query<GridStoreState> implements OnDestroy {
|
|
13
13
|
protected store: GridStore;
|
|
14
14
|
api: DatoGridApi;
|
|
15
|
-
gridRef:
|
|
15
|
+
gridRef: AgGridNg2;
|
|
16
16
|
_gridReady: BehaviorSubject<boolean>;
|
|
17
17
|
gridReady$: Observable<boolean>;
|
|
18
18
|
_serverDataLoaded: Subject<DatoGridDataChangedEvent>;
|
|
@@ -34,7 +34,7 @@ export declare class GridQuery extends Query<GridStoreState> implements OnDestro
|
|
|
34
34
|
getSortModel(): DatoGridSort;
|
|
35
35
|
getSavedSort(): DatoGridSort;
|
|
36
36
|
getSort(savedSort?: DatoGridSort): DatoGridSort;
|
|
37
|
-
_setApi(api: DatoGridApi, gridRef:
|
|
37
|
+
_setApi(api: DatoGridApi, gridRef: AgGridNg2): void;
|
|
38
38
|
/** Returns just the rows data */
|
|
39
39
|
getSelectedRows<T>(): T[];
|
|
40
40
|
getSelectedRows<T>(onlyFirstRow: true): T | undefined;
|
|
@@ -4,7 +4,7 @@ import { Column, RowNode, RowNodeTransaction } from 'ag-grid-community';
|
|
|
4
4
|
import { GridQuery } from './grid.query';
|
|
5
5
|
import { DatoTranslateService } from '../../services/translate.service';
|
|
6
6
|
import { DatoGridExternalFilter, DatoGridFilter, ServerSidePaginationFilter } from '../grid-filter/grid-filter.types';
|
|
7
|
-
import {
|
|
7
|
+
import { AgGridNg2 } from 'ag-grid-angular';
|
|
8
8
|
import { IconRegistry, SvgRegistry } from '../../services/icon-registry';
|
|
9
9
|
import { DatoGridSettings, NormalizeOptionsParams, ServerSidePaginationConfig } from './grid.store.types';
|
|
10
10
|
import { GridStore } from './grid.store';
|
|
@@ -12,6 +12,7 @@ import { GridStorageAPI } from '../grid-settings';
|
|
|
12
12
|
import { DatoGridColumnDef, DatoGridGetRowsParams, DatoGridOptions, DatoGridSort, DatoGridTreeConfig } from '../grid/grid-v2.types';
|
|
13
13
|
import { CoreEventLogger, CoreEventTypes } from '../../event-logger';
|
|
14
14
|
import { HashMap } from '../../utils/types';
|
|
15
|
+
import { Observable } from 'rxjs';
|
|
15
16
|
export declare class GridService implements OnDestroy {
|
|
16
17
|
private store;
|
|
17
18
|
private gridQuery;
|
|
@@ -32,15 +33,18 @@ export declare class GridService implements OnDestroy {
|
|
|
32
33
|
private isTreeData;
|
|
33
34
|
private pageNumberToReturnAfterRefresh;
|
|
34
35
|
private lastTotalRows;
|
|
36
|
+
private updateGridActionsSubject;
|
|
35
37
|
private readonly CHECKBOX_SELECTION_COL_ID;
|
|
36
38
|
set treeData(isTreeData: boolean);
|
|
37
39
|
get treeData(): boolean;
|
|
38
40
|
constructor(store: GridStore, gridQuery: GridQuery, translate: DatoTranslateService, iconRegistry: IconRegistry, svgRegistry: SvgRegistry, storageAPI: GridStorageAPI, logger: CoreEventLogger);
|
|
39
41
|
ngOnDestroy(): void;
|
|
40
42
|
/** @internal - used to init the service */
|
|
41
|
-
_setApi(api: DatoGridApi, gridRef:
|
|
43
|
+
_setApi(api: DatoGridApi, gridRef: AgGridNg2): void;
|
|
42
44
|
private isServerSidePagination;
|
|
43
45
|
updateGridContext(context?: {}, replace?: boolean): void;
|
|
46
|
+
updateGridActions(): void;
|
|
47
|
+
getUpdateGridActionsStatus(): Observable<boolean>;
|
|
44
48
|
/**
|
|
45
49
|
* @deprecated use selectRows instead
|
|
46
50
|
* @param row
|
|
@@ -62,6 +62,8 @@ export declare class DatoGridV2ToolbarComponent implements OnInit, OnDestroy {
|
|
|
62
62
|
get hasActiveMoreActions(): boolean;
|
|
63
63
|
private get api();
|
|
64
64
|
ngOnInit(): void;
|
|
65
|
+
private getCellValueChangeEvent;
|
|
66
|
+
private getRowDataUpdatedEvent;
|
|
65
67
|
onActionClick(action: BaseToolbarAction): void;
|
|
66
68
|
resolveVisibleActions(): void;
|
|
67
69
|
private initWidthToHideActionsLabels;
|
|
@@ -87,6 +89,7 @@ export declare class DatoGridV2ToolbarComponent implements OnInit, OnDestroy {
|
|
|
87
89
|
private getCollapseState;
|
|
88
90
|
private registerGroupListeners;
|
|
89
91
|
private subscribeRowsSelectionData;
|
|
92
|
+
private subscribeUpdateGridActions;
|
|
90
93
|
selectAllPages(): void;
|
|
91
94
|
}
|
|
92
95
|
export {};
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import { AfterViewInit, ElementRef, NgZone, OnDestroy } from '@angular/core';
|
|
9
9
|
import { ControlValueAccessor } from '@angular/forms';
|
|
10
10
|
import { BaseCustomControl } from '../custom-control/base-custom-control';
|
|
11
|
-
import { HttpClient } from '@angular/common/http';
|
|
12
11
|
import { CoreConfig } from '../config';
|
|
12
|
+
import { RichTextService } from './rich-text.service';
|
|
13
13
|
declare global {
|
|
14
14
|
interface Window {
|
|
15
15
|
tinymce: any;
|
|
@@ -18,9 +18,9 @@ declare global {
|
|
|
18
18
|
}
|
|
19
19
|
export declare class DatoRichTextDirective extends BaseCustomControl implements OnDestroy, AfterViewInit, ControlValueAccessor {
|
|
20
20
|
private ngZone;
|
|
21
|
-
private
|
|
22
|
-
private host;
|
|
21
|
+
private richTextService;
|
|
23
22
|
private config;
|
|
23
|
+
private host;
|
|
24
24
|
plugins: string | undefined;
|
|
25
25
|
toolbar: string | string[];
|
|
26
26
|
menubar: string | string[] | null;
|
|
@@ -42,10 +42,8 @@ export declare class DatoRichTextDirective extends BaseCustomControl implements
|
|
|
42
42
|
private editor;
|
|
43
43
|
private readonly defaultPlugins;
|
|
44
44
|
private readonly defaultToolbar;
|
|
45
|
-
constructor(ngZone: NgZone,
|
|
45
|
+
constructor(ngZone: NgZone, richTextService: RichTextService, config: CoreConfig, host: ElementRef<HTMLElement>);
|
|
46
46
|
ngAfterViewInit(): void;
|
|
47
|
-
private loadLib;
|
|
48
|
-
private loadAutoCompleteStyle;
|
|
49
47
|
private initEditor;
|
|
50
48
|
private defaultOptions;
|
|
51
49
|
private init;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { CoreConfig } from '../config';
|
|
3
|
+
export declare class RichTextService {
|
|
4
|
+
private http;
|
|
5
|
+
private config;
|
|
6
|
+
richTextScript$: any;
|
|
7
|
+
constructor(http: HttpClient, config: CoreConfig);
|
|
8
|
+
getLib(appendScriptFunc: any, appendStyleFunc: any): any;
|
|
9
|
+
private initLib;
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datorama/core",
|
|
3
|
-
"version": "22.13.
|
|
3
|
+
"version": "22.13.8-rc.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "8.2.14",
|
|
6
6
|
"@angular/core": "8.2.14",
|
|
@@ -61,4 +61,4 @@
|
|
|
61
61
|
"typings": "datorama-core.d.ts",
|
|
62
62
|
"metadata": "datorama-core.metadata.json",
|
|
63
63
|
"sideEffects": false
|
|
64
|
-
}
|
|
64
|
+
}
|