monkey-front-core 0.0.415 → 0.0.417
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/interfaces/monkeyecx-store.mjs +1 -1
- package/esm2020/lib/core/services/store/monkeyecx-store.service.mjs +9 -9
- package/esm2020/lib/core/utils/validators.mjs +15 -1
- package/fesm2015/monkey-front-core.mjs +23 -9
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +23 -9
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/interfaces/monkeyecx-store.d.ts +2 -2
- package/lib/core/services/store/monkeyecx-store.service.d.ts +3 -4
- package/lib/core/utils/validators.d.ts +2 -0
- package/monkey-front-core-0.0.417.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.415.tgz +0 -0
|
@@ -1244,6 +1244,17 @@ function requiredWithTrimValidator(control) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
return null;
|
|
1246
1246
|
}
|
|
1247
|
+
function differentFromZero(control) {
|
|
1248
|
+
if (!control.parent || !control)
|
|
1249
|
+
return null;
|
|
1250
|
+
const handled = `${control?.value}`.trim().replace(/0/g, '');
|
|
1251
|
+
if (control && !handled) {
|
|
1252
|
+
return {
|
|
1253
|
+
differentFromZero: true
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
return null;
|
|
1257
|
+
}
|
|
1247
1258
|
class Validators {
|
|
1248
1259
|
static email(control) {
|
|
1249
1260
|
return emailValidator(control);
|
|
@@ -1295,6 +1306,9 @@ class Validators {
|
|
|
1295
1306
|
static required(control) {
|
|
1296
1307
|
return requiredWithTrimValidator(control);
|
|
1297
1308
|
}
|
|
1309
|
+
static differentFromZero(control) {
|
|
1310
|
+
return differentFromZero(control);
|
|
1311
|
+
}
|
|
1298
1312
|
}
|
|
1299
1313
|
|
|
1300
1314
|
/* eslint-disable object-curly-newline */
|
|
@@ -5313,14 +5327,14 @@ class MonkeyEcxCommonsStoreService extends MonkeyEcxCommonsService {
|
|
|
5313
5327
|
this.action = actions;
|
|
5314
5328
|
this.selector = selectors;
|
|
5315
5329
|
}
|
|
5316
|
-
handleResponseData(resp, identifier,
|
|
5330
|
+
handleResponseData(resp, identifier, updateLinks = true) {
|
|
5317
5331
|
try {
|
|
5318
5332
|
let data;
|
|
5319
5333
|
if (resp?._embedded) {
|
|
5320
5334
|
const { _embedded, _links, page } = resp;
|
|
5321
5335
|
const key = Object.keys(_embedded)[0];
|
|
5322
5336
|
data = _embedded[key];
|
|
5323
|
-
if (
|
|
5337
|
+
if (updateLinks) {
|
|
5324
5338
|
this.updateLinks?.(_links, identifier);
|
|
5325
5339
|
}
|
|
5326
5340
|
this.updatePage?.(page, identifier);
|
|
@@ -5333,11 +5347,11 @@ class MonkeyEcxCommonsStoreService extends MonkeyEcxCommonsService {
|
|
|
5333
5347
|
throw new Error(`MECX Core - Method handleResponseData -> ${e}`);
|
|
5334
5348
|
}
|
|
5335
5349
|
}
|
|
5336
|
-
async
|
|
5350
|
+
async linksHasDifference(url, identifier) {
|
|
5337
5351
|
try {
|
|
5338
5352
|
const { action, store, selector } = this;
|
|
5339
5353
|
const { hasDifference, hasField } = (await store
|
|
5340
|
-
.select(selector.
|
|
5354
|
+
.select(selector.linksHasDifference({ identifier, url }))
|
|
5341
5355
|
.pipe(take(1))
|
|
5342
5356
|
.toPromise());
|
|
5343
5357
|
if (hasDifference && hasField) {
|
|
@@ -5346,7 +5360,7 @@ class MonkeyEcxCommonsStoreService extends MonkeyEcxCommonsService {
|
|
|
5346
5360
|
return { hasDifference };
|
|
5347
5361
|
}
|
|
5348
5362
|
catch (e) {
|
|
5349
|
-
throw new Error(`MECX Core - Method
|
|
5363
|
+
throw new Error(`MECX Core - Method linksHasDifference -> ${e}`);
|
|
5350
5364
|
}
|
|
5351
5365
|
}
|
|
5352
5366
|
updateControl(data) {
|
|
@@ -5424,11 +5438,11 @@ class MonkeyEcxCommonsStoreService extends MonkeyEcxCommonsService {
|
|
|
5424
5438
|
throw new Error(`MECX Core - Method updateLinks -> ${e}`);
|
|
5425
5439
|
}
|
|
5426
5440
|
}
|
|
5427
|
-
async loadData(url, identifier,
|
|
5441
|
+
async loadData(url, identifier, updateLinks = true) {
|
|
5428
5442
|
this.updateControl({ isLoading: true });
|
|
5429
5443
|
try {
|
|
5430
5444
|
const data = await this.monkeyecxService?.get(url).toPromise();
|
|
5431
|
-
this.handleResponseData(data, identifier,
|
|
5445
|
+
this.handleResponseData(data, identifier, updateLinks);
|
|
5432
5446
|
}
|
|
5433
5447
|
catch (e) {
|
|
5434
5448
|
throw new Error(`${e?.message}`);
|
|
@@ -5438,7 +5452,7 @@ class MonkeyEcxCommonsStoreService extends MonkeyEcxCommonsService {
|
|
|
5438
5452
|
async loadPageData(pagination, identifier) {
|
|
5439
5453
|
const { store, selector } = this;
|
|
5440
5454
|
const data = await store
|
|
5441
|
-
.select(selector.
|
|
5455
|
+
.select(selector.selectLinks({ identifier }))
|
|
5442
5456
|
.pipe(take(1))
|
|
5443
5457
|
.toPromise();
|
|
5444
5458
|
const { action } = pagination;
|
|
@@ -6018,5 +6032,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
6018
6032
|
* Generated bundle index. Do not edit.
|
|
6019
6033
|
*/
|
|
6020
6034
|
|
|
6021
|
-
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, 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, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, requiredWithTrimValidator, index as store, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
6035
|
+
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardByRole, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, 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 };
|
|
6022
6036
|
//# sourceMappingURL=monkey-front-core.mjs.map
|