@handsontable/angular-wrapper 17.0.1 → 17.1.0-rc3
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/fesm2022/handsontable-angular-wrapper.mjs +51 -42
- package/fesm2022/handsontable-angular-wrapper.mjs.map +1 -1
- package/lib/editor/hot-cell-editor-advanced.component.d.ts +1 -1
- package/lib/editor/hot-cell-editor.component.d.ts +1 -1
- package/package.json +1 -1
- package/esm2022/handsontable-angular-wrapper.mjs +0 -5
- package/esm2022/lib/editor/base-editor-adapter.mjs +0 -180
- package/esm2022/lib/editor/custom-editor-placeholder.component.mjs +0 -89
- package/esm2022/lib/editor/editor-factory-adapter.mjs +0 -140
- package/esm2022/lib/editor/hot-cell-editor-advanced.component.mjs +0 -92
- package/esm2022/lib/editor/hot-cell-editor.component.mjs +0 -95
- package/esm2022/lib/editor/models/factory-editor-properties.mjs +0 -2
- package/esm2022/lib/editor/models/keyboard-shortcut-config.mjs +0 -2
- package/esm2022/lib/hot-table.component.mjs +0 -157
- package/esm2022/lib/hot-table.module.mjs +0 -29
- package/esm2022/lib/models/column-settings.mjs +0 -2
- package/esm2022/lib/models/grid-settings.mjs +0 -2
- package/esm2022/lib/renderer/hot-cell-renderer-advanced.component.mjs +0 -55
- package/esm2022/lib/renderer/hot-cell-renderer.component.mjs +0 -55
- package/esm2022/lib/renderer/hot-dynamic-renderer-component.service.mjs +0 -203
- package/esm2022/lib/services/hot-global-config.service.mjs +0 -107
- package/esm2022/lib/services/hot-settings-resolver.service.mjs +0 -170
- package/esm2022/public-api.mjs +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ViewContainerRef,
|
|
2
|
+
import { ViewContainerRef, ViewChild, Input, ChangeDetectionStrategy, Component, createComponent, EventEmitter, Output, HostBinding, Directive, Injectable, InjectionToken, Inject, ViewEncapsulation, NgModule } from '@angular/core';
|
|
3
3
|
import Handsontable from 'handsontable/base';
|
|
4
4
|
import { take } from 'rxjs/operators';
|
|
5
5
|
import { editorFactory } from 'handsontable/editors/factory';
|
|
@@ -42,8 +42,8 @@ class CustomEditorPlaceholderComponent {
|
|
|
42
42
|
detachEditor() {
|
|
43
43
|
this.container.detach();
|
|
44
44
|
}
|
|
45
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
46
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
45
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: CustomEditorPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: CustomEditorPlaceholderComponent, isStandalone: false, selector: "ng-component", inputs: { top: "top", left: "left", height: "height", width: "width", isVisible: "isVisible", placeholderCustomClass: "placeholderCustomClass", componentRef: "componentRef" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["inputPlaceholder"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: ` <div
|
|
47
47
|
[class]="placeholderCustomClass"
|
|
48
48
|
[style.display]="display"
|
|
49
49
|
[style.width.px]="width"
|
|
@@ -56,7 +56,7 @@ class CustomEditorPlaceholderComponent {
|
|
|
56
56
|
<ng-template #inputPlaceholder></ng-template>
|
|
57
57
|
</div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: CustomEditorPlaceholderComponent, decorators: [{
|
|
60
60
|
type: Component,
|
|
61
61
|
args: [{
|
|
62
62
|
template: ` <div
|
|
@@ -297,14 +297,15 @@ class HotCellRendererComponent {
|
|
|
297
297
|
getProps() {
|
|
298
298
|
return this.cellProperties?.rendererProps ?? {};
|
|
299
299
|
}
|
|
300
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
301
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
300
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
301
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: HotCellRendererComponent, isStandalone: false, selector: "hot-cell-renderer", inputs: { value: "value", instance: "instance", td: "td", row: "row", col: "col", prop: "prop", cellProperties: "cellProperties" }, ngImport: i0, template: `<!-- This is an abstract component. Extend this component and provide your own template. -->`, isInline: true });
|
|
302
302
|
}
|
|
303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotCellRendererComponent, decorators: [{
|
|
304
304
|
type: Component,
|
|
305
305
|
args: [{
|
|
306
306
|
selector: 'hot-cell-renderer',
|
|
307
|
-
template: `<!-- This is an abstract component. Extend this component and provide your own template.
|
|
307
|
+
template: `<!-- This is an abstract component. Extend this component and provide your own template. -->`,
|
|
308
|
+
standalone: false,
|
|
308
309
|
}]
|
|
309
310
|
}], propDecorators: { value: [{
|
|
310
311
|
type: Input
|
|
@@ -379,10 +380,10 @@ class HotCellEditorComponent {
|
|
|
379
380
|
setValue(value) {
|
|
380
381
|
this._value = value;
|
|
381
382
|
}
|
|
382
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
383
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
383
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotCellEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
384
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.21", type: HotCellEditorComponent, isStandalone: true, inputs: { row: "row", column: "column", prop: "prop", originalValue: "originalValue", cellProperties: "cellProperties" }, outputs: { finishEdit: "finishEdit", cancelEdit: "cancelEdit" }, host: { properties: { "attr.tabindex": "this.tabindex", "attr.data-hot-input": "this.dataHotInput", "class.handsontableInput": "this.handsontableInputClass", "style.height.%": "this.heightFitParentContainer", "style.width.%": "this.widthFitParentContainer" } }, ngImport: i0 });
|
|
384
385
|
}
|
|
385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotCellEditorComponent, decorators: [{
|
|
386
387
|
type: Directive
|
|
387
388
|
}], propDecorators: { tabindex: [{
|
|
388
389
|
type: HostBinding,
|
|
@@ -579,14 +580,15 @@ class HotCellRendererAdvancedComponent {
|
|
|
579
580
|
getProps() {
|
|
580
581
|
return this.cellProperties?.rendererProps ?? {};
|
|
581
582
|
}
|
|
582
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
583
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
583
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotCellRendererAdvancedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
584
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: HotCellRendererAdvancedComponent, isStandalone: false, selector: "hot-cell-renderer-advanced", inputs: { value: "value", instance: "instance", td: "td", row: "row", col: "col", prop: "prop", cellProperties: "cellProperties" }, ngImport: i0, template: `<!-- This is an abstract component. Extend this component and provide your own template. -->`, isInline: true });
|
|
584
585
|
}
|
|
585
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotCellRendererAdvancedComponent, decorators: [{
|
|
586
587
|
type: Component,
|
|
587
588
|
args: [{
|
|
588
589
|
selector: 'hot-cell-renderer-advanced',
|
|
589
590
|
template: `<!-- This is an abstract component. Extend this component and provide your own template. -->`,
|
|
591
|
+
standalone: false,
|
|
590
592
|
}]
|
|
591
593
|
}], propDecorators: { value: [{
|
|
592
594
|
type: Input
|
|
@@ -667,10 +669,10 @@ class HotCellEditorAdvancedComponent {
|
|
|
667
669
|
afterInit(editor) { }
|
|
668
670
|
/** Lifecycle hook called before the editor is opened. Available in advanced mode. */
|
|
669
671
|
beforeOpen(editor, { row, col, prop, td, originalValue, cellProperties, }) { }
|
|
670
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
671
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
672
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotCellEditorAdvancedComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
673
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.21", type: HotCellEditorAdvancedComponent, isStandalone: true, inputs: { row: "row", column: "column", prop: "prop", originalValue: "originalValue", cellProperties: "cellProperties" }, outputs: { finishEdit: "finishEdit", cancelEdit: "cancelEdit" }, host: { properties: { "style.height.%": "this.heightFitParentContainer", "style.width.%": "this.widthFitParentContainer" } }, ngImport: i0 });
|
|
672
674
|
}
|
|
673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
675
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotCellEditorAdvancedComponent, decorators: [{
|
|
674
676
|
type: Directive
|
|
675
677
|
}], propDecorators: { heightFitParentContainer: [{
|
|
676
678
|
type: HostBinding,
|
|
@@ -881,15 +883,15 @@ class DynamicComponentService {
|
|
|
881
883
|
this.appRef.detachView(componentRef.hostView);
|
|
882
884
|
componentRef.destroy();
|
|
883
885
|
}
|
|
884
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
885
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
886
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DynamicComponentService, deps: [{ token: i0.ApplicationRef }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
887
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DynamicComponentService, providedIn: 'root' });
|
|
886
888
|
}
|
|
887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DynamicComponentService, decorators: [{
|
|
888
890
|
type: Injectable,
|
|
889
891
|
args: [{
|
|
890
892
|
providedIn: 'root',
|
|
891
893
|
}]
|
|
892
|
-
}], ctorParameters:
|
|
894
|
+
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.EnvironmentInjector }] });
|
|
893
895
|
|
|
894
896
|
const AVAILABLE_OPTIONS = Object.keys(Handsontable.DefaultSettings);
|
|
895
897
|
const AVAILABLE_HOOKS = Handsontable.hooks.getRegistered();
|
|
@@ -1044,12 +1046,12 @@ class HotSettingsResolver {
|
|
|
1044
1046
|
this.isTemplateRef(renderer) ||
|
|
1045
1047
|
this.isAdvancedRendererComponentRefType(renderer);
|
|
1046
1048
|
}
|
|
1047
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1048
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1049
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotSettingsResolver, deps: [{ token: DynamicComponentService }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1050
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotSettingsResolver });
|
|
1049
1051
|
}
|
|
1050
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1052
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotSettingsResolver, decorators: [{
|
|
1051
1053
|
type: Injectable
|
|
1052
|
-
}], ctorParameters:
|
|
1054
|
+
}], ctorParameters: () => [{ type: DynamicComponentService }, { type: i0.EnvironmentInjector }] });
|
|
1053
1055
|
|
|
1054
1056
|
/**
|
|
1055
1057
|
* A constant representing the non-commercial and evaluation license.
|
|
@@ -1142,18 +1144,18 @@ class HotGlobalConfigService {
|
|
|
1142
1144
|
resetConfig() {
|
|
1143
1145
|
this.configSubject.next({ ...this.defaultConfig });
|
|
1144
1146
|
}
|
|
1145
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1146
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1147
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotGlobalConfigService, deps: [{ token: HOT_GLOBAL_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1148
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotGlobalConfigService, providedIn: 'root' });
|
|
1147
1149
|
}
|
|
1148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotGlobalConfigService, decorators: [{
|
|
1149
1151
|
type: Injectable,
|
|
1150
1152
|
args: [{
|
|
1151
1153
|
providedIn: 'root',
|
|
1152
1154
|
}]
|
|
1153
|
-
}], ctorParameters:
|
|
1155
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1154
1156
|
type: Inject,
|
|
1155
1157
|
args: [HOT_GLOBAL_CONFIG]
|
|
1156
|
-
}] }]
|
|
1158
|
+
}] }] });
|
|
1157
1159
|
|
|
1158
1160
|
const HOT_DESTROYED_WARNING = 'The Handsontable instance bound to this component was destroyed and cannot be' + ' used properly.';
|
|
1159
1161
|
class HotTableComponent {
|
|
@@ -1258,8 +1260,15 @@ class HotTableComponent {
|
|
|
1258
1260
|
if (!this.hotInstance) {
|
|
1259
1261
|
return;
|
|
1260
1262
|
}
|
|
1263
|
+
const initOnlySettingKeys = this.hotInstance.getSettings()?._initOnlySettings || [];
|
|
1264
|
+
const filteredSettings = {};
|
|
1265
|
+
for (const key of Object.keys(newSettings)) {
|
|
1266
|
+
if (!initOnlySettingKeys.includes(key)) {
|
|
1267
|
+
filteredSettings[key] = newSettings[key];
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1261
1270
|
this.ngZone.runOutsideAngular(() => {
|
|
1262
|
-
this.hotInstance?.updateSettings(
|
|
1271
|
+
this.hotInstance?.updateSettings(filteredSettings, false);
|
|
1263
1272
|
});
|
|
1264
1273
|
}
|
|
1265
1274
|
/**
|
|
@@ -1291,13 +1300,13 @@ class HotTableComponent {
|
|
|
1291
1300
|
}
|
|
1292
1301
|
return negotiatedSettings;
|
|
1293
1302
|
}
|
|
1294
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1295
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotTableComponent, deps: [{ token: HotSettingsResolver }, { token: HotGlobalConfigService }, { token: i0.NgZone }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1304
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: HotTableComponent, isStandalone: false, selector: "hot-table", inputs: { data: "data", settings: "settings" }, providers: [HotSettingsResolver], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0, template: '<div #container></div>', isInline: true, styles: [":host{display:block}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
1296
1305
|
}
|
|
1297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotTableComponent, decorators: [{
|
|
1298
1307
|
type: Component,
|
|
1299
|
-
args: [{ selector: 'hot-table', template: '<div #container></div>', encapsulation: ViewEncapsulation.None, providers: [HotSettingsResolver], styles: [":host{display:block}\n"] }]
|
|
1300
|
-
}], ctorParameters:
|
|
1308
|
+
args: [{ selector: 'hot-table', template: '<div #container></div>', standalone: false, encapsulation: ViewEncapsulation.None, providers: [HotSettingsResolver], styles: [":host{display:block}\n"] }]
|
|
1309
|
+
}], ctorParameters: () => [{ type: HotSettingsResolver }, { type: HotGlobalConfigService }, { type: i0.NgZone }, { type: i0.EnvironmentInjector }], propDecorators: { data: [{
|
|
1301
1310
|
type: Input
|
|
1302
1311
|
}], settings: [{
|
|
1303
1312
|
type: Input
|
|
@@ -1311,25 +1320,25 @@ class HotTableModule {
|
|
|
1311
1320
|
* Placeholder for the library version.
|
|
1312
1321
|
* Replaced automatically during the pre-build/post-build process.
|
|
1313
1322
|
*/
|
|
1314
|
-
static version = '17.0
|
|
1323
|
+
static version = '17.1.0-rc3';
|
|
1315
1324
|
constructor() { }
|
|
1316
1325
|
static forRoot() {
|
|
1317
1326
|
return {
|
|
1318
1327
|
ngModule: HotTableModule,
|
|
1319
1328
|
};
|
|
1320
1329
|
}
|
|
1321
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1322
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1323
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1330
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1331
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.21", ngImport: i0, type: HotTableModule, declarations: [HotTableComponent, CustomEditorPlaceholderComponent], exports: [HotTableComponent] });
|
|
1332
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotTableModule });
|
|
1324
1333
|
}
|
|
1325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HotTableModule, decorators: [{
|
|
1326
1335
|
type: NgModule,
|
|
1327
1336
|
args: [{
|
|
1328
1337
|
declarations: [HotTableComponent, CustomEditorPlaceholderComponent],
|
|
1329
1338
|
imports: [],
|
|
1330
1339
|
exports: [HotTableComponent],
|
|
1331
1340
|
}]
|
|
1332
|
-
}], ctorParameters:
|
|
1341
|
+
}], ctorParameters: () => [] });
|
|
1333
1342
|
|
|
1334
1343
|
/*
|
|
1335
1344
|
* Public API Surface of hot-table
|