@corp-products/ui-components 4.1.3 → 4.1.5
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
|
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { TemplateRef, OnInit, EventEmitter, PipeTransform, OnDestroy, SimpleChanges, Type, EnvironmentInjector, ApplicationRef, ViewContainerRef, OnChanges, ElementRef, Renderer2 } from '@angular/core';
|
|
4
4
|
import { Params, Router, ActivatedRoute } from '@angular/router';
|
|
5
5
|
import { DynamicDialogRef, DialogService, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
6
|
-
import { FormGroup, FormControl,
|
|
6
|
+
import { FormGroup, FormControl, ValidatorFn, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
7
7
|
import { AutoCompleteSelectEvent, AutoCompleteCompleteEvent } from 'primeng/autocomplete';
|
|
8
8
|
import * as rxjs from 'rxjs';
|
|
9
9
|
import { Subject, Observable } from 'rxjs';
|
|
@@ -134,6 +134,12 @@ declare class FormUtils {
|
|
|
134
134
|
static getFormControl(controlName: string, form: FormGroup): FormControl;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Validator function to check if the control value is a valid email address.
|
|
139
|
+
* @returns A validator function that checks if the value is a valid email address.
|
|
140
|
+
*/
|
|
141
|
+
declare function emailStcValidator(allowedDomains: string[]): ValidatorFn;
|
|
142
|
+
|
|
137
143
|
declare enum BasicErrorKeysEnum {
|
|
138
144
|
required = "REQUIRED",
|
|
139
145
|
email = "EMAIL",
|
|
@@ -148,7 +154,8 @@ declare enum BasicErrorKeysEnum {
|
|
|
148
154
|
positiveNumber = "POSITIVE_NUMBER",
|
|
149
155
|
fileSelected = "FILE_SELECTED",
|
|
150
156
|
default = "DEFAULT",
|
|
151
|
-
numbersOnly = "NUMBERS_ONLY"
|
|
157
|
+
numbersOnly = "NUMBERS_ONLY",
|
|
158
|
+
invalidSaudiPhoneNumber = "INVALID_SAUDI_PHONE_NUMBER"
|
|
152
159
|
}
|
|
153
160
|
declare enum ErrorsWithValuesKeysEnum {
|
|
154
161
|
minlength = "MIN_LENGTH",
|
|
@@ -160,13 +167,6 @@ declare enum ErrorsWithValuesKeysEnum {
|
|
|
160
167
|
allowedTypes = "ALLOWED_TYPES"
|
|
161
168
|
}
|
|
162
169
|
|
|
163
|
-
declare class ValidationErrorsPipe implements PipeTransform {
|
|
164
|
-
private formValidationService;
|
|
165
|
-
transform(errors: ValidationErrors | null, allowedKeys?: string[]): string[];
|
|
166
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorsPipe, never>;
|
|
167
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<ValidationErrorsPipe, "validationErrors", true>;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
170
|
declare class FormValidationService {
|
|
171
171
|
private translate;
|
|
172
172
|
private getTranslation;
|
|
@@ -181,10 +181,17 @@ declare class FormValidationService {
|
|
|
181
181
|
declare function numbersOnlyValidator(control: AbstractControl): ValidationErrors | null;
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
|
-
* Validator
|
|
185
|
-
*
|
|
184
|
+
* Validator to check if the control value is a valid Saudi phone number.
|
|
185
|
+
* Valid formats: 05XXXXXXXX (10 digits) or 009665XXXXXXXX (14 digits)
|
|
186
186
|
*/
|
|
187
|
-
declare function
|
|
187
|
+
declare function saudiPhoneValidator(): ValidatorFn;
|
|
188
|
+
|
|
189
|
+
declare class ValidationErrorsPipe implements PipeTransform {
|
|
190
|
+
private formValidationService;
|
|
191
|
+
transform(errors: ValidationErrors | null, allowedKeys?: string[]): string[];
|
|
192
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorsPipe, never>;
|
|
193
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ValidationErrorsPipe, "validationErrors", true>;
|
|
194
|
+
}
|
|
188
195
|
|
|
189
196
|
declare abstract class BaseInputComponent implements OnInit, OnDestroy {
|
|
190
197
|
control: FormControl;
|
|
@@ -859,5 +866,5 @@ interface Position {
|
|
|
859
866
|
name: string;
|
|
860
867
|
}
|
|
861
868
|
|
|
862
|
-
export { AlertDialogComponent, AlertDialogService, AppAccordionComponent, AppBreadcrumbComponent, AppButtonComponent, AppDropdownMenuComponent, AppTabsComponent, AutoCompleteComponent, BasicErrorKeysEnum, BottomSheetComponent, ConfirmationDialogComponent, ConfirmationDialogService, DatePickerComponent, DualCalendarComponent, DynamicFormComponent, DynamicSidebarService, DynamicSidebarV2Service, ErrorsWithValuesKeysEnum, FormFieldTypeEnum, FormUtils, FormValidationService, IcoMoonIconComponent, InputComponent, MONTHS_GREGORIAN, MONTHS_HIJRI, ReadMoreComponent, SelectButtonComponent, SelectComponent, SideBarComponent, SidebarConfigDefaults, SwitchComponent, UploadStatus, UserAutocompleteCardComponent, UserInfoComponent, ValidationErrorsPipe, WEEKDAYS, dateRangeValidator, emailStcValidator, getGregorianMonthName, getHijriMonthName, getWeekdayName, notFutureDateValidator, numbersOnlyValidator };
|
|
869
|
+
export { AlertDialogComponent, AlertDialogService, AppAccordionComponent, AppBreadcrumbComponent, AppButtonComponent, AppDropdownMenuComponent, AppTabsComponent, AutoCompleteComponent, BasicErrorKeysEnum, BottomSheetComponent, ConfirmationDialogComponent, ConfirmationDialogService, DatePickerComponent, DualCalendarComponent, DynamicFormComponent, DynamicSidebarService, DynamicSidebarV2Service, ErrorsWithValuesKeysEnum, FormFieldTypeEnum, FormUtils, FormValidationService, IcoMoonIconComponent, InputComponent, MONTHS_GREGORIAN, MONTHS_HIJRI, ReadMoreComponent, SelectButtonComponent, SelectComponent, SideBarComponent, SidebarConfigDefaults, SwitchComponent, UploadStatus, UserAutocompleteCardComponent, UserInfoComponent, ValidationErrorsPipe, WEEKDAYS, dateRangeValidator, emailStcValidator, getGregorianMonthName, getHijriMonthName, getWeekdayName, notFutureDateValidator, numbersOnlyValidator, saudiPhoneValidator };
|
|
863
870
|
export type { AlertDialogData, AppButtonIconPos, AppButtonSeverity, AppButtonSize, AppButtonVariant, AppTabs, Attachment, AttachmentFile, AttachmentStatusDisplay, BreadCrumbExtraData, BreadCrumbPosition, BreadcrumbItem, ConfirmationDialogData, Contact, DateRangeInterface, Department, DownloadRequest, Dropdown, DropdownMenuItem, DropdownTextColor, DynamicFormData, DynamicSidebarV2Actions, DynamicSidebarV2Config, FileItem, FileTypeConfig, InputContentType, InputType, InputsMap, InputsMapData, LabelValue, OptionTemplateConfig, PdfPreviewState, Position, RoutedTab, SidebarActionConfig, SidebarActionV2Config, SidebarConfig, SidebarV2Actions, TemplateTab, UploadProgress, UserProfileData };
|