commons-shared-web-ui 0.0.27 → 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/fesm2022/commons-shared-web-ui.mjs +1303 -673
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -1
- package/index.d.ts +524 -175
- package/package.json +1 -1
- package/src/lib/modules/filter-table-selector/filter-table-selector.theme.scss +36 -0
- package/src/lib/modules/smart-form/smart-form.theme.scss +317 -7
- 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';
|
|
@@ -58,6 +58,12 @@ interface FormSchema {
|
|
|
58
58
|
metadata?: {
|
|
59
59
|
[key: string]: any;
|
|
60
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* When true, top-level GROUP children of sectionConfig are rendered as
|
|
63
|
+
* a horizontal stepper at the top, showing one section at a time.
|
|
64
|
+
* Navigate between sections via the Next/Previous buttons in the host app.
|
|
65
|
+
*/
|
|
66
|
+
sectionStepper?: boolean;
|
|
61
67
|
sectionConfig?: SectionConfig;
|
|
62
68
|
stepperConfig?: StepperConfig;
|
|
63
69
|
submitConfig?: SubmitConfig;
|
|
@@ -155,6 +161,12 @@ interface ActionButtonConfig {
|
|
|
155
161
|
hidden?: boolean;
|
|
156
162
|
/** State. @default false */
|
|
157
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;
|
|
158
170
|
/** Action logic. */
|
|
159
171
|
action: ActionConfig;
|
|
160
172
|
}
|
|
@@ -261,6 +273,7 @@ interface FieldConfig {
|
|
|
261
273
|
numberConfig?: NumberConfig;
|
|
262
274
|
dateConfig?: DateConfig;
|
|
263
275
|
optionConfig?: OptionConfig$1;
|
|
276
|
+
autocompleteConfig?: AutocompleteConfig;
|
|
264
277
|
generatedConfig?: GeneratedConfig;
|
|
265
278
|
rangeConfig?: RangeConfig;
|
|
266
279
|
attachmentConfig?: AttachmentConfig;
|
|
@@ -314,6 +327,72 @@ interface OptionConfig$1 {
|
|
|
314
327
|
layout?: 'row' | 'column';
|
|
315
328
|
optionList?: OptionItem[];
|
|
316
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
|
+
}
|
|
317
396
|
interface EmailConfig {
|
|
318
397
|
defaultDomain?: string;
|
|
319
398
|
allowedDomains?: string[];
|
|
@@ -1087,6 +1166,15 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
1087
1166
|
fileAdded: EventEmitter<any>;
|
|
1088
1167
|
fileUploadFinished: EventEmitter<any>;
|
|
1089
1168
|
fileRemoved: EventEmitter<any>;
|
|
1169
|
+
/** Emitted whenever the active section step changes. Carries current state so the
|
|
1170
|
+
* host can show/hide Previous/Next/Submit buttons in its own footer. */
|
|
1171
|
+
stepChange: EventEmitter<{
|
|
1172
|
+
currentStep: number;
|
|
1173
|
+
totalSteps: number;
|
|
1174
|
+
isFirst: boolean;
|
|
1175
|
+
isLast: boolean;
|
|
1176
|
+
stepLabel: string;
|
|
1177
|
+
}>;
|
|
1090
1178
|
formSchema: FormSchema;
|
|
1091
1179
|
formGroup: FormGroup;
|
|
1092
1180
|
fieldList: FieldConfig[];
|
|
@@ -1094,9 +1182,27 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
1094
1182
|
currentStep: number;
|
|
1095
1183
|
isLoading: boolean;
|
|
1096
1184
|
isDraftLoading: boolean;
|
|
1185
|
+
/** True when sectionStepper mode is active (SECTION form with top-level GROUPs as steps). */
|
|
1186
|
+
isSectionStepper: boolean;
|
|
1187
|
+
/** Index of the currently visible section step. */
|
|
1188
|
+
currentSectionStep: number;
|
|
1189
|
+
/** Flat list of top-level GROUP FieldConfigs that become the stepper steps. */
|
|
1190
|
+
sectionSteps: FieldConfig[];
|
|
1191
|
+
/** Validation state per section step — drives badge colour/icon. */
|
|
1192
|
+
stepValidationStates: ('untouched' | 'valid' | 'warning')[];
|
|
1193
|
+
/** Flat field-name lists per step used for targeted validation. */
|
|
1194
|
+
private stepFieldNames;
|
|
1195
|
+
/** Controls skeleton visibility. Stays false until schema is parsed AND
|
|
1196
|
+
* any EDIT-mode data fetch completes, but always shows for at least
|
|
1197
|
+
* SKELETON_MIN_MS so the animation is visible even on fast loads. */
|
|
1198
|
+
isFormReady: boolean;
|
|
1199
|
+
private readonly SKELETON_MIN_MS;
|
|
1200
|
+
private _skeletonStart;
|
|
1097
1201
|
constructor(fb: FormBuilder, controller: SmartFormController, expressionService: ExpressionService, http: HttpClient, snackbarService: SnackbarService, router: Router);
|
|
1098
1202
|
ngOnInit(): void;
|
|
1099
1203
|
loadEditData(): void;
|
|
1204
|
+
/** Flips isFormReady=true after the skeleton has been visible for at least SKELETON_MIN_MS. */
|
|
1205
|
+
private _markReady;
|
|
1100
1206
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1101
1207
|
ngOnDestroy(): void;
|
|
1102
1208
|
parseFormJson(): void;
|
|
@@ -1133,6 +1239,25 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
1133
1239
|
get canGoNext(): boolean;
|
|
1134
1240
|
get canGoPrevious(): boolean;
|
|
1135
1241
|
get currentStepConfig(): FieldConfig | undefined;
|
|
1242
|
+
/** Advance to the next section step. Called by the host footer "Next" button.
|
|
1243
|
+
* Validates the current step first — marks it valid (green) or warning (orange). */
|
|
1244
|
+
navigateToNext(): void;
|
|
1245
|
+
/** Go back to the previous section step. Called by the host footer "Previous" button. */
|
|
1246
|
+
navigateToPrevious(): void;
|
|
1247
|
+
/** Jump directly to a specific section step by index.
|
|
1248
|
+
* Validates the step being left so the badge state updates correctly. */
|
|
1249
|
+
goToSectionStep(index: number): void;
|
|
1250
|
+
get isSectionStepFirst(): boolean;
|
|
1251
|
+
get isSectionStepLast(): boolean;
|
|
1252
|
+
/** Returns the SectionConfig for a given step — passed to lib-form-section.
|
|
1253
|
+
* The outer label is intentionally omitted because the stepper nav already
|
|
1254
|
+
* displays it; showing it again inside the content would be redundant. */
|
|
1255
|
+
getSectionStepConfig(step: FieldConfig): any;
|
|
1256
|
+
private _emitStepChange;
|
|
1257
|
+
/** Marks all controls in the given step as touched and records valid/warning state. */
|
|
1258
|
+
private _validateStep;
|
|
1259
|
+
/** Recursively collects all leaf field names from a set of FieldConfigs. */
|
|
1260
|
+
private _collectFieldNames;
|
|
1136
1261
|
get nextLabel(): string;
|
|
1137
1262
|
get submitLabel(): string;
|
|
1138
1263
|
get previousLabel(): string;
|
|
@@ -1146,7 +1271,7 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
1146
1271
|
private getButtonByActionKind;
|
|
1147
1272
|
private navigateTo;
|
|
1148
1273
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormComponent, never>;
|
|
1149
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SmartFormComponent, "lib-smart-form", never, { "formJson": { "alias": "formJson"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "enableDraftAutoSave": { "alias": "enableDraftAutoSave"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; }, { "submit": "submit"; "draftSave": "draftSave"; "actionClick": "actionClick"; "valueChange": "valueChange"; "fileAdded": "fileAdded"; "fileUploadFinished": "fileUploadFinished"; "fileRemoved": "fileRemoved"; }, never, never, false, never>;
|
|
1274
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SmartFormComponent, "lib-smart-form", never, { "formJson": { "alias": "formJson"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "enableDraftAutoSave": { "alias": "enableDraftAutoSave"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; }, { "submit": "submit"; "draftSave": "draftSave"; "actionClick": "actionClick"; "valueChange": "valueChange"; "fileAdded": "fileAdded"; "fileUploadFinished": "fileUploadFinished"; "fileRemoved": "fileRemoved"; "stepChange": "stepChange"; }, never, never, false, never>;
|
|
1150
1275
|
}
|
|
1151
1276
|
|
|
1152
1277
|
declare class FormSectionComponent implements OnInit, OnDestroy {
|
|
@@ -1159,6 +1284,8 @@ declare class FormSectionComponent implements OnInit, OnDestroy {
|
|
|
1159
1284
|
* Each element is a FormGroup representing one repeater instance.
|
|
1160
1285
|
*/
|
|
1161
1286
|
repeaterFormArray: FormArray;
|
|
1287
|
+
/** Tracks which accordion panels are open (by index). New instances start expanded. */
|
|
1288
|
+
expandedInstances: Set<number>;
|
|
1162
1289
|
/**
|
|
1163
1290
|
* The key under which the FormArray is registered in the root formGroup.
|
|
1164
1291
|
* Falls back to config.name or a generated key.
|
|
@@ -1171,6 +1298,8 @@ declare class FormSectionComponent implements OnInit, OnDestroy {
|
|
|
1171
1298
|
private createInstanceGroup;
|
|
1172
1299
|
addInstance(): void;
|
|
1173
1300
|
removeInstance(index: number): void;
|
|
1301
|
+
toggleInstance(index: number): void;
|
|
1302
|
+
isExpanded(index: number): boolean;
|
|
1174
1303
|
getInstanceGroup(index: number): FormGroup;
|
|
1175
1304
|
get instanceGroups(): FormGroup[];
|
|
1176
1305
|
/** For non-allowMulti sections we simply pass the root formGroup down */
|
|
@@ -1241,6 +1370,8 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1241
1370
|
label: string;
|
|
1242
1371
|
code: any;
|
|
1243
1372
|
}[];
|
|
1373
|
+
/** Cache of the latest dependency parameters for server-side autocomplete filtering */
|
|
1374
|
+
private _latestDependencyValues;
|
|
1244
1375
|
/** For GROUP fields with allowMulti = true */
|
|
1245
1376
|
groupFormArray: FormArray;
|
|
1246
1377
|
/** For GROUP fields with allowMulti = false — single nested FormGroup */
|
|
@@ -1262,6 +1393,8 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1262
1393
|
isExpanded?: boolean;
|
|
1263
1394
|
}[];
|
|
1264
1395
|
private _nextInstanceId;
|
|
1396
|
+
/** Tracks open accordion panels for standard (non-multiSave) GROUP repeaters. */
|
|
1397
|
+
expandedGroupInstances: Set<number>;
|
|
1265
1398
|
/**
|
|
1266
1399
|
* Key used to register the GROUP control on the parent formGroup.
|
|
1267
1400
|
* Priority: sectionConfig.name > field.name > camelCase(label) > '__group__'
|
|
@@ -1283,6 +1416,8 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1283
1416
|
editGroupInstance(index: number): void;
|
|
1284
1417
|
toggleExpandGroupInstance(index: number): void;
|
|
1285
1418
|
removeGroupInstance(index: number, force?: boolean): void;
|
|
1419
|
+
toggleGroupAccordion(index: number): void;
|
|
1420
|
+
isGroupExpanded(index: number): boolean;
|
|
1286
1421
|
trackByInstanceId(_: number, item: {
|
|
1287
1422
|
id: number;
|
|
1288
1423
|
fg: FormGroup;
|
|
@@ -1306,11 +1441,13 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1306
1441
|
}): any;
|
|
1307
1442
|
extractFunctionName(formula: string): string | null;
|
|
1308
1443
|
setupDependencies(): void;
|
|
1309
|
-
loadDropdownOptions(
|
|
1444
|
+
loadDropdownOptions(dynamicParams?: {
|
|
1310
1445
|
[key: string]: any;
|
|
1311
1446
|
}): void;
|
|
1312
1447
|
private getValueByPath;
|
|
1313
|
-
/** 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
|
+
*/
|
|
1314
1451
|
private getHeaders;
|
|
1315
1452
|
updateValue(newValue: any): void;
|
|
1316
1453
|
onCheckboxListChange(code: string, checked: boolean): void;
|
|
@@ -2330,7 +2467,7 @@ interface ConfirmationModalConfig {
|
|
|
2330
2467
|
color?: string;
|
|
2331
2468
|
};
|
|
2332
2469
|
width?: string;
|
|
2333
|
-
size?: 'sm' | 'md' | 'lg';
|
|
2470
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
2334
2471
|
customClass?: string;
|
|
2335
2472
|
backgroundColor?: string;
|
|
2336
2473
|
borderRadius?: string;
|
|
@@ -2998,172 +3135,6 @@ declare class SideNavModule {
|
|
|
2998
3135
|
static ɵinj: i0.ɵɵInjectorDeclaration<SideNavModule>;
|
|
2999
3136
|
}
|
|
3000
3137
|
|
|
3001
|
-
declare class SharedUiModule {
|
|
3002
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SharedUiModule, never>;
|
|
3003
|
-
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]>;
|
|
3004
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<SharedUiModule>;
|
|
3005
|
-
}
|
|
3006
|
-
|
|
3007
|
-
/**
|
|
3008
|
-
* Utility functions for LocalStorage operations
|
|
3009
|
-
*/
|
|
3010
|
-
declare const getLocalStorageItem: (key: string) => string | null;
|
|
3011
|
-
declare const setLocalStorageItem: (key: string, value: string) => void;
|
|
3012
|
-
declare const removeLocalStorageItem: (key: string) => void;
|
|
3013
|
-
declare const clearLocalStorage: () => void;
|
|
3014
|
-
/**
|
|
3015
|
-
* Utility functions for SessionStorage operations
|
|
3016
|
-
*/
|
|
3017
|
-
declare const getSessionStorageItem: (key: string) => string | null;
|
|
3018
|
-
declare const setSessionStorageItem: (key: string, value: string) => void;
|
|
3019
|
-
declare const removeSessionStorageItem: (key: string) => void;
|
|
3020
|
-
declare const clearSessionStorage: () => void;
|
|
3021
|
-
|
|
3022
|
-
/**
|
|
3023
|
-
* Utility functions for string manipulation
|
|
3024
|
-
*/
|
|
3025
|
-
declare class StringUtils {
|
|
3026
|
-
/**
|
|
3027
|
-
* Converts a string to camelCase.
|
|
3028
|
-
* Example: "First Name" -> "firstName", "Profile Picture" -> "profilePicture"
|
|
3029
|
-
*/
|
|
3030
|
-
static toCamelCase(str?: string): string;
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
/**
|
|
3034
|
-
* Recursively translates the Configuration object using the provided labels map.
|
|
3035
|
-
* This function processes:
|
|
3036
|
-
* - Section Titles
|
|
3037
|
-
* - Field Labels
|
|
3038
|
-
* - Placeholders
|
|
3039
|
-
* - Help Texts
|
|
3040
|
-
* - Option Labels (for static options)
|
|
3041
|
-
* - Repeater Labels (addLabel, repeaterItemLabel)
|
|
3042
|
-
*
|
|
3043
|
-
* @param config The FormConfig object to translate
|
|
3044
|
-
* @param labelsMap A map of key-value pairs for translation (Flattened JSON)
|
|
3045
|
-
* @returns A new FormConfig object with translated strings
|
|
3046
|
-
*/
|
|
3047
|
-
declare function translateConfig(config: any, labelsMap: any): any;
|
|
3048
|
-
|
|
3049
|
-
/**
|
|
3050
|
-
* Example: Basic Form Configuration
|
|
3051
|
-
* This is a generic example for testing and demonstration purposes.
|
|
3052
|
-
*/
|
|
3053
|
-
declare const EXAMPLE_FORM_CONFIG: FormConfig;
|
|
3054
|
-
/**
|
|
3055
|
-
* Example: Target Group Configuration
|
|
3056
|
-
* Demonstrates composite fields for Age Group and Gender Split
|
|
3057
|
-
*/
|
|
3058
|
-
declare const TARGET_GROUP_CONFIG: FormConfig;
|
|
3059
|
-
|
|
3060
|
-
declare const configurableForm_examples_d_EXAMPLE_FORM_CONFIG: typeof EXAMPLE_FORM_CONFIG;
|
|
3061
|
-
declare const configurableForm_examples_d_TARGET_GROUP_CONFIG: typeof TARGET_GROUP_CONFIG;
|
|
3062
|
-
declare namespace configurableForm_examples_d {
|
|
3063
|
-
export {
|
|
3064
|
-
configurableForm_examples_d_EXAMPLE_FORM_CONFIG as EXAMPLE_FORM_CONFIG,
|
|
3065
|
-
configurableForm_examples_d_TARGET_GROUP_CONFIG as TARGET_GROUP_CONFIG,
|
|
3066
|
-
};
|
|
3067
|
-
}
|
|
3068
|
-
|
|
3069
|
-
interface PaginationLabels {
|
|
3070
|
-
items: string;
|
|
3071
|
-
of: string;
|
|
3072
|
-
perPage: string;
|
|
3073
|
-
}
|
|
3074
|
-
declare class PaginationComponent implements OnInit, OnChanges {
|
|
3075
|
-
totalItems: number;
|
|
3076
|
-
itemsPerPage: number;
|
|
3077
|
-
currentPage: number;
|
|
3078
|
-
pageSizeOptions: number[];
|
|
3079
|
-
theme: 'theme-1' | 'theme-2';
|
|
3080
|
-
labels: PaginationLabels;
|
|
3081
|
-
pageChange: EventEmitter<number>;
|
|
3082
|
-
itemsPerPageChange: EventEmitter<number>;
|
|
3083
|
-
totalPages: number;
|
|
3084
|
-
pages: (number | string)[];
|
|
3085
|
-
startItem: number;
|
|
3086
|
-
endItem: number;
|
|
3087
|
-
constructor();
|
|
3088
|
-
ngOnInit(): void;
|
|
3089
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
3090
|
-
calculatePagination(): void;
|
|
3091
|
-
getVisiblePages(current: number, total: number): (number | string)[];
|
|
3092
|
-
onPageChange(page: number | string): void;
|
|
3093
|
-
onItemsPerPageChange(event: Event): void;
|
|
3094
|
-
nextPage(): void;
|
|
3095
|
-
prevPage(): void;
|
|
3096
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
|
3097
|
-
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>;
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
declare class PaginationModule {
|
|
3101
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationModule, never>;
|
|
3102
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PaginationModule, [typeof PaginationComponent], [typeof i2$1.CommonModule], [typeof PaginationComponent]>;
|
|
3103
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<PaginationModule>;
|
|
3104
|
-
}
|
|
3105
|
-
|
|
3106
|
-
interface NavStyleConfig {
|
|
3107
|
-
width?: string;
|
|
3108
|
-
backgroundColor?: string;
|
|
3109
|
-
borderRadius?: string;
|
|
3110
|
-
border?: string;
|
|
3111
|
-
padding?: string;
|
|
3112
|
-
gap?: string;
|
|
3113
|
-
boxShadow?: string;
|
|
3114
|
-
itemColor?: string;
|
|
3115
|
-
itemRadius?: string;
|
|
3116
|
-
itemPadding?: string;
|
|
3117
|
-
fontSize?: string;
|
|
3118
|
-
fontWeight?: string;
|
|
3119
|
-
activeItemBg?: string;
|
|
3120
|
-
activeItemColor?: string;
|
|
3121
|
-
activeItemFontWeight?: string;
|
|
3122
|
-
activeItemBorderColor?: string;
|
|
3123
|
-
hoverItemBg?: string;
|
|
3124
|
-
hoverItemColor?: string;
|
|
3125
|
-
badgeBg?: string;
|
|
3126
|
-
badgeColor?: string;
|
|
3127
|
-
}
|
|
3128
|
-
|
|
3129
|
-
interface NavItem {
|
|
3130
|
-
id: string | number;
|
|
3131
|
-
label: string;
|
|
3132
|
-
icon?: string;
|
|
3133
|
-
badge?: string | number;
|
|
3134
|
-
disabled?: boolean;
|
|
3135
|
-
}
|
|
3136
|
-
declare class NavComponent implements OnChanges {
|
|
3137
|
-
items: NavItem[];
|
|
3138
|
-
activeId: string | number | null;
|
|
3139
|
-
variant: 'filled' | 'underline' | 'pills';
|
|
3140
|
-
orientation: 'horizontal' | 'vertical';
|
|
3141
|
-
styleConfig: NavStyleConfig;
|
|
3142
|
-
selectionChange: EventEmitter<NavItem>;
|
|
3143
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
3144
|
-
get computedStyles(): {
|
|
3145
|
-
[key: string]: string | undefined;
|
|
3146
|
-
};
|
|
3147
|
-
onItemClick(item: NavItem): void;
|
|
3148
|
-
trackById(index: number, item: NavItem): string | number;
|
|
3149
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NavComponent, never>;
|
|
3150
|
-
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>;
|
|
3151
|
-
}
|
|
3152
|
-
|
|
3153
|
-
declare class NavModule {
|
|
3154
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NavModule, never>;
|
|
3155
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NavModule, [typeof NavComponent], [typeof i2$1.CommonModule], [typeof NavComponent]>;
|
|
3156
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NavModule>;
|
|
3157
|
-
}
|
|
3158
|
-
|
|
3159
|
-
declare const DEFAULT_ITEMS_PER_PAGE = 10;
|
|
3160
|
-
declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
|
|
3161
|
-
declare const PAGINATION_THEME_DEFAULT = "theme-1";
|
|
3162
|
-
declare const PAGINATION_THEME_DARK = "theme-2";
|
|
3163
|
-
declare const NAV_VARIANT_DEFAULT: 'filled' | 'underline' | 'pills';
|
|
3164
|
-
declare const NAV_ORIENTATION_DEFAULT: 'horizontal' | 'vertical';
|
|
3165
|
-
declare const DEFAULT_SIDE_NAV_TOOLTIP_POSITION = "right";
|
|
3166
|
-
|
|
3167
3138
|
interface TableOption {
|
|
3168
3139
|
label: string;
|
|
3169
3140
|
value: any;
|
|
@@ -3325,6 +3296,203 @@ interface TableDataChangeEvent {
|
|
|
3325
3296
|
};
|
|
3326
3297
|
}
|
|
3327
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
|
+
|
|
3328
3496
|
declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
3329
3497
|
private http;
|
|
3330
3498
|
private router;
|
|
@@ -3357,6 +3525,11 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3357
3525
|
row: any;
|
|
3358
3526
|
column: string;
|
|
3359
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[];
|
|
3360
3533
|
/** Emitted in external-data mode when the user changes the sort column/direction. */
|
|
3361
3534
|
sortChange: EventEmitter<TableDataChangeEvent>;
|
|
3362
3535
|
/** Emitted in external-data mode when the user changes the page or page size. */
|
|
@@ -3376,7 +3549,6 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3376
3549
|
[key: string]: any;
|
|
3377
3550
|
};
|
|
3378
3551
|
searchTerm: string;
|
|
3379
|
-
selectedRows: any[];
|
|
3380
3552
|
stickyColumnStyles: {
|
|
3381
3553
|
[key: string]: any;
|
|
3382
3554
|
};
|
|
@@ -3402,6 +3574,11 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3402
3574
|
private setupResizeObserver;
|
|
3403
3575
|
private observeHeaders;
|
|
3404
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;
|
|
3405
3582
|
onPageChange(page: number): void;
|
|
3406
3583
|
onPageSizeChange(size: number): void;
|
|
3407
3584
|
onSort(col: TableColumn): void;
|
|
@@ -3437,7 +3614,44 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3437
3614
|
toggleDropdown(id: string, event: Event): void;
|
|
3438
3615
|
closeDropdown(): void;
|
|
3439
3616
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableComponent, never>;
|
|
3440
|
-
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>;
|
|
3441
3655
|
}
|
|
3442
3656
|
|
|
3443
3657
|
declare class SmartTableModule {
|
|
@@ -3446,6 +3660,141 @@ declare class SmartTableModule {
|
|
|
3446
3660
|
static ɵinj: i0.ɵɵInjectorDeclaration<SmartTableModule>;
|
|
3447
3661
|
}
|
|
3448
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
|
+
|
|
3449
3798
|
declare function appendBaseUrlRecursively(obj: any, baseURL: string): void;
|
|
3450
3799
|
|
|
3451
3800
|
declare class ValidationUtils {
|
|
@@ -3495,5 +3844,5 @@ declare class SnackbarModule {
|
|
|
3495
3844
|
static ɵinj: i0.ɵɵInjectorDeclaration<SnackbarModule>;
|
|
3496
3845
|
}
|
|
3497
3846
|
|
|
3498
|
-
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 };
|
|
3499
|
-
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 };
|