@handsontable/angular-wrapper 18.1.3 → 19.0.0-rc10
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/README.md +36 -17
- package/fesm2022/handsontable-angular-wrapper.mjs +1418 -1508
- package/fesm2022/handsontable-angular-wrapper.mjs.map +1 -1
- package/package.json +1 -1
- package/types/handsontable-angular-wrapper.d.ts +929 -0
- package/index.d.ts +0 -5
- package/lib/editor/base-editor-adapter.d.ts +0 -92
- package/lib/editor/custom-editor-placeholder.component.d.ts +0 -33
- package/lib/editor/editor-factory-adapter.d.ts +0 -13
- package/lib/editor/hot-cell-editor-advanced.component.d.ts +0 -42
- package/lib/editor/hot-cell-editor-base.directive.d.ts +0 -25
- package/lib/editor/hot-cell-editor.component.d.ts +0 -37
- package/lib/editor/models/factory-editor-properties.d.ts +0 -32
- package/lib/editor/models/keyboard-shortcut-config.d.ts +0 -13
- package/lib/hot-table.component.d.ts +0 -63
- package/lib/hot-table.module.d.ts +0 -8
- package/lib/models/column-settings.d.ts +0 -27
- package/lib/models/grid-settings.d.ts +0 -8
- package/lib/renderer/hot-cell-renderer-advanced.component.d.ts +0 -16
- package/lib/renderer/hot-cell-renderer-base.directive.d.ts +0 -23
- package/lib/renderer/hot-cell-renderer.component.d.ts +0 -17
- package/lib/renderer/hot-dynamic-renderer-component.service.d.ts +0 -183
- package/lib/services/hot-global-config.service.d.ts +0 -110
- package/lib/services/hot-settings-resolver.service.d.ts +0 -77
- package/public-api.d.ts +0 -12
package/index.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import Handsontable from 'handsontable/base';
|
|
2
|
-
/**
|
|
3
|
-
* Adapter for BaseEditor from Handsontable.
|
|
4
|
-
*/
|
|
5
|
-
export declare class BaseEditorAdapter extends Handsontable.editors.BaseEditor {
|
|
6
|
-
/** Reference to the custom editor component. */
|
|
7
|
-
private _componentRef?;
|
|
8
|
-
/** Reference to the editor placeholder component. */
|
|
9
|
-
private _editorPlaceHolderRef;
|
|
10
|
-
/** Flag indicating whether the placeholder is ready. */
|
|
11
|
-
private _isPlaceholderReady;
|
|
12
|
-
/** Subscription for the finish edit event. */
|
|
13
|
-
private _finishEditSubscription?;
|
|
14
|
-
/** Subscription for the cancel edit event. */
|
|
15
|
-
private _cancelEditSubscription?;
|
|
16
|
-
/**
|
|
17
|
-
* Creates an instance of BaseEditorAdapter.
|
|
18
|
-
* @param instance The Handsontable instance.
|
|
19
|
-
*/
|
|
20
|
-
constructor(instance: Handsontable.Core);
|
|
21
|
-
/**
|
|
22
|
-
* Prepares the editor for editing. Parameters are passed from Handsontable.
|
|
23
|
-
* @param row The row index.
|
|
24
|
-
* @param column The column index.
|
|
25
|
-
* @param prop The property name.
|
|
26
|
-
* @param TD The table cell element.
|
|
27
|
-
* @param originalValue The original value of the cell.
|
|
28
|
-
* @param cellProperties The cell properties.
|
|
29
|
-
*/
|
|
30
|
-
prepare(row: number, column: number, prop: string | number, TD: HTMLTableCellElement, originalValue: any, cellProperties: Handsontable.CellProperties): void;
|
|
31
|
-
/**
|
|
32
|
-
* Closes the editor. This event is triggered by Handsontable.
|
|
33
|
-
*/
|
|
34
|
-
close(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Focuses the editor. This event is triggered by Handsontable.
|
|
37
|
-
*/
|
|
38
|
-
focus(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Gets the value from the editor.
|
|
41
|
-
* @returns The value from the editor.
|
|
42
|
-
*/
|
|
43
|
-
getValue(): any;
|
|
44
|
-
/**
|
|
45
|
-
* Opens the editor. This event is triggered by Handsontable.
|
|
46
|
-
* When opening, we set the shortcut context to 'editor'.
|
|
47
|
-
* This allows the built-in keyboard shortcuts to operate within the editor.
|
|
48
|
-
* @param event The event that triggered the opening of the editor.
|
|
49
|
-
* @remarks When entering edit mode using double-click, keyboard shortcuts do not work.
|
|
50
|
-
*/
|
|
51
|
-
open(event?: Event): void;
|
|
52
|
-
/**
|
|
53
|
-
* Sets the value for the custom editor.
|
|
54
|
-
* @param newValue The value to set.
|
|
55
|
-
*/
|
|
56
|
-
setValue(newValue?: any): void;
|
|
57
|
-
/**
|
|
58
|
-
* Applies properties to the custom editor and editor placeholder.
|
|
59
|
-
*/
|
|
60
|
-
private applyPropsToEditor;
|
|
61
|
-
/**
|
|
62
|
-
* Creates the editor placeholder and append it to hot rootElement.
|
|
63
|
-
* @param injector The environment injector.
|
|
64
|
-
*/
|
|
65
|
-
private createEditorPlaceholder;
|
|
66
|
-
/**
|
|
67
|
-
* Handles the after column resize event.
|
|
68
|
-
* Helps adjust the editor size to the column size and update its position.
|
|
69
|
-
*/
|
|
70
|
-
private onAfterColumnResize;
|
|
71
|
-
/**
|
|
72
|
-
* Handles the after row resize event.
|
|
73
|
-
* Helps adjust the editor size to the column size and update its position.
|
|
74
|
-
*/
|
|
75
|
-
private onAfterRowResize;
|
|
76
|
-
/**
|
|
77
|
-
* Handles the after destroy event.
|
|
78
|
-
*/
|
|
79
|
-
private onAfterDestroy;
|
|
80
|
-
/**
|
|
81
|
-
* Unsubscribes the finish/cancel edit subscriptions if they are still active.
|
|
82
|
-
* Without this, destroying the table while an editor was prepared but never
|
|
83
|
-
* finished/cancelled leaves the `take(1)` subscriptions hanging (they never emit).
|
|
84
|
-
*/
|
|
85
|
-
private cleanupSubscriptions;
|
|
86
|
-
/**
|
|
87
|
-
* Resets the editor placeholder state.
|
|
88
|
-
* We need to reset the editor placeholder state because we use it
|
|
89
|
-
* to store multiple references to the custom editor.
|
|
90
|
-
*/
|
|
91
|
-
private resetEditorState;
|
|
92
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ComponentRef, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { HotCellEditorComponent } from './hot-cell-editor.component';
|
|
3
|
-
import { HotCellEditorAdvancedComponent } from './hot-cell-editor-advanced.component';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Component representing a placeholder for a custom editor in Handsontable.
|
|
7
|
-
* It is used only within the wrapper.
|
|
8
|
-
*/
|
|
9
|
-
export declare class CustomEditorPlaceholderComponent {
|
|
10
|
-
/** The top position of the editor. */
|
|
11
|
-
top: number;
|
|
12
|
-
/** The left position of the editor. */
|
|
13
|
-
left: number;
|
|
14
|
-
/** The height of the editor. */
|
|
15
|
-
height: number;
|
|
16
|
-
/** The width of the editor. */
|
|
17
|
-
width: number;
|
|
18
|
-
set isVisible(value: boolean);
|
|
19
|
-
placeholderCustomClass: string;
|
|
20
|
-
/** The reference to the component instance of the editor. */
|
|
21
|
-
set componentRef(hotEditorComponentRef: ComponentRef<HotCellEditorComponent<any>> | ComponentRef<HotCellEditorAdvancedComponent<any>>);
|
|
22
|
-
/** The container for the editor's input placeholder. */
|
|
23
|
-
container: ViewContainerRef;
|
|
24
|
-
/** The display style of the editor. */
|
|
25
|
-
get display(): string;
|
|
26
|
-
private _isVisible;
|
|
27
|
-
/**
|
|
28
|
-
* Detaches the container from the Handsontable.
|
|
29
|
-
*/
|
|
30
|
-
detachEditor(): void;
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CustomEditorPlaceholderComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CustomEditorPlaceholderComponent, "ng-component", never, { "top": { "alias": "top"; "required": false; }; "left": { "alias": "left"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "placeholderCustomClass": { "alias": "placeholderCustomClass"; "required": false; }; "componentRef": { "alias": "componentRef"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ComponentRef } from '@angular/core';
|
|
2
|
-
import { HotCellEditorAdvancedComponent } from './hot-cell-editor-advanced.component';
|
|
3
|
-
/**
|
|
4
|
-
* Factory function to create a custom Handsontable editor adapter for Angular components.
|
|
5
|
-
*
|
|
6
|
-
* This adapter integrates Angular components with Handsontable's editor system using the new
|
|
7
|
-
* editorFactory API, allowing you to use Angular components as custom cell editors while
|
|
8
|
-
* maintaining full Angular lifecycle management and change detection.
|
|
9
|
-
*
|
|
10
|
-
* @returns A custom editor class that can be used in Handsontable column settings.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export declare const FactoryEditorAdapter: (componentRef: ComponentRef<HotCellEditorAdvancedComponent<any>>) => any;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ExtendedEditor } from 'handsontable/editors/factory';
|
|
2
|
-
import { CellProperties } from 'handsontable/settings';
|
|
3
|
-
import { KeyboardShortcutConfig } from './models/keyboard-shortcut-config';
|
|
4
|
-
import { HotCellEditorBase } from './hot-cell-editor-base.directive';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Abstract class representing an advanced Handsontable cell editor in Angular.
|
|
8
|
-
*
|
|
9
|
-
* Extend this class and decorate the subclass with `@Component()` to implement a custom editor.
|
|
10
|
-
* Unlike {@link HotCellEditorComponent}, this variant also accepts object and array values
|
|
11
|
-
* and provides additional lifecycle hooks and positioning options.
|
|
12
|
-
*/
|
|
13
|
-
export declare abstract class HotCellEditorAdvancedComponent<T extends string | number | boolean | Record<string, any> | Array<any>> extends HotCellEditorBase<T> {
|
|
14
|
-
static readonly EDITOR_MARKER: unique symbol;
|
|
15
|
-
/** Event triggered by Handsontable on focusing the editor. Available in advanced mode. */
|
|
16
|
-
onFocus(editor?: ExtendedEditor<T>): void;
|
|
17
|
-
/** The position of the editor in the DOM. Available in advanced mode. */
|
|
18
|
-
position: 'container' | 'portal';
|
|
19
|
-
/** The shortcuts available for the editor. Available in advanced mode. */
|
|
20
|
-
shortcuts?: KeyboardShortcutConfig[];
|
|
21
|
-
/** The group name for the shortcuts. Available in advanced mode. */
|
|
22
|
-
shortcutsGroup?: string;
|
|
23
|
-
/** Configuration object. Available in advanced mode. */
|
|
24
|
-
config?: any;
|
|
25
|
-
/** Lifecycle hook called after the editor is opened. Available in advanced mode. */
|
|
26
|
-
afterOpen(editor: ExtendedEditor<T>, event?: Event): void;
|
|
27
|
-
/** Lifecycle hook called after the editor is closed. Available in advanced mode. */
|
|
28
|
-
afterClose(editor: ExtendedEditor<T>): void;
|
|
29
|
-
/** Lifecycle hook called after the editor is initialized. Available in advanced mode. */
|
|
30
|
-
afterInit(editor: ExtendedEditor<T>): void;
|
|
31
|
-
/** Lifecycle hook called before the editor is opened. Available in advanced mode. */
|
|
32
|
-
beforeOpen(editor: ExtendedEditor<T>, { row, col, prop, td, originalValue, cellProperties, }: {
|
|
33
|
-
row: number;
|
|
34
|
-
col: number;
|
|
35
|
-
prop: string | number;
|
|
36
|
-
td: HTMLTableCellElement;
|
|
37
|
-
originalValue: any;
|
|
38
|
-
cellProperties: CellProperties;
|
|
39
|
-
}): void;
|
|
40
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HotCellEditorAdvancedComponent<any>, never>;
|
|
41
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<HotCellEditorAdvancedComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
42
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import Handsontable from 'handsontable/base';
|
|
2
|
-
import { EventEmitter } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Shared base directive for HotCellEditorComponent and HotCellEditorAdvancedComponent.
|
|
6
|
-
* Holds all @Input(), @Output() and @HostBinding() declarations that both editor variants share.
|
|
7
|
-
*
|
|
8
|
-
* @template T - The type of the edited cell value.
|
|
9
|
-
*/
|
|
10
|
-
export declare abstract class HotCellEditorBase<T extends string | number | boolean | Record<string, any> | Array<any>> {
|
|
11
|
-
protected heightFitParentContainer: number;
|
|
12
|
-
protected widthFitParentContainer: number;
|
|
13
|
-
row: number;
|
|
14
|
-
column: number;
|
|
15
|
-
prop: string | number;
|
|
16
|
-
originalValue: T;
|
|
17
|
-
cellProperties: Handsontable.CellProperties;
|
|
18
|
-
finishEdit: EventEmitter<void>;
|
|
19
|
-
cancelEdit: EventEmitter<void>;
|
|
20
|
-
protected value: T;
|
|
21
|
-
getValue(): T;
|
|
22
|
-
setValue(value: T): void;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HotCellEditorBase<any>, never>;
|
|
24
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<HotCellEditorBase<any>, never, never, { "row": { "alias": "row"; "required": false; }; "column": { "alias": "column"; "required": false; }; "prop": { "alias": "prop"; "required": false; }; "originalValue": { "alias": "originalValue"; "required": false; }; "cellProperties": { "alias": "cellProperties"; "required": false; }; }, { "finishEdit": "finishEdit"; "cancelEdit": "cancelEdit"; }, never, never, true, never>;
|
|
25
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { HotCellEditorBase } from './hot-cell-editor-base.directive';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Abstract class representing a basic Handsontable cell editor in Angular.
|
|
5
|
-
*
|
|
6
|
-
* Extend this class and decorate the subclass with `@Component()` to implement a custom editor.
|
|
7
|
-
* Value type is limited to primitives (`string | number | boolean`).
|
|
8
|
-
* For object and array values use {@link HotCellEditorAdvancedComponent}.
|
|
9
|
-
*/
|
|
10
|
-
export declare abstract class HotCellEditorComponent<T extends string | number | boolean> extends HotCellEditorBase<T> {
|
|
11
|
-
static readonly EDITOR_MARKER: unique symbol;
|
|
12
|
-
/** The tabindex attribute for the editor. */
|
|
13
|
-
protected tabindex: number;
|
|
14
|
-
/** The data-hot-input attribute for the editor. */
|
|
15
|
-
protected dataHotInput: string;
|
|
16
|
-
/** The handsontableInput class for the editor. */
|
|
17
|
-
protected handsontableInputClass: boolean;
|
|
18
|
-
/** Event triggered by Handsontable on closing the editor. */
|
|
19
|
-
onClose(): void;
|
|
20
|
-
/** Event triggered by Handsontable on opening the editor. */
|
|
21
|
-
onOpen(event?: Event): void;
|
|
22
|
-
/**
|
|
23
|
-
* Event triggered by Handsontable on focusing the editor.
|
|
24
|
-
* Must be implemented by the subclass to move focus to the actual input element.
|
|
25
|
-
* @example
|
|
26
|
-
* ```typescript
|
|
27
|
-
* @Component({ template: `<input #inputElement>` })
|
|
28
|
-
* class CustomEditor extends HotCellEditorComponent<string> {
|
|
29
|
-
* @ViewChild('inputElement') inputElement!: ElementRef;
|
|
30
|
-
* onFocus(): void { this.inputElement.nativeElement.focus(); }
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
abstract onFocus(): void;
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HotCellEditorComponent<any>, never>;
|
|
36
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<HotCellEditorComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
37
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ComponentRef, EnvironmentInjector } from '@angular/core';
|
|
2
|
-
import { CustomEditorPlaceholderComponent } from '../custom-editor-placeholder.component';
|
|
3
|
-
import { Subscription } from 'rxjs';
|
|
4
|
-
import { HotCellEditorAdvancedComponent } from '../hot-cell-editor-advanced.component';
|
|
5
|
-
/**
|
|
6
|
-
* Handsontable core instance augmented with the Angular `EnvironmentInjector` that the wrapper
|
|
7
|
-
* stores on it (in `HotTableComponent`) so editor adapters can create components with the right
|
|
8
|
-
* injection context. Typed here to avoid scattered `as any` casts at the assignment/read sites.
|
|
9
|
-
*/
|
|
10
|
-
export interface HotInstanceWithAngularInjector {
|
|
11
|
-
_angularEnvironmentInjector?: EnvironmentInjector;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Angular-specific properties that will be added to the editor instance.
|
|
15
|
-
*/
|
|
16
|
-
export interface AngularEditorProperties {
|
|
17
|
-
input: HTMLElement;
|
|
18
|
-
/** Reference to the custom Angular editor component. */
|
|
19
|
-
_componentRef?: ComponentRef<HotCellEditorAdvancedComponent<any>>;
|
|
20
|
-
/** Reference to the editor placeholder component. */
|
|
21
|
-
_editorPlaceHolderRef?: ComponentRef<CustomEditorPlaceholderComponent>;
|
|
22
|
-
/** Subscription for the finish edit event. */
|
|
23
|
-
_finishEditSubscription?: Subscription;
|
|
24
|
-
/** Subscription for the cancel edit event. */
|
|
25
|
-
_cancelEditSubscription?: Subscription;
|
|
26
|
-
/** Callback for after row resize hook. */
|
|
27
|
-
_afterRowResizeCallback: () => void;
|
|
28
|
-
/** Callback for after column resize hook. */
|
|
29
|
-
_afterColumnResizeCallback: () => void;
|
|
30
|
-
/** Callback for after destroy hook. */
|
|
31
|
-
_afterDestroyCallback: () => void;
|
|
32
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ExtendedEditor } from 'handsontable/editors/factory';
|
|
2
|
-
export interface KeyboardShortcutConfig {
|
|
3
|
-
keys: string[][];
|
|
4
|
-
callback: (editorInstance: ExtendedEditor<any>, event: KeyboardEvent) => boolean | void;
|
|
5
|
-
group?: string;
|
|
6
|
-
runOnlyIf?: () => boolean;
|
|
7
|
-
captureCtrl?: boolean;
|
|
8
|
-
preventDefault?: boolean;
|
|
9
|
-
stopPropagation?: boolean;
|
|
10
|
-
relativeToGroup?: string;
|
|
11
|
-
position?: 'before' | 'after';
|
|
12
|
-
forwardToContext?: any;
|
|
13
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, EnvironmentInjector, NgZone, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
-
import Handsontable from 'handsontable/base';
|
|
3
|
-
import { HotSettingsResolver } from './services/hot-settings-resolver.service';
|
|
4
|
-
import { HotGlobalConfigService } from './services/hot-global-config.service';
|
|
5
|
-
import { GridSettings } from './models/grid-settings';
|
|
6
|
-
import { DynamicComponentService } from './renderer/hot-dynamic-renderer-component.service';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare const HOT_DESTROYED_WARNING: string;
|
|
9
|
-
export declare class HotTableComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
10
|
-
private _hotSettingsResolver;
|
|
11
|
-
private _hotConfig;
|
|
12
|
-
ngZone: NgZone;
|
|
13
|
-
private readonly environmentInjector;
|
|
14
|
-
private readonly _dynamicComponentService;
|
|
15
|
-
/** The data for the Handsontable instance. */
|
|
16
|
-
data: Handsontable.GridSettings['data'] | null;
|
|
17
|
-
/** The settings for the Handsontable instance. */
|
|
18
|
-
settings: GridSettings;
|
|
19
|
-
/** The container element for the Handsontable instance. */
|
|
20
|
-
container: ElementRef<HTMLDivElement>;
|
|
21
|
-
/** The Handsontable instance. */
|
|
22
|
-
private __hotInstance;
|
|
23
|
-
private readonly _destroyRef;
|
|
24
|
-
constructor(_hotSettingsResolver: HotSettingsResolver, _hotConfig: HotGlobalConfigService, ngZone: NgZone, environmentInjector: EnvironmentInjector, _dynamicComponentService: DynamicComponentService);
|
|
25
|
-
/**
|
|
26
|
-
* Gets the Handsontable instance.
|
|
27
|
-
* @returns The Handsontable instance or `null` if it's not yet been created or has been destroyed.
|
|
28
|
-
*/
|
|
29
|
-
get hotInstance(): Handsontable | null;
|
|
30
|
-
/**
|
|
31
|
-
* Sets the Handsontable instance.
|
|
32
|
-
* @param hotInstance The Handsontable instance to set.
|
|
33
|
-
*/
|
|
34
|
-
private set hotInstance(value);
|
|
35
|
-
/**
|
|
36
|
-
* Initializes the Handsontable instance after the view has been initialized.
|
|
37
|
-
* The initial settings of the table are also prepared here
|
|
38
|
-
*/
|
|
39
|
-
ngAfterViewInit(): void;
|
|
40
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
41
|
-
/**
|
|
42
|
-
* Destroys the Handsontable instance and clears the columns from custom editors.
|
|
43
|
-
*/
|
|
44
|
-
ngOnDestroy(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Updates the Handsontable instance with new settings.
|
|
47
|
-
* @param newSettings The new settings to apply to the Handsontable instance.
|
|
48
|
-
*/
|
|
49
|
-
private updateHotTable;
|
|
50
|
-
/**
|
|
51
|
-
* Merges the provided Handsontable grid settings with the global configuration.
|
|
52
|
-
*
|
|
53
|
-
* This method retrieves the global configuration from the HotGlobalConfigService and negotiates the final
|
|
54
|
-
* Handsontable settings by giving precedence to the provided settings.
|
|
55
|
-
* Additionally, the `layoutDirection` is only merged if the Handsontable instance has not yet been initialized.
|
|
56
|
-
*
|
|
57
|
-
* @param settings - The grid settings provided by the user or component.
|
|
58
|
-
* @returns The final negotiated grid settings after merging with global defaults.
|
|
59
|
-
*/
|
|
60
|
-
private getNegotiatedSettings;
|
|
61
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HotTableComponent, never>;
|
|
62
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HotTableComponent, "hot-table", never, { "data": { "alias": "data"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; }, {}, never, never, true, never>;
|
|
63
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./hot-table.component";
|
|
3
|
-
export declare class HotTableModule {
|
|
4
|
-
static readonly version = "18.1.3";
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HotTableModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<HotTableModule, never, [typeof i1.HotTableComponent], [typeof i1.HotTableComponent]>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<HotTableModule>;
|
|
8
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ComponentRef, EnvironmentInjector, Type, TemplateRef } from '@angular/core';
|
|
2
|
-
import Handsontable from 'handsontable/base';
|
|
3
|
-
import { ExtendedEditor } from 'handsontable/editors/factory';
|
|
4
|
-
import { CellProperties } from 'handsontable/settings';
|
|
5
|
-
import { HotCellRendererComponent } from '../renderer/hot-cell-renderer.component';
|
|
6
|
-
import { HotCellEditorComponent } from '../editor/hot-cell-editor.component';
|
|
7
|
-
import { HotCellRendererAdvancedComponent } from '../renderer/hot-cell-renderer-advanced.component';
|
|
8
|
-
import { HotCellEditorAdvancedComponent } from '../editor/hot-cell-editor-advanced.component';
|
|
9
|
-
declare module 'handsontable/settings' {
|
|
10
|
-
interface ColumnSettings {
|
|
11
|
-
_editorComponentReference?: ComponentRef<HotCellEditorComponent<any>>;
|
|
12
|
-
_environmentInjector?: EnvironmentInjector;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export type CustomValidatorFn<T> = (value: T) => boolean;
|
|
16
|
-
export type ColumnSettings = Handsontable.ColumnSettings | {
|
|
17
|
-
editor?: Type<HotCellEditorComponent<any>> | Type<HotCellEditorAdvancedComponent<any>> | Handsontable.ColumnSettings['editor'] | ExtendedEditor<any>;
|
|
18
|
-
renderer?: Type<HotCellRendererComponent<any, any>> | Type<HotCellRendererAdvancedComponent<any, any>> | TemplateRef<any> | Handsontable.ColumnSettings['renderer'] | ((instance: Handsontable, td: HTMLTableCellElement, row: number, column: number, prop: string | number, value: any, cellProperties: CellProperties) => void);
|
|
19
|
-
validator?: CustomValidatorFn<any> | Handsontable.ColumnSettings['validator'];
|
|
20
|
-
rendererProps?: any;
|
|
21
|
-
};
|
|
22
|
-
export interface EditorReferenceInternal {
|
|
23
|
-
_editorComponentReference?: ComponentRef<HotCellEditorComponent<any>>;
|
|
24
|
-
_environmentInjector?: EnvironmentInjector;
|
|
25
|
-
}
|
|
26
|
-
export interface ColumnSettingsInternal extends Handsontable.ColumnSettings, EditorReferenceInternal {
|
|
27
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import Handsontable from 'handsontable/base';
|
|
2
|
-
import { ColumnSettings, ColumnSettingsInternal } from './column-settings';
|
|
3
|
-
export interface GridSettings extends Omit<Handsontable.GridSettings, 'columns' | 'data'> {
|
|
4
|
-
columns?: ColumnSettings[] | ((index: number) => ColumnSettings);
|
|
5
|
-
}
|
|
6
|
-
export interface GridSettingsInternal extends Omit<GridSettings, 'columns'> {
|
|
7
|
-
columns?: ColumnSettingsInternal[] | ((index: number) => ColumnSettingsInternal);
|
|
8
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { HotCellRendererBase } from './hot-cell-renderer-base.directive';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Abstract base component for creating advanced custom cell renderer components for Handsontable.
|
|
5
|
-
*
|
|
6
|
-
* Extend this component and provide your own template to implement a custom renderer.
|
|
7
|
-
* Unlike {@link HotCellRendererComponent}, this variant also accepts object and array values.
|
|
8
|
-
*
|
|
9
|
-
* @template TValue - The type of the component renderer.
|
|
10
|
-
* @template TProps - The type of additional renderer properties.
|
|
11
|
-
*/
|
|
12
|
-
export declare abstract class HotCellRendererAdvancedComponent<TValue extends string | number | boolean | Record<string, any> | Array<any> = string, TProps extends {} = any> extends HotCellRendererBase<TValue, TProps> {
|
|
13
|
-
static readonly RENDERER_MARKER: unique symbol;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HotCellRendererAdvancedComponent<any, any>, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HotCellRendererAdvancedComponent<any, any>, "hot-cell-renderer-advanced", never, {}, {}, never, never, true, never>;
|
|
16
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import Handsontable from 'handsontable/base';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Shared base directive for HotCellRendererComponent and HotCellRendererAdvancedComponent.
|
|
5
|
-
* Holds all @Input() properties and getProps() that both renderer variants share.
|
|
6
|
-
*
|
|
7
|
-
* @template TValue - The type of the rendered cell value.
|
|
8
|
-
* @template TProps - The type of additional renderer properties.
|
|
9
|
-
*/
|
|
10
|
-
export declare abstract class HotCellRendererBase<TValue extends string | number | boolean | Record<string, any> | Array<any> = string, TProps extends {} = any> {
|
|
11
|
-
value: TValue;
|
|
12
|
-
instance: Handsontable;
|
|
13
|
-
td: HTMLTableCellElement;
|
|
14
|
-
row: number;
|
|
15
|
-
col: number;
|
|
16
|
-
prop: string | number;
|
|
17
|
-
cellProperties: Handsontable.CellProperties & {
|
|
18
|
-
rendererProps?: TProps;
|
|
19
|
-
};
|
|
20
|
-
getProps(): TProps;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HotCellRendererBase<any, any>, never>;
|
|
22
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<HotCellRendererBase<any, any>, never, never, { "value": { "alias": "value"; "required": false; }; "instance": { "alias": "instance"; "required": false; }; "td": { "alias": "td"; "required": false; }; "row": { "alias": "row"; "required": false; }; "col": { "alias": "col"; "required": false; }; "prop": { "alias": "prop"; "required": false; }; "cellProperties": { "alias": "cellProperties"; "required": false; }; }, {}, never, never, true, never>;
|
|
23
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HotCellRendererBase } from './hot-cell-renderer-base.directive';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Abstract base component for creating custom cell renderer components for Handsontable.
|
|
5
|
-
*
|
|
6
|
-
* Extend this component and provide your own template to implement a custom renderer.
|
|
7
|
-
* Value type is limited to primitives (`string | number | boolean`).
|
|
8
|
-
* For object and array values use {@link HotCellRendererAdvancedComponent}.
|
|
9
|
-
*
|
|
10
|
-
* @template TValue - The type of the component renderer.
|
|
11
|
-
* @template TProps - The type of additional renderer properties.
|
|
12
|
-
*/
|
|
13
|
-
export declare abstract class HotCellRendererComponent<TValue extends string | number | boolean = string, TProps extends {} = any> extends HotCellRendererBase<TValue, TProps> {
|
|
14
|
-
static readonly RENDERER_MARKER: unique symbol;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HotCellRendererComponent<any, any>, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HotCellRendererComponent<any, any>, "hot-cell-renderer", never, {}, {}, never, never, true, never>;
|
|
17
|
-
}
|