monkey-front-core 0.0.403 → 0.0.405

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.
@@ -807,7 +807,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
807
807
  }]
808
808
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
809
809
 
810
- /* eslint-disable max-classes-per-file */
811
810
  const moment$3 = moment_;
812
811
  class DateValidator {
813
812
  static do(control) {
@@ -819,7 +818,7 @@ class DateValidator {
819
818
  .default(moment$3.default(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true)
820
819
  .isValid()) {
821
820
  return {
822
- invalidDate: true,
821
+ invalidDate: true
823
822
  };
824
823
  }
825
824
  }
@@ -833,7 +832,7 @@ class DocumentValidator {
833
832
  if (control && control.value) {
834
833
  if (!MonkeyEcxUtils.isCPFCNPJValid(control.value)) {
835
834
  return {
836
- invalidCpfCnpj: true,
835
+ invalidCpfCnpj: true
837
836
  };
838
837
  }
839
838
  }
@@ -847,7 +846,7 @@ class DocumentRutValidator {
847
846
  if (control && control.value) {
848
847
  if (!MonkeyEcxUtils.isValidRUT(control.value)) {
849
848
  return {
850
- invalidRut: true,
849
+ invalidRut: true
851
850
  };
852
851
  }
853
852
  }
@@ -861,7 +860,7 @@ class ZipCodeValidator {
861
860
  if (control && control.value) {
862
861
  if (!MonkeyEcxUtils.isValidZipCode(control.value)) {
863
862
  return {
864
- invalidZipCode: true,
863
+ invalidZipCode: true
865
864
  };
866
865
  }
867
866
  }
@@ -875,7 +874,7 @@ class ComboValidator {
875
874
  if (control && control.value !== '0')
876
875
  return null;
877
876
  return {
878
- invalidCombo: true,
877
+ invalidCombo: true
879
878
  };
880
879
  }
881
880
  }
@@ -886,7 +885,7 @@ class isTrueValidator {
886
885
  if (control && control.value !== false)
887
886
  return null;
888
887
  return {
889
- invalidTrue: true,
888
+ invalidTrue: true
890
889
  };
891
890
  }
892
891
  }
@@ -902,7 +901,7 @@ class PasswordMatchValidation {
902
901
  if (password === passwordConfirm)
903
902
  return null;
904
903
  return {
905
- passwordsNotMatching: true,
904
+ passwordsNotMatching: true
906
905
  };
907
906
  }
908
907
  }
@@ -913,7 +912,7 @@ class UrlValidator {
913
912
  if (control && control.value) {
914
913
  if (!MonkeyEcxUtils.isValidUrl(control.value)) {
915
914
  return {
916
- invalidUrl: true,
915
+ invalidUrl: true
917
916
  };
918
917
  }
919
918
  }
@@ -939,7 +938,7 @@ class CustomDatesStartValidator {
939
938
  return null;
940
939
  if (dateStart > dateEnd) {
941
940
  return {
942
- dateStartMustBeLessThanAnd: true,
941
+ dateStartMustBeLessThanAnd: true
943
942
  };
944
943
  }
945
944
  return null;
@@ -964,7 +963,7 @@ class CustomDatesEndValidator {
964
963
  return null;
965
964
  if (dateEnd < dateStart) {
966
965
  return {
967
- dateEndMustBeGreaterThanStart: true,
966
+ dateEndMustBeGreaterThanStart: true
968
967
  };
969
968
  }
970
969
  return null;
@@ -976,7 +975,7 @@ class UnlockRegisterBuyerValidator {
976
975
  return null;
977
976
  if (control && control.value !== '#MONKEYBUYER') {
978
977
  return {
979
- invalidUnlockRegister: true,
978
+ invalidUnlockRegister: true
980
979
  };
981
980
  }
982
981
  return null;
@@ -988,7 +987,7 @@ class UnlockRegisterSponsorValidator {
988
987
  return null;
989
988
  if (control && control.value !== '#MONKEYSPONSOR') {
990
989
  return {
991
- invalidUnlockRegister: true,
990
+ invalidUnlockRegister: true
992
991
  };
993
992
  }
994
993
  return null;
@@ -1004,7 +1003,7 @@ class DateRangeValidator {
1004
1003
  (!MonkeyEcxUtils.persistNullEmptyUndefined(dates.startDate) ||
1005
1004
  !MonkeyEcxUtils.persistNullEmptyUndefined(dates.endDate))) {
1006
1005
  return {
1007
- invalidDateRange: true,
1006
+ invalidDateRange: true
1008
1007
  };
1009
1008
  }
1010
1009
  return null;
@@ -1235,6 +1234,16 @@ function valueGreaterThanZero(control) {
1235
1234
  }
1236
1235
  return null;
1237
1236
  }
1237
+ function requiredWithTrimValidator(control) {
1238
+ if (!control.parent || !control)
1239
+ return null;
1240
+ if (control && !`${control?.value}`.trim()) {
1241
+ return {
1242
+ required: true
1243
+ };
1244
+ }
1245
+ return null;
1246
+ }
1238
1247
  class Validators {
1239
1248
  static email(control) {
1240
1249
  return emailValidator(control);
@@ -1283,6 +1292,9 @@ class Validators {
1283
1292
  static greaterThanZero(control) {
1284
1293
  return valueGreaterThanZero(control);
1285
1294
  }
1295
+ static required(control) {
1296
+ return requiredWithTrimValidator(control);
1297
+ }
1286
1298
  }
1287
1299
 
1288
1300
  /* eslint-disable object-curly-newline */
@@ -5813,5 +5825,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
5813
5825
  * Generated bundle index. Do not edit.
5814
5826
  */
5815
5827
 
5816
- export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDisplaySupportPhone, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, index as store, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
5828
+ export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDisplaySupportPhone, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, requiredWithTrimValidator, index as store, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
5817
5829
  //# sourceMappingURL=monkey-front-core.mjs.map