commons-shared-web-ui 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { OnInit, OnDestroy, EventEmitter, OnChanges, SimpleChanges, AfterViewInit, QueryList, ElementRef, ChangeDetectorRef, NgZone } from '@angular/core';
3
3
  import * as i2$1 from '@angular/common';
4
4
  import * as i1 from '@angular/material/card';
5
5
  import * as i2 from '@angular/material/snack-bar';
@@ -32,10 +32,10 @@ import * as i27 from '@angular/material/table';
32
32
  import * as i28 from '@angular/material/expansion';
33
33
  import * as i29 from '@angular/cdk/accordion';
34
34
  import * as i3$1 from '@angular/forms';
35
- import { ControlValueAccessor, FormGroup, FormBuilder, AbstractControl, FormControl, FormArray } from '@angular/forms';
35
+ import { ControlValueAccessor, FormGroup, FormBuilder, AbstractControl, FormControl, FormArray, ValidatorFn, ValidationErrors } from '@angular/forms';
36
36
  import { Router, ActivatedRoute } from '@angular/router';
37
- import * as i3$2 from '@angular/common/http';
38
37
  import { HttpClient } from '@angular/common/http';
38
+ import { Observable, Subject } from 'rxjs';
39
39
 
40
40
  declare class MaterialModule {
41
41
  static ɵfac: i0.ɵɵFactoryDeclaration<MaterialModule, never>;
@@ -43,64 +43,6 @@ declare class MaterialModule {
43
43
  static ɵinj: i0.ɵɵInjectorDeclaration<MaterialModule>;
44
44
  }
45
45
 
46
- interface CardType1Config {
47
- label: string;
48
- value: string;
49
- valueColor?: string;
50
- subtext?: string;
51
- subtextClass?: string;
52
- width?: string;
53
- height?: string;
54
- }
55
- interface CardType2Config {
56
- iconName?: string;
57
- iconUrl?: string;
58
- label: string;
59
- value: string;
60
- targetText?: string;
61
- iconBackgroundColor?: string;
62
- iconColor?: string;
63
- width?: string;
64
- height?: string;
65
- }
66
-
67
- declare class CardType1Component {
68
- config: CardType1Config;
69
- theme: 'theme-1' | 'theme-2';
70
- cardClick: EventEmitter<void>;
71
- get valueStyle(): {
72
- color: string;
73
- } | {
74
- color?: undefined;
75
- };
76
- static ɵfac: i0.ɵɵFactoryDeclaration<CardType1Component, never>;
77
- static ɵcmp: i0.ɵɵComponentDeclaration<CardType1Component, "lib-card-type-1", never, { "config": { "alias": "config"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, { "cardClick": "cardClick"; }, never, never, false, never>;
78
- }
79
-
80
- declare class CardType2Component {
81
- config: CardType2Config;
82
- theme: 'theme-1' | 'theme-2';
83
- cardClick: EventEmitter<void>;
84
- get iconBoxStyle(): {
85
- backgroundColor: string;
86
- } | {
87
- backgroundColor?: undefined;
88
- };
89
- get iconStyle(): {
90
- color: string;
91
- } | {
92
- color?: undefined;
93
- };
94
- static ɵfac: i0.ɵɵFactoryDeclaration<CardType2Component, never>;
95
- static ɵcmp: i0.ɵɵComponentDeclaration<CardType2Component, "lib-card-type-2", never, { "config": { "alias": "config"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, { "cardClick": "cardClick"; }, never, never, false, never>;
96
- }
97
-
98
- declare class CardsModule {
99
- static ɵfac: i0.ɵɵFactoryDeclaration<CardsModule, never>;
100
- static ɵmod: i0.ɵɵNgModuleDeclaration<CardsModule, [typeof CardType1Component, typeof CardType2Component], [typeof i2$1.CommonModule, typeof MaterialModule], [typeof CardType1Component, typeof CardType2Component]>;
101
- static ɵinj: i0.ɵɵInjectorDeclaration<CardsModule>;
102
- }
103
-
104
46
  type AlertVariant = 'info' | 'warning' | 'warning-shadow' | 'success' | 'error';
105
47
  type IconInput = boolean | string | {
106
48
  type: 'material' | 'fontawesome' | 'img';
@@ -434,7 +376,7 @@ interface FormOption {
434
376
  code?: string;
435
377
  name?: string;
436
378
  }
437
- interface OptionConfig {
379
+ interface OptionConfig$1 {
438
380
  optionDTO: OptionDTO;
439
381
  class?: string;
440
382
  url?: string;
@@ -447,7 +389,7 @@ interface UIConfig {
447
389
  type: UIType;
448
390
  subType?: UISubType;
449
391
  dependent?: string[];
450
- optionConfigs?: OptionConfig;
392
+ optionConfigs?: OptionConfig$1;
451
393
  minCharacters?: number;
452
394
  maxCharacters?: number;
453
395
  }
@@ -498,7 +440,7 @@ interface FormField {
498
440
  accept?: string;
499
441
  multiple?: boolean;
500
442
  uploadedFiles?: UploadedFile[];
501
- optionConfigs?: OptionConfig;
443
+ optionConfigs?: OptionConfig$1;
502
444
  loadedOptions?: FormOption[];
503
445
  compositeValidationRule?: 'minTotal' | 'percentageTotal' | 'minMax';
504
446
  }
@@ -595,13 +537,292 @@ declare class ConfigurableFormComponent implements OnInit, OnChanges {
595
537
 
596
538
  declare class ConfigurableFormModule {
597
539
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurableFormModule, never>;
598
- static ɵmod: i0.ɵɵNgModuleDeclaration<ConfigurableFormModule, never, [typeof i2$1.CommonModule, typeof i3$1.ReactiveFormsModule, typeof i3$2.HttpClientModule, typeof MaterialModule, typeof ConfigurableFormComponent], [typeof ConfigurableFormComponent]>;
540
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ConfigurableFormModule, never, [typeof i2$1.CommonModule, typeof i3$1.ReactiveFormsModule, typeof MaterialModule, typeof ConfigurableFormComponent], [typeof ConfigurableFormComponent]>;
599
541
  static ɵinj: i0.ɵɵInjectorDeclaration<ConfigurableFormModule>;
600
542
  }
601
543
 
544
+ interface FormSchema {
545
+ entityType: string;
546
+ label: string;
547
+ formType: 'SECTION' | 'STEPPER';
548
+ showTitle?: boolean;
549
+ showDescription?: boolean;
550
+ description?: string;
551
+ metadata?: {
552
+ [key: string]: any;
553
+ };
554
+ sectionConfig?: SectionConfig;
555
+ stepperConfig?: StepperConfig;
556
+ submitConfig?: SubmitConfig;
557
+ }
558
+ interface SubmitConfig {
559
+ apiUrl: string;
560
+ method?: 'POST' | 'PUT' | 'PATCH';
561
+ successMessage?: string;
562
+ errorMessage?: string;
563
+ }
564
+ interface SectionConfig {
565
+ children: FieldConfig[];
566
+ allowMulti?: boolean;
567
+ name?: string;
568
+ label?: string;
569
+ }
570
+ interface StepperConfig {
571
+ children: FieldConfig[];
572
+ showStep?: boolean;
573
+ isHorizontal?: boolean;
574
+ }
575
+ interface FieldConfig {
576
+ name?: string;
577
+ label?: string;
578
+ type: string;
579
+ subType: string;
580
+ visible?: boolean;
581
+ visibilityExpression?: string;
582
+ required?: boolean;
583
+ disabled?: boolean;
584
+ defaultValue?: any;
585
+ hint?: string;
586
+ sectionConfig?: SectionConfig;
587
+ onChange?: string;
588
+ onValidate?: string;
589
+ textConfig?: TextConfig;
590
+ emailConfig?: EmailConfig;
591
+ phoneConfig?: PhoneConfig;
592
+ numberConfig?: NumberConfig;
593
+ dateConfig?: DateConfig;
594
+ optionConfig?: OptionConfig;
595
+ generatedConfig?: GeneratedConfig;
596
+ rangeConfig?: RangeConfig;
597
+ attachmentConfig?: AttachmentConfig;
598
+ locationConfig?: LocationConfig;
599
+ ratingConfig?: RatingConfig;
600
+ children?: FieldConfig[];
601
+ }
602
+ interface TextConfig {
603
+ length?: LengthConstraint;
604
+ pattern?: string;
605
+ patternMessage?: string;
606
+ inputType?: string;
607
+ }
608
+ interface LengthConstraint {
609
+ min?: number;
610
+ max?: number;
611
+ }
612
+ interface NumberConfig {
613
+ min?: number;
614
+ max?: number;
615
+ precision?: number;
616
+ step?: number;
617
+ }
618
+ interface DateConfig {
619
+ allowFuture?: boolean;
620
+ minDate?: string;
621
+ maxDate?: string;
622
+ }
623
+ interface OptionConfig {
624
+ optionClass?: string;
625
+ optionUrl?: string;
626
+ apiUrl?: string;
627
+ apiUrls?: string[];
628
+ dataPath?: string;
629
+ labelPath?: string;
630
+ valuePath?: string;
631
+ dependencies?: {
632
+ [queryParam: string]: string;
633
+ };
634
+ sortBy?: string;
635
+ sortDirection?: 'ASC' | 'DESC';
636
+ optionList?: OptionItem[];
637
+ }
638
+ interface EmailConfig {
639
+ defaultDomain?: string;
640
+ allowedDomains?: string[];
641
+ blockedDomains?: string[];
642
+ }
643
+ interface PhoneConfig {
644
+ prefixCountryCode?: boolean;
645
+ defaultCountryCode?: string;
646
+ supportedCountryCodeLocale?: string[];
647
+ }
648
+ interface OptionItem {
649
+ label: string;
650
+ code: any;
651
+ value?: any;
652
+ }
653
+ interface GeneratedConfig {
654
+ formula: string;
655
+ variables?: string[];
656
+ }
657
+ interface RangeConfig {
658
+ min?: number;
659
+ max?: number;
660
+ step?: number;
661
+ minDate?: string;
662
+ maxDate?: string;
663
+ }
664
+ interface AttachmentConfig {
665
+ maxFiles?: number;
666
+ maxSizeMB?: number;
667
+ allowedExtensions?: string[];
668
+ }
669
+ interface LocationConfig {
670
+ enableCurrentLocation?: boolean;
671
+ enableMapPicker?: boolean;
672
+ }
673
+ interface RatingConfig {
674
+ maxRating?: number;
675
+ allowHalf?: boolean;
676
+ }
677
+ interface ValidationResult {
678
+ isValid: boolean;
679
+ errorMessage?: string;
680
+ fieldErrors?: {
681
+ [key: string]: string;
682
+ };
683
+ }
684
+
685
+ declare class SmartFormController {
686
+ private formData;
687
+ private fieldSubjects;
688
+ initialize(initialData: {
689
+ [key: string]: any;
690
+ }): void;
691
+ updateField(name: string, value: any): void;
692
+ getFieldValue(name: string): any;
693
+ getFieldObservable(name: string): Observable<any>;
694
+ getAllData(): {
695
+ [key: string]: any;
696
+ };
697
+ reset(): void;
698
+ destroy(): void;
699
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormController, never>;
700
+ static ɵprov: i0.ɵɵInjectableDeclaration<SmartFormController>;
701
+ }
702
+
703
+ declare class ExpressionService {
704
+ private loadedFunctions;
705
+ evaluate(expression: string, context: {
706
+ [key: string]: any;
707
+ }, variables?: string[]): any;
708
+ evaluateCondition(expression: string, context: {
709
+ [key: string]: any;
710
+ }): boolean;
711
+ evaluateFormula(formula: string, functionName: string, context: {
712
+ [key: string]: any;
713
+ }, variables?: string[]): any;
714
+ extractVariables(expression: string): string[];
715
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExpressionService, never>;
716
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExpressionService>;
717
+ }
718
+
719
+ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
720
+ private fb;
721
+ controller: SmartFormController;
722
+ private expressionService;
723
+ private http;
724
+ formJson: string;
725
+ initialValues?: {
726
+ [key: string]: any;
727
+ };
728
+ enableDraftAutoSave: boolean;
729
+ submit: EventEmitter<{
730
+ [key: string]: any;
731
+ }>;
732
+ draftSave: EventEmitter<string>;
733
+ formSchema: FormSchema;
734
+ formGroup: FormGroup;
735
+ fieldList: FieldConfig[];
736
+ isStepper: boolean;
737
+ currentStep: number;
738
+ isLoading: boolean;
739
+ constructor(fb: FormBuilder, controller: SmartFormController, expressionService: ExpressionService, http: HttpClient);
740
+ ngOnInit(): void;
741
+ ngOnChanges(changes: SimpleChanges): void;
742
+ ngOnDestroy(): void;
743
+ parseFormJson(): void;
744
+ initializeForm(): void;
745
+ collectFields(fields: FieldConfig[]): void;
746
+ handleSubmit(): void;
747
+ submitToApi(formData: any): void;
748
+ nextStep(): void;
749
+ previousStep(): void;
750
+ get canGoNext(): boolean;
751
+ get canGoPrevious(): boolean;
752
+ get currentStepConfig(): FieldConfig | undefined;
753
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormComponent, never>;
754
+ static ɵcmp: i0.ɵɵComponentDeclaration<SmartFormComponent, "lib-smart-form", never, { "formJson": { "alias": "formJson"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "enableDraftAutoSave": { "alias": "enableDraftAutoSave"; "required": false; }; }, { "submit": "submit"; "draftSave": "draftSave"; }, never, never, false, never>;
755
+ }
756
+
757
+ declare class FormSectionComponent {
758
+ config: SectionConfig;
759
+ controller: SmartFormController;
760
+ sections: any[];
761
+ addSection(): void;
762
+ removeSection(index: number): void;
763
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormSectionComponent, never>;
764
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormSectionComponent, "lib-form-section", never, { "config": { "alias": "config"; "required": false; }; "controller": { "alias": "controller"; "required": false; }; }, {}, never, never, false, never>;
765
+ }
766
+
767
+ declare class FormFieldComponent implements OnInit, OnDestroy {
768
+ private expressionService;
769
+ private http;
770
+ config: FieldConfig;
771
+ controller: SmartFormController;
772
+ sectionIndex?: number;
773
+ value: any;
774
+ isVisible: boolean;
775
+ errorMessage: string;
776
+ private destroy$;
777
+ constructor(expressionService: ExpressionService, http: HttpClient);
778
+ ngOnInit(): void;
779
+ ngOnDestroy(): void;
780
+ setupField(): void;
781
+ setupVisibility(): void;
782
+ setupGeneratedField(): void;
783
+ evaluateFormula(context: {
784
+ [key: string]: any;
785
+ }): any;
786
+ extractFunctionName(formula: string): string | null;
787
+ setupDependencies(): void;
788
+ loadDropdownOptions(queryParams?: {
789
+ [key: string]: any;
790
+ }): void;
791
+ private getValueByPath;
792
+ onValueChange(event: any): void;
793
+ onCheckboxListChange(code: string, checked: boolean): void;
794
+ isChecked(code: string): boolean;
795
+ validate(value: any): void;
796
+ getFieldName(): string;
797
+ get isTextField(): boolean;
798
+ get isNumberField(): boolean;
799
+ get isDateField(): boolean;
800
+ get isDropdown(): boolean;
801
+ get isRadio(): boolean;
802
+ get isCheckbox(): boolean;
803
+ get isChip(): boolean;
804
+ get isSwitch(): boolean;
805
+ get isRating(): boolean;
806
+ onRatingChange(star: number, event?: MouseEvent): void;
807
+ getStarArray(): number[];
808
+ isStarHalf(star: number): boolean;
809
+ isStarFilled(star: number): boolean;
810
+ get isGenerated(): boolean;
811
+ get isRow(): boolean;
812
+ get isGroup(): boolean;
813
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
814
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "lib-form-field", never, { "config": { "alias": "config"; "required": false; }; "controller": { "alias": "controller"; "required": false; }; "sectionIndex": { "alias": "sectionIndex"; "required": false; }; }, {}, never, never, false, never>;
815
+ }
816
+
817
+ declare class SmartFormModule {
818
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormModule, never>;
819
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SmartFormModule, [typeof SmartFormComponent, typeof FormSectionComponent, typeof FormFieldComponent], [typeof i2$1.CommonModule, typeof i3$1.ReactiveFormsModule, typeof i3$1.FormsModule], [typeof SmartFormComponent]>;
820
+ static ɵinj: i0.ɵɵInjectorDeclaration<SmartFormModule>;
821
+ }
822
+
602
823
  declare class SharedUiModule {
603
824
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedUiModule, never>;
604
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof CardsModule, typeof AlertModule, typeof ButtonModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof SummaryCardModule, typeof ConfigurableFormModule], [typeof MaterialModule, typeof CardsModule, typeof AlertModule, typeof ButtonModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof SummaryCardModule, typeof ConfigurableFormModule]>;
825
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof SmartFormModule], [typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof SmartFormModule]>;
605
826
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedUiModule>;
606
827
  }
607
828
 
@@ -737,5 +958,222 @@ declare const PAGINATION_THEME_DARK = "theme-2";
737
958
  declare const NAV_VARIANT_DEFAULT: 'filled' | 'underline' | 'pills';
738
959
  declare const NAV_ORIENTATION_DEFAULT: 'horizontal' | 'vertical';
739
960
 
740
- export { AlertComponent, AlertModule, ButtonComponent, ButtonModule, CardType1Component, CardType2Component, CardsModule, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, FilterSidebarComponent, FilterSidebarModule, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, SharedUiModule, SummaryCardComponent, SummaryCardModule, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem };
741
- export type { AlertVariant, ButtonVariant, CardType1Config, CardType2Config, ConfirmationModalConfig, FieldType, FilterChangeEvent, FilterConfig, FilterOutput, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOption, FilterSidebarOutput, FilterSidebarSection, FilterSidebarTab, FormConfig, FormField, FormOption, FormSection, IconInput, JsonFieldConfig, JsonFormConfig, KeyType, NavItem, NavStyleConfig, OptionConfig, OptionDTO, PaginationLabels, SummaryCardConfig, SummaryCardMeta, UIConfig, UISubType, UIType, UploadedFile, ValidationRules };
961
+ interface TableOption {
962
+ label: string;
963
+ value: any;
964
+ }
965
+ interface TableColumn {
966
+ key: string;
967
+ label: string;
968
+ type: 'text' | 'number' | 'date' | 'custom' | 'html' | 'badge';
969
+ sortable?: boolean;
970
+ editable?: boolean;
971
+ dataType?: 'text' | 'number' | 'date' | 'email' | 'select';
972
+ options?: TableOption[];
973
+ badgeConfig?: {
974
+ [key: string]: 'success' | 'warning' | 'danger' | 'info' | 'neutral';
975
+ };
976
+ width?: string;
977
+ cellClass?: string;
978
+ headerClass?: string;
979
+ sticky?: boolean;
980
+ labelPath?: string;
981
+ dateFormat?: string;
982
+ }
983
+ interface TableFilter {
984
+ key: string;
985
+ label: string;
986
+ type: 'select' | 'text' | 'date';
987
+ options?: TableOption[];
988
+ apiUrl?: string;
989
+ labelKey?: string;
990
+ valueKey?: string;
991
+ labelPath?: string;
992
+ valuePath?: string;
993
+ requestKey?: string;
994
+ dataPath?: string;
995
+ }
996
+ interface TableAction {
997
+ label: string;
998
+ type: 'api' | 'callback' | 'route' | 'edit';
999
+ icon?: string;
1000
+ btnVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
1001
+ apiUrl?: string;
1002
+ apiMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
1003
+ route?: string;
1004
+ confirmationNeeded?: boolean;
1005
+ confirmationMessage?: string;
1006
+ callback?: (row: any) => void;
1007
+ }
1008
+ interface PaginationConfig {
1009
+ enabled: boolean;
1010
+ pageSize: number;
1011
+ pageSizeOptions: number[];
1012
+ totalCountConfig?: {
1013
+ source: 'same' | 'separate';
1014
+ apiUrl?: string;
1015
+ responsePath?: string;
1016
+ };
1017
+ }
1018
+ interface TableTheme {
1019
+ primaryColor?: string;
1020
+ headerBg?: string;
1021
+ headerColor?: string;
1022
+ rowHoverBg?: string;
1023
+ borderColor?: string;
1024
+ }
1025
+ interface NestedStringConfig {
1026
+ paramName: string;
1027
+ baseValue?: string;
1028
+ separator: string;
1029
+ assignment: string;
1030
+ }
1031
+ interface QueryParamsConfig {
1032
+ pageKey?: string;
1033
+ sizeKey?: string;
1034
+ pageIndexOffset?: number;
1035
+ filterHandling?: 'standard' | 'nested_string';
1036
+ nestedStringConfig?: NestedStringConfig;
1037
+ }
1038
+ interface TableConfig {
1039
+ columns: TableColumn[];
1040
+ apiUrl: string;
1041
+ dataResponsePath?: string;
1042
+ filters?: TableFilter[];
1043
+ filterData?: {
1044
+ [key: string]: any[];
1045
+ };
1046
+ pagination?: PaginationConfig;
1047
+ actions?: TableAction[];
1048
+ topBarButtons?: TableAction[];
1049
+ sortBy?: string;
1050
+ orderBy?: 'ASC' | 'DESC';
1051
+ theme?: TableTheme;
1052
+ requestParams?: Function;
1053
+ selectable?: boolean;
1054
+ queryParamsConfig?: QueryParamsConfig;
1055
+ labels?: TableLabels;
1056
+ searchConfig?: SearchConfig;
1057
+ maxHeight?: string;
1058
+ stickyHeader?: boolean;
1059
+ stickyColumnCount?: number;
1060
+ clickableRows?: boolean;
1061
+ }
1062
+ interface SearchConfig {
1063
+ enabled: boolean;
1064
+ searchKey?: string;
1065
+ debounceTime?: number;
1066
+ handling?: 'standard' | 'nested_string';
1067
+ }
1068
+ interface TableLabels {
1069
+ searchPlaceholder?: string;
1070
+ actionColumnHeader?: string;
1071
+ noDataMessage?: string;
1072
+ itemsPerPageLabel?: string;
1073
+ defaultConfirmationMessage?: string;
1074
+ }
1075
+
1076
+ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
1077
+ private http;
1078
+ private router;
1079
+ private cdr;
1080
+ private ngZone;
1081
+ config: TableConfig;
1082
+ action: EventEmitter<{
1083
+ action: TableAction;
1084
+ row: any;
1085
+ }>;
1086
+ topAction: EventEmitter<TableAction>;
1087
+ filterChange: EventEmitter<{
1088
+ key: string;
1089
+ value: any;
1090
+ }>;
1091
+ rowSelect: EventEmitter<any[]>;
1092
+ rowClick: EventEmitter<any>;
1093
+ data: any[];
1094
+ totalItems: number;
1095
+ currentPage: number;
1096
+ loading: boolean;
1097
+ activeSort: {
1098
+ key: string;
1099
+ direction: 'ASC' | 'DESC';
1100
+ };
1101
+ activeFilters: {
1102
+ [key: string]: any;
1103
+ };
1104
+ searchTerm: string;
1105
+ selectedRows: any[];
1106
+ stickyColumnStyles: {
1107
+ [key: string]: any;
1108
+ };
1109
+ hasStickyColumns: boolean;
1110
+ searchSubject: Subject<string>;
1111
+ stickyHeaders: QueryList<ElementRef>;
1112
+ private resizeObserver;
1113
+ private locale;
1114
+ constructor(http: HttpClient, router: Router, cdr: ChangeDetectorRef, ngZone: NgZone);
1115
+ ngOnInit(): void;
1116
+ ngOnChanges(changes: SimpleChanges): void;
1117
+ ngAfterViewInit(): void;
1118
+ ngOnDestroy(): void;
1119
+ private setupResizeObserver;
1120
+ private observeHeaders;
1121
+ loadData(): void;
1122
+ onPageChange(page: number): void;
1123
+ onPageSizeChange(size: number): void;
1124
+ onSort(col: TableColumn): void;
1125
+ onSearch(event: Event): void;
1126
+ onFilterChange(key: string, event: Event): void;
1127
+ onAction(action: TableAction, row: any): void;
1128
+ onTopAction(action: TableAction): void;
1129
+ onSelectAll(event: Event): void;
1130
+ onRowSelect(row: any): void;
1131
+ updateSelectedRows(): void;
1132
+ getCellValue(row: any, col: TableColumn): any;
1133
+ getBadgeClass(row: any, col: TableColumn): string;
1134
+ getSortIcon(key: string): string;
1135
+ private replaceParams;
1136
+ private loadFilterOptions;
1137
+ private getValueByPath;
1138
+ private calculateStickyPositions;
1139
+ private toTitleCase;
1140
+ get columnCount(): number;
1141
+ onRowClick(row: any): void;
1142
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableComponent, never>;
1143
+ static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableComponent, "lib-smart-table", never, { "config": { "alias": "config"; "required": false; }; }, { "action": "action"; "topAction": "topAction"; "filterChange": "filterChange"; "rowSelect": "rowSelect"; "rowClick": "rowClick"; }, never, never, false, never>;
1144
+ }
1145
+
1146
+ declare class SmartTableModule {
1147
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableModule, never>;
1148
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SmartTableModule, [typeof SmartTableComponent], [typeof i2$1.CommonModule, typeof i3$1.FormsModule, typeof PaginationModule, typeof ButtonModule], [typeof SmartTableComponent]>;
1149
+ static ɵinj: i0.ɵɵInjectorDeclaration<SmartTableModule>;
1150
+ }
1151
+
1152
+ declare class ValidationUtils {
1153
+ static email(): ValidatorFn;
1154
+ static phone(): ValidatorFn;
1155
+ static url(): ValidatorFn;
1156
+ static minLength(min: number): ValidatorFn;
1157
+ static maxLength(max: number): ValidatorFn;
1158
+ static pattern(pattern: string, message?: string): ValidatorFn;
1159
+ static numberRange(min?: number, max?: number): ValidatorFn;
1160
+ static dateRange(minDate?: string, maxDate?: string): ValidatorFn;
1161
+ static getErrorMessage(errors: ValidationErrors | null): string;
1162
+ }
1163
+
1164
+ declare const SAMPLE_FORMS: {
1165
+ contactForm: string;
1166
+ registrationForm: string;
1167
+ surveyForm: string;
1168
+ jobApplicationForm: string;
1169
+ };
1170
+
1171
+ declare const smartForm_examples_d_SAMPLE_FORMS: typeof SAMPLE_FORMS;
1172
+ declare namespace smartForm_examples_d {
1173
+ export {
1174
+ smartForm_examples_d_SAMPLE_FORMS as SAMPLE_FORMS,
1175
+ };
1176
+ }
1177
+
1178
+ export { AlertComponent, AlertModule, ButtonComponent, ButtonModule, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, ExpressionService, FilterSidebarComponent, FilterSidebarModule, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, SharedUiModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SummaryCardComponent, SummaryCardModule, ValidationUtils, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem };
1179
+ export type { AlertVariant, AttachmentConfig, ButtonVariant, ConfirmationModalConfig, DateConfig, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterOutput, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOption, FilterSidebarOutput, FilterSidebarSection, FilterSidebarTab, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, IconInput, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig$1 as OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RangeConfig, RatingConfig, SearchConfig, SectionConfig, StepperConfig, SubmitConfig, SummaryCardConfig, SummaryCardMeta, TableAction, TableColumn, TableConfig, TableFilter, TableLabels, TableOption, TableTheme, TextConfig, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commons-shared-web-ui",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",