@sneat/auth-ui 0.27.45 → 0.27.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/esm2022/index.js +1 -0
  2. package/esm2022/index.js.map +1 -1
  3. package/esm2022/lib/components/user-auth-providers/telegram-auth-account.component.js +243 -0
  4. package/esm2022/lib/components/user-auth-providers/telegram-auth-account.component.js.map +1 -0
  5. package/esm2022/lib/components/user-auth-providers/user-auth-accounts.component.js +10 -57
  6. package/esm2022/lib/components/user-auth-providers/user-auth-accounts.component.js.map +1 -1
  7. package/esm2022/lib/pages/login-page/auth-panel.component.js +1 -1
  8. package/esm2022/lib/pages/login-page/auth-panel.component.js.map +1 -1
  9. package/esm2022/lib/pages/login-page/login-with-telegram.component.js +21 -5
  10. package/esm2022/lib/pages/login-page/login-with-telegram.component.js.map +1 -1
  11. package/esm2022/lib/pages/login-page/sneat-auth-with-telegram.service.js +20 -7
  12. package/esm2022/lib/pages/login-page/sneat-auth-with-telegram.service.js.map +1 -1
  13. package/esm2022/lib/pages/login-page/telegram-login-config.js +17 -1
  14. package/esm2022/lib/pages/login-page/telegram-login-config.js.map +1 -1
  15. package/index.d.ts +1 -0
  16. package/lib/components/user-auth-providers/telegram-auth-account.component.d.ts +28 -0
  17. package/lib/components/user-auth-providers/user-auth-accounts.component.d.ts +1 -10
  18. package/lib/pages/login-page/login-with-telegram.component.d.ts +3 -1
  19. package/lib/pages/login-page/sneat-auth-with-telegram.service.d.ts +2 -0
  20. package/lib/pages/login-page/telegram-login-config.d.ts +6 -0
  21. package/package.json +1 -1
  22. package/tsconfig.lib.prod.tsbuildinfo +1 -1
package/esm2022/index.js CHANGED
@@ -6,4 +6,5 @@ export * from './lib/components';
6
6
  export * from './lib/pipes/person-names.pipe';
7
7
  export * from './lib/sso';
8
8
  export * from './lib/pages/login-page/auth-panel-ui-config';
