@edsis/angular 21.1.2 → 21.1.4
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/fesm2022/edsis-angular-auth.mjs +333 -98
- package/fesm2022/edsis-angular-auth.mjs.map +1 -1
- package/fesm2022/edsis-angular-sdk-access.mjs +1103 -1104
- package/fesm2022/edsis-angular-sdk-access.mjs.map +1 -1
- package/fesm2022/edsis-angular-sdk-approval.mjs +1016 -1017
- package/fesm2022/edsis-angular-sdk-approval.mjs.map +1 -1
- package/fesm2022/edsis-angular-sdk-auth.mjs +120 -121
- package/fesm2022/edsis-angular-sdk-auth.mjs.map +1 -1
- package/fesm2022/edsis-angular-sdk-employee.mjs +112 -113
- package/fesm2022/edsis-angular-sdk-employee.mjs.map +1 -1
- package/fesm2022/edsis-angular-sdk-health.mjs +41 -42
- package/fesm2022/edsis-angular-sdk-health.mjs.map +1 -1
- package/fesm2022/edsis-angular-sdk-shared.mjs +9 -9
- package/fesm2022/edsis-angular-sdk-storage.mjs +131 -132
- package/fesm2022/edsis-angular-sdk-storage.mjs.map +1 -1
- package/fesm2022/edsis-angular-sdk-user.mjs +204 -205
- package/fesm2022/edsis-angular-sdk-user.mjs.map +1 -1
- package/fesm2022/edsis-angular-sdk.mjs +6679 -24
- package/fesm2022/edsis-angular-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/types/edsis-angular-auth.d.ts +5 -4
- package/types/edsis-angular-sdk-access.d.ts +11 -12
- package/types/edsis-angular-sdk-approval.d.ts +11 -12
- package/types/edsis-angular-sdk-auth.d.ts +3 -4
- package/types/edsis-angular-sdk-employee.d.ts +3 -4
- package/types/edsis-angular-sdk-health.d.ts +3 -4
- package/types/edsis-angular-sdk-storage.d.ts +5 -6
- package/types/edsis-angular-sdk-user.d.ts +3 -4
- package/types/edsis-angular-sdk.d.ts +1918 -17
|
@@ -44,7 +44,7 @@ function normalizePath(value, fallback) {
|
|
|
44
44
|
return (normalizedValue.startsWith('/') ? normalizedValue : `/${normalizedValue}`);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
const AUTH_SESSION_STORAGE_KEYS = ['access_token', 'user_id', 'role'];
|
|
47
|
+
const AUTH_SESSION_STORAGE_KEYS = ['access_token', 'user_id', 'role', 'name'];
|
|
48
48
|
const EMPTY_SESSION_FINGERPRINT = '__empty_session__';
|
|
49
49
|
const JWT_PART_COUNT = 3;
|
|
50
50
|
const TOKEN_EXPIRY_SKEW_MS = 30_000;
|
|
@@ -136,10 +136,12 @@ function readStoredSession(documentRef) {
|
|
|
136
136
|
}
|
|
137
137
|
const userId = readSessionStorageValue(documentRef, 'user_id');
|
|
138
138
|
const role = readSessionStorageValue(documentRef, 'role');
|
|
139
|
+
const name = readSessionStorageValue(documentRef, 'name');
|
|
139
140
|
return {
|
|
140
141
|
accessToken,
|
|
141
142
|
userId: userId || undefined,
|
|
142
143
|
role: role || undefined,
|
|
144
|
+
name: name || undefined,
|
|
143
145
|
};
|
|
144
146
|
}
|
|
145
147
|
function persistSession(documentRef, sessionData) {
|
|
@@ -344,8 +346,8 @@ const guestOnlyGuard = async () => {
|
|
|
344
346
|
};
|
|
345
347
|
|
|
346
348
|
class AuthShellPage {
|
|
347
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
348
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
349
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AuthShellPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
350
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.13", type: AuthShellPage, isStandalone: true, selector: "edsis-auth-shell-page", host: { classAttribute: "block min-h-screen bg-background text-foreground" }, ngImport: i0, template: `
|
|
349
351
|
<section
|
|
350
352
|
class="relative isolate flex min-h-screen items-center justify-center overflow-hidden px-4 py-10 sm:px-6 lg:px-8">
|
|
351
353
|
<div
|
|
@@ -396,7 +398,7 @@ class AuthShellPage {
|
|
|
396
398
|
</section>
|
|
397
399
|
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
398
400
|
}
|
|
399
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AuthShellPage, decorators: [{
|
|
400
402
|
type: Component,
|
|
401
403
|
args: [{
|
|
402
404
|
selector: 'edsis-auth-shell-page',
|
|
@@ -517,15 +519,25 @@ class AuthLoginPage {
|
|
|
517
519
|
destroyRef = inject(DestroyRef);
|
|
518
520
|
formBuilder = inject(FormBuilder);
|
|
519
521
|
authService = inject(AuthService);
|
|
520
|
-
authConfig = inject(EDSIS_AUTH_CONFIG);
|
|
521
522
|
form = this.formBuilder.nonNullable.group({
|
|
522
523
|
email: ['', [Validators.required, Validators.email, Validators.maxLength(255)]],
|
|
523
524
|
});
|
|
524
525
|
isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : /* istanbul ignore next */ []));
|
|
525
526
|
responseMessage = signal(null, ...(ngDevMode ? [{ debugName: "responseMessage" }] : /* istanbul ignore next */ []));
|
|
526
527
|
errorMessage = signal(null, ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
527
|
-
verifyUrl = buildVerifyUrl(this.authConfig);
|
|
528
528
|
emailControl = this.form.controls.email;
|
|
529
|
+
hasInlineError() {
|
|
530
|
+
return this.emailControl.invalid && (this.emailControl.dirty || this.emailControl.touched);
|
|
531
|
+
}
|
|
532
|
+
fieldTone() {
|
|
533
|
+
if (this.hasInlineError() || this.errorMessage()) {
|
|
534
|
+
return 'error';
|
|
535
|
+
}
|
|
536
|
+
if (this.responseMessage()) {
|
|
537
|
+
return 'success';
|
|
538
|
+
}
|
|
539
|
+
return 'idle';
|
|
540
|
+
}
|
|
529
541
|
submit() {
|
|
530
542
|
if (this.form.invalid) {
|
|
531
543
|
this.form.markAllAsTouched();
|
|
@@ -537,84 +549,195 @@ class AuthLoginPage {
|
|
|
537
549
|
const email = this.emailControl.getRawValue().trim().toLowerCase();
|
|
538
550
|
this.emailControl.setValue(email);
|
|
539
551
|
this.authService
|
|
540
|
-
.
|
|
552
|
+
.requestMagicLoginLink({
|
|
541
553
|
body: {
|
|
542
554
|
email,
|
|
543
|
-
frontend_url: this.verifyUrl,
|
|
544
555
|
},
|
|
545
556
|
})
|
|
546
557
|
.pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.isSubmitting.set(false)))
|
|
547
558
|
.subscribe({
|
|
548
559
|
next: (response) => {
|
|
549
|
-
this.responseMessage.set(getResponseMessage(response, 'Magic link berhasil dikirim
|
|
560
|
+
this.responseMessage.set(getResponseMessage(response, 'Magic link berhasil dikirim.'));
|
|
550
561
|
},
|
|
551
562
|
error: (error) => {
|
|
552
563
|
this.errorMessage.set(getErrorMessage(error, 'Gagal mengirim magic link.'));
|
|
553
564
|
},
|
|
554
565
|
});
|
|
555
566
|
}
|
|
556
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
557
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
567
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AuthLoginPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
568
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: AuthLoginPage, isStandalone: true, selector: "edsis-auth-login-page", host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
558
569
|
<div class="space-y-8">
|
|
559
570
|
<header class="space-y-3">
|
|
560
571
|
<p class="text-sm font-medium uppercase tracking-[0.24em] text-muted-foreground">Login</p>
|
|
561
572
|
<div class="space-y-2">
|
|
562
|
-
<h2 class="text-3xl font-semibold tracking-tight">
|
|
573
|
+
<h2 class="text-3xl font-semibold tracking-tight">Verifikasi email untuk masuk.</h2>
|
|
563
574
|
<p class="max-w-xl text-sm leading-6 text-muted-foreground">
|
|
564
|
-
Masukkan email yang terdaftar
|
|
565
|
-
ke halaman verify.
|
|
575
|
+
Masukkan email yang terdaftar, silahkan klik link pada email yang diterima untuk masuk ke aplikasi.
|
|
566
576
|
</p>
|
|
567
577
|
</div>
|
|
568
578
|
</header>
|
|
569
579
|
|
|
570
580
|
<form class="space-y-5" [formGroup]="form" (ngSubmit)="submit()">
|
|
571
581
|
<div class="space-y-2">
|
|
572
|
-
<
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
<
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
<p class="text-sm text-muted-foreground">Link verifikasi akan diarahkan ke {{ verifyUrl }}.</p>
|
|
592
|
-
}
|
|
593
|
-
</div>
|
|
582
|
+
<div
|
|
583
|
+
class="grid grid-cols-[2.5rem_minmax(0,1fr)_2.5rem] grid-rows-[2rem_auto_2rem_auto] sm:grid-cols-[3rem_minmax(0,1fr)_3rem]">
|
|
584
|
+
<div aria-hidden="true" class="relative border-b border-r border-border/70">
|
|
585
|
+
<div class="absolute bottom-0 right-0 h-7 w-7 translate-x-1/2 translate-y-1/2">
|
|
586
|
+
<div
|
|
587
|
+
class="absolute left-1/2 top-1/2 h-4 -translate-x-1/2 -translate-y-1/2 border-l-2 border-primary"></div>
|
|
588
|
+
<div
|
|
589
|
+
class="absolute left-1/2 top-1/2 w-4 -translate-x-1/2 -translate-y-1/2 border-t-2 border-primary"></div>
|
|
590
|
+
</div>
|
|
591
|
+
</div>
|
|
592
|
+
<div aria-hidden="true" class="border-b border-border/70"></div>
|
|
593
|
+
<div aria-hidden="true" class="relative border-b border-l border-border/70">
|
|
594
|
+
<div class="absolute bottom-0 left-0 h-7 w-7 -translate-x-1/2 translate-y-1/2">
|
|
595
|
+
<div
|
|
596
|
+
class="absolute left-1/2 top-1/2 h-4 -translate-x-1/2 -translate-y-1/2 border-l-2 border-primary"></div>
|
|
597
|
+
<div
|
|
598
|
+
class="absolute left-1/2 top-1/2 w-4 -translate-x-1/2 -translate-y-1/2 border-t-2 border-primary"></div>
|
|
599
|
+
</div>
|
|
600
|
+
</div>
|
|
594
601
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
602
|
+
<div aria-hidden="true" class="border-r border-border/70"></div>
|
|
603
|
+
<div
|
|
604
|
+
class="relative z-10 flex items-center gap-4 border bg-card px-6 py-4 shadow-sm transition focus-within:ring-2 focus-within:ring-primary/15 sm:px-8"
|
|
605
|
+
[class.border-border]="fieldTone() === 'idle'"
|
|
606
|
+
[class.border-destructive]="fieldTone() === 'error'"
|
|
607
|
+
[class.border-emerald-500]="fieldTone() === 'success'">
|
|
608
|
+
<span aria-hidden="true" class="flex shrink-0 items-center justify-center text-primary">
|
|
609
|
+
<svg
|
|
610
|
+
viewBox="0 0 24 24"
|
|
611
|
+
class="h-6 w-6 fill-none stroke-current"
|
|
612
|
+
stroke-width="1.8"
|
|
613
|
+
stroke-linecap="round"
|
|
614
|
+
stroke-linejoin="round">
|
|
615
|
+
<path d="M4 7.5h16" />
|
|
616
|
+
<path d="M5 6h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z" />
|
|
617
|
+
<path d="m5 8 7 5 7-5" />
|
|
618
|
+
</svg>
|
|
619
|
+
</span>
|
|
620
|
+
|
|
621
|
+
<input
|
|
622
|
+
id="email"
|
|
623
|
+
type="email"
|
|
624
|
+
inputmode="email"
|
|
625
|
+
autocomplete="email"
|
|
626
|
+
aria-label="Email"
|
|
627
|
+
formControlName="email"
|
|
628
|
+
placeholder="your@email.com"
|
|
629
|
+
class="min-w-0 grow border-0 bg-transparent text-base font-medium text-foreground outline-none placeholder:font-normal placeholder:text-muted-foreground/80 md:text-lg" />
|
|
630
|
+
|
|
631
|
+
<button
|
|
632
|
+
type="submit"
|
|
633
|
+
[disabled]="form.invalid || isSubmitting()"
|
|
634
|
+
class="inline-flex shrink-0 items-center justify-center bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground transition hover:opacity-95 focus:outline-none focus:ring-2 focus:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-60">
|
|
635
|
+
{{ isSubmitting() ? 'Mengirim...' : 'Kirim' }}
|
|
636
|
+
</button>
|
|
637
|
+
</div>
|
|
638
|
+
<div aria-hidden="true" class="border-l border-border/70"></div>
|
|
639
|
+
|
|
640
|
+
<div aria-hidden="true" class="relative border-r border-t border-border/70">
|
|
641
|
+
<div class="absolute right-0 top-0 h-7 w-7 translate-x-1/2 -translate-y-1/2">
|
|
642
|
+
<div
|
|
643
|
+
class="absolute left-1/2 top-1/2 h-4 -translate-x-1/2 -translate-y-1/2 border-l-2 border-primary"></div>
|
|
644
|
+
<div
|
|
645
|
+
class="absolute left-1/2 top-1/2 w-4 -translate-x-1/2 -translate-y-1/2 border-t-2 border-primary"></div>
|
|
646
|
+
</div>
|
|
647
|
+
</div>
|
|
648
|
+
<div aria-hidden="true" class="border-t border-border/70"></div>
|
|
649
|
+
<div aria-hidden="true" class="relative border-l border-t border-border/70">
|
|
650
|
+
<div class="absolute left-0 top-0 h-7 w-7 -translate-x-1/2 -translate-y-1/2">
|
|
651
|
+
<div
|
|
652
|
+
class="absolute left-1/2 top-1/2 h-4 -translate-x-1/2 -translate-y-1/2 border-l-2 border-primary"></div>
|
|
653
|
+
<div
|
|
654
|
+
class="absolute left-1/2 top-1/2 w-4 -translate-x-1/2 -translate-y-1/2 border-t-2 border-primary"></div>
|
|
655
|
+
</div>
|
|
656
|
+
</div>
|
|
600
657
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
658
|
+
<div aria-hidden="true" class="border-r border-border/70"></div>
|
|
659
|
+
<div class="px-4 pt-4 text-center sm:px-6">
|
|
660
|
+
@if (hasInlineError()) {
|
|
661
|
+
<p class="text-sm text-destructive">
|
|
662
|
+
@if (emailControl.hasError('required')) {
|
|
663
|
+
Email wajib diisi.
|
|
664
|
+
} @else {
|
|
665
|
+
Gunakan format email yang valid dengan panjang maksimal 255 karakter.
|
|
666
|
+
}
|
|
667
|
+
</p>
|
|
668
|
+
} @else if (responseMessage()) {
|
|
669
|
+
<p class="text-sm text-emerald-700">
|
|
670
|
+
{{ responseMessage() }}
|
|
671
|
+
</p>
|
|
672
|
+
} @else if (errorMessage()) {
|
|
673
|
+
<p class="text-sm text-destructive">
|
|
674
|
+
{{ errorMessage() }}
|
|
675
|
+
</p>
|
|
676
|
+
}
|
|
677
|
+
</div>
|
|
678
|
+
<div aria-hidden="true" class="border-l border-border/70"></div>
|
|
604
679
|
</div>
|
|
605
|
-
}
|
|
606
680
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
681
|
+
<div class="space-y-4 pt-4">
|
|
682
|
+
<div
|
|
683
|
+
class="flex items-center justify-center text-sm font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
|
684
|
+
Atau
|
|
685
|
+
</div>
|
|
686
|
+
|
|
687
|
+
<div class="flex flex-wrap items-center justify-center gap-3">
|
|
688
|
+
<button
|
|
689
|
+
type="button"
|
|
690
|
+
class="inline-flex h-12 items-center justify-center gap-3 bg-card px-4 text-[0.74rem] font-medium uppercase tracking-[0.16em] text-card-foreground transition-[background-color,color] duration-150 hover:bg-secondary hover:text-destructive">
|
|
691
|
+
<span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
|
|
692
|
+
<svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
|
|
693
|
+
<path
|
|
694
|
+
fill="#EA4335"
|
|
695
|
+
d="M12.24 10.285v3.965h5.514c-.24 1.285-.96 2.374-2.045 3.105l3.305 2.565c1.925-1.775 3.03-4.39 3.03-7.49 0-.73-.065-1.43-.185-2.145z" />
|
|
696
|
+
<path
|
|
697
|
+
fill="#34A853"
|
|
698
|
+
d="M12 22c2.7 0 4.965-.895 6.62-2.425l-3.305-2.565c-.915.615-2.085.985-3.315.985-2.545 0-4.7-1.72-5.47-4.03H3.115v2.53A9.996 9.996 0 0 0 12 22" />
|
|
699
|
+
<path
|
|
700
|
+
fill="#4A90E2"
|
|
701
|
+
d="M6.53 13.965A5.996 5.996 0 0 1 6.24 12c0-.68.115-1.34.29-1.965v-2.53H3.115A9.996 9.996 0 0 0 2 12c0 1.61.385 3.135 1.115 4.495z" />
|
|
702
|
+
<path
|
|
703
|
+
fill="#FBBC05"
|
|
704
|
+
d="M12 6.005c1.47 0 2.79.505 3.83 1.495l2.87-2.87C16.96 3.01 14.695 2 12 2a9.996 9.996 0 0 0-8.885 5.505l3.415 2.53c.77-2.31 2.925-4.03 5.47-4.03" />
|
|
705
|
+
</svg>
|
|
706
|
+
</span>
|
|
707
|
+
Google
|
|
708
|
+
</button>
|
|
709
|
+
<button
|
|
710
|
+
type="button"
|
|
711
|
+
class="inline-flex h-12 items-center justify-center gap-3 bg-card px-4 text-[0.74rem] font-medium uppercase tracking-[0.16em] text-card-foreground transition-[background-color,color] duration-150 hover:bg-secondary hover:text-destructive">
|
|
712
|
+
<span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
|
|
713
|
+
<svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
|
|
714
|
+
<path fill="#F25022" d="M2 2h9.5v9.5H2z" />
|
|
715
|
+
<path fill="#7FBA00" d="M12.5 2H22v9.5h-9.5z" />
|
|
716
|
+
<path fill="#00A4EF" d="M2 12.5h9.5V22H2z" />
|
|
717
|
+
<path fill="#FFB900" d="M12.5 12.5H22V22h-9.5z" />
|
|
718
|
+
</svg>
|
|
719
|
+
</span>
|
|
720
|
+
Microsoft
|
|
721
|
+
</button>
|
|
722
|
+
<button
|
|
723
|
+
type="button"
|
|
724
|
+
class="inline-flex h-12 items-center justify-center gap-3 bg-card px-4 text-[0.74rem] font-medium uppercase tracking-[0.16em] text-card-foreground transition-[background-color,color] duration-150 hover:bg-secondary hover:text-destructive">
|
|
725
|
+
<span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
|
|
726
|
+
<svg viewBox="0 0 24 24" class="size-5 fill-current" xmlns="http://www.w3.org/2000/svg">
|
|
727
|
+
<path
|
|
728
|
+
d="M15.482 2c.13 1.25-.31 2.19-.84 2.81-.55.65-1.47 1.15-2.39 1.08-.12-1.21.38-2.17.92-2.79.6-.68 1.61-1.17 2.31-1.1Zm3.94 16.85c-.41.94-.91 1.8-1.54 2.59-.86 1.07-1.57 1.8-2.39 1.8-.59 0-.99-.17-1.44-.36-.47-.2-.95-.4-1.63-.4-.71 0-1.22.2-1.7.4-.46.19-.85.35-1.38.37-.79.03-1.55-.8-2.42-1.87-1.86-2.28-3.3-6.43-1.38-9.77.96-1.66 2.68-2.72 4.55-2.75.71-.01 1.39.21 1.98.41.45.15.86.29 1.19.29.3 0 .73-.15 1.19-.31.68-.23 1.46-.49 2.28-.42 1.14.09 2.17.55 2.98 1.38-2.66 1.45-2.23 5.2.71 6.54Z" />
|
|
729
|
+
</svg>
|
|
730
|
+
</span>
|
|
731
|
+
Apple
|
|
732
|
+
</button>
|
|
733
|
+
</div>
|
|
734
|
+
</div>
|
|
735
|
+
</div>
|
|
613
736
|
</form>
|
|
614
737
|
</div>
|
|
615
738
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
616
739
|
}
|
|
617
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AuthLoginPage, decorators: [{
|
|
618
741
|
type: Component,
|
|
619
742
|
args: [{
|
|
620
743
|
selector: 'edsis-auth-login-page',
|
|
@@ -627,57 +750,169 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
627
750
|
<header class="space-y-3">
|
|
628
751
|
<p class="text-sm font-medium uppercase tracking-[0.24em] text-muted-foreground">Login</p>
|
|
629
752
|
<div class="space-y-2">
|
|
630
|
-
<h2 class="text-3xl font-semibold tracking-tight">
|
|
753
|
+
<h2 class="text-3xl font-semibold tracking-tight">Verifikasi email untuk masuk.</h2>
|
|
631
754
|
<p class="max-w-xl text-sm leading-6 text-muted-foreground">
|
|
632
|
-
Masukkan email yang terdaftar
|
|
633
|
-
ke halaman verify.
|
|
755
|
+
Masukkan email yang terdaftar, silahkan klik link pada email yang diterima untuk masuk ke aplikasi.
|
|
634
756
|
</p>
|
|
635
757
|
</div>
|
|
636
758
|
</header>
|
|
637
759
|
|
|
638
760
|
<form class="space-y-5" [formGroup]="form" (ngSubmit)="submit()">
|
|
639
761
|
<div class="space-y-2">
|
|
640
|
-
<
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
<
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
<p class="text-sm text-muted-foreground">Link verifikasi akan diarahkan ke {{ verifyUrl }}.</p>
|
|
660
|
-
}
|
|
661
|
-
</div>
|
|
762
|
+
<div
|
|
763
|
+
class="grid grid-cols-[2.5rem_minmax(0,1fr)_2.5rem] grid-rows-[2rem_auto_2rem_auto] sm:grid-cols-[3rem_minmax(0,1fr)_3rem]">
|
|
764
|
+
<div aria-hidden="true" class="relative border-b border-r border-border/70">
|
|
765
|
+
<div class="absolute bottom-0 right-0 h-7 w-7 translate-x-1/2 translate-y-1/2">
|
|
766
|
+
<div
|
|
767
|
+
class="absolute left-1/2 top-1/2 h-4 -translate-x-1/2 -translate-y-1/2 border-l-2 border-primary"></div>
|
|
768
|
+
<div
|
|
769
|
+
class="absolute left-1/2 top-1/2 w-4 -translate-x-1/2 -translate-y-1/2 border-t-2 border-primary"></div>
|
|
770
|
+
</div>
|
|
771
|
+
</div>
|
|
772
|
+
<div aria-hidden="true" class="border-b border-border/70"></div>
|
|
773
|
+
<div aria-hidden="true" class="relative border-b border-l border-border/70">
|
|
774
|
+
<div class="absolute bottom-0 left-0 h-7 w-7 -translate-x-1/2 translate-y-1/2">
|
|
775
|
+
<div
|
|
776
|
+
class="absolute left-1/2 top-1/2 h-4 -translate-x-1/2 -translate-y-1/2 border-l-2 border-primary"></div>
|
|
777
|
+
<div
|
|
778
|
+
class="absolute left-1/2 top-1/2 w-4 -translate-x-1/2 -translate-y-1/2 border-t-2 border-primary"></div>
|
|
779
|
+
</div>
|
|
780
|
+
</div>
|
|
662
781
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
782
|
+
<div aria-hidden="true" class="border-r border-border/70"></div>
|
|
783
|
+
<div
|
|
784
|
+
class="relative z-10 flex items-center gap-4 border bg-card px-6 py-4 shadow-sm transition focus-within:ring-2 focus-within:ring-primary/15 sm:px-8"
|
|
785
|
+
[class.border-border]="fieldTone() === 'idle'"
|
|
786
|
+
[class.border-destructive]="fieldTone() === 'error'"
|
|
787
|
+
[class.border-emerald-500]="fieldTone() === 'success'">
|
|
788
|
+
<span aria-hidden="true" class="flex shrink-0 items-center justify-center text-primary">
|
|
789
|
+
<svg
|
|
790
|
+
viewBox="0 0 24 24"
|
|
791
|
+
class="h-6 w-6 fill-none stroke-current"
|
|
792
|
+
stroke-width="1.8"
|
|
793
|
+
stroke-linecap="round"
|
|
794
|
+
stroke-linejoin="round">
|
|
795
|
+
<path d="M4 7.5h16" />
|
|
796
|
+
<path d="M5 6h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z" />
|
|
797
|
+
<path d="m5 8 7 5 7-5" />
|
|
798
|
+
</svg>
|
|
799
|
+
</span>
|
|
800
|
+
|
|
801
|
+
<input
|
|
802
|
+
id="email"
|
|
803
|
+
type="email"
|
|
804
|
+
inputmode="email"
|
|
805
|
+
autocomplete="email"
|
|
806
|
+
aria-label="Email"
|
|
807
|
+
formControlName="email"
|
|
808
|
+
placeholder="your@email.com"
|
|
809
|
+
class="min-w-0 grow border-0 bg-transparent text-base font-medium text-foreground outline-none placeholder:font-normal placeholder:text-muted-foreground/80 md:text-lg" />
|
|
668
810
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
811
|
+
<button
|
|
812
|
+
type="submit"
|
|
813
|
+
[disabled]="form.invalid || isSubmitting()"
|
|
814
|
+
class="inline-flex shrink-0 items-center justify-center bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground transition hover:opacity-95 focus:outline-none focus:ring-2 focus:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-60">
|
|
815
|
+
{{ isSubmitting() ? 'Mengirim...' : 'Kirim' }}
|
|
816
|
+
</button>
|
|
817
|
+
</div>
|
|
818
|
+
<div aria-hidden="true" class="border-l border-border/70"></div>
|
|
819
|
+
|
|
820
|
+
<div aria-hidden="true" class="relative border-r border-t border-border/70">
|
|
821
|
+
<div class="absolute right-0 top-0 h-7 w-7 translate-x-1/2 -translate-y-1/2">
|
|
822
|
+
<div
|
|
823
|
+
class="absolute left-1/2 top-1/2 h-4 -translate-x-1/2 -translate-y-1/2 border-l-2 border-primary"></div>
|
|
824
|
+
<div
|
|
825
|
+
class="absolute left-1/2 top-1/2 w-4 -translate-x-1/2 -translate-y-1/2 border-t-2 border-primary"></div>
|
|
826
|
+
</div>
|
|
827
|
+
</div>
|
|
828
|
+
<div aria-hidden="true" class="border-t border-border/70"></div>
|
|
829
|
+
<div aria-hidden="true" class="relative border-l border-t border-border/70">
|
|
830
|
+
<div class="absolute left-0 top-0 h-7 w-7 -translate-x-1/2 -translate-y-1/2">
|
|
831
|
+
<div
|
|
832
|
+
class="absolute left-1/2 top-1/2 h-4 -translate-x-1/2 -translate-y-1/2 border-l-2 border-primary"></div>
|
|
833
|
+
<div
|
|
834
|
+
class="absolute left-1/2 top-1/2 w-4 -translate-x-1/2 -translate-y-1/2 border-t-2 border-primary"></div>
|
|
835
|
+
</div>
|
|
836
|
+
</div>
|
|
837
|
+
|
|
838
|
+
<div aria-hidden="true" class="border-r border-border/70"></div>
|
|
839
|
+
<div class="px-4 pt-4 text-center sm:px-6">
|
|
840
|
+
@if (hasInlineError()) {
|
|
841
|
+
<p class="text-sm text-destructive">
|
|
842
|
+
@if (emailControl.hasError('required')) {
|
|
843
|
+
Email wajib diisi.
|
|
844
|
+
} @else {
|
|
845
|
+
Gunakan format email yang valid dengan panjang maksimal 255 karakter.
|
|
846
|
+
}
|
|
847
|
+
</p>
|
|
848
|
+
} @else if (responseMessage()) {
|
|
849
|
+
<p class="text-sm text-emerald-700">
|
|
850
|
+
{{ responseMessage() }}
|
|
851
|
+
</p>
|
|
852
|
+
} @else if (errorMessage()) {
|
|
853
|
+
<p class="text-sm text-destructive">
|
|
854
|
+
{{ errorMessage() }}
|
|
855
|
+
</p>
|
|
856
|
+
}
|
|
857
|
+
</div>
|
|
858
|
+
<div aria-hidden="true" class="border-l border-border/70"></div>
|
|
672
859
|
</div>
|
|
673
|
-
}
|
|
674
860
|
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
861
|
+
<div class="space-y-4 pt-4">
|
|
862
|
+
<div
|
|
863
|
+
class="flex items-center justify-center text-sm font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
|
864
|
+
Atau
|
|
865
|
+
</div>
|
|
866
|
+
|
|
867
|
+
<div class="flex flex-wrap items-center justify-center gap-3">
|
|
868
|
+
<button
|
|
869
|
+
type="button"
|
|
870
|
+
class="inline-flex h-12 items-center justify-center gap-3 bg-card px-4 text-[0.74rem] font-medium uppercase tracking-[0.16em] text-card-foreground transition-[background-color,color] duration-150 hover:bg-secondary hover:text-destructive">
|
|
871
|
+
<span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
|
|
872
|
+
<svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
|
|
873
|
+
<path
|
|
874
|
+
fill="#EA4335"
|
|
875
|
+
d="M12.24 10.285v3.965h5.514c-.24 1.285-.96 2.374-2.045 3.105l3.305 2.565c1.925-1.775 3.03-4.39 3.03-7.49 0-.73-.065-1.43-.185-2.145z" />
|
|
876
|
+
<path
|
|
877
|
+
fill="#34A853"
|
|
878
|
+
d="M12 22c2.7 0 4.965-.895 6.62-2.425l-3.305-2.565c-.915.615-2.085.985-3.315.985-2.545 0-4.7-1.72-5.47-4.03H3.115v2.53A9.996 9.996 0 0 0 12 22" />
|
|
879
|
+
<path
|
|
880
|
+
fill="#4A90E2"
|
|
881
|
+
d="M6.53 13.965A5.996 5.996 0 0 1 6.24 12c0-.68.115-1.34.29-1.965v-2.53H3.115A9.996 9.996 0 0 0 2 12c0 1.61.385 3.135 1.115 4.495z" />
|
|
882
|
+
<path
|
|
883
|
+
fill="#FBBC05"
|
|
884
|
+
d="M12 6.005c1.47 0 2.79.505 3.83 1.495l2.87-2.87C16.96 3.01 14.695 2 12 2a9.996 9.996 0 0 0-8.885 5.505l3.415 2.53c.77-2.31 2.925-4.03 5.47-4.03" />
|
|
885
|
+
</svg>
|
|
886
|
+
</span>
|
|
887
|
+
Google
|
|
888
|
+
</button>
|
|
889
|
+
<button
|
|
890
|
+
type="button"
|
|
891
|
+
class="inline-flex h-12 items-center justify-center gap-3 bg-card px-4 text-[0.74rem] font-medium uppercase tracking-[0.16em] text-card-foreground transition-[background-color,color] duration-150 hover:bg-secondary hover:text-destructive">
|
|
892
|
+
<span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
|
|
893
|
+
<svg viewBox="0 0 24 24" class="size-5" xmlns="http://www.w3.org/2000/svg">
|
|
894
|
+
<path fill="#F25022" d="M2 2h9.5v9.5H2z" />
|
|
895
|
+
<path fill="#7FBA00" d="M12.5 2H22v9.5h-9.5z" />
|
|
896
|
+
<path fill="#00A4EF" d="M2 12.5h9.5V22H2z" />
|
|
897
|
+
<path fill="#FFB900" d="M12.5 12.5H22V22h-9.5z" />
|
|
898
|
+
</svg>
|
|
899
|
+
</span>
|
|
900
|
+
Microsoft
|
|
901
|
+
</button>
|
|
902
|
+
<button
|
|
903
|
+
type="button"
|
|
904
|
+
class="inline-flex h-12 items-center justify-center gap-3 bg-card px-4 text-[0.74rem] font-medium uppercase tracking-[0.16em] text-card-foreground transition-[background-color,color] duration-150 hover:bg-secondary hover:text-destructive">
|
|
905
|
+
<span class="inline-flex size-6 shrink-0 items-center justify-center" aria-hidden="true">
|
|
906
|
+
<svg viewBox="0 0 24 24" class="size-5 fill-current" xmlns="http://www.w3.org/2000/svg">
|
|
907
|
+
<path
|
|
908
|
+
d="M15.482 2c.13 1.25-.31 2.19-.84 2.81-.55.65-1.47 1.15-2.39 1.08-.12-1.21.38-2.17.92-2.79.6-.68 1.61-1.17 2.31-1.1Zm3.94 16.85c-.41.94-.91 1.8-1.54 2.59-.86 1.07-1.57 1.8-2.39 1.8-.59 0-.99-.17-1.44-.36-.47-.2-.95-.4-1.63-.4-.71 0-1.22.2-1.7.4-.46.19-.85.35-1.38.37-.79.03-1.55-.8-2.42-1.87-1.86-2.28-3.3-6.43-1.38-9.77.96-1.66 2.68-2.72 4.55-2.75.71-.01 1.39.21 1.98.41.45.15.86.29 1.19.29.3 0 .73-.15 1.19-.31.68-.23 1.46-.49 2.28-.42 1.14.09 2.17.55 2.98 1.38-2.66 1.45-2.23 5.2.71 6.54Z" />
|
|
909
|
+
</svg>
|
|
910
|
+
</span>
|
|
911
|
+
Apple
|
|
912
|
+
</button>
|
|
913
|
+
</div>
|
|
914
|
+
</div>
|
|
915
|
+
</div>
|
|
681
916
|
</form>
|
|
682
917
|
</div>
|
|
683
918
|
`,
|
|
@@ -716,8 +951,8 @@ class AuthLogoutPage {
|
|
|
716
951
|
},
|
|
717
952
|
});
|
|
718
953
|
}
|
|
719
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
720
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
954
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AuthLogoutPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
955
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: AuthLogoutPage, isStandalone: true, selector: "edsis-auth-logout-page", host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
721
956
|
<div class="space-y-6">
|
|
722
957
|
<header class="space-y-3">
|
|
723
958
|
<p class="text-sm font-medium uppercase tracking-[0.24em] text-muted-foreground">Logout</p>
|
|
@@ -753,7 +988,7 @@ class AuthLogoutPage {
|
|
|
753
988
|
</div>
|
|
754
989
|
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
755
990
|
}
|
|
756
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AuthLogoutPage, decorators: [{
|
|
757
992
|
type: Component,
|
|
758
993
|
args: [{
|
|
759
994
|
selector: 'edsis-auth-logout-page',
|
|
@@ -856,8 +1091,8 @@ class AuthVerifyPage {
|
|
|
856
1091
|
},
|
|
857
1092
|
});
|
|
858
1093
|
}
|
|
859
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
860
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1094
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AuthVerifyPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1095
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: AuthVerifyPage, isStandalone: true, selector: "edsis-auth-verify-page", host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
861
1096
|
<div class="space-y-6">
|
|
862
1097
|
<header class="space-y-3">
|
|
863
1098
|
<p class="text-sm font-medium uppercase tracking-[0.24em] text-muted-foreground">Verify</p>
|
|
@@ -893,7 +1128,7 @@ class AuthVerifyPage {
|
|
|
893
1128
|
</div>
|
|
894
1129
|
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
895
1130
|
}
|
|
896
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AuthVerifyPage, decorators: [{
|
|
897
1132
|
type: Component,
|
|
898
1133
|
args: [{
|
|
899
1134
|
selector: 'edsis-auth-verify-page',
|