commons-shared-web-ui 0.0.28 → 0.0.30
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/commons-shared-web-ui-0.0.30.tgz +0 -0
- package/fesm2022/commons-shared-web-ui.mjs +1680 -1165
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -1
- package/index.d.ts +487 -176
- package/package.json +1 -1
- package/src/lib/modules/filter-table-selector/filter-table-selector.theme.scss +36 -0
- package/src/lib/modules/pagination/pagination.theme.scss +66 -66
- package/src/lib/modules/smart-table/smart-table.theme.scss +323 -222
- package/src/lib/modules/snackbar/snackbar.theme.scss +93 -0
- package/src/lib/styles/global.scss +3 -0
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
|
|
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(
|
|
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,8 +2467,13 @@ 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;
|
|
2472
|
+
type?: 'modal' | 'side-panel';
|
|
2473
|
+
panelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
2474
|
+
panelSpacing?: string;
|
|
2475
|
+
panelWidth?: string;
|
|
2476
|
+
panelHeight?: string;
|
|
2395
2477
|
backgroundColor?: string;
|
|
2396
2478
|
borderRadius?: string;
|
|
2397
2479
|
borderTopLeftRadius?: string;
|
|
@@ -2497,6 +2579,7 @@ declare class ConfirmationModalComponent implements OnInit, OnDestroy {
|
|
|
2497
2579
|
onClose(): void;
|
|
2498
2580
|
onShowCodeSnippet(): void;
|
|
2499
2581
|
getModalWidth(): string;
|
|
2582
|
+
getModalStyles(): any;
|
|
2500
2583
|
getConfirmButtonClass(): string;
|
|
2501
2584
|
getHeaderClass(): string;
|
|
2502
2585
|
resolveIconType(icon: any): 'material' | 'custom' | 'img';
|
|
@@ -3058,172 +3141,6 @@ declare class SideNavModule {
|
|
|
3058
3141
|
static ɵinj: i0.ɵɵInjectorDeclaration<SideNavModule>;
|
|
3059
3142
|
}
|
|
3060
3143
|
|
|
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
3144
|
interface TableOption {
|
|
3228
3145
|
label: string;
|
|
3229
3146
|
value: any;
|
|
@@ -3385,6 +3302,203 @@ interface TableDataChangeEvent {
|
|
|
3385
3302
|
};
|
|
3386
3303
|
}
|
|
3387
3304
|
|
|
3305
|
+
/**
|
|
3306
|
+
* Maps a SmartForm field name to its corresponding API query-param key.
|
|
3307
|
+
*/
|
|
3308
|
+
interface FilterParamMap {
|
|
3309
|
+
/** Field name as declared in sectionConfig.children (e.g. "country") */
|
|
3310
|
+
formFieldName: string;
|
|
3311
|
+
/** Actual query-param key sent to the table API (e.g. "currentCountryCode") */
|
|
3312
|
+
apiParamKey: string;
|
|
3313
|
+
}
|
|
3314
|
+
/**
|
|
3315
|
+
* Configuration for the left-hand filter panel (powered by SmartForm).
|
|
3316
|
+
*/
|
|
3317
|
+
interface FilterPanelConfig {
|
|
3318
|
+
/** Full SmartForm JSON schema (entityType, sectionConfig, actionBarConfig, etc.) */
|
|
3319
|
+
smartFormConfig: FormSchema;
|
|
3320
|
+
/** Maps each form field to the API query-param that the table expects */
|
|
3321
|
+
filterParamMapping: FilterParamMap[];
|
|
3322
|
+
/**
|
|
3323
|
+
* Optional default values pre-filled when the component opens AND restored on Clear Filter.
|
|
3324
|
+
* Key = formFieldName, Value = the field value.
|
|
3325
|
+
* When provided, the initial table load will include these params.
|
|
3326
|
+
*/
|
|
3327
|
+
defaultValues?: Record<string, any>;
|
|
3328
|
+
/**
|
|
3329
|
+
* List of field names that should be rendered as disabled/read-only.
|
|
3330
|
+
* The values are still used when building API params, but users cannot change them.
|
|
3331
|
+
* Their values are preserved when Clear Filter is triggered.
|
|
3332
|
+
*/
|
|
3333
|
+
disabledFields?: string[];
|
|
3334
|
+
/**
|
|
3335
|
+
* i18n key or literal text for the "Clear Filter" button.
|
|
3336
|
+
* Defaults to 'COMMON.FILTER_TABLE.CLEAR_FILTER'.
|
|
3337
|
+
*/
|
|
3338
|
+
clearFilterLabel?: string;
|
|
3339
|
+
/**
|
|
3340
|
+
* i18n key or literal text for the "Apply Filter" button.
|
|
3341
|
+
* Defaults to 'COMMON.FILTER_TABLE.APPLY_FILTER'.
|
|
3342
|
+
*/
|
|
3343
|
+
applyFilterLabel?: string;
|
|
3344
|
+
}
|
|
3345
|
+
/**
|
|
3346
|
+
* Controls selection behaviour and bottom action bar labels.
|
|
3347
|
+
*/
|
|
3348
|
+
interface SelectionConfig {
|
|
3349
|
+
/** Allow selecting multiple rows (true = checkbox per row, false = radio). */
|
|
3350
|
+
multiSelect: boolean;
|
|
3351
|
+
/**
|
|
3352
|
+
* i18n token for the "X of Y users Selected" counter.
|
|
3353
|
+
* Use placeholders {selected} and {total}.
|
|
3354
|
+
* Example: "COMMON.FILTER_TABLE.SELECTION_COUNT"
|
|
3355
|
+
*/
|
|
3356
|
+
selectionCountLabel: string;
|
|
3357
|
+
/** i18n token (or literal text) for the primary submit button. */
|
|
3358
|
+
submitButtonLabel: string;
|
|
3359
|
+
/** i18n token (or literal text) for the secondary cancel/back button. */
|
|
3360
|
+
cancelButtonLabel: string;
|
|
3361
|
+
}
|
|
3362
|
+
/**
|
|
3363
|
+
* Top-level configuration object for FilterTableSelectorComponent.
|
|
3364
|
+
*/
|
|
3365
|
+
interface FilterTableSelectorConfig {
|
|
3366
|
+
/** Dialog / modal heading. */
|
|
3367
|
+
title?: string;
|
|
3368
|
+
/** Left-panel filter form configuration. */
|
|
3369
|
+
filterConfig: FilterPanelConfig;
|
|
3370
|
+
/**
|
|
3371
|
+
* Right-panel table configuration.
|
|
3372
|
+
* Extends the standard SmartTable config; `selectable` should be true.
|
|
3373
|
+
* `multiSelect` is controlled via selectionConfig.multiSelect.
|
|
3374
|
+
*/
|
|
3375
|
+
tableConfig: FilterTableConfig;
|
|
3376
|
+
/** Selection behaviour and bottom action bar labels. */
|
|
3377
|
+
selectionConfig: SelectionConfig;
|
|
3378
|
+
}
|
|
3379
|
+
/**
|
|
3380
|
+
* Extended TableConfig for FilterTableSelector — adds multiSelect support.
|
|
3381
|
+
*/
|
|
3382
|
+
interface FilterTableConfig extends TableConfig {
|
|
3383
|
+
/**
|
|
3384
|
+
* When true (and selectable=true), multiple rows can be selected simultaneously.
|
|
3385
|
+
* When false, only one row can be selected at a time (radio behaviour).
|
|
3386
|
+
*/
|
|
3387
|
+
multiSelect?: boolean;
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
declare class FilterTableSelectorComponent implements OnInit, OnChanges, OnDestroy {
|
|
3391
|
+
private cdr;
|
|
3392
|
+
private ngZone;
|
|
3393
|
+
/** Full config object driven by consuming MFE JSON. */
|
|
3394
|
+
config: FilterTableSelectorConfig;
|
|
3395
|
+
/**
|
|
3396
|
+
* Flat i18n labels map from the consuming MFE.
|
|
3397
|
+
* Mirrors the pattern used by SmartFormComponent.
|
|
3398
|
+
*/
|
|
3399
|
+
labels: Record<string, string>;
|
|
3400
|
+
/**
|
|
3401
|
+
* Pre-selected row identifiers.
|
|
3402
|
+
* When provided, matching rows are pre-checked on first load and
|
|
3403
|
+
* re-checked after each page navigation.
|
|
3404
|
+
* Must be an array of row objects (the same shape returned by the API).
|
|
3405
|
+
*/
|
|
3406
|
+
preSelectedRows: any[];
|
|
3407
|
+
/** Emits the array of currently selected row objects on "Add / Submit". */
|
|
3408
|
+
onSubmit: EventEmitter<any[]>;
|
|
3409
|
+
/** Emits void on "Back / Cancel". */
|
|
3410
|
+
onCancel: EventEmitter<void>;
|
|
3411
|
+
/** A deep-copy of tableConfig with the current filter params baked-in. */
|
|
3412
|
+
resolvedTableConfig: FilterTableConfig;
|
|
3413
|
+
/** Current active filter params (merged from form submission). */
|
|
3414
|
+
activeFilterParams: Record<string, string>;
|
|
3415
|
+
/** The base API URL without any filter query params. */
|
|
3416
|
+
private baseApiUrl;
|
|
3417
|
+
/** All rows selected so far, tracked across pagination pages. */
|
|
3418
|
+
selectedRows: any[];
|
|
3419
|
+
/** Total rows currently loaded in the table (reported by SmartTable rowSelect). */
|
|
3420
|
+
totalTableItems: number;
|
|
3421
|
+
/** Serialised SmartForm JSON (with labels translated + disabled fields applied). */
|
|
3422
|
+
resolvedFormJson: string;
|
|
3423
|
+
/**
|
|
3424
|
+
* Default values to prefill the SmartForm.
|
|
3425
|
+
* Updated on each initialize() call and reset to config defaults on Clear Filter.
|
|
3426
|
+
*/
|
|
3427
|
+
resolvedInitialValues: Record<string, any>;
|
|
3428
|
+
/**
|
|
3429
|
+
* Version counter — bumping this forces *ngIf to re-create the SmartForm
|
|
3430
|
+
* component with fresh initial values (used by Clear Filter).
|
|
3431
|
+
*/
|
|
3432
|
+
formVersion: number;
|
|
3433
|
+
/** Whether the filter panel is visible (toggled on mobile, always visible on desktop). */
|
|
3434
|
+
filterPanelVisible: boolean;
|
|
3435
|
+
/**
|
|
3436
|
+
* Tracks the live form values as the user changes fields.
|
|
3437
|
+
* Updated via SmartForm's (valueChange) output.
|
|
3438
|
+
* Used when the user clicks the "Apply Filter" button in the component.
|
|
3439
|
+
*/
|
|
3440
|
+
currentFormValues: Record<string, any>;
|
|
3441
|
+
private destroy$;
|
|
3442
|
+
constructor(cdr: ChangeDetectorRef, ngZone: NgZone);
|
|
3443
|
+
ngOnInit(): void;
|
|
3444
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
3445
|
+
ngOnDestroy(): void;
|
|
3446
|
+
private initialize;
|
|
3447
|
+
/**
|
|
3448
|
+
* Serialises the SmartForm config JSON.
|
|
3449
|
+
* Applies disabledFields from filterPanelConfig.
|
|
3450
|
+
*/
|
|
3451
|
+
private buildFormJson;
|
|
3452
|
+
/**
|
|
3453
|
+
* Rebuilds resolvedTableConfig with the current activeFilterParams appended
|
|
3454
|
+
* to the base API URL.
|
|
3455
|
+
*/
|
|
3456
|
+
private applyFilterParamsToTable;
|
|
3457
|
+
/**
|
|
3458
|
+
* Converts a flat form-value map to API param key/value pairs
|
|
3459
|
+
* using the configured filterParamMapping.
|
|
3460
|
+
*/
|
|
3461
|
+
private buildFilterParams;
|
|
3462
|
+
/**
|
|
3463
|
+
* Called every time a form field value changes (SmartForm valueChange output).
|
|
3464
|
+
* We track the current values so the component-level "Apply Filter" button
|
|
3465
|
+
* can read them without relying on a form submit button inside the JSON config.
|
|
3466
|
+
*/
|
|
3467
|
+
onFormValueChange(values: Record<string, any>): void;
|
|
3468
|
+
/**
|
|
3469
|
+
* Called when the user clicks the "Apply Filter" button rendered by the component.
|
|
3470
|
+
* Builds API params from the tracked form values and reloads the table.
|
|
3471
|
+
*/
|
|
3472
|
+
applyCurrentFilter(): void;
|
|
3473
|
+
/**
|
|
3474
|
+
* Clear Filter: resets form to default values (preserving disabled-field values),
|
|
3475
|
+
* reloads the table with default params.
|
|
3476
|
+
* The form is re-created via formVersion bump so SmartForm gets fresh initialValues.
|
|
3477
|
+
*/
|
|
3478
|
+
onClearFilter(): void;
|
|
3479
|
+
/**
|
|
3480
|
+
* Called by SmartTable's (rowSelect) output.
|
|
3481
|
+
* Merges page-level selection with the cross-page tracking set.
|
|
3482
|
+
*/
|
|
3483
|
+
onRowSelect(globalSelection: any[]): void;
|
|
3484
|
+
/**
|
|
3485
|
+
* Syncs preSelectedRows into the local selectedRows (called when input changes).
|
|
3486
|
+
*/
|
|
3487
|
+
private syncPreselection;
|
|
3488
|
+
handleSubmit(): void;
|
|
3489
|
+
handleCancel(): void;
|
|
3490
|
+
translate(key: string): string;
|
|
3491
|
+
get titleLabel(): string;
|
|
3492
|
+
get submitButtonLabel(): string;
|
|
3493
|
+
get cancelButtonLabel(): string;
|
|
3494
|
+
get clearFilterButtonLabel(): string;
|
|
3495
|
+
get applyFilterButtonLabel(): string;
|
|
3496
|
+
get selectionCountText(): string;
|
|
3497
|
+
get hasActiveFilters(): boolean;
|
|
3498
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterTableSelectorComponent, never>;
|
|
3499
|
+
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>;
|
|
3500
|
+
}
|
|
3501
|
+
|
|
3388
3502
|
declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
3389
3503
|
private http;
|
|
3390
3504
|
private router;
|
|
@@ -3417,6 +3531,11 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3417
3531
|
row: any;
|
|
3418
3532
|
column: string;
|
|
3419
3533
|
}>;
|
|
3534
|
+
/**
|
|
3535
|
+
* Pre-selected row objects. These are tracked across pages.
|
|
3536
|
+
* Matching incoming data rows (via rowIdField) will be checked automatically.
|
|
3537
|
+
*/
|
|
3538
|
+
selectedRows: any[];
|
|
3420
3539
|
/** Emitted in external-data mode when the user changes the sort column/direction. */
|
|
3421
3540
|
sortChange: EventEmitter<TableDataChangeEvent>;
|
|
3422
3541
|
/** Emitted in external-data mode when the user changes the page or page size. */
|
|
@@ -3436,7 +3555,6 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3436
3555
|
[key: string]: any;
|
|
3437
3556
|
};
|
|
3438
3557
|
searchTerm: string;
|
|
3439
|
-
selectedRows: any[];
|
|
3440
3558
|
stickyColumnStyles: {
|
|
3441
3559
|
[key: string]: any;
|
|
3442
3560
|
};
|
|
@@ -3447,6 +3565,13 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3447
3565
|
top: number;
|
|
3448
3566
|
right: number;
|
|
3449
3567
|
};
|
|
3568
|
+
/** Items and row for the currently open dropdown — rendered in a portal outside the table. */
|
|
3569
|
+
activeDropdownItems: any[] | null;
|
|
3570
|
+
activeDropdownRow: any;
|
|
3571
|
+
openFilterKey: string | null;
|
|
3572
|
+
activeFilterLabels: {
|
|
3573
|
+
[key: string]: string;
|
|
3574
|
+
};
|
|
3450
3575
|
deleteModalOpen: boolean;
|
|
3451
3576
|
deleteModalConfig: any;
|
|
3452
3577
|
private pendingDeleteAction;
|
|
@@ -3462,11 +3587,24 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3462
3587
|
private setupResizeObserver;
|
|
3463
3588
|
private observeHeaders;
|
|
3464
3589
|
loadData(): void;
|
|
3590
|
+
/**
|
|
3591
|
+
* Syncs the locally loaded data set with the externally provided selectedRows.
|
|
3592
|
+
* Marks 'selected' property on row objects to reflect checkbox state.
|
|
3593
|
+
*/
|
|
3594
|
+
private syncSelection;
|
|
3465
3595
|
onPageChange(page: number): void;
|
|
3466
3596
|
onPageSizeChange(size: number): void;
|
|
3467
3597
|
onSort(col: TableColumn): void;
|
|
3468
3598
|
onSearch(event: Event): void;
|
|
3469
3599
|
onFilterChange(key: string, event: Event): void;
|
|
3600
|
+
private applyFilter;
|
|
3601
|
+
toggleFilter(key: string, event: Event): void;
|
|
3602
|
+
selectFilterOption(filter: any, opt: {
|
|
3603
|
+
label: string;
|
|
3604
|
+
value: any;
|
|
3605
|
+
} | null): void;
|
|
3606
|
+
getFilterDisplay(filter: any): string;
|
|
3607
|
+
isFilterActive(filter: any): boolean;
|
|
3470
3608
|
/**
|
|
3471
3609
|
* Assembles the current table state into a `TableDataChangeEvent` object.
|
|
3472
3610
|
* Emitted to the parent in external-data mode so it can fetch and supply new data.
|
|
@@ -3485,7 +3623,8 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3485
3623
|
updateSelectedRows(): void;
|
|
3486
3624
|
getCellValue(row: any, col: TableColumn): any;
|
|
3487
3625
|
getBadgeClass(row: any, col: TableColumn): string;
|
|
3488
|
-
|
|
3626
|
+
getAscOpacity(key: string): number;
|
|
3627
|
+
getDescOpacity(key: string): number;
|
|
3489
3628
|
private replaceParams;
|
|
3490
3629
|
private loadFilterOptions;
|
|
3491
3630
|
private getValueByPath;
|
|
@@ -3494,10 +3633,47 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3494
3633
|
get columnCount(): number;
|
|
3495
3634
|
onColumnClick(row: any, col: TableColumn): void;
|
|
3496
3635
|
private getHeaders;
|
|
3497
|
-
toggleDropdown(id: string, event: Event): void;
|
|
3636
|
+
toggleDropdown(id: string, event: Event, items: any[], row: any): void;
|
|
3498
3637
|
closeDropdown(): void;
|
|
3499
3638
|
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>;
|
|
3639
|
+
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>;
|
|
3640
|
+
}
|
|
3641
|
+
|
|
3642
|
+
interface PaginationLabels {
|
|
3643
|
+
items: string;
|
|
3644
|
+
of: string;
|
|
3645
|
+
perPage: string;
|
|
3646
|
+
}
|
|
3647
|
+
declare class PaginationComponent implements OnInit, OnChanges {
|
|
3648
|
+
totalItems: number;
|
|
3649
|
+
itemsPerPage: number;
|
|
3650
|
+
currentPage: number;
|
|
3651
|
+
pageSizeOptions: number[];
|
|
3652
|
+
theme: 'theme-1' | 'theme-2';
|
|
3653
|
+
labels: PaginationLabels;
|
|
3654
|
+
pageChange: EventEmitter<number>;
|
|
3655
|
+
itemsPerPageChange: EventEmitter<number>;
|
|
3656
|
+
totalPages: number;
|
|
3657
|
+
pages: (number | string)[];
|
|
3658
|
+
startItem: number;
|
|
3659
|
+
endItem: number;
|
|
3660
|
+
constructor();
|
|
3661
|
+
ngOnInit(): void;
|
|
3662
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
3663
|
+
calculatePagination(): void;
|
|
3664
|
+
getVisiblePages(current: number, total: number): (number | string)[];
|
|
3665
|
+
onPageChange(page: number | string): void;
|
|
3666
|
+
onItemsPerPageChange(event: Event): void;
|
|
3667
|
+
nextPage(): void;
|
|
3668
|
+
prevPage(): void;
|
|
3669
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
|
3670
|
+
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>;
|
|
3671
|
+
}
|
|
3672
|
+
|
|
3673
|
+
declare class PaginationModule {
|
|
3674
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationModule, never>;
|
|
3675
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PaginationModule, [typeof PaginationComponent], [typeof i2$1.CommonModule], [typeof PaginationComponent]>;
|
|
3676
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PaginationModule>;
|
|
3501
3677
|
}
|
|
3502
3678
|
|
|
3503
3679
|
declare class SmartTableModule {
|
|
@@ -3506,6 +3682,141 @@ declare class SmartTableModule {
|
|
|
3506
3682
|
static ɵinj: i0.ɵɵInjectorDeclaration<SmartTableModule>;
|
|
3507
3683
|
}
|
|
3508
3684
|
|
|
3685
|
+
declare class FilterTableSelectorModule {
|
|
3686
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterTableSelectorModule, never>;
|
|
3687
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FilterTableSelectorModule, [typeof FilterTableSelectorComponent], [typeof i2$1.CommonModule, typeof SmartFormModule, typeof SmartTableModule, typeof ButtonModule], [typeof FilterTableSelectorComponent]>;
|
|
3688
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FilterTableSelectorModule>;
|
|
3689
|
+
}
|
|
3690
|
+
|
|
3691
|
+
declare class SharedUiModule {
|
|
3692
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SharedUiModule, never>;
|
|
3693
|
+
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]>;
|
|
3694
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SharedUiModule>;
|
|
3695
|
+
}
|
|
3696
|
+
|
|
3697
|
+
/**
|
|
3698
|
+
* Utility functions for LocalStorage operations
|
|
3699
|
+
*/
|
|
3700
|
+
declare const getLocalStorageItem: (key: string) => string | null;
|
|
3701
|
+
declare const setLocalStorageItem: (key: string, value: string) => void;
|
|
3702
|
+
declare const removeLocalStorageItem: (key: string) => void;
|
|
3703
|
+
declare const clearLocalStorage: () => void;
|
|
3704
|
+
/**
|
|
3705
|
+
* Utility functions for SessionStorage operations
|
|
3706
|
+
*/
|
|
3707
|
+
declare const getSessionStorageItem: (key: string) => string | null;
|
|
3708
|
+
declare const setSessionStorageItem: (key: string, value: string) => void;
|
|
3709
|
+
declare const removeSessionStorageItem: (key: string) => void;
|
|
3710
|
+
declare const clearSessionStorage: () => void;
|
|
3711
|
+
|
|
3712
|
+
/**
|
|
3713
|
+
* Utility functions for string manipulation
|
|
3714
|
+
*/
|
|
3715
|
+
declare class StringUtils {
|
|
3716
|
+
/**
|
|
3717
|
+
* Converts a string to camelCase.
|
|
3718
|
+
* Example: "First Name" -> "firstName", "Profile Picture" -> "profilePicture"
|
|
3719
|
+
*/
|
|
3720
|
+
static toCamelCase(str?: string): string;
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
/**
|
|
3724
|
+
* Recursively translates the Configuration object using the provided labels map.
|
|
3725
|
+
* This function processes:
|
|
3726
|
+
* - Section Titles
|
|
3727
|
+
* - Field Labels
|
|
3728
|
+
* - Placeholders
|
|
3729
|
+
* - Help Texts
|
|
3730
|
+
* - Option Labels (for static options)
|
|
3731
|
+
* - Repeater Labels (addLabel, repeaterItemLabel)
|
|
3732
|
+
*
|
|
3733
|
+
* @param config The FormConfig object to translate
|
|
3734
|
+
* @param labelsMap A map of key-value pairs for translation (Flattened JSON)
|
|
3735
|
+
* @returns A new FormConfig object with translated strings
|
|
3736
|
+
*/
|
|
3737
|
+
declare function translateConfig(config: any, labelsMap: any): any;
|
|
3738
|
+
|
|
3739
|
+
/**
|
|
3740
|
+
* Example: Basic Form Configuration
|
|
3741
|
+
* This is a generic example for testing and demonstration purposes.
|
|
3742
|
+
*/
|
|
3743
|
+
declare const EXAMPLE_FORM_CONFIG: FormConfig;
|
|
3744
|
+
/**
|
|
3745
|
+
* Example: Target Group Configuration
|
|
3746
|
+
* Demonstrates composite fields for Age Group and Gender Split
|
|
3747
|
+
*/
|
|
3748
|
+
declare const TARGET_GROUP_CONFIG: FormConfig;
|
|
3749
|
+
|
|
3750
|
+
declare const configurableForm_examples_d_EXAMPLE_FORM_CONFIG: typeof EXAMPLE_FORM_CONFIG;
|
|
3751
|
+
declare const configurableForm_examples_d_TARGET_GROUP_CONFIG: typeof TARGET_GROUP_CONFIG;
|
|
3752
|
+
declare namespace configurableForm_examples_d {
|
|
3753
|
+
export {
|
|
3754
|
+
configurableForm_examples_d_EXAMPLE_FORM_CONFIG as EXAMPLE_FORM_CONFIG,
|
|
3755
|
+
configurableForm_examples_d_TARGET_GROUP_CONFIG as TARGET_GROUP_CONFIG,
|
|
3756
|
+
};
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3759
|
+
interface NavStyleConfig {
|
|
3760
|
+
width?: string;
|
|
3761
|
+
backgroundColor?: string;
|
|
3762
|
+
borderRadius?: string;
|
|
3763
|
+
border?: string;
|
|
3764
|
+
padding?: string;
|
|
3765
|
+
gap?: string;
|
|
3766
|
+
boxShadow?: string;
|
|
3767
|
+
itemColor?: string;
|
|
3768
|
+
itemRadius?: string;
|
|
3769
|
+
itemPadding?: string;
|
|
3770
|
+
fontSize?: string;
|
|
3771
|
+
fontWeight?: string;
|
|
3772
|
+
activeItemBg?: string;
|
|
3773
|
+
activeItemColor?: string;
|
|
3774
|
+
activeItemFontWeight?: string;
|
|
3775
|
+
activeItemBorderColor?: string;
|
|
3776
|
+
hoverItemBg?: string;
|
|
3777
|
+
hoverItemColor?: string;
|
|
3778
|
+
badgeBg?: string;
|
|
3779
|
+
badgeColor?: string;
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
interface NavItem {
|
|
3783
|
+
id: string | number;
|
|
3784
|
+
label: string;
|
|
3785
|
+
icon?: string;
|
|
3786
|
+
badge?: string | number;
|
|
3787
|
+
disabled?: boolean;
|
|
3788
|
+
}
|
|
3789
|
+
declare class NavComponent implements OnChanges {
|
|
3790
|
+
items: NavItem[];
|
|
3791
|
+
activeId: string | number | null;
|
|
3792
|
+
variant: 'filled' | 'underline' | 'pills';
|
|
3793
|
+
orientation: 'horizontal' | 'vertical';
|
|
3794
|
+
styleConfig: NavStyleConfig;
|
|
3795
|
+
selectionChange: EventEmitter<NavItem>;
|
|
3796
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
3797
|
+
get computedStyles(): {
|
|
3798
|
+
[key: string]: string | undefined;
|
|
3799
|
+
};
|
|
3800
|
+
onItemClick(item: NavItem): void;
|
|
3801
|
+
trackById(index: number, item: NavItem): string | number;
|
|
3802
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavComponent, never>;
|
|
3803
|
+
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>;
|
|
3804
|
+
}
|
|
3805
|
+
|
|
3806
|
+
declare class NavModule {
|
|
3807
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavModule, never>;
|
|
3808
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NavModule, [typeof NavComponent], [typeof i2$1.CommonModule], [typeof NavComponent]>;
|
|
3809
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NavModule>;
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3812
|
+
declare const DEFAULT_ITEMS_PER_PAGE = 10;
|
|
3813
|
+
declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
|
|
3814
|
+
declare const PAGINATION_THEME_DEFAULT = "theme-1";
|
|
3815
|
+
declare const PAGINATION_THEME_DARK = "theme-2";
|
|
3816
|
+
declare const NAV_VARIANT_DEFAULT: 'filled' | 'underline' | 'pills';
|
|
3817
|
+
declare const NAV_ORIENTATION_DEFAULT: 'horizontal' | 'vertical';
|
|
3818
|
+
declare const DEFAULT_SIDE_NAV_TOOLTIP_POSITION = "right";
|
|
3819
|
+
|
|
3509
3820
|
declare function appendBaseUrlRecursively(obj: any, baseURL: string): void;
|
|
3510
3821
|
|
|
3511
3822
|
declare class ValidationUtils {
|
|
@@ -3555,5 +3866,5 @@ declare class SnackbarModule {
|
|
|
3555
3866
|
static ɵinj: i0.ɵɵInjectorDeclaration<SnackbarModule>;
|
|
3556
3867
|
}
|
|
3557
3868
|
|
|
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 };
|
|
3869
|
+
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 };
|
|
3870
|
+
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 };
|