@aquera/ngx-smart-table 0.0.17-alpha → 0.0.18-alpha
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/{fesm2020 → fesm2022}/aquera-ngx-smart-table.mjs +1579 -2101
- package/fesm2022/aquera-ngx-smart-table.mjs.map +1 -0
- package/package.json +8 -16
- package/types/aquera-ngx-smart-table.d.ts +5909 -0
- package/aquera-ngx-smart-table.d.ts +0 -5
- package/esm2020/aquera-ngx-smart-table.mjs +0 -5
- package/esm2020/lib/builder/components/builder-preview/builder-preview.component.mjs +0 -63
- package/esm2020/lib/builder/components/builder-toolbar/builder-toolbar.component.mjs +0 -115
- package/esm2020/lib/builder/components/column-editor/column-editor.component.mjs +0 -206
- package/esm2020/lib/builder/components/column-list/column-list.component.mjs +0 -125
- package/esm2020/lib/builder/components/definition-builder/definition-builder.component.mjs +0 -105
- package/esm2020/lib/builder/components/table-config-editor/table-config-editor.component.mjs +0 -132
- package/esm2020/lib/builder/definition-builder.module.mjs +0 -70
- package/esm2020/lib/builder/models/builder-state.interface.mjs +0 -5
- package/esm2020/lib/builder/services/definition-builder.service.mjs +0 -251
- package/esm2020/lib/builder/services/definition-export.service.mjs +0 -167
- package/esm2020/lib/builder/services/definition-import.service.mjs +0 -193
- package/esm2020/lib/builder/services/sample-data-generator.service.mjs +0 -126
- package/esm2020/lib/builder/utils/config-validator.util.mjs +0 -165
- package/esm2020/lib/builder/utils/typescript-generator.util.mjs +0 -206
- package/esm2020/lib/editors/index.mjs +0 -9
- package/esm2020/lib/editors/nile-autocomplete-editor.mjs +0 -228
- package/esm2020/lib/editors/nile-calendar-editor.mjs +0 -211
- package/esm2020/lib/editors/nile-date-picker-editor.mjs +0 -188
- package/esm2020/lib/editors/nile-input-editor.mjs +0 -235
- package/esm2020/lib/editors/nile-select-editor.mjs +0 -498
- package/esm2020/lib/factories/column-config.factory.mjs +0 -231
- package/esm2020/lib/models/autosave-config.interface.mjs +0 -8
- package/esm2020/lib/models/base-column-config.class.mjs +0 -253
- package/esm2020/lib/models/cell-strategies.interface.mjs +0 -6
- package/esm2020/lib/models/cell-types.mjs +0 -147
- package/esm2020/lib/models/column-action.interface.mjs +0 -6
- package/esm2020/lib/models/column-config.interface.mjs +0 -43
- package/esm2020/lib/models/column-config.utils.mjs +0 -101
- package/esm2020/lib/models/row-action.interface.mjs +0 -5
- package/esm2020/lib/models/row-validator.interface.mjs +0 -2
- package/esm2020/lib/models/schema-validation.interface.mjs +0 -2
- package/esm2020/lib/models/sheet-action.interface.mjs +0 -5
- package/esm2020/lib/models/sheet-config.interface.mjs +0 -5
- package/esm2020/lib/models/table-config.interface.mjs +0 -107
- package/esm2020/lib/models/table-validator.interface.mjs +0 -2
- package/esm2020/lib/models/workbook-action.interface.mjs +0 -5
- package/esm2020/lib/models/workbook-config.interface.mjs +0 -5
- package/esm2020/lib/renderer/components/st-add-column-button/st-add-column-button.component.mjs +0 -24
- package/esm2020/lib/renderer/components/st-cell/st-cell.component.mjs +0 -397
- package/esm2020/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.mjs +0 -103
- package/esm2020/lib/renderer/components/st-column-filter/st-column-filter.component.mjs +0 -383
- package/esm2020/lib/renderer/components/st-column-menu/st-column-menu.component.mjs +0 -232
- package/esm2020/lib/renderer/components/st-column-visibility/st-column-visibility.component.mjs +0 -97
- package/esm2020/lib/renderer/components/st-header/st-header.component.mjs +0 -157
- package/esm2020/lib/renderer/components/st-pagination/st-pagination.component.mjs +0 -87
- package/esm2020/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.mjs +0 -167
- package/esm2020/lib/renderer/components/st-sheet/st-sheet.component.mjs +0 -165
- package/esm2020/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.mjs +0 -112
- package/esm2020/lib/renderer/components/st-table/st-table.component.mjs +0 -1453
- package/esm2020/lib/renderer/components/st-table-actions/st-table-actions.component.mjs +0 -169
- package/esm2020/lib/renderer/components/st-workbook/st-workbook.component.mjs +0 -581
- package/esm2020/lib/renderer/directives/click-outside.directive.mjs +0 -28
- package/esm2020/lib/renderer/directives/st-column-resize.directive.mjs +0 -108
- package/esm2020/lib/renderer/directives/st-keyboard-navigation.directive.mjs +0 -83
- package/esm2020/lib/renderer/models/cell-state.interface.mjs +0 -66
- package/esm2020/lib/renderer/models/cell.class.mjs +0 -389
- package/esm2020/lib/renderer/models/row-validation-state.interface.mjs +0 -7
- package/esm2020/lib/renderer/models/sheet-state.class.mjs +0 -90
- package/esm2020/lib/renderer/models/sheet-state.interface.mjs +0 -5
- package/esm2020/lib/renderer/models/table-state.class.mjs +0 -871
- package/esm2020/lib/renderer/models/table-state.interface.mjs +0 -5
- package/esm2020/lib/renderer/models/table-types.mjs +0 -29
- package/esm2020/lib/renderer/models/table-validation-state.interface.mjs +0 -7
- package/esm2020/lib/renderer/models/workbook-state.class.mjs +0 -174
- package/esm2020/lib/renderer/models/workbook-state.interface.mjs +0 -5
- package/esm2020/lib/renderer/models/z-index.enum.mjs +0 -55
- package/esm2020/lib/schemas/table-config.schema.mjs +0 -472
- package/esm2020/lib/services/autosave.service.mjs +0 -92
- package/esm2020/lib/services/custom-validation-rules.util.mjs +0 -124
- package/esm2020/lib/services/json-schema-validator.service.mjs +0 -216
- package/esm2020/lib/services/row-validation.service.mjs +0 -42
- package/esm2020/lib/services/validation-logger.service.mjs +0 -177
- package/esm2020/lib/services/virtual-scroll.service.mjs +0 -52
- package/esm2020/lib/shared/shared-table-components.module.mjs +0 -35
- package/esm2020/lib/smart-table.module.mjs +0 -124
- package/esm2020/lib/strategies/default-editors.mjs +0 -433
- package/esm2020/lib/strategies/default-formatters.mjs +0 -238
- package/esm2020/lib/strategies/default-validators.mjs +0 -327
- package/esm2020/public-api.mjs +0 -146
- package/fesm2015/aquera-ngx-smart-table.mjs +0 -12347
- package/fesm2015/aquera-ngx-smart-table.mjs.map +0 -1
- package/fesm2020/aquera-ngx-smart-table.mjs.map +0 -1
- package/lib/builder/components/builder-preview/builder-preview.component.d.ts +0 -31
- package/lib/builder/components/builder-toolbar/builder-toolbar.component.d.ts +0 -53
- package/lib/builder/components/column-editor/column-editor.component.d.ts +0 -69
- package/lib/builder/components/column-list/column-list.component.d.ts +0 -65
- package/lib/builder/components/definition-builder/definition-builder.component.d.ts +0 -58
- package/lib/builder/components/table-config-editor/table-config-editor.component.d.ts +0 -32
- package/lib/builder/definition-builder.module.d.ts +0 -15
- package/lib/builder/models/builder-state.interface.d.ts +0 -93
- package/lib/builder/services/definition-builder.service.d.ts +0 -80
- package/lib/builder/services/definition-export.service.d.ts +0 -59
- package/lib/builder/services/definition-import.service.d.ts +0 -31
- package/lib/builder/services/sample-data-generator.service.d.ts +0 -41
- package/lib/builder/utils/config-validator.util.d.ts +0 -32
- package/lib/builder/utils/typescript-generator.util.d.ts +0 -29
- package/lib/editors/index.d.ts +0 -8
- package/lib/editors/nile-autocomplete-editor.d.ts +0 -102
- package/lib/editors/nile-calendar-editor.d.ts +0 -88
- package/lib/editors/nile-date-picker-editor.d.ts +0 -97
- package/lib/editors/nile-input-editor.d.ts +0 -67
- package/lib/editors/nile-select-editor.d.ts +0 -113
- package/lib/factories/column-config.factory.d.ts +0 -73
- package/lib/models/autosave-config.interface.d.ts +0 -23
- package/lib/models/base-column-config.class.d.ts +0 -115
- package/lib/models/cell-strategies.interface.d.ts +0 -188
- package/lib/models/cell-types.d.ts +0 -337
- package/lib/models/column-action.interface.d.ts +0 -86
- package/lib/models/column-config.interface.d.ts +0 -272
- package/lib/models/column-config.utils.d.ts +0 -37
- package/lib/models/row-action.interface.d.ts +0 -86
- package/lib/models/row-validator.interface.d.ts +0 -37
- package/lib/models/schema-validation.interface.d.ts +0 -42
- package/lib/models/sheet-action.interface.d.ts +0 -59
- package/lib/models/sheet-config.interface.d.ts +0 -41
- package/lib/models/table-config.interface.d.ts +0 -251
- package/lib/models/table-validator.interface.d.ts +0 -40
- package/lib/models/workbook-action.interface.d.ts +0 -95
- package/lib/models/workbook-config.interface.d.ts +0 -107
- package/lib/renderer/components/st-add-column-button/st-add-column-button.component.d.ts +0 -9
- package/lib/renderer/components/st-cell/st-cell.component.d.ts +0 -69
- package/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.d.ts +0 -39
- package/lib/renderer/components/st-column-filter/st-column-filter.component.d.ts +0 -139
- package/lib/renderer/components/st-column-menu/st-column-menu.component.d.ts +0 -81
- package/lib/renderer/components/st-column-visibility/st-column-visibility.component.d.ts +0 -44
- package/lib/renderer/components/st-header/st-header.component.d.ts +0 -93
- package/lib/renderer/components/st-pagination/st-pagination.component.d.ts +0 -42
- package/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.d.ts +0 -67
- package/lib/renderer/components/st-sheet/st-sheet.component.d.ts +0 -98
- package/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.d.ts +0 -58
- package/lib/renderer/components/st-table/st-table.component.d.ts +0 -380
- package/lib/renderer/components/st-table-actions/st-table-actions.component.d.ts +0 -77
- package/lib/renderer/components/st-workbook/st-workbook.component.d.ts +0 -275
- package/lib/renderer/directives/click-outside.directive.d.ts +0 -10
- package/lib/renderer/directives/st-column-resize.directive.d.ts +0 -44
- package/lib/renderer/directives/st-keyboard-navigation.directive.d.ts +0 -19
- package/lib/renderer/models/cell-state.interface.d.ts +0 -118
- package/lib/renderer/models/cell.class.d.ts +0 -174
- package/lib/renderer/models/row-validation-state.interface.d.ts +0 -27
- package/lib/renderer/models/sheet-state.class.d.ts +0 -67
- package/lib/renderer/models/sheet-state.interface.d.ts +0 -55
- package/lib/renderer/models/table-state.class.d.ts +0 -320
- package/lib/renderer/models/table-state.interface.d.ts +0 -18
- package/lib/renderer/models/table-types.d.ts +0 -228
- package/lib/renderer/models/table-validation-state.interface.d.ts +0 -34
- package/lib/renderer/models/workbook-state.class.d.ts +0 -117
- package/lib/renderer/models/workbook-state.interface.d.ts +0 -71
- package/lib/renderer/models/z-index.enum.d.ts +0 -44
- package/lib/schemas/table-config.schema.d.ts +0 -455
- package/lib/services/autosave.service.d.ts +0 -73
- package/lib/services/custom-validation-rules.util.d.ts +0 -12
- package/lib/services/json-schema-validator.service.d.ts +0 -49
- package/lib/services/row-validation.service.d.ts +0 -17
- package/lib/services/validation-logger.service.d.ts +0 -87
- package/lib/services/virtual-scroll.service.d.ts +0 -44
- package/lib/shared/shared-table-components.module.d.ts +0 -9
- package/lib/smart-table.module.d.ts +0 -26
- package/lib/strategies/default-editors.d.ts +0 -109
- package/lib/strategies/default-formatters.d.ts +0 -116
- package/lib/strategies/default-validators.d.ts +0 -113
- package/public-api.d.ts +0 -70
- package/src/lib/builder/README.md +0 -30
- package/src/lib/editors/README.md +0 -303
- package/src/lib/renderer/components/st-column-filter/README.md +0 -286
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Builder Preview Component
|
|
3
|
-
* Live preview of table using st-table component
|
|
4
|
-
*/
|
|
5
|
-
import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
6
|
-
import { TableConfig } from '../../../models/table-config.interface';
|
|
7
|
-
import { SampleDataGeneratorService } from '../../services/sample-data-generator.service';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class BuilderPreviewComponent implements OnInit, OnChanges {
|
|
10
|
-
private sampleDataGenerator;
|
|
11
|
-
tableConfig: TableConfig;
|
|
12
|
-
sampleData: any[];
|
|
13
|
-
isLoading: boolean;
|
|
14
|
-
constructor(sampleDataGenerator: SampleDataGeneratorService);
|
|
15
|
-
ngOnInit(): void;
|
|
16
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
17
|
-
/**
|
|
18
|
-
* Generate sample data for preview
|
|
19
|
-
*/
|
|
20
|
-
private generatePreviewData;
|
|
21
|
-
/**
|
|
22
|
-
* Refresh preview
|
|
23
|
-
*/
|
|
24
|
-
refreshPreview(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Handle state change from preview table
|
|
27
|
-
*/
|
|
28
|
-
onStateChange(event: any): void;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BuilderPreviewComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BuilderPreviewComponent, "st-builder-preview", never, { "tableConfig": "tableConfig"; }, {}, never, never>;
|
|
31
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Builder Toolbar Component
|
|
3
|
-
* Handles file operations and actions
|
|
4
|
-
*/
|
|
5
|
-
import { EventEmitter } from '@angular/core';
|
|
6
|
-
import { DefinitionBuilderService } from '../../services/definition-builder.service';
|
|
7
|
-
import { DefinitionExportService } from '../../services/definition-export.service';
|
|
8
|
-
import { DefinitionImportService } from '../../services/definition-import.service';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class BuilderToolbarComponent {
|
|
11
|
-
private builderService;
|
|
12
|
-
private exportService;
|
|
13
|
-
private importService;
|
|
14
|
-
hasUnsavedChanges: boolean;
|
|
15
|
-
newDefinition: EventEmitter<void>;
|
|
16
|
-
saved: EventEmitter<void>;
|
|
17
|
-
previewToggled: EventEmitter<void>;
|
|
18
|
-
constructor(builderService: DefinitionBuilderService, exportService: DefinitionExportService, importService: DefinitionImportService);
|
|
19
|
-
/**
|
|
20
|
-
* Handle new definition button click
|
|
21
|
-
*/
|
|
22
|
-
onNewDefinition(): void;
|
|
23
|
-
/**
|
|
24
|
-
* Handle open file button click
|
|
25
|
-
*/
|
|
26
|
-
onOpenFile(): void;
|
|
27
|
-
/**
|
|
28
|
-
* Handle save button click
|
|
29
|
-
*/
|
|
30
|
-
onSave(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Handle load from localStorage button click
|
|
33
|
-
*/
|
|
34
|
-
onLoad(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Handle export JSON button click
|
|
37
|
-
*/
|
|
38
|
-
onExportJSON(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Handle export TypeScript button click
|
|
41
|
-
*/
|
|
42
|
-
onExportTypeScript(): void;
|
|
43
|
-
/**
|
|
44
|
-
* Handle import JSON button click
|
|
45
|
-
*/
|
|
46
|
-
onImportJSON(): void;
|
|
47
|
-
/**
|
|
48
|
-
* Handle preview toggle button click
|
|
49
|
-
*/
|
|
50
|
-
onTogglePreview(): void;
|
|
51
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BuilderToolbarComponent, never>;
|
|
52
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BuilderToolbarComponent, "st-builder-toolbar", never, { "hasUnsavedChanges": "hasUnsavedChanges"; }, { "newDefinition": "newDefinition"; "saved": "saved"; "previewToggled": "previewToggled"; }, never, never>;
|
|
53
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Column Editor Component
|
|
3
|
-
* Form-based column configuration
|
|
4
|
-
*/
|
|
5
|
-
import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
6
|
-
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
7
|
-
import { ColumnConfig } from '../../../models/column-config.interface';
|
|
8
|
-
import { CellDataType, CellAlignment, CellVerticalAlignment, EditMode } from '../../../models/cell-types';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class ColumnEditorComponent implements OnInit, OnChanges {
|
|
11
|
-
private fb;
|
|
12
|
-
column: ColumnConfig;
|
|
13
|
-
columnIndex: number;
|
|
14
|
-
columnUpdated: EventEmitter<Partial<ColumnConfig<any>>>;
|
|
15
|
-
cancel: EventEmitter<void>;
|
|
16
|
-
form: FormGroup;
|
|
17
|
-
readonly dataTypes: {
|
|
18
|
-
value: CellDataType;
|
|
19
|
-
label: string;
|
|
20
|
-
}[];
|
|
21
|
-
readonly alignments: {
|
|
22
|
-
value: CellAlignment;
|
|
23
|
-
label: string;
|
|
24
|
-
}[];
|
|
25
|
-
readonly verticalAlignments: {
|
|
26
|
-
value: CellVerticalAlignment;
|
|
27
|
-
label: string;
|
|
28
|
-
}[];
|
|
29
|
-
readonly editModes: {
|
|
30
|
-
value: EditMode;
|
|
31
|
-
label: string;
|
|
32
|
-
}[];
|
|
33
|
-
readonly stickyOptions: ({
|
|
34
|
-
value: boolean;
|
|
35
|
-
label: string;
|
|
36
|
-
} | {
|
|
37
|
-
value: string;
|
|
38
|
-
label: string;
|
|
39
|
-
})[];
|
|
40
|
-
constructor(fb: FormBuilder);
|
|
41
|
-
ngOnInit(): void;
|
|
42
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
43
|
-
/**
|
|
44
|
-
* Build the reactive form
|
|
45
|
-
*/
|
|
46
|
-
private buildForm;
|
|
47
|
-
/**
|
|
48
|
-
* Update form values from column
|
|
49
|
-
*/
|
|
50
|
-
private updateForm;
|
|
51
|
-
/**
|
|
52
|
-
* Handle form submission
|
|
53
|
-
*/
|
|
54
|
-
onSave(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Handle cancel
|
|
57
|
-
*/
|
|
58
|
-
onCancel(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Get form control error message
|
|
61
|
-
*/
|
|
62
|
-
getErrorMessage(controlName: string): string;
|
|
63
|
-
/**
|
|
64
|
-
* Check if form control has error
|
|
65
|
-
*/
|
|
66
|
-
hasError(controlName: string): boolean;
|
|
67
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnEditorComponent, never>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ColumnEditorComponent, "st-column-editor", never, { "column": "column"; "columnIndex": "columnIndex"; }, { "columnUpdated": "columnUpdated"; "cancel": "cancel"; }, never, never>;
|
|
69
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Column List Component
|
|
3
|
-
* Displays and manages columns
|
|
4
|
-
*/
|
|
5
|
-
import { EventEmitter } from '@angular/core';
|
|
6
|
-
import { ColumnConfig } from '../../../models/column-config.interface';
|
|
7
|
-
import { CellDataType } from '../../../models/cell-types';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class ColumnListComponent {
|
|
10
|
-
columns: ColumnConfig[];
|
|
11
|
-
selectedIndex: number | null;
|
|
12
|
-
columnSelected: EventEmitter<number>;
|
|
13
|
-
columnAdded: EventEmitter<string>;
|
|
14
|
-
columnDeleted: EventEmitter<number>;
|
|
15
|
-
columnReordered: EventEmitter<{
|
|
16
|
-
fromIndex: number;
|
|
17
|
-
toIndex: number;
|
|
18
|
-
}>;
|
|
19
|
-
showAddMenu: boolean;
|
|
20
|
-
draggedIndex: number | null;
|
|
21
|
-
dragOverIndex: number | null;
|
|
22
|
-
readonly dataTypes: {
|
|
23
|
-
value: CellDataType;
|
|
24
|
-
label: string;
|
|
25
|
-
}[];
|
|
26
|
-
/**
|
|
27
|
-
* Handle column click
|
|
28
|
-
*/
|
|
29
|
-
onColumnClick(index: number): void;
|
|
30
|
-
/**
|
|
31
|
-
* Handle delete button click
|
|
32
|
-
*/
|
|
33
|
-
onDelete(index: number, event: Event): void;
|
|
34
|
-
/**
|
|
35
|
-
* Handle add column button click
|
|
36
|
-
*/
|
|
37
|
-
onAddColumn(type: CellDataType): void;
|
|
38
|
-
closeMenu(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Handle drag start
|
|
41
|
-
*/
|
|
42
|
-
onDragStart(event: DragEvent, index: number): void;
|
|
43
|
-
/**
|
|
44
|
-
* Handle drag over
|
|
45
|
-
*/
|
|
46
|
-
onDragOver(event: DragEvent, index: number): void;
|
|
47
|
-
/**
|
|
48
|
-
* Handle drop
|
|
49
|
-
*/
|
|
50
|
-
onDrop(event: DragEvent, dropIndex: number): void;
|
|
51
|
-
/**
|
|
52
|
-
* Handle drag end
|
|
53
|
-
*/
|
|
54
|
-
onDragEnd(event: DragEvent): void;
|
|
55
|
-
/**
|
|
56
|
-
* Get display name for column
|
|
57
|
-
*/
|
|
58
|
-
getColumnDisplayName(column: ColumnConfig): string;
|
|
59
|
-
/**
|
|
60
|
-
* Get data type label
|
|
61
|
-
*/
|
|
62
|
-
getDataTypeLabel(column: ColumnConfig): string;
|
|
63
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnListComponent, never>;
|
|
64
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ColumnListComponent, "st-column-list", never, { "columns": "columns"; "selectedIndex": "selectedIndex"; }, { "columnSelected": "columnSelected"; "columnAdded": "columnAdded"; "columnDeleted": "columnDeleted"; "columnReordered": "columnReordered"; }, never, never>;
|
|
65
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Definition Builder Component
|
|
3
|
-
* Main container component that orchestrates all builder sub-components
|
|
4
|
-
*/
|
|
5
|
-
import { OnInit, OnDestroy } from '@angular/core';
|
|
6
|
-
import { DefinitionBuilderService } from '../../services/definition-builder.service';
|
|
7
|
-
import { BuilderState } from '../../models/builder-state.interface';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class DefinitionBuilderComponent implements OnInit, OnDestroy {
|
|
10
|
-
private builderService;
|
|
11
|
-
state: BuilderState;
|
|
12
|
-
private stateSubscription?;
|
|
13
|
-
constructor(builderService: DefinitionBuilderService);
|
|
14
|
-
ngOnInit(): void;
|
|
15
|
-
ngOnDestroy(): void;
|
|
16
|
-
/**
|
|
17
|
-
* Handle new definition action
|
|
18
|
-
*/
|
|
19
|
-
onNewDefinition(): void;
|
|
20
|
-
/**
|
|
21
|
-
* Handle column selection
|
|
22
|
-
*/
|
|
23
|
-
onColumnSelected(index: number): void;
|
|
24
|
-
/**
|
|
25
|
-
* Handle column deletion
|
|
26
|
-
*/
|
|
27
|
-
onColumnDeleted(index: number): void;
|
|
28
|
-
/**
|
|
29
|
-
* Handle column reorder
|
|
30
|
-
*/
|
|
31
|
-
onColumnReordered(fromIndex: number, toIndex: number): void;
|
|
32
|
-
/**
|
|
33
|
-
* Handle column add
|
|
34
|
-
*/
|
|
35
|
-
onColumnAdded(type?: string): void;
|
|
36
|
-
/**
|
|
37
|
-
* Handle column update
|
|
38
|
-
*/
|
|
39
|
-
onColumnUpdated(index: number, updates: any): void;
|
|
40
|
-
/**
|
|
41
|
-
* Handle table config update
|
|
42
|
-
*/
|
|
43
|
-
onTableConfigUpdated(updates: any): void;
|
|
44
|
-
/**
|
|
45
|
-
* Handle preview toggle
|
|
46
|
-
*/
|
|
47
|
-
onPreviewToggled(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Handle save action
|
|
50
|
-
*/
|
|
51
|
-
onSaved(): void;
|
|
52
|
-
/**
|
|
53
|
-
* Handle column cancel
|
|
54
|
-
*/
|
|
55
|
-
onColumnCancel(): void;
|
|
56
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DefinitionBuilderComponent, never>;
|
|
57
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DefinitionBuilderComponent, "st-definition-builder", never, {}, {}, never, never>;
|
|
58
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Table Config Editor Component
|
|
3
|
-
* Form for table-level configuration
|
|
4
|
-
*/
|
|
5
|
-
import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
6
|
-
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
7
|
-
import { TableConfig } from '../../../models/table-config.interface';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class TableConfigEditorComponent implements OnInit, OnChanges {
|
|
10
|
-
private fb;
|
|
11
|
-
config: TableConfig;
|
|
12
|
-
configUpdated: EventEmitter<Partial<TableConfig>>;
|
|
13
|
-
form: FormGroup;
|
|
14
|
-
readonly pageSizeOptions: number[];
|
|
15
|
-
constructor(fb: FormBuilder);
|
|
16
|
-
ngOnInit(): void;
|
|
17
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
18
|
-
/**
|
|
19
|
-
* Build the reactive form
|
|
20
|
-
*/
|
|
21
|
-
private buildForm;
|
|
22
|
-
/**
|
|
23
|
-
* Update form values from config
|
|
24
|
-
*/
|
|
25
|
-
private updateForm;
|
|
26
|
-
/**
|
|
27
|
-
* Handle form changes
|
|
28
|
-
*/
|
|
29
|
-
private onFormChange;
|
|
30
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TableConfigEditorComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableConfigEditorComponent, "st-table-config-editor", never, { "config": "config"; }, { "configUpdated": "configUpdated"; }, never, never>;
|
|
32
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./components/definition-builder/definition-builder.component";
|
|
3
|
-
import * as i2 from "./components/builder-toolbar/builder-toolbar.component";
|
|
4
|
-
import * as i3 from "./components/column-list/column-list.component";
|
|
5
|
-
import * as i4 from "./components/table-config-editor/table-config-editor.component";
|
|
6
|
-
import * as i5 from "./components/builder-preview/builder-preview.component";
|
|
7
|
-
import * as i6 from "@angular/common";
|
|
8
|
-
import * as i7 from "@angular/forms";
|
|
9
|
-
import * as i8 from "../smart-table.module";
|
|
10
|
-
import * as i9 from "../shared/shared-table-components.module";
|
|
11
|
-
export declare class DefinitionBuilderModule {
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DefinitionBuilderModule, never>;
|
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DefinitionBuilderModule, [typeof i1.DefinitionBuilderComponent, typeof i2.BuilderToolbarComponent, typeof i3.ColumnListComponent, typeof i4.TableConfigEditorComponent, typeof i5.BuilderPreviewComponent], [typeof i6.CommonModule, typeof i7.ReactiveFormsModule, typeof i8.SmartTableModule, typeof i9.SharedTableComponentsModule], [typeof i1.DefinitionBuilderComponent, typeof i2.BuilderToolbarComponent, typeof i3.ColumnListComponent, typeof i4.TableConfigEditorComponent, typeof i5.BuilderPreviewComponent, typeof i9.SharedTableComponentsModule]>;
|
|
14
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DefinitionBuilderModule>;
|
|
15
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Builder state interface - tracks the current state of the definition builder
|
|
3
|
-
*/
|
|
4
|
-
import { TableConfig } from '../../models/table-config.interface';
|
|
5
|
-
import { ColumnConfig } from '../../models/column-config.interface';
|
|
6
|
-
/**
|
|
7
|
-
* Current state of the definition builder
|
|
8
|
-
*/
|
|
9
|
-
export interface BuilderState {
|
|
10
|
-
/**
|
|
11
|
-
* Current table configuration being edited
|
|
12
|
-
*/
|
|
13
|
-
tableConfig: TableConfig;
|
|
14
|
-
/**
|
|
15
|
-
* Currently selected column for editing (null if none selected)
|
|
16
|
-
*/
|
|
17
|
-
selectedColumn: ColumnConfig | null;
|
|
18
|
-
/**
|
|
19
|
-
* Index of selected column in columns array
|
|
20
|
-
*/
|
|
21
|
-
selectedColumnIndex: number | null;
|
|
22
|
-
/**
|
|
23
|
-
* Whether preview is visible
|
|
24
|
-
*/
|
|
25
|
-
previewVisible: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Whether there are unsaved changes
|
|
28
|
-
*/
|
|
29
|
-
hasUnsavedChanges: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Last saved configuration (for comparison)
|
|
32
|
-
*/
|
|
33
|
-
lastSavedConfig?: TableConfig;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Export format options
|
|
37
|
-
*/
|
|
38
|
-
export interface ExportOptions {
|
|
39
|
-
/**
|
|
40
|
-
* Export format type
|
|
41
|
-
*/
|
|
42
|
-
format: 'json' | 'typescript';
|
|
43
|
-
/**
|
|
44
|
-
* Include comments in TypeScript export
|
|
45
|
-
*/
|
|
46
|
-
includeComments?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Variable name for TypeScript export
|
|
49
|
-
*/
|
|
50
|
-
variableName?: string;
|
|
51
|
-
/**
|
|
52
|
-
* File name (without extension)
|
|
53
|
-
*/
|
|
54
|
-
fileName?: string;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Import result
|
|
58
|
-
*/
|
|
59
|
-
export interface ImportResult {
|
|
60
|
-
/**
|
|
61
|
-
* Whether import was successful
|
|
62
|
-
*/
|
|
63
|
-
success: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Imported table configuration (if successful)
|
|
66
|
-
*/
|
|
67
|
-
tableConfig?: TableConfig;
|
|
68
|
-
/**
|
|
69
|
-
* Error message (if failed)
|
|
70
|
-
*/
|
|
71
|
-
error?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Validation errors (if any)
|
|
74
|
-
*/
|
|
75
|
-
validationErrors?: string[];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Validation error for form fields
|
|
79
|
-
*/
|
|
80
|
-
export interface ValidationError {
|
|
81
|
-
/**
|
|
82
|
-
* Field path (e.g., 'columns[0].key')
|
|
83
|
-
*/
|
|
84
|
-
field: string;
|
|
85
|
-
/**
|
|
86
|
-
* Error message
|
|
87
|
-
*/
|
|
88
|
-
message: string;
|
|
89
|
-
/**
|
|
90
|
-
* Error code
|
|
91
|
-
*/
|
|
92
|
-
code?: string;
|
|
93
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { TableConfig } from '../../models/table-config.interface';
|
|
3
|
-
import { ColumnConfig } from '../../models/column-config.interface';
|
|
4
|
-
import { BuilderState } from '../models/builder-state.interface';
|
|
5
|
-
import { CellDataType } from '../../models/cell-types';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class DefinitionBuilderService {
|
|
8
|
-
private stateSubject;
|
|
9
|
-
readonly state$: Observable<BuilderState>;
|
|
10
|
-
/**
|
|
11
|
-
* Get current state
|
|
12
|
-
*/
|
|
13
|
-
getState(): BuilderState;
|
|
14
|
-
/**
|
|
15
|
-
* Create initial empty state
|
|
16
|
-
*/
|
|
17
|
-
createInitialState(): BuilderState;
|
|
18
|
-
/**
|
|
19
|
-
* Initialize with a TableConfig
|
|
20
|
-
*/
|
|
21
|
-
initialize(config: TableConfig): void;
|
|
22
|
-
/**
|
|
23
|
-
* Create new definition (reset to empty)
|
|
24
|
-
*/
|
|
25
|
-
newDefinition(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Add a new column
|
|
28
|
-
*/
|
|
29
|
-
addColumn(type?: CellDataType): ColumnConfig;
|
|
30
|
-
/**
|
|
31
|
-
* Update a column at the given index
|
|
32
|
-
*/
|
|
33
|
-
updateColumn(index: number, updates: Partial<ColumnConfig>): void;
|
|
34
|
-
/**
|
|
35
|
-
* Delete a column at the given index
|
|
36
|
-
*/
|
|
37
|
-
deleteColumn(index: number): void;
|
|
38
|
-
/**
|
|
39
|
-
* Reorder columns
|
|
40
|
-
*/
|
|
41
|
-
reorderColumns(fromIndex: number, toIndex: number): void;
|
|
42
|
-
/**
|
|
43
|
-
* Select a column for editing
|
|
44
|
-
*/
|
|
45
|
-
selectColumn(index: number): void;
|
|
46
|
-
/**
|
|
47
|
-
* Clear column selection
|
|
48
|
-
*/
|
|
49
|
-
clearSelection(): void;
|
|
50
|
-
/**
|
|
51
|
-
* Update table configuration
|
|
52
|
-
*/
|
|
53
|
-
updateTableConfig(config: TableConfig): void;
|
|
54
|
-
/**
|
|
55
|
-
* Update table-level settings (pagination, sorting, etc.)
|
|
56
|
-
*/
|
|
57
|
-
updateTableSettings(settings: Partial<TableConfig>): void;
|
|
58
|
-
/**
|
|
59
|
-
* Toggle preview visibility
|
|
60
|
-
*/
|
|
61
|
-
togglePreview(): void;
|
|
62
|
-
/**
|
|
63
|
-
* Mark configuration as saved
|
|
64
|
-
*/
|
|
65
|
-
markAsSaved(): void;
|
|
66
|
-
/**
|
|
67
|
-
* Update state (internal)
|
|
68
|
-
*/
|
|
69
|
-
private updateState;
|
|
70
|
-
/**
|
|
71
|
-
* Generate unique column key
|
|
72
|
-
*/
|
|
73
|
-
private generateUniqueKey;
|
|
74
|
-
/**
|
|
75
|
-
* Compare two configs for equality (deep comparison)
|
|
76
|
-
*/
|
|
77
|
-
private configsEqual;
|
|
78
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DefinitionBuilderService, never>;
|
|
79
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DefinitionBuilderService>;
|
|
80
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { TableConfig } from '../../models/table-config.interface';
|
|
2
|
-
import { TypeScriptGeneratorOptions } from '../utils/typescript-generator.util';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class DefinitionExportService {
|
|
5
|
-
/**
|
|
6
|
-
* Export TableConfig to JSON string
|
|
7
|
-
* @param config Table configuration
|
|
8
|
-
* @param pretty Whether to format JSON with indentation
|
|
9
|
-
* @returns JSON string
|
|
10
|
-
*/
|
|
11
|
-
exportToJSON(config: TableConfig, pretty?: boolean): string;
|
|
12
|
-
/**
|
|
13
|
-
* Export TableConfig to TypeScript code
|
|
14
|
-
* @param config Table configuration
|
|
15
|
-
* @param options Generation options
|
|
16
|
-
* @returns TypeScript code string
|
|
17
|
-
*/
|
|
18
|
-
exportToTypeScript(config: TableConfig, options?: TypeScriptGeneratorOptions): string;
|
|
19
|
-
/**
|
|
20
|
-
* Download configuration as JSON file
|
|
21
|
-
* @param config Table configuration
|
|
22
|
-
* @param fileName File name (without extension)
|
|
23
|
-
*/
|
|
24
|
-
downloadAsJSON(config: TableConfig, fileName?: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Download configuration as TypeScript file
|
|
27
|
-
* @param config Table configuration
|
|
28
|
-
* @param fileName File name (without extension)
|
|
29
|
-
* @param options Generation options
|
|
30
|
-
*/
|
|
31
|
-
downloadAsTypeScript(config: TableConfig, fileName?: string, options?: TypeScriptGeneratorOptions): void;
|
|
32
|
-
/**
|
|
33
|
-
* Save configuration to localStorage
|
|
34
|
-
* @param config Table configuration
|
|
35
|
-
* @param key Storage key
|
|
36
|
-
*/
|
|
37
|
-
saveToLocalStorage(config: TableConfig, key?: string): void;
|
|
38
|
-
/**
|
|
39
|
-
* Load configuration from localStorage
|
|
40
|
-
* @param key Storage key
|
|
41
|
-
* @returns TableConfig or null if not found
|
|
42
|
-
*/
|
|
43
|
-
loadFromLocalStorage(key?: string): TableConfig | null;
|
|
44
|
-
/**
|
|
45
|
-
* Sanitize config for JSON serialization
|
|
46
|
-
* Removes functions, circular references, and other non-serializable values
|
|
47
|
-
*/
|
|
48
|
-
private sanitizeForJSON;
|
|
49
|
-
/**
|
|
50
|
-
* Sanitize column config for JSON serialization
|
|
51
|
-
*/
|
|
52
|
-
private sanitizeColumn;
|
|
53
|
-
/**
|
|
54
|
-
* Download file helper
|
|
55
|
-
*/
|
|
56
|
-
private downloadFile;
|
|
57
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DefinitionExportService, never>;
|
|
58
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DefinitionExportService>;
|
|
59
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ImportResult } from '../models/builder-state.interface';
|
|
2
|
-
import { JsonSchemaValidatorService } from '../../services/json-schema-validator.service';
|
|
3
|
-
import { ValidationLoggerService } from '../../services/validation-logger.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DefinitionImportService {
|
|
6
|
-
private schemaValidator;
|
|
7
|
-
private logger;
|
|
8
|
-
constructor(schemaValidator: JsonSchemaValidatorService, logger: ValidationLoggerService);
|
|
9
|
-
/**
|
|
10
|
-
* Import TableConfig from JSON string
|
|
11
|
-
* @param jsonString JSON string to parse
|
|
12
|
-
* @param skipSchemaValidation Skip JSON schema validation (use custom validation only)
|
|
13
|
-
* @param fileName Optional filename for logging context
|
|
14
|
-
* @returns Import result with success status and config or errors
|
|
15
|
-
*/
|
|
16
|
-
importFromJSON(jsonString: string, skipSchemaValidation?: boolean, fileName?: string): ImportResult;
|
|
17
|
-
/**
|
|
18
|
-
* Import TableConfig from File object
|
|
19
|
-
* @param file File to read
|
|
20
|
-
* @returns Promise with import result
|
|
21
|
-
*/
|
|
22
|
-
importFromFile(file: File): Promise<ImportResult>;
|
|
23
|
-
/**
|
|
24
|
-
* Import TableConfig from localStorage
|
|
25
|
-
* @param key Storage key
|
|
26
|
-
* @returns Import result
|
|
27
|
-
*/
|
|
28
|
-
importFromLocalStorage(key?: string): ImportResult;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DefinitionImportService, never>;
|
|
30
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DefinitionImportService>;
|
|
31
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ColumnConfig } from '../../models/column-config.interface';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class SampleDataGeneratorService {
|
|
4
|
-
/**
|
|
5
|
-
* Generate sample data based on column configurations
|
|
6
|
-
* @param columns Column configurations
|
|
7
|
-
* @param rowCount Number of rows to generate
|
|
8
|
-
* @returns Array of sample data objects
|
|
9
|
-
*/
|
|
10
|
-
generateSampleData(columns: ColumnConfig[], rowCount?: number): any[];
|
|
11
|
-
/**
|
|
12
|
-
* Generate a sample value for a specific column
|
|
13
|
-
* @param column Column configuration
|
|
14
|
-
* @param rowIndex Row index (for variation)
|
|
15
|
-
* @param allColumns All columns (for valueGetter context)
|
|
16
|
-
* @returns Sample value
|
|
17
|
-
*/
|
|
18
|
-
private generateValueForColumn;
|
|
19
|
-
/**
|
|
20
|
-
* Generate a basic sample row for valueGetter
|
|
21
|
-
*/
|
|
22
|
-
private generateBasicSampleRow;
|
|
23
|
-
/**
|
|
24
|
-
* Generate string value
|
|
25
|
-
*/
|
|
26
|
-
private generateStringValue;
|
|
27
|
-
/**
|
|
28
|
-
* Generate number value
|
|
29
|
-
*/
|
|
30
|
-
private generateNumberValue;
|
|
31
|
-
/**
|
|
32
|
-
* Generate date value
|
|
33
|
-
*/
|
|
34
|
-
private generateDateValue;
|
|
35
|
-
/**
|
|
36
|
-
* Generate boolean value
|
|
37
|
-
*/
|
|
38
|
-
private generateBooleanValue;
|
|
39
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SampleDataGeneratorService, never>;
|
|
40
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SampleDataGeneratorService>;
|
|
41
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration validator utility
|
|
3
|
-
* Validates TableConfig and ColumnConfig objects
|
|
4
|
-
*/
|
|
5
|
-
import { TableConfig } from '../../models/table-config.interface';
|
|
6
|
-
import { ColumnConfig } from '../../models/column-config.interface';
|
|
7
|
-
import { ValidationError } from '../models/builder-state.interface';
|
|
8
|
-
/**
|
|
9
|
-
* Validate a TableConfig
|
|
10
|
-
* @param config Table configuration to validate
|
|
11
|
-
* @returns Array of validation errors (empty if valid)
|
|
12
|
-
*/
|
|
13
|
-
export declare function validateTableConfig(config: TableConfig): ValidationError[];
|
|
14
|
-
/**
|
|
15
|
-
* Validate a ColumnConfig
|
|
16
|
-
* @param column Column configuration to validate
|
|
17
|
-
* @param index Column index (for error messages)
|
|
18
|
-
* @returns Array of validation errors (empty if valid)
|
|
19
|
-
*/
|
|
20
|
-
export declare function validateColumnConfig(column: ColumnConfig, index?: number): ValidationError[];
|
|
21
|
-
/**
|
|
22
|
-
* Check if a TableConfig is valid
|
|
23
|
-
* @param config Table configuration to check
|
|
24
|
-
* @returns True if valid, false otherwise
|
|
25
|
-
*/
|
|
26
|
-
export declare function isValidTableConfig(config: TableConfig): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Check if a ColumnConfig is valid
|
|
29
|
-
* @param column Column configuration to check
|
|
30
|
-
* @returns True if valid, false otherwise
|
|
31
|
-
*/
|
|
32
|
-
export declare function isValidColumnConfig(column: ColumnConfig): boolean;
|