monkey-front-core 0.0.68 → 0.0.72

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.
@@ -242,14 +242,11 @@ class MonkeyEcxUtils {
242
242
  const moment$3 = moment_;
243
243
  class MonkeyEcxFormatDateTimelapsePipe {
244
244
  transform(date, showTime = false, useUtc = true, format = '- HH:mm') {
245
- console.log('moment');
246
- console.log('11');
247
- console.log(moment$3);
248
245
  if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
249
246
  return '';
250
- let stillUtc = moment$3.utc(date).toDate();
247
+ let stillUtc = moment$3.default.utc(date).toDate();
251
248
  if (!useUtc)
252
- stillUtc = moment$3(date).toDate();
249
+ stillUtc = moment$3.default(date).toDate();
253
250
  if (date.toString().indexOf(':') <= -1) {
254
251
  if (typeof date === 'string') {
255
252
  stillUtc = date;
@@ -258,7 +255,7 @@ class MonkeyEcxFormatDateTimelapsePipe {
258
255
  }
259
256
  const formatFrom = `YYYY/MM/DD${showTime ? ` ${format}` : ''}`;
260
257
  const formatTo = `DD/MM/YYYY${showTime ? ` ${format}` : ''}`;
261
- return `${moment$3(stillUtc, formatFrom).format(formatTo)}`;
258
+ return `${moment$3.default(stillUtc, formatFrom).format(formatTo)}`;
262
259
  }
263
260
  }
264
261
  MonkeyEcxFormatDateTimelapsePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateTimelapsePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
@@ -559,12 +556,12 @@ class MonkeyEcxFormatDateGroupPipe {
559
556
  format(date) {
560
557
  if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
561
558
  return '';
562
- let stillUtc = moment$2.utc(date).toDate();
559
+ let stillUtc = moment$2.default.utc(date).toDate();
563
560
  if (date.toString()?.indexOf(':') <= -1) {
564
561
  stillUtc = date;
565
562
  }
566
563
  const formatFrom = 'YYYY/MM/DD';
567
- const fmt = moment$2(stillUtc, formatFrom).locale(this.lang);
564
+ const fmt = moment$2.default(stillUtc, formatFrom).locale(this.lang);
568
565
  const dayFormated = fmt.format('DD/');
569
566
  const monthFormated = MonkeyEcxUtils.capitalize(fmt.format('MMMM'));
570
567
  const yearFormated = fmt.format('YYYY');
@@ -869,9 +866,11 @@ class DateValidator {
869
866
  return null;
870
867
  if (control && control.value) {
871
868
  const dateFormat = 'MM-DD-YYYY';
872
- if (!moment$1(moment$1(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true).isValid()) {
869
+ if (!moment$1
870
+ .default(moment$1.default(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true)
871
+ .isValid()) {
873
872
  return {
874
- invalidDate: true
873
+ invalidDate: true,
875
874
  };
876
875
  }
877
876
  }
@@ -885,7 +884,7 @@ class DocumentValidator {
885
884
  if (control && control.value) {
886
885
  if (!MonkeyEcxUtils.isCPFCNPJValid(control.value)) {
887
886
  return {
888
- invalidCpfCnpj: true
887
+ invalidCpfCnpj: true,
889
888
  };
890
889
  }
891
890
  }
@@ -899,7 +898,7 @@ class DocumentRutValidator {
899
898
  if (control && control.value) {
900
899
  if (!MonkeyEcxUtils.isValidRUT(control.value)) {
901
900
  return {
902
- invalidRut: true
901
+ invalidRut: true,
903
902
  };
904
903
  }
905
904
  }
@@ -913,7 +912,7 @@ class ZipCodeValidator {
913
912
  if (control && control.value) {
914
913
  if (!MonkeyEcxUtils.isValidZipCode(control.value)) {
915
914
  return {
916
- invalidZipCode: true
915
+ invalidZipCode: true,
917
916
  };
918
917
  }
919
918
  }
@@ -927,7 +926,7 @@ class ComboValidator {
927
926
  if (control && control.value !== '0')
928
927
  return null;
929
928
  return {
930
- invalidCombo: true
929
+ invalidCombo: true,
931
930
  };
932
931
  }
933
932
  }
@@ -938,7 +937,7 @@ class isTrueValidator {
938
937
  if (control && control.value !== false)
939
938
  return null;
940
939
  return {
941
- invalidTrue: true
940
+ invalidTrue: true,
942
941
  };
943
942
  }
944
943
  }
@@ -954,7 +953,7 @@ class PasswordMatchValidation {
954
953
  if (password === passwordConfirm)
955
954
  return null;
956
955
  return {
957
- passwordsNotMatching: true
956
+ passwordsNotMatching: true,
958
957
  };
959
958
  }
960
959
  }
@@ -965,7 +964,7 @@ class UrlValidator {
965
964
  if (control && control.value) {
966
965
  if (!MonkeyEcxUtils.isValidUrl(control.value)) {
967
966
  return {
968
- invalidUrl: true
967
+ invalidUrl: true,
969
968
  };
970
969
  }
971
970
  }
@@ -991,7 +990,7 @@ class CustomDatesStartValidator {
991
990
  return null;
992
991
  if (dateStart > dateEnd) {
993
992
  return {
994
- dateStartMustBeLessThanAnd: true
993
+ dateStartMustBeLessThanAnd: true,
995
994
  };
996
995
  }
997
996
  return null;
@@ -1016,7 +1015,7 @@ class CustomDatesEndValidator {
1016
1015
  return null;
1017
1016
  if (dateEnd < dateStart) {
1018
1017
  return {
1019
- dateEndMustBeGreaterThanStart: true
1018
+ dateEndMustBeGreaterThanStart: true,
1020
1019
  };
1021
1020
  }
1022
1021
  return null;
@@ -1028,7 +1027,7 @@ class UnlockRegisterBuyerValidator {
1028
1027
  return null;
1029
1028
  if (control && control.value !== '#MONKEYBUYER') {
1030
1029
  return {
1031
- invalidUnlockRegister: true
1030
+ invalidUnlockRegister: true,
1032
1031
  };
1033
1032
  }
1034
1033
  return null;
@@ -1040,7 +1039,7 @@ class UnlockRegisterSponsorValidator {
1040
1039
  return null;
1041
1040
  if (control && control.value !== '#MONKEYSPONSOR') {
1042
1041
  return {
1043
- invalidUnlockRegister: true
1042
+ invalidUnlockRegister: true,
1044
1043
  };
1045
1044
  }
1046
1045
  return null;
@@ -1056,7 +1055,7 @@ class DateRangeValidator {
1056
1055
  (!MonkeyEcxUtils.persistNullEmptyUndefined(dates.startDate) ||
1057
1056
  !MonkeyEcxUtils.persistNullEmptyUndefined(dates.endDate))) {
1058
1057
  return {
1059
- invalidDateRange: true
1058
+ invalidDateRange: true,
1060
1059
  };
1061
1060
  }
1062
1061
  return null;
@@ -1315,7 +1314,9 @@ function dateValidator(control) {
1315
1314
  if (!control.parent || !control || isEmptyInputValue(control.value))
1316
1315
  return null;
1317
1316
  const dateFormat = 'MM-DD-YYYY';
1318
- if (!moment(moment(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true).isValid()) {
1317
+ if (!moment
1318
+ .default(moment.default(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true)
1319
+ .isValid()) {
1319
1320
  return {
1320
1321
  invalidDate: true,
1321
1322
  };
@@ -2551,11 +2552,13 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
2551
2552
  getWhiteLabelSettings(monkeyecxCode, configBoostrap, callback, environment, identifyCode) {
2552
2553
  const { monkeyecxService, monkeyecxi18nConfigService, configSubject$, monkeyStyleGuideSettingsService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, internalValidations, } = this;
2553
2554
  const url = `${environment.urlAssets}`;
2554
- monkeyecxService?.get(`${url}/${monkeyecxCode.toLowerCase()}/white-label.json`)?.subscribe((config) => {
2555
+ monkeyecxService
2556
+ ?.get(`${url}/${monkeyecxCode.toLowerCase()}/white-label.json?t=${MonkeyUtils.getRandomString(30)}`)
2557
+ ?.subscribe((config) => {
2555
2558
  monkeyecxi18nConfigService.apply(config, environment);
2556
2559
  monkeyecxLogsConfigService.apply(config, configBoostrap, environment, identifyCode);
2557
2560
  monkeyEcxFeatureToggleService.apply(configSubject$, environment);
2558
- monkeyStyleGuideSettingsService.boostrap(`${url}/${monkeyecxCode.toLowerCase()}/monkey-style-guide-settings.json`, internalValidations.bind(this, configBoostrap, callback, environment));
2561
+ monkeyStyleGuideSettingsService.boostrap(`${url}/${monkeyecxCode.toLowerCase()}/monkey-style-guide-settings.json?t=${MonkeyUtils.getRandomString(30)}`, internalValidations.bind(this, configBoostrap, callback, environment));
2559
2562
  configSubject$.next(config);
2560
2563
  }, (err) => {
2561
2564
  monkeyecxErrorConfigService.apply('theme');