@solcre-org/core-ui 2.12.46 → 2.12.47

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.
@@ -1069,6 +1069,10 @@ class DocumentFieldComponent extends BaseFieldComponent {
1069
1069
  const payloadMode = config.payloadMode || DocumentPayloadMode.OBJECT;
1070
1070
  const documentType = this.documentTypeControl.value || '';
1071
1071
  const documentNumber = this.documentNumberControl.value || '';
1072
+ const standardValue = {
1073
+ documentType,
1074
+ documentNumber
1075
+ };
1072
1076
  if (payloadMode === DocumentPayloadMode.SEPARATE_KEYS) {
1073
1077
  const documentTypeKey = config.documentTypeKey || 'document_type';
1074
1078
  const documentNumberKey = config.documentNumberKey || 'document';
@@ -1078,15 +1082,11 @@ class DocumentFieldComponent extends BaseFieldComponent {
1078
1082
  [documentNumberKey]: documentNumber || null
1079
1083
  };
1080
1084
  this.valueChange.emit(separatedValue);
1081
- super.onValueChange(separatedValue);
1085
+ super.onValueChange(standardValue);
1082
1086
  }
1083
1087
  else {
1084
- const newValue = {
1085
- documentType,
1086
- documentNumber
1087
- };
1088
- this.valueChange.emit(newValue);
1089
- super.onValueChange(newValue);
1088
+ this.valueChange.emit(standardValue);
1089
+ super.onValueChange(standardValue);
1090
1090
  }
1091
1091
  }
1092
1092
  onDocumentTypeChange(event) {
@@ -14669,11 +14669,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
14669
14669
  // Este archivo es generado automáticamente por scripts/update-version.js
14670
14670
  // No edites manualmente este archivo
14671
14671
  const VERSION = {
14672
- full: '2.12.46',
14672
+ full: '2.12.47',
14673
14673
  major: 2,
14674
14674
  minor: 12,
14675
- patch: 46,
14676
- timestamp: '2025-09-23T17:33:26.250Z',
14675
+ patch: 47,
14676
+ timestamp: '2025-09-23T17:54:10.477Z',
14677
14677
  buildDate: '23/9/2025'
14678
14678
  };
14679
14679
 
@@ -17553,6 +17553,89 @@ function equalToValidator(targetKey) {
17553
17553
  };
17554
17554
  }
17555
17555
 
17556
+ class DocumentFieldValidators {
17557
+ static required = (control) => {
17558
+ const value = control.value;
17559
+ if (!value) {
17560
+ return { required: true };
17561
+ }
17562
+ if (typeof value === 'object' && 'documentType' in value && 'documentNumber' in value) {
17563
+ const docValue = value;
17564
+ if (!docValue.documentType || !docValue.documentNumber) {
17565
+ return { required: true };
17566
+ }
17567
+ return null;
17568
+ }
17569
+ if (typeof value === 'object' && value._isSeparatedDocumentField) {
17570
+ const keys = Object.keys(value).filter(k => k !== '_isSeparatedDocumentField');
17571
+ const hasEmptyValues = keys.some(key => !value[key]);
17572
+ if (hasEmptyValues) {
17573
+ return { required: true };
17574
+ }
17575
+ return null;
17576
+ }
17577
+ if (typeof value === 'string' && !value.trim()) {
17578
+ return { required: true };
17579
+ }
17580
+ return null;
17581
+ };
17582
+ static documentTypeRequired = (control) => {
17583
+ const value = control.value;
17584
+ if (!value) {
17585
+ return { documentTypeRequired: true };
17586
+ }
17587
+ if (typeof value === 'object' && 'documentType' in value) {
17588
+ const docValue = value;
17589
+ if (!docValue.documentType) {
17590
+ return { documentTypeRequired: true };
17591
+ }
17592
+ }
17593
+ return null;
17594
+ };
17595
+ static documentNumberRequired = (control) => {
17596
+ const value = control.value;
17597
+ if (!value) {
17598
+ return { documentNumberRequired: true };
17599
+ }
17600
+ if (typeof value === 'object' && 'documentNumber' in value) {
17601
+ const docValue = value;
17602
+ if (!docValue.documentNumber) {
17603
+ return { documentNumberRequired: true };
17604
+ }
17605
+ }
17606
+ return null;
17607
+ };
17608
+ static documentNumberFormat = (control) => {
17609
+ const value = control.value;
17610
+ if (!value || typeof value !== 'object' || !('documentType' in value) || !('documentNumber' in value)) {
17611
+ return null;
17612
+ }
17613
+ const docValue = value;
17614
+ const { documentType, documentNumber } = docValue;
17615
+ if (!documentType || !documentNumber) {
17616
+ return null;
17617
+ }
17618
+ switch (documentType.toUpperCase()) {
17619
+ case 'CI':
17620
+ if (!/^\d{7,8}$/.test(documentNumber)) {
17621
+ return { documentNumberFormat: { message: 'CI debe tener 7-8 dígitos numéricos' } };
17622
+ }
17623
+ break;
17624
+ case 'DNI':
17625
+ if (!/^\d{8}$/.test(documentNumber)) {
17626
+ return { documentNumberFormat: { message: 'DNI debe tener 8 dígitos numéricos' } };
17627
+ }
17628
+ break;
17629
+ case 'PASSPORT':
17630
+ if (!/^[A-Z0-9]{6,12}$/i.test(documentNumber)) {
17631
+ return { documentNumberFormat: { message: 'Pasaporte debe tener 6-12 caracteres alfanuméricos' } };
17632
+ }
17633
+ break;
17634
+ }
17635
+ return null;
17636
+ };
17637
+ }
17638
+
17556
17639
  function HttpLoaderFactory(http) {
17557
17640
  return new TranslateHttpLoader(http, './assets/i18n/', '/main.json');
17558
17641
  }
