commons-shared-web-ui 0.0.28 → 0.0.29

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnChanges, EventEmitter, SimpleChanges, ChangeDetectorRef, OnInit, OnDestroy, ElementRef, PipeTransform, AfterViewInit, QueryList, NgZone } from '@angular/core';
2
+ import { OnChanges, EventEmitter, SimpleChanges, ChangeDetectorRef, OnInit, OnDestroy, ElementRef, PipeTransform, NgZone, AfterViewInit, QueryList } from '@angular/core';
3
3
  import * as i2 from '@angular/material/snack-bar';
4
4
  import { MatSnackBar, MatSnackBarRef } from '@angular/material/snack-bar';
5
5
  import * as i2$1 from '@angular/common';
@@ -161,6 +161,12 @@ interface ActionButtonConfig {
161
161
  hidden?: boolean;
162
162
  /** State. @default false */
163
163
  disabled?: boolean;
164
+ /**
165
+ * When true and sectionStepper is active, this button is only visible
166
+ * on the last step. Use this for Submit buttons that should not appear
167
+ * on intermediate steps.
168
+ */
169
+ showOnLastStepOnly?: boolean;
164
170
  /** Action logic. */
165
171
  action: ActionConfig;
166
172
  }
@@ -267,6 +273,7 @@ interface FieldConfig {
267
273
  numberConfig?: NumberConfig;
268
274
  dateConfig?: DateConfig;
269
275
  optionConfig?: OptionConfig$1;
276
+ autocompleteConfig?: AutocompleteConfig;
270
277
  generatedConfig?: GeneratedConfig;
271
278
  rangeConfig?: RangeConfig;
272
279
  attachmentConfig?: AttachmentConfig;
@@ -320,6 +327,72 @@ interface OptionConfig$1 {
320
327
  layout?: 'row' | 'column';
321
328
  optionList?: OptionItem[];
322
329
  }
330
+ interface AutocompleteDisplayField {
331
+ /** Dot-notation path to the value in the API response item (e.g. 'login', 'contact.phone'). */
332
+ path: string;
333
+ /**
334
+ * How to render the value.
335
+ * Built-in: 'text' | 'email' | 'phone' | 'image'.
336
+ * Can be any string for custom logic/styling.
337
+ */
338
+ type?: 'text' | 'email' | 'phone' | 'image' | string;
339
+ /** Optional Material Icon name to show (e.g. 'location_on', 'calendar_today', 'person'). */
340
+ icon?: string;
341
+ /** Optional label prefix shown before the value (e.g. 'Email: '). */
342
+ label?: string;
343
+ /** Custom CSS class to apply to this display item. */
344
+ className?: string;
345
+ }
346
+ /**
347
+ * Configuration specific to the AUTOCOMPLETE field type.
348
+ * For detailed documentation and examples, see documentation/smart-form.md.
349
+ */
350
+ interface AutocompleteConfig {
351
+ /** HTTP method for the options API. Defaults to 'GET'. */
352
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH';
353
+ /** Static request body sent with POST/PUT/PATCH requests. */
354
+ body?: any;
355
+ /** Static query parameters to append to the API URL on every request. */
356
+ queryParams?: {
357
+ [key: string]: any;
358
+ };
359
+ /** Custom HTTP headers to send with the API request (e.g. Authorization, X-TENANT). */
360
+ headers?: {
361
+ [key: string]: string;
362
+ };
363
+ /**
364
+ * Template string for building a composite label from multiple fields.
365
+ * Use {fieldName} placeholders. E.g. '{firstName} {lastName} ({login})'.
366
+ * Takes precedence over optionConfig.labelPath if both are set.
367
+ */
368
+ labelTemplate?: string;
369
+ /**
370
+ * One or more extra fields to render below the main label inside each dropdown option.
371
+ *
372
+ * Accepts:
373
+ * - A plain string → treated as a single dot-notation path rendered as 'text'.
374
+ * Backward-compatible with the old `displayPath` string.
375
+ * - An array of AutocompleteDisplayField objects → full control over icon,
376
+ * type (text | email | phone | image), and optional label prefix.
377
+ *
378
+ * Examples:
379
+ * "displayFields": "login"
380
+ * "displayFields": [
381
+ * { "path": "login", "type": "email" },
382
+ * { "path": "phone", "type": "phone" },
383
+ * { "path": "photoUrl", "type": "image" }
384
+ * ]
385
+ */
386
+ displayFields?: string | AutocompleteDisplayField[];
387
+ /** Query parameter key appended to the URL when the user types (e.g. 'searchTerm', 'q'). */
388
+ searchParam?: string;
389
+ /** Alias for 'searchParam'. */
390
+ searchKey?: string;
391
+ /** Minimum characters to type before a server request fires (default: 1). */
392
+ searchMinLength?: number;
393
+ /** Debounce delay in ms before firing the search request (default: 300ms server-side, 150ms local). */
394
+ searchDebounce?: number;
395
+ }
323
396
  interface EmailConfig {
324
397
  defaultDomain?: string;
325
398
  allowedDomains?: string[];
@@ -1297,6 +1370,8 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1297
1370
  label: string;
1298
1371
  code: any;
1299
1372
  }[];
1373
+ /** Cache of the latest dependency parameters for server-side autocomplete filtering */
1374
+ private _latestDependencyValues;
1300
1375
  /** For GROUP fields with allowMulti = true */
1301
1376
  groupFormArray: FormArray;
1302
1377
  /** For GROUP fields with allowMulti = false — single nested FormGroup */
@@ -1366,11 +1441,13 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1366
1441
  }): any;
1367
1442
  extractFunctionName(formula: string): string | null;
1368
1443
  setupDependencies(): void;
1369
- loadDropdownOptions(queryParams?: {
1444
+ loadDropdownOptions(dynamicParams?: {
1370
1445
  [key: string]: any;
1371
1446
  }): void;
1372
1447
  private getValueByPath;
1373
- /** Builds HttpHeaders using the token stored in the SmartFormController (sourced from configJSON). */
1448
+ /** Builds HttpHeaders using the token stored in the SmartFormController (sourced from configJSON)
1449
+ * merged with any custom headers declared in optionConfig.headers.
1450
+ */
1374
1451
  private getHeaders;
1375
1452
  updateValue(newValue: any): void;
1376
1453
  onCheckboxListChange(code: string, checked: boolean): void;
@@ -2390,7 +2467,7 @@ interface ConfirmationModalConfig {
2390
2467
  color?: string;
2391
2468
  };
2392
2469
  width?: string;
2393
- size?: 'sm' | 'md' | 'lg';
2470
+ size?: 'sm' | 'md' | 'lg' | 'xl';
2394
2471
  customClass?: string;
2395
2472
  backgroundColor?: string;
2396
2473
  borderRadius?: string;
@@ -3058,172 +3135,6 @@ declare class SideNavModule {
3058
3135
  static ɵinj: i0.ɵɵInjectorDeclaration<SideNavModule>;
3059
3136
  }
3060
3137
 
3061
- declare class SharedUiModule {
3062
- static ɵfac: i0.ɵɵFactoryDeclaration<SharedUiModule, never>;
3063
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule], [typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule]>;
3064
- static ɵinj: i0.ɵɵInjectorDeclaration<SharedUiModule>;
3065
- }
3066
-
3067
- /**
3068
- * Utility functions for LocalStorage operations
3069
- */
3070
- declare const getLocalStorageItem: (key: string) => string | null;
3071
- declare const setLocalStorageItem: (key: string, value: string) => void;
3072
- declare const removeLocalStorageItem: (key: string) => void;
3073
- declare const clearLocalStorage: () => void;
3074
- /**
3075
- * Utility functions for SessionStorage operations
3076
- */
3077
- declare const getSessionStorageItem: (key: string) => string | null;
3078
- declare const setSessionStorageItem: (key: string, value: string) => void;
3079
- declare const removeSessionStorageItem: (key: string) => void;
3080
- declare const clearSessionStorage: () => void;
3081
-
3082
- /**
3083
- * Utility functions for string manipulation
3084
- */
3085
- declare class StringUtils {
3086
- /**
3087
- * Converts a string to camelCase.
3088
- * Example: "First Name" -> "firstName", "Profile Picture" -> "profilePicture"
3089
- */
3090
- static toCamelCase(str?: string): string;
3091
- }
3092
-
3093
- /**
3094
- * Recursively translates the Configuration object using the provided labels map.
3095
- * This function processes:
3096
- * - Section Titles
3097
- * - Field Labels
3098
- * - Placeholders
3099
- * - Help Texts
3100
- * - Option Labels (for static options)
3101
- * - Repeater Labels (addLabel, repeaterItemLabel)
3102
- *
3103
- * @param config The FormConfig object to translate
3104
- * @param labelsMap A map of key-value pairs for translation (Flattened JSON)
3105
- * @returns A new FormConfig object with translated strings
3106
- */
3107
- declare function translateConfig(config: any, labelsMap: any): any;
3108
-
3109
- /**
3110
- * Example: Basic Form Configuration
3111
- * This is a generic example for testing and demonstration purposes.
3112
- */
3113
- declare const EXAMPLE_FORM_CONFIG: FormConfig;
3114
- /**
3115
- * Example: Target Group Configuration
3116
- * Demonstrates composite fields for Age Group and Gender Split
3117
- */
3118
- declare const TARGET_GROUP_CONFIG: FormConfig;
3119
-
3120
- declare const configurableForm_examples_d_EXAMPLE_FORM_CONFIG: typeof EXAMPLE_FORM_CONFIG;
3121
- declare const configurableForm_examples_d_TARGET_GROUP_CONFIG: typeof TARGET_GROUP_CONFIG;
3122
- declare namespace configurableForm_examples_d {
3123
- export {
3124
- configurableForm_examples_d_EXAMPLE_FORM_CONFIG as EXAMPLE_FORM_CONFIG,
3125
- configurableForm_examples_d_TARGET_GROUP_CONFIG as TARGET_GROUP_CONFIG,
3126
- };
3127
- }
3128
-
3129
- interface PaginationLabels {
3130
- items: string;
3131
- of: string;
3132
- perPage: string;
3133
- }
3134
- declare class PaginationComponent implements OnInit, OnChanges {
3135
- totalItems: number;
3136
- itemsPerPage: number;
3137
- currentPage: number;
3138
- pageSizeOptions: number[];
3139
- theme: 'theme-1' | 'theme-2';
3140
- labels: PaginationLabels;
3141
- pageChange: EventEmitter<number>;
3142
- itemsPerPageChange: EventEmitter<number>;
3143
- totalPages: number;
3144
- pages: (number | string)[];
3145
- startItem: number;
3146
- endItem: number;
3147
- constructor();
3148
- ngOnInit(): void;
3149
- ngOnChanges(changes: SimpleChanges): void;
3150
- calculatePagination(): void;
3151
- getVisiblePages(current: number, total: number): (number | string)[];
3152
- onPageChange(page: number | string): void;
3153
- onItemsPerPageChange(event: Event): void;
3154
- nextPage(): void;
3155
- prevPage(): void;
3156
- static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
3157
- static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "lib-pagination", never, { "totalItems": { "alias": "totalItems"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; }, { "pageChange": "pageChange"; "itemsPerPageChange": "itemsPerPageChange"; }, never, never, false, never>;
3158
- }
3159
-
3160
- declare class PaginationModule {
3161
- static ɵfac: i0.ɵɵFactoryDeclaration<PaginationModule, never>;
3162
- static ɵmod: i0.ɵɵNgModuleDeclaration<PaginationModule, [typeof PaginationComponent], [typeof i2$1.CommonModule], [typeof PaginationComponent]>;
3163
- static ɵinj: i0.ɵɵInjectorDeclaration<PaginationModule>;
3164
- }
3165
-
3166
- interface NavStyleConfig {
3167
- width?: string;
3168
- backgroundColor?: string;
3169
- borderRadius?: string;
3170
- border?: string;
3171
- padding?: string;
3172
- gap?: string;
3173
- boxShadow?: string;
3174
- itemColor?: string;
3175
- itemRadius?: string;
3176
- itemPadding?: string;
3177
- fontSize?: string;
3178
- fontWeight?: string;
3179
- activeItemBg?: string;
3180
- activeItemColor?: string;
3181
- activeItemFontWeight?: string;
3182
- activeItemBorderColor?: string;
3183
- hoverItemBg?: string;
3184
- hoverItemColor?: string;
3185
- badgeBg?: string;
3186
- badgeColor?: string;
3187
- }
3188
-
3189
- interface NavItem {
3190
- id: string | number;
3191
- label: string;
3192
- icon?: string;
3193
- badge?: string | number;
3194
- disabled?: boolean;
3195
- }
3196
- declare class NavComponent implements OnChanges {
3197
- items: NavItem[];
3198
- activeId: string | number | null;
3199
- variant: 'filled' | 'underline' | 'pills';
3200
- orientation: 'horizontal' | 'vertical';
3201
- styleConfig: NavStyleConfig;
3202
- selectionChange: EventEmitter<NavItem>;
3203
- ngOnChanges(changes: SimpleChanges): void;
3204
- get computedStyles(): {
3205
- [key: string]: string | undefined;
3206
- };
3207
- onItemClick(item: NavItem): void;
3208
- trackById(index: number, item: NavItem): string | number;
3209
- static ɵfac: i0.ɵɵFactoryDeclaration<NavComponent, never>;
3210
- static ɵcmp: i0.ɵɵComponentDeclaration<NavComponent, "lib-nav", never, { "items": { "alias": "items"; "required": false; }; "activeId": { "alias": "activeId"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "styleConfig": { "alias": "styleConfig"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
3211
- }
3212
-
3213
- declare class NavModule {
3214
- static ɵfac: i0.ɵɵFactoryDeclaration<NavModule, never>;
3215
- static ɵmod: i0.ɵɵNgModuleDeclaration<NavModule, [typeof NavComponent], [typeof i2$1.CommonModule], [typeof NavComponent]>;
3216
- static ɵinj: i0.ɵɵInjectorDeclaration<NavModule>;
3217
- }
3218
-
3219
- declare const DEFAULT_ITEMS_PER_PAGE = 10;
3220
- declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
3221
- declare const PAGINATION_THEME_DEFAULT = "theme-1";
3222
- declare const PAGINATION_THEME_DARK = "theme-2";
3223
- declare const NAV_VARIANT_DEFAULT: 'filled' | 'underline' | 'pills';
3224
- declare const NAV_ORIENTATION_DEFAULT: 'horizontal' | 'vertical';
3225
- declare const DEFAULT_SIDE_NAV_TOOLTIP_POSITION = "right";
3226
-
3227
3138
  interface TableOption {
3228
3139
  label: string;
3229
3140
  value: any;
@@ -3385,6 +3296,203 @@ interface TableDataChangeEvent {
3385
3296
  };
3386
3297
  }
3387
3298
 
3299
+ /**
3300
+ * Maps a SmartForm field name to its corresponding API query-param key.
3301
+ */
3302
+ interface FilterParamMap {
3303
+ /** Field name as declared in sectionConfig.children (e.g. "country") */
3304
+ formFieldName: string;
3305
+ /** Actual query-param key sent to the table API (e.g. "currentCountryCode") */
3306
+ apiParamKey: string;
3307
+ }
3308
+ /**
3309
+ * Configuration for the left-hand filter panel (powered by SmartForm).
3310
+ */
3311
+ interface FilterPanelConfig {
3312
+ /** Full SmartForm JSON schema (entityType, sectionConfig, actionBarConfig, etc.) */
3313
+ smartFormConfig: FormSchema;
3314
+ /** Maps each form field to the API query-param that the table expects */
3315
+ filterParamMapping: FilterParamMap[];
3316
+ /**
3317
+ * Optional default values pre-filled when the component opens AND restored on Clear Filter.
3318
+ * Key = formFieldName, Value = the field value.
3319
+ * When provided, the initial table load will include these params.
3320
+ */
3321
+ defaultValues?: Record<string, any>;
3322
+ /**
3323
+ * List of field names that should be rendered as disabled/read-only.
3324
+ * The values are still used when building API params, but users cannot change them.
3325
+ * Their values are preserved when Clear Filter is triggered.
3326
+ */
3327
+ disabledFields?: string[];
3328
+ /**
3329
+ * i18n key or literal text for the "Clear Filter" button.
3330
+ * Defaults to 'COMMON.FILTER_TABLE.CLEAR_FILTER'.
3331
+ */
3332
+ clearFilterLabel?: string;
3333
+ /**
3334
+ * i18n key or literal text for the "Apply Filter" button.
3335
+ * Defaults to 'COMMON.FILTER_TABLE.APPLY_FILTER'.
3336
+ */
3337
+ applyFilterLabel?: string;
3338
+ }
3339
+ /**
3340
+ * Controls selection behaviour and bottom action bar labels.
3341
+ */
3342
+ interface SelectionConfig {
3343
+ /** Allow selecting multiple rows (true = checkbox per row, false = radio). */
3344
+ multiSelect: boolean;
3345
+ /**
3346
+ * i18n token for the "X of Y users Selected" counter.
3347
+ * Use placeholders {selected} and {total}.
3348
+ * Example: "COMMON.FILTER_TABLE.SELECTION_COUNT"
3349
+ */
3350
+ selectionCountLabel: string;
3351
+ /** i18n token (or literal text) for the primary submit button. */
3352
+ submitButtonLabel: string;
3353
+ /** i18n token (or literal text) for the secondary cancel/back button. */
3354
+ cancelButtonLabel: string;
3355
+ }
3356
+ /**
3357
+ * Top-level configuration object for FilterTableSelectorComponent.
3358
+ */
3359
+ interface FilterTableSelectorConfig {
3360
+ /** Dialog / modal heading. */
3361
+ title?: string;
3362
+ /** Left-panel filter form configuration. */
3363
+ filterConfig: FilterPanelConfig;
3364
+ /**
3365
+ * Right-panel table configuration.
3366
+ * Extends the standard SmartTable config; `selectable` should be true.
3367
+ * `multiSelect` is controlled via selectionConfig.multiSelect.
3368
+ */
3369
+ tableConfig: FilterTableConfig;
3370
+ /** Selection behaviour and bottom action bar labels. */
3371
+ selectionConfig: SelectionConfig;
3372
+ }
3373
+ /**
3374
+ * Extended TableConfig for FilterTableSelector — adds multiSelect support.
3375
+ */
3376
+ interface FilterTableConfig extends TableConfig {
3377
+ /**
3378
+ * When true (and selectable=true), multiple rows can be selected simultaneously.
3379
+ * When false, only one row can be selected at a time (radio behaviour).
3380
+ */
3381
+ multiSelect?: boolean;
3382
+ }
3383
+
3384
+ declare class FilterTableSelectorComponent implements OnInit, OnChanges, OnDestroy {
3385
+ private cdr;
3386
+ private ngZone;
3387
+ /** Full config object driven by consuming MFE JSON. */
3388
+ config: FilterTableSelectorConfig;
3389
+ /**
3390
+ * Flat i18n labels map from the consuming MFE.
3391
+ * Mirrors the pattern used by SmartFormComponent.
3392
+ */
3393
+ labels: Record<string, string>;
3394
+ /**
3395
+ * Pre-selected row identifiers.
3396
+ * When provided, matching rows are pre-checked on first load and
3397
+ * re-checked after each page navigation.
3398
+ * Must be an array of row objects (the same shape returned by the API).
3399
+ */
3400
+ preSelectedRows: any[];
3401
+ /** Emits the array of currently selected row objects on "Add / Submit". */
3402
+ onSubmit: EventEmitter<any[]>;
3403
+ /** Emits void on "Back / Cancel". */
3404
+ onCancel: EventEmitter<void>;
3405
+ /** A deep-copy of tableConfig with the current filter params baked-in. */
3406
+ resolvedTableConfig: FilterTableConfig;
3407
+ /** Current active filter params (merged from form submission). */
3408
+ activeFilterParams: Record<string, string>;
3409
+ /** The base API URL without any filter query params. */
3410
+ private baseApiUrl;
3411
+ /** All rows selected so far, tracked across pagination pages. */
3412
+ selectedRows: any[];
3413
+ /** Total rows currently loaded in the table (reported by SmartTable rowSelect). */
3414
+ totalTableItems: number;
3415
+ /** Serialised SmartForm JSON (with labels translated + disabled fields applied). */
3416
+ resolvedFormJson: string;
3417
+ /**
3418
+ * Default values to prefill the SmartForm.
3419
+ * Updated on each initialize() call and reset to config defaults on Clear Filter.
3420
+ */
3421
+ resolvedInitialValues: Record<string, any>;
3422
+ /**
3423
+ * Version counter — bumping this forces *ngIf to re-create the SmartForm
3424
+ * component with fresh initial values (used by Clear Filter).
3425
+ */
3426
+ formVersion: number;
3427
+ /** Whether the filter panel is visible (toggled on mobile, always visible on desktop). */
3428
+ filterPanelVisible: boolean;
3429
+ /**
3430
+ * Tracks the live form values as the user changes fields.
3431
+ * Updated via SmartForm's (valueChange) output.
3432
+ * Used when the user clicks the "Apply Filter" button in the component.
3433
+ */
3434
+ currentFormValues: Record<string, any>;
3435
+ private destroy$;
3436
+ constructor(cdr: ChangeDetectorRef, ngZone: NgZone);
3437
+ ngOnInit(): void;
3438
+ ngOnChanges(changes: SimpleChanges): void;
3439
+ ngOnDestroy(): void;
3440
+ private initialize;
3441
+ /**
3442
+ * Serialises the SmartForm config JSON.
3443
+ * Applies disabledFields from filterPanelConfig.
3444
+ */
3445
+ private buildFormJson;
3446
+ /**
3447
+ * Rebuilds resolvedTableConfig with the current activeFilterParams appended
3448
+ * to the base API URL.
3449
+ */
3450
+ private applyFilterParamsToTable;
3451
+ /**
3452
+ * Converts a flat form-value map to API param key/value pairs
3453
+ * using the configured filterParamMapping.
3454
+ */
3455
+ private buildFilterParams;
3456
+ /**
3457
+ * Called every time a form field value changes (SmartForm valueChange output).
3458
+ * We track the current values so the component-level "Apply Filter" button
3459
+ * can read them without relying on a form submit button inside the JSON config.
3460
+ */
3461
+ onFormValueChange(values: Record<string, any>): void;
3462
+ /**
3463
+ * Called when the user clicks the "Apply Filter" button rendered by the component.
3464
+ * Builds API params from the tracked form values and reloads the table.
3465
+ */
3466
+ applyCurrentFilter(): void;
3467
+ /**
3468
+ * Clear Filter: resets form to default values (preserving disabled-field values),
3469
+ * reloads the table with default params.
3470
+ * The form is re-created via formVersion bump so SmartForm gets fresh initialValues.
3471
+ */
3472
+ onClearFilter(): void;
3473
+ /**
3474
+ * Called by SmartTable's (rowSelect) output.
3475
+ * Merges page-level selection with the cross-page tracking set.
3476
+ */
3477
+ onRowSelect(globalSelection: any[]): void;
3478
+ /**
3479
+ * Syncs preSelectedRows into the local selectedRows (called when input changes).
3480
+ */
3481
+ private syncPreselection;
3482
+ handleSubmit(): void;
3483
+ handleCancel(): void;
3484
+ translate(key: string): string;
3485
+ get titleLabel(): string;
3486
+ get submitButtonLabel(): string;
3487
+ get cancelButtonLabel(): string;
3488
+ get clearFilterButtonLabel(): string;
3489
+ get applyFilterButtonLabel(): string;
3490
+ get selectionCountText(): string;
3491
+ get hasActiveFilters(): boolean;
3492
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterTableSelectorComponent, never>;
3493
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterTableSelectorComponent, "lib-filter-table-selector", never, { "config": { "alias": "config"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "preSelectedRows": { "alias": "preSelectedRows"; "required": false; }; }, { "onSubmit": "onSubmit"; "onCancel": "onCancel"; }, never, never, false, never>;
3494
+ }
3495
+
3388
3496
  declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
3389
3497
  private http;
3390
3498
  private router;
@@ -3417,6 +3525,11 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
3417
3525
  row: any;
3418
3526
  column: string;
3419
3527
  }>;
3528
+ /**
3529
+ * Pre-selected row objects. These are tracked across pages.
3530
+ * Matching incoming data rows (via rowIdField) will be checked automatically.
3531
+ */
3532
+ selectedRows: any[];
3420
3533
  /** Emitted in external-data mode when the user changes the sort column/direction. */
3421
3534
  sortChange: EventEmitter<TableDataChangeEvent>;
3422
3535
  /** Emitted in external-data mode when the user changes the page or page size. */
@@ -3436,7 +3549,6 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
3436
3549
  [key: string]: any;
3437
3550
  };
3438
3551
  searchTerm: string;
3439
- selectedRows: any[];
3440
3552
  stickyColumnStyles: {
3441
3553
  [key: string]: any;
3442
3554
  };
@@ -3462,6 +3574,11 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
3462
3574
  private setupResizeObserver;
3463
3575
  private observeHeaders;
3464
3576
  loadData(): void;
3577
+ /**
3578
+ * Syncs the locally loaded data set with the externally provided selectedRows.
3579
+ * Marks 'selected' property on row objects to reflect checkbox state.
3580
+ */
3581
+ private syncSelection;
3465
3582
  onPageChange(page: number): void;
3466
3583
  onPageSizeChange(size: number): void;
3467
3584
  onSort(col: TableColumn): void;
@@ -3497,7 +3614,44 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
3497
3614
  toggleDropdown(id: string, event: Event): void;
3498
3615
  closeDropdown(): void;
3499
3616
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableComponent, never>;
3500
- static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableComponent, "lib-smart-table", never, { "config": { "alias": "config"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "totalItemsCount": { "alias": "totalItemsCount"; "required": false; }; }, { "action": "action"; "topAction": "topAction"; "filterChange": "filterChange"; "rowSelect": "rowSelect"; "columnClick": "columnClick"; "sortChange": "sortChange"; "pageChange": "pageChange"; "searchChange": "searchChange"; }, never, never, false, never>;
3617
+ static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableComponent, "lib-smart-table", never, { "config": { "alias": "config"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "totalItemsCount": { "alias": "totalItemsCount"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; }, { "action": "action"; "topAction": "topAction"; "filterChange": "filterChange"; "rowSelect": "rowSelect"; "columnClick": "columnClick"; "sortChange": "sortChange"; "pageChange": "pageChange"; "searchChange": "searchChange"; }, never, never, false, never>;
3618
+ }
3619
+
3620
+ interface PaginationLabels {
3621
+ items: string;
3622
+ of: string;
3623
+ perPage: string;
3624
+ }
3625
+ declare class PaginationComponent implements OnInit, OnChanges {
3626
+ totalItems: number;
3627
+ itemsPerPage: number;
3628
+ currentPage: number;
3629
+ pageSizeOptions: number[];
3630
+ theme: 'theme-1' | 'theme-2';
3631
+ labels: PaginationLabels;
3632
+ pageChange: EventEmitter<number>;
3633
+ itemsPerPageChange: EventEmitter<number>;
3634
+ totalPages: number;
3635
+ pages: (number | string)[];
3636
+ startItem: number;
3637
+ endItem: number;
3638
+ constructor();
3639
+ ngOnInit(): void;
3640
+ ngOnChanges(changes: SimpleChanges): void;
3641
+ calculatePagination(): void;
3642
+ getVisiblePages(current: number, total: number): (number | string)[];
3643
+ onPageChange(page: number | string): void;
3644
+ onItemsPerPageChange(event: Event): void;
3645
+ nextPage(): void;
3646
+ prevPage(): void;
3647
+ static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
3648
+ static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "lib-pagination", never, { "totalItems": { "alias": "totalItems"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; }, { "pageChange": "pageChange"; "itemsPerPageChange": "itemsPerPageChange"; }, never, never, false, never>;
3649
+ }
3650
+
3651
+ declare class PaginationModule {
3652
+ static ɵfac: i0.ɵɵFactoryDeclaration<PaginationModule, never>;
3653
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PaginationModule, [typeof PaginationComponent], [typeof i2$1.CommonModule], [typeof PaginationComponent]>;
3654
+ static ɵinj: i0.ɵɵInjectorDeclaration<PaginationModule>;
3501
3655
  }
3502
3656
 
3503
3657
  declare class SmartTableModule {
@@ -3506,6 +3660,141 @@ declare class SmartTableModule {
3506
3660
  static ɵinj: i0.ɵɵInjectorDeclaration<SmartTableModule>;
3507
3661
  }
3508
3662
 
3663
+ declare class FilterTableSelectorModule {
3664
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterTableSelectorModule, never>;
3665
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FilterTableSelectorModule, [typeof FilterTableSelectorComponent], [typeof i2$1.CommonModule, typeof SmartFormModule, typeof SmartTableModule, typeof ButtonModule], [typeof FilterTableSelectorComponent]>;
3666
+ static ɵinj: i0.ɵɵInjectorDeclaration<FilterTableSelectorModule>;
3667
+ }
3668
+
3669
+ declare class SharedUiModule {
3670
+ static ɵfac: i0.ɵɵFactoryDeclaration<SharedUiModule, never>;
3671
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FilterTableSelectorModule], [typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FilterTableSelectorModule]>;
3672
+ static ɵinj: i0.ɵɵInjectorDeclaration<SharedUiModule>;
3673
+ }
3674
+
3675
+ /**
3676
+ * Utility functions for LocalStorage operations
3677
+ */
3678
+ declare const getLocalStorageItem: (key: string) => string | null;
3679
+ declare const setLocalStorageItem: (key: string, value: string) => void;
3680
+ declare const removeLocalStorageItem: (key: string) => void;
3681
+ declare const clearLocalStorage: () => void;
3682
+ /**
3683
+ * Utility functions for SessionStorage operations
3684
+ */
3685
+ declare const getSessionStorageItem: (key: string) => string | null;
3686
+ declare const setSessionStorageItem: (key: string, value: string) => void;
3687
+ declare const removeSessionStorageItem: (key: string) => void;
3688
+ declare const clearSessionStorage: () => void;
3689
+
3690
+ /**
3691
+ * Utility functions for string manipulation
3692
+ */
3693
+ declare class StringUtils {
3694
+ /**
3695
+ * Converts a string to camelCase.
3696
+ * Example: "First Name" -> "firstName", "Profile Picture" -> "profilePicture"
3697
+ */
3698
+ static toCamelCase(str?: string): string;
3699
+ }
3700
+
3701
+ /**
3702
+ * Recursively translates the Configuration object using the provided labels map.
3703
+ * This function processes:
3704
+ * - Section Titles
3705
+ * - Field Labels
3706
+ * - Placeholders
3707
+ * - Help Texts
3708
+ * - Option Labels (for static options)
3709
+ * - Repeater Labels (addLabel, repeaterItemLabel)
3710
+ *
3711
+ * @param config The FormConfig object to translate
3712
+ * @param labelsMap A map of key-value pairs for translation (Flattened JSON)
3713
+ * @returns A new FormConfig object with translated strings
3714
+ */
3715
+ declare function translateConfig(config: any, labelsMap: any): any;
3716
+
3717
+ /**
3718
+ * Example: Basic Form Configuration
3719
+ * This is a generic example for testing and demonstration purposes.
3720
+ */
3721
+ declare const EXAMPLE_FORM_CONFIG: FormConfig;
3722
+ /**
3723
+ * Example: Target Group Configuration
3724
+ * Demonstrates composite fields for Age Group and Gender Split
3725
+ */
3726
+ declare const TARGET_GROUP_CONFIG: FormConfig;
3727
+
3728
+ declare const configurableForm_examples_d_EXAMPLE_FORM_CONFIG: typeof EXAMPLE_FORM_CONFIG;
3729
+ declare const configurableForm_examples_d_TARGET_GROUP_CONFIG: typeof TARGET_GROUP_CONFIG;
3730
+ declare namespace configurableForm_examples_d {
3731
+ export {
3732
+ configurableForm_examples_d_EXAMPLE_FORM_CONFIG as EXAMPLE_FORM_CONFIG,
3733
+ configurableForm_examples_d_TARGET_GROUP_CONFIG as TARGET_GROUP_CONFIG,
3734
+ };
3735
+ }
3736
+
3737
+ interface NavStyleConfig {
3738
+ width?: string;
3739
+ backgroundColor?: string;
3740
+ borderRadius?: string;
3741
+ border?: string;
3742
+ padding?: string;
3743
+ gap?: string;
3744
+ boxShadow?: string;
3745
+ itemColor?: string;
3746
+ itemRadius?: string;
3747
+ itemPadding?: string;
3748
+ fontSize?: string;
3749
+ fontWeight?: string;
3750
+ activeItemBg?: string;
3751
+ activeItemColor?: string;
3752
+ activeItemFontWeight?: string;
3753
+ activeItemBorderColor?: string;
3754
+ hoverItemBg?: string;
3755
+ hoverItemColor?: string;
3756
+ badgeBg?: string;
3757
+ badgeColor?: string;
3758
+ }
3759
+
3760
+ interface NavItem {
3761
+ id: string | number;
3762
+ label: string;
3763
+ icon?: string;
3764
+ badge?: string | number;
3765
+ disabled?: boolean;
3766
+ }
3767
+ declare class NavComponent implements OnChanges {
3768
+ items: NavItem[];
3769
+ activeId: string | number | null;
3770
+ variant: 'filled' | 'underline' | 'pills';
3771
+ orientation: 'horizontal' | 'vertical';
3772
+ styleConfig: NavStyleConfig;
3773
+ selectionChange: EventEmitter<NavItem>;
3774
+ ngOnChanges(changes: SimpleChanges): void;
3775
+ get computedStyles(): {
3776
+ [key: string]: string | undefined;
3777
+ };
3778
+ onItemClick(item: NavItem): void;
3779
+ trackById(index: number, item: NavItem): string | number;
3780
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavComponent, never>;
3781
+ static ɵcmp: i0.ɵɵComponentDeclaration<NavComponent, "lib-nav", never, { "items": { "alias": "items"; "required": false; }; "activeId": { "alias": "activeId"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "styleConfig": { "alias": "styleConfig"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
3782
+ }
3783
+
3784
+ declare class NavModule {
3785
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavModule, never>;
3786
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NavModule, [typeof NavComponent], [typeof i2$1.CommonModule], [typeof NavComponent]>;
3787
+ static ɵinj: i0.ɵɵInjectorDeclaration<NavModule>;
3788
+ }
3789
+
3790
+ declare const DEFAULT_ITEMS_PER_PAGE = 10;
3791
+ declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
3792
+ declare const PAGINATION_THEME_DEFAULT = "theme-1";
3793
+ declare const PAGINATION_THEME_DARK = "theme-2";
3794
+ declare const NAV_VARIANT_DEFAULT: 'filled' | 'underline' | 'pills';
3795
+ declare const NAV_ORIENTATION_DEFAULT: 'horizontal' | 'vertical';
3796
+ declare const DEFAULT_SIDE_NAV_TOOLTIP_POSITION = "right";
3797
+
3509
3798
  declare function appendBaseUrlRecursively(obj: any, baseURL: string): void;
3510
3799
 
3511
3800
  declare class ValidationUtils {
@@ -3555,5 +3844,5 @@ declare class SnackbarModule {
3555
3844
  static ɵinj: i0.ɵɵInjectorDeclaration<SnackbarModule>;
3556
3845
  }
3557
3846
 
3558
- export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, DatepickerComponent, DropdownComponent, ExpressionService, FieldConfiguratorComponent, FieldSelectionComponent, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FormBuilderModule, FormComponentsModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
3559
- export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
3847
+ export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, DatepickerComponent, DropdownComponent, ExpressionService, FieldConfiguratorComponent, FieldSelectionComponent, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FilterTableSelectorComponent, FilterTableSelectorModule, FormBuilderModule, FormComponentsModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
3848
+ export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterPanelConfig, FilterParamMap, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterTableConfig, FilterTableSelectorConfig, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SelectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };