monkey-front-core 0.0.62 → 0.0.68

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,17 @@ 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') {
245
+ console.log('moment');
246
+ console.log('11');
247
+ console.log(moment$3);
244
248
  if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
245
249
  return '';
246
- let stillUtc = moment$2.utc(date).toDate();
250
+ let stillUtc = moment$3.utc(date).toDate();
247
251
  if (!useUtc)
248
- stillUtc = moment$2(date).toDate();
252
+ stillUtc = moment$3(date).toDate();
249
253
  if (date.toString().indexOf(':') <= -1) {
250
254
  if (typeof date === 'string') {
251
255
  stillUtc = date;
@@ -254,7 +258,7 @@ class MonkeyEcxFormatDateTimelapsePipe {
254
258
  }
255
259
  const formatFrom = `YYYY/MM/DD${showTime ? ` ${format}` : ''}`;
256
260
  const formatTo = `DD/MM/YYYY${showTime ? ` ${format}` : ''}`;
257
- return `${moment$2(stillUtc, formatFrom).format(formatTo)}`;
261
+ return `${moment$3(stillUtc, formatFrom).format(formatTo)}`;
258
262
  }
259
263
  }
260
264
  MonkeyEcxFormatDateTimelapsePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateTimelapsePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
@@ -262,7 +266,7 @@ MonkeyEcxFormatDateTimelapsePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12
262
266
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateTimelapsePipe, decorators: [{
263
267
  type: Pipe,
264
268
  args: [{
265
- name: 'monkeyecxFormatDateTimelapse'
269
+ name: 'monkeyecxFormatDateTimelapse',
266
270
  }]
267
271
  }] });
268
272
 
@@ -372,31 +376,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
372
376
  }]
373
377
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i2.CurrencyPipe }]; } });
374
378
 
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
379
  class MonkeyEcxFormatDocumentPipe {
401
380
  transform(document, withType) {
402
381
  if (!MonkeyEcxUtils.persistNullEmptyUndefined(document))
@@ -569,6 +548,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
569
548
  }]
570
549
  }] });
571
550
 
551
+ const moment$2 = moment_;
572
552
  class MonkeyEcxFormatDateGroupPipe {
573
553
  constructor(injector) {
574
554
  this.injector = injector;
@@ -615,7 +595,6 @@ MonkeyEcxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
615
595
  MonkeyEcxFormatAddressPipe,
616
596
  MonkeyEcxFormatCurrencyPipe,
617
597
  MonkeyEcxFormatDateTimelapsePipe,
618
- MonkeyEcxFormatDatePipe,
619
598
  MonkeyEcxFormatDateGroupPipe,
620
599
  MonkeyEcxFormatDocumentPipe,
621
600
  MonkeyEcxFormatNumberPipe,
@@ -629,7 +608,6 @@ MonkeyEcxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
629
608
  MonkeyEcxFormatAddressPipe,
630
609
  MonkeyEcxFormatCurrencyPipe,
631
610
  MonkeyEcxFormatDateTimelapsePipe,
632
- MonkeyEcxFormatDatePipe,
633
611
  MonkeyEcxFormatDateGroupPipe,
634
612
  MonkeyEcxFormatDocumentPipe,
635
613
  MonkeyEcxFormatNumberPipe,
@@ -649,7 +627,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
649
627
  MonkeyEcxFormatAddressPipe,
650
628
  MonkeyEcxFormatCurrencyPipe,
651
629
  MonkeyEcxFormatDateTimelapsePipe,
652
- MonkeyEcxFormatDatePipe,
653
630
  MonkeyEcxFormatDateGroupPipe,
654
631
  MonkeyEcxFormatDocumentPipe,
655
632
  MonkeyEcxFormatNumberPipe,
@@ -666,7 +643,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
666
643
  MonkeyEcxFormatAddressPipe,
667
644
  MonkeyEcxFormatCurrencyPipe,
668
645
  MonkeyEcxFormatDateTimelapsePipe,
669
- MonkeyEcxFormatDatePipe,
670
646
  MonkeyEcxFormatDateGroupPipe,
671
647
  MonkeyEcxFormatDocumentPipe,
672
648
  MonkeyEcxFormatNumberPipe,
@@ -886,7 +862,7 @@ function MonkeyEcxCoreCharts(render = true) {
886
862
  }
887
863
 
888
864
  /* eslint-disable max-classes-per-file */
889
- const moment$1 = moment$2;
865
+ const moment$1 = moment_;
890
866
  class DateValidator {
891
867
  static do(control) {
892
868
  if (!control.parent || !control)
@@ -1197,7 +1173,7 @@ var decoratorsUtils = /*#__PURE__*/Object.freeze({
1197
1173
  hasMonkeyEcxServiceAndHandlingProperties: hasMonkeyEcxServiceAndHandlingProperties
1198
1174
  });
1199
1175
 
1200
- const moment = moment$2;
1176
+ const moment = moment_;
1201
1177
  const EMAIL_REGEXP = /^[\w-.]+@([\w-]+\.)+[\w-]{1,64}$/;
1202
1178
  function isEmptyInputValue(value) {
1203
1179
  return value == null || value.length === 0;
@@ -1397,7 +1373,7 @@ class Validators {
1397
1373
  return dateValidator(control);
1398
1374
  }
1399
1375
  static greaterThanZero(control) {
1400
- return dateValidator(control);
1376
+ return valueGreaterThanZero(control);
1401
1377
  }
1402
1378
  }
1403
1379
 
@@ -1481,7 +1457,7 @@ function MonkeyEcxCoreServicePaged(params) {
1481
1457
  context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
1482
1458
  context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials({
1483
1459
  ...params,
1484
- ...(requestPaged || null),
1460
+ ...(requestPaged || {}),
1485
1461
  });
1486
1462
  }
1487
1463
  const result = method.apply(context, args);
@@ -2029,21 +2005,7 @@ class MonkeyEcxCommonsService {
2029
2005
  }
2030
2006
  genericMethod(link, data, callback) {
2031
2007
  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) => {
2008
+ this.monkeyecxService?.[type.toLowerCase()](`${href}`, data)?.subscribe(() => {
2047
2009
  if (callback)
2048
2010
  callback();
2049
2011
  }, (err) => {
@@ -4034,13 +3996,13 @@ class MonkeyEcxRequestScheduleService {
4034
3996
  this.schedule = [
4035
3997
  ...saved.map((sch) => {
4036
3998
  const savedLocal = {
4037
- ...sch
3999
+ ...sch,
4038
4000
  };
4039
4001
  if (sch.id === q.id) {
4040
4002
  return null;
4041
4003
  }
4042
4004
  return savedLocal;
4043
- })
4005
+ }),
4044
4006
  ].filter((_) => {
4045
4007
  return _;
4046
4008
  });
@@ -4053,13 +4015,13 @@ class MonkeyEcxRequestScheduleService {
4053
4015
  this.schedule = [
4054
4016
  ...saved.map((sch) => {
4055
4017
  const savedLocal = {
4056
- ...sch
4018
+ ...sch,
4057
4019
  };
4058
4020
  if (sch.id === q.id) {
4059
4021
  return null;
4060
4022
  }
4061
4023
  return savedLocal;
4062
- })
4024
+ }),
4063
4025
  ].filter((_) => {
4064
4026
  return _;
4065
4027
  });
@@ -4067,24 +4029,10 @@ class MonkeyEcxRequestScheduleService {
4067
4029
  }
4068
4030
  doCall(sch) {
4069
4031
  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) => {
4032
+ this.monkeyecxService[method.toLowerCase()](`${url}`, params).subscribe((resp) => {
4085
4033
  action({
4086
4034
  ...data,
4087
- ...resp
4035
+ ...resp,
4088
4036
  }, sch);
4089
4037
  }, () => {
4090
4038
  this.removeFromSchedule(sch);
@@ -4094,13 +4042,13 @@ class MonkeyEcxRequestScheduleService {
4094
4042
  const interval = setInterval(() => {
4095
4043
  this.doCall({
4096
4044
  ...q,
4097
- interval
4045
+ interval,
4098
4046
  });
4099
4047
  }, delay);
4100
4048
  const sch = {
4101
4049
  ...q,
4102
4050
  id: `${MonkeyEcxUtils.getRandomString(40)}`,
4103
- interval
4051
+ interval,
4104
4052
  };
4105
4053
  this.addToSchedule(sch);
4106
4054
  return sch;
@@ -4123,17 +4071,17 @@ MonkeyEcxRequestScheduleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion
4123
4071
  __decorate([
4124
4072
  MonkeyEcxCoreService({
4125
4073
  httpResponse: {
4126
- httpCodeIgnore: [400, 403, 404, 500, 503]
4074
+ httpCodeIgnore: [400, 403, 404, 500, 503],
4127
4075
  },
4128
4076
  requestInProgress: {
4129
- showProgress: false
4130
- }
4077
+ showProgress: false,
4078
+ },
4131
4079
  })
4132
4080
  ], MonkeyEcxRequestScheduleService.prototype, "doCall", null);
4133
4081
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxRequestScheduleService, decorators: [{
4134
4082
  type: Injectable,
4135
4083
  args: [{
4136
- providedIn: 'root'
4084
+ providedIn: 'root',
4137
4085
  }]
4138
4086
  }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxLoggedHandlingService }]; }, propDecorators: { doCall: [] } });
4139
4087
 
@@ -4286,5 +4234,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
4286
4234
  * Generated bundle index. Do not edit.
4287
4235
  */
4288
4236
 
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 };
4237
+ 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
4238
  //# sourceMappingURL=monkey-front-core.mjs.map