@@ -17652,5 +17735,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
17652
17735
  * Generated bundle index. Do not edit.
17653
17736
  */
17654
17737
 
17655
- export { ALL_COUNTRY_CODES, ActiveFiltersComponent, AgeValidationHelper, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, COMMON_COUNTRIES, CacheBustingInterceptor, CardComponent, CarouselComponent, ChatMessagePosition, ChatMessageType, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreManualRefreshComponent, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, CountryCode, DEFAULT_COUNTRIES, DataListComponent, DataListItemComponent, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DocumentFieldComponent, DocumentPayloadMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, DynamicFieldsHelper, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FilePreviewActionType, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, GalleryAnimationType, GalleryLayoutType, GalleryModalComponent, GalleryModalGlobalService, GenericButtonComponent, GenericChatComponent, GenericChatService, GenericDocumentationComponent, GenericGalleryComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericSkeletonComponent, GenericStepsComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LATIN_AMERICA_COUNTRIES, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ManualRefreshService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, PhoneFieldComponent, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SOUTH_AMERICA_COUNTRIES, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SkeletonAnimation, SkeletonService, SkeletonSize, SkeletonType, SmartFieldComponent, SortDirection, SortMode, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TableSortService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UruguayanDocumentValidationHelper, UsersModel, VERSION, ageValidator, calculateAge, equalToValidator, generateRandomUruguayanDocument, getCountryCodeStrings, getLatestBirthDateForAge, getRandomCi, getUruguayanDocumentValidationDigit, getValidationDigit, isSameDate, isValidCountryCode, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader, random, transform, transformUruguayanDocument, uruguayanDocumentValidator, validate, validateAge, validateCi, validateUruguayanDocument, validationDigit };
17738
+ export { ALL_COUNTRY_CODES, ActiveFiltersComponent, AgeValidationHelper, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, COMMON_COUNTRIES, CacheBustingInterceptor, CardComponent, CarouselComponent, ChatMessagePosition, ChatMessageType, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreManualRefreshComponent, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, CountryCode, DEFAULT_COUNTRIES, DataListComponent, DataListItemComponent, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DocumentFieldComponent, DocumentFieldValidators, DocumentPayloadMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, DynamicFieldsHelper, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FilePreviewActionType, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, GalleryAnimationType, GalleryLayoutType, GalleryModalComponent, GalleryModalGlobalService, GenericButtonComponent, GenericChatComponent, GenericChatService, GenericDocumentationComponent, GenericGalleryComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericSkeletonComponent, GenericStepsComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LATIN_AMERICA_COUNTRIES, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ManualRefreshService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, PhoneFieldComponent, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SOUTH_AMERICA_COUNTRIES, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SkeletonAnimation, SkeletonService, SkeletonSize, SkeletonType, SmartFieldComponent, SortDirection, SortMode, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TableSortService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UruguayanDocumentValidationHelper, UsersModel, VERSION, ageValidator, calculateAge, equalToValidator, generateRandomUruguayanDocument, getCountryCodeStrings, getLatestBirthDateForAge, getRandomCi, getUruguayanDocumentValidationDigit, getValidationDigit, isSameDate, isValidCountryCode, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader, random, transform, transformUruguayanDocument, uruguayanDocumentValidator, validate, validateAge, validateCi, validateUruguayanDocument, validationDigit };
17656
17739
  //# sourceMappingURL=solcre-org-core-ui.mjs.map