monkey-front-core 0.0.64 → 0.0.69

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.default.utc(date).toDate();
247
251
  if (!useUtc)
248
- stillUtc = moment$2(date).toDate();
252
+ stillUtc = moment$3.default(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.default(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
 
@@ -544,6 +548,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
544
548
  }]
545
549
  }] });
546
550
 
551
+ const moment$2 = moment_;
547
552
  class MonkeyEcxFormatDateGroupPipe {
548
553
  constructor(injector) {
549
554
  this.injector = injector;
@@ -857,7 +862,7 @@ function MonkeyEcxCoreCharts(render = true) {
857
862
  }
858
863
 
859
864
  /* eslint-disable max-classes-per-file */
860
- const moment$1 = moment$2;
865
+ const moment$1 = moment_;
861
866
  class DateValidator {
862
867
  static do(control) {
863
868
  if (!control.parent || !control)
@@ -1168,7 +1173,7 @@ var decoratorsUtils = /*#__PURE__*/Object.freeze({
1168
1173
  hasMonkeyEcxServiceAndHandlingProperties: hasMonkeyEcxServiceAndHandlingProperties
1169
1174
  });
1170
1175
 
1171
- const moment = moment$2;
1176
+ const moment = moment_;
1172
1177
  const EMAIL_REGEXP = /^[\w-.]+@([\w-]+\.)+[\w-]{1,64}$/;
1173
1178
  function isEmptyInputValue(value) {
1174
1179
  return value == null || value.length === 0;
@@ -1452,7 +1457,7 @@ function MonkeyEcxCoreServicePaged(params) {
1452
1457
  context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
1453
1458
  context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials({
1454
1459
  ...params,
1455
- ...(requestPaged || null),
1460
+ ...(requestPaged || {}),
1456
1461
  });
1457
1462
  }
1458
1463
  const result = method.apply(context, args);
@@ -2000,21 +2005,7 @@ class MonkeyEcxCommonsService {
2000
2005
  }
2001
2006
  genericMethod(link, data, callback) {
2002
2007
  const { href, type = 'get' } = link;
2003
- let func = null;
2004
- const tp = `${type}`.toLowerCase();
2005
- if (tp === 'get') {
2006
- func = this.monkeyecxService?.get;
2007
- }
2008
- else if (tp === 'post') {
2009
- func = this.monkeyecxService?.post;
2010
- }
2011
- else if (tp === 'put') {
2012
- func = this.monkeyecxService?.put;
2013
- }
2014
- else if (tp === 'delete') {
2015
- func = this.monkeyecxService?.delete;
2016
- }
2017
- func?.(`${href}`, data)?.subscribe((resp) => {
2008
+ this.monkeyecxService?.[type.toLowerCase()](`${href}`, data)?.subscribe(() => {
2018
2009
  if (callback)
2019
2010
  callback();
2020
2011
  }, (err) => {
@@ -4005,13 +3996,13 @@ class MonkeyEcxRequestScheduleService {
4005
3996
  this.schedule = [
4006
3997
  ...saved.map((sch) => {
4007
3998
  const savedLocal = {
4008
- ...sch
3999
+ ...sch,
4009
4000
  };
4010
4001
  if (sch.id === q.id) {
4011
4002
  return null;
4012
4003
  }
4013
4004
  return savedLocal;
4014
- })
4005
+ }),
4015
4006
  ].filter((_) => {
4016
4007
  return _;
4017
4008
  });
@@ -4024,13 +4015,13 @@ class MonkeyEcxRequestScheduleService {
4024
4015
  this.schedule = [
4025
4016
  ...saved.map((sch) => {
4026
4017
  const savedLocal = {
4027
- ...sch
4018
+ ...sch,
4028
4019
  };
4029
4020
  if (sch.id === q.id) {
4030
4021
  return null;
4031
4022
  }
4032
4023
  return savedLocal;
4033
- })
4024
+ }),
4034
4025
  ].filter((_) => {
4035
4026
  return _;
4036
4027
  });
@@ -4038,24 +4029,10 @@ class MonkeyEcxRequestScheduleService {
4038
4029
  }
4039
4030
  doCall(sch) {
4040
4031
  const { url, method, params, data, action } = sch;
4041
- let func = null;
4042
- const tp = `${method}`.toLowerCase();
4043
- if (tp === 'get') {
4044
- func = this.monkeyecxService?.get;
4045
- }
4046
- else if (tp === 'post') {
4047
- func = this.monkeyecxService?.post;
4048
- }
4049
- else if (tp === 'put') {
4050
- func = this.monkeyecxService?.put;
4051
- }
4052
- else if (tp === 'delete') {
4053
- func = this.monkeyecxService?.delete;
4054
- }
4055
- func?.(`${url}`, params)?.subscribe((resp) => {
4032
+ this.monkeyecxService[method.toLowerCase()](`${url}`, params).subscribe((resp) => {
4056
4033
  action({
4057
4034
  ...data,
4058
- ...resp
4035
+ ...resp,
4059
4036
  }, sch);
4060
4037
  }, () => {
4061
4038
  this.removeFromSchedule(sch);
@@ -4065,13 +4042,13 @@ class MonkeyEcxRequestScheduleService {
4065
4042
  const interval = setInterval(() => {
4066
4043
  this.doCall({
4067
4044
  ...q,
4068
- interval
4045
+ interval,
4069
4046
  });
4070
4047
  }, delay);
4071
4048
  const sch = {
4072
4049
  ...q,
4073
4050
  id: `${MonkeyEcxUtils.getRandomString(40)}`,
4074
- interval
4051
+ interval,
4075
4052
  };
4076
4053
  this.addToSchedule(sch);
4077
4054
  return sch;
@@ -4094,17 +4071,17 @@ MonkeyEcxRequestScheduleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion
4094
4071
  __decorate([
4095
4072
  MonkeyEcxCoreService({
4096
4073
  httpResponse: {
4097
- httpCodeIgnore: [400, 403, 404, 500, 503]
4074
+ httpCodeIgnore: [400, 403, 404, 500, 503],
4098
4075
  },
4099
4076
  requestInProgress: {
4100
- showProgress: false
4101
- }
4077
+ showProgress: false,
4078
+ },
4102
4079
  })
4103
4080
  ], MonkeyEcxRequestScheduleService.prototype, "doCall", null);
4104
4081
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxRequestScheduleService, decorators: [{
4105
4082
  type: Injectable,
4106
4083
  args: [{
4107
- providedIn: 'root'
4084
+ providedIn: 'root',
4108
4085
  }]
4109
4086
  }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxLoggedHandlingService }]; }, propDecorators: { doCall: [] } });
4110
4087