@aquera/ngx-smart-table 0.0.23 → 0.0.25
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/package.json
CHANGED
|
@@ -951,9 +951,11 @@ interface ColumnConfig<T = any> {
|
|
|
951
951
|
*/
|
|
952
952
|
readonly dataType?: CellDataType;
|
|
953
953
|
/**
|
|
954
|
-
* Formatter strategy for displaying cell values
|
|
954
|
+
* Formatter strategy for displaying cell values.
|
|
955
|
+
* Can be a CellFormatter instance or a predefined formatter name string
|
|
956
|
+
* (e.g. 'ouFormatter'). Use registerFormatter() to add custom named formatters.
|
|
955
957
|
*/
|
|
956
|
-
readonly formatter?: CellFormatter<T
|
|
958
|
+
readonly formatter?: CellFormatter<T> | string;
|
|
957
959
|
/**
|
|
958
960
|
* Validator strategy for validating cell values
|
|
959
961
|
*/
|
|
@@ -2845,7 +2847,7 @@ declare abstract class BaseColumnConfig<T = any> implements ColumnConfig<T> {
|
|
|
2845
2847
|
readonly key: string;
|
|
2846
2848
|
readonly header?: string;
|
|
2847
2849
|
readonly dataType?: CellDataType;
|
|
2848
|
-
readonly formatter?: CellFormatter<T
|
|
2850
|
+
readonly formatter?: CellFormatter<T> | string;
|
|
2849
2851
|
readonly validator?: CellValidator<T>;
|
|
2850
2852
|
readonly editor?: CellEditor<T>;
|
|
2851
2853
|
readonly parser?: CellParser<T>;
|
|
@@ -3062,6 +3064,63 @@ declare class DefaultFormatter implements CellFormatter<any> {
|
|
|
3062
3064
|
format(value: any): string;
|
|
3063
3065
|
}
|
|
3064
3066
|
|
|
3067
|
+
/**
|
|
3068
|
+
* Convert an LDAP Distinguished Name (DN) string to a human-readable path.
|
|
3069
|
+
*
|
|
3070
|
+
* @example
|
|
3071
|
+
* "OU=Engineering,OU=India,DC=company,DC=com"
|
|
3072
|
+
* → "Engineering / India (company.com)"
|
|
3073
|
+
*
|
|
3074
|
+
* "CN=John Smith,OU=Admins,OU=Engineering,DC=company,DC=com"
|
|
3075
|
+
* → "John Smith / Admins / Engineering (company.com)"
|
|
3076
|
+
*
|
|
3077
|
+
* "OU=R\\,D,OU=Teams,DC=example,DC=org"
|
|
3078
|
+
* → "R,D / Teams (example.org)"
|
|
3079
|
+
*/
|
|
3080
|
+
declare function dnToHumanReadable(dn: string): string;
|
|
3081
|
+
interface OUFormatterOptions {
|
|
3082
|
+
/** Separator between OU components (default: ' / ') */
|
|
3083
|
+
separator?: string;
|
|
3084
|
+
/** Whether to show the domain suffix from DC components (default: true) */
|
|
3085
|
+
showDomain?: boolean;
|
|
3086
|
+
/** Fallback text when value is empty or not a valid DN (default: '') */
|
|
3087
|
+
emptyText?: string;
|
|
3088
|
+
/** Separator between multiple formatted DNs when value is an array (default: ', ') */
|
|
3089
|
+
arraySeparator?: string;
|
|
3090
|
+
}
|
|
3091
|
+
/**
|
|
3092
|
+
* Cell formatter that converts LDAP Distinguished Name (DN) strings
|
|
3093
|
+
* into human-readable OU paths with optional domain suffix.
|
|
3094
|
+
*
|
|
3095
|
+
* @example
|
|
3096
|
+
* // In column config:
|
|
3097
|
+
* formatter: new OUFormatter()
|
|
3098
|
+
*
|
|
3099
|
+
* // With options:
|
|
3100
|
+
* formatter: new OUFormatter({ separator: ' > ', showDomain: false })
|
|
3101
|
+
*
|
|
3102
|
+
* // Handles arrays from multiselect:
|
|
3103
|
+
* // ['OU=Eng,DC=co,DC=com', 'OU=HR,DC=co,DC=com'] → "Eng (co.com), HR (co.com)"
|
|
3104
|
+
*/
|
|
3105
|
+
declare class OUFormatter implements CellFormatter<string | string[]> {
|
|
3106
|
+
private readonly options?;
|
|
3107
|
+
constructor(options?: OUFormatterOptions | undefined);
|
|
3108
|
+
format(value: string | string[]): string;
|
|
3109
|
+
private formatSingle;
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
type FormatterFactory = () => CellFormatter<any>;
|
|
3113
|
+
/**
|
|
3114
|
+
* Resolve a formatter by name. Looks up custom formatters first, then built-in.
|
|
3115
|
+
* Returns undefined if the name is not registered.
|
|
3116
|
+
*/
|
|
3117
|
+
declare function resolveFormatter(name: string): CellFormatter<any> | undefined;
|
|
3118
|
+
/**
|
|
3119
|
+
* Register a custom formatter so it can be referenced by string name
|
|
3120
|
+
* in column configs (e.g. `formatter: 'myFormatter'`).
|
|
3121
|
+
*/
|
|
3122
|
+
declare function registerFormatter(name: string, factory: FormatterFactory): void;
|
|
3123
|
+
|
|
3065
3124
|
/**
|
|
3066
3125
|
* Default validator implementations
|
|
3067
3126
|
*/
|
|
@@ -3830,8 +3889,6 @@ interface NileCodeEditorOptions {
|
|
|
3830
3889
|
dialogMaxHeight?: string;
|
|
3831
3890
|
/** Dialog editor min height (default: '300px') */
|
|
3832
3891
|
dialogEditorHeight?: string;
|
|
3833
|
-
/** Minimum number of visible lines in the dialog editor (default: 20) */
|
|
3834
|
-
dialogMinLines?: number;
|
|
3835
3892
|
/** Inline completion dataset */
|
|
3836
3893
|
customAutoCompletions?: Record<string, CodeEditorCompletion[]> | CodeEditorCompletion[];
|
|
3837
3894
|
/** Paths to fetch completion datasets from */
|
|
@@ -3873,6 +3930,10 @@ declare class NileCodeEditor<T = string> implements CellEditor<T> {
|
|
|
3873
3930
|
private expandButtonClicked;
|
|
3874
3931
|
private documentClickHandler?;
|
|
3875
3932
|
private trackedValue;
|
|
3933
|
+
private syncingFromDialog;
|
|
3934
|
+
private userEditedInline;
|
|
3935
|
+
private dialogOriginalValue;
|
|
3936
|
+
private dialogCurrentValue;
|
|
3876
3937
|
constructor(options?: NileCodeEditorOptions | undefined);
|
|
3877
3938
|
edit(context: CellEditorContext<T>): void;
|
|
3878
3939
|
/**
|
|
@@ -3882,6 +3943,11 @@ declare class NileCodeEditor<T = string> implements CellEditor<T> {
|
|
|
3882
3943
|
/**
|
|
3883
3944
|
* Read the live value directly from CodeMirror's internal state,
|
|
3884
3945
|
* bypassing debounced nile-change events and the possibly-stale .value property.
|
|
3946
|
+
*
|
|
3947
|
+
* Priority order:
|
|
3948
|
+
* 1. trackedValue - always up to date from change events
|
|
3949
|
+
* 2. CodeMirror internal state - for real-time reading
|
|
3950
|
+
* 3. editor.value property - fallback
|
|
3885
3951
|
*/
|
|
3886
3952
|
private getLiveEditorValue;
|
|
3887
3953
|
/**
|
|
@@ -3889,9 +3955,21 @@ declare class NileCodeEditor<T = string> implements CellEditor<T> {
|
|
|
3889
3955
|
*/
|
|
3890
3956
|
private openDialog;
|
|
3891
3957
|
/**
|
|
3892
|
-
*
|
|
3958
|
+
* Get the current value from the dialog editor
|
|
3959
|
+
*/
|
|
3960
|
+
private getDialogEditorValue;
|
|
3961
|
+
/**
|
|
3962
|
+
* Apply changes from dialog and close it
|
|
3963
|
+
*/
|
|
3964
|
+
private applyDialogChanges;
|
|
3965
|
+
/**
|
|
3966
|
+
* Cancel dialog changes and revert to original value
|
|
3967
|
+
*/
|
|
3968
|
+
private cancelDialogChanges;
|
|
3969
|
+
/**
|
|
3970
|
+
* Close and remove the dialog UI
|
|
3893
3971
|
*/
|
|
3894
|
-
private
|
|
3972
|
+
private closeDialogUI;
|
|
3895
3973
|
/**
|
|
3896
3974
|
* Apply all configuration options to the NileCodeEditor element
|
|
3897
3975
|
*/
|
|
@@ -6085,5 +6163,5 @@ declare class AutosaveService {
|
|
|
6085
6163
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AutosaveService>;
|
|
6086
6164
|
}
|
|
6087
6165
|
|
|
6088
|
-
export { ArrayFormatter, AutosaveService, BaseColumnConfig, BooleanEditor, BooleanFormatter, BuilderPreviewComponent, BuilderToolbarComponent, Cell, CellAlignment, CellDataType, CellLifecycleState, CellVerticalAlignment, ChainValidator, ClickOutsideDirective, ColumnConfigFactory, ColumnEditorComponent, ColumnListComponent, Columns, CurrencyFormatter, DEFAULT_AUTOSAVE_CONFIG, DEFAULT_COLUMN_CONFIG, DEFAULT_TABLE_CONFIG, DateEditor, DateFormatter, DateRangeValidator, DefaultFormatter, DefinitionBuilderComponent, DefinitionBuilderModule, DefinitionBuilderService, DefinitionExportService, DefinitionImportService, EditMode, EmailValidator, FilterOperator, FunctionFormatter, FunctionValidator, JsonSchemaValidatorService, LengthValidator, NavigationDirection, NavigationKey, NileAutoCompleteEditor, NileCalendarEditor, NileCodeEditor, NileDatePickerEditor, NileInputEditor, NileSelectEditor, NumberEditor, NumberFormatter, PatternValidators, PercentageFormatter, RangeValidator, RegexValidator, RequiredValidator, RowValidationService, SampleDataGeneratorService, SelectEditor, SharedTableComponentsModule, SheetState, SimpleColumnConfig, SmartTableModule, SortDirection, StAddColumnButtonComponent, StCellComponent, StColumnEditorModalComponent, StColumnFilterComponent, StColumnMenuDropdownComponent, StColumnResizeDirective, StColumnVisibilityComponent, StHeaderComponent, StKeyboardNavigationDirective, StPaginationComponent, StRowActionsDropdownComponent, StSheetActionsComponent, StSheetComponent, StTableActionsComponent, StTableComponent, StWorkbookComponent, StringFormatter, TableConfigEditorComponent, TableState, TableZIndex, TemplateFormatter, TextAreaEditor, TextEditor, UrlValidator, ValidationLoggerService, VirtualScrollService, WorkbookState, canEdit, createCellState, createMemento, isCellValid, isDisplayMode, isNullOrUndefined, isValidDate, isValidationSuccess, mergeTableConfig, restoreFromMemento };
|
|
6089
|
-
export type { AllowedDatesRange, AsyncCellValidator, AutoCompleteOption, AutoCompleteStyle, AutosaveConfig, AutosaveData, AutosaveStrategy, BuilderState, CellCancelEvent, CellChangeEvent, CellEditEvent, CellEditor, CellEditorContext, CellEvent, CellEventHandler, CellFocusPosition, CellFormatter, CellLifecycleHooks, CellParser, CellSaveEvent, CellState, CellStateMemento, CellValidator, CellValue, CodeEditorCompletion, ColumnAction, ColumnActionContext, ColumnActionEvent, ColumnAddEvent, ColumnConfig, ColumnConfigOptions, ColumnConfigWithKey, ColumnFilterEvent, ColumnFilterState, ColumnMoveEvent, ColumnResizeEvent, ColumnSortEvent, ColumnSortState, CompositeValidator, DataChangeEvent, DateRange, ExportOptions, FilterContext, FilterOptions, ImportResult, NileAutoCompleteEditorOptions, NileCalendarEditorOptions, NileCodeEditorOptions, NileDatePickerEditorOptions, NileInputEditorOptions, NileSelectEditorOptions, PaginationState, PartialColumnConfig, RowAction, RowActionContext, RowActionEvent, RowManagementConfig, RowValidationState, SelectOption, SheetAction, SheetActionContext, SheetActionEvent, SheetConfig, SheetMetadata, SheetStateConfig, SheetStateSnapshot, SheetTabAction, SheetTabActionEvent, TableConfig, TableStateChangeEvent, TableStateConfig, TableStateSnapshot, TableValidationState, ValidationError, ValidationLogEntry, ValidationResult, VirtualScrollState, WorkbookAction, WorkbookActionEvent, WorkbookConfig, WorkbookMetadata, WorkbookSheetConfig, WorkbookStateConfig, WorkbookStateSnapshot };
|
|
6166
|
+
export { ArrayFormatter, AutosaveService, BaseColumnConfig, BooleanEditor, BooleanFormatter, BuilderPreviewComponent, BuilderToolbarComponent, Cell, CellAlignment, CellDataType, CellLifecycleState, CellVerticalAlignment, ChainValidator, ClickOutsideDirective, ColumnConfigFactory, ColumnEditorComponent, ColumnListComponent, Columns, CurrencyFormatter, DEFAULT_AUTOSAVE_CONFIG, DEFAULT_COLUMN_CONFIG, DEFAULT_TABLE_CONFIG, DateEditor, DateFormatter, DateRangeValidator, DefaultFormatter, DefinitionBuilderComponent, DefinitionBuilderModule, DefinitionBuilderService, DefinitionExportService, DefinitionImportService, EditMode, EmailValidator, FilterOperator, FunctionFormatter, FunctionValidator, JsonSchemaValidatorService, LengthValidator, NavigationDirection, NavigationKey, NileAutoCompleteEditor, NileCalendarEditor, NileCodeEditor, NileDatePickerEditor, NileInputEditor, NileSelectEditor, NumberEditor, NumberFormatter, OUFormatter, PatternValidators, PercentageFormatter, RangeValidator, RegexValidator, RequiredValidator, RowValidationService, SampleDataGeneratorService, SelectEditor, SharedTableComponentsModule, SheetState, SimpleColumnConfig, SmartTableModule, SortDirection, StAddColumnButtonComponent, StCellComponent, StColumnEditorModalComponent, StColumnFilterComponent, StColumnMenuDropdownComponent, StColumnResizeDirective, StColumnVisibilityComponent, StHeaderComponent, StKeyboardNavigationDirective, StPaginationComponent, StRowActionsDropdownComponent, StSheetActionsComponent, StSheetComponent, StTableActionsComponent, StTableComponent, StWorkbookComponent, StringFormatter, TableConfigEditorComponent, TableState, TableZIndex, TemplateFormatter, TextAreaEditor, TextEditor, UrlValidator, ValidationLoggerService, VirtualScrollService, WorkbookState, canEdit, createCellState, createMemento, dnToHumanReadable, isCellValid, isDisplayMode, isNullOrUndefined, isValidDate, isValidationSuccess, mergeTableConfig, registerFormatter, resolveFormatter, restoreFromMemento };
|
|
6167
|
+
export type { AllowedDatesRange, AsyncCellValidator, AutoCompleteOption, AutoCompleteStyle, AutosaveConfig, AutosaveData, AutosaveStrategy, BuilderState, CellCancelEvent, CellChangeEvent, CellEditEvent, CellEditor, CellEditorContext, CellEvent, CellEventHandler, CellFocusPosition, CellFormatter, CellLifecycleHooks, CellParser, CellSaveEvent, CellState, CellStateMemento, CellValidator, CellValue, CodeEditorCompletion, ColumnAction, ColumnActionContext, ColumnActionEvent, ColumnAddEvent, ColumnConfig, ColumnConfigOptions, ColumnConfigWithKey, ColumnFilterEvent, ColumnFilterState, ColumnMoveEvent, ColumnResizeEvent, ColumnSortEvent, ColumnSortState, CompositeValidator, DataChangeEvent, DateRange, ExportOptions, FilterContext, FilterOptions, ImportResult, NileAutoCompleteEditorOptions, NileCalendarEditorOptions, NileCodeEditorOptions, NileDatePickerEditorOptions, NileInputEditorOptions, NileSelectEditorOptions, OUFormatterOptions, PaginationState, PartialColumnConfig, RowAction, RowActionContext, RowActionEvent, RowManagementConfig, RowValidationState, SelectOption, SheetAction, SheetActionContext, SheetActionEvent, SheetConfig, SheetMetadata, SheetStateConfig, SheetStateSnapshot, SheetTabAction, SheetTabActionEvent, TableConfig, TableStateChangeEvent, TableStateConfig, TableStateSnapshot, TableValidationState, ValidationError, ValidationLogEntry, ValidationResult, VirtualScrollState, WorkbookAction, WorkbookActionEvent, WorkbookConfig, WorkbookMetadata, WorkbookSheetConfig, WorkbookStateConfig, WorkbookStateSnapshot };
|