9
+ export { TelegramAuthAccountComponent } from './lib/components/user-auth-providers/telegram-auth-account.component';
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/auth/ui/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAE5D,cAAc,8CAA8C,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAClG,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,WAAW,CAAC;AAC1B,cAAc,6CAA6C,CAAC","sourcesContent":["export * from './lib/pages/sneat-auth-routing.module';\nexport * from './lib/pages/login-page/auth-panel.component';\nexport type { AuthPanelInitialMode } from './lib/pages/login-page/email-login-form/email-login-form.component';\nexport * from './lib/pages/login-page/telegram-login-config';\nexport { LoginWithTelegramComponent } from './lib/pages/login-page/login-with-telegram.component';\nexport * from './lib/components';\nexport * from './lib/pipes/person-names.pipe';\nexport * from './lib/sso';\nexport * from './lib/pages/login-page/auth-panel-ui-config';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/auth/ui/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAE5D,cAAc,8CAA8C,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAClG,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,WAAW,CAAC;AAC1B,cAAc,6CAA6C,CAAC;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sEAAsE,CAAC","sourcesContent":["export * from './lib/pages/sneat-auth-routing.module';\nexport * from './lib/pages/login-page/auth-panel.component';\nexport type { AuthPanelInitialMode } from './lib/pages/login-page/email-login-form/email-login-form.component';\nexport * from './lib/pages/login-page/telegram-login-config';\nexport { LoginWithTelegramComponent } from './lib/pages/login-page/login-with-telegram.component';\nexport * from './lib/components';\nexport * from './lib/pipes/person-names.pipe';\nexport * from './lib/sso';\nexport * from './lib/pages/login-page/auth-panel-ui-config';\nexport { TelegramAuthAccountComponent } from './lib/components/user-auth-providers/telegram-auth-account.component';\n"]}
@@ -0,0 +1,243 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, inject, signal, } from '@angular/core';
2
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
3
+ import { IonButton, IonButtons, IonIcon, IonItem, IonLabel, IonText, } from '@ionic/angular';
4
+ import { TelegramAuthApi, telegramAuthApiFactory, } from '../../pages/login-page/telegram-login-config';
5
+ import { AuthStatuses, SneatAuthStateService } from '@sneat/auth-core';
6
+ import { LoginWithTelegramComponent } from '../../pages/login-page/login-with-telegram.component';
7
+ import * as i0 from "@angular/core";
8
+ /** Shared Quick logins row. The authenticated API owns the Telegram identity. */
9
+ export class TelegramAuthAccountComponent {
10
+ constructor() {
11
+ this.api = inject(TelegramAuthApi);
12
+ this.auth = inject(SneatAuthStateService);
13
+ this.destroyRef = inject(DestroyRef);
14
+ this.userID = signal(undefined, /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "userID" }] : /* istanbul ignore next */ []));
16
+ this.generation = 0;
17
+ this.ready = signal(false, /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
19
+ this.link = signal(undefined, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []));
21
+ this.loading = signal(false, /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
23
+ this.disconnecting = signal(false, /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "disconnecting" }] : /* istanbul ignore next */ []));
25
+ this.error = signal('', /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
27
+ this.auth.authState
28
+ .pipe(takeUntilDestroyed(this.destroyRef))
29
+ .subscribe((state) => {
30
+ const uid = state.user?.uid;
31
+ const ready = state.status === AuthStatuses.authenticated &&
32
+ !!uid &&
33
+ !state.err &&
34
+ (state.loadingPhase === undefined ||
35
+ (state.loadingPhase === 'ready' && !!state.token));
36
+ const wasReady = this.ready();
37
+ if (uid !== this.uid || !ready) {
38
+ this.generation++;
39
+ this.request?.unsubscribe();
40
+ this.loading.set(false);
41
+ this.disconnecting.set(false);
42
+ this.link.set(undefined);
43
+ this.error.set('');
44
+ }
45
+ this.uid = uid;
46
+ this.userID.set(uid);
47
+ this.ready.set(ready);
48
+ if (ready && (!wasReady || !this.link()))
49
+ this.refresh();
50
+ });
51
+ }
52
+ refresh() {
53
+ if (!this.ready() || this.disconnecting())
54
+ return;
55
+ const generation = ++this.generation;
56
+ this.request?.unsubscribe();
57
+ this.loading.set(true);
58
+ this.error.set('');
59
+ this.request = this.api
60
+ .get('auth/telegram-link')
61
+ .pipe(takeUntilDestroyed(this.destroyRef))
62
+ .subscribe({
63
+ next: (link) => {
64
+ if (generation !== this.generation)
65
+ return;
66
+ this.link.set(link);
67
+ this.loading.set(false);
68
+ },
69
+ error: () => {
70
+ if (generation !== this.generation)
71
+ return;
72
+ this.loading.set(false);
73
+ this.error.set('Could not check Telegram connection. Please retry.');
74
+ },
75
+ });
76
+ }
77
+ linked(uid) {
78
+ if (uid === this.uid)
79
+ this.refresh();
80
+ }
81
+ linkFailed(uid) {
82
+ if (uid !== this.uid)
83
+ return;
84
+ this.error.set('Could not connect Telegram. Please retry.');
85
+ }
86
+ disconnect() {
87
+ if (!this.ready() ||
88
+ !this.link()?.connected ||
89
+ this.loading() ||
90
+ this.disconnecting())
91
+ return;
92
+ if (!confirm('Disconnect Telegram login from your account?'))
93
+ return;
94
+ const generation = ++this.generation;
95
+ this.request?.unsubscribe();
96
+ this.disconnecting.set(true);
97
+ this.error.set('');
98
+ this.request = this.api
99
+ .delete('auth/disconnect?provider=telegram')
100
+ .pipe(takeUntilDestroyed(this.destroyRef))
101
+ .subscribe({
102
+ next: () => {
103
+ if (generation !== this.generation)
104
+ return;
105
+ this.disconnecting.set(false);
106
+ this.refresh();
107
+ },
108
+ error: () => {
109
+ if (generation !== this.generation)
110
+ return;
111
+ this.disconnecting.set(false);
112
+ this.error.set('Could not disconnect Telegram. Please retry.');
113
+ },
114
+ });
115
+ }
116
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TelegramAuthAccountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
117
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: TelegramAuthAccountComponent, isStandalone: true, selector: "sneat-telegram-auth-account", providers: [{ provide: TelegramAuthApi, useFactory: telegramAuthApiFactory }], ngImport: i0, template: `
118
+ <ion-item>
119
+ <ion-icon slot="start" name="paper-plane" color="primary" />
120
+ <ion-label>
121
+ <h3>Telegram</h3>
122
+ <p role="status" aria-live="polite">
123
+ @if (loading()) {
124
+ Checking Telegram connection…
125
+ } @else if (link()?.connected) {
126
+ <ion-text color="success"
127
+ >Connected{{
128
+ link()?.username ? ' as @' + link()?.username : ''
129
+ }}</ion-text
130
+ >
131
+ } @else if (ready() && !error()) {
132
+ Not connected yet.
133
+ } @else if (!ready()) {
134
+ Sign in to manage Telegram.
135
+ }
136
+ </p>
137
+ <p role="alert" [hidden]="!error()">
138
+ <ion-text color="danger">{{ error() }}</ion-text>
139
+ </p>
140
+ </ion-label>
141
+ <ion-buttons slot="end">
142
+ <span>
143
+ @if (error() && ready()) {
144
+ <ion-button
145
+ (click)="refresh()"
146
+ [disabled]="loading() || disconnecting()"
147
+ >Retry</ion-button
148
+ >
149
+ }
150
+ @if (link()?.connected) {
151
+ <ion-button
152
+ color="warning"
153
+ (click)="disconnect()"
154
+ [disabled]="!ready() || loading() || disconnecting()"
155
+ >
156
+ {{ disconnecting() ? 'Disconnecting…' : 'Disconnect' }}
157
+ </ion-button>
158
+ } @else if (ready() && !loading() && !error()) {
159
+ @for (uid of [userID()]; track uid) {
160
+ <sneat-login-with-telegram
161
+ [isUserAuthenticated]="true"
162
+ (authenticated)="linked(uid)"
163
+ (authenticationFailed)="linkFailed(uid)"
164
+ />
165
+ }
166
+ }
167
+ </span>
168
+ </ion-buttons>
169
+ </ion-item>
170
+ `, isInline: true, dependencies: [{ kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"], outputs: ["ionFocus", "ionBlur"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: LoginWithTelegramComponent, selector: "sneat-login-with-telegram", inputs: ["isUserAuthenticated", "botID", "size", "requestAccess", "userPic"], outputs: ["authenticated", "authenticationFailed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
171
+ }
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TelegramAuthAccountComponent, decorators: [{
173
+ type: Component,
174
+ args: [{
175
+ selector: 'sneat-telegram-auth-account',
176
+ providers: [{ provide: TelegramAuthApi, useFactory: telegramAuthApiFactory }],
177
+ changeDetection: ChangeDetectionStrategy.OnPush,
178
+ imports: [
179
+ IonButton,
180
+ IonButtons,
181
+ IonIcon,
182
+ IonItem,
183
+ IonLabel,
184
+ IonText,
185
+ LoginWithTelegramComponent,
186
+ ],
187
+ template: `
188
+ <ion-item>
189
+ <ion-icon slot="start" name="paper-plane" color="primary" />
190
+ <ion-label>
191
+ <h3>Telegram</h3>
192
+ <p role="status" aria-live="polite">
193
+ @if (loading()) {
194
+ Checking Telegram connection…
195
+ } @else if (link()?.connected) {
196
+ <ion-text color="success"
197
+ >Connected{{
198
+ link()?.username ? ' as @' + link()?.username : ''
199
+ }}</ion-text
200
+ >
201
+ } @else if (ready() && !error()) {
202
+ Not connected yet.
203
+ } @else if (!ready()) {
204
+ Sign in to manage Telegram.
205
+ }
206
+ </p>
207
+ <p role="alert" [hidden]="!error()">
208
+ <ion-text color="danger">{{ error() }}</ion-text>
209
+ </p>
210
+ </ion-label>
211
+ <ion-buttons slot="end">
212
+ <span>
213
+ @if (error() && ready()) {
214
+ <ion-button
215
+ (click)="refresh()"
216
+ [disabled]="loading() || disconnecting()"
217
+ >Retry</ion-button
218
+ >
219
+ }
220
+ @if (link()?.connected) {
221
+ <ion-button
222
+ color="warning"
223
+ (click)="disconnect()"
224
+ [disabled]="!ready() || loading() || disconnecting()"
225
+ >
226
+ {{ disconnecting() ? 'Disconnecting…' : 'Disconnect' }}
227
+ </ion-button>
228
+ } @else if (ready() && !loading() && !error()) {
229
+ @for (uid of [userID()]; track uid) {
230
+ <sneat-login-with-telegram
231
+ [isUserAuthenticated]="true"
232
+ (authenticated)="linked(uid)"
233
+ (authenticationFailed)="linkFailed(uid)"
234
+ />
235
+ }
236
+ }
237
+ </span>
238
+ </ion-buttons>
239
+ </ion-item>
240
+ `,
241
+ }]
242
+ }], ctorParameters: () => [] });
243
+ //# sourceMappingURL=telegram-auth-account.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-auth-account.component.js","sourceRoot":"","sources":["../../../../../../../../libs/auth/ui/src/lib/components/user-auth-providers/telegram-auth-account.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AAC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P,SAAS;wBACT,UAAU;wBACV,OAAO;wBACP,OAAO;wBACP,QAAQ;wBACR,OAAO;wBACP,0BAA0B;qBAC3B;oBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDT;iBACF","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n inject,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n IonButton,\n IonButtons,\n IonIcon,\n IonItem,\n IonLabel,\n IonText,\n} from '@ionic/angular';\nimport {\n TelegramAuthApi,\n telegramAuthApiFactory,\n} from '../../pages/login-page/telegram-login-config';\nimport { AuthStatuses, SneatAuthStateService } from '@sneat/auth-core';\nimport { Subscription } from 'rxjs';\nimport { LoginWithTelegramComponent } from '../../pages/login-page/login-with-telegram.component';\n\ninterface TelegramLink {\n connected: boolean;\n username?: string;\n}\n\n/** Shared Quick logins row. The authenticated API owns the Telegram identity. */\n@Component({\n selector: 'sneat-telegram-auth-account',\n providers: [{ provide: TelegramAuthApi, useFactory: telegramAuthApiFactory }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n IonButton,\n IonButtons,\n IonIcon,\n IonItem,\n IonLabel,\n IonText,\n LoginWithTelegramComponent,\n ],\n template: `\n <ion-item>\n <ion-icon slot=\"start\" name=\"paper-plane\" color=\"primary\" />\n <ion-label>\n <h3>Telegram</h3>\n <p role=\"status\" aria-live=\"polite\">\n @if (loading()) {\n Checking Telegram connection…\n } @else if (link()?.connected) {\n <ion-text color=\"success\"\n >Connected{{\n link()?.username ? ' as @' + link()?.username : ''\n }}</ion-text\n >\n } @else if (ready() && !error()) {\n Not connected yet.\n } @else if (!ready()) {\n Sign in to manage Telegram.\n }\n </p>\n <p role=\"alert\" [hidden]=\"!error()\">\n <ion-text color=\"danger\">{{ error() }}</ion-text>\n </p>\n </ion-label>\n <ion-buttons slot=\"end\">\n <span>\n @if (error() && ready()) {\n <ion-button\n (click)=\"refresh()\"\n [disabled]=\"loading() || disconnecting()\"\n >Retry</ion-button\n >\n }\n @if (link()?.connected) {\n <ion-button\n color=\"warning\"\n (click)=\"disconnect()\"\n [disabled]=\"!ready() || loading() || disconnecting()\"\n >\n {{ disconnecting() ? 'Disconnecting…' : 'Disconnect' }}\n </ion-button>\n } @else if (ready() && !loading() && !error()) {\n @for (uid of [userID()]; track uid) {\n <sneat-login-with-telegram\n [isUserAuthenticated]=\"true\"\n (authenticated)=\"linked(uid)\"\n (authenticationFailed)=\"linkFailed(uid)\"\n />\n }\n }\n </span>\n </ion-buttons>\n </ion-item>\n `,\n})\nexport class TelegramAuthAccountComponent {\n private readonly api = inject(TelegramAuthApi);\n private readonly auth = inject(SneatAuthStateService);\n private readonly destroyRef = inject(DestroyRef);\n private uid?: string;\n protected readonly userID = signal<string | undefined>(undefined);\n private generation = 0;\n private request?: Subscription;\n protected readonly ready = signal(false);\n protected readonly link = signal<TelegramLink | undefined>(undefined);\n protected readonly loading = signal(false);\n protected readonly disconnecting = signal(false);\n protected readonly error = signal('');\n\n constructor() {\n this.auth.authState\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((state) => {\n const uid = state.user?.uid;\n const ready =\n state.status === AuthStatuses.authenticated &&\n !!uid &&\n !state.err &&\n (state.loadingPhase === undefined ||\n (state.loadingPhase === 'ready' && !!state.token));\n const wasReady = this.ready();\n if (uid !== this.uid || !ready) {\n this.generation++;\n this.request?.unsubscribe();\n this.loading.set(false);\n this.disconnecting.set(false);\n this.link.set(undefined);\n this.error.set('');\n }\n this.uid = uid;\n this.userID.set(uid);\n this.ready.set(ready);\n if (ready && (!wasReady || !this.link())) this.refresh();\n });\n }\n\n protected refresh(): void {\n if (!this.ready() || this.disconnecting()) return;\n const generation = ++this.generation;\n this.request?.unsubscribe();\n this.loading.set(true);\n this.error.set('');\n this.request = this.api\n .get<TelegramLink>('auth/telegram-link')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (link) => {\n if (generation !== this.generation) return;\n this.link.set(link);\n this.loading.set(false);\n },\n error: () => {\n if (generation !== this.generation) return;\n this.loading.set(false);\n this.error.set('Could not check Telegram connection. Please retry.');\n },\n });\n }\n\n protected linked(uid: string | undefined): void {\n if (uid === this.uid) this.refresh();\n }\n\n protected linkFailed(uid: string | undefined): void {\n if (uid !== this.uid) return;\n this.error.set('Could not connect Telegram. Please retry.');\n }\n\n protected disconnect(): void {\n if (\n !this.ready() ||\n !this.link()?.connected ||\n this.loading() ||\n this.disconnecting()\n )\n return;\n if (!confirm('Disconnect Telegram login from your account?')) return;\n const generation = ++this.generation;\n this.request?.unsubscribe();\n this.disconnecting.set(true);\n this.error.set('');\n this.request = this.api\n .delete('auth/disconnect?provider=telegram')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: () => {\n if (generation !== this.generation) return;\n this.disconnecting.set(false);\n this.refresh();\n },\n error: () => {\n if (generation !== this.generation) return;\n this.disconnecting.set(false);\n this.error.set('Could not disconnect Telegram. Please retry.');\n },\n });\n }\n}\n"]}
@@ -1,77 +1,33 @@
1
- import { ChangeDetectionStrategy, Component, input, signal, inject, } from '@angular/core';
2
- import { FormsModule } from '@angular/forms';
3
- import { IonButton, IonButtons, IonCard, IonCardContent, IonIcon, IonItem, IonItemDivider, IonLabel, IonList, IonText, } from '@ionic/angular';
4
- import { SneatApiService } from '@sneat/api';
5
- import { SneatUserService } from '@sneat/auth-core';
1
+ import { ChangeDetectionStrategy, Component, input, signal, } from '@angular/core';
2
+ import { IonCard, IonCardContent, IonIcon, IonItem, IonItemDivider, IonLabel, IonList, } from '@ionic/angular';
6
3
  import { ClassName, SneatBaseComponent } from '@sneat/ui';
