commons-shared-web-ui 0.0.64 → 0.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import * as i3$2 from '@angular/router';
|
|
|
10
10
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
11
11
|
import { BehaviorSubject, Subject, Observable } from 'rxjs';
|
|
12
12
|
import * as i8$1 from '@angular/cdk/overlay';
|
|
13
|
-
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
13
|
+
import { ScrollStrategy, Overlay, ConnectedPosition } from '@angular/cdk/overlay';
|
|
14
14
|
import { DomSanitizer, SafeResourceUrl, SafeHtml } from '@angular/platform-browser';
|
|
15
15
|
import * as i1 from '@angular/material/card';
|
|
16
16
|
import * as i3 from '@angular/material/checkbox';
|
|
@@ -420,16 +420,70 @@ interface DropdownSearchConfig {
|
|
|
420
420
|
mode?: 'local' | 'server';
|
|
421
421
|
/** Query parameter key for the search term sent to the API (default: 'search'). Only used in 'server' mode. */
|
|
422
422
|
searchKey?: string;
|
|
423
|
+
/** Handling mode: 'standard' (e.g. ?search=term) or 'nested_string' (e.g. ?params=...--SEARCH_TEXT=term) */
|
|
424
|
+
handling?: 'standard' | 'nested_string';
|
|
423
425
|
/** Minimum characters required before triggering a server-side search (default: 3). Only used in 'server' mode. */
|
|
424
426
|
minSearchLength?: number;
|
|
425
427
|
/** Debounce delay in milliseconds before firing search (default: 300). */
|
|
426
428
|
debounceTime?: number;
|
|
427
429
|
}
|
|
430
|
+
interface NestedStringConfig$1 {
|
|
431
|
+
/** Name of the URL query parameter holding the packed string. Default: 'params' */
|
|
432
|
+
paramName: string;
|
|
433
|
+
/** Static base string prepended before dynamic parameters. E.g. 'MARKET_ID=5' */
|
|
434
|
+
baseValue?: string;
|
|
435
|
+
/** Delimiter string between key-value pairs. Default: '--' */
|
|
436
|
+
separator: string;
|
|
437
|
+
/** Key-value assignment operator. Default: '=' */
|
|
438
|
+
assignment?: string;
|
|
439
|
+
}
|
|
440
|
+
interface QueryParamsConfig$1 {
|
|
441
|
+
/** Query parameter key for page index. Default: 'page' */
|
|
442
|
+
pageKey?: string;
|
|
443
|
+
/** Query parameter key for page size. Default: 'size' */
|
|
444
|
+
sizeKey?: string;
|
|
445
|
+
/** Page index offset adjustment (e.g. -1 or 0 or 1). Default: 0 */
|
|
446
|
+
pageIndexOffset?: number;
|
|
447
|
+
/** Handling mode: 'standard' or 'nested_string' */
|
|
448
|
+
filterHandling?: 'standard' | 'nested_string';
|
|
449
|
+
/** Nested string configuration for Dataset APIs */
|
|
450
|
+
nestedStringConfig?: NestedStringConfig$1;
|
|
451
|
+
}
|
|
452
|
+
interface TotalCountConfig {
|
|
453
|
+
/** 'same' (count returned in data response) or 'separate' (dedicated count endpoint). Default: 'same' */
|
|
454
|
+
source?: 'same' | 'separate';
|
|
455
|
+
/** Dedicated Count API URL (required when source === 'separate') */
|
|
456
|
+
apiUrl?: string;
|
|
457
|
+
/** Dot-notation path to extract count (e.g. '0.totalCount', '[0].totalCount', 'totalElements', 'data.total') */
|
|
458
|
+
responsePath?: string;
|
|
459
|
+
}
|
|
460
|
+
interface DropdownPaginationConfig {
|
|
461
|
+
/** Enable server-side pagination. */
|
|
462
|
+
enabled: boolean;
|
|
463
|
+
/** 'loadMore' button or 'infiniteScroll' on scroll. Default: 'loadMore' */
|
|
464
|
+
mode?: 'loadMore' | 'infiniteScroll';
|
|
465
|
+
/** Page size per request. Default: 10 */
|
|
466
|
+
pageSize?: number;
|
|
467
|
+
/** Query param for page index (shorthand when queryParamsConfig is not provided). Default: 'page' */
|
|
468
|
+
pageKey?: string;
|
|
469
|
+
/** Query param for page size (shorthand when queryParamsConfig is not provided). Default: 'size' */
|
|
470
|
+
sizeKey?: string;
|
|
471
|
+
/** 0 for 0-indexed APIs, 1 for 1-indexed APIs. Default: 0 */
|
|
472
|
+
pageOffset?: number;
|
|
473
|
+
/** Configuration for dataset separate count API or same-response count parsing */
|
|
474
|
+
totalCountConfig?: TotalCountConfig;
|
|
475
|
+
/** Shorthand for totalCountConfig.responsePath */
|
|
476
|
+
totalCountPath?: string;
|
|
477
|
+
}
|
|
428
478
|
interface OptionConfig$1 {
|
|
429
479
|
optionClass?: string;
|
|
430
480
|
optionUrl?: string;
|
|
431
481
|
apiUrl?: string;
|
|
432
482
|
apiUrls?: string[];
|
|
483
|
+
/** HTTP method for option API requests. Default: 'GET' */
|
|
484
|
+
apiMethod?: 'GET' | 'POST' | 'PUT' | 'PATCH';
|
|
485
|
+
/** Custom request payload body sent with POST/PUT/PATCH requests. */
|
|
486
|
+
apiPayload?: any;
|
|
433
487
|
dataPath?: string;
|
|
434
488
|
labelPath?: string;
|
|
435
489
|
valuePath?: string;
|
|
@@ -442,6 +496,12 @@ interface OptionConfig$1 {
|
|
|
442
496
|
optionList?: OptionItem[];
|
|
443
497
|
/** Configuration for enabling search functionality inside the dropdown panel. */
|
|
444
498
|
searchConfig?: DropdownSearchConfig;
|
|
499
|
+
/** Query parameters configuration matching smart-table (for pagination and dataset APIs). */
|
|
500
|
+
queryParamsConfig?: QueryParamsConfig$1;
|
|
501
|
+
/** Server-side pagination configuration (loadMore or infiniteScroll). */
|
|
502
|
+
pagination?: DropdownPaginationConfig;
|
|
503
|
+
/** Nested string config shorthand for Dataset APIs. */
|
|
504
|
+
nestedStringConfig?: NestedStringConfig$1;
|
|
445
505
|
/** When true, renders a 'Select All' checkbox at the top of a MULTIPLE select dropdown. */
|
|
446
506
|
showSelectAll?: boolean;
|
|
447
507
|
/** When true, displays a loading spinner during options API requests. */
|
|
@@ -1433,6 +1493,7 @@ declare class FormFieldComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1433
1493
|
private expressionService;
|
|
1434
1494
|
private http;
|
|
1435
1495
|
private hostRef;
|
|
1496
|
+
private overlay;
|
|
1436
1497
|
config: FieldConfig;
|
|
1437
1498
|
controller: SmartFormController;
|
|
1438
1499
|
/**
|
|
@@ -1481,6 +1542,10 @@ declare class FormFieldComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1481
1542
|
get effectiveMaxTime(): string | null;
|
|
1482
1543
|
isMultiDropdownOpen: boolean;
|
|
1483
1544
|
isSingleDropdownOpen: boolean;
|
|
1545
|
+
dropdownCurrentPage: number;
|
|
1546
|
+
dropdownTotalCount: number;
|
|
1547
|
+
hasMoreDropdownPages: boolean;
|
|
1548
|
+
isDropdownLoadingMore: boolean;
|
|
1484
1549
|
searchText: string;
|
|
1485
1550
|
filteredOptionList: any[];
|
|
1486
1551
|
dropdownSearch$: Subject<string>;
|
|
@@ -1573,9 +1638,11 @@ declare class FormFieldComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1573
1638
|
* Priority: sectionConfig.name > field.name > camelCase(label) > '__group__'
|
|
1574
1639
|
*/
|
|
1575
1640
|
get groupKey(): string;
|
|
1576
|
-
|
|
1641
|
+
readonly dropdownScrollStrategy: ScrollStrategy;
|
|
1642
|
+
constructor(fb: FormBuilder, expressionService: ExpressionService, http: HttpClient, hostRef: ElementRef<HTMLElement>, overlay: Overlay);
|
|
1577
1643
|
/** Portal root, resolved from this component's own node rather than the global document. */
|
|
1578
1644
|
private get portalRoot();
|
|
1645
|
+
private _onGlobalScroll;
|
|
1579
1646
|
ngOnInit(): void;
|
|
1580
1647
|
get addMultiLabel(): string;
|
|
1581
1648
|
/** Getter for Select placeholder label */
|
|
@@ -1596,6 +1663,8 @@ declare class FormFieldComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1596
1663
|
get singleSelectedLabel(): string;
|
|
1597
1664
|
/** Whether the dropdown search feature is enabled for this field */
|
|
1598
1665
|
get isSearchableDropdown(): boolean;
|
|
1666
|
+
/** Whether the custom single-select dropdown overlay is required (for search OR pagination) */
|
|
1667
|
+
get isCustomSingleDropdown(): boolean;
|
|
1599
1668
|
private initGroupField;
|
|
1600
1669
|
/**
|
|
1601
1670
|
* Sets up cross-field validation based on the `onValidate` formula.
|
|
@@ -1671,9 +1740,21 @@ declare class FormFieldComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1671
1740
|
}): any;
|
|
1672
1741
|
extractFunctionName(formula: string): string | null;
|
|
1673
1742
|
setupDependencies(): void;
|
|
1743
|
+
/** Extracts the total item count from an API response using the configured path or fallbacks. */
|
|
1744
|
+
private extractTotalCount;
|
|
1745
|
+
/** Builds HttpParams for dropdown requests supporting both standard and nested_string (dataset) formats. */
|
|
1746
|
+
private buildDropdownQueryParams;
|
|
1747
|
+
/**
|
|
1748
|
+
* Loads options for DROPDOWN / AUTOCOMPLETE fields.
|
|
1749
|
+
* Supports server-side pagination, separate Dataset count endpoints, and nested_string params.
|
|
1750
|
+
*/
|
|
1674
1751
|
loadDropdownOptions(dynamicParams?: {
|
|
1675
1752
|
[key: string]: any;
|
|
1676
|
-
}): void;
|
|
1753
|
+
}, pageIndex?: number, isLoadMore?: boolean): void;
|
|
1754
|
+
/** Triggers loading the next page of dropdown options. */
|
|
1755
|
+
loadMoreDropdownOptions(): void;
|
|
1756
|
+
/** Handles scroll event on the dropdown options panel for infiniteScroll mode. */
|
|
1757
|
+
onDropdownScroll(event: Event): void;
|
|
1677
1758
|
private getValueByPath;
|
|
1678
1759
|
/**
|
|
1679
1760
|
* Replaces `{placeholder}` tokens in a URL with values resolved from the
|
|
@@ -1723,6 +1804,7 @@ declare class FormFieldComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1723
1804
|
toggleSingleDropdown(event: MouseEvent): void;
|
|
1724
1805
|
selectSingleOption(option: any): void;
|
|
1725
1806
|
onDocumentClick(): void;
|
|
1807
|
+
onWindowResize(): void;
|
|
1726
1808
|
onEscapeKey(): void;
|
|
1727
1809
|
get multiSelectedCount(): number;
|
|
1728
1810
|
/** Cache of values currently chosen for this field name by OTHER repeater instances.
|