@orechio/platform-angular 0.6.0 → 0.7.1

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 (37) hide show
  1. package/README.md +134 -64
  2. package/fesm2022/orechio-platform-angular-account-account-client-mPl0tzMg.mjs.map +1 -1
  3. package/fesm2022/{orechio-platform-angular-account-forgot-password.page-5_8R5B4m.mjs → orechio-platform-angular-account-forgot-password.page-L-Z-s49p.mjs} +85 -85
  4. package/fesm2022/orechio-platform-angular-account-forgot-password.page-L-Z-s49p.mjs.map +1 -0
  5. package/fesm2022/{orechio-platform-angular-account-initial-branch.page-Cmy07JGF.mjs → orechio-platform-angular-account-initial-branch.page-C8a1eU3L.mjs} +61 -61
  6. package/fesm2022/orechio-platform-angular-account-initial-branch.page-C8a1eU3L.mjs.map +1 -0
  7. package/fesm2022/{orechio-platform-angular-account-resend-verification.page-qckKAlPk.mjs → orechio-platform-angular-account-resend-verification.page-C3lk1vNj.mjs} +69 -69
  8. package/fesm2022/orechio-platform-angular-account-resend-verification.page-C3lk1vNj.mjs.map +1 -0
  9. package/fesm2022/{orechio-platform-angular-account-token-password.page-AHqb8mFk.mjs → orechio-platform-angular-account-token-password.page-1vn5XGVu.mjs} +73 -73
  10. package/fesm2022/orechio-platform-angular-account-token-password.page-1vn5XGVu.mjs.map +1 -0
  11. package/fesm2022/{orechio-platform-angular-account-verify-email.page-CHs0EwDf.mjs → orechio-platform-angular-account-verify-email.page-xulVDiOn.mjs} +35 -35
  12. package/fesm2022/orechio-platform-angular-account-verify-email.page-xulVDiOn.mjs.map +1 -0
  13. package/fesm2022/orechio-platform-angular-account.mjs +6 -6
  14. package/fesm2022/orechio-platform-angular-account.mjs.map +1 -1
  15. package/fesm2022/orechio-platform-angular-billing-billing-format-0nlddK-x.mjs +194 -0
  16. package/fesm2022/orechio-platform-angular-billing-billing-format-0nlddK-x.mjs.map +1 -0
  17. package/fesm2022/orechio-platform-angular-billing-checkout.page-CHU_Drpu.mjs +186 -0
  18. package/fesm2022/orechio-platform-angular-billing-checkout.page-CHU_Drpu.mjs.map +1 -0
  19. package/fesm2022/orechio-platform-angular-billing-invoice.page-BVyWur3o.mjs +136 -0
  20. package/fesm2022/orechio-platform-angular-billing-invoice.page-BVyWur3o.mjs.map +1 -0
  21. package/fesm2022/orechio-platform-angular-billing-invoices.page-BiEm3hRf.mjs +105 -0
  22. package/fesm2022/orechio-platform-angular-billing-invoices.page-BiEm3hRf.mjs.map +1 -0
  23. package/fesm2022/orechio-platform-angular-billing-pix-panel.component-B608dQmc.mjs +81 -0
  24. package/fesm2022/orechio-platform-angular-billing-pix-panel.component-B608dQmc.mjs.map +1 -0
  25. package/fesm2022/orechio-platform-angular-billing-profile.page-Baa6uoM6.mjs +282 -0
  26. package/fesm2022/orechio-platform-angular-billing-profile.page-Baa6uoM6.mjs.map +1 -0
  27. package/fesm2022/orechio-platform-angular-billing-subscription.page-9NF8bWhu.mjs +160 -0
  28. package/fesm2022/orechio-platform-angular-billing-subscription.page-9NF8bWhu.mjs.map +1 -0
  29. package/fesm2022/orechio-platform-angular-billing.mjs +69 -0
  30. package/fesm2022/orechio-platform-angular-billing.mjs.map +1 -0
  31. package/package.json +5 -1
  32. package/types/orechio-platform-angular-billing.d.ts +32 -0
  33. package/fesm2022/orechio-platform-angular-account-forgot-password.page-5_8R5B4m.mjs.map +0 -1
  34. package/fesm2022/orechio-platform-angular-account-initial-branch.page-Cmy07JGF.mjs.map +0 -1
  35. package/fesm2022/orechio-platform-angular-account-resend-verification.page-qckKAlPk.mjs.map +0 -1
  36. package/fesm2022/orechio-platform-angular-account-token-password.page-AHqb8mFk.mjs.map +0 -1
  37. package/fesm2022/orechio-platform-angular-account-verify-email.page-CHs0EwDf.mjs.map +0 -1
@@ -0,0 +1,160 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, signal, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { RouterLink } from '@angular/router';
4
+ import { d as data, B as BillingClient, a as BillingErrorComponent } from './orechio-platform-angular-billing-billing-format-0nlddK-x.mjs';
5
+
6
+ const DIA = 24 * 60 * 60 * 1000;
7
+ const EM_ABERTO = ['Created', 'Pending', 'Overdue'];
8
+ const emAtraso = (assinatura) => assinatura.status === 'Grace' || assinatura.status === 'Suspended';
9
+ /**
10
+ * A ação de cada estado segue o que a Platform aceita: o checkout serve `Trial`,
11
+ * `PendingPayment` e, desde a BILLING-2b, `Grace` e `Suspended` — mas só sem fatura aberta
12
+ * (`Created|Pending|Overdue`; com ela, `checkout.open_invoice_exists`). Em carência e suspensão
13
+ * a ação depende disso: fatura aberta → o detalhe dela; nenhuma → o checkout. Cancelada e
14
+ * expirada não têm ação de pagamento nesta versão: reativar é v2 (ADR-021 §3.5).
15
+ */
16
+ function situacao(assinatura, agora, emAberto) {
17
+ const pagar = { texto: 'Pagar agora', link: 'checkout' };
18
+ const faturas = { texto: 'Ver faturas', link: 'invoices' };
19
+ const acaoDeAtraso = emAberto
20
+ ? { texto: 'Pagar fatura em aberto', link: `invoices/${emAberto.id}` }
21
+ : { texto: 'Pagar', link: 'checkout' };
22
+ const orientacao = emAberto ? 'Pague a fatura em aberto' : 'Faça o pagamento';
23
+ switch (assinatura.status) {
24
+ case 'Trial': {
25
+ const dias = Math.max(0, Math.ceil((Date.parse(assinatura.trialEndsAt) - agora) / DIA));
26
+ const restante = dias === 0 ? 'O período de teste termina hoje.'
27
+ : dias === 1 ? 'Falta 1 dia para o fim do período de teste.'
28
+ : `Faltam ${dias} dias para o fim do período de teste.`;
29
+ return { titulo: 'Período de teste', detalhe: restante, acao: { texto: 'Assinar agora', link: 'checkout' } };
30
+ }
31
+ case 'PendingPayment':
32
+ return {
33
+ titulo: 'Pagamento pendente',
34
+ detalhe: 'A assinatura começa assim que o primeiro pagamento for confirmado.',
35
+ acao: pagar,
36
+ };
37
+ case 'Active':
38
+ return {
39
+ titulo: 'Assinatura ativa',
40
+ detalhe: assinatura.currentPeriodEndsAt
41
+ ? `Próxima renovação em ${data(assinatura.currentPeriodEndsAt)}.`
42
+ : 'Tudo em dia.',
43
+ acao: faturas,
44
+ };
45
+ case 'Grace':
46
+ return {
47
+ titulo: 'Pagamento em atraso',
48
+ detalhe: assinatura.graceEndsAt
49
+ ? `O acesso continua até ${data(assinatura.graceEndsAt)}. ${orientacao} para não ter o acesso suspenso.`
50
+ : `${orientacao} para não ter o acesso suspenso.`,
51
+ acao: acaoDeAtraso,
52
+ };
53
+ case 'Suspended':
54
+ return {
55
+ titulo: 'Assinatura suspensa',
56
+ detalhe: `O acesso foi suspenso por falta de pagamento. ${orientacao} para voltar a usar.`,
57
+ acao: acaoDeAtraso,
58
+ };
59
+ case 'Cancelled':
60
+ return {
61
+ titulo: 'Assinatura cancelada',
62
+ detalhe: assinatura.cancelEffectiveAt
63
+ ? `O cancelamento vale a partir de ${data(assinatura.cancelEffectiveAt)}. Para reativar, fale com o suporte.`
64
+ : 'Para reativar, fale com o suporte.',
65
+ acao: faturas,
66
+ };
67
+ case 'Expired':
68
+ return {
69
+ titulo: 'Assinatura expirada',
70
+ detalhe: 'Para voltar a assinar, fale com o suporte.',
71
+ acao: faturas,
72
+ };
73
+ }
74
+ }
75
+ class SubscriptionPage {
76
+ client = inject(BillingClient);
77
+ assinatura = signal(null, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "assinatura" }] : /* istanbul ignore next */ []));
79
+ /** Só preenchido em Grace/Suspended: `undefined` = ainda não respondeu; `null` = nenhuma aberta. */
80
+ emAberto = signal(undefined, /* @ts-ignore */
81
+ ...(ngDevMode ? [{ debugName: "emAberto" }] : /* istanbul ignore next */ []));
82
+ erro = signal(null, /* @ts-ignore */
83
+ ...(ngDevMode ? [{ debugName: "erro" }] : /* istanbul ignore next */ []));
84
+ atual = computed(() => {
85
+ const assinatura = this.assinatura();
86
+ if (!assinatura)
87
+ return null;
88
+ const aberta = this.emAberto();
89
+ // Sem a resposta das faturas não se sabe o destino da ação: não se adivinha.
90
+ if (emAtraso(assinatura) && aberta === undefined)
91
+ return null;
92
+ return situacao(assinatura, Date.now(), aberta ?? null);
93
+ }, /* @ts-ignore */
94
+ ...(ngDevMode ? [{ debugName: "atual" }] : /* istanbul ignore next */ []));
95
+ ngOnInit() {
96
+ this.client.getSubscription().subscribe({
97
+ next: (assinatura) => {
98
+ this.assinatura.set(assinatura);
99
+ if (emAtraso(assinatura))
100
+ this.buscarFaturaEmAberto();
101
+ },
102
+ error: (problema) => this.erro.set(problema),
103
+ });
104
+ }
105
+ buscarFaturaEmAberto() {
106
+ this.client.listInvoices().subscribe({
107
+ next: (pagina) => this.emAberto.set(pagina.invoices.find((f) => EM_ABERTO.includes(f.status)) ?? null),
108
+ error: (problema) => this.erro.set(problema),
109
+ });
110
+ }
111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SubscriptionPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
112
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: SubscriptionPage, isStandalone: true, selector: "orechio-billing-subscription", ngImport: i0, template: `
113
+ <section class="orechio-billing">
114
+ <h1>Assinatura</h1>
115
+
116
+ @if (erro(); as problema) {
117
+ <orechio-billing-error [problema]="problema" />
118
+ } @else if (atual(); as s) {
119
+ <h2>{{ s.titulo }}</h2>
120
+ <p>{{ s.detalhe }}</p>
121
+ <a data-acao [routerLink]="s.acao.link">{{ s.acao.texto }}</a>
122
+
123
+ <nav class="orechio-billing__muted">
124
+ <a routerLink="profile">Dados de cobrança</a>
125
+ ·
126
+ <a routerLink="invoices">Faturas</a>
127
+ </nav>
128
+ } @else {
129
+ <p class="orechio-billing__muted">Carregando…</p>
130
+ }
131
+ </section>
132
+ `, isInline: true, styles: [".orechio-billing{display:flex;flex-direction:column;gap:var(--orechio-space-3, .75rem);max-width:40rem;margin:0 auto;padding:var(--orechio-space-6, 1.5rem);color:var(--orechio-color-text, inherit);font-family:var(--orechio-font-body, inherit)}.orechio-billing form{display:flex;flex-direction:column;gap:var(--orechio-space-2, .5rem)}.orechio-billing__muted{color:var(--orechio-color-text-muted, #666)}.orechio-billing__error{color:var(--orechio-color-danger, #b00020)}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: BillingErrorComponent, selector: "orechio-billing-error", inputs: ["problema"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
133
+ }
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: SubscriptionPage, decorators: [{
135
+ type: Component,
136
+ args: [{ selector: 'orechio-billing-subscription', standalone: true, imports: [RouterLink, BillingErrorComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
137
+ <section class="orechio-billing">
138
+ <h1>Assinatura</h1>
139
+
140
+ @if (erro(); as problema) {
141
+ <orechio-billing-error [problema]="problema" />
142
+ } @else if (atual(); as s) {
143
+ <h2>{{ s.titulo }}</h2>
144
+ <p>{{ s.detalhe }}</p>
145
+ <a data-acao [routerLink]="s.acao.link">{{ s.acao.texto }}</a>
146
+
147
+ <nav class="orechio-billing__muted">
148
+ <a routerLink="profile">Dados de cobrança</a>
149
+ ·
150
+ <a routerLink="invoices">Faturas</a>
151
+ </nav>
152
+ } @else {
153
+ <p class="orechio-billing__muted">Carregando…</p>
154
+ }
155
+ </section>
156
+ `, styles: [".orechio-billing{display:flex;flex-direction:column;gap:var(--orechio-space-3, .75rem);max-width:40rem;margin:0 auto;padding:var(--orechio-space-6, 1.5rem);color:var(--orechio-color-text, inherit);font-family:var(--orechio-font-body, inherit)}.orechio-billing form{display:flex;flex-direction:column;gap:var(--orechio-space-2, .5rem)}.orechio-billing__muted{color:var(--orechio-color-text-muted, #666)}.orechio-billing__error{color:var(--orechio-color-danger, #b00020)}\n"] }]
157
+ }] });
158
+
159
+ export { SubscriptionPage };
160
+ //# sourceMappingURL=orechio-platform-angular-billing-subscription.page-9NF8bWhu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orechio-platform-angular-billing-subscription.page-9NF8bWhu.mjs","sources":["../../../projects/platform-angular/billing/src/pages/subscription.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, OnInit, computed, inject, signal } from '@angular/core';\r\nimport { RouterLink } from '@angular/router';\r\nimport { ProblemDetails } from '@orechio/platform-angular';\r\nimport { BillingClient } from '../billing-client';\r\nimport { BillingErrorComponent } from '../billing-error.component';\r\nimport { ESTILO_BASE, data } from '../billing-format';\r\nimport { InvoiceListItem, InvoiceStatus, Subscription } from '../billing-models';\r\n\r\nconst DIA = 24 * 60 * 60 * 1000;\r\nconst EM_ABERTO: InvoiceStatus[] = ['Created', 'Pending', 'Overdue'];\r\n\r\nconst emAtraso = (assinatura: Subscription) =>\r\n assinatura.status === 'Grace' || assinatura.status === 'Suspended';\r\n\r\ninterface Situacao {\r\n titulo: string;\r\n detalhe: string;\r\n acao: { texto: string; link: string };\r\n}\r\n\r\n/**\r\n * A ação de cada estado segue o que a Platform aceita: o checkout serve `Trial`,\r\n * `PendingPayment` e, desde a BILLING-2b, `Grace` e `Suspended` — mas só sem fatura aberta\r\n * (`Created|Pending|Overdue`; com ela, `checkout.open_invoice_exists`). Em carência e suspensão\r\n * a ação depende disso: fatura aberta → o detalhe dela; nenhuma → o checkout. Cancelada e\r\n * expirada não têm ação de pagamento nesta versão: reativar é v2 (ADR-021 §3.5).\r\n */\r\nfunction situacao(assinatura: Subscription, agora: number, emAberto: InvoiceListItem | null): Situacao {\r\n const pagar = { texto: 'Pagar agora', link: 'checkout' };\r\n const faturas = { texto: 'Ver faturas', link: 'invoices' };\r\n const acaoDeAtraso = emAberto\r\n ? { texto: 'Pagar fatura em aberto', link: `invoices/${emAberto.id}` }\r\n : { texto: 'Pagar', link: 'checkout' };\r\n const orientacao = emAberto ? 'Pague a fatura em aberto' : 'Faça o pagamento';\r\n\r\n switch (assinatura.status) {\r\n case 'Trial': {\r\n const dias = Math.max(0, Math.ceil((Date.parse(assinatura.trialEndsAt) - agora) / DIA));\r\n const restante =\r\n dias === 0 ? 'O período de teste termina hoje.'\r\n : dias === 1 ? 'Falta 1 dia para o fim do período de teste.'\r\n : `Faltam ${dias} dias para o fim do período de teste.`;\r\n return { titulo: 'Período de teste', detalhe: restante, acao: { texto: 'Assinar agora', link: 'checkout' } };\r\n }\r\n case 'PendingPayment':\r\n return {\r\n titulo: 'Pagamento pendente',\r\n detalhe: 'A assinatura começa assim que o primeiro pagamento for confirmado.',\r\n acao: pagar,\r\n };\r\n case 'Active':\r\n return {\r\n titulo: 'Assinatura ativa',\r\n detalhe: assinatura.currentPeriodEndsAt\r\n ? `Próxima renovação em ${data(assinatura.currentPeriodEndsAt)}.`\r\n : 'Tudo em dia.',\r\n acao: faturas,\r\n };\r\n case 'Grace':\r\n return {\r\n titulo: 'Pagamento em atraso',\r\n detalhe: assinatura.graceEndsAt\r\n ? `O acesso continua até ${data(assinatura.graceEndsAt)}. ${orientacao} para não ter o acesso suspenso.`\r\n : `${orientacao} para não ter o acesso suspenso.`,\r\n acao: acaoDeAtraso,\r\n };\r\n case 'Suspended':\r\n return {\r\n titulo: 'Assinatura suspensa',\r\n detalhe: `O acesso foi suspenso por falta de pagamento. ${orientacao} para voltar a usar.`,\r\n acao: acaoDeAtraso,\r\n };\r\n case 'Cancelled':\r\n return {\r\n titulo: 'Assinatura cancelada',\r\n detalhe: assinatura.cancelEffectiveAt\r\n ? `O cancelamento vale a partir de ${data(assinatura.cancelEffectiveAt)}. Para reativar, fale com o suporte.`\r\n : 'Para reativar, fale com o suporte.',\r\n acao: faturas,\r\n };\r\n case 'Expired':\r\n return {\r\n titulo: 'Assinatura expirada',\r\n detalhe: 'Para voltar a assinar, fale com o suporte.',\r\n acao: faturas,\r\n };\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'orechio-billing-subscription',\r\n standalone: true,\r\n imports: [RouterLink, BillingErrorComponent],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n <section class=\"orechio-billing\">\r\n <h1>Assinatura</h1>\r\n\r\n @if (erro(); as problema) {\r\n <orechio-billing-error [problema]=\"problema\" />\r\n } @else if (atual(); as s) {\r\n <h2>{{ s.titulo }}</h2>\r\n <p>{{ s.detalhe }}</p>\r\n <a data-acao [routerLink]=\"s.acao.link\">{{ s.acao.texto }}</a>\r\n\r\n <nav class=\"orechio-billing__muted\">\r\n <a routerLink=\"profile\">Dados de cobrança</a>\r\n ·\r\n <a routerLink=\"invoices\">Faturas</a>\r\n </nav>\r\n } @else {\r\n <p class=\"orechio-billing__muted\">Carregando…</p>\r\n }\r\n </section>\r\n `,\r\n styles: ESTILO_BASE,\r\n})\r\nexport class SubscriptionPage implements OnInit {\r\n private readonly client = inject(BillingClient);\r\n\r\n private readonly assinatura = signal<Subscription | null>(null);\r\n /** Só preenchido em Grace/Suspended: `undefined` = ainda não respondeu; `null` = nenhuma aberta. */\r\n private readonly emAberto = signal<InvoiceListItem | null | undefined>(undefined);\r\n protected readonly erro = signal<ProblemDetails | null>(null);\r\n protected readonly atual = computed(() => {\r\n const assinatura = this.assinatura();\r\n if (!assinatura) return null;\r\n\r\n const aberta = this.emAberto();\r\n // Sem a resposta das faturas não se sabe o destino da ação: não se adivinha.\r\n if (emAtraso(assinatura) && aberta === undefined) return null;\r\n\r\n return situacao(assinatura, Date.now(), aberta ?? null);\r\n });\r\n\r\n ngOnInit(): void {\r\n this.client.getSubscription().subscribe({\r\n next: (assinatura) => {\r\n this.assinatura.set(assinatura);\r\n if (emAtraso(assinatura)) this.buscarFaturaEmAberto();\r\n },\r\n error: (problema: ProblemDetails) => this.erro.set(problema),\r\n });\r\n }\r\n\r\n private buscarFaturaEmAberto(): void {\r\n this.client.listInvoices().subscribe({\r\n next: (pagina) => this.emAberto.set(pagina.invoices.find((f) => EM_ABERTO.includes(f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AAA,EAAA,CAAA,ydAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,69 @@
1
+ import { InjectionToken } from '@angular/core';
2
+
3
+ const ORECHIO_BILLING_CONFIG = new InjectionToken('ORECHIO_BILLING_CONFIG');
4
+ function provideOrechioBilling(options = {}) {
5
+ const bruto = options.basePath ?? '/api/billing';
6
+ // Mesma regra do `BillingRoutePrefix` do BFF, no mesmo momento: na composição. Uma URL
7
+ // absoluta aqui levaria a cobrança para fora do domínio do produto, onde o cookie de sessão
8
+ // não vai junto.
9
+ if (!bruto.startsWith('/') || bruto.startsWith('//')) {
10
+ throw new Error(`provideOrechioBilling: \`basePath\` precisa ser um caminho same-origin começando com '/': '${bruto}'.`);
11
+ }
12
+ const config = { basePath: bruto.replace(/\/+$/, '') };
13
+ return [{ provide: ORECHIO_BILLING_CONFIG, useValue: config }];
14
+ }
15
+
16
+ /**
17
+ * As rotas de cobrança. O host as monta em `/billing` — é para lá que os e-mails de cobrança
18
+ * da Platform apontam (`{base}/billing`, ADR-021 §3.2):
19
+ *
20
+ * <pre>
21
+ * { path: 'billing', children: ORECHIO_BILLING_ROUTES }
22
+ * </pre>
23
+ *
24
+ * Os caminhos ENTRE as telas são fixos (a situação leva a `checkout` e `invoices`, o
25
+ * pagamento sem perfil leva a `profile`). Todas com `loadComponent`, como as de conta.
26
+ */
27
+ const ORECHIO_BILLING_ROUTES = [
28
+ {
29
+ path: '',
30
+ pathMatch: 'full',
31
+ title: 'Assinatura',
32
+ loadComponent: () => import('./orechio-platform-angular-billing-subscription.page-9NF8bWhu.mjs').then((m) => m.SubscriptionPage),
33
+ },
34
+ {
35
+ path: 'profile',
36
+ title: 'Dados de cobrança',
37
+ loadComponent: () => import('./orechio-platform-angular-billing-profile.page-Baa6uoM6.mjs').then((m) => m.ProfilePage),
38
+ },
39
+ {
40
+ path: 'checkout',
41
+ title: 'Pagar assinatura',
42
+ loadComponent: () => import('./orechio-platform-angular-billing-checkout.page-CHU_Drpu.mjs').then((m) => m.CheckoutPage),
43
+ },
44
+ {
45
+ path: 'invoices',
46
+ title: 'Faturas',
47
+ loadComponent: () => import('./orechio-platform-angular-billing-invoices.page-BiEm3hRf.mjs').then((m) => m.InvoicesPage),
48
+ },
49
+ {
50
+ path: 'invoices/:id',
51
+ title: 'Fatura',
52
+ loadComponent: () => import('./orechio-platform-angular-billing-invoice.page-BVyWur3o.mjs').then((m) => m.InvoicePage),
53
+ },
54
+ ];
55
+
56
+ /*
57
+ * Public API Surface of @orechio/platform-angular/billing
58
+ *
59
+ * BILLING-3 — as telas de cobrança do titular (ADR-021 §3.5). Mesmo contrato do entry
60
+ * `account`: `BillingClient` e as páginas NÃO são exportados. As telas são alcançadas por
61
+ * `ORECHIO_BILLING_ROUTES`, e os caminhos entre elas só valem montados juntos.
62
+ */
63
+
64
+ /**
65
+ * Generated bundle index. Do not edit.
66
+ */
67
+
68
+ export { ORECHIO_BILLING_CONFIG, ORECHIO_BILLING_ROUTES, provideOrechioBilling };
69
+ //# sourceMappingURL=orechio-platform-angular-billing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orechio-platform-angular-billing.mjs","sources":["../../../projects/platform-angular/billing/src/billing-config.ts","../../../projects/platform-angular/billing/src/billing.routes.ts","../../../projects/platform-angular/billing/src/public-api.ts","../../../projects/platform-angular/billing/src/orechio-platform-angular-billing.ts"],"sourcesContent":["import { InjectionToken, Provider } from '@angular/core';\r\n\r\nexport interface OrechioBillingConfig {\r\n /**\r\n * Prefixo do BFF de cobrança (`MapOrechioBillingEndpoints`), same-origin. O BFF lê a sessão\r\n * do host e fala com a Platform; o browser nunca vê token nem fala com a Platform.\r\n */\r\n basePath: string;\r\n}\r\n\r\nexport const ORECHIO_BILLING_CONFIG = new InjectionToken<OrechioBillingConfig>(\r\n 'ORECHIO_BILLING_CONFIG',\r\n);\r\n\r\nexport interface OrechioBillingOptions {\r\n /** Default `/api/billing`, o mesmo `BillingRoutePrefix` default do BFF. */\r\n basePath?: string;\r\n}\r\n\r\nexport function provideOrechioBilling(options: OrechioBillingOptions = {}): Provider[] {\r\n const bruto = options.basePath ?? '/api/billing';\r\n\r\n // Mesma regra do `BillingRoutePrefix` do BFF, no mesmo momento: na composição. Uma URL\r\n // absoluta aqui levaria a cobrança para fora do domínio do produto, onde o cookie de sessão\r\n // não vai junto.\r\n if (!bruto.startsWith('/') || bruto.startsWith('//')) {\r\n throw new Error(\r\n `provideOrechioBilling: \\`basePath\\` precisa ser um caminho same-origin começando com '/': '${bruto}'.`,\r\n );\r\n }\r\n\r\n const config: OrechioBillingConfig = { basePath: bruto.replace(/\\/+$/, '') };\r\n return [{ provide: ORECHIO_BILLING_CONFIG, useValue: config }];\r\n}\r\n","import { Routes } from '@angular/router';\r\n\r\n/**\r\n * As rotas de cobrança. O host as monta em `/billing` — é para lá que os e-mails de cobrança\r\n * da Platform apontam (`{base}/billing`, ADR-021 §3.2):\r\n *\r\n * <pre>\r\n * { path: 'billing', children: ORECHIO_BILLING_ROUTES }\r\n * </pre>\r\n *\r\n * Os caminhos ENTRE as telas são fixos (a situação leva a `checkout` e `invoices`, o\r\n * pagamento sem perfil leva a `profile`). Todas com `loadComponent`, como as de conta.\r\n */\r\nexport const ORECHIO_BILLING_ROUTES: Routes = [\r\n {\r\n path: '',\r\n pathMatch: 'full',\r\n title: 'Assinatura',\r\n loadComponent: () => import('./pages/subscription.page').then((m) => m.SubscriptionPage),\r\n },\r\n {\r\n path: 'profile',\r\n title: 'Dados de cobrança',\r\n loadComponent: () => import('./pages/profile.page').then((m) => m.ProfilePage),\r\n },\r\n {\r\n path: 'checkout',\r\n title: 'Pagar assinatura',\r\n loadComponent: () => import('./pages/checkout.page').then((m) => m.CheckoutPage),\r\n },\r\n {\r\n path: 'invoices',\r\n title: 'Faturas',\r\n loadComponent: () => import('./pages/invoices.page').then((m) => m.InvoicesPage),\r\n },\r\n {\r\n path: 'invoices/:id',\r\n title: 'Fatura',\r\n loadComponent: () => import('./pages/invoice.page').then((m) => m.InvoicePage),\r\n },\r\n];\r\n","/*\r\n * Public API Surface of @orechio/platform-angular/billing\r\n *\r\n * BILLING-3 — as telas de cobrança do titular (ADR-021 §3.5). Mesmo contrato do entry\r\n * `account`: `BillingClient` e as páginas NÃO são exportados. As telas são alcançadas por\r\n * `ORECHIO_BILLING_ROUTES`, e os caminhos entre elas só valem montados juntos.\r\n */\r\n\r\nexport type { OrechioBillingConfig, OrechioBillingOptions } from './billing-config';\r\nexport { ORECHIO_BILLING_CONFIG, provideOrechioBilling } from './billing-config';\r\n\r\nexport { ORECHIO_BILLING_ROUTES } from './billing.routes';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;MAUa,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB;AAQpB,SAAU,qBAAqB,CAAC,OAAA,GAAiC,EAAE,EAAA;AACvE,IAAA,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,IAAI,cAAc;;;;AAKhD,IAAA,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AACpD,QAAA,MAAM,IAAI,KAAK,CACb,8FAA8F,KAAK,CAAA,EAAA,CAAI,CACxG;IACH;AAEA,IAAA,MAAM,MAAM,GAAyB,EAAE,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;IAC5E,OAAO,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAChE;;AC/BA;;;;;;;;;;AAUG;AACI,MAAM,sBAAsB,GAAW;AAC5C,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,MAAM;AACjB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,aAAa,EAAE,MAAM,OAAO,mEAA2B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC;AACzF,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,aAAa,EAAE,MAAM,OAAO,8DAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC;AAC/E,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,KAAK,EAAE,kBAAkB;AACzB,QAAA,aAAa,EAAE,MAAM,OAAO,+DAAuB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC;AACjF,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,aAAa,EAAE,MAAM,OAAO,+DAAuB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC;AACjF,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,cAAc;AACpB,QAAA,KAAK,EAAE,QAAQ;AACf,QAAA,aAAa,EAAE,MAAM,OAAO,8DAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC;AAC/E,KAAA;;;ACvCH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orechio/platform-angular",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.1.0",
6
6
  "@angular/core": "^22.1.0",
@@ -24,6 +24,10 @@
24
24
  "./account": {
25
25
  "types": "./types/orechio-platform-angular-account.d.ts",
26
26
  "default": "./fesm2022/orechio-platform-angular-account.mjs"
27
+ },
28
+ "./billing": {
29
+ "types": "./types/orechio-platform-angular-billing.d.ts",
30
+ "default": "./fesm2022/orechio-platform-angular-billing.mjs"
27
31
  }
28
32
  },
29
33
  "type": "module"
@@ -0,0 +1,32 @@
1
+ import { InjectionToken, Provider } from '@angular/core';
2
+ import { Routes } from '@angular/router';
3
+
4
+ interface OrechioBillingConfig {
5
+ /**
6
+ * Prefixo do BFF de cobrança (`MapOrechioBillingEndpoints`), same-origin. O BFF lê a sessão
7
+ * do host e fala com a Platform; o browser nunca vê token nem fala com a Platform.
8
+ */
9
+ basePath: string;
10
+ }
11
+ declare const ORECHIO_BILLING_CONFIG: InjectionToken<OrechioBillingConfig>;
12
+ interface OrechioBillingOptions {
13
+ /** Default `/api/billing`, o mesmo `BillingRoutePrefix` default do BFF. */
14
+ basePath?: string;
15
+ }
16
+ declare function provideOrechioBilling(options?: OrechioBillingOptions): Provider[];
17
+
18
+ /**
19
+ * As rotas de cobrança. O host as monta em `/billing` — é para lá que os e-mails de cobrança
20
+ * da Platform apontam (`{base}/billing`, ADR-021 §3.2):
21
+ *
22
+ * <pre>
23
+ * { path: 'billing', children: ORECHIO_BILLING_ROUTES }
24
+ * </pre>
25
+ *
26
+ * Os caminhos ENTRE as telas são fixos (a situação leva a `checkout` e `invoices`, o
27
+ * pagamento sem perfil leva a `profile`). Todas com `loadComponent`, como as de conta.
28
+ */
29
+ declare const ORECHIO_BILLING_ROUTES: Routes;
30
+
31
+ export { ORECHIO_BILLING_CONFIG, ORECHIO_BILLING_ROUTES, provideOrechioBilling };
32
+ export type { OrechioBillingConfig, OrechioBillingOptions };
@@ -1 +0,0 @@
1
- {"version":3,"file":"orechio-platform-angular-account-forgot-password.page-5_8R5B4m.mjs","sources":["../../../projects/platform-angular/account/src/pages/forgot-password.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ProblemDetails } from '@orechio/platform-angular';\nimport { AccountClient } from '../account-client';\n\n@Component({\n selector: 'orechio-account-forgot-password',\n standalone: true,\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <section class=\"orechio-account\">\n <ng-content select=\"[orechioAccountBrand]\"></ng-content>\n\n @if (enviado()) {\n <h1>Verifique seu e-mail</h1>\n <!--\n O texto NÃO confirma que a conta existe, e isso é deliberado.\n\n A Platform responde 202 idêntico para e-mail conhecido e desconhecido — defesa\n anti-enumeration, provada byte a byte no ACCOUNT-1B. Uma tela que dissesse\n \"enviamos para você\" só quando a conta existe desfaria a defesa na camada de cima:\n bastaria comparar as duas telas para descobrir quem tem conta aqui.\n -->\n <p>Se houver uma conta com esse endereço, as instruções chegarão em instantes.</p>\n <p class=\"orechio-account__muted\">Confira também a caixa de spam.</p>\n } @else {\n <h1>Recuperar acesso</h1>\n <p class=\"orechio-account__muted\">Informe o e-mail da sua conta.</p>\n\n <form (ngSubmit)=\"enviar()\">\n <label for=\"orechio-account-forgot-email\">E-mail</label>\n <input\n id=\"orechio-account-forgot-email\"\n name=\"email\"\n type=\"email\"\n autocomplete=\"email\"\n [(ngModel)]=\"email\"\n [disabled]=\"enviando()\"\n required\n />\n\n @if (erro()) {\n <p class=\"orechio-account__error\">{{ mensagemDeErro() }}</p>\n }\n\n <button type=\"submit\" [disabled]=\"enviando() || !email.trim()\">\n {{ enviando() ? 'Enviando…' : 'Enviar instruções' }}\n </button>\n </form>\n }\n </section>\n `,\n styles: `\n .orechio-account {\n display: flex;\n flex-direction: column;\n gap: var(--orechio-space-3, 0.75rem);\n max-width: 28rem;\n margin: 0 auto;\n padding: var(--orechio-space-6, 1.5rem);\n color: var(--orechio-color-text, inherit);\n font-family: var(--orechio-font-body, inherit);\n }\n .orechio-account form { display: flex; flex-direction: column; gap: var(--orechio-space-2, 0.5rem); }\n .orechio-account__muted { color: var(--orechio-color-text-muted, #666); }\n .orechio-account__error { color: var(--orechio-color-danger, #b00020); }\n `,\n})\nexport class ForgotPasswordPage {\n private readonly client = inject(AccountClient);\n\n protected email = '';\n protected readonly enviando = signal(false);\n protected readonly enviado = signal(false);\n protected readonly erro = signal<ProblemDetails | null>(null);\n\n protected mensagemDeErro(): string {\n const code = this.erro()?.code;\n if (code === 'rate_limit_exceeded') return 'Muitas tentativas. Aguarde alguns minutos.';\n if (code === 'platform.unavailable') return 'Serviço indisponível. Tente novamente em instantes.';\n return 'Não foi possível enviar. Tente novamente.';\n }\n\n protected enviar(): void {\n const email = this.email.trim();\n if (!email || this.enviando()) return;\n\n this.enviando.set(true);\n this.erro.set(null);\n\n this.client.forgotPassword(email).subscribe({\n // Sucesso é sucesso, sem olhar o corpo: a resposta é opaca por desenho, e inspecioná-la\n // para decidir o texto seria a porta dos fundos da enumeração.\n next: () => {\n this.enviado.set(true);\n this.enviando.set(false);\n },\n error: (problema: ProblemDetails) => {\n this.erro.set(problema);\n this.enviando.set(false);\n },\n });\n }\n}\n"],"names":[],"mappings":";;;;;;MAqEa,kBAAkB,CAAA;AACZ,IAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;IAErC,KAAK,GAAG,EAAE;IACD,QAAQ,GAAG,MAAM,CAAC,KAAK;iFAAC;IACxB,OAAO,GAAG,MAAM,CAAC,KAAK;gFAAC;IACvB,IAAI,GAAG,MAAM,CAAwB,IAAI;6EAAC;IAEnD,cAAc,GAAA;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI;QAC9B,IAAI,IAAI,KAAK,qBAAqB;AAAE,YAAA,OAAO,4CAA4C;QACvF,IAAI,IAAI,KAAK,sBAAsB;AAAE,YAAA,OAAO,qDAAqD;AACjG,QAAA,OAAO,2CAA2C;IACpD;IAEU,MAAM,GAAA;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;AAC/B,QAAA,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE;YAAE;AAE/B,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;QAEnB,IAAI,CAAC,MAAM,CAA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A,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,sGAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,wIAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,QAAA,EAAA,yEAAA,EAAA,MAAA,EAAA,CAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FA6DV,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAhE9B,SAAS;+BACE,iCAAiC,EAAA,UAAA,EAC/B,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,CAAC,EAAA,eAAA,EACL,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ydAAA,CAAA,EAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"orechio-platform-angular-account-initial-branch.page-Cmy07JGF.mjs","sources":["../../../projects/platform-angular/account/src/pages/initial-branch.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { ProblemDetails } from '@orechio/platform-angular';\nimport { AccountClient } from '../account-client';\nimport { ORECHIO_ACCOUNT_CONFIG } from '../account-config';\n\n@Component({\n selector: 'orechio-account-initial-branch',\n standalone: true,\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <section class=\"orechio-account\">\n <ng-content select=\"[orechioAccountBrand]\"></ng-content>\n\n <h1>Configure sua primeira {{ rotulo }}</h1>\n <p class=\"orechio-account__muted\">\n É onde seus lançamentos vão nascer. Dá para criar outras depois.\n </p>\n\n <form (ngSubmit)=\"enviar()\">\n <label for=\"orechio-account-branch-name\">Nome da {{ rotulo }}</label>\n <input\n id=\"orechio-account-branch-name\"\n name=\"nome\"\n type=\"text\"\n autocomplete=\"organization\"\n [(ngModel)]=\"nome\"\n [disabled]=\"enviando()\"\n required\n />\n\n @if (erro()) {\n <p class=\"orechio-account__error\">{{ mensagemDeErro() }}</p>\n }\n\n <button type=\"submit\" [disabled]=\"enviando() || !nome.trim()\">\n {{ enviando() ? 'Criando…' : 'Concluir' }}\n </button>\n </form>\n </section>\n `,\n styles: `\n .orechio-account {\n display: flex;\n flex-direction: column;\n gap: var(--orechio-space-3, 0.75rem);\n max-width: 28rem;\n margin: 0 auto;\n padding: var(--orechio-space-6, 1.5rem);\n color: var(--orechio-color-text, inherit);\n font-family: var(--orechio-font-body, inherit);\n }\n .orechio-account form { display: flex; flex-direction: column; gap: var(--orechio-space-2, 0.5rem); }\n .orechio-account__muted { color: var(--orechio-color-text-muted, #666); }\n .orechio-account__error { color: var(--orechio-color-danger, #b00020); }\n `,\n})\nexport class InitialBranchPage {\n private readonly router = inject(Router);\n private readonly client = inject(AccountClient);\n private readonly config = inject(ORECHIO_ACCOUNT_CONFIG);\n\n protected readonly rotulo = this.config.branchLabel;\n protected nome = '';\n protected readonly enviando = signal(false);\n protected readonly erro = signal<ProblemDetails | null>(null);\n\n protected mensagemDeErro(): string {\n const code = this.erro()?.code;\n if (code === 'onboarding.branch_already_exists') return `Esta ${this.rotulo} já foi criada.`;\n if (code === 'session.missing') return 'Sua sessão expirou. Abra o link do e-mail novamente.';\n if (code === 'onboarding.not_in_provisioning') return 'Este passo já foi concluído.';\n if (code === 'rate_limit_exceeded') return 'Muitas tentativas. Aguarde alguns minutos.';\n if (code?.startsWith('branch.')) return 'Escolha um nome válido.';\n return 'Não foi possível concluir. Tente novamente.';\n }\n\n protected enviar(): void {\n const nome = this.nome.trim();\n if (!nome || this.enviando()) return;\n\n this.enviando.set(true);\n this.erro.set(null);\n\n this.client.createInitialBranch(nome).subscribe({\n next: async (resultado) => {\n // O pacote entrega o resultado e sai. Quem decide para onde ir é o host —\n // `nextStep` é repassado inteiro, sem interpretação (ADR-019 §3).\n const destino = this.config.onCompleted(resultado);\n await this.router.navigateByUrl(destino, { replaceUrl: true });\n },\n error: (problema: ProblemDetails) => {\n this.erro.set(problema);\n this.enviando.set(false);\n },\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;MA2Da,iBAAiB,CAAA;AACX,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AAC9B,IAAA,MAAM,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAErC,IAAA,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW;IACzC,IAAI,GAAG,EAAE;IACA,QAAQ,GAAG,MAAM,CAAC,KAAK;iFAAC;IACxB,IAAI,GAAG,MAAM,CAAwB,IAAI;6EAAC;IAEnD,cAAc,GAAA;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI;QAC9B,IAAI,IAAI,KAAK,kCAAkC;AAAE,YAAA,OAAO,CAAA,KAAA,EAAQ,IAAI,CAAC,MAAM,iBAAiB;QAC5F,IAAI,IAAI,KAAK,iBAAiB;AAAE,YAAA,OAAO,sDAAsD;QAC7F,IAAI,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AAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAiDV,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApD7B,SAAS;+BACE,gCAAgC,EAAA,UAAA,EAC9B,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,CAAC,EAAA,eAAA,EACL,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ydAAA,CAAA,EAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"orechio-platform-angular-account-resend-verification.page-qckKAlPk.mjs","sources":["../../../projects/platform-angular/account/src/pages/resend-verification.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ProblemDetails } from '@orechio/platform-angular';\nimport { AccountClient } from '../account-client';\n\n/**\n * Reenvio do e-mail de verificação. Mesma disciplina anti-enumeration do\n * `forgot-password`: a resposta da Platform é opaca, e a tela não pode \"melhorar\" isso.\n */\n@Component({\n selector: 'orechio-account-resend-verification',\n standalone: true,\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <section class=\"orechio-account\">\n <ng-content select=\"[orechioAccountBrand]\"></ng-content>\n\n @if (enviado()) {\n <h1>Verifique seu e-mail</h1>\n <p>Se houver um cadastro pendente com esse endereço, o link chegará em instantes.</p>\n <p class=\"orechio-account__muted\">Confira também a caixa de spam.</p>\n } @else {\n <h1>Reenviar confirmação</h1>\n <p class=\"orechio-account__muted\">Informe o e-mail usado no cadastro.</p>\n\n <form (ngSubmit)=\"enviar()\">\n <label for=\"orechio-account-resend-email\">E-mail</label>\n <input\n id=\"orechio-account-resend-email\"\n name=\"email\"\n type=\"email\"\n autocomplete=\"email\"\n [(ngModel)]=\"email\"\n [disabled]=\"enviando()\"\n required\n />\n\n @if (erro()) {\n <p class=\"orechio-account__error\">{{ mensagemDeErro() }}</p>\n }\n\n <button type=\"submit\" [disabled]=\"enviando() || !email.trim()\">\n {{ enviando() ? 'Enviando…' : 'Reenviar' }}\n </button>\n </form>\n }\n </section>\n `,\n styles: `\n .orechio-account {\n display: flex;\n flex-direction: column;\n gap: var(--orechio-space-3, 0.75rem);\n max-width: 28rem;\n margin: 0 auto;\n padding: var(--orechio-space-6, 1.5rem);\n color: var(--orechio-color-text, inherit);\n font-family: var(--orechio-font-body, inherit);\n }\n .orechio-account form { display: flex; flex-direction: column; gap: var(--orechio-space-2, 0.5rem); }\n .orechio-account__muted { color: var(--orechio-color-text-muted, #666); }\n .orechio-account__error { color: var(--orechio-color-danger, #b00020); }\n `,\n})\nexport class ResendVerificationPage {\n private readonly client = inject(AccountClient);\n\n protected email = '';\n protected readonly enviando = signal(false);\n protected readonly enviado = signal(false);\n protected readonly erro = signal<ProblemDetails | null>(null);\n\n protected mensagemDeErro(): string {\n const code = this.erro()?.code;\n if (code === 'rate_limit_exceeded') return 'Muitas tentativas. Aguarde alguns minutos.';\n if (code === 'platform.unavailable') return 'Serviço indisponível. Tente novamente em instantes.';\n return 'Não foi possível reenviar. Tente novamente.';\n }\n\n protected enviar(): void {\n const email = this.email.trim();\n if (!email || this.enviando()) return;\n\n this.enviando.set(true);\n this.erro.set(null);\n\n this.client.resendVerification(email).subscribe({\n next: () => {\n this.enviado.set(true);\n this.enviando.set(false);\n },\n error: (problema: ProblemDetails) => {\n this.erro.set(problema);\n this.enviando.set(false);\n },\n });\n }\n}\n"],"names":[],"mappings":";;;;;;AAKA;;;AAGG;MAyDU,sBAAsB,CAAA;AAChB,IAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;IAErC,KAAK,GAAG,EAAE;IACD,QAAQ,GAAG,MAAM,CAAC,KAAK;iFAAC;IACxB,OAAO,GAAG,MAAM,CAAC,KAAK;gFAAC;IACvB,IAAI,GAAG,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A,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAqDV,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAxDlC,SAAS;+BACE,qCAAqC,EAAA,UAAA,EACnC,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,CAAC,EAAA,eAAA,EACL,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ydAAA,CAAA,EAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"orechio-platform-angular-account-token-password.page-AHqb8mFk.mjs","sources":["../../../projects/platform-angular/account/src/pages/token-password.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, OnInit, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { ProblemDetails } from '@orechio/platform-angular';\nimport { AccountClient, OpaqueAcknowledgement } from '../account-client';\nimport { ORECHIO_ACCOUNT_CONFIG } from '../account-config';\n\n/**\n * Base das duas telas que consomem um token da URL e definem uma senha:\n * `reset-password` e `accept-invite`.\n *\n * <p>\n * São o mesmo formulário com textos diferentes e uma chamada diferente. Duas cópias\n * divergiriam na primeira correção — e a primeira correção aqui seria justamente a regra do\n * token sair da URL, que é a que não pode falhar em nenhuma das duas.\n * </p>\n */\n@Component({\n selector: 'orechio-account-token-password',\n standalone: true,\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <section class=\"orechio-account\">\n <ng-content select=\"[orechioAccountBrand]\"></ng-content>\n\n @if (concluido()) {\n <h1>{{ tituloDeSucesso() }}</h1>\n <p>Você já pode entrar com a nova senha.</p>\n <button type=\"button\" (click)=\"irParaLogin()\">Ir para o login</button>\n } @else if (semToken()) {\n <h1>Link inválido</h1>\n <p class=\"orechio-account__error\">Este link não é mais válido.</p>\n } @else {\n <h1>{{ titulo() }}</h1>\n\n <form (ngSubmit)=\"enviar()\">\n <label for=\"orechio-account-nova-senha\">Nova senha</label>\n <input\n id=\"orechio-account-nova-senha\"\n name=\"senha\"\n type=\"password\"\n autocomplete=\"new-password\"\n [(ngModel)]=\"senha\"\n [disabled]=\"enviando()\"\n required\n />\n\n @if (erro()) {\n <p class=\"orechio-account__error\">{{ mensagemDeErro() }}</p>\n }\n\n <button type=\"submit\" [disabled]=\"enviando() || !senha\">\n {{ enviando() ? 'Salvando…' : 'Salvar' }}\n </button>\n </form>\n }\n </section>\n `,\n styles: `\n .orechio-account {\n display: flex;\n flex-direction: column;\n gap: var(--orechio-space-3, 0.75rem);\n max-width: 28rem;\n margin: 0 auto;\n padding: var(--orechio-space-6, 1.5rem);\n color: var(--orechio-color-text, inherit);\n font-family: var(--orechio-font-body, inherit);\n }\n .orechio-account form { display: flex; flex-direction: column; gap: var(--orechio-space-2, 0.5rem); }\n .orechio-account__error { color: var(--orechio-color-danger, #b00020); }\n `,\n})\nexport class TokenPasswordPage implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly client = inject(AccountClient);\n private readonly config = inject(ORECHIO_ACCOUNT_CONFIG);\n\n private token = '';\n\n /**\n * `reset` ou `invite` — decide o texto e qual chamada do BFF usar.\n *\n * Lido do `data` da rota DIRETAMENTE, e não por `input()`. Um signal input só receberia\n * o `data` se o host tivesse habilitado `withComponentInputBinding()` no router — e, sem\n * isso, o `accept-invite` cairia no default `reset` e chamaria o endpoint errado. Um bug\n * silencioso, dependente de configuração do host, num fluxo que o usuário percorre uma\n * vez. Ler da rota funciona com qualquer configuração.\n */\n private readonly modo = (): 'reset' | 'invite' =>\n this.route.snapshot.data['modo'] === 'invite' ? 'invite' : 'reset';\n\n protected senha = '';\n protected readonly enviando = signal(false);\n protected readonly concluido = signal(false);\n protected readonly semToken = signal(false);\n protected readonly erro = signal<ProblemDetails | null>(null);\n\n protected titulo = () =>\n this.modo() === 'invite' ? 'Defina sua senha de acesso' : 'Escolha uma nova senha';\n\n protected tituloDeSucesso = () =>\n this.modo() === 'invite' ? 'Acesso liberado' : 'Senha alterada';\n\n protected mensagemDeErro(): string {\n const code = this.erro()?.code;\n if (code === 'token.invalid_or_expired') return 'Este link não é mais válido.';\n if (code === 'rate_limit_exceeded') return 'Muitas tentativas. Aguarde alguns minutos.';\n if (code === 'platform.unavailable') return 'Serviço indisponível. Tente novamente em instantes.';\n return 'Não foi possível salvar. Verifique a senha e tente de novo.';\n }\n\n async ngOnInit(): Promise<void> {\n const token = this.route.snapshot.queryParamMap.get('token');\n\n if (!token) {\n this.semToken.set(true);\n return;\n }\n\n this.token = token;\n\n // O token sai da URL ANTES de qualquer coisa — inclusive antes de o usuário digitar a\n // senha. Ele sobrevive no histórico, vaza por `Referer` para todo recurso de terceiro\n // que esta tela carregue, e entra em log de proxy. `replaceUrl: true` substitui a\n // entrada do histórico: sem isso, \"voltar\" traz a URL com o token de volta.\n await this.router.navigate([], {\n relativeTo: this.route,\n queryParams: {},\n replaceUrl: true,\n });\n }\n\n protected enviar(): void {\n if (!this.senha || this.enviando()) return;\n\n this.enviando.set(true);\n this.erro.set(null);\n\n const chamada: Observable<OpaqueAcknowledgement> =\n this.modo() === 'invite'\n ? this.client.acceptInvite(this.token, this.senha)\n : this.client.resetPassword(this.token, this.senha);\n\n chamada.subscribe({\n next: () => {\n // A senha não fica em memória depois de usada. Não é defesa contra atacante — quem\n // executa script na página já venceu —, é higiene: um dump de heap ou um relatório\n // de erro que serialize o componente não leva a senha junto.\n this.senha = '';\n this.token = '';\n this.concluido.set(true);\n this.enviando.set(false);\n },\n error: (problema: ProblemDetails) => {\n this.erro.set(problema);\n this.enviando.set(false);\n },\n });\n }\n\n protected irParaLogin(): void {\n void this.router.navigateByUrl(this.config.loginPath);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAQA;;;;;;;;;AASG;MA0DU,iBAAiB,CAAA;AACX,IAA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AA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,QAAA,EAAA,yEAAA,EAAA,MAAA,EAAA,CAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAsDV,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAzD7B,SAAS;+BACE,gCAAgC,EAAA,UAAA,EAC9B,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,CAAC,EAAA,eAAA,EACL,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,qZAAA,CAAA,EAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"orechio-platform-angular-account-verify-email.page-CHs0EwDf.mjs","sources":["../../../projects/platform-angular/account/src/pages/verify-email.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, OnInit, inject, signal } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { ProblemDetails } from '@orechio/platform-angular';\nimport { AccountClient } from '../account-client';\nimport { ORECHIO_ACCOUNT_CONFIG } from '../account-config';\n\n@Component({\n selector: 'orechio-account-verify-email',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <section class=\"orechio-account\">\n <ng-content select=\"[orechioAccountBrand]\"></ng-content>\n\n @if (estado() === 'confirmando') {\n <h1>Confirmando seu e-mail…</h1>\n <p class=\"orechio-account__muted\">Isto leva só um instante.</p>\n } @else if (estado() === 'falhou') {\n <h1>Não foi possível confirmar</h1>\n <p class=\"orechio-account__error\">{{ mensagemDeErro() }}</p>\n @if (erro()?.code === 'token.invalid_or_expired') {\n <p class=\"orechio-account__muted\">\n Links de confirmação expiram. Peça um novo na tela de cadastro.\n </p>\n }\n }\n </section>\n `,\n styles: `\n .orechio-account {\n display: flex;\n flex-direction: column;\n gap: var(--orechio-space-3, 0.75rem);\n max-width: 28rem;\n margin: 0 auto;\n padding: var(--orechio-space-6, 1.5rem);\n color: var(--orechio-color-text, inherit);\n font-family: var(--orechio-font-body, inherit);\n }\n .orechio-account__muted { color: var(--orechio-color-text-muted, #666); }\n .orechio-account__error { color: var(--orechio-color-danger, #b00020); }\n `,\n})\nexport class VerifyEmailPage implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly client = inject(AccountClient);\n private readonly config = inject(ORECHIO_ACCOUNT_CONFIG);\n\n protected readonly estado = signal<'confirmando' | 'falhou'>('confirmando');\n protected readonly erro = signal<ProblemDetails | null>(null);\n\n protected mensagemDeErro(): string {\n const code = this.erro()?.code;\n if (code === 'token.invalid_or_expired') return 'Este link não é mais válido.';\n if (code === 'rate_limit_exceeded') return 'Muitas tentativas. Aguarde alguns minutos.';\n return 'Tente novamente em instantes.';\n }\n\n ngOnInit(): void {\n const token = this.route.snapshot.queryParamMap.get('token');\n\n if (!token) {\n this.estado.set('falhou');\n this.erro.set({ code: 'token.invalid_or_expired', status: 400 });\n return;\n }\n\n this.client.verifyEmail(token).subscribe({\n next: async (resultado) => {\n // ── O token SAI da URL antes de qualquer navegação ────────────────────\n //\n // Um token de verificação na barra de endereços sobrevive ao histórico do\n // navegador, vaza no cabeçalho `Referer` para qualquer recurso de terceiro que a\n // próxima tela carregue, e entra em log de proxy. Ele já foi consumido neste\n // ponto — mas \"já foi consumido\" é uma garantia do servidor, não uma razão para\n // deixá-lo circulando.\n //\n // `replaceUrl: true` SUBSTITUI a entrada no histórico em vez de empilhar: com\n // `false`, o botão \"voltar\" traria o usuário de volta à URL com o token.\n await this.router.navigate([], {\n relativeTo: this.route,\n queryParams: {},\n replaceUrl: true,\n });\n\n if (resultado.provisioningRequired) {\n await this.router.navigate(['../onboarding/branch'], {\n relativeTo: this.route,\n replaceUrl: true,\n });\n return;\n }\n\n // Sem provisioning, a conta já está operacional — mas o pacote não sabe o que o\n // produto faz em seguida. Só o host sabe.\n await this.navegarParaOHost();\n },\n error: (problema: ProblemDetails) => {\n this.erro.set(problema);\n this.estado.set('falhou');\n },\n });\n }\n\n private async navegarParaOHost(): Promise<void> {\n // `verify-email` sem provisioning não devolve os ids do tenant — a conta foi ativada,\n // a sessão existe, e o host decide o destino a partir do que ele já sabe. Os campos\n // vazios são honestos: o pacote não inventa identificadores que não recebeu.\n const destino = this.config.onCompleted({\n tenantId: '',\n branchId: '',\n applicationId: '',\n userId: '',\n nextStep: 'OperationalReady',\n });\n\n await this.router.navigateByUrl(destino, { replaceUrl: true });\n }\n}\n"],"names":[],"mappings":";;;;;;MA2Ca,eAAe,CAAA;AACT,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AAC9B,IAAA,MAAM,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAErC,MAAM,GAAG,MAAM,CAA2B,aAAa;+EAAC;IACxD,IAAI,GAAG,MAAM,CAAwB,IAAI;6EAAC;IAEnD,cAAc,GAAA;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI;QAC9B,IAAI,IAAI,KAAK,0BAA0B;AAAE,YAAA,OAAO,8BAA8B;QAC9E,IAAI,IAAI,KAAK,qBAAqB;AAAE,YAAA,OAAO,4CAA4C;AACvF,QAAA,OAAO,+BAA+B;IACxC;IAEA,QAAQ,GAAA;AACN,QAAA,MA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