@aquera/ngx-smart-table 0.0.16-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.
Files changed (170) hide show
  1. package/{fesm2020 → fesm2022}/aquera-ngx-smart-table.mjs +1664 -2107
  2. package/fesm2022/aquera-ngx-smart-table.mjs.map +1 -0
  3. package/package.json +8 -16
  4. package/types/aquera-ngx-smart-table.d.ts +5909 -0
  5. package/aquera-ngx-smart-table.d.ts +0 -5
  6. package/esm2020/aquera-ngx-smart-table.mjs +0 -5
  7. package/esm2020/lib/builder/components/builder-preview/builder-preview.component.mjs +0 -63
  8. package/esm2020/lib/builder/components/builder-toolbar/builder-toolbar.component.mjs +0 -115
  9. package/esm2020/lib/builder/components/column-editor/column-editor.component.mjs +0 -206
  10. package/esm2020/lib/builder/components/column-list/column-list.component.mjs +0 -125
  11. package/esm2020/lib/builder/components/definition-builder/definition-builder.component.mjs +0 -105
  12. package/esm2020/lib/builder/components/table-config-editor/table-config-editor.component.mjs +0 -132
  13. package/esm2020/lib/builder/definition-builder.module.mjs +0 -70
  14. package/esm2020/lib/builder/models/builder-state.interface.mjs +0 -5
  15. package/esm2020/lib/builder/services/definition-builder.service.mjs +0 -251
  16. package/esm2020/lib/builder/services/definition-export.service.mjs +0 -167
  17. package/esm2020/lib/builder/services/definition-import.service.mjs +0 -193
  18. package/esm2020/lib/builder/services/sample-data-generator.service.mjs +0 -126
  19. package/esm2020/lib/builder/utils/config-validator.util.mjs +0 -165
  20. package/esm2020/lib/builder/utils/typescript-generator.util.mjs +0 -206
  21. package/esm2020/lib/editors/index.mjs +0 -9
  22. package/esm2020/lib/editors/nile-autocomplete-editor.mjs +0 -228
  23. package/esm2020/lib/editors/nile-calendar-editor.mjs +0 -211
  24. package/esm2020/lib/editors/nile-date-picker-editor.mjs +0 -188
  25. package/esm2020/lib/editors/nile-input-editor.mjs +0 -235
  26. package/esm2020/lib/editors/nile-select-editor.mjs +0 -419
  27. package/esm2020/lib/factories/column-config.factory.mjs +0 -231
  28. package/esm2020/lib/models/autosave-config.interface.mjs +0 -8
  29. package/esm2020/lib/models/base-column-config.class.mjs +0 -253
  30. package/esm2020/lib/models/cell-strategies.interface.mjs +0 -6
  31. package/esm2020/lib/models/cell-types.mjs +0 -147
  32. package/esm2020/lib/models/column-action.interface.mjs +0 -6
  33. package/esm2020/lib/models/column-config.interface.mjs +0 -43
  34. package/esm2020/lib/models/column-config.utils.mjs +0 -101
  35. package/esm2020/lib/models/row-action.interface.mjs +0 -5
  36. package/esm2020/lib/models/row-validator.interface.mjs +0 -2
  37. package/esm2020/lib/models/schema-validation.interface.mjs +0 -2
  38. package/esm2020/lib/models/sheet-action.interface.mjs +0 -5
  39. package/esm2020/lib/models/sheet-config.interface.mjs +0 -5
  40. package/esm2020/lib/models/table-config.interface.mjs +0 -107
  41. package/esm2020/lib/models/table-validator.interface.mjs +0 -2
  42. package/esm2020/lib/models/workbook-action.interface.mjs +0 -5
  43. package/esm2020/lib/models/workbook-config.interface.mjs +0 -5
  44. package/esm2020/lib/renderer/components/st-add-column-button/st-add-column-button.component.mjs +0 -24
  45. package/esm2020/lib/renderer/components/st-cell/st-cell.component.mjs +0 -397
  46. package/esm2020/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.mjs +0 -103
  47. package/esm2020/lib/renderer/components/st-column-filter/st-column-filter.component.mjs +0 -383
  48. package/esm2020/lib/renderer/components/st-column-menu/st-column-menu.component.mjs +0 -232
  49. package/esm2020/lib/renderer/components/st-column-visibility/st-column-visibility.component.mjs +0 -97
  50. package/esm2020/lib/renderer/components/st-header/st-header.component.mjs +0 -157
  51. package/esm2020/lib/renderer/components/st-pagination/st-pagination.component.mjs +0 -87
  52. package/esm2020/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.mjs +0 -167
  53. package/esm2020/lib/renderer/components/st-sheet/st-sheet.component.mjs +0 -165
  54. package/esm2020/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.mjs +0 -112
  55. package/esm2020/lib/renderer/components/st-table/st-table.component.mjs +0 -1453
  56. package/esm2020/lib/renderer/components/st-table-actions/st-table-actions.component.mjs +0 -169
  57. package/esm2020/lib/renderer/components/st-workbook/st-workbook.component.mjs +0 -581
  58. package/esm2020/lib/renderer/directives/click-outside.directive.mjs +0 -28
  59. package/esm2020/lib/renderer/directives/st-column-resize.directive.mjs +0 -108
  60. package/esm2020/lib/renderer/directives/st-keyboard-navigation.directive.mjs +0 -83
  61. package/esm2020/lib/renderer/models/cell-state.interface.mjs +0 -66
  62. package/esm2020/lib/renderer/models/cell.class.mjs +0 -389
  63. package/esm2020/lib/renderer/models/row-validation-state.interface.mjs +0 -7
  64. package/esm2020/lib/renderer/models/sheet-state.class.mjs +0 -90
  65. package/esm2020/lib/renderer/models/sheet-state.interface.mjs +0 -5
  66. package/esm2020/lib/renderer/models/table-state.class.mjs +0 -871
  67. package/esm2020/lib/renderer/models/table-state.interface.mjs +0 -5
  68. package/esm2020/lib/renderer/models/table-types.mjs +0 -29
  69. package/esm2020/lib/renderer/models/table-validation-state.interface.mjs +0 -7
  70. package/esm2020/lib/renderer/models/workbook-state.class.mjs +0 -174
  71. package/esm2020/lib/renderer/models/workbook-state.interface.mjs +0 -5
  72. package/esm2020/lib/renderer/models/z-index.enum.mjs +0 -55
  73. package/esm2020/lib/schemas/table-config.schema.mjs +0 -472
  74. package/esm2020/lib/services/autosave.service.mjs +0 -92
  75. package/esm2020/lib/services/custom-validation-rules.util.mjs +0 -124
  76. package/esm2020/lib/services/json-schema-validator.service.mjs +0 -216
  77. package/esm2020/lib/services/row-validation.service.mjs +0 -42
  78. package/esm2020/lib/services/validation-logger.service.mjs +0 -177
  79. package/esm2020/lib/services/virtual-scroll.service.mjs +0 -52
  80. package/esm2020/lib/shared/shared-table-components.module.mjs +0 -35
  81. package/esm2020/lib/smart-table.module.mjs +0 -124
  82. package/esm2020/lib/strategies/default-editors.mjs +0 -433
  83. package/esm2020/lib/strategies/default-formatters.mjs +0 -238
  84. package/esm2020/lib/strategies/default-validators.mjs +0 -327
  85. package/esm2020/public-api.mjs +0 -146
  86. package/fesm2015/aquera-ngx-smart-table.mjs +0 -12267
  87. package/fesm2015/aquera-ngx-smart-table.mjs.map +0 -1
  88. package/fesm2020/aquera-ngx-smart-table.mjs.map +0 -1
  89. package/lib/builder/components/builder-preview/builder-preview.component.d.ts +0 -31
  90. package/lib/builder/components/builder-toolbar/builder-toolbar.component.d.ts +0 -53
  91. package/lib/builder/components/column-editor/column-editor.component.d.ts +0 -69
  92. package/lib/builder/components/column-list/column-list.component.d.ts +0 -65
  93. package/lib/builder/components/definition-builder/definition-builder.component.d.ts +0 -58
  94. package/lib/builder/components/table-config-editor/table-config-editor.component.d.ts +0 -32
  95. package/lib/builder/definition-builder.module.d.ts +0 -15
  96. package/lib/builder/models/builder-state.interface.d.ts +0 -93
  97. package/lib/builder/services/definition-builder.service.d.ts +0 -80
  98. package/lib/builder/services/definition-export.service.d.ts +0 -59
  99. package/lib/builder/services/definition-import.service.d.ts +0 -31
  100. package/lib/builder/services/sample-data-generator.service.d.ts +0 -41
  101. package/lib/builder/utils/config-validator.util.d.ts +0 -32
  102. package/lib/builder/utils/typescript-generator.util.d.ts +0 -29
  103. package/lib/editors/index.d.ts +0 -8
  104. package/lib/editors/nile-autocomplete-editor.d.ts +0 -102
  105. package/lib/editors/nile-calendar-editor.d.ts +0 -88
  106. package/lib/editors/nile-date-picker-editor.d.ts +0 -97
  107. package/lib/editors/nile-input-editor.d.ts +0 -67
  108. package/lib/editors/nile-select-editor.d.ts +0 -110
  109. package/lib/factories/column-config.factory.d.ts +0 -73
  110. package/lib/models/autosave-config.interface.d.ts +0 -23
  111. package/lib/models/base-column-config.class.d.ts +0 -115
  112. package/lib/models/cell-strategies.interface.d.ts +0 -188
  113. package/lib/models/cell-types.d.ts +0 -337
  114. package/lib/models/column-action.interface.d.ts +0 -86
  115. package/lib/models/column-config.interface.d.ts +0 -272
  116. package/lib/models/column-config.utils.d.ts +0 -37
  117. package/lib/models/row-action.interface.d.ts +0 -86
  118. package/lib/models/row-validator.interface.d.ts +0 -37
  119. package/lib/models/schema-validation.interface.d.ts +0 -42
  120. package/lib/models/sheet-action.interface.d.ts +0 -59
  121. package/lib/models/sheet-config.interface.d.ts +0 -41
  122. package/lib/models/table-config.interface.d.ts +0 -251
  123. package/lib/models/table-validator.interface.d.ts +0 -40
  124. package/lib/models/workbook-action.interface.d.ts +0 -95
  125. package/lib/models/workbook-config.interface.d.ts +0 -107
  126. package/lib/renderer/components/st-add-column-button/st-add-column-button.component.d.ts +0 -9
  127. package/lib/renderer/components/st-cell/st-cell.component.d.ts +0 -69
  128. package/lib/renderer/components/st-column-editor-modal/st-column-editor-modal.component.d.ts +0 -39
  129. package/lib/renderer/components/st-column-filter/st-column-filter.component.d.ts +0 -139
  130. package/lib/renderer/components/st-column-menu/st-column-menu.component.d.ts +0 -81
  131. package/lib/renderer/components/st-column-visibility/st-column-visibility.component.d.ts +0 -44
  132. package/lib/renderer/components/st-header/st-header.component.d.ts +0 -93
  133. package/lib/renderer/components/st-pagination/st-pagination.component.d.ts +0 -42
  134. package/lib/renderer/components/st-row-actions-dropdown/st-row-actions-dropdown.component.d.ts +0 -67
  135. package/lib/renderer/components/st-sheet/st-sheet.component.d.ts +0 -98
  136. package/lib/renderer/components/st-sheet-actions/st-sheet-actions.component.d.ts +0 -58
  137. package/lib/renderer/components/st-table/st-table.component.d.ts +0 -380
  138. package/lib/renderer/components/st-table-actions/st-table-actions.component.d.ts +0 -77
  139. package/lib/renderer/components/st-workbook/st-workbook.component.d.ts +0 -275
  140. package/lib/renderer/directives/click-outside.directive.d.ts +0 -10
  141. package/lib/renderer/directives/st-column-resize.directive.d.ts +0 -44
  142. package/lib/renderer/directives/st-keyboard-navigation.directive.d.ts +0 -19
  143. package/lib/renderer/models/cell-state.interface.d.ts +0 -118
  144. package/lib/renderer/models/cell.class.d.ts +0 -174
  145. package/lib/renderer/models/row-validation-state.interface.d.ts +0 -27
  146. package/lib/renderer/models/sheet-state.class.d.ts +0 -67
  147. package/lib/renderer/models/sheet-state.interface.d.ts +0 -55
  148. package/lib/renderer/models/table-state.class.d.ts +0 -320
  149. package/lib/renderer/models/table-state.interface.d.ts +0 -18
  150. package/lib/renderer/models/table-types.d.ts +0 -228
  151. package/lib/renderer/models/table-validation-state.interface.d.ts +0 -34
  152. package/lib/renderer/models/workbook-state.class.d.ts +0 -117
  153. package/lib/renderer/models/workbook-state.interface.d.ts +0 -71
  154. package/lib/renderer/models/z-index.enum.d.ts +0 -44
  155. package/lib/schemas/table-config.schema.d.ts +0 -455
  156. package/lib/services/autosave.service.d.ts +0 -73
  157. package/lib/services/custom-validation-rules.util.d.ts +0 -12
  158. package/lib/services/json-schema-validator.service.d.ts +0 -49
  159. package/lib/services/row-validation.service.d.ts +0 -17
  160. package/lib/services/validation-logger.service.d.ts +0 -87
  161. package/lib/services/virtual-scroll.service.d.ts +0 -44
  162. package/lib/shared/shared-table-components.module.d.ts +0 -9
  163. package/lib/smart-table.module.d.ts +0 -26
  164. package/lib/strategies/default-editors.d.ts +0 -109
  165. package/lib/strategies/default-formatters.d.ts +0 -116
  166. package/lib/strategies/default-validators.d.ts +0 -113
  167. package/public-api.d.ts +0 -70
  168. package/src/lib/builder/README.md +0 -30
  169. package/src/lib/editors/README.md +0 -303
  170. package/src/lib/renderer/components/st-column-filter/README.md +0 -286
