monkey-front-core 0.0.70 → 0.0.74

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.
@@ -243,9 +243,6 @@ class MonkeyEcxUtils {
243
243
  const moment$3 = moment_;
244
244
  class MonkeyEcxFormatDateTimelapsePipe {
245
245
  transform(date, showTime = false, useUtc = true, format = '- HH:mm') {
246
- console.log('moment');
247
- console.log('11');
248
- console.log(moment$3);
249
246
  if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
250
247
  return '';
251
248
  let stillUtc = moment$3.default.utc(date).toDate();
@@ -562,12 +559,12 @@ class MonkeyEcxFormatDateGroupPipe {
562
559
  var _a;
563
560
  if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
564
561
  return '';
565
- let stillUtc = moment$2.utc(date).toDate();
562
+ let stillUtc = moment$2.default.utc(date).toDate();
566
563
  if (((_a = date.toString()) === null || _a === void 0 ? void 0 : _a.indexOf(':')) <= -1) {
567
564
  stillUtc = date;
568
565
  }
569
566
  const formatFrom = 'YYYY/MM/DD';
570
- const fmt = moment$2(stillUtc, formatFrom).locale(this.lang);
567
+ const fmt = moment$2.default(stillUtc, formatFrom).locale(this.lang);
571
568
  const dayFormated = fmt.format('DD/');
572
569
  const monthFormated = MonkeyEcxUtils.capitalize(fmt.format('MMMM'));
573
570
  const yearFormated = fmt.format('YYYY');
@@ -876,9 +873,11 @@ class DateValidator {
876
873
  return null;
877
874
  if (control && control.value) {
878
875
  const dateFormat = 'MM-DD-YYYY';
879
- if (!moment$1(moment$1(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true).isValid()) {
876
+ if (!moment$1
877
+ .default(moment$1.default(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true)
878
+ .isValid()) {
880
879
  return {
881
- invalidDate: true
880
+ invalidDate: true,
882
881
  };
883
882
  }
884
883
  }
@@ -892,7 +891,7 @@ class DocumentValidator {
892
891
  if (control && control.value) {
893
892
  if (!MonkeyEcxUtils.isCPFCNPJValid(control.value)) {
894
893
  return {
895
- invalidCpfCnpj: true
894
+ invalidCpfCnpj: true,
896
895
  };
897
896
  }
898
897
  }
@@ -906,7 +905,7 @@ class DocumentRutValidator {
906
905
  if (control && control.value) {
907
906
  if (!MonkeyEcxUtils.isValidRUT(control.value)) {
908
907
  return {
909
- invalidRut: true
908
+ invalidRut: true,
910
909
  };
911
910
  }
912
911
  }
@@ -920,7 +919,7 @@ class ZipCodeValidator {
920
919
  if (control && control.value) {
921
920
  if (!MonkeyEcxUtils.isValidZipCode(control.value)) {
922
921
  return {
923
- invalidZipCode: true
922
+ invalidZipCode: true,
924
923
  };
925
924
  }
926
925
  }
@@ -934,7 +933,7 @@ class ComboValidator {
934
933
  if (control && control.value !== '0')
935
934
  return null;
936
935
  return {
937
- invalidCombo: true
936
+ invalidCombo: true,
938
937
  };
939
938
  }
940
939
  }
@@ -945,7 +944,7 @@ class isTrueValidator {
945
944
  if (control && control.value !== false)
946
945
  return null;
947
946
  return {
948
- invalidTrue: true
947
+ invalidTrue: true,
949
948
  };
950
949
  }
951
950
  }
@@ -962,7 +961,7 @@ class PasswordMatchValidation {
962
961
  if (password === passwordConfirm)
963
962
  return null;
964
963
  return {
965
- passwordsNotMatching: true
964
+ passwordsNotMatching: true,
966
965
  };
967
966
  }
968
967
  }
@@ -973,7 +972,7 @@ class UrlValidator {
973
972
  if (control && control.value) {
974
973
  if (!MonkeyEcxUtils.isValidUrl(control.value)) {
975
974
  return {
976
- invalidUrl: true
975
+ invalidUrl: true,
977
976
  };
978
977
  }
979
978
  }
@@ -1000,7 +999,7 @@ class CustomDatesStartValidator {
1000
999
  return null;
1001
1000
  if (dateStart > dateEnd) {
1002
1001
  return {
1003
- dateStartMustBeLessThanAnd: true
1002
+ dateStartMustBeLessThanAnd: true,
1004
1003
  };
1005
1004
  }
1006
1005
  return null;
@@ -1026,7 +1025,7 @@ class CustomDatesEndValidator {
1026
1025
  return null;
1027
1026
  if (dateEnd < dateStart) {
1028
1027
  return {
1029
- dateEndMustBeGreaterThanStart: true
1028
+ dateEndMustBeGreaterThanStart: true,
1030
1029
  };
1031
1030
  }
1032
1031
  return null;
@@ -1038,7 +1037,7 @@ class UnlockRegisterBuyerValidator {
1038
1037
  return null;
1039
1038
  if (control && control.value !== '#MONKEYBUYER') {
1040
1039
  return {
1041
- invalidUnlockRegister: true
1040
+ invalidUnlockRegister: true,
1042
1041
  };
1043
1042
  }
1044
1043
  return null;
@@ -1050,7 +1049,7 @@ class UnlockRegisterSponsorValidator {
1050
1049
  return null;
1051
1050
  if (control && control.value !== '#MONKEYSPONSOR') {
1052
1051
  return {
1053
- invalidUnlockRegister: true
1052
+ invalidUnlockRegister: true,
1054
1053
  };
1055
1054
  }
1056
1055
  return null;
@@ -1067,7 +1066,7 @@ class DateRangeValidator {
1067
1066
  (!MonkeyEcxUtils.persistNullEmptyUndefined(dates.startDate) ||
1068
1067
  !MonkeyEcxUtils.persistNullEmptyUndefined(dates.endDate))) {
1069
1068
  return {
1070
- invalidDateRange: true
1069
+ invalidDateRange: true,
1071
1070
  };
1072
1071
  }
1073
1072
  return null;
@@ -1326,7 +1325,9 @@ function dateValidator(control) {
1326
1325
  if (!control.parent || !control || isEmptyInputValue(control.value))
1327
1326
  return null;
1328
1327
  const dateFormat = 'MM-DD-YYYY';
1329
- if (!moment(moment(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true).isValid()) {
1328
+ if (!moment
1329
+ .default(moment.default(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true)
1330
+ .isValid()) {
1330
1331
  return {
1331
1332
  invalidDate: true,
1332
1333
  };
@@ -2485,25 +2486,36 @@ class MonkeyEcxFeatureToggleService {
2485
2486
  }
2486
2487
  identify(config, environment) {
2487
2488
  var _a;
2489
+ console.log('1');
2490
+ console.log(this);
2488
2491
  if (config) {
2492
+ console.log('2');
2489
2493
  const email = 'monkey@monkey.exchange';
2494
+ console.log('3');
2490
2495
  const user = {
2491
2496
  email,
2492
- key: `${(_a = config.program) === null || _a === void 0 ? void 0 : _a.token}#${email}`
2497
+ key: `${(_a = config.program) === null || _a === void 0 ? void 0 : _a.token}#${email}`,
2493
2498
  };
2499
+ console.log('4');
2494
2500
  if (!this.ldClient) {
2501
+ console.log('5');
2495
2502
  this.ldClient = initialize(environment.launchDarklyClientSideID, user, {
2496
2503
  streaming: true,
2497
2504
  disableSyncEventPost: true,
2498
2505
  sendEvents: false,
2499
- diagnosticOptOut: true
2506
+ diagnosticOptOut: true,
2500
2507
  });
2508
+ console.log('6');
2501
2509
  this.ldClient.on('change', this.getAllFlags.bind(this));
2510
+ console.log('7');
2502
2511
  this.ldClient.on('ready', this.getAllFlags.bind(this));
2512
+ console.log('8');
2503
2513
  }
2504
2514
  else {
2515
+ console.log('9');
2505
2516
  this.ldClient.identify(user, undefined, this.getAllFlags);
2506
2517
  }
2518
+ console.log(this);
2507
2519
  }
2508
2520
  }
2509
2521
  apply(configSubject$, environment) {
@@ -2530,7 +2542,7 @@ MonkeyEcxFeatureToggleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion:
2530
2542
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFeatureToggleService, decorators: [{
2531
2543
  type: Injectable,
2532
2544
  args: [{
2533
- providedIn: 'root'
2545
+ providedIn: 'root',
2534
2546
  }]
2535
2547
  }], ctorParameters: function () { return []; } });
2536
2548
 
@@ -2561,11 +2573,11 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
2561
2573
  var _a;
2562
2574
  const { monkeyecxService, monkeyecxi18nConfigService, configSubject$, monkeyStyleGuideSettingsService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, internalValidations, } = this;
2563
2575
  const url = `${environment.urlAssets}`;
2564
- (_a = monkeyecxService === null || monkeyecxService === void 0 ? void 0 : monkeyecxService.get(`${url}/${monkeyecxCode.toLowerCase()}/white-label.json`)) === null || _a === void 0 ? void 0 : _a.subscribe((config) => {
2576
+ (_a = monkeyecxService === null || monkeyecxService === void 0 ? void 0 : monkeyecxService.get(`${url}/${monkeyecxCode.toLowerCase()}/white-label.json?t=${MonkeyUtils.getRandomString(30)}`)) === null || _a === void 0 ? void 0 : _a.subscribe((config) => {
2565
2577
  monkeyecxi18nConfigService.apply(config, environment);
2566
2578
  monkeyecxLogsConfigService.apply(config, configBoostrap, environment, identifyCode);
2567
2579
  monkeyEcxFeatureToggleService.apply(configSubject$, environment);
2568
- monkeyStyleGuideSettingsService.boostrap(`${url}/${monkeyecxCode.toLowerCase()}/monkey-style-guide-settings.json`, internalValidations.bind(this, configBoostrap, callback, environment));
2580
+ monkeyStyleGuideSettingsService.boostrap(`${url}/${monkeyecxCode.toLowerCase()}/monkey-style-guide-settings.json?t=${MonkeyUtils.getRandomString(30)}`, internalValidations.bind(this, configBoostrap, callback, environment));
2569
2581
  configSubject$.next(config);
2570
2582
  }, (err) => {
2571
2583
  monkeyecxErrorConfigService.apply('theme');