@aws-amplify/ui-angular 3.0.0 → 3.1.0

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.
Files changed (20) hide show
  1. package/bundles/aws-amplify-ui-angular.umd.js +24 -21
  2. package/bundles/aws-amplify-ui-angular.umd.js.map +1 -1
  3. package/esm2015/lib/common/types/auth-types.js +1 -1
  4. package/esm2015/lib/services/authenticator.service.js +25 -23
  5. package/fesm2015/aws-amplify-ui-angular.js +24 -22
  6. package/fesm2015/aws-amplify-ui-angular.js.map +1 -1
  7. package/lib/common/types/auth-types.d.ts +2 -2
  8. package/lib/components/authenticator/components/authenticator/authenticator.component.d.ts +1 -23
  9. package/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.d.ts +1 -23
  10. package/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.d.ts +1 -23
  11. package/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.d.ts +1 -23
  12. package/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +1 -23
  13. package/lib/components/authenticator/components/force-new-password/force-new-password.component.d.ts +1 -23
  14. package/lib/components/authenticator/components/reset-password/reset-password.component.d.ts +1 -23
  15. package/lib/components/authenticator/components/setup-totp/setup-totp.component.d.ts +1 -23
  16. package/lib/components/authenticator/components/sign-in/sign-in.component.d.ts +1 -23
  17. package/lib/components/authenticator/components/sign-up/sign-up.component.d.ts +1 -23
  18. package/lib/components/authenticator/components/verify-user/verify-user.component.d.ts +1 -23
  19. package/lib/services/authenticator.service.d.ts +1 -25
  20. package/package.json +2 -2
@@ -417,10 +417,13 @@
417
417
  var machine = ui.createAuthenticatorMachine();
418
418
  var authService = xstate.interpret(machine).start();
419
419
  this._machineSubscription = authService.subscribe(function (state) {
420
- _this._authState = state;
421
- _this._facade = ui.getServiceContextFacade(state);
420
+ var newState = state;
421
+ _this._authState = newState;
422
+ _this._facade = ui.getServiceFacade({
423
+ send: authService.send,
424
+ state: newState,
425
+ });
422
426
  });
423
- this._sendEventAliases = ui.getSendEventAliases(authService.send);
424
427
  this._authService = authService;
425
428
  }
426
429
  AuthenticatorService.prototype.ngOnDestroy = function () {
@@ -499,42 +502,42 @@
499
502
  * Service facades
500
503
  */
501
504
  get: function () {
502
- return this._sendEventAliases.initializeMachine;
505
+ return this._facade.initializeMachine;
503
506
  },
504
507
  enumerable: false,
505
508
  configurable: true
506
509
  });
507
510
  Object.defineProperty(AuthenticatorService.prototype, "updateForm", {
508
511
  get: function () {
509
- return this._sendEventAliases.updateForm;
512
+ return this._facade.updateForm;
510
513
  },
511
514
  enumerable: false,
512
515
  configurable: true
513
516
  });
514
517
  Object.defineProperty(AuthenticatorService.prototype, "updateBlur", {
515
518
  get: function () {
516
- return this._sendEventAliases.updateBlur;
519
+ return this._facade.updateBlur;
517
520
  },
518
521
  enumerable: false,
519
522
  configurable: true
520
523
  });
521
524
  Object.defineProperty(AuthenticatorService.prototype, "resendCode", {
522
525
  get: function () {
523
- return this._sendEventAliases.resendCode;
526
+ return this._facade.resendCode;
524
527
  },
525
528
  enumerable: false,
526
529
  configurable: true
527
530
  });
528
531
  Object.defineProperty(AuthenticatorService.prototype, "signOut", {
529
532
  get: function () {
530
- return this._sendEventAliases.signOut;
533
+ return this._facade.signOut;
531
534
  },
532
535
  enumerable: false,
533
536
  configurable: true
534
537
  });
535
538
  Object.defineProperty(AuthenticatorService.prototype, "submitForm", {
536
539
  get: function () {
537
- return this._sendEventAliases.submitForm;
540
+ return this._facade.submitForm;
538
541
  },
539
542
  enumerable: false,
540
543
  configurable: true
@@ -544,35 +547,35 @@
544
547
  * Transition facades
545
548
  */
546
549
  get: function () {
547
- return this._sendEventAliases.toFederatedSignIn;
550
+ return this._facade.toFederatedSignIn;
548
551
  },
549
552
  enumerable: false,
550
553
  configurable: true
551
554
  });
552
555
  Object.defineProperty(AuthenticatorService.prototype, "toResetPassword", {
553
556
  get: function () {
554
- return this._sendEventAliases.toResetPassword;
557
+ return this._facade.toResetPassword;
555
558
  },
556
559
  enumerable: false,
557
560
  configurable: true
558
561
  });
559
562
  Object.defineProperty(AuthenticatorService.prototype, "toSignIn", {
560
563
  get: function () {
561
- return this._sendEventAliases.toSignIn;
564
+ return this._facade.toSignIn;
562
565
  },
563
566
  enumerable: false,
564
567
  configurable: true
565
568
  });
566
569
  Object.defineProperty(AuthenticatorService.prototype, "toSignUp", {
567
570
  get: function () {
568
- return this._sendEventAliases.toSignUp;
571
+ return this._facade.toSignUp;
569
572
  },
570
573
  enumerable: false,
571
574
  configurable: true
572
575
  });
573
576
  Object.defineProperty(AuthenticatorService.prototype, "skipVerification", {
574
577
  get: function () {
575
- return this._sendEventAliases.skipVerification;
578
+ return this._facade.skipVerification;
576
579
  },
577
580
  enumerable: false,
578
581
  configurable: true
@@ -607,20 +610,20 @@
607
610
  Object.defineProperty(AuthenticatorService.prototype, "slotContext", {
608
611
  /** @deprecated For internal use only */
609
612
  get: function () {
610
- var slotContext = Object.assign(Object.assign({}, this._facade), this._sendEventAliases);
611
- return Object.assign(Object.assign({}, slotContext), { $implicit: Object.assign({}, slotContext) });
613
+ return Object.assign(Object.assign({}, this._facade), { $implicit: this._facade });
612
614
  },
613
615
  enumerable: false,
614
616
  configurable: true
615
617
  });
616
- /** @deprecated For internal use only */
617
618
  AuthenticatorService.prototype.subscribe = function (callback) {
618
- if (this._authService) {
619
- return this._authService.subscribe(callback);
620
- }
621
- else {
619
+ var _this = this;
620
+ if (!this._authService) {
622
621
  logger$1.error('Subscription attempted before machine was created. This is likely a bug on the library, please consider filing a bug.');
623
622
  }
623
+ var subscription = this._authService.subscribe(function () {
624
+ callback(_this._facade);
625
+ });
626
+ return subscription;
624
627
  };
625
628
  /** @deprecated For internal use only */
626
629
  AuthenticatorService.prototype.send = function (event) {