monkey-front-core 0.0.74 → 0.0.78

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.
@@ -2471,11 +2471,19 @@ class MonkeyEcxFeatureToggleService {
2471
2471
  this.flagSubject$ = new BehaviorSubject(null);
2472
2472
  this.flags = undefined;
2473
2473
  this.ldClient = undefined;
2474
+ this.self = this;
2474
2475
  // not to do
2475
2476
  }
2476
- getAllFlags() {
2477
+ getAllFlags(self) {
2478
+ console.log('10');
2479
+ console.log('!!!!!');
2480
+ console.log(this);
2481
+ console.log(self);
2482
+ console.log('!!!!!');
2477
2483
  this.flags = this.ldClient?.allFlags();
2484
+ console.log('11');
2478
2485
  this.flagSubject$.next(true);
2486
+ console.log('12');
2479
2487
  }
2480
2488
  identify(config, environment) {
2481
2489
  console.log('1');
@@ -2498,9 +2506,9 @@ class MonkeyEcxFeatureToggleService {
2498
2506
  diagnosticOptOut: true,
2499
2507
  });
2500
2508
  console.log('6');
2501
- this.ldClient.on('change', this.getAllFlags.bind(this));
2509
+ this.ldClient.on('change', this.getAllFlags.bind(this, this));
2502
2510
  console.log('7');
2503
- this.ldClient.on('ready', this.getAllFlags.bind(this));
2511
+ this.ldClient.on('ready', this.getAllFlags.bind(this, this));
2504
2512
  console.log('8');
2505
2513
  }
2506
2514
  else {
@@ -2511,20 +2519,27 @@ class MonkeyEcxFeatureToggleService {
2511
2519
  }
2512
2520
  }
2513
2521
  apply(configSubject$, environment) {
2522
+ console.log('13');
2514
2523
  if (environment.launchDarklyClientSideID) {
2524
+ console.log('14');
2515
2525
  configSubject$.subscribe((config) => {
2526
+ console.log('15');
2516
2527
  this.identify(config, environment);
2517
2528
  });
2518
2529
  }
2519
2530
  else {
2531
+ console.log('16');
2520
2532
  this.flagSubject$.next(true);
2521
2533
  }
2522
2534
  }
2523
2535
  get onFlags() {
2536
+ console.log('17');
2524
2537
  return this.flagSubject$.asObservable();
2525
2538
  }
2526
2539
  getFlag(flag) {
2540
+ console.log('18');
2527
2541
  const flagValue = this.flags?.[flag];
2542
+ console.log('19');
2528
2543
  return MonkeyUtils.persistNullEmptyUndefined(flagValue) ? flagValue : null;
2529
2544
  }
2530
2545
  }