@corp-products/ui-components 4.1.4 → 4.1.6
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",
|
|
@@ -157,14 +164,8 @@ declare enum ErrorsWithValuesKeysEnum {
|
|
|
157
164
|
max = "MAX",
|
|
158
165
|
maxSize = "MAX_SIZE",
|
|
159
166
|
maxFiles = "MAX_FILES",
|
|
160
|
-
allowedTypes = "ALLOWED_TYPES"
|
|
161
|
-
|
|
162
|
-
|
|
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>;
|
|
167
|
+
allowedTypes = "ALLOWED_TYPES",
|
|
168
|
+
maxRepeatedChars = "MAX_REPEATED_CHARS"
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
declare class FormValidationService {
|
|
@@ -180,11 +181,20 @@ declare class FormValidationService {
|
|
|
180
181
|
|
|
181
182
|
declare function numbersOnlyValidator(control: AbstractControl): ValidationErrors | null;
|
|
182
183
|
|
|
184
|
+
declare function maxRepeatedCharsValidator(maxRepeats?: number): ValidatorFn;
|
|
185
|
+
|
|
183
186
|
/**
|
|
184
|
-
* Validator
|
|
185
|
-
*
|
|
187
|
+
* Validator to check if the control value is a valid Saudi phone number.
|
|
188
|
+
* Valid formats: 05XXXXXXXX (10 digits) or 009665XXXXXXXX (14 digits)
|
|
186
189
|
*/
|
|
187
|
-
declare function
|
|
190
|
+
declare function saudiPhoneValidator(): ValidatorFn;
|
|
191
|
+
|
|
192
|
+
declare class ValidationErrorsPipe implements PipeTransform {
|
|
193
|
+
private formValidationService;
|
|
194
|
+
transform(errors: ValidationErrors | null, allowedKeys?: string[]): string[];
|
|
195
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorsPipe, never>;
|
|
196
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ValidationErrorsPipe, "validationErrors", true>;
|
|
197
|
+
}
|
|
188
198
|
|
|
189
199
|
declare abstract class BaseInputComponent implements OnInit, OnDestroy {
|
|
190
200
|
control: FormControl;
|
|
@@ -859,5 +869,5 @@ interface Position {
|
|
|
859
869
|
name: string;
|
|
860
870
|
}
|
|
861
871
|
|
|
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 };
|
|
872
|
+
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, maxRepeatedCharsValidator, notFutureDateValidator, numbersOnlyValidator, saudiPhoneValidator };
|
|
863
873
|
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 };
|