@handsontable/angular-wrapper 0.0.0-next-7e304b5-20250401

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 (32) hide show
  1. package/LICENSE.txt +25 -0
  2. package/README.md +5 -0
  3. package/esm2022/handsontable-angular-wrapper.mjs +5 -0
  4. package/esm2022/lib/editor/base-editor-adapter.mjs +180 -0
  5. package/esm2022/lib/editor/custom-editor-placeholder.component.mjs +86 -0
  6. package/esm2022/lib/editor/hot-cell-editor.component.mjs +94 -0
  7. package/esm2022/lib/hot-table.component.mjs +139 -0
  8. package/esm2022/lib/hot-table.module.mjs +25 -0
  9. package/esm2022/lib/models/column-settings.mjs +2 -0
  10. package/esm2022/lib/models/grid-settings.mjs +2 -0
  11. package/esm2022/lib/renderer/hot-cell-renderer.component.mjs +55 -0
  12. package/esm2022/lib/renderer/hot-dynamic-renderer-component.service.mjs +151 -0
  13. package/esm2022/lib/services/hot-config.service.mjs +97 -0
  14. package/esm2022/lib/services/hot-settings-resolver.service.mjs +74 -0
  15. package/esm2022/public-api.mjs +11 -0
  16. package/fesm2022/handsontable-angular-wrapper.mjs +886 -0
  17. package/fesm2022/handsontable-angular-wrapper.mjs.map +1 -0
  18. package/handsontable-non-commercial-license.pdf +0 -0
  19. package/index.d.ts +5 -0
  20. package/lib/editor/base-editor-adapter.d.ts +86 -0
  21. package/lib/editor/custom-editor-placeholder.component.d.ts +31 -0
  22. package/lib/editor/hot-cell-editor.component.d.ts +75 -0
  23. package/lib/hot-table.component.d.ts +58 -0
  24. package/lib/hot-table.module.d.ts +12 -0
  25. package/lib/models/column-settings.d.ts +19 -0
  26. package/lib/models/grid-settings.d.ts +8 -0
  27. package/lib/renderer/hot-cell-renderer.component.d.ts +33 -0
  28. package/lib/renderer/hot-dynamic-renderer-component.service.d.ts +75 -0
  29. package/lib/services/hot-config.service.d.ts +97 -0
  30. package/lib/services/hot-settings-resolver.service.d.ts +35 -0
  31. package/package.json +1 -0
  32. package/public-api.d.ts +9 -0
@@ -0,0 +1,97 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * A constant representing the non-commercial and evaluation license.
6
+ * */
7
+ export declare const NON_COMMERCIAL_LICENSE = "non-commercial-and-evaluation";
8
+ /**
9
+ * Type representing a theme name.
10
+ * Possible values include predefined themes and any custom string.
11
+ */
12
+ export type ThemeName = 'ht-theme-main' | 'ht-theme-main-dark' | 'ht-theme-horizon' | 'ht-theme-horizon-dark' | string;
13
+ /**
14
+ * Interface for the Handsontable global configuration.
15
+ */
16
+ export interface HotConfig {
17
+ /**
18
+ * The license key for Handsontable.
19
+ */
20
+ license?: string;
21
+ /**
22
+ * The name of the theme to be used.
23
+ */
24
+ themeName?: ThemeName;
25
+ /**
26
+ * The language code to be used for localization.
27
+ * For example, 'en-US', 'pl-PL', etc.
28
+ * **Note:** The language must be chosen from the languages supported by Handsontable and registered in the application.
29
+ */
30
+ language?: string;
31
+ /**
32
+ * The layout direction for the Handsontable instance.
33
+ * This property defines whether the layout should be left-to-right ('ltr'), right-to-left ('rtl'),
34
+ * or inherit the direction from the parent element ('inherit').
35
+ */
36
+ layoutDirection?: 'ltr' | 'rtl' | 'inherit';
37
+ }
38
+ /**
39
+ * Injection token for providing a global default configuration.
40
+ */
41
+ export declare const HOT_GLOBAL_CONFIG: InjectionToken<HotConfig>;
42
+ /**
43
+ * Service for configuring Handsontable settings.
44
+ * This service allows setting and retrieving global configuration.
45
+ */
46
+ export declare class HotConfigService {
47
+ /**
48
+ * The default configuration object for Handsontable.
49
+ *
50
+ * This object is used as the initial value for the configuration BehaviorSubject.
51
+ * It can be overridden by a global configuration provided through the
52
+ * {@link HOT_GLOBAL_CONFIG} injection token.
53
+ *
54
+ * @private
55
+ * @type {HotConfig}
56
+ */
57
+ private defaultConfig;
58
+ /**
59
+ * A BehaviorSubject that holds the current Handsontable configuration.
60
+ *
61
+ * New configuration values can be emitted by calling next() on this subject.
62
+ * This allows subscribers to react to configuration changes dynamically.
63
+ *
64
+ * @private
65
+ * @type {BehaviorSubject<HotConfig>}
66
+ */
67
+ private configSubject;
68
+ /**
69
+ * An Observable stream of the current Handsontable configuration.
70
+ *
71
+ * Components can subscribe to this observable to receive updates whenever the configuration changes.
72
+ *
73
+ * @returns The configuration as an observable stream.
74
+ */
75
+ get config$(): Observable<HotConfig>;
76
+ constructor(globalConfig: HotConfig);
77
+ /**
78
+ * Sets the configuration for Handsontable.
79
+ *
80
+ * @param config - An object containing configuration options.
81
+ * If a some parameter is provided, it will override the current settings.
82
+ */
83
+ setConfig(config: HotConfig): void;
84
+ /**
85
+ * Retrieves the current Handsontable configuration.
86
+ *
87
+ * @returns An object with the current settings.
88
+ */
89
+ getConfig(): HotConfig;
90
+ /**
91
+ * Resets the configuration to the default settings.
92
+ * This method updates the configuration BehaviorSubject with the default configuration.
93
+ */
94
+ resetConfig(): void;
95
+ static ɵfac: i0.ɵɵFactoryDeclaration<HotConfigService, never>;
96
+ static ɵprov: i0.ɵɵInjectableDeclaration<HotConfigService>;
97
+ }
@@ -0,0 +1,35 @@
1
+ import { EnvironmentInjector } from '@angular/core';
2
+ import { DynamicComponentService } from '../renderer/hot-dynamic-renderer-component.service';
3
+ import { GridSettings, GridSettingsInternal } from '../models/grid-settings';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Service to resolve and apply custom settings for Handsontable settings object.
7
+ */
8
+ export declare class HotSettingsResolver {
9
+ private dynamicComponentService;
10
+ private readonly environmentInjector;
11
+ constructor(dynamicComponentService: DynamicComponentService, environmentInjector: EnvironmentInjector);
12
+ /**
13
+ * Applies custom settings to the provided GridSettings.
14
+ * @param settings The original grid settings.
15
+ * @returns The merged grid settings with custom settings applied.
16
+ */
17
+ applyCustomSettings(settings: GridSettings): GridSettingsInternal;
18
+ /**
19
+ * Updates the column renderer for columns with a custom renderer.
20
+ * @param mergedSettings The merged grid settings.
21
+ */
22
+ private updateColumnRendererForGivenCustomRenderer;
23
+ /**
24
+ * Updates the column editor for columns with a custom editor.
25
+ * @param mergedSettings The merged grid settings.
26
+ */
27
+ private updateColumnEditorForGivenCustomEditor;
28
+ /**
29
+ * Updates the column validator for columns with a custom validator.
30
+ * @param mergedSettings The merged grid settings.
31
+ */
32
+ private updateColumnValidatorForGivenCustomValidator;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<HotSettingsResolver, never>;
34
+ static ɵprov: i0.ɵɵInjectableDeclaration<HotSettingsResolver>;
35
+ }
package/package.json ADDED
@@ -0,0 +1 @@
1
+ {"name":"@handsontable/angular-wrapper","version":"0.0.0-next-7e304b5-20250401","description":"Best Data Grid for Angular with Spreadsheet Look and Feel.","author":"Handsoncode <hello@handsoncode.net> (https://handsoncode.net)","license":"SEE LICENSE IN LICENSE.txt","homepage":"https://handsontable.com","keywords":["handsontable","component","data","table","grid","data table","data grid","spreadsheet","sheet","excel","angular","angular component","angular grid","wrapper","pro","enterprise","sort","formulas","filter","search","conditional formatting","csv"],"repository":{"type":"git","url":"https://github.com/handsontable/handsontable.git"},"bugs":{"url":"https://github.com/handsontable/handsontable/issues"},"peerDependencies":{"@angular/animations":">=16.0.0","@angular/common":">=16.0.0","@angular/compiler":">=16.0.0","@angular/core":">=16.0.0","@angular/forms":">=16.0.0","@angular/platform-browser":">=16.0.0","@angular/platform-browser-dynamic":">=16.0.0","@angular/router":">=16.0.0","handsontable":"^15.0.0"},"module":"fesm2022/handsontable-angular-wrapper.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/handsontable-angular-wrapper.mjs","esm":"./esm2022/handsontable-angular-wrapper.mjs","default":"./fesm2022/handsontable-angular-wrapper.mjs"}},"sideEffects":false,"optionalDependencies":{"tslib":"^2.3.0"}}
@@ -0,0 +1,9 @@
1
+ export * from './lib/hot-table.component';
2
+ export * from './lib/services/hot-settings-resolver.service';
3
+ export * from './lib/hot-table.module';
4
+ export * from './lib/services/hot-config.service';
5
+ export * from './lib/renderer/hot-dynamic-renderer-component.service';
6
+ export * from './lib/renderer/hot-cell-renderer.component';
7
+ export * from './lib/editor/hot-cell-editor.component';
8
+ export { GridSettings } from './lib/models/grid-settings';
9
+ export { ColumnSettings, CustomValidatorFn, CustomColumnProperties, } from './lib/models/column-settings';