monkey-front-core 0.0.450 → 0.0.452
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/esm2020/lib/core/utils/utils.mjs +15 -1
- package/esm2020/lib/core/utils/validators.mjs +23 -1
- package/fesm2015/monkey-front-core.mjs +34 -1
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +37 -1
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/utils/utils.d.ts +1 -0
- package/lib/core/utils/validators.d.ts +2 -0
- package/monkey-front-core-0.0.452.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.450.tgz +0 -0
|
@@ -380,6 +380,20 @@ class MonkeyEcxUtils {
|
|
|
380
380
|
});
|
|
381
381
|
return handled;
|
|
382
382
|
}
|
|
383
|
+
static trimValuesToSave(obj, fields) {
|
|
384
|
+
let ret = obj;
|
|
385
|
+
const grouped = fields.join('#');
|
|
386
|
+
Object.entries(obj).map(([key, value]) => {
|
|
387
|
+
if (grouped.includes(key)) {
|
|
388
|
+
ret = {
|
|
389
|
+
...ret,
|
|
390
|
+
[key]: `${value}`.trim()
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
return null;
|
|
394
|
+
});
|
|
395
|
+
return ret;
|
|
396
|
+
}
|
|
383
397
|
}
|
|
384
398
|
|
|
385
399
|
const moment$6 = moment_;
|
|
@@ -1258,6 +1272,23 @@ function differentFromZero(control) {
|
|
|
1258
1272
|
}
|
|
1259
1273
|
return null;
|
|
1260
1274
|
}
|
|
1275
|
+
function documentValidatorByType(type, control) {
|
|
1276
|
+
if (!control.parent || !control || isEmptyInputValue(control.value))
|
|
1277
|
+
return null;
|
|
1278
|
+
let valid = false;
|
|
1279
|
+
if (type === 'CPF' || type === 'CNPJ') {
|
|
1280
|
+
valid = MonkeyEcxUtils.isCPFCNPJValid(control.value);
|
|
1281
|
+
}
|
|
1282
|
+
else if (type === 'RUT') {
|
|
1283
|
+
valid = MonkeyEcxUtils.isValidRUT(control.value);
|
|
1284
|
+
}
|
|
1285
|
+
if (!valid) {
|
|
1286
|
+
return {
|
|
1287
|
+
[`invalid${MonkeyEcxUtils.capitalize(type.toLowerCase())}`]: true
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
return null;
|
|
1291
|
+
}
|
|
1261
1292
|
class Validators {
|
|
1262
1293
|
static email(control) {
|
|
1263
1294
|
return emailValidator(control);
|
|
@@ -1312,6 +1343,11 @@ class Validators {
|
|
|
1312
1343
|
static differentFromZero(control) {
|
|
1313
1344
|
return differentFromZero(control);
|
|
1314
1345
|
}
|
|
1346
|
+
static documentValidatorByType(type) {
|
|
1347
|
+
return (control) => {
|
|
1348
|
+
return documentValidatorByType(type, control);
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1315
1351
|
}
|
|
1316
1352
|
|
|
1317
1353
|
/* eslint-disable object-curly-newline */
|
|
@@ -6213,5 +6249,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
6213
6249
|
* Generated bundle index. Do not edit.
|
|
6214
6250
|
*/
|
|
6215
6251
|
|
|
6216
|
-
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsResolveService, MonkeyEcxCommonsService, MonkeyEcxCommonsStoreService, 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, MonkeyEcxLinksModel, 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, differentFromZero, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, requiredWithTrimValidator, index as store, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
6252
|
+
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsResolveService, MonkeyEcxCommonsService, MonkeyEcxCommonsStoreService, 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, MonkeyEcxLinksModel, 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, differentFromZero, documentValidator, documentValidatorByType, emailValidator, passwordConfirmValidator, registerValidator, requiredWithTrimValidator, index as store, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
6217
6253
|
//# sourceMappingURL=monkey-front-core.mjs.map
|