@@ -1,29 +0,0 @@
1
- /**
2
- * TypeScript code generator utility
3
- * Converts TableConfig to TypeScript code using ColumnConfigFactory
4
- */
5
- import { TableConfig } from '../../models/table-config.interface';
6
- /**
7
- * Options for TypeScript code generation
8
- */
9
- export interface TypeScriptGeneratorOptions {
10
- /**
11
- * Variable name for the exported config
12
- */
13
- variableName?: string;
14
- /**
15
- * Include comments in generated code
16
- */
17
- includeComments?: boolean;
18
- /**
19
- * Indentation string (default: 2 spaces)
20
- */
21
- indent?: string;
22
- }
23
- /**
24
- * Generate TypeScript code from TableConfig
25
- * @param config Table configuration
26
- * @param options Generation options
27
- * @returns TypeScript code string
28
- */
29
- export declare function generateTypeScriptCode(config: TableConfig, options?: TypeScriptGeneratorOptions): string;
@@ -1,8 +0,0 @@
1
- /**
2
- * Custom cell editors for ngx-smart-table
3
- */
4
- export { NileInputEditor, NileInputEditorOptions } from './nile-input-editor';
5
- export { NileSelectEditor, NileSelectEditorOptions, SelectOption } from './nile-select-editor';
6
- export { NileAutoCompleteEditor, NileAutoCompleteEditorOptions, AutoCompleteOption } from './nile-autocomplete-editor';
7
- export { NileCalendarEditor, NileCalendarEditorOptions, AllowedDatesRange } from './nile-calendar-editor';
8
- export { NileDatePickerEditor, NileDatePickerEditorOptions, DateRange } from './nile-date-picker-editor';
@@ -1,102 +0,0 @@
1
- /**
2
- * Custom editor using NileAutoComplete from @aquera/nile-elements
3
- * Provides real-time suggestions as users type in table cells
4
- */
5
- import { CellEditor, CellEditorContext } from '../models/cell-strategies.interface';
6
- /**
7
- * Autocomplete option configuration
8
- */
9
- export interface AutoCompleteOption {
10
- /** The option's value */
11
- value: string;
12
- /** Display label for the option */
13
- label: string;
14
- /** Whether the option is disabled */
15
- disabled?: boolean;
16
- }
17
- /**
18
- * Options interface for NileAutoCompleteEditor
19
- */
20
- export interface NileAutoCompleteEditorOptions {
21
- /** Array of autocomplete suggestions - supports both simple string array or detailed AutoCompleteOption objects */
22
- options: AutoCompleteOption[] | string[];
23
- /** Placeholder text to show as a hint when the search is empty */
24
- placeholder?: string;
25
- /** Disable the autocomplete control */
26
- disabled?: boolean;
27
- /** Help text to display below the control */
28
- helpText?: string;
29
- /** Size of the autocomplete control */
30
- size?: 'small' | 'medium' | 'large';
31
- /** Adds clear button when value is not empty */
32
- clearable?: boolean;
33
- /** Make the autocomplete required */
34
- required?: boolean;
35
- /** Auto-focus the input when editor opens */
36
- autoFocus?: boolean;
37
- /** Select all text when focused */
38
- selectOnFocus?: boolean;
39
- /** Warning state styling */
40
- warning?: boolean;
41
- /** Error state styling */
42
- error?: boolean;
43
- /** Success state styling */
44
- success?: boolean;
45
- /** Error message to display */
46
- errorMessage?: string;
47
- /** Minimum number of characters before showing suggestions */
48
- minSearchLength?: number;
49
- /** Maximum number of suggestions to show */
50
- maxSuggestions?: number;
51
- /** Case-sensitive matching */
52
- caseSensitive?: boolean;
53
- /** Filter mode for matching suggestions */
54
- filterMode?: 'startsWith' | 'contains' | 'custom';
55
- /** Custom filter function for matching */
56
- customFilter?: (input: string, option: AutoCompleteOption) => boolean;
57
- /** Draws a filled autocomplete style */
58
- filled?: boolean;
59
- /** Pill-style with rounded edges */
60
- pill?: boolean;
61
- /** Use fixed positioning to prevent clipping */
62
- hoist?: boolean;
63
- /** Placement of the suggestions dropdown */
64
- placement?: 'top' | 'bottom';
65
- /** Validate before saving (default: true) */
66
- validateOnSave?: boolean;
67
- }
68
- /**
69
- * Custom editor that uses NileAutoComplete component
70
- * @template T The value type (string by default)
71
- */
72
- export declare class NileAutoCompleteEditor<T = string> implements CellEditor<T> {
73
- private readonly options;
74
- private autocomplete?;
75
- private eventListeners;
76
- constructor(options: NileAutoCompleteEditorOptions);
77
- edit(context: CellEditorContext<T>): void;
78
- /**
79
- * Set allMenuItems property for autocomplete suggestions
80
- * NileAutoComplete requires allMenuItems to be set as a property, not child elements
81
- */
82
- private setMenuItems;
83
- /**
84
- * Apply all configuration options to the NileAutoComplete element
85
- */
86
- private applyOptions;
87
- /**
88
- * Set up all event listeners with proper cleanup tracking
89
- */
90
- private setupEventListeners;
91
- /**
92
- * Save value with optional validation
93
- */
94
- private saveValue;
95
- /**
96
- * Parse value to appropriate type
97
- */
98
- private parseValue;
99
- destroy(): void;
100
- focus(): void;
101
- getCurrentValue(): T;
102
- }
@@ -1,88 +0,0 @@
1
- /**
2
- * Custom editor using NileCalendar from @aquera/nile-elements
3
- * Provides date selection functionality for table cells
4
- */
5
- import { CellEditor, CellEditorContext } from '../models/cell-strategies.interface';
6
- /**
7
- * Date range configuration for restricting allowed dates
8
- */
9
- export interface AllowedDatesRange {
10
- /** Start date in ISO format (YYYY-MM-DD) */
11
- startDate?: string;
12
- /** End date in ISO format (YYYY-MM-DD) */
13
- endDate?: string;
14
- }
15
- /**
16
- * Options interface for NileCalendarEditor
17
- */
18
- export interface NileCalendarEditorOptions {
19
- /** Placeholder text to show when no date is selected */
20
- placeholder?: string;
21
- /** Disable the calendar control */
22
- disabled?: boolean;
23
- /** Help text to display below the control */
24
- helpText?: string;
25
- /** Date format for display (default: 'YYYY-MM-DD') */
26
- dateFormat?: string;
27
- /** Start year for year dropdown */
28
- startYear?: number;
29
- /** End year for year dropdown */
30
- endYear?: number;
31
- /** Date range restrictions */
32
- allowedDates?: AllowedDatesRange;
33
- /** Show clear button for removing date */
34
- allowClear?: boolean;
35
- /** Allow double-click to unselect date */
36
- doubleClickUnselect?: boolean;
37
- /** Show month selection dropdown */
38
- showMonthDropdown?: boolean;
39
- /** Show year selection dropdown */
40
- showYearDropdown?: boolean;
41
- /** Allow manual date input via text fields */
42
- showManualInputs?: boolean;
43
- /** Auto-focus the calendar when editor opens */
44
- autoFocus?: boolean;
45
- /** Warning state styling */
46
- warning?: boolean;
47
- /** Error state styling */
48
- error?: boolean;
49
- /** Success state styling */
50
- success?: boolean;
51
- /** Error message to display */
52
- errorMessage?: string;
53
- /** Size of the calendar control */
54
- size?: 'small' | 'medium' | 'large';
55
- /** Validate before saving (default: true) */
56
- validateOnSave?: boolean;
57
- }
58
- /**
59
- * Custom editor that uses NileCalendar component for date selection
60
- * @template T The value type (string by default, formatted as YYYY-MM-DD)
61
- */
62
- export declare class NileCalendarEditor<T = string> implements CellEditor<T> {
63
- private readonly options?;
64
- acceptsInitialKeypress: boolean;
65
- private calendar?;
66
- private eventListeners;
67
- constructor(options?: NileCalendarEditorOptions | undefined);
68
- edit(context: CellEditorContext<T>): void;
69
- /**
70
- * Apply all configuration options to the NileCalendar element
71
- */
72
- private applyOptions;
73
- /**
74
- * Set up all event listeners with proper cleanup tracking
75
- */
76
- private setupEventListeners;
77
- /**
78
- * Save value with optional validation
79
- */
80
- private saveValue;
81
- /**
82
- * Parse value to appropriate type
83
- */
84
- private parseValue;
85
- destroy(): void;
86
- focus(): void;
87
- getCurrentValue(): T;
88
- }
@@ -1,97 +0,0 @@
1
- /**
2
- * Custom editor using NileDatePicker from @aquera/nile-elements
3
- * Supports both single date and range selection with slot-based trigger div
4
- * Returns string values for both modes:
5
- * - Single mode: 'YYYY-MM-DD'
6
- * - Range mode: 'YYYY-MM-DD - YYYY-MM-DD'
7
- */
8
- import { CellEditor, CellEditorContext } from '../models/cell-strategies.interface';
9
- /**
10
- * Date range value interface (kept for reference but not used as return type)
11
- * The editor returns string values instead
12
- */
13
- export interface DateRange {
14
- /** Start date in ISO format (YYYY-MM-DD) */
15
- startDate: string;
16
- /** End date in ISO format (YYYY-MM-DD) */
17
- endDate: string;
18
- }
19
- /**
20
- * Options interface for NileDatePickerEditor
21
- */
22
- export interface NileDatePickerEditorOptions {
23
- /** Placeholder text to show when no date is selected */
24
- placeholder?: string;
25
- /** Label for the trigger input */
26
- label?: string;
27
- /** Disable the date picker control */
28
- disabled?: boolean;
29
- /** Help text to display below the control */
30
- helpText?: string;
31
- /** Date format for display (default: 'YYYY-MM-DD') */
32
- dateFormat?: string;
33
- /** Enable range selection mode */
34
- range?: boolean;
35
- /** Sync date pickers in range mode */
36
- syncDatePicker?: boolean;
37
- /** Show clear button for removing date */
38
- clearable?: boolean;
39
- /** Auto-focus the date picker when editor opens */
40
- autoFocus?: boolean;
41
- /** Warning state styling */
42
- warning?: boolean;
43
- /** Error state styling */
44
- error?: boolean;
45
- /** Success state styling */
46
- success?: boolean;
47
- /** Error message to display */
48
- errorMessage?: string;
49
- /** Size of the date picker control */
50
- size?: number;
51
- /** Filled style for the input */
52
- filled?: boolean;
53
- /** Pill style for the input */
54
- pill?: boolean;
55
- /** Validate before saving (default: true) */
56
- validateOnSave?: boolean;
57
- }
58
- /**
59
- * Custom editor using NileDatePicker component
60
- * Supports both single date and range selection
61
- * @template T The value type - string for both single and range modes
62
- * Single mode: 'YYYY-MM-DD'
63
- * Range mode: 'YYYY-MM-DD - YYYY-MM-DD'
64
- */
65
- export declare class NileDatePickerEditor<T = string> implements CellEditor<T> {
66
- private readonly options?;
67
- acceptsInitialKeypress: boolean;
68
- private datePicker?;
69
- private triggerDiv?;
70
- private eventListeners;
71
- constructor(options?: NileDatePickerEditorOptions | undefined);
72
- edit(context: CellEditorContext<T>): void;
73
- /**
74
- * Set initial value in the trigger div
75
- */
76
- private setInitialValue;
77
- /**
78
- * Apply configuration options to the date picker
79
- * Note: Trigger is now a simple div, so input-specific options are not applied
80
- */
81
- private applyOptions;
82
- /**
83
- * Set up all event listeners with proper cleanup tracking
84
- */
85
- private setupEventListeners;
86
- /**
87
- * Save value with optional validation
88
- */
89
- private saveValue;
90
- /**
91
- * Parse value from string to appropriate type
92
- */
93
- private parseValue;
94
- getCurrentValue(): T;
95
- destroy(): void;
96
- focus(): void;
97
- }
@@ -1,67 +0,0 @@
1
- /**
2
- * Custom editor using NileInput from @aquera/nile-elements
3
- * This demonstrates how to create custom editors for ngx-smart-table
4
- */
5
- import { CellEditor, CellEditorContext } from '../models/cell-strategies.interface';
6
- /**
7
- * Options interface for NileInputEditor
8
- */
9
- export interface NileInputEditorOptions {
10
- placeholder?: string;
11
- maxLength?: number;
12
- minLength?: number;
13
- autoFocus?: boolean;
14
- selectOnFocus?: boolean;
15
- type?: 'text' | 'email' | 'tel' | 'url' | 'search' | 'number' | 'password' | 'date' | 'time' | 'datetime-local';
16
- size?: 'small' | 'medium' | 'large';
17
- filled?: boolean;
18
- pill?: boolean;
19
- clearable?: boolean;
20
- disabled?: boolean;
21
- readonly?: boolean;
22
- required?: boolean;
23
- pattern?: string;
24
- min?: number | string;
25
- max?: number | string;
26
- step?: number | 'any';
27
- warning?: boolean;
28
- error?: boolean;
29
- success?: boolean;
30
- errorMessage?: string;
31
- helpText?: string;
32
- enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
33
- spellcheck?: boolean;
34
- autocomplete?: string;
35
- inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
36
- validateOnSave?: boolean;
37
- }
38
- /**
39
- * Custom editor that uses NileInput component
40
- * @template T The value type (string, number, or both)
41
- */
42
- export declare class NileInputEditor<T = string> implements CellEditor<T> {
43
- private readonly options?;
44
- private input?;
45
- private eventListeners;
46
- constructor(options?: NileInputEditorOptions | undefined);
47
- edit(context: CellEditorContext<T>): void;
48
- /**
49
- * Apply all configuration options to the NileInput element
50
- */
51
- private applyOptions;
52
- /**
53
- * Set up all event listeners with proper cleanup tracking
54
- */
55
- private setupEventListeners;
56
- /**
57
- * Save value with optional validation
58
- */
59
- private saveValue;
60
- /**
61
- * Parse value based on input type
62
- */
63
- private parseValue;
64
- destroy(): void;
65
- focus(): void;
66
- getCurrentValue(): T;
67
- }
@@ -1,110 +0,0 @@
1
- /**
2
- * Custom editor using NileSelect from @aquera/nile-elements
3
- * This demonstrates how to create dropdown/select editors for ngx-smart-table
4
- */
5
- import { CellEditor, CellEditorContext } from '../models/cell-strategies.interface';
6
- import { Observable } from 'rxjs';
7
- /**
8
- * Select option configuration
9
- */
10
- export interface SelectOption {
11
- /** The option's value */
12
- value: string;
13
- /** Display label for the option */
14
- label: string;
15
- /** Whether the option is disabled */
16
- disabled?: boolean;
17
- /** Optional prefix icon or content */
18
- prefix?: string;
19
- }
20
- /**
21
- * Options interface for NileSelectEditor
22
- */
23
- export interface NileSelectEditorOptions {
24
- /** Array of options - supports static arrays, Observable, or BehaviorSubject for reactive updates */
25
- options: SelectOption[] | string[] | Observable<SelectOption[] | string[]>;
26
- /** Placeholder text when no selection is made */
27
- placeholder?: string;
28
- /** Size of the select control */
29
- size?: 'small' | 'medium' | 'large';
30
- /** Enable multiple selection mode */
31
- multiple?: boolean;
32
- /** Adds clear button when value is not empty */
33
- clearable?: boolean;
34
- /** Disable the select control */
35
- disabled?: boolean;
36
- /** Make the select required */
37
- required?: boolean;
38
- /** Enable search functionality */
39
- searchEnabled?: boolean;
40
- /** Warning state styling */
41
- warning?: boolean;
42
- /** Error state styling */
43
- error?: boolean;
44
- /** Success state styling */
45
- success?: boolean;
46
- /** Error message to display */
47
- errorMessage?: string;
48
- /** Help text to display */
49
- helpText?: string;
50
- /** Maximum number of selected options to show in multiple mode (0 = no limit) */
51
- maxOptionsVisible?: number;
52
- /** Draws a filled select style */
53
- filled?: boolean;
54
- /** Pill-style with rounded edges */
55
- pill?: boolean;
56
- /** Use fixed positioning to prevent clipping */
57
- hoist?: boolean;
58
- /** Placement of the dropdown menu */
59
- placement?: 'top' | 'bottom';
60
- /** Enable virtual scrolling for better performance with many options */
61
- enableVirtualScroll?: boolean;
62
- /** Disable local search (use for server-side search) */
63
- disableLocalSearch?: boolean;
64
- /** Validate before saving (default: true) */
65
- validateOnSave?: boolean;
66
- /** Append dropdown to document body instead of parent */
67
- portal?: boolean;
68
- }
69
- /**
70
- * Custom editor that uses NileSelect component
71
- * @template T The value type (string for single selection, string[] for multiple)
72
- */
73
- export declare class NileSelectEditor<T = string> implements CellEditor<T> {
74
- private readonly options;
75
- acceptsInitialKeypress: boolean;
76
- private select?;
77
- private eventListeners;
78
- private optionsSubscription?;
79
- private currentOptions;
80
- constructor(options: NileSelectEditorOptions);
81
- edit(context: CellEditorContext<T>): void;
82
- /**
83
- * Set the initial value for the select
84
- */
85
- private setInitialValue;
86
- /**
87
- * Apply all configuration options to the NileSelect element
88
- */
89
- private applyOptions;
90
- /**
91
- * Update options dynamically while editor is active
92
- */
93
- private updateOptions;
94
- /**
95
- * Create NileOption elements and append them to the select
96
- * @param options - The options to render
97
- */
98
- private createAndAppendOptions;
99
- /**
100
- * Set up all event listeners with proper cleanup tracking
101
- */
102
- private setupEventListeners;
103
- /**
104
- * Parse value based on selection mode
105
- */
106
- private parseValue;
107
- destroy(): void;
108
- focus(): void;
109
- getCurrentValue(): T;
110
- }
@@ -1,73 +0,0 @@
1
- /**
2
- * Column configuration factory
3
- * Simplifies creation of common column types with sensible defaults
4
- */
5
- import { ColumnConfig } from '../models/column-config.interface';
6
- /**
7
- * Column configuration factory - Factory Pattern
8
- * Provides convenient methods to create pre-configured column types
9
- */
10
- export declare class ColumnConfigFactory {
11
- /**
12
- * Create a text column
13
- */
14
- static text(key: string, options?: Partial<ColumnConfig<string>>): ColumnConfig<string>;
15
- /**
16
- * Create a number column
17
- */
18
- static number(key: string, options?: Partial<ColumnConfig<number>>): ColumnConfig<number>;
19
- /**
20
- * Create a currency column
21
- */
22
- static currency(key: string, options?: Partial<ColumnConfig<number>> & {
23
- currency?: string;
24
- locale?: string;
25
- }): ColumnConfig<number>;
26
- /**
27
- * Create a date column
28
- */
29
- static date(key: string, options?: Partial<ColumnConfig<Date>> & {
30
- dateStyle?: 'full' | 'long' | 'medium' | 'short';
31
- locale?: string;
32
- }): ColumnConfig<Date>;
33
- /**
34
- * Create a boolean column
35
- */
36
- static boolean(key: string, options?: Partial<ColumnConfig<boolean>> & {
37
- trueValue?: string;
38
- falseValue?: string;
39
- }): ColumnConfig<boolean>;
40
- /**
41
- * Create a select/dropdown column
42
- */
43
- static select<T = string>(key: string, selectOptions: Array<{
44
- value: T;
45
- label: string;
46
- }>, options?: Partial<ColumnConfig<T>>): ColumnConfig<T>;
47
- /**
48
- * Create an email column
49
- */
50
- static email(key: string, options?: Partial<ColumnConfig<string>>): ColumnConfig<string>;
51
- /**
52
- * Create a readonly column
53
- */
54
- static readonly<T = any>(key: string, options?: Partial<ColumnConfig<T>>): ColumnConfig<T>;
55
- /**
56
- * Create a custom column with full control
57
- */
58
- static custom<T = any>(config: Partial<ColumnConfig<T>> & {
59
- key: string;
60
- }): ColumnConfig<T>;
61
- /**
62
- * Create multiple columns at once from a simple configuration
63
- */
64
- static fromKeys<T extends Record<string, any>>(keys: Array<keyof T | {
65
- key: keyof T;
66
- type?: 'text' | 'number' | 'date' | 'boolean';
67
- options?: any;
68
- }>): ColumnConfig<any>[];
69
- }
70
- /**
71
- * Convenience exports for common column types
72
- */
73
- export declare const Columns: typeof ColumnConfigFactory;
@@ -1,23 +0,0 @@
1
- /**
2
- * Autosave strategy types
3
- */
4
- export declare type AutosaveStrategy = 'lazy' | 'eager';
5
- /**
6
- * Autosave configuration interface
7
- */
8
- export interface AutosaveConfig {
9
- /**
10
- * Whether autosave is enabled
11
- */
12
- enabled: boolean;
13
- /**
14
- * Autosave strategy:
15
- * - 'lazy': Saves after user stops making changes (2s debounce)
16
- * - 'eager': Saves on every change (100ms debounce)
17
- */
18
- strategy: AutosaveStrategy;
19
- }
20
- /**
21
- * Default autosave configuration
22
- */
23
- export declare const DEFAULT_AUTOSAVE_CONFIG: AutosaveConfig;