7
- import { LoginWithTelegramComponent } from '../../pages/login-page/login-with-telegram.component';
4
+ import { TelegramAuthAccountComponent } from './telegram-auth-account.component';
8
5
  import { UserAuthAProviderStatusComponent } from './user-auth-provider-status';
9
6
  import * as i0 from "@angular/core";
10
7
  export class UserAuthAccountsComponent extends SneatBaseComponent {
11
8
  constructor() {
12
- super();
13
- this.sneatUserService = inject(SneatUserService);
14
- this.sneatApiService = inject(SneatApiService);
9
+ super(...arguments);
15
10
  /**
16
- * The messaging-apps section (Telegram, WhatsApp, Viber) and its Sneat.app
11
+ * The messaging-apps section (WhatsApp, Viber) and its Sneat.app
17
12
  * copy. Apps that only need sign-in methods turn it off.
18
13
  */
19
14
  this.showMessagingApps = input(true, /* @ts-ignore */
20
15
  ...(ngDevMode ? [{ debugName: "showMessagingApps" }] : /* istanbul ignore next */ []));
21
- this.$userRecord = signal(undefined, /* @ts-ignore */
22
- ...(ngDevMode ? [{ debugName: "$userRecord" }] : /* istanbul ignore next */ []));
23
16
  this.signingInWith = signal(undefined, /* @ts-ignore */
24
17
  ...(ngDevMode ? [{ debugName: "signingInWith" }] : /* istanbul ignore next */ []));
25
- this.disconnecting = signal(undefined, /* @ts-ignore */
26
- ...(ngDevMode ? [{ debugName: "disconnecting" }] : /* istanbul ignore next */ []));
27
- this.sneatUserService.userState.pipe(this.takeUntilDestroyed()).subscribe({
28
- next: (user) => {
29
- this.$userRecord.set(user.record || undefined);
30
- },
31
- });
32
- }
33
- hasAccount(provider) {
34
- provider = provider + ':';
35
- for (const account of this.$userRecord()?.accounts || []) {
36
- if (account.startsWith(provider)) {
37
- return true;
38
- }
39
- }
40
- return false;
41
- }
42
- getAccountID(provider) {
43
- const prefix = provider + '::';
44
- const a = this.$userRecord()?.accounts?.find((a) => a.startsWith(prefix));
45
- return a?.replace(prefix, '') || '';
46
- }
47
- disconnect(provider) {
48
- if (!confirm('Are you sure you want to disconnect Telegram login from your account?')) {
49
- return;
50
- }
51
- this.disconnecting.set(provider);
52
- this.sneatApiService
53
- .delete('auth/disconnect?provider=' + provider)
54
- .subscribe({
55
- next: () => {
56
- this.disconnecting.set(undefined);
57
- alert('Disconnected!');
58
- },
59
- error: this.errorLogger.logErrorHandler('Failed to disconnect'),
60
- });
61
18
  }
62
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UserAuthAccountsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UserAuthAccountsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
63
20
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: UserAuthAccountsComponent, isStandalone: true, selector: "sneat-user-auth-accounts", inputs: { showMessagingApps: { classPropertyName: "showMessagingApps", publicName: "showMessagingApps", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
64
21
  {
65
22
  provide: ClassName,
66
23
  useValue: 'UserAuthAccountsComponent',
67
24
  },
68
- ], usesInheritance: true, ngImport: i0, template: "<ion-card>\n <!--\t<ion-item color=\"light\" lines=\"full\">-->\n <!--\t\t<ion-label color=\"medium\"-->\n <!--\t\t\t><h2 style=\"font-weight: bold\">Authentication</h2></ion-label-->\n <!--\t\t>-->\n <!--\t</ion-item>-->\n <!--\t<ion-accordion-group [value]=\"integrations\">-->\n <!--\t\t<ion-accordion value=\"messaging-apps\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>First Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">First Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t\t<ion-accordion value=\"quick-logins\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>Second Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">Second Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t</ion-accordion-group>-->\n <!--\t<ion-item>-->\n <!--\t\t<ion-segment [(ngModel)]=\"integrations\" style=\"margin-bottom: 0.5em\">-->\n <!--\t\t\t<ion-segment-button value=\"messaging-apps\"-->\n <!--\t\t\t\t>Messaging Apps-->\n <!--\t\t\t</ion-segment-button>-->\n <!--\t\t\t<ion-segment-button value=\"quick-logins\">Quick logins</ion-segment-button>-->\n <!--\t\t</ion-segment>-->\n <!--\t</ion-item>-->\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Quick logins</ion-label\n >\n </ion-item-divider>\n <sneat-user-auth-provider-status\n providerID=\"google.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"apple.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"microsoft.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"github.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n </ion-list>\n @if (showMessagingApps()) {\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Messaging apps</ion-label\n >\n </ion-item-divider>\n\n <ion-item>\n <ion-icon slot=\"start\" name=\"paper-plane\" color=\"primary\"></ion-icon>\n @if (!$userRecord()) {\n <ion-label>\n <h3>Telegram</h3>\n <p>Checking....</p>\n </ion-label>\n } @else if (hasAccount('telegram')) {\n <ion-label>\n <h3 style=\"font-weight: bold\">Telegram</h3>\n <ion-text color=\"success\" [title]=\"getAccountID('telegram')\"\n >Connected!\n </ion-text>\n </ion-label>\n <ion-buttons slot=\"end\">\n <ion-button\n [disabled]=\"disconnecting()\"\n color=\"warning\"\n fill=\"solid\"\n (click)=\"disconnect('telegram')\"\n >\n <ion-icon name=\"close-outline\" slot=\"start\"></ion-icon>\n <ion-label>Disconnect</ion-label>\n </ion-button>\n </ion-buttons>\n } @else {\n <ion-label>\n <h3>Telegram</h3>\n <p>Not connected yet.</p>\n </ion-label>\n <ion-buttons slot=\"end\">\n <sneat-login-with-telegram [isUserAuthenticated]=\"true\" />\n </ion-buttons>\n }\n </ion-item>\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">WhatsApp</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n <!--\t\t<ion-buttons slot=\"end\">-->\n <!--\t\t\t<ion-button color=\"danger\">-->\n <!--\t\t\t\t<ion-icon name=\"close-circle-outline\" slot=\"start\"></ion-icon>-->\n <!--\t\t\t\t<ion-label>I have no WhatsApp</ion-label>-->\n <!--\t\t\t</ion-button>-->\n <!--\t\t</ion-buttons>-->\n </ion-item>\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <!-- TODO: place Viber logo here -->\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">Viber</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n </ion-item>\n </ion-list>\n <ion-card-content>\n <p>\n You'll get much more out of Sneat.app if you integrate it with messaging\n apps you use. Benefits:\n </p>\n <ul>\n <li>Easily add contacts</li>\n <li>Get reminders</li>\n <li>Add todo/to_buy from your messenger</li>\n <li>etc.</li>\n </ul>\n </ion-card-content>\n }\n</ion-card>\n", dependencies: [{ kind: "component", type: LoginWithTelegramComponent, selector: "sneat-login-with-telegram", inputs: ["isUserAuthenticated", "botID", "size", "requestAccess", "userPic"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: UserAuthAProviderStatusComponent, selector: "sneat-user-auth-provider-status", inputs: ["providerID", "signingInWith"], outputs: ["signingInWithChange"] }, { kind: "component", type: IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"], outputs: ["ionFocus", "ionBlur"] }, { kind: "component", type: IonCardContent, selector: "ion-card-content", inputs: ["mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
25
+ ], usesInheritance: true, ngImport: i0, template: "<ion-card>\n <!--\t<ion-item color=\"light\" lines=\"full\">-->\n <!--\t\t<ion-label color=\"medium\"-->\n <!--\t\t\t><h2 style=\"font-weight: bold\">Authentication</h2></ion-label-->\n <!--\t\t>-->\n <!--\t</ion-item>-->\n <!--\t<ion-accordion-group [value]=\"integrations\">-->\n <!--\t\t<ion-accordion value=\"messaging-apps\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>First Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">First Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t\t<ion-accordion value=\"quick-logins\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>Second Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">Second Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t</ion-accordion-group>-->\n <!--\t<ion-item>-->\n <!--\t\t<ion-segment [(ngModel)]=\"integrations\" style=\"margin-bottom: 0.5em\">-->\n <!--\t\t\t<ion-segment-button value=\"messaging-apps\"-->\n <!--\t\t\t\t>Messaging Apps-->\n <!--\t\t\t</ion-segment-button>-->\n <!--\t\t\t<ion-segment-button value=\"quick-logins\">Quick logins</ion-segment-button>-->\n <!--\t\t</ion-segment>-->\n <!--\t</ion-item>-->\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Quick logins</ion-label\n >\n </ion-item-divider>\n <sneat-user-auth-provider-status\n providerID=\"google.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"apple.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"microsoft.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"github.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-telegram-auth-account />\n </ion-list>\n @if (showMessagingApps()) {\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Messaging apps</ion-label\n >\n </ion-item-divider>\n\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">WhatsApp</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n <!--\t\t<ion-buttons slot=\"end\">-->\n <!--\t\t\t<ion-button color=\"danger\">-->\n <!--\t\t\t\t<ion-icon name=\"close-circle-outline\" slot=\"start\"></ion-icon>-->\n <!--\t\t\t\t<ion-label>I have no WhatsApp</ion-label>-->\n <!--\t\t\t</ion-button>-->\n <!--\t\t</ion-buttons>-->\n </ion-item>\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <!-- TODO: place Viber logo here -->\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">Viber</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n </ion-item>\n </ion-list>\n <ion-card-content>\n <p>\n You'll get much more out of Sneat.app if you integrate it with messaging\n apps you use. Benefits:\n </p>\n <ul>\n <li>Easily add contacts</li>\n <li>Get reminders</li>\n <li>Add todo/to_buy from your messenger</li>\n <li>etc.</li>\n </ul>\n </ion-card-content>\n }\n</ion-card>\n", dependencies: [{ kind: "component", type: TelegramAuthAccountComponent, selector: "sneat-telegram-auth-account" }, { kind: "component", type: UserAuthAProviderStatusComponent, selector: "sneat-user-auth-provider-status", inputs: ["providerID", "signingInWith"], outputs: ["signingInWithChange"] }, { kind: "component", type: IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonCardContent, selector: "ion-card-content", inputs: ["mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
69
26
  }
70
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: UserAuthAccountsComponent, decorators: [{
71
28
  type: Component,
72
29
  args: [{ selector: 'sneat-user-auth-accounts', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
73
- LoginWithTelegramComponent,
74
- FormsModule,
30
+ TelegramAuthAccountComponent,
75
31
  UserAuthAProviderStatusComponent,
76
32
  IonCard,
77
33
  IonList,
@@ -79,15 +35,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
79
35
  IonLabel,
80
36
  IonItem,
81
37
  IonIcon,
82
- IonText,
83
- IonButtons,
84
- IonButton,
85
38
  IonCardContent,
86
39
  ], providers: [
87
40
  {
88
41
  provide: ClassName,
89
42
  useValue: 'UserAuthAccountsComponent',
90
43
  },
91
- ], template: "<ion-card>\n <!--\t<ion-item color=\"light\" lines=\"full\">-->\n <!--\t\t<ion-label color=\"medium\"-->\n <!--\t\t\t><h2 style=\"font-weight: bold\">Authentication</h2></ion-label-->\n <!--\t\t>-->\n <!--\t</ion-item>-->\n <!--\t<ion-accordion-group [value]=\"integrations\">-->\n <!--\t\t<ion-accordion value=\"messaging-apps\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>First Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">First Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t\t<ion-accordion value=\"quick-logins\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>Second Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">Second Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t</ion-accordion-group>-->\n <!--\t<ion-item>-->\n <!--\t\t<ion-segment [(ngModel)]=\"integrations\" style=\"margin-bottom: 0.5em\">-->\n <!--\t\t\t<ion-segment-button value=\"messaging-apps\"-->\n <!--\t\t\t\t>Messaging Apps-->\n <!--\t\t\t</ion-segment-button>-->\n <!--\t\t\t<ion-segment-button value=\"quick-logins\">Quick logins</ion-segment-button>-->\n <!--\t\t</ion-segment>-->\n <!--\t</ion-item>-->\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Quick logins</ion-label\n >\n </ion-item-divider>\n <sneat-user-auth-provider-status\n providerID=\"google.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"apple.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"microsoft.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"github.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n </ion-list>\n @if (showMessagingApps()) {\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Messaging apps</ion-label\n >\n </ion-item-divider>\n\n <ion-item>\n <ion-icon slot=\"start\" name=\"paper-plane\" color=\"primary\"></ion-icon>\n @if (!$userRecord()) {\n <ion-label>\n <h3>Telegram</h3>\n <p>Checking....</p>\n </ion-label>\n } @else if (hasAccount('telegram')) {\n <ion-label>\n <h3 style=\"font-weight: bold\">Telegram</h3>\n <ion-text color=\"success\" [title]=\"getAccountID('telegram')\"\n >Connected!\n </ion-text>\n </ion-label>\n <ion-buttons slot=\"end\">\n <ion-button\n [disabled]=\"disconnecting()\"\n color=\"warning\"\n fill=\"solid\"\n (click)=\"disconnect('telegram')\"\n >\n <ion-icon name=\"close-outline\" slot=\"start\"></ion-icon>\n <ion-label>Disconnect</ion-label>\n </ion-button>\n </ion-buttons>\n } @else {\n <ion-label>\n <h3>Telegram</h3>\n <p>Not connected yet.</p>\n </ion-label>\n <ion-buttons slot=\"end\">\n <sneat-login-with-telegram [isUserAuthenticated]=\"true\" />\n </ion-buttons>\n }\n </ion-item>\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">WhatsApp</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n <!--\t\t<ion-buttons slot=\"end\">-->\n <!--\t\t\t<ion-button color=\"danger\">-->\n <!--\t\t\t\t<ion-icon name=\"close-circle-outline\" slot=\"start\"></ion-icon>-->\n <!--\t\t\t\t<ion-label>I have no WhatsApp</ion-label>-->\n <!--\t\t\t</ion-button>-->\n <!--\t\t</ion-buttons>-->\n </ion-item>\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <!-- TODO: place Viber logo here -->\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">Viber</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n </ion-item>\n </ion-list>\n <ion-card-content>\n <p>\n You'll get much more out of Sneat.app if you integrate it with messaging\n apps you use. Benefits:\n </p>\n <ul>\n <li>Easily add contacts</li>\n <li>Get reminders</li>\n <li>Add todo/to_buy from your messenger</li>\n <li>etc.</li>\n </ul>\n </ion-card-content>\n }\n</ion-card>\n" }]
92
- }], ctorParameters: () => [], propDecorators: { showMessagingApps: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMessagingApps", required: false }] }] } });
44
+ ], template: "<ion-card>\n <!--\t<ion-item color=\"light\" lines=\"full\">-->\n <!--\t\t<ion-label color=\"medium\"-->\n <!--\t\t\t><h2 style=\"font-weight: bold\">Authentication</h2></ion-label-->\n <!--\t\t>-->\n <!--\t</ion-item>-->\n <!--\t<ion-accordion-group [value]=\"integrations\">-->\n <!--\t\t<ion-accordion value=\"messaging-apps\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>First Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">First Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t\t<ion-accordion value=\"quick-logins\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>Second Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">Second Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t</ion-accordion-group>-->\n <!--\t<ion-item>-->\n <!--\t\t<ion-segment [(ngModel)]=\"integrations\" style=\"margin-bottom: 0.5em\">-->\n <!--\t\t\t<ion-segment-button value=\"messaging-apps\"-->\n <!--\t\t\t\t>Messaging Apps-->\n <!--\t\t\t</ion-segment-button>-->\n <!--\t\t\t<ion-segment-button value=\"quick-logins\">Quick logins</ion-segment-button>-->\n <!--\t\t</ion-segment>-->\n <!--\t</ion-item>-->\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Quick logins</ion-label\n >\n </ion-item-divider>\n <sneat-user-auth-provider-status\n providerID=\"google.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"apple.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"microsoft.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"github.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-telegram-auth-account />\n </ion-list>\n @if (showMessagingApps()) {\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Messaging apps</ion-label\n >\n </ion-item-divider>\n\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">WhatsApp</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n <!--\t\t<ion-buttons slot=\"end\">-->\n <!--\t\t\t<ion-button color=\"danger\">-->\n <!--\t\t\t\t<ion-icon name=\"close-circle-outline\" slot=\"start\"></ion-icon>-->\n <!--\t\t\t\t<ion-label>I have no WhatsApp</ion-label>-->\n <!--\t\t\t</ion-button>-->\n <!--\t\t</ion-buttons>-->\n </ion-item>\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <!-- TODO: place Viber logo here -->\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">Viber</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n </ion-item>\n </ion-list>\n <ion-card-content>\n <p>\n You'll get much more out of Sneat.app if you integrate it with messaging\n apps you use. Benefits:\n </p>\n <ul>\n <li>Easily add contacts</li>\n <li>Get reminders</li>\n <li>Add todo/to_buy from your messenger</li>\n <li>etc.</li>\n </ul>\n </ion-card-content>\n }\n</ion-card>\n" }]
45
+ }], propDecorators: { showMessagingApps: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMessagingApps", required: false }] }] } });
93
46
  //# sourceMappingURL=user-auth-accounts.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-auth-accounts.component.js","sourceRoot":"","sources":["../../../../../../../../libs/auth/ui/src/lib/components/user-auth-providers/user-auth-accounts.component.ts","../../../../../../../../libs/auth/ui/src/lib/components/user-auth-providers/user-auth-accounts.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,SAAS,EACT,UAAU,EACV,OAAO,EACP,cA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,yBAAyB;kBA1BrC,SAAS;+BACE,0BAA0B,mBAEnB,uBAAuB,CAAC,MAAM,WACtC;wBACP,0BAA0B;wBAC1B,WAAW;wBACX,gCAAgC;wBAChC,OAAO;wBACP,OAAO;wBACP,cAAc;wBACd,QAAQ;wBACR,OAAO;wBACP,OAAO;wBACP,OAAO;wBACP,UAAU;wBACV,SAAS;wBACT,cAAc;qBACf,aACU;wBACT;4BACE,OAAO,EAAE,SAAS;4BAClB,QAAQ,EAAE,2BAA2B;yBACtC;qBACF","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n input,\n signal,\n inject,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n IonButton,\n IonButtons,\n IonCard,\n IonCardContent,\n IonIcon,\n IonItem,\n IonItemDivider,\n IonLabel,\n IonList,\n IonText,\n} from '@ionic/angular';\nimport { SneatApiService } from '@sneat/api';\nimport { AuthProviderID, SneatUserService } from '@sneat/auth-core';\nimport { IUserRecord } from '@sneat/auth-models';\nimport { ClassName, SneatBaseComponent } from '@sneat/ui';\nimport { LoginWithTelegramComponent } from '../../pages/login-page/login-with-telegram.component';\nimport { UserAuthAProviderStatusComponent } from './user-auth-provider-status';\n\n@Component({\n selector: 'sneat-user-auth-accounts',\n templateUrl: './user-auth-accounts.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n LoginWithTelegramComponent,\n FormsModule,\n UserAuthAProviderStatusComponent,\n IonCard,\n IonList,\n IonItemDivider,\n IonLabel,\n IonItem,\n IonIcon,\n IonText,\n IonButtons,\n IonButton,\n IonCardContent,\n ],\n providers: [\n {\n provide: ClassName,\n useValue: 'UserAuthAccountsComponent',\n },\n ],\n})\nexport class UserAuthAccountsComponent extends SneatBaseComponent {\n private readonly sneatUserService = inject(SneatUserService);\n private readonly sneatApiService = inject(SneatApiService);\n\n /**\n * The messaging-apps section (Telegram, WhatsApp, Viber) and its Sneat.app\n * copy. Apps that only need sign-in methods turn it off.\n */\n readonly showMessagingApps = input(true);\n\n protected readonly $userRecord = signal<IUserRecord | undefined>(undefined);\n\n protected readonly signingInWith = signal<AuthProviderID | undefined>(\n undefined,\n );\n\n constructor() {\n super();\n this.sneatUserService.userState.pipe(this.takeUntilDestroyed()).subscribe({\n next: (user) => {\n this.$userRecord.set(user.record || undefined);\n },\n });\n }\n\n protected hasAccount(provider: 'telegram' | 'viber' | 'whatsapp'): boolean {\n provider = provider + ':';\n for (const account of this.$userRecord()?.accounts || []) {\n if (account.startsWith(provider)) {\n return true;\n }\n }\n return false;\n }\n\n protected getAccountID(provider: 'telegram'): string {\n const prefix = provider + '::';\n const a = this.$userRecord()?.accounts?.find((a) => a.startsWith(prefix));\n return a?.replace(prefix, '') || '';\n }\n\n protected readonly disconnecting = signal<\n 'telegram' | 'viber' | 'whatsapp' | undefined\n >(undefined);\n\n protected disconnect(provider: 'telegram'): void {\n if (\n !confirm(\n 'Are you sure you want to disconnect Telegram login from your account?',\n )\n ) {\n return;\n }\n this.disconnecting.set(provider);\n this.sneatApiService\n .delete('auth/disconnect?provider=' + provider)\n .subscribe({\n next: () => {\n this.disconnecting.set(undefined);\n alert('Disconnected!');\n },\n error: this.errorLogger.logErrorHandler('Failed to disconnect'),\n });\n }\n}\n","<ion-card>\n <!--\t<ion-item color=\"light\" lines=\"full\">-->\n <!--\t\t<ion-label color=\"medium\"-->\n <!--\t\t\t><h2 style=\"font-weight: bold\">Authentication</h2></ion-label-->\n <!--\t\t>-->\n <!--\t</ion-item>-->\n <!--\t<ion-accordion-group [value]=\"integrations\">-->\n <!--\t\t<ion-accordion value=\"messaging-apps\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>First Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">First Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t\t<ion-accordion value=\"quick-logins\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>Second Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">Second Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t</ion-accordion-group>-->\n <!--\t<ion-item>-->\n <!--\t\t<ion-segment [(ngModel)]=\"integrations\" style=\"margin-bottom: 0.5em\">-->\n <!--\t\t\t<ion-segment-button value=\"messaging-apps\"-->\n <!--\t\t\t\t>Messaging Apps-->\n <!--\t\t\t</ion-segment-button>-->\n <!--\t\t\t<ion-segment-button value=\"quick-logins\">Quick logins</ion-segment-button>-->\n <!--\t\t</ion-segment>-->\n <!--\t</ion-item>-->\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Quick logins</ion-label\n >\n </ion-item-divider>\n <sneat-user-auth-provider-status\n providerID=\"google.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"apple.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"microsoft.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"github.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n </ion-list>\n @if (showMessagingApps()) {\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Messaging apps</ion-label\n >\n </ion-item-divider>\n\n <ion-item>\n <ion-icon slot=\"start\" name=\"paper-plane\" color=\"primary\"></ion-icon>\n @if (!$userRecord()) {\n <ion-label>\n <h3>Telegram</h3>\n <p>Checking....</p>\n </ion-label>\n } @else if (hasAccount('telegram')) {\n <ion-label>\n <h3 style=\"font-weight: bold\">Telegram</h3>\n <ion-text color=\"success\" [title]=\"getAccountID('telegram')\"\n >Connected!\n </ion-text>\n </ion-label>\n <ion-buttons slot=\"end\">\n <ion-button\n [disabled]=\"disconnecting()\"\n color=\"warning\"\n fill=\"solid\"\n (click)=\"disconnect('telegram')\"\n >\n <ion-icon name=\"close-outline\" slot=\"start\"></ion-icon>\n <ion-label>Disconnect</ion-label>\n </ion-button>\n </ion-buttons>\n } @else {\n <ion-label>\n <h3>Telegram</h3>\n <p>Not connected yet.</p>\n </ion-label>\n <ion-buttons slot=\"end\">\n <sneat-login-with-telegram [isUserAuthenticated]=\"true\" />\n </ion-buttons>\n }\n </ion-item>\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">WhatsApp</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n <!--\t\t<ion-buttons slot=\"end\">-->\n <!--\t\t\t<ion-button color=\"danger\">-->\n <!--\t\t\t\t<ion-icon name=\"close-circle-outline\" slot=\"start\"></ion-icon>-->\n <!--\t\t\t\t<ion-label>I have no WhatsApp</ion-label>-->\n <!--\t\t\t</ion-button>-->\n <!--\t\t</ion-buttons>-->\n </ion-item>\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <!-- TODO: place Viber logo here -->\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">Viber</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n </ion-item>\n </ion-list>\n <ion-card-content>\n <p>\n You'll get much more out of Sneat.app if you integrate it with messaging\n apps you use. Benefits:\n </p>\n <ul>\n <li>Easily add contacts</li>\n <li>Get reminders</li>\n <li>Add todo/to_buy from your messenger</li>\n <li>etc.</li>\n </ul>\n </ion-card-content>\n }\n</ion-card>\n"]}
1
+ {"version":3,"file":"user-auth-accounts.component.js","sourceRoot":"","sources":["../../../../../../../../libs/auth/ui/src/lib/components/user-auth-providers/user-auth-accounts.component.ts","../../../../../../../../libs/auth/ui/src/lib/components/user-auth-providers/user-auth-accounts.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,OAAO,EACP,cAAc,EACd,OAAO,EACP,OAAO,EACP,cAAc,EACd,QAAQ,EACR,OAAO,GACR,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;;AAwB/E,MAAM,OAAO,yBAA0B,SAAQ,kBAAkB;IAtBjE;;QAuBE;;;WAGG;QACM,sBAAiB,GAAG,KAAK,CAAC,IAAI;8FAAC,CAAC;QAEtB,kBAAa,GAAG,MAAM,CACvC,SAAS;0FACV,CAAC;KACH;8GAVY,yBAAyB;kGAAzB,yBAAyB,+OAPzB;YACT;gBACE,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,2BAA2B;aACtC;SACF,iDCxCH,qwHAoGA,4CD3EI,4BAA4B,wEAC5B,gCAAgC,uJAChC,OAAO,yLACP,OAAO,yFACP,cAAc,kGACd,QAAQ,6FACR,OAAO,0NACP,OAAO,2JACP,cAAc;;2FASL,yBAAyB;kBAtBrC,SAAS;+BACE,0BAA0B,mBAEnB,uBAAuB,CAAC,MAAM,WACtC;wBACP,4BAA4B;wBAC5B,gCAAgC;wBAChC,OAAO;wBACP,OAAO;wBACP,cAAc;wBACd,QAAQ;wBACR,OAAO;wBACP,OAAO;wBACP,cAAc;qBACf,aACU;wBACT;4BACE,OAAO,EAAE,SAAS;4BAClB,QAAQ,EAAE,2BAA2B;yBACtC;qBACF","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n input,\n signal,\n} from '@angular/core';\nimport {\n IonCard,\n IonCardContent,\n IonIcon,\n IonItem,\n IonItemDivider,\n IonLabel,\n IonList,\n} from '@ionic/angular';\nimport { AuthProviderID } from '@sneat/auth-core';\nimport { ClassName, SneatBaseComponent } from '@sneat/ui';\nimport { TelegramAuthAccountComponent } from './telegram-auth-account.component';\nimport { UserAuthAProviderStatusComponent } from './user-auth-provider-status';\n\n@Component({\n selector: 'sneat-user-auth-accounts',\n templateUrl: './user-auth-accounts.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n TelegramAuthAccountComponent,\n UserAuthAProviderStatusComponent,\n IonCard,\n IonList,\n IonItemDivider,\n IonLabel,\n IonItem,\n IonIcon,\n IonCardContent,\n ],\n providers: [\n {\n provide: ClassName,\n useValue: 'UserAuthAccountsComponent',\n },\n ],\n})\nexport class UserAuthAccountsComponent extends SneatBaseComponent {\n /**\n * The messaging-apps section (WhatsApp, Viber) and its Sneat.app\n * copy. Apps that only need sign-in methods turn it off.\n */\n readonly showMessagingApps = input(true);\n\n protected readonly signingInWith = signal<AuthProviderID | undefined>(\n undefined,\n );\n}\n","<ion-card>\n <!--\t<ion-item color=\"light\" lines=\"full\">-->\n <!--\t\t<ion-label color=\"medium\"-->\n <!--\t\t\t><h2 style=\"font-weight: bold\">Authentication</h2></ion-label-->\n <!--\t\t>-->\n <!--\t</ion-item>-->\n <!--\t<ion-accordion-group [value]=\"integrations\">-->\n <!--\t\t<ion-accordion value=\"messaging-apps\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>First Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">First Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t\t<ion-accordion value=\"quick-logins\">-->\n <!--\t\t\t<ion-item slot=\"header\" color=\"light\">-->\n <!--\t\t\t\t<ion-label>Second Accordion</ion-label>-->\n <!--\t\t\t</ion-item>-->\n <!--\t\t\t<div class=\"ion-padding\" slot=\"content\">Second Content</div>-->\n <!--\t\t</ion-accordion>-->\n <!--\t</ion-accordion-group>-->\n <!--\t<ion-item>-->\n <!--\t\t<ion-segment [(ngModel)]=\"integrations\" style=\"margin-bottom: 0.5em\">-->\n <!--\t\t\t<ion-segment-button value=\"messaging-apps\"-->\n <!--\t\t\t\t>Messaging Apps-->\n <!--\t\t\t</ion-segment-button>-->\n <!--\t\t\t<ion-segment-button value=\"quick-logins\">Quick logins</ion-segment-button>-->\n <!--\t\t</ion-segment>-->\n <!--\t</ion-item>-->\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Quick logins</ion-label\n >\n </ion-item-divider>\n <sneat-user-auth-provider-status\n providerID=\"google.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"apple.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"microsoft.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-user-auth-provider-status\n providerID=\"github.com\"\n [signingInWith]=\"signingInWith()\"\n (signingInWithChange)=\"signingInWith.set($event)\"\n />\n <sneat-telegram-auth-account />\n </ion-list>\n @if (showMessagingApps()) {\n <ion-list>\n <ion-item-divider color=\"light\">\n <ion-label color=\"medium\" style=\"font-weight: bold\"\n >Messaging apps</ion-label\n >\n </ion-item-divider>\n\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">WhatsApp</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n <!--\t\t<ion-buttons slot=\"end\">-->\n <!--\t\t\t<ion-button color=\"danger\">-->\n <!--\t\t\t\t<ion-icon name=\"close-circle-outline\" slot=\"start\"></ion-icon>-->\n <!--\t\t\t\t<ion-label>I have no WhatsApp</ion-label>-->\n <!--\t\t\t</ion-button>-->\n <!--\t\t</ion-buttons>-->\n </ion-item>\n <ion-item>\n <ion-icon slot=\"start\" name=\"logo-whatsapp\"></ion-icon>\n <!-- TODO: place Viber logo here -->\n <ion-label color=\"medium\">\n <h3 style=\"font-weight: bold\">Viber</h3>\n <p>Not implemented yet - coming soon!</p>\n </ion-label>\n </ion-item>\n </ion-list>\n <ion-card-content>\n <p>\n You'll get much more out of Sneat.app if you integrate it with messaging\n apps you use. Benefits:\n </p>\n <ul>\n <li>Easily add contacts</li>\n <li>Get reminders</li>\n <li>Add todo/to_buy from your messenger</li>\n <li>etc.</li>\n </ul>\n </ion-card-content>\n }\n</ion-card>\n"]}
@@ -163,7 +163,7 @@ export class AuthPanelComponent {
163
163
  this.userService.onUserSignedIn(authState);
164
164
  }
165
165
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AuthPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
166
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: AuthPanelComponent, isStandalone: true, selector: "sneat-auth-panel", inputs: { returnTo: { classPropertyName: "returnTo", publicName: "returnTo", isSignal: true, isRequired: false, transformFunction: null }, initialMode: { classPropertyName: "initialMode", publicName: "initialMode", isSignal: true, isRequired: false, transformFunction: null }, showIntro: { classPropertyName: "showIntro", publicName: "showIntro", isSignal: true, isRequired: false, transformFunction: null }, showCredentials: { classPropertyName: "showCredentials", publicName: "showCredentials", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { accountReadyChange: "accountReadyChange" }, providers: [RandomIdService], ngImport: i0, template: "@if (authRecoveryNeeded()) {\n <div class=\"ion-padding ion-text-center\" role=\"alert\">\n <p>\n We couldn't complete sign-in. Try again with email or another sign-in\n method.\n </p>\n </div>\n}\n\n@if (pendingLink(); as link) {\n <div class=\"ion-padding ion-text-center\" role=\"alert\">\n <p>\n @if (link.email) {\n <b>{{ link.email }}</b> already has an account.\n } @else {\n This email already has an account.\n }\n Sign in the way you did before \u2014 with email or another sign-in method \u2014\n @if (link.autoLink) {\n and we'll connect {{ link.provider }} to it automatically.\n } @else {\n then connect {{ link.provider }} from your account page.\n }\n </p>\n </div>\n}\n\n@if (recordState() === 'failed') {\n <div class=\"ion-padding ion-text-center\" role=\"alert\">\n <p>Your account is still being prepared. Retry before continuing.</p>\n <ion-button fill=\"outline\" (click)=\"retryUserRecordInitialization()\">\n Retry account setup\n </ion-button>\n </div>\n} @else if (recordState() === 'loading') {\n <div class=\"ion-padding ion-text-center\" role=\"status\" aria-live=\"polite\">\n <ion-spinner name=\"lines-small\" />\n <p>Preparing your account\u2026</p>\n </div>\n} @else {\n @if (showCredentials() || authRecoveryNeeded()) {\n @if (showIntro()) {\n <p style=\"text-align: center; font-size: smaller\">\n <ion-text color=\"medium\">Sign in with your Sneat account.</ion-text>\n </p>\n }\n\n <sneat-email-login-form\n [returnTo]=\"safeReturnTo()\"\n [initialMode]=\"initialMode()\"\n (signingWithChange)=\"onEmailFormStatusChanged($event)\"\n (loggedIn)=\"onLoggedIn($event)\"\n />\n\n <div class=\"ion-padding-horizontal ion-text-center\">\n <ion-button\n fill=\"outline\"\n expand=\"block\"\n routerLink=\"/sso\"\n [queryParams]=\"ssoQueryParams()\"\n [disabled]=\"!!signingWith()\"\n >\n <ion-icon name=\"business-outline\" slot=\"start\" />\n Sign in with company SSO\n </ion-button>\n </div>\n\n @if (uiConfig.quickLoginProviders?.length !== 0) {\n <ion-card>\n @if (uiConfig.showQuickLoginHeader !== false) {\n <ion-item-divider color=\"light\">\n <ion-label\n color=\"medium\"\n style=\"text-align: center; width: 100%; font-weight: bold\"\n >\n Quick login\n </ion-label>\n </ion-item-divider>\n }\n <ion-grid class=\"ion-grid-layout\">\n @if (!isNativePlatform && providerVisible('telegram')) {\n <ion-row>\n <ion-col>\n <div class=\"ion-padding\" style=\"text-align: center\">\n <sneat-login-with-telegram />\n </div>\n </ion-col>\n </ion-row>\n }\n <sneat-auth-provider-buttons\n [providers]=\"oauthProviders\"\n [busy]=\"oauthSigningWith()\"\n [disabled]=\"!!signingWith()\"\n (providerSelected)=\"loginWith($event)\"\n />\n </ion-grid>\n </ion-card>\n }\n }\n}\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: AuthProviderButtonsComponent, selector: "sneat-auth-provider-buttons", inputs: ["providers", "busy", "disabled", "labels"], outputs: ["providerSelected"] }, { kind: "component", type: EmailLoginFormComponent, selector: "sneat-email-login-form", inputs: ["returnTo", "initialMode"], outputs: ["signingWithChange", "loggedIn"] }, { kind: "component", type: LoginWithTelegramComponent, selector: "sneat-login-with-telegram", inputs: ["isUserAuthenticated", "botID", "size", "requestAccess", "userPic"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"], outputs: ["ionFocus", "ionBlur"] }, { kind: "component", type: IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: 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"] }, { kind: "component", type: IonGrid, selector: "ion-grid", inputs: ["fixed"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonRow, selector: "ion-row" }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
166
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: AuthPanelComponent, isStandalone: true, selector: "sneat-auth-panel", inputs: { returnTo: { classPropertyName: "returnTo", publicName: "returnTo", isSignal: true, isRequired: false, transformFunction: null }, initialMode: { classPropertyName: "initialMode", publicName: "initialMode", isSignal: true, isRequired: false, transformFunction: null }, showIntro: { classPropertyName: "showIntro", publicName: "showIntro", isSignal: true, isRequired: false, transformFunction: null }, showCredentials: { classPropertyName: "showCredentials", publicName: "showCredentials", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { accountReadyChange: "accountReadyChange" }, providers: [RandomIdService], ngImport: i0, template: "@if (authRecoveryNeeded()) {\n <div class=\"ion-padding ion-text-center\" role=\"alert\">\n <p>\n We couldn't complete sign-in. Try again with email or another sign-in\n method.\n </p>\n </div>\n}\n\n@if (pendingLink(); as link) {\n <div class=\"ion-padding ion-text-center\" role=\"alert\">\n <p>\n @if (link.email) {\n <b>{{ link.email }}</b> already has an account.\n } @else {\n This email already has an account.\n }\n Sign in the way you did before \u2014 with email or another sign-in method \u2014\n @if (link.autoLink) {\n and we'll connect {{ link.provider }} to it automatically.\n } @else {\n then connect {{ link.provider }} from your account page.\n }\n </p>\n </div>\n}\n\n@if (recordState() === 'failed') {\n <div class=\"ion-padding ion-text-center\" role=\"alert\">\n <p>Your account is still being prepared. Retry before continuing.</p>\n <ion-button fill=\"outline\" (click)=\"retryUserRecordInitialization()\">\n Retry account setup\n </ion-button>\n </div>\n} @else if (recordState() === 'loading') {\n <div class=\"ion-padding ion-text-center\" role=\"status\" aria-live=\"polite\">\n <ion-spinner name=\"lines-small\" />\n <p>Preparing your account\u2026</p>\n </div>\n} @else {\n @if (showCredentials() || authRecoveryNeeded()) {\n @if (showIntro()) {\n <p style=\"text-align: center; font-size: smaller\">\n <ion-text color=\"medium\">Sign in with your Sneat account.</ion-text>\n </p>\n }\n\n <sneat-email-login-form\n [returnTo]=\"safeReturnTo()\"\n [initialMode]=\"initialMode()\"\n (signingWithChange)=\"onEmailFormStatusChanged($event)\"\n (loggedIn)=\"onLoggedIn($event)\"\n />\n\n <div class=\"ion-padding-horizontal ion-text-center\">\n <ion-button\n fill=\"outline\"\n expand=\"block\"\n routerLink=\"/sso\"\n [queryParams]=\"ssoQueryParams()\"\n [disabled]=\"!!signingWith()\"\n >\n <ion-icon name=\"business-outline\" slot=\"start\" />\n Sign in with company SSO\n </ion-button>\n </div>\n\n @if (uiConfig.quickLoginProviders?.length !== 0) {\n <ion-card>\n @if (uiConfig.showQuickLoginHeader !== false) {\n <ion-item-divider color=\"light\">\n <ion-label\n color=\"medium\"\n style=\"text-align: center; width: 100%; font-weight: bold\"\n >\n Quick login\n </ion-label>\n </ion-item-divider>\n }\n <ion-grid class=\"ion-grid-layout\">\n @if (!isNativePlatform && providerVisible('telegram')) {\n <ion-row>\n <ion-col>\n <div class=\"ion-padding\" style=\"text-align: center\">\n <sneat-login-with-telegram />\n </div>\n </ion-col>\n </ion-row>\n }\n <sneat-auth-provider-buttons\n [providers]=\"oauthProviders\"\n [busy]=\"oauthSigningWith()\"\n [disabled]=\"!!signingWith()\"\n (providerSelected)=\"loginWith($event)\"\n />\n </ion-grid>\n </ion-card>\n }\n }\n}\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: AuthProviderButtonsComponent, selector: "sneat-auth-provider-buttons", inputs: ["providers", "busy", "disabled", "labels"], outputs: ["providerSelected"] }, { kind: "component", type: EmailLoginFormComponent, selector: "sneat-email-login-form", inputs: ["returnTo", "initialMode"], outputs: ["signingWithChange", "loggedIn"] }, { kind: "component", type: LoginWithTelegramComponent, selector: "sneat-login-with-telegram", inputs: ["isUserAuthenticated", "botID", "size", "requestAccess", "userPic"], outputs: ["authenticated", "authenticationFailed"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"], outputs: ["ionFocus", "ionBlur"] }, { kind: "component", type: IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: 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"] }, { kind: "component", type: IonGrid, selector: "ion-grid", inputs: ["fixed"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonItemDivider, selector: "ion-item-divider", inputs: ["color", "mode", "sticky"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonRow, selector: "ion-row" }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
167
167
  }
168
168
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AuthPanelComponent, decorators: [{
169
169
  type: Component,