@idea-ionic/auth 5.29.4 → 6.0.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.
- package/environment.d.ts +3 -0
- package/esm2020/environment.mjs +25 -0
- package/esm2020/idea-ionic-auth.mjs +5 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/esm2020/src/auth.module.mjs +70 -0
- package/esm2020/src/auth.service.mjs +317 -0
- package/esm2020/src/confirmPassword.page.mjs +59 -0
- package/esm2020/src/forgotPassword.page.mjs +48 -0
- package/esm2020/src/newPassword.page.mjs +52 -0
- package/esm2020/src/resendLink.page.mjs +52 -0
- package/esm2020/src/signIn.page.mjs +91 -0
- package/esm2020/src/signUp.page.mjs +79 -0
- package/fesm2015/idea-ionic-auth.mjs +741 -0
- package/fesm2015/idea-ionic-auth.mjs.map +1 -0
- package/fesm2020/idea-ionic-auth.mjs +726 -0
- package/fesm2020/idea-ionic-auth.mjs.map +1 -0
- package/idea-ionic-auth.d.ts +4 -6
- package/package.json +29 -17
- package/src/auth.module.d.ts +15 -0
- package/src/auth.service.d.ts +67 -3
- package/src/confirmPassword.page.d.ts +24 -0
- package/src/forgotPassword.page.d.ts +15 -0
- package/src/newPassword.page.d.ts +23 -1
- package/src/resendLink.page.d.ts +15 -0
- package/src/signIn.page.d.ts +45 -0
- package/src/signUp.page.d.ts +26 -1
- package/bundles/idea-ionic-auth.umd.js +0 -1009
- package/bundles/idea-ionic-auth.umd.js.map +0 -1
- package/bundles/idea-ionic-auth.umd.min.js +0 -16
- package/bundles/idea-ionic-auth.umd.min.js.map +0 -1
- package/esm2015/environment.js +0 -22
- package/esm2015/environment.ngsummary.json +0 -1
- package/esm2015/idea-ionic-auth.js +0 -8
- package/esm2015/idea-ionic-auth.ngsummary.json +0 -1
- package/esm2015/node_modules/@angular/common/common.ngfactory.js +0 -5
- package/esm2015/node_modules/@angular/common/common.ngsummary.json +0 -1
- package/esm2015/node_modules/@angular/common/http/http.ngsummary.json +0 -1
- package/esm2015/node_modules/@angular/core/core.ngfactory.js +0 -4
- package/esm2015/node_modules/@angular/core/core.ngsummary.json +0 -1
- package/esm2015/node_modules/@angular/forms/forms.ngfactory.js +0 -9
- package/esm2015/node_modules/@angular/forms/forms.ngsummary.json +0 -1
- package/esm2015/node_modules/@angular/router/router.ngfactory.js +0 -12
- package/esm2015/node_modules/@angular/router/router.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/core-plugin-definitions.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/definitions.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/global.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/index.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/accessibility.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/app.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/browser.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/camera.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/clipboard.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/device.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/filesystem.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/geolocation.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/index.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/local-notifications.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/modals.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/motion.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/network.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/permissions.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/share.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/splash-screen.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/storage.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web/toast.ngsummary.json +0 -1
- package/esm2015/node_modules/@capacitor/core/dist/esm/web-plugins.ngsummary.json +0 -1
- package/esm2015/node_modules/@idea-ionic/common/idea-ionic-common.ngfactory.js +0 -1546
- package/esm2015/node_modules/@idea-ionic/common/idea-ionic-common.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/angular/ionic-angular.ngfactory.js +0 -524
- package/esm2015/node_modules/@ionic/angular/ionic-angular.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/angular/node_modules/tslib/tslib.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/action-sheet/action-sheet-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/alert/alert-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/checkbox/checkbox-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/content/content-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/datetime/datetime-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/input/input-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/loading/loading-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/menu/menu-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/modal/modal-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/nav/constants.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/nav/nav-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/nav/view-controller.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/picker/picker-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/popover/popover-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/radio-group/radio-group-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/range/range-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/refresher/refresher-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/reorder-group/reorder-group-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/route/route-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/router/utils/interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/searchbar/searchbar-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/segment/segment-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/select/select-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/select-popover/select-popover-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/spinner/spinner-configs.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/spinner/spinner-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/tab-bar/tab-bar-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/textarea/textarea-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/toast/toast-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/toggle/toggle-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components/virtual-scroll/virtual-scroll-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/components.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/global/config.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/index.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/stencil-public-runtime.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/animation/animation-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/animation/animation.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/animation/cubic-bezier.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/config.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/gesture/gesture-controller.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/gesture/index.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/menu-controller/index.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/overlays-interface.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/overlays.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/platform.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/sanitization/index.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/transition/index.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/transition/ios.transition.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/core/dist/types/utils/transition/md.transition.ngsummary.json +0 -1
- package/esm2015/node_modules/@ionic/storage/dist/esm/index.ngsummary.json +0 -1
- package/esm2015/node_modules/amazon-cognito-identity-js/index.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/index.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/APIRequestLog.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/RCAttachedResource.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/RCConfiguredFolder.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/RCFolder.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/RCResource.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/address.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/amazonTranslateLanguages.enum.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/announcement.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/appointment.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/attachment.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/booleanChoices.enum.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/cacheable.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/cacheableResource.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/calendar.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/check.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/clientInfo.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/cognitoUser.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/contactRequest.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/contacts.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/countries.enum.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/customBlockMeta.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/customFieldMeta.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/customFieldTypes.enum.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/customSectionMeta.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/delta.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/emailChangeRequest.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/emailData.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/epoch.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/errorReport.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/errorWhitelisted.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/excelRow.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/invitation.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/ionicons.enum.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/label.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/labelVariable.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/languages.enum.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/languages.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/limitCounter.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/markdown.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/membership.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/notification.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/pdfTemplate.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/projectPlan.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/projectSubscription.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/pushNotificationsDevice.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/pushNotificationsPlatforms.enum.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/resource.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/sentiment.enum.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/signature.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/signedURL.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/stringVariable.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/suggestion.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/team.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/teamModules.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/timeInterval.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/user.model.ngsummary.json +0 -1
- package/esm2015/node_modules/idea-toolbox/dist/src/utils.ngsummary.json +0 -1
- package/esm2015/node_modules/ionicons/dist/types/components/icon/icon.ngsummary.json +0 -1
- package/esm2015/node_modules/ionicons/dist/types/components/icon/utils.ngsummary.json +0 -1
- package/esm2015/node_modules/ionicons/dist/types/components.ngsummary.json +0 -1
- package/esm2015/node_modules/ionicons/dist/types/index.ngsummary.json +0 -1
- package/esm2015/node_modules/ionicons/dist/types/stencil-public-runtime.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/index.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/AsyncSubject.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/BehaviorSubject.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/InnerSubscriber.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/Notification.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/Observable.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/Operator.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/OuterSubscriber.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/ReplaySubject.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/Scheduler.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/Subject.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/Subscriber.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/Subscription.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/config.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/ConnectableObservable.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/bindCallback.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/bindNodeCallback.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/combineLatest.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/concat.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/defer.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/empty.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/forkJoin.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/from.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/fromEvent.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/fromEventPattern.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/generate.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/iif.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/interval.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/merge.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/never.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/of.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/onErrorResumeNext.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/pairs.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/partition.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/race.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/range.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/throwError.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/timer.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/using.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/observable/zip.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/operators/groupBy.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduled/scheduled.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/Action.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/AnimationFrameScheduler.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/AsapScheduler.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/AsyncAction.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/AsyncScheduler.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/QueueScheduler.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/VirtualTimeScheduler.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/animationFrame.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/asap.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/async.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/scheduler/queue.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/symbol/observable.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/types.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/util/ArgumentOutOfRangeError.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/util/EmptyError.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/util/ObjectUnsubscribedError.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/util/TimeoutError.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/util/UnsubscriptionError.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/util/identity.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/util/isObservable.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/util/noop.ngsummary.json +0 -1
- package/esm2015/node_modules/rxjs/internal/util/pipe.ngsummary.json +0 -1
- package/esm2015/node_modules/signature_pad/dist/types/point.ngsummary.json +0 -1
- package/esm2015/node_modules/signature_pad/dist/types/signature_pad.ngsummary.json +0 -1
- package/esm2015/node_modules/tslib/tslib.ngsummary.json +0 -1
- package/esm2015/public-api.ngsummary.json +0 -1
- package/esm2015/src/auth.module.js +0 -42
- package/esm2015/src/auth.module.ngfactory.js +0 -24
- package/esm2015/src/auth.module.ngsummary.json +0 -1
- package/esm2015/src/auth.scss.shim.ngstyle.js +0 -3
- package/esm2015/src/auth.service.js +0 -214
- package/esm2015/src/auth.service.ngsummary.json +0 -1
- package/esm2015/src/confirmPassword.page.js +0 -59
- package/esm2015/src/confirmPassword.page.ngfactory.js +0 -70
- package/esm2015/src/confirmPassword.page.ngsummary.json +0 -1
- package/esm2015/src/forgotPassword.page.js +0 -48
- package/esm2015/src/forgotPassword.page.ngfactory.js +0 -43
- package/esm2015/src/forgotPassword.page.ngsummary.json +0 -1
- package/esm2015/src/newPassword.page.js +0 -54
- package/esm2015/src/newPassword.page.ngfactory.js +0 -42
- package/esm2015/src/newPassword.page.ngsummary.json +0 -1
- package/esm2015/src/resendLink.page.js +0 -54
- package/esm2015/src/resendLink.page.ngfactory.js +0 -42
- package/esm2015/src/resendLink.page.ngsummary.json +0 -1
- package/esm2015/src/signIn.page.js +0 -84
- package/esm2015/src/signIn.page.ngfactory.js +0 -82
- package/esm2015/src/signIn.page.ngsummary.json +0 -1
- package/esm2015/src/signUp.page.js +0 -74
- package/esm2015/src/signUp.page.ngfactory.js +0 -70
- package/esm2015/src/signUp.page.ngsummary.json +0 -1
- package/fesm2015/idea-ionic-auth.js +0 -592
- package/fesm2015/idea-ionic-auth.js.map +0 -1
- package/idea-ionic-auth.metadata.json +0 -1
- package/src/auth.module.ngfactory.d.ts +0 -3
- package/src/auth.scss.shim.ngstyle.d.ts +0 -1
- package/src/confirmPassword.page.ngfactory.d.ts +0 -1
- package/src/forgotPassword.page.ngfactory.d.ts +0 -1
- package/src/newPassword.page.ngfactory.d.ts +0 -1
- package/src/resendLink.page.ngfactory.d.ts +0 -1
- package/src/signIn.page.ngfactory.d.ts +0 -1
- package/src/signUp.page.ngfactory.d.ts +0 -1
|
@@ -0,0 +1,726 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i5 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i4 from '@angular/forms';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import * as i1 from '@ionic/angular';
|
|
8
|
+
import { IonicModule } from '@ionic/angular';
|
|
9
|
+
import * as i2$1 from '@angular/router';
|
|
10
|
+
import { RouterModule } from '@angular/router';
|
|
11
|
+
import * as i2 from '@idea-ionic/common';
|
|
12
|
+
import { IDEATranslationsModule } from '@idea-ionic/common';
|
|
13
|
+
import { Plugins } from '@capacitor/core';
|
|
14
|
+
import { environment } from '@env';
|
|
15
|
+
import { CognitoUserPool, AuthenticationDetails, CognitoUser, CognitoUserAttribute, CognitoRefreshToken } from 'amazon-cognito-identity-js';
|
|
16
|
+
import { isEmpty } from 'idea-toolbox';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The name of the Cognito's user attribute which contains the key of the last device to login in this project.
|
|
20
|
+
*/
|
|
21
|
+
const DEVICE_KEY_ATTRIBUTE = 'custom:'.concat(environment.idea.project);
|
|
22
|
+
/**
|
|
23
|
+
* Cognito wrapper to manage the authentication flow.
|
|
24
|
+
*
|
|
25
|
+
* Note: in IDEA's Cognito users pools, the email is an alias of the username.
|
|
26
|
+
*/
|
|
27
|
+
class IDEAAuthService {
|
|
28
|
+
constructor(storage) {
|
|
29
|
+
this.storage = storage;
|
|
30
|
+
this.userPool = new CognitoUserPool({
|
|
31
|
+
UserPoolId: environment.aws.cognito.userPoolId,
|
|
32
|
+
ClientId: environment.aws.cognito.userPoolClientId
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Prepare the necessary structure to get authorized in Cognito.
|
|
37
|
+
*/
|
|
38
|
+
prepareAuthDetails(username, pwd) {
|
|
39
|
+
return new AuthenticationDetails({ Username: username, Password: pwd });
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Prepare the necessary structure to identify a Cognito user.
|
|
43
|
+
*/
|
|
44
|
+
prepareCognitoUser(username) {
|
|
45
|
+
return new CognitoUser({ Username: username, Pool: this.userPool });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Prepare a user attribute (they are all strings) in Cognito's format.
|
|
49
|
+
*/
|
|
50
|
+
prepareUserAttribute(name, value) {
|
|
51
|
+
return new CognitoUserAttribute({ Name: name, Value: value });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Perform a login through username and password.
|
|
55
|
+
*/
|
|
56
|
+
login(username, password) {
|
|
57
|
+
return new Promise((resolve, reject) => {
|
|
58
|
+
// get a cognito user and try to authenticate
|
|
59
|
+
this.prepareCognitoUser(username).authenticateUser(this.prepareAuthDetails(username, password), {
|
|
60
|
+
onSuccess: () => resolve(false),
|
|
61
|
+
onFailure: (err) => reject(err),
|
|
62
|
+
newPasswordRequired: () => resolve(true)
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Complete a complete new password flow in the authentication.
|
|
68
|
+
*/
|
|
69
|
+
confirmNewPassword(username, tempPassword, newPassword) {
|
|
70
|
+
return new Promise((resolve, reject) => {
|
|
71
|
+
// login with the old password
|
|
72
|
+
const user = this.prepareCognitoUser(username);
|
|
73
|
+
user.authenticateUser(this.prepareAuthDetails(username, tempPassword), {
|
|
74
|
+
onSuccess: () => resolve(),
|
|
75
|
+
onFailure: (err) => reject(err),
|
|
76
|
+
newPasswordRequired: () =>
|
|
77
|
+
// complete the new password challenge
|
|
78
|
+
user.completeNewPasswordChallenge(newPassword, {}, {
|
|
79
|
+
onSuccess: () => resolve(),
|
|
80
|
+
onFailure: (err) => reject(err)
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Register a new user a set its default attributes.
|
|
87
|
+
*/
|
|
88
|
+
register(username, password, attributes) {
|
|
89
|
+
attributes = attributes || {};
|
|
90
|
+
return new Promise((resolve, reject) => {
|
|
91
|
+
// add attributes like the email address and the fullname
|
|
92
|
+
const attrs = [];
|
|
93
|
+
for (const prop in attributes)
|
|
94
|
+
if (attributes[prop])
|
|
95
|
+
attrs.push(this.prepareUserAttribute(prop, attributes[prop]));
|
|
96
|
+
// add the email, which is equal to the username for most of our Pools
|
|
97
|
+
if (!attributes.email)
|
|
98
|
+
attrs.push(this.prepareUserAttribute('email', username));
|
|
99
|
+
// register the new user to the pool
|
|
100
|
+
this.userPool.signUp(username, password, attrs, null, (err, res) => err ? reject(err) : resolve(res.user));
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Confirm a new registration through the confirmation code sent by Cognito.
|
|
105
|
+
*/
|
|
106
|
+
confirmRegistration(username, code) {
|
|
107
|
+
return new Promise((resolve, reject) => {
|
|
108
|
+
this.prepareCognitoUser(username).confirmRegistration(code, true, (err) => err ? reject(err) : resolve());
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Send again a confirmation code for a new registration.
|
|
113
|
+
*/
|
|
114
|
+
resendConfirmationCode(username) {
|
|
115
|
+
return new Promise((resolve, reject) => {
|
|
116
|
+
this.prepareCognitoUser(username).resendConfirmationCode((err) => (err ? reject(err) : resolve()));
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Logout the currently signed-in user.
|
|
121
|
+
*/
|
|
122
|
+
logout(options) {
|
|
123
|
+
options = Object.assign({ global: false }, options);
|
|
124
|
+
return new Promise((resolve, reject) => {
|
|
125
|
+
// remove the refresh token previosly saved
|
|
126
|
+
this.storage.remove('AuthRefreshToken').then(() =>
|
|
127
|
+
// remove the optional auth details
|
|
128
|
+
this.storage.remove('AuthUserDetails').then(() => {
|
|
129
|
+
// get the user and the session
|
|
130
|
+
const user = this.userPool.getCurrentUser();
|
|
131
|
+
user.getSession(async (err) => {
|
|
132
|
+
// if the session is active, run the online sign-out; otherwise, only the local data has been deleted
|
|
133
|
+
if (err)
|
|
134
|
+
return resolve();
|
|
135
|
+
// if a reference to the device was saved, forget it
|
|
136
|
+
if (environment.idea.auth.singleSimultaneousSession)
|
|
137
|
+
await this.setCurrentDeviceForProject(null);
|
|
138
|
+
// sign-out from the pool (terminate the current session or all the sessions)
|
|
139
|
+
if (options.global)
|
|
140
|
+
user.globalSignOut({ onSuccess: () => resolve(), onFailure: err => reject(err) });
|
|
141
|
+
else {
|
|
142
|
+
user.signOut();
|
|
143
|
+
resolve();
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}));
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Send a password reset request.
|
|
151
|
+
*/
|
|
152
|
+
forgotPassword(username) {
|
|
153
|
+
return new Promise((resolve, reject) => {
|
|
154
|
+
this.prepareCognitoUser(username).forgotPassword({
|
|
155
|
+
onSuccess: () => resolve(),
|
|
156
|
+
onFailure: (err) => reject(err)
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Confirm a new password after a password reset request.
|
|
162
|
+
*/
|
|
163
|
+
confirmPassword(username, code, newPwd) {
|
|
164
|
+
return new Promise((resolve, reject) => {
|
|
165
|
+
// get the user and confirm a new password
|
|
166
|
+
this.prepareCognitoUser(username).confirmPassword(code, newPwd, {
|
|
167
|
+
onSuccess: () => resolve(),
|
|
168
|
+
onFailure: (err) => reject(err)
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Check if a user is currently authenticated.
|
|
174
|
+
* @param offlineAllowed if set and if offline, skip authentication and retrieve data locally
|
|
175
|
+
* @param getFreshIdTokenOnExp cb function to execute when the idToken is refreshed
|
|
176
|
+
*/
|
|
177
|
+
isAuthenticated(offlineAllowed, getFreshIdTokenOnExp) {
|
|
178
|
+
return new Promise((resolve, reject) => {
|
|
179
|
+
if (offlineAllowed && !navigator.onLine) {
|
|
180
|
+
this.storage.get('AuthUserDetails').then(userDetails => resolve({ idToken: null, userDetails }));
|
|
181
|
+
// re-execute the method when back online, so that you can retrieve a token to make requests
|
|
182
|
+
window.addEventListener('online', () => this.isAuthenticated(true, getFreshIdTokenOnExp)
|
|
183
|
+
// set the new token as if it was refreshed
|
|
184
|
+
.then(result => getFreshIdTokenOnExp(result.idToken)));
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
const user = this.userPool.getCurrentUser();
|
|
188
|
+
if (!user)
|
|
189
|
+
return reject();
|
|
190
|
+
user.getSession((err, session) => {
|
|
191
|
+
if (err)
|
|
192
|
+
return reject(err);
|
|
193
|
+
// get user attributes
|
|
194
|
+
user.getUserAttributes((e, attributes) => {
|
|
195
|
+
if (e)
|
|
196
|
+
return reject(e);
|
|
197
|
+
// remap user attributes
|
|
198
|
+
const userDetails = {};
|
|
199
|
+
attributes.forEach((a) => (userDetails[a.getName()] = a.getValue()));
|
|
200
|
+
// add the user's groups to the attributes
|
|
201
|
+
const sessionInfo = session.getAccessToken().decodePayload();
|
|
202
|
+
const groups = sessionInfo['cognito:groups'] || [];
|
|
203
|
+
userDetails['groups'] = groups;
|
|
204
|
+
// run some checks considering the user's groups and devices (based on the project's configuration)
|
|
205
|
+
this.runPostAuthChecks(userDetails, err => {
|
|
206
|
+
// in case some check failed, reject the authorisation flow
|
|
207
|
+
if (err)
|
|
208
|
+
return reject(err);
|
|
209
|
+
// (async) save the refresh token so it can be accessed by other procedures
|
|
210
|
+
this.storage.set('AuthRefreshToken', session.getRefreshToken().getToken());
|
|
211
|
+
// set a timer to manage the autorefresh of the idToken (through the refreshToken)
|
|
212
|
+
setTimeout(() => this.refreshSession(user, session.getRefreshToken().getToken(), getFreshIdTokenOnExp), 15 * 60 * 1000); // every 15 minutes
|
|
213
|
+
// (async) if offlineAllowed, save data locally, to use it next time we'll be offline
|
|
214
|
+
if (offlineAllowed)
|
|
215
|
+
this.storage.set('AuthUserDetails', userDetails);
|
|
216
|
+
// return the idToken (to use with API)
|
|
217
|
+
resolve({ idToken: session.getIdToken().getJwtToken(), userDetails });
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Helper to refresh the session every N minutes.
|
|
226
|
+
*/
|
|
227
|
+
refreshSession(user, refreshToken, callback) {
|
|
228
|
+
user.refreshSession(new CognitoRefreshToken({ RefreshToken: refreshToken }), (err, session) => {
|
|
229
|
+
if (err) {
|
|
230
|
+
// try again in 1 minute
|
|
231
|
+
setTimeout(() => this.refreshSession(user, refreshToken, callback), 1 * 60 * 1000);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
// (async) save the refresh token so it can be accessed by other procedures
|
|
235
|
+
this.storage.set('AuthRefreshToken', session.getRefreshToken().getToken());
|
|
236
|
+
// repeat every 15 minutes
|
|
237
|
+
setTimeout(() => this.refreshSession(user, session.getRefreshToken().getToken(), callback), 15 * 60 * 1000);
|
|
238
|
+
// run the callback action, if set
|
|
239
|
+
if (callback)
|
|
240
|
+
callback(session.getIdToken().getJwtToken());
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Run some post-auth checks, based on the users groups and on the app's configuration:
|
|
246
|
+
* - users in the Cognito's "admins" grup skip all the following rules.
|
|
247
|
+
* - users in the Cognito's "robots" group can't sign-into front-ends (they serve only back-end purposes).
|
|
248
|
+
* - if `env.idea.auth.singleSimultaneousSession` is on, make sure there is only one active session per user.
|
|
249
|
+
*/
|
|
250
|
+
runPostAuthChecks(userDetails, callback) {
|
|
251
|
+
const groups = userDetails['groups'];
|
|
252
|
+
// skip checks if the user is in the "admins" group
|
|
253
|
+
const isAdmin = groups.some(x => x === 'admins');
|
|
254
|
+
if (isAdmin)
|
|
255
|
+
return callback();
|
|
256
|
+
// users in the "robots" group can't sign-into front-ends (they serve only back-end purposes)
|
|
257
|
+
const isRobot = groups.some(x => x === 'robots');
|
|
258
|
+
if (isRobot)
|
|
259
|
+
return callback(new Error('ROBOT_USER'));
|
|
260
|
+
// in case the project limits each account to only one simultaneous session, run a check
|
|
261
|
+
if (environment.idea.auth.singleSimultaneousSession)
|
|
262
|
+
return this.checkForSimultaneousSessions(userDetails, callback);
|
|
263
|
+
// otherwise, we're done
|
|
264
|
+
callback();
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Check whether the user signed-into multiple devices.
|
|
268
|
+
*/
|
|
269
|
+
async checkForSimultaneousSessions(userDetails, callback) {
|
|
270
|
+
// get or create a key for the current device (~random)
|
|
271
|
+
let currentDeviceKey = await this.storage.get('AuthDeviceKey');
|
|
272
|
+
if (!currentDeviceKey) {
|
|
273
|
+
const randomKey = Math.random().toString(36).substring(10);
|
|
274
|
+
currentDeviceKey = randomKey.concat(String(Date.now()));
|
|
275
|
+
await this.storage.set('AuthDeviceKey', currentDeviceKey);
|
|
276
|
+
}
|
|
277
|
+
// check whether the last device to sign-into this project (if any) is the current one
|
|
278
|
+
const lastDeviceToSignIntoThisProject = userDetails[DEVICE_KEY_ATTRIBUTE];
|
|
279
|
+
// if it's the first user's device to sign-in, save the reference in Cognito and resolve
|
|
280
|
+
if (!lastDeviceToSignIntoThisProject) {
|
|
281
|
+
this.setCurrentDeviceForProject(currentDeviceKey)
|
|
282
|
+
.then(() => callback())
|
|
283
|
+
.catch(() => callback(new Error('CANT_SET_DEVICE')));
|
|
284
|
+
// if the device didn't change, resolve
|
|
285
|
+
}
|
|
286
|
+
else if (lastDeviceToSignIntoThisProject === currentDeviceKey)
|
|
287
|
+
callback();
|
|
288
|
+
// othwerwise, report there is more than one simultaneous session
|
|
289
|
+
else
|
|
290
|
+
callback(new Error('SIMULTANEOUS_SESSION'));
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Set (or reset) the current user's device (by key) in the current project (stored in Cognito).
|
|
294
|
+
*/
|
|
295
|
+
setCurrentDeviceForProject(deviceKey) {
|
|
296
|
+
const attributes = {};
|
|
297
|
+
// note: an empty string will remove the attribute from Cognito
|
|
298
|
+
attributes[DEVICE_KEY_ATTRIBUTE] = deviceKey || '';
|
|
299
|
+
return this.updateUserAttributes(attributes);
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Update the currently logged in user's attributes.
|
|
303
|
+
*/
|
|
304
|
+
updateUserAttributes(attributes) {
|
|
305
|
+
return new Promise((resolve, reject) => {
|
|
306
|
+
// prepare the attributes we want to change
|
|
307
|
+
const attrs = new Array();
|
|
308
|
+
for (const prop in attributes)
|
|
309
|
+
if (attributes[prop] !== undefined)
|
|
310
|
+
attrs.push(this.prepareUserAttribute(prop, attributes[prop]));
|
|
311
|
+
const user = this.userPool.getCurrentUser();
|
|
312
|
+
if (!user)
|
|
313
|
+
return reject();
|
|
314
|
+
// we need to get the session before to make changes
|
|
315
|
+
user.getSession((err) => {
|
|
316
|
+
if (err)
|
|
317
|
+
reject(err);
|
|
318
|
+
else
|
|
319
|
+
user.updateAttributes(attrs, (e) => (e ? reject(e) : resolve()));
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
IDEAAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAAuthService, deps: [{ token: i2.IDEAStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
325
|
+
IDEAAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAAuthService });
|
|
326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAAuthService, decorators: [{
|
|
327
|
+
type: Injectable
|
|
328
|
+
}], ctorParameters: function () { return [{ type: i2.IDEAStorageService }]; } });
|
|
329
|
+
|
|
330
|
+
const { Browser } = Plugins;
|
|
331
|
+
class IDEASignInPage {
|
|
332
|
+
constructor(navCtrl, tc, message, loading, auth, t) {
|
|
333
|
+
this.navCtrl = navCtrl;
|
|
334
|
+
this.tc = tc;
|
|
335
|
+
this.message = message;
|
|
336
|
+
this.loading = loading;
|
|
337
|
+
this.auth = auth;
|
|
338
|
+
this.t = t;
|
|
339
|
+
this.title = environment.idea.app.title;
|
|
340
|
+
this.registrationPossible = environment.idea.auth.registrationIsPossible;
|
|
341
|
+
this.hasIntroPage = environment.idea.app.hasIntroPage;
|
|
342
|
+
this.website = environment.idea.website;
|
|
343
|
+
this.agreementsCheck = true;
|
|
344
|
+
}
|
|
345
|
+
ionViewDidEnter() {
|
|
346
|
+
// manage the scenario in which we just created a new account (show a explanatory message: email must be confirmed)
|
|
347
|
+
if (this.tc.get('newAccountRegistered')) {
|
|
348
|
+
this.newAccountRegistered = true;
|
|
349
|
+
this.email = this.tc.get('newAccountRegistered', true);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Sign-in with the auth details provided.
|
|
354
|
+
*/
|
|
355
|
+
async login() {
|
|
356
|
+
if (!this.agreementsCheck)
|
|
357
|
+
return;
|
|
358
|
+
this.errorMsg = null;
|
|
359
|
+
await this.loading.show();
|
|
360
|
+
this.auth
|
|
361
|
+
.login(this.email, this.password)
|
|
362
|
+
.then(needNewPassword => {
|
|
363
|
+
if (needNewPassword) {
|
|
364
|
+
this.tc.set('email', this.email);
|
|
365
|
+
this.tc.set('password', this.password);
|
|
366
|
+
this.navCtrl.navigateForward(['auth/new-password']);
|
|
367
|
+
}
|
|
368
|
+
else
|
|
369
|
+
window.location.assign(''); // hard reload
|
|
370
|
+
})
|
|
371
|
+
.catch(err => {
|
|
372
|
+
if (err.name === 'UserNotConfirmedException')
|
|
373
|
+
this.errorMsg = this.t._('IDEA_AUTH.CONFIRM_YOUR_EMAIL_TO_LOGIN');
|
|
374
|
+
this.message.error('IDEA_AUTH.AUTHENTICATION_FAILED');
|
|
375
|
+
})
|
|
376
|
+
.finally(() => this.loading.hide());
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Go to the homepage.
|
|
380
|
+
*/
|
|
381
|
+
goToIntro() {
|
|
382
|
+
this.navCtrl.navigateBack(['intro']);
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Go to the forgot password page.
|
|
386
|
+
*/
|
|
387
|
+
goToForgotPassword() {
|
|
388
|
+
this.navCtrl.navigateForward(['auth/forgot-password']);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Go to registration page.
|
|
392
|
+
*/
|
|
393
|
+
goToRegistration() {
|
|
394
|
+
this.tc.set('email', this.email);
|
|
395
|
+
this.tc.set('password', this.password);
|
|
396
|
+
this.navCtrl.navigateForward(['auth', 'sign-up']);
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Open a URL in the browser.
|
|
400
|
+
*/
|
|
401
|
+
openLink(url) {
|
|
402
|
+
Browser.open({ url });
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
IDEASignInPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEASignInPage, deps: [{ token: i1.NavController }, { token: i2.IDEATinCanService }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
406
|
+
IDEASignInPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: IDEASignInPage, selector: "idea-sign-in", ngImport: i0, template: "<ion-content>\n <ion-card color=\"warning\" *ngIf=\"newAccountRegistered\">\n <ion-card-content>{{ 'IDEA_AUTH.CONFIRM_YOUR_EMAIL_TO_LOGIN' | translate }}</ion-card-content>\n </ion-card>\n <form class=\"flexBox\">\n <div>\n <ion-card class=\"authCard\">\n <ion-img\n [title]=\"t._('IDEA_AUTH.SERVICE_LOGO')\"\n [src]=\"tc.get('darkMode') ? 'assets/icons/icon-auth-alt.svg' : 'assets/icons/icon-auth.svg'\"\n ></ion-img>\n <ion-card-header>\n <ion-card-title color=\"primary\" *ngIf=\"title\">{{ title }}</ion-card-title>\n <ion-card-subtitle *ngIf=\"t._('IDEA_VARIABLES.TAGLINE')\">\n {{ 'IDEA_VARIABLES.TAGLINE' | translate }}\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n id=\"current-password\"\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"current-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.PASSWORD_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"\n !registrationPossible &&\n (t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || t._('IDEA_VARIABLES.PRIVACY_POLICY_URL'))\n \"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_LOGIN' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"t._('IDEA_AUTH.TERMS_AND_CONDITIONS_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n t._('IDEA_VARIABLES.PRIVACY_POLICY_URL') && t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"t._('IDEA_AUTH.PRIVACY_POLICY_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"t._('IDEA_AUTH.SIGN_IN_HINT')\"\n (click)=\"login()\"\n >\n {{ 'IDEA_AUTH.SIGN_IN' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n *ngIf=\"registrationPossible\"\n [title]=\"t._('IDEA_AUTH.CREATE_AN_ACCOUNT_HINT')\"\n (click)=\"goToRegistration()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.I_FORGOT_MY_PASSWORD_HINT')\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.I_FORGOT_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n color=\"medium\"\n class=\"smallCaseButton\"\n *ngIf=\"hasIntroPage\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_INTRO_HINT')\"\n (click)=\"goToIntro()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_INTRO' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n <ion-img\n class=\"ideaLogo\"\n *ngIf=\"website\"\n [src]=\"tc.get('darkMode') ? './assets/icons/idea-alt.png' : './assets/icons/idea.png'\"\n [title]=\"t._('IDEA_AUTH.IDEA_TAGLINE')\"\n (click)=\"openLink(website)\"\n ></ion-img>\n </div>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], components: [{ type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { type: i1.IonImg, selector: "ion-img", inputs: ["alt", "src"] }, { type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { type: i1.IonRow, selector: "ion-row" }, { type: i1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { type: i1.IonCheckbox, selector: "ion-checkbox", inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] }, { type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }], pipes: { "translate": i2.IDEATranslatePipe } });
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEASignInPage, decorators: [{
|
|
408
|
+
type: Component,
|
|
409
|
+
args: [{ selector: 'idea-sign-in', template: "<ion-content>\n <ion-card color=\"warning\" *ngIf=\"newAccountRegistered\">\n <ion-card-content>{{ 'IDEA_AUTH.CONFIRM_YOUR_EMAIL_TO_LOGIN' | translate }}</ion-card-content>\n </ion-card>\n <form class=\"flexBox\">\n <div>\n <ion-card class=\"authCard\">\n <ion-img\n [title]=\"t._('IDEA_AUTH.SERVICE_LOGO')\"\n [src]=\"tc.get('darkMode') ? 'assets/icons/icon-auth-alt.svg' : 'assets/icons/icon-auth.svg'\"\n ></ion-img>\n <ion-card-header>\n <ion-card-title color=\"primary\" *ngIf=\"title\">{{ title }}</ion-card-title>\n <ion-card-subtitle *ngIf=\"t._('IDEA_VARIABLES.TAGLINE')\">\n {{ 'IDEA_VARIABLES.TAGLINE' | translate }}\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n id=\"current-password\"\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"current-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.PASSWORD_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"login()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"\n !registrationPossible &&\n (t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || t._('IDEA_VARIABLES.PRIVACY_POLICY_URL'))\n \"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_LOGIN' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"t._('IDEA_AUTH.TERMS_AND_CONDITIONS_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n t._('IDEA_VARIABLES.PRIVACY_POLICY_URL') && t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"t._('IDEA_AUTH.PRIVACY_POLICY_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"t._('IDEA_AUTH.SIGN_IN_HINT')\"\n (click)=\"login()\"\n >\n {{ 'IDEA_AUTH.SIGN_IN' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n *ngIf=\"registrationPossible\"\n [title]=\"t._('IDEA_AUTH.CREATE_AN_ACCOUNT_HINT')\"\n (click)=\"goToRegistration()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.I_FORGOT_MY_PASSWORD_HINT')\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.I_FORGOT_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n color=\"medium\"\n class=\"smallCaseButton\"\n *ngIf=\"hasIntroPage\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_INTRO_HINT')\"\n (click)=\"goToIntro()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_INTRO' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n <ion-img\n class=\"ideaLogo\"\n *ngIf=\"website\"\n [src]=\"tc.get('darkMode') ? './assets/icons/idea-alt.png' : './assets/icons/idea.png'\"\n [title]=\"t._('IDEA_AUTH.IDEA_TAGLINE')\"\n (click)=\"openLink(website)\"\n ></ion-img>\n </div>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
|
|
410
|
+
}], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEATinCanService }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
|
|
411
|
+
|
|
412
|
+
class IDEASignUpPage {
|
|
413
|
+
constructor(navCtrl, tc, message, loading, auth, t) {
|
|
414
|
+
this.navCtrl = navCtrl;
|
|
415
|
+
this.tc = tc;
|
|
416
|
+
this.message = message;
|
|
417
|
+
this.loading = loading;
|
|
418
|
+
this.auth = auth;
|
|
419
|
+
this.t = t;
|
|
420
|
+
this.email = this.tc.get('email', true);
|
|
421
|
+
this.password = this.tc.get('password', true);
|
|
422
|
+
this.agreementsCheck = false;
|
|
423
|
+
}
|
|
424
|
+
ngOnInit() {
|
|
425
|
+
if (!environment.idea.auth.registrationIsPossible)
|
|
426
|
+
return this.goToAuth();
|
|
427
|
+
// if there isn't any agreement to agree to, set the check true
|
|
428
|
+
this.agreementsCheck =
|
|
429
|
+
this.t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || this.t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')
|
|
430
|
+
? this.agreementsCheck
|
|
431
|
+
: true;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Register the new user in cognito (note DynamoDB still need to be managed).
|
|
435
|
+
*/
|
|
436
|
+
async register() {
|
|
437
|
+
this.errorMsg = null;
|
|
438
|
+
// check the fields
|
|
439
|
+
if (isEmpty(this.email, 'email'))
|
|
440
|
+
this.errorMsg = this.t._('IDEA_AUTH.VALID_EMAIL_OBLIGATORY');
|
|
441
|
+
else if (!this.password || this.password.length < 8)
|
|
442
|
+
this.errorMsg = this.t._('IDEA_AUTH.PASSWORD_POLICY_VIOLATION', { n: 8 });
|
|
443
|
+
// output the error, if there was one
|
|
444
|
+
if (this.errorMsg)
|
|
445
|
+
return this.message.error('IDEA_AUTH.REGISTRATION_FAILED');
|
|
446
|
+
// start the registration
|
|
447
|
+
await this.loading.show();
|
|
448
|
+
this.auth
|
|
449
|
+
.register(this.email, this.password)
|
|
450
|
+
.then(() => {
|
|
451
|
+
this.message.success('IDEA_AUTH.REGISTRATION_COMPLETED');
|
|
452
|
+
this.tc.set('newAccountRegistered', this.email);
|
|
453
|
+
this.goToAuth();
|
|
454
|
+
})
|
|
455
|
+
.catch(err => {
|
|
456
|
+
// show the unexpected error on screen (english)
|
|
457
|
+
this.errorMsg = err.message;
|
|
458
|
+
this.message.error('IDEA_AUTH.REGISTRATION_FAILED');
|
|
459
|
+
})
|
|
460
|
+
.finally(() => this.loading.hide());
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Go to the resend link page.
|
|
464
|
+
*/
|
|
465
|
+
goToResendLink() {
|
|
466
|
+
this.navCtrl.navigateForward(['auth/resend-link']);
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Go to auth page.
|
|
470
|
+
*/
|
|
471
|
+
goToAuth() {
|
|
472
|
+
this.navCtrl.navigateBack(['auth']);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
IDEASignUpPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEASignUpPage, deps: [{ token: i1.NavController }, { token: i2.IDEATinCanService }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
476
|
+
IDEASignUpPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: IDEASignUpPage, selector: "idea-sign-up", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.NEW_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.REGISTER_A_NEW_ACCOUNT_TO_THE_SYSTEM' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.REGISTRATION_EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_REGISTRATION' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"t._('IDEA_AUTH.TERMS_AND_CONDITIONS_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n t._('IDEA_VARIABLES.PRIVACY_POLICY_URL') && t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"t._('IDEA_AUTH.PRIVACY_POLICY_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"t._('IDEA_AUTH.CREATE_AN_ACCOUNT_HINT')\"\n (click)=\"register()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK_HINT')\"\n (click)=\"goToResendLink()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], components: [{ type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { type: i1.IonRow, selector: "ion-row" }, { type: i1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { type: i1.IonCheckbox, selector: "ion-checkbox", inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] }, { type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }], pipes: { "translate": i2.IDEATranslatePipe } });
|
|
477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEASignUpPage, decorators: [{
|
|
478
|
+
type: Component,
|
|
479
|
+
args: [{ selector: 'idea-sign-up', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.NEW_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.REGISTER_A_NEW_ACCOUNT_TO_THE_SYSTEM' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.REGISTRATION_EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"password\"\n (keyup.enter)=\"register()\"\n ></ion-input>\n </ion-item>\n <ion-row\n class=\"agreementsAcceptanceRow\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL') || t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n <ion-col>\n <ion-checkbox\n size=\"small\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"agreementsCheck\"\n ></ion-checkbox>\n {{ 'IDEA_AUTH.AGREEMENTS_CHECK_REGISTRATION' | translate }}:\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n [title]=\"t._('IDEA_AUTH.TERMS_AND_CONDITIONS_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\"\n >\n {{ 'IDEA_AUTH.TERMS_AND_CONDITIONS' | translate }}\n </a>\n <ion-text\n *ngIf=\"\n t._('IDEA_VARIABLES.PRIVACY_POLICY_URL') && t._('IDEA_VARIABLES.TERMS_AND_CONDITIONS_URL')\n \"\n >\n &\n </ion-text>\n <a\n ion-text\n color=\"primary\"\n target=\"_blank\"\n *ngIf=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n [title]=\"t._('IDEA_AUTH.PRIVACY_POLICY_HINT')\"\n [href]=\"t._('IDEA_VARIABLES.PRIVACY_POLICY_URL')\"\n >\n {{ 'IDEA_AUTH.PRIVACY_POLICY' | translate }}\n </a>\n </ion-col>\n </ion-row>\n <ion-button\n expand=\"block\"\n [disabled]=\"!agreementsCheck\"\n [title]=\"t._('IDEA_AUTH.CREATE_AN_ACCOUNT_HINT')\"\n (click)=\"register()\"\n >\n {{ 'IDEA_AUTH.CREATE_AN_ACCOUNT' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK_HINT')\"\n (click)=\"goToResendLink()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_CONFIRMATION_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
|
|
480
|
+
}], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEATinCanService }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
|
|
481
|
+
|
|
482
|
+
class IDEANewPasswordPage {
|
|
483
|
+
constructor(navCtrl, tc, message, loading, auth, t) {
|
|
484
|
+
this.navCtrl = navCtrl;
|
|
485
|
+
this.tc = tc;
|
|
486
|
+
this.message = message;
|
|
487
|
+
this.loading = loading;
|
|
488
|
+
this.auth = auth;
|
|
489
|
+
this.t = t;
|
|
490
|
+
}
|
|
491
|
+
ngOnInit() {
|
|
492
|
+
this.email = this.tc.get('email', true);
|
|
493
|
+
this.password = this.tc.get('password', true);
|
|
494
|
+
if (!this.email || !this.password)
|
|
495
|
+
this.goToAuth();
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Confirm a new password (auth flow that follows a registration or a password reset).
|
|
499
|
+
*/
|
|
500
|
+
async confirmNewPassword() {
|
|
501
|
+
this.errorMsg = null;
|
|
502
|
+
await this.loading.show();
|
|
503
|
+
this.auth
|
|
504
|
+
.confirmNewPassword(this.email, this.password, this.newPassword)
|
|
505
|
+
// we are logged in
|
|
506
|
+
.then(() => window.location.assign(''))
|
|
507
|
+
.catch(() => {
|
|
508
|
+
this.errorMsg = this.t._('IDEA_AUTH.PASSWORD_POLICY_VIOLATION', { n: 8 });
|
|
509
|
+
this.message.error(this.errorMsg, true);
|
|
510
|
+
})
|
|
511
|
+
.finally(() => this.loading.hide());
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Go to auth page.
|
|
515
|
+
*/
|
|
516
|
+
goToAuth() {
|
|
517
|
+
this.navCtrl.navigateBack(['auth']);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
IDEANewPasswordPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEANewPasswordPage, deps: [{ token: i1.NavController }, { token: i2.IDEATinCanService }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
521
|
+
IDEANewPasswordPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: IDEANewPasswordPage, selector: "idea-new-password", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.YOU_NEED_TO_CHOOSE_A_NEW_PASSWORD' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmNewPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.CONFIRM_NEW_PASSWORD_HINT')\" (click)=\"confirmNewPassword()\">\n {{ 'IDEA_AUTH.CONFIRM_NEW_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], components: [{ type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i2.IDEATranslatePipe } });
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEANewPasswordPage, decorators: [{
|
|
523
|
+
type: Component,
|
|
524
|
+
args: [{ selector: 'idea-new-password', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHOOSE_A_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.YOU_NEED_TO_CHOOSE_A_NEW_PASSWORD' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmNewPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.CONFIRM_NEW_PASSWORD_HINT')\" (click)=\"confirmNewPassword()\">\n {{ 'IDEA_AUTH.CONFIRM_NEW_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
|
|
525
|
+
}], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEATinCanService }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
|
|
526
|
+
|
|
527
|
+
class IDEAResendLinkPage {
|
|
528
|
+
constructor(navCtrl, message, loading, auth, t) {
|
|
529
|
+
this.navCtrl = navCtrl;
|
|
530
|
+
this.message = message;
|
|
531
|
+
this.loading = loading;
|
|
532
|
+
this.auth = auth;
|
|
533
|
+
this.t = t;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Resend the link to confirm the email address.
|
|
537
|
+
*/
|
|
538
|
+
async resendConfirmationLink() {
|
|
539
|
+
this.errorMsg = null;
|
|
540
|
+
if (!this.email) {
|
|
541
|
+
this.errorMsg = this.t._('IDEA_AUTH.VALID_EMAIL_OBLIGATORY');
|
|
542
|
+
this.message.error('IDEA_AUTH.SENDING_FAILED');
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
await this.loading.show();
|
|
546
|
+
this.auth
|
|
547
|
+
.resendConfirmationCode(this.email)
|
|
548
|
+
.then(() => {
|
|
549
|
+
this.message.success('IDEA_AUTH.CONFIRMATION_LINK_SENT');
|
|
550
|
+
this.goToAuth();
|
|
551
|
+
})
|
|
552
|
+
.catch(() => {
|
|
553
|
+
this.errorMsg = this.t._('IDEA_AUTH.IS_THE_EMAIL_CORRECT');
|
|
554
|
+
this.message.error('IDEA_AUTH.SENDING_FAILED');
|
|
555
|
+
})
|
|
556
|
+
.finally(() => this.loading.hide());
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Go to auth page.
|
|
560
|
+
*/
|
|
561
|
+
goToAuth() {
|
|
562
|
+
this.navCtrl.navigateBack(['auth']);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
IDEAResendLinkPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAResendLinkPage, deps: [{ token: i1.NavController }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
566
|
+
IDEAResendLinkPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: IDEAResendLinkPage, selector: "idea-resend-link", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CONFIRM_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.RESEND_CONFIRMATION_LINK_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"resendConfirmationLink()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.RESEND_LINK_HINT')\" (click)=\"resendConfirmationLink()\">\n {{ 'IDEA_AUTH.RESEND_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], components: [{ type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i2.IDEATranslatePipe } });
|
|
567
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAResendLinkPage, decorators: [{
|
|
568
|
+
type: Component,
|
|
569
|
+
args: [{ selector: 'idea-resend-link', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CONFIRM_ACCOUNT' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.RESEND_CONFIRMATION_LINK_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"resendConfirmationLink()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.RESEND_LINK_HINT')\" (click)=\"resendConfirmationLink()\">\n {{ 'IDEA_AUTH.RESEND_LINK' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
|
|
570
|
+
}], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
|
|
571
|
+
|
|
572
|
+
class IDEAForgotPasswordPage {
|
|
573
|
+
constructor(navCtrl, message, loading, auth, t) {
|
|
574
|
+
this.navCtrl = navCtrl;
|
|
575
|
+
this.message = message;
|
|
576
|
+
this.loading = loading;
|
|
577
|
+
this.auth = auth;
|
|
578
|
+
this.t = t;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* "I forgot my password" procedure.
|
|
582
|
+
*/
|
|
583
|
+
async forgotPassword() {
|
|
584
|
+
await this.loading.show();
|
|
585
|
+
this.auth
|
|
586
|
+
.forgotPassword(this.email)
|
|
587
|
+
.then(() => {
|
|
588
|
+
this.message.success('IDEA_AUTH.PASSWORD_RESET_CODE_SENT');
|
|
589
|
+
this.goToConfirmPassword();
|
|
590
|
+
})
|
|
591
|
+
.catch(() => this.message.error('IDEA_AUTH.USER_NOT_FOUND'))
|
|
592
|
+
.finally(() => this.loading.hide());
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Go to the confirm password page.
|
|
596
|
+
*/
|
|
597
|
+
goToConfirmPassword() {
|
|
598
|
+
this.navCtrl.navigateForward(['auth/confirm-password'], { queryParams: { email: this.email || null } });
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Go to auth page.
|
|
602
|
+
*/
|
|
603
|
+
goToAuth() {
|
|
604
|
+
this.navCtrl.navigateBack(['auth']);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
IDEAForgotPasswordPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAForgotPasswordPage, deps: [{ token: i1.NavController }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
608
|
+
IDEAForgotPasswordPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: IDEAForgotPasswordPage, selector: "idea-forgot-password", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.PASSWORD_RESET' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.PASSWORD_RESET_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"forgotPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.RESET_MY_PASSWORD_HINT')\" (click)=\"forgotPassword()\">\n {{ 'IDEA_AUTH.RESET_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE_HINT')\"\n (click)=\"goToConfirmPassword()\"\n >\n {{ 'IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], components: [{ type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i2.IDEATranslatePipe } });
|
|
609
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAForgotPasswordPage, decorators: [{
|
|
610
|
+
type: Component,
|
|
611
|
+
args: [{ selector: 'idea-forgot-password', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.PASSWORD_RESET' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.PASSWORD_RESET_HINT' | translate }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"forgotPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.RESET_MY_PASSWORD_HINT')\" (click)=\"forgotPassword()\">\n {{ 'IDEA_AUTH.RESET_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE_HINT')\"\n (click)=\"goToConfirmPassword()\"\n >\n {{ 'IDEA_AUTH.ALREADY_HAVE_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
|
|
612
|
+
}], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
|
|
613
|
+
|
|
614
|
+
class IDEAConfirmPasswordPage {
|
|
615
|
+
constructor(navCtrl, route, message, loading, auth, t) {
|
|
616
|
+
this.navCtrl = navCtrl;
|
|
617
|
+
this.route = route;
|
|
618
|
+
this.message = message;
|
|
619
|
+
this.loading = loading;
|
|
620
|
+
this.auth = auth;
|
|
621
|
+
this.t = t;
|
|
622
|
+
this.email = this.route.snapshot.queryParamMap.get('email') || null;
|
|
623
|
+
if (!this.email && this.route.snapshot.queryParams.user)
|
|
624
|
+
this.email = decodeURIComponent(this.route.snapshot.queryParams.user);
|
|
625
|
+
this.code = this.route.snapshot.queryParams.code;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Confirm new password.
|
|
629
|
+
*/
|
|
630
|
+
async confirmPassword() {
|
|
631
|
+
this.errorMsg = null;
|
|
632
|
+
await this.loading.show();
|
|
633
|
+
this.auth
|
|
634
|
+
.confirmPassword(this.email, this.code, this.newPassword)
|
|
635
|
+
.then(() => {
|
|
636
|
+
this.message.success('IDEA_AUTH.PASSWORD_CHANGED');
|
|
637
|
+
this.goToAuth();
|
|
638
|
+
})
|
|
639
|
+
.catch(() => {
|
|
640
|
+
this.errorMsg = this.t._('IDEA_AUTH.CONFIRM_PASSWORD_ERROR', { n: 8 });
|
|
641
|
+
this.message.error(this.errorMsg, true);
|
|
642
|
+
})
|
|
643
|
+
.finally(() => this.loading.hide());
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Go to forgot password page.
|
|
647
|
+
*/
|
|
648
|
+
goToForgotPassword() {
|
|
649
|
+
this.navCtrl.navigateBack(['auth/forgot-password']);
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Go to auth page.
|
|
653
|
+
*/
|
|
654
|
+
goToAuth() {
|
|
655
|
+
this.navCtrl.navigateBack(['auth']);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
IDEAConfirmPasswordPage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAConfirmPasswordPage, deps: [{ token: i1.NavController }, { token: i2$1.ActivatedRoute }, { token: i2.IDEAMessageService }, { token: i2.IDEALoadingService }, { token: IDEAAuthService }, { token: i2.IDEATranslationsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
659
|
+
IDEAConfirmPasswordPage.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: IDEAConfirmPasswordPage, selector: "idea-confirm-password", ngImport: i0, template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD_HINT' | translate: { n: 8 } }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"disc\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"text\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"t._('IDEA_AUTH.RESET_CODE')\"\n [title]=\"t._('IDEA_AUTH.RESET_CODE_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"code\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.NEW_PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.CHANGE_MY_PASSWORD_HINT')\" (click)=\"confirmPassword()\">\n {{ 'IDEA_AUTH.CHANGE_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE_HINT')\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"], components: [{ type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { type: i1.IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { type: i1.IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { type: i1.IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { type: i1.IonCardSubtitle, selector: "ion-card-subtitle", inputs: ["color", "mode"] }, { type: i1.IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }, { type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i2.IDEATranslatePipe } });
|
|
660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAConfirmPasswordPage, decorators: [{
|
|
661
|
+
type: Component,
|
|
662
|
+
args: [{ selector: 'idea-confirm-password', template: "<ion-content>\n <form class=\"flexBox\">\n <ion-card class=\"authCard\">\n <ion-card-header>\n <ion-card-title color=\"primary\">{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD' | translate }}</ion-card-title>\n <ion-card-subtitle>{{ 'IDEA_AUTH.CHANGE_THE_PASSWORD_HINT' | translate: { n: 8 } }}</ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <p class=\"errorBox\" *ngIf=\"errorMsg\">\n <b> {{ 'IDEA_AUTH.ERROR' | translate }}. </b>\n {{ errorMsg }}\n </p>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"person-circle\" color=\"primary\"> </ion-icon>\n </ion-label>\n <ion-input\n type=\"email\"\n inputmode=\"email\"\n pattern=\"[A-Za-z0-9._%+-]{2,}@[a-zA-Z-_.]{2,}[.]{1}[a-zA-Z]{2,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"email\"\n [placeholder]=\"t._('IDEA_AUTH.EMAIL')\"\n [title]=\"t._('IDEA_AUTH.EMAIL_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"email\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"disc\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"text\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n [placeholder]=\"t._('IDEA_AUTH.RESET_CODE')\"\n [title]=\"t._('IDEA_AUTH.RESET_CODE_HINT')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"code\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-item>\n <ion-label position=\"inline\">\n <ion-icon name=\"key\" color=\"primary\"></ion-icon>\n </ion-label>\n <ion-input\n type=\"password\"\n pattern=\".{8,}\"\n spellcheck=\"false\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"new-password\"\n [clearOnEdit]=\"false\"\n [placeholder]=\"t._('IDEA_AUTH.NEW_PASSWORD')\"\n [title]=\"t._('IDEA_AUTH.CHOOSE_A_PASSWORD')\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"newPassword\"\n (keyup.enter)=\"confirmPassword()\"\n ></ion-input>\n </ion-item>\n <ion-button expand=\"block\" [title]=\"t._('IDEA_AUTH.CHANGE_MY_PASSWORD_HINT')\" (click)=\"confirmPassword()\">\n {{ 'IDEA_AUTH.CHANGE_MY_PASSWORD' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE_HINT')\"\n (click)=\"goToForgotPassword()\"\n >\n {{ 'IDEA_AUTH.HAVEN_T_RECEIVED_A_RESET_CODE' | translate }}\n </ion-button>\n <ion-button\n fill=\"clear\"\n expand=\"block\"\n class=\"smallCaseButton\"\n [title]=\"t._('IDEA_AUTH.BACK_TO_SIGN_IN_HINT')\"\n (click)=\"goToAuth()\"\n >\n {{ 'IDEA_AUTH.BACK_TO_SIGN_IN' | translate }}\n </ion-button>\n </ion-card-content>\n </ion-card>\n </form>\n</ion-content>\n", styles: [".flexBox{background:var(--ion-color-white-shade)}.authCard{min-width:400px;max-width:550px;margin:0 10px;padding:20px;background-color:var(--ion-color-white);border:1px solid var(--ion-color-light);border-radius:10px;box-shadow:none;text-align:center}.authCard ion-img{width:150px;display:block;margin:0 auto}.authCard ion-card-title{font-family:auth-title;font-size:3em}.authCard ion-card-subtitle{font-family:auth-title;font-size:1.2em}.authCard ion-card-content{padding-top:16px}.authCard ion-card-content .errorBox{padding-left:10px;margin-bottom:20px;text-align:left;border-left:2px solid var(--ion-color-danger)}.authCard ion-card-content ion-item{--ion-item-background: var(--ion-color-white);--border-color: var(--ion-color-light)}.authCard ion-card-content ion-icon{padding-top:4px;padding-right:5px;font-size:1.3em}.authCard ion-card-content .agreementsAcceptanceRow{margin-top:15px;font-size:.9em}.authCard ion-card-content .agreementsAcceptanceRow ion-checkbox{vertical-align:bottom;margin-right:3px}.authCard ion-card-content ion-button{margin-top:15px}.authCard ion-card-content .smallCaseButton{text-transform:none;letter-spacing:normal;font-size:1em}@media only screen and (max-width: 500px){.authCard{background-color:transparent;border:none}}.ideaLogo{width:65px;margin:40px auto 0;cursor:pointer}\n"] }]
|
|
663
|
+
}], ctorParameters: function () { return [{ type: i1.NavController }, { type: i2$1.ActivatedRoute }, { type: i2.IDEAMessageService }, { type: i2.IDEALoadingService }, { type: IDEAAuthService }, { type: i2.IDEATranslationsService }]; } });
|
|
664
|
+
|
|
665
|
+
class IDEAAuthModule {
|
|
666
|
+
}
|
|
667
|
+
IDEAAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
668
|
+
IDEAAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAAuthModule, declarations: [IDEASignInPage,
|
|
669
|
+
IDEASignUpPage,
|
|
670
|
+
IDEANewPasswordPage,
|
|
671
|
+
IDEAResendLinkPage,
|
|
672
|
+
IDEAForgotPasswordPage,
|
|
673
|
+
IDEAConfirmPasswordPage], imports: [CommonModule,
|
|
674
|
+
FormsModule,
|
|
675
|
+
IonicModule,
|
|
676
|
+
IDEATranslationsModule, i2$1.RouterModule] });
|
|
677
|
+
IDEAAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAAuthModule, imports: [[
|
|
678
|
+
CommonModule,
|
|
679
|
+
FormsModule,
|
|
680
|
+
IonicModule,
|
|
681
|
+
IDEATranslationsModule,
|
|
682
|
+
RouterModule.forChild([
|
|
683
|
+
{ path: '', redirectTo: 'sign-in', pathMatch: 'full' },
|
|
684
|
+
{ path: 'sign-in', component: IDEASignInPage },
|
|
685
|
+
{ path: 'sign-up', component: IDEASignUpPage },
|
|
686
|
+
{ path: 'new-password', component: IDEANewPasswordPage },
|
|
687
|
+
{ path: 'resend-link', component: IDEAResendLinkPage },
|
|
688
|
+
{ path: 'forgot-password', component: IDEAForgotPasswordPage },
|
|
689
|
+
{ path: 'confirm-password', component: IDEAConfirmPasswordPage }
|
|
690
|
+
])
|
|
691
|
+
]] });
|
|
692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: IDEAAuthModule, decorators: [{
|
|
693
|
+
type: NgModule,
|
|
694
|
+
args: [{
|
|
695
|
+
imports: [
|
|
696
|
+
CommonModule,
|
|
697
|
+
FormsModule,
|
|
698
|
+
IonicModule,
|
|
699
|
+
IDEATranslationsModule,
|
|
700
|
+
RouterModule.forChild([
|
|
701
|
+
{ path: '', redirectTo: 'sign-in', pathMatch: 'full' },
|
|
702
|
+
{ path: 'sign-in', component: IDEASignInPage },
|
|
703
|
+
{ path: 'sign-up', component: IDEASignUpPage },
|
|
704
|
+
{ path: 'new-password', component: IDEANewPasswordPage },
|
|
705
|
+
{ path: 'resend-link', component: IDEAResendLinkPage },
|
|
706
|
+
{ path: 'forgot-password', component: IDEAForgotPasswordPage },
|
|
707
|
+
{ path: 'confirm-password', component: IDEAConfirmPasswordPage }
|
|
708
|
+
])
|
|
709
|
+
],
|
|
710
|
+
declarations: [
|
|
711
|
+
IDEASignInPage,
|
|
712
|
+
IDEASignUpPage,
|
|
713
|
+
IDEANewPasswordPage,
|
|
714
|
+
IDEAResendLinkPage,
|
|
715
|
+
IDEAForgotPasswordPage,
|
|
716
|
+
IDEAConfirmPasswordPage
|
|
717
|
+
]
|
|
718
|
+
}]
|
|
719
|
+
}] });
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Generated bundle index. Do not edit.
|
|
723
|
+
*/
|
|
724
|
+
|
|
725
|
+
export { IDEAAuthModule, IDEAAuthService };
|
|
726
|
+
//# sourceMappingURL=idea-ionic-auth.mjs.map
|