monkey-front-core 0.0.61 → 0.0.66

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.
@@ -6,7 +6,7 @@ import * as i2 from '@angular/common';
6
6
  import { formatNumber, CurrencyPipe, CommonModule } from '@angular/common';
7
7
  import * as i1$1 from '@ngx-translate/core';
8
8
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
9
- import * as moment$2 from 'moment';
9
+ import * as moment_ from 'moment';
10
10
  import * as i1$2 from 'ngx-cookie-service';
11
11
  import * as i1$3 from '@angular/router';
12
12
  import { NavigationStart, NavigationEnd, NavigationError, NavigationCancel } from '@angular/router';
@@ -239,13 +239,14 @@ class MonkeyEcxUtils {
239
239
  }
240
240
  }
241
241
 
242
+ const moment$3 = moment_;
242
243
  class MonkeyEcxFormatDateTimelapsePipe {
243
244
  transform(date, showTime = false, useUtc = true, format = '- HH:mm') {
244
245
  if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
245
246
  return '';
246
- let stillUtc = moment$2.utc(date).toDate();
247
+ let stillUtc = moment$3.utc(date).toDate();
247
248
  if (!useUtc)
248
- stillUtc = moment$2(date).toDate();
249
+ stillUtc = moment$3(date).toDate();
249
250
  if (date.toString().indexOf(':') <= -1) {
250
251
  if (typeof date === 'string') {
251
252
  stillUtc = date;
@@ -254,7 +255,7 @@ class MonkeyEcxFormatDateTimelapsePipe {
254
255
  }
255
256
  const formatFrom = `YYYY/MM/DD${showTime ? ` ${format}` : ''}`;
256
257
  const formatTo = `DD/MM/YYYY${showTime ? ` ${format}` : ''}`;
257
- return `${moment$2(stillUtc, formatFrom).format(formatTo)}`;
258
+ return `${moment$3(stillUtc, formatFrom).format(formatTo)}`;
258
259
  }
259
260
  }
260
261
  MonkeyEcxFormatDateTimelapsePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateTimelapsePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
@@ -262,7 +263,7 @@ MonkeyEcxFormatDateTimelapsePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12
262
263
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateTimelapsePipe, decorators: [{
263
264
  type: Pipe,
264
265
  args: [{
265
- name: 'monkeyecxFormatDateTimelapse'
266
+ name: 'monkeyecxFormatDateTimelapse',
266
267
  }]
267
268
  }] });
268
269
 
@@ -372,31 +373,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
372
373
  }]
373
374
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i2.CurrencyPipe }]; } });
374
375
 
375
- class MonkeyEcxFormatDatePipe {
376
- transform(date, showTime = false, format) {
377
- if (!MonkeyEcxUtils.persistNullEmptyUndefined(document))
378
- return '';
379
- let stillUtc = moment$2.utc(date).toDate();
380
- if (date.indexOf(':') <= -1) {
381
- stillUtc = date;
382
- }
383
- if (!format) {
384
- format = 'HH:mm';
385
- }
386
- const formatFrom = `YYYY/MM/DD${showTime ? ` ${format}` : ''}`;
387
- const formatTo = `DD/MM/YYYY${showTime ? ` ${format}` : ''}`;
388
- return `${moment$2(stillUtc, formatFrom).local().format(formatTo)}`;
389
- }
390
- }
391
- MonkeyEcxFormatDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
392
- MonkeyEcxFormatDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDatePipe, name: "monkeyecxFormatDate" });
393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDatePipe, decorators: [{
394
- type: Pipe,
395
- args: [{
396
- name: 'monkeyecxFormatDate',
397
- }]
398
- }] });
399
-
400
376
  class MonkeyEcxFormatDocumentPipe {
401
377
  transform(document, withType) {
402
378
  if (!MonkeyEcxUtils.persistNullEmptyUndefined(document))
@@ -569,6 +545,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
569
545
  }]
570
546
  }] });
571
547
 
548
+ const moment$2 = moment_;
572
549
  class MonkeyEcxFormatDateGroupPipe {
573
550
  constructor(injector) {
574
551
  this.injector = injector;
@@ -615,7 +592,6 @@ MonkeyEcxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
615
592
  MonkeyEcxFormatAddressPipe,
616
593
  MonkeyEcxFormatCurrencyPipe,
617
594
  MonkeyEcxFormatDateTimelapsePipe,
618
- MonkeyEcxFormatDatePipe,
619
595
  MonkeyEcxFormatDateGroupPipe,
620
596
  MonkeyEcxFormatDocumentPipe,
621
597
  MonkeyEcxFormatNumberPipe,
@@ -629,7 +605,6 @@ MonkeyEcxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
629
605
  MonkeyEcxFormatAddressPipe,
630
606
  MonkeyEcxFormatCurrencyPipe,
631
607
  MonkeyEcxFormatDateTimelapsePipe,
632
- MonkeyEcxFormatDatePipe,
633
608
  MonkeyEcxFormatDateGroupPipe,
634
609
  MonkeyEcxFormatDocumentPipe,
635
610
  MonkeyEcxFormatNumberPipe,
@@ -649,7 +624,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
649
624
  MonkeyEcxFormatAddressPipe,
650
625
  MonkeyEcxFormatCurrencyPipe,
651
626
  MonkeyEcxFormatDateTimelapsePipe,
652
- MonkeyEcxFormatDatePipe,
653
627
  MonkeyEcxFormatDateGroupPipe,
654
628
  MonkeyEcxFormatDocumentPipe,
655
629
  MonkeyEcxFormatNumberPipe,
@@ -666,7 +640,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
666
640
  MonkeyEcxFormatAddressPipe,
667
641
  MonkeyEcxFormatCurrencyPipe,
668
642
  MonkeyEcxFormatDateTimelapsePipe,
669
- MonkeyEcxFormatDatePipe,
670
643
  MonkeyEcxFormatDateGroupPipe,
671
644
  MonkeyEcxFormatDocumentPipe,
672
645
  MonkeyEcxFormatNumberPipe,
@@ -886,7 +859,7 @@ function MonkeyEcxCoreCharts(render = true) {
886
859
  }
887
860
 
888
861
  /* eslint-disable max-classes-per-file */
889
- const moment$1 = moment$2;
862
+ const moment$1 = moment_;
890
863
  class DateValidator {
891
864
  static do(control) {
892
865
  if (!control.parent || !control)
@@ -1197,7 +1170,7 @@ var decoratorsUtils = /*#__PURE__*/Object.freeze({
1197
1170
  hasMonkeyEcxServiceAndHandlingProperties: hasMonkeyEcxServiceAndHandlingProperties
1198
1171
  });
1199
1172
 
1200
- const moment = moment$2;
1173
+ const moment = moment_;
1201
1174
  const EMAIL_REGEXP = /^[\w-.]+@([\w-]+\.)+[\w-]{1,64}$/;
1202
1175
  function isEmptyInputValue(value) {
1203
1176
  return value == null || value.length === 0;
@@ -1397,7 +1370,7 @@ class Validators {
1397
1370
  return dateValidator(control);
1398
1371
  }
1399
1372
  static greaterThanZero(control) {
1400
- return dateValidator(control);
1373
+ return valueGreaterThanZero(control);
1401
1374
  }
1402
1375
  }
1403
1376
 
@@ -1481,7 +1454,7 @@ function MonkeyEcxCoreServicePaged(params) {
1481
1454
  context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
1482
1455
  context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials({
1483
1456
  ...params,
1484
- ...(requestPaged || null),
1457
+ ...(requestPaged || {}),
1485
1458
  });
1486
1459
  }
1487
1460
  const result = method.apply(context, args);
@@ -2029,21 +2002,7 @@ class MonkeyEcxCommonsService {
2029
2002
  }
2030
2003
  genericMethod(link, data, callback) {
2031
2004
  const { href, type = 'get' } = link;
2032
- let func = null;
2033
- const tp = `${type}`.toLowerCase();
2034
- if (tp === 'get') {
2035
- func = this.monkeyecxService?.get;
2036
- }
2037
- else if (tp === 'post') {
2038
- func = this.monkeyecxService?.post;
2039
- }
2040
- else if (tp === 'put') {
2041
- func = this.monkeyecxService?.put;
2042
- }
2043
- else if (tp === 'delete') {
2044
- func = this.monkeyecxService?.delete;
2045
- }
2046
- func?.(`${href}`, data)?.subscribe((resp) => {
2005
+ this.monkeyecxService?.[type.toLowerCase()](`${href}`, data)?.subscribe(() => {
2047
2006
  if (callback)
2048
2007
  callback();
2049
2008
  }, (err) => {
@@ -4034,13 +3993,13 @@ class MonkeyEcxRequestScheduleService {
4034
3993
  this.schedule = [
4035
3994
  ...saved.map((sch) => {
4036
3995
  const savedLocal = {
4037
- ...sch
3996
+ ...sch,
4038
3997
  };
4039
3998
  if (sch.id === q.id) {
4040
3999
  return null;
4041
4000
  }
4042
4001
  return savedLocal;
4043
- })
4002
+ }),
4044
4003
  ].filter((_) => {
4045
4004
  return _;
4046
4005
  });
@@ -4053,13 +4012,13 @@ class MonkeyEcxRequestScheduleService {
4053
4012
  this.schedule = [
4054
4013
  ...saved.map((sch) => {
4055
4014
  const savedLocal = {
4056
- ...sch
4015
+ ...sch,
4057
4016
  };
4058
4017
  if (sch.id === q.id) {
4059
4018
  return null;
4060
4019
  }
4061
4020
  return savedLocal;
4062
- })
4021
+ }),
4063
4022
  ].filter((_) => {
4064
4023
  return _;
4065
4024
  });
@@ -4067,24 +4026,10 @@ class MonkeyEcxRequestScheduleService {
4067
4026
  }
4068
4027
  doCall(sch) {
4069
4028
  const { url, method, params, data, action } = sch;
4070
- let func = null;
4071
- const tp = `${method}`.toLowerCase();
4072
- if (tp === 'get') {
4073
- func = this.monkeyecxService?.get;
4074
- }
4075
- else if (tp === 'post') {
4076
- func = this.monkeyecxService?.post;
4077
- }
4078
- else if (tp === 'put') {
4079
- func = this.monkeyecxService?.put;
4080
- }
4081
- else if (tp === 'delete') {
4082
- func = this.monkeyecxService?.delete;
4083
- }
4084
- func?.(`${url}`, params)?.subscribe((resp) => {
4029
+ this.monkeyecxService[method.toLowerCase()](`${url}`, params).subscribe((resp) => {
4085
4030
  action({
4086
4031
  ...data,
4087
- ...resp
4032
+ ...resp,
4088
4033
  }, sch);
4089
4034
  }, () => {
4090
4035
  this.removeFromSchedule(sch);
@@ -4094,13 +4039,13 @@ class MonkeyEcxRequestScheduleService {
4094
4039
  const interval = setInterval(() => {
4095
4040
  this.doCall({
4096
4041
  ...q,
4097
- interval
4042
+ interval,
4098
4043
  });
4099
4044
  }, delay);
4100
4045
  const sch = {
4101
4046
  ...q,
4102
4047
  id: `${MonkeyEcxUtils.getRandomString(40)}`,
4103
- interval
4048
+ interval,
4104
4049
  };
4105
4050
  this.addToSchedule(sch);
4106
4051
  return sch;
@@ -4123,17 +4068,17 @@ MonkeyEcxRequestScheduleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion
4123
4068
  __decorate([
4124
4069
  MonkeyEcxCoreService({
4125
4070
  httpResponse: {
4126
- httpCodeIgnore: [400, 403, 404, 500, 503]
4071
+ httpCodeIgnore: [400, 403, 404, 500, 503],
4127
4072
  },
4128
4073
  requestInProgress: {
4129
- showProgress: false
4130
- }
4074
+ showProgress: false,
4075
+ },
4131
4076
  })
4132
4077
  ], MonkeyEcxRequestScheduleService.prototype, "doCall", null);
4133
4078
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxRequestScheduleService, decorators: [{
4134
4079
  type: Injectable,
4135
4080
  args: [{
4136
- providedIn: 'root'
4081
+ providedIn: 'root',
4137
4082
  }]
4138
4083
  }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxLoggedHandlingService }]; }, propDecorators: { doCall: [] } });
4139
4084
 
@@ -4286,5 +4231,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
4286
4231
  * Generated bundle index. Do not edit.
4287
4232
  */
4288
4233
 
4289
- export { ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDatePipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPipesModule, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModuleModule, OpSearch, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
4234
+ export { ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPipesModule, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModuleModule, OpSearch, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
4290
4235
  //# sourceMappingURL=monkey-front-core.mjs.map