monkey-front-core 0.0.64 → 0.0.65

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.
@@ -1452,7 +1452,7 @@ function MonkeyEcxCoreServicePaged(params) {
1452
1452
  context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
1453
1453
  context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials({
1454
1454
  ...params,
1455
- ...(requestPaged || null),
1455
+ ...(requestPaged || {}),
1456
1456
  });
1457
1457
  }
1458
1458
  const result = method.apply(context, args);
@@ -2000,21 +2000,7 @@ class MonkeyEcxCommonsService {
2000
2000
  }
2001
2001
  genericMethod(link, data, callback) {
2002
2002
  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) => {
2003
+ this.monkeyecxService?.[type.toLowerCase()](`${href}`, data)?.subscribe(() => {
2018
2004
  if (callback)
2019
2005
  callback();
2020
2006
  }, (err) => {
@@ -4005,13 +3991,13 @@ class MonkeyEcxRequestScheduleService {
4005
3991
  this.schedule = [
4006
3992
  ...saved.map((sch) => {
4007
3993
  const savedLocal = {
4008
- ...sch
3994
+ ...sch,
4009
3995
  };
4010
3996
  if (sch.id === q.id) {
4011
3997
  return null;
4012
3998
  }
4013
3999
  return savedLocal;
4014
- })
4000
+ }),
4015
4001
  ].filter((_) => {
4016
4002
  return _;
4017
4003
  });
@@ -4024,13 +4010,13 @@ class MonkeyEcxRequestScheduleService {
4024
4010
  this.schedule = [
4025
4011
  ...saved.map((sch) => {
4026
4012
  const savedLocal = {
4027
- ...sch
4013
+ ...sch,
4028
4014
  };
4029
4015
  if (sch.id === q.id) {
4030
4016
  return null;
4031
4017
  }
4032
4018
  return savedLocal;
4033
- })
4019
+ }),
4034
4020
  ].filter((_) => {
4035
4021
  return _;
4036
4022
  });
@@ -4038,24 +4024,10 @@ class MonkeyEcxRequestScheduleService {
4038
4024
  }
4039
4025
  doCall(sch) {
4040
4026
  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) => {
4027
+ this.monkeyecxService[method.toLowerCase()](`${url}`, params).subscribe((resp) => {
4056
4028
  action({
4057
4029
  ...data,
4058
- ...resp
4030
+ ...resp,
4059
4031
  }, sch);
4060
4032
  }, () => {
4061
4033
  this.removeFromSchedule(sch);
@@ -4065,13 +4037,13 @@ class MonkeyEcxRequestScheduleService {
4065
4037
  const interval = setInterval(() => {
4066
4038
  this.doCall({
4067
4039
  ...q,
4068
- interval
4040
+ interval,
4069
4041
  });
4070
4042
  }, delay);
4071
4043
  const sch = {
4072
4044
  ...q,
4073
4045
  id: `${MonkeyEcxUtils.getRandomString(40)}`,
4074
- interval
4046
+ interval,
4075
4047
  };
4076
4048
  this.addToSchedule(sch);
4077
4049
  return sch;
@@ -4094,17 +4066,17 @@ MonkeyEcxRequestScheduleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion
4094
4066
  __decorate([
4095
4067
  MonkeyEcxCoreService({
4096
4068
  httpResponse: {
4097
- httpCodeIgnore: [400, 403, 404, 500, 503]
4069
+ httpCodeIgnore: [400, 403, 404, 500, 503],
4098
4070
  },
4099
4071
  requestInProgress: {
4100
- showProgress: false
4101
- }
4072
+ showProgress: false,
4073
+ },
4102
4074
  })
4103
4075
  ], MonkeyEcxRequestScheduleService.prototype, "doCall", null);
4104
4076
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxRequestScheduleService, decorators: [{
4105
4077
  type: Injectable,
4106
4078
  args: [{
4107
- providedIn: 'root'
4079
+ providedIn: 'root',
4108
4080
  }]
4109
4081
  }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxLoggedHandlingService }]; }, propDecorators: { doCall: [] } });
4110
4082