@dotted-labs/ngx-supabase-stripe 0.7.0 → 0.7.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dotted-labs-ngx-supabase-stripe.mjs","sources":["../../../projects/ngx-supabase-stripe/src/lib/config/stripe.config.ts","../../../projects/ngx-supabase-stripe/src/lib/config/supabase.config.ts","../../../projects/ngx-supabase-stripe/src/lib/config/ngx-supabase-stripe.config.ts","../../../projects/ngx-supabase-stripe/src/lib/services/supabase-client.service.ts","../../../projects/ngx-supabase-stripe/src/lib/services/stripe-client.service.ts","../../../projects/ngx-supabase-stripe/src/lib/models/currency.model.ts","../../../projects/ngx-supabase-stripe/src/lib/services/products.service.ts","../../../projects/ngx-supabase-stripe/src/lib/store/products.store.ts","../../../projects/ngx-supabase-stripe/src/lib/store/subscriptions.store.ts","../../../projects/ngx-supabase-stripe/src/lib/store/customer.store.ts","../../../projects/ngx-supabase-stripe/src/lib/store/checkout.store.ts","../../../projects/ngx-supabase-stripe/src/lib/store/portal-account.store.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-skeleton/embedded-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-skeleton/embedded-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-checkout/embedded-checkout.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-checkout/embedded-checkout.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-checkout/return-page/return-page.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-checkout/return-page/return-page.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-item-skeleton/product-item-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-item-skeleton/product-item-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/services/utils.service.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-item/product-item.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-item/product-item.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-list.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-list.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/product-item-button/product-item-button.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-item-button/product-item-button.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-subscription/embedded-subscription.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-subscription/embedded-subscription.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-subscription/return-page/subscription-return-page.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-subscription/return-page/subscription-return-page.component.html","../../../projects/ngx-supabase-stripe/src/lib/directives/brand-icon.directive.ts","../../../projects/ngx-supabase-stripe/src/lib/directives/brand-name.directive.ts","../../../projects/ngx-supabase-stripe/src/lib/directives/payment-method-type.directive.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-method/payment-method.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-method/payment-method.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-dialog/payment-intents-dialog.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-dialog/payment-intents-dialog.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-table/payment-intents-table.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-table/payment-intents-table.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscription-item-skeleton/subscription-item-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscription-item-skeleton/subscription-item-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscription-item/subscription-item.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscription-item/subscription-item.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscriptions-list.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscriptions-list.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscription-card/subscription-card-skeleton/subscription-card-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscription-card/subscription-card-skeleton/subscription-card-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscription-card/subscription-card.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscription-card/subscription-card.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-item-skeleton/payment-intent-item-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-item-skeleton/payment-intent-item-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-item/payment-intent-item.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-item/payment-intent-item.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-list.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-list.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions.component.html","../../../projects/ngx-supabase-stripe/src/lib/pages/customer/customer.component.ts","../../../projects/ngx-supabase-stripe/src/lib/pages/customer/customer.component.html","../../../projects/ngx-supabase-stripe/src/public-api.ts","../../../projects/ngx-supabase-stripe/src/dotted-labs-ngx-supabase-stripe.ts"],"sourcesContent":["import { InjectionToken, Provider } from '@angular/core';\nimport type { StripeConstructorOptions } from '@stripe/stripe-js';\n\n/**\n * Stripe configuration interface\n */\nexport interface StripeConfig {\n /**\n * Stripe client secret\n */\n publishableKey: string;\n\n /**\n * Public origin for embedded Checkout return URLs (e.g. https://app.example.com).\n * Use this when the app does not run on http(s), e.g. Electron with file:// — Stripe rejects non-http(s) return_url.\n * When omitted, components use `window.location.origin`.\n */\n embeddedCheckoutBaseUrl?: string;\n\n /**\n * BCP 47 locale for Stripe.js (e.g. 'en', 'es'). Localizes Embedded Checkout UI only.\n * Should match the locale passed to loadStripeMessages() in the consuming app.\n */\n locale?: StripeConstructorOptions['locale'];\n}\n\nexport const STRIPE_CONFIG = new InjectionToken<StripeConfig>('STRIPE_CONFIG');\n\n/**\n * Provides the Stripe configuration\n * @param config The Stripe configuration\n * @returns An array of providers\n */\nexport function provideStripeConfig(config: StripeConfig): Provider[] {\n return [\n {\n provide: STRIPE_CONFIG,\n useValue: config\n }\n ];\n}","import { InjectionToken, Provider } from '@angular/core';\nimport type { SupabaseClient } from '@supabase/supabase-js';\nimport type { Database } from '../../database.types';\n\n/**\n * Optional shared browser `SupabaseClient` (e.g. the same instance passed to ngx-supabase-auth).\n * When provided, {@link SupabaseClientService} uses it instead of creating a new client.\n */\nexport const SUPABASE_BROWSER_CLIENT = new InjectionToken<SupabaseClient<Database>>(\n 'SUPABASE_BROWSER_CLIENT',\n);\n\n/**\n * Supabase configuration interface\n */\nexport interface SupabaseConfig {\n /**\n * Supabase project URL\n */\n supabaseUrl: string;\n\n /**\n * Supabase API key\n */\n supabaseKey: string;\n\n /**\n * Supabase schema\n */\n supabaseSchema: 'public' | 'stripe';\n}\n\nexport const SUPABASE_CONFIG = new InjectionToken<SupabaseConfig>('SUPABASE_CONFIG');\n\n/**\n * Provides the Supabase configuration\n * @param config The Supabase configuration\n * @returns An array of providers\n */\nexport function provideSupabaseConfig(config: SupabaseConfig): Provider[] {\n return [\n {\n provide: SUPABASE_CONFIG,\n useValue: config\n }\n ];\n}\n\n","import { EnvironmentProviders, Provider } from '@angular/core';\nimport { STRIPE_CONFIG, StripeConfig } from './stripe.config';\nimport { SUPABASE_CONFIG, SupabaseConfig } from './supabase.config';\n\nexport interface NgxSupabaseStripeConfig {\n supabaseConfig: SupabaseConfig;\n stripeConfig: StripeConfig;\n}\n\n/**\n * Provides the NgxSupabaseStripeConfig object\n * @param config The NgxSupabaseStripeConfig object\n * @returns The NgxSupabaseStripeConfig object\n */\nexport function provideNgxSupabaseStripeConfig(\n config: NgxSupabaseStripeConfig\n): (Provider | EnvironmentProviders)[] {\n const providers: (Provider | EnvironmentProviders)[] = [\n {\n provide: SUPABASE_CONFIG,\n useValue: config.supabaseConfig\n },\n {\n provide: STRIPE_CONFIG,\n useValue: config.stripeConfig\n }\n ];\n\n return providers;\n}\n\n","import { inject, Injectable } from '@angular/core';\nimport { createClient, SupabaseClient } from '@supabase/supabase-js';\nimport { Database } from '../../database.types';\nimport { SUPABASE_BROWSER_CLIENT, SUPABASE_CONFIG } from '../config/supabase.config';\nimport { StripeCheckoutSession, StripePaymentIntent, StripeProduct, StripeTables, StripeUpdateType } from '../models/database.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SupabaseClientService {\n private readonly config = inject(SUPABASE_CONFIG);\n private readonly browserClient = inject(SUPABASE_BROWSER_CLIENT, { optional: true });\n private readonly client: SupabaseClient<Database>;\n\n constructor() {\n this.client =\n this.browserClient ??\n createClient<Database>(this.config.supabaseUrl, this.config.supabaseKey);\n\n console.log('🚀 [SupabaseClientService]: this.client', this.client);\n } \n\n /**\n * Get the Supabase client instance\n */\n public getClient(): SupabaseClient<Database> {\n return this.client;\n }\n\n /**\n * Select payment intents\n * @param query Optional query parameters\n */\n public async selectPaymentIntents(\n query?: {\n columns?: string;\n eq?: Partial<Record<keyof StripePaymentIntent, unknown>>;\n order?: { column: keyof StripePaymentIntent | string; ascending?: boolean };\n limit?: number;\n }\n ): Promise<{ data: StripePaymentIntent[] | null; error: Error | null }> {\n return this.select<StripePaymentIntent>('payment_intents', query);\n }\n\n /**\n * STRIPE CHECKOUT SESSIONS\n */\n\n /**\n * Select checkout sessions\n * @param sessionId The checkout session ID\n */\n public async selectCheckoutSession(\n sessionId: string\n ): Promise<{ data: StripeCheckoutSession | null; error: Error | null }> {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_checkout_session', { session_id: sessionId })\n .select('*')\n .single();\n }\n\n /**\n * STRIPE SUBSCRIPTIONS\n */\n\n /**\n * Get all Stripe subscriptions\n */\n public getStripeSubscriptions() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_subscriptions')\n .select('*');\n }\n\n /**\n * Stripe subscriptions for the JWT-authenticated Supabase user (empty if anonymous)\n */\n public getStripeSubscriptionsForAuthenticatedUser() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_subscriptions_for_authenticated_user')\n .select('*');\n }\n\n /**\n * Select a Stripe subscription\n * @param subscriptionId The subscription ID\n */\n public selectStripeSubscription(subscriptionId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_subscription', { subscription_id: subscriptionId })\n .select('*');\n }\n\n /**\n * STRIPE PRICES\n */\n\n /**\n * Select Stripe prices\n * @param query Optional query parameters\n */\n public async selectStripePrices() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_prices')\n .select('*');\n }\n\n /**\n * STRIPE PRODUCTS\n */\n\n /**\n * Select Stripe products\n * @param query Optional query parameters\n */\n public async selectStripeProducts() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_products')\n .select('*');\n }\n\n public async selectStripeProductsByIds(ids: string[]) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_products_by_ids', { product_ids: ids })\n .select('*');\n }\n\n /**\n * Select a Stripe product\n * @param productId The product ID\n */\n public async selectStripeProduct(productId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_product', { product_id: productId })\n .select('*');\n }\n\n /**\n * Stripe products tied to the authenticated user's subscriptions\n */\n public async selectStripeProductsForAuthenticatedUser() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_products_for_authenticated_user')\n .select('*');\n }\n\n /**\n * Single Stripe product only if it belongs to the authenticated user's subscriptions\n */\n public async selectStripeProductForAuthenticatedUser(productId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_product_for_authenticated_user', { product_id: productId })\n .select('*');\n }\n\n /**\n * Update a product\n * @param id The product ID\n * @param data The product data to update\n */\n public async updateProduct(\n id: string,\n data: StripeUpdateType<'products'>\n ): Promise<{ data: StripeProduct | null; error: Error | null }> {\n return this.update<StripeProduct>(\n 'products',\n data,\n { id }\n );\n }\n\n /**\n * Delete a product\n * @param id The product ID\n */\n public async deleteProduct(\n id: string\n ): Promise<{ data: StripeProduct | null; error: Error | null }> {\n return this.delete<StripeProduct>('products', { id });\n }\n\n /**\n * CUSTOMER FUNCTIONS\n */\n\n /**\n * Get customer by email\n * @param email The customer email\n */\n public async getCustomerByEmail(email: string) {\n return this.client.schema(this.config.supabaseSchema).rpc('get_stripe_customer', { customer_email: email });\n }\n\n /**\n * Get customer payment intents\n * @param customerId The customer ID\n */\n public async getCustomerPaymentIntents(customerId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_customer_payment_intents', { customer_id: customerId })\n .select('*');\n }\n\n /**\n * Get customer subscriptions\n * @param customerId The customer ID\n */\n public async getCustomerSubscriptions(customerId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_customer_subscriptions', { customer_id: customerId })\n .select('*');\n }\n\n\n /**\n * CLIENT GENERIC FUNCTIONS\n */\n\n /**\n * Select data from a table\n * @param table The table name\n * @param query Optional query parameters\n */\n public async select<T>(\n table: StripeTables,\n query?: {\n columns?: string;\n eq?: Record<string, any>;\n order?: { column: string; ascending?: boolean };\n limit?: number;\n }\n ): Promise<{ data: T[] | null; error: Error | null }> {\n try {\n let queryBuilder = this.client\n .schema('stripe')\n .from(table)\n .select(query?.columns ?? '*');\n\n if (query?.eq) {\n Object.entries(query.eq).forEach(([key, value]) => {\n queryBuilder = queryBuilder.eq(key, value);\n });\n }\n\n if (query?.order) {\n queryBuilder = queryBuilder.order(\n query.order.column,\n { ascending: query.order.ascending ?? true }\n );\n }\n\n if (query?.limit) {\n queryBuilder = queryBuilder.limit(query.limit);\n }\n\n const { data, error } = await queryBuilder;\n\n if (error) {\n throw error;\n }\n\n return { data: data as T[], error: null };\n } catch (error) {\n return { data: null, error: error as Error };\n }\n }\n\n /**\n * Insert data into a table\n * @param table The table name\n * @param data The data to insert\n */\n public async insert<T>(\n table: StripeTables,\n data: Partial<T>\n ): Promise<{ data: T | null; error: Error | null }> {\n try {\n const { data: result, error } = await (this.client\n .schema('stripe')\n .from(table)\n .insert(data)\n .select()\n .single());\n\n if (error) {\n throw error;\n }\n\n return { data: result as T, error: null };\n } catch (error) {\n return { data: null, error: error as Error };\n }\n }\n\n /**\n * Update data in a table\n * @param table The table name\n * @param data The data to update\n * @param eq The equality conditions\n */\n public async update<T>(\n table: StripeTables,\n data: Partial<T>,\n eq: Record<string, any>\n ): Promise<{ data: T | null; error: Error | null }> {\n try {\n let queryBuilder = this.client\n .schema('stripe')\n .from(table)\n .update(data);\n\n Object.entries(eq).forEach(([key, value]) => {\n queryBuilder = queryBuilder.eq(key, value);\n });\n\n const { data: result, error } = await queryBuilder\n .select()\n .single();\n\n if (error) {\n throw error;\n }\n\n return { data: result as T, error: null };\n } catch (error) {\n return { data: null, error: error as Error };\n }\n }\n\n\n /**\n * Delete data from a table\n * @param table The table name\n * @param eq The equality conditions\n */\n public async delete<T>(\n table: StripeTables,\n eq: Record<string, any>\n ): Promise<{ data: T | null; error: Error | null }> {\n try {\n let queryBuilder = this.client\n .schema('stripe')\n .from(table)\n .delete();\n\n Object.entries(eq).forEach(([key, value]) => {\n queryBuilder = queryBuilder.eq(key, value);\n });\n\n const { data: result, error } = await queryBuilder\n .select()\n .single();\n\n if (error) {\n throw error;\n }\n\n return { data: result as T, error: null };\n } catch (error) {\n return { data: null, error: error as Error };\n }\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { loadStripe, Stripe, StripeEmbeddedCheckout, StripeConstructorOptions } from '@stripe/stripe-js';\nimport type { Stripe as StripeTypes } from 'stripe';\nimport type { FunctionInvokeOptions } from '@supabase/supabase-js';\nimport { STRIPE_CONFIG } from '../config/stripe.config';\nimport { StripeCustomerPublic } from '../store/customer.store';\nimport { SupabaseClientService } from './supabase-client.service';\n\ntype FunctionsAuthResult =\n | { ok: true; headers: { Authorization: string } }\n | { ok: false; error: Error };\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StripeClientService {\n private readonly config = inject(STRIPE_CONFIG);\n private readonly supabase = inject(SupabaseClientService);\n stripe: Promise<Stripe | null>;\n embeddedCheckout: StripeEmbeddedCheckout | null = null;\n\n constructor() {\n const options: StripeConstructorOptions | undefined = this.config.locale\n ? { locale: this.config.locale }\n : undefined;\n this.stripe = loadStripe(this.config.publishableKey, options);\n console.log('🔌 [StripeClientService]: Loaded Stripe Client from @stripe/stripe-js');\n }\n\n /**\n * Edge functions use JWT verification (e.g. getClaims). Requires a logged-in Supabase Auth user.\n */\n private async resolveFunctionsAuth(): Promise<FunctionsAuthResult> {\n const client = this.supabase.getClient();\n const { data: sessionData, error: sessionError } = await client.auth.getSession();\n if (sessionError) {\n return { ok: false, error: new Error(sessionError.message) };\n }\n\n let accessToken = sessionData.session?.access_token;\n if (!accessToken) {\n const { data: refreshed, error: refreshError } = await client.auth.refreshSession();\n if (refreshError) {\n return { ok: false, error: new Error(refreshError.message) };\n }\n accessToken = refreshed.session?.access_token;\n }\n\n if (!accessToken) {\n return {\n ok: false,\n error: new Error(\n $localize`:@@stripe.errors.no_auth_session:No Supabase Auth session. Sign in before checkout (e.g. signInWithPassword, signInWithOAuth, or magic link).`,\n ),\n };\n }\n\n return { ok: true, headers: { Authorization: `Bearer ${accessToken}` } };\n }\n\n private async invokeWithAuth<T>(\n name: string,\n options: FunctionInvokeOptions = {},\n ): Promise<{ data: T | null; error: Error | null }> {\n const auth = await this.resolveFunctionsAuth();\n if (!auth.ok) {\n return { data: null, error: auth.error };\n }\n\n const { data, error } = await this.supabase.getClient().functions.invoke<T>(name, {\n ...options,\n headers: {\n ...options.headers,\n ...auth.headers,\n },\n });\n\n if (error) {\n return { data: null, error: error as Error };\n }\n\n return { data, error: null };\n }\n\n /**\n * Get the Stripe instance\n */\n public async getStripe(): Promise<Stripe | null> {\n return this.stripe;\n }\n\n /**\n * Initialize the embedded checkout\n * @param clientSecret The client secret for the checkout session\n * @see https://docs.stripe.com/js/embedded_checkout/init - v8 supports optional appearance, defaultValues, etc.\n */\n public async initEmbeddedCheckout(clientSecret: string) {\n const stripe = await this.getStripe();\n this.embeddedCheckout = await stripe?.initEmbeddedCheckout({ \n clientSecret\n }) ?? null;\n }\n\n /**\n * Mount the embedded checkout\n * @param elementId The ID of the element to mount the checkout on\n */\n public mountEmbeddedCheckout(elementId: string = '#embedded-checkout') {\n this.embeddedCheckout?.mount(elementId);\n }\n\n /**\n * Destroy the embedded checkout\n * Wrapped in try/catch to handle multiple destroy() calls (stripe-js throws IntegrationError when instance already destroyed)\n */\n public destroyEmbeddedCheckout() {\n if (!this.embeddedCheckout) return;\n try {\n this.embeddedCheckout.destroy();\n } catch {\n // Already destroyed or error - ignore silently\n } finally {\n this.embeddedCheckout = null;\n }\n }\n\n /**\n * Create a checkout session. The edge function sets `metadata.supabase_user_id` and\n * `client_reference_id` from the authenticated user (JWT); do not send user id in the body.\n */\n public async createCheckoutSession(\n priceId: string,\n resultPagePath: string,\n customer: StripeCustomerPublic | null\n ): Promise<{ clientSecret: string | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Checkout.Session>('checkout_session', {\n body: {\n priceId,\n resultPagePath,\n customer,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return {\n clientSecret: data?.client_secret ?? null,\n error: null,\n };\n } catch (error) {\n return { clientSecret: null, error: error as Error };\n }\n }\n\n /**\n * Create a subscription checkout session. Supabase user id is attached on the server from the JWT.\n */\n public async createSubscription(priceId: string, returnPath: string, customer: StripeCustomerPublic | null): Promise<{ clientSecret: string | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Checkout.Session>('create_subscription', {\n body: {\n priceId,\n resultPagePath: returnPath,\n customer,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { clientSecret: data?.client_secret ?? null, error: null };\n } catch (error) {\n return { clientSecret: null, error: error as Error };\n }\n }\n\n /**\n * Update a subscription\n * @param subscriptionId The subscription ID \n * @param params The parameters to update\n */\n public async updateSubscription(\n subscriptionId: string, \n params: any\n ): Promise<{ subscription: StripeTypes.Subscription | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription>('update_subscription', {\n body: {\n subscriptionId,\n params,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { subscription: data, error: null };\n } catch (error) {\n return { subscription: null, error: error as Error };\n }\n }\n\n /**\n * Get a subscription\n * @param subscriptionId The subscription ID\n */\n public async getSubscription(\n subscriptionId: string\n ): Promise<{ subscription: StripeTypes.Subscription | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription>('get_subscription', {\n body: {\n subscriptionId,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { subscription: data, error: null };\n } catch (error) {\n return { subscription: null, error: error as Error };\n }\n }\n\n /**\n * List customer subscriptions\n */\n public async listSubscriptions(): Promise<{ subscriptions: StripeTypes.Subscription[] | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription[]>('list_subscriptions');\n\n if (error) {\n throw error;\n }\n\n return { subscriptions: data, error: null };\n } catch (error) {\n return { subscriptions: null, error: error as Error };\n }\n }\n\n /**\n * Cancel a subscription\n * @param subscriptionId The subscription ID\n */\n public async cancelSubscription(\n subscriptionId: string\n ): Promise<{ subscription: StripeTypes.Subscription | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription>('cancel_subscription', {\n body: {\n subscriptionId,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { subscription: data, error: null };\n } catch (error) {\n return { subscription: null, error: error as Error };\n }\n }\n\n /**\n * Resume a paused subscription\n * @param subscriptionId The subscription ID\n * @param params Optional parameters for resumption\n */\n public async resumeSubscription(\n subscriptionId: string,\n params?: any\n ): Promise<{ subscription: StripeTypes.Subscription | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription>('resume_subscription', {\n body: {\n subscriptionId,\n params,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { subscription: data, error: null };\n } catch (error) {\n return { subscription: null, error: error as Error };\n }\n }\n\n /**\n * Retrieve the payment intent status\n * @param sessionId The session ID of the checkout session\n */\n public async getCheckoutSessionStatus(sessionId: string): Promise<{ \n sessionStatus: StripeTypes.Checkout.Session | null; \n error: Error | null \n }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Checkout.Session>('session_status', {\n body: {\n sessionId,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { sessionStatus: data, error: null };\n } catch (error) {\n console.error('❌ [StripeClientService]: Error retrieving payment intent:', error);\n return { sessionStatus: null, error: error as Error };\n }\n }\n\n /**\n * Create a portal session\n * @param customerId The customer ID\n * @param returnUrl The URL to redirect to after the portal session\n */\n public async createPortalSession(customerId: string, returnUrl: string): Promise<{ url: string | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.BillingPortal.Session>('create_portal_session', {\n body: {\n customerId,\n returnUrl,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { url: data?.url ?? null, error: null };\n } catch (error) {\n return { url: null, error: error as Error };\n }\n }\n\n /**\n * Create a customer\n * @param customerEmail The email of the customer\n */\n public async createCustomer(customerEmail: string): Promise<{ customer: StripeTypes.Customer | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Customer>('create_customer', {\n body: {\n customerEmail,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { customer: data, error: null };\n } catch (error) {\n return { customer: null, error: error as Error };\n }\n }\n\n public async getCustomerPaymentMethods(customerId: string): Promise<{ paymentMethods: StripeTypes.PaymentMethod[] | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.PaymentMethod[]>('customer_payment_methods', {\n body: { customerId },\n });\n\n if (error) {\n throw error;\n }\n\n return { paymentMethods: data, error: null };\n } catch (error) {\n return { paymentMethods: null, error: error as Error };\n }\n }\n\n public async getCustomerPaymentMethod(customerId: string, paymentMethodId: string): Promise<{ paymentMethod: StripeTypes.PaymentMethod | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.PaymentMethod>('customer_payment_method', {\n body: { customerId, paymentMethodId },\n });\n\n if (error) {\n throw error;\n }\n\n return { paymentMethod: data, error: null };\n } catch (error) {\n return { paymentMethod: null, error: error as Error };\n }\n }\n}\n","export enum Currency {\n EUR = 'eur',\n USD = 'usd',\n GBP = 'gbp',\n JPY = 'jpy',\n KRW = 'krw',\n CNY = 'cny',\n INR = 'inr',\n}","import { inject, Injectable } from '@angular/core';\nimport { SupabaseClientService } from './supabase-client.service';\nimport { StripePrice, StripeProduct } from '../models/database.model';\nimport { StripeProductPublic } from '../models/product-public.model';\n\nexport type FetchCatalogResult = {\n prices: StripePrice[];\n products: StripeProductPublic[];\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ProductsService {\n private readonly supabaseService = inject(SupabaseClientService);\n\n /**\n * Map a Stripe product row plus price rows to the public shape used by the UI.\n */\n toStripeProductPublic(product: StripeProduct, prices: StripePrice[] = []): StripeProductPublic {\n return this.parseProduct(product, prices);\n }\n\n /**\n * Load all Stripe prices and products, returning parsed public products.\n */\n async fetchFullCatalog(): Promise<{ data: FetchCatalogResult | null; error: Error | null }> {\n const [pricesResult, productsResult] = await Promise.all([\n this.supabaseService.selectStripePrices(),\n this.supabaseService.selectStripeProducts(),\n ]);\n\n const pricesError = pricesResult.error as Error | null;\n const productsError = productsResult.error as Error | null;\n\n if (pricesError) {\n return { data: null, error: pricesError };\n }\n if (productsError) {\n return { data: null, error: productsError };\n }\n\n const prices = (pricesResult.data ?? []) as StripePrice[];\n const stripeProducts = (productsResult.data ?? []) as StripeProduct[];\n\n const products = stripeProducts.map((product) => this.parseProduct(product, prices));\n\n return { data: { prices, products }, error: null };\n }\n\n /**\n * Load prices and a single product by id, returning parsed public product(s).\n */\n async fetchProductById(\n id: string,\n ): Promise<{ data: StripeProductPublic[]; error: Error | null }> {\n const [pricesResult, productResult] = await Promise.all([\n this.supabaseService.selectStripePrices(),\n this.supabaseService.selectStripeProduct(id),\n ]);\n\n const pricesError = pricesResult.error as Error | null;\n const productError = productResult.error as Error | null;\n\n if (pricesError) {\n return { data: [], error: pricesError };\n }\n if (productError) {\n return { data: [], error: productError };\n }\n\n const prices = (pricesResult.data ?? []) as StripePrice[];\n const rows = productResult.data as StripeProduct[] | null;\n if (!rows?.length) {\n return { data: [], error: null };\n }\n\n return { data: [this.parseProduct(rows[0], prices)], error: null };\n }\n\n /**\n * Load prices and products for the given Stripe product ids.\n */\n async fetchProductsByIds(\n ids: string[],\n ): Promise<{ data: StripeProductPublic[]; error: Error | null }> {\n const [pricesResult, productsResult] = await Promise.all([\n this.supabaseService.selectStripePrices(),\n this.supabaseService.selectStripeProductsByIds(ids),\n ]);\n\n const pricesError = pricesResult.error as Error | null;\n const productsError = productsResult.error as Error | null;\n\n if (pricesError) {\n return { data: [], error: pricesError };\n }\n if (productsError) {\n return { data: [], error: productsError };\n }\n\n const prices = (pricesResult.data ?? []) as StripePrice[];\n const stripeProducts = (productsResult.data ?? []) as StripeProduct[];\n\n const products = stripeProducts.map((product) => this.parseProduct(product, prices));\n\n return { data: products, error: null };\n }\n\n private parseProduct(product: StripeProduct, prices: StripePrice[] = []): StripeProductPublic {\n const { attrs, ...mainProperties } = product;\n return {\n ...mainProperties,\n images: (attrs as { images?: string[] })?.images ?? [],\n prices: prices\n .filter((price) => price.product === product.id)\n .map((price) => ({\n details: price,\n recurringInterval: (price?.attrs as { recurring?: { interval?: string } })?.recurring?.interval ?? 'no-recurring',\n })),\n };\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';\nimport { Currency } from '../models/currency.model';\nimport { StripePricePublic, StripeProductPublic } from '../models/product-public.model';\nimport { ProductsService } from '../services/products.service';\n\nexport type { StripePricePublic, StripeProductPublic } from '../models/product-public.model';\n\nexport type ProductsStatus = 'idle' | 'loading' | 'success' | 'error';\n\ntype ProductsState = {\n products: StripeProductPublic[] | null;\n prices: StripePricePublic[] | null;\n status: ProductsStatus;\n error: string | null;\n currency: Currency;\n};\n\nconst initialProductsState: ProductsState = {\n products: null,\n prices: null,\n status: 'idle',\n error: null,\n currency: Currency.EUR,\n};\n\nexport const ProductsStore = signalStore(\n { providedIn: 'root' },\n withState(initialProductsState),\n withComputed((state) => ({\n isStatusLoading: computed(() => state.status() === 'loading'),\n isStatusSuccess: computed(() => state.status() === 'success'),\n isStatusError: computed(() => state.status() === 'error'),\n oneTimeproductsByCurrency: computed(\n () =>\n state\n .products()\n ?.filter((product) =>\n product.prices.some(\n (price) => price.details.type === 'one_time' && price.details.currency === state.currency(),\n ),\n ) || [],\n ),\n recurringProductsByCurrency: computed(\n () =>\n state\n .products()\n ?.filter((product) =>\n product.prices.some(\n (price) => price.details.type === 'recurring' && price.details.currency === state.currency(),\n ),\n ) || [],\n ),\n productsByCurrency: computed(\n () =>\n state\n .products()\n ?.filter((product) => product.prices.some((price) => price.details.currency === state.currency())) || [],\n ),\n hasProducts: computed(() => state.products() !== null && state.products()!.length > 0),\n isError: computed(() => state.error()),\n })),\n withMethods((store, productsService = inject(ProductsService)) => ({\n /**\n * Get products by IDs from the current loaded products\n */\n getProductsByIds(ids: string[]): StripeProductPublic[] {\n return store.products()?.filter((product) => product.id && ids.includes(product.id)) || [];\n },\n\n /**\n * Set the currency filter for products\n */\n setCurrency(currency: Currency): void {\n patchState(store, { currency });\n },\n\n /**\n * Load product by id\n */\n async loadProductById(id: string) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { data: products, error: productError } = await productsService.fetchProductById(id);\n\n if (productError) {\n console.error('🎮 [ProductsStore]: Error loading product', productError);\n patchState(store, { status: 'error', error: (productError as Error).message });\n return;\n }\n\n patchState(store, { status: 'success', products });\n } catch (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n }\n },\n\n /**\n * Load products from Stripe\n */\n async loadProducts() {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { data, error } = await productsService.fetchFullCatalog();\n\n if (error) {\n console.error('🎮 [ProductsStore]: Error loading catalog', error);\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n return;\n }\n\n if (!data) {\n patchState(store, { status: 'success', prices: [], products: [] });\n return;\n }\n\n console.log('🎮 [ProductsStore] products: ', data.products);\n\n patchState(store, {\n status: 'success',\n prices: data.prices,\n products: data.products,\n });\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n async loadProductsByIds(ids: string[]) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { data: products, error: productsError } = await productsService.fetchProductsByIds(ids);\n\n if (productsError) {\n console.error('🎮 [ProductsStore]: Error loading products', productsError);\n patchState(store, { status: 'error', error: (productsError as Error).message });\n return;\n }\n\n console.log('🎮 [ProductsStore] products: ', products);\n\n patchState(store, {\n status: 'success',\n products,\n });\n } catch (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n }\n },\n\n /**\n * Reset the store to initial state\n */\n reset() {\n patchState(store, initialProductsState);\n },\n })),\n withHooks((store) => ({\n async onInit() {\n console.log('🎮 [ProductsStore] onInit');\n\n const products = store.products();\n console.log('🎮 [ProductsStore] products: ', products);\n\n if (!products) {\n console.log('🎮 [ProductsStore] loading products...');\n await store.loadProducts();\n }\n },\n })),\n);\n","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';\nimport { StripePrice, StripeProduct, StripeSubscription } from '../models/database.model';\nimport { StripeClientService } from '../services/stripe-client.service';\nimport { ProductsService } from '../services/products.service';\nimport { SupabaseClientService } from '../services/supabase-client.service';\nimport { ProductsStore, StripeProductPublic } from './products.store';\nimport { CustomerStore, StripeCustomerPublic } from './customer.store';\n\nexport type StripeSubscriptionCancellationDetails = {\n cancel_at_period_end: boolean;\n cancel_at: number;\n canceled_at: number;\n cancellation_details: {\n comment: string;\n feedback: string;\n reason: string;\n }\n}\n\nexport type StripeSubscriptionPlan = {\n amount: number;\n active: boolean;\n interval: string;\n productId: string;\n}\n\nexport type StripeSubscriptionPublic = Omit<StripeSubscription, 'attrs'> & {\n status: string;\n plan: StripeSubscriptionPlan;\n cancel: StripeSubscriptionCancellationDetails;\n product?: StripeProductPublic | null;\n};\n\nexport type SubscriptionStatus = 'idle' | 'loading' | 'success' | 'error';\n\nexport interface SubscriptionState {\n subscriptions: StripeSubscriptionPublic[] | null;\n currentSubscription: StripeSubscriptionPublic | null;\n status: SubscriptionStatus;\n error: string | null;\n sessionStatus: any | null;\n}\n\nconst initialSubscriptionState: SubscriptionState = {\n subscriptions: null,\n currentSubscription: null,\n status: 'idle',\n error: null,\n sessionStatus: null,\n};\n\nexport const SubscriptionsStore = signalStore(\n { providedIn: 'root' },\n withState(initialSubscriptionState),\n withComputed((state) => ({\n isStatusLoading: computed(() => state.status() === 'loading'),\n isStatusSuccess: computed(() => state.status() === 'success'),\n isStatusError: computed(() => state.status() === 'error'),\n hasSubscriptions: computed(() => state.subscriptions() !== null && state.subscriptions()!.length > 0),\n isError: computed(() => state.error()),\n })),\n withMethods((store, stripeService = inject(StripeClientService),\n supabaseService = inject(SupabaseClientService),\n productsStore = inject(ProductsStore),\n productsService = inject(ProductsService),\n customerStore = inject(CustomerStore)) => ({\n /**\n * Create a subscription\n * @param priceId The price ID for the subscription\n */\n async createSubscription(priceId: string, returnPath: string, customer: StripeCustomerPublic | null) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { clientSecret, error } = await stripeService.createSubscription(priceId, returnPath, customer);\n console.log('🔍 [SubscriptionsStore] created subscription', clientSecret, error);\n \n if (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n } else {\n const stripe = await stripeService.getStripe();\n\n if (!stripe) {\n patchState(store, {\n status: 'error',\n error: $localize`:@@stripe.errors.no_stripe_instance:No Stripe instance returned`,\n });\n } else {\n await stripeService.initEmbeddedCheckout(clientSecret as string);\n stripeService.mountEmbeddedCheckout();\n\n patchState(store, {\n status: 'success',\n });\n }\n }\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n /**\n * Load subscriptions for the authenticated Supabase session (Stripe metadata.supabase_user_id)\n */\n async loadSubscriptions() {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const [subsResult, userProductsResult] = await Promise.all([\n supabaseService.getStripeSubscriptionsForAuthenticatedUser(),\n supabaseService.selectStripeProductsForAuthenticatedUser(),\n ]);\n const { data: subscriptions, error } = subsResult;\n const { data: userStripeProducts, error: userProductsError } = userProductsResult;\n\n if (userProductsError) {\n console.warn('🔍 [SubscriptionsStore] user-scoped products RPC', userProductsError);\n }\n\n const prices = (productsStore.prices() ?? []) as StripePrice[];\n const userProductsById = new Map<string, StripeProductPublic>(\n (userStripeProducts ?? []).map((p) => [\n p.id as string,\n productsService.toStripeProductPublic(p as StripeProduct, prices),\n ]),\n );\n\n console.log('🔍 [SubscriptionsStore] loaded subscriptions', subscriptions);\n\n const parsedSubscriptions = subscriptions?.map((subscription) => {\n const parsedSubscription = parseSubscription(subscription as StripeSubscription);\n const productId = parsedSubscription.plan.productId;\n if (productId) {\n const fromSession = userProductsById.get(productId);\n if (fromSession) {\n parsedSubscription.product = fromSession;\n } else {\n const product = productsStore.products()?.find((p) => p.id === productId);\n if (product) {\n parsedSubscription.product = product;\n }\n }\n }\n return parsedSubscription;\n });\n\n if (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n } else {\n patchState(store, {\n status: 'success',\n subscriptions: parsedSubscriptions\n });\n }\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n /**\n * Get a specific subscription\n * @param subscriptionId The subscription ID\n */\n async getSubscription(subscriptionId: string) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { data, error } = await supabaseService.selectStripeSubscription(subscriptionId);\n const [subscription] = data || [];\n console.log('🔍 [SubscriptionsStore] got subscription', subscription, error);\n\n const parsedSubscription = parseSubscription(subscription as StripeSubscription);\n\n // Get the product associated with this subscription\n const productId = parsedSubscription.plan.productId;\n if (productId && productsStore.products()) {\n const product = productsStore.products()?.find(p => p.id === productId);\n if (product) {\n parsedSubscription.product = product;\n }\n }\n\n if (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n } else {\n patchState(store, {\n status: 'success',\n currentSubscription: parsedSubscription\n });\n }\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n /**\n * Get the status of a checkout subcription session\n * @param sessionId The ID of the checkout subcription session\n */\n async getSessionStatus({sessionId}: {sessionId: string}) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { sessionStatus, error } = await stripeService.getCheckoutSessionStatus(sessionId);\n \n if (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n } else {\n patchState(store, { status: 'success', sessionStatus });\n }\n\n } catch (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n }\n },\n\n /**\n * Destroy the embedded subscription\n */\n destroyEmbeddedSubscription() {\n stripeService.destroyEmbeddedCheckout();\n },\n\n /**\n * Reset the store to initial state\n */\n reset() {\n patchState(store, initialSubscriptionState);\n }\n })),\n withHooks(() => {\n const productsStore = inject(ProductsStore);\n\n if (!productsStore.hasProducts()) {\n productsStore.loadProducts();\n console.log('🔍 [SubscriptionsStore] loading products');\n }\n\n return {\n onInit() {\n console.log('🔍 [SubscriptionsStore] initialized');\n },\n onDestroy() {\n console.log('🧹 [SubscriptionsStore] destroyed');\n }\n }\n })\n);\n\nexport function parseSubscription(subscription: StripeSubscription): StripeSubscriptionPublic {\n const subscriptionAttrs = subscription.attrs as any;\n \n return {\n ...subscription,\n status: subscriptionAttrs.status,\n plan: {\n amount: subscriptionAttrs.plan.amount,\n active: subscriptionAttrs.plan.active,\n interval: subscriptionAttrs.plan.interval,\n productId: subscriptionAttrs.plan.product,\n },\n cancel: {\n cancel_at_period_end: subscriptionAttrs.cancel_at_period_end ?? false,\n cancel_at: subscriptionAttrs.cancel_at ?? null,\n canceled_at: subscriptionAttrs.canceled_at ?? null,\n cancellation_details: subscriptionAttrs.cancellation_details ?? {\n comment: null,\n feedback: null,\n reason: null\n }\n },\n product: subscriptionAttrs.product ? subscriptionAttrs.product as StripeProductPublic : undefined\n };\n}","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';\nimport { setAllEntities, upsertEntity, withEntities } from '@ngrx/signals/entities';\nimport type { Stripe as StripeTypes } from 'stripe';\nimport { StripeCustomer, StripePaymentIntent } from '../models/database.model';\nimport { StripeClientService } from '../services/stripe-client.service';\nimport { SupabaseClientService } from '../services/supabase-client.service';\nimport { ProductsStore } from './products.store';\nimport { parseSubscription, StripeSubscriptionPublic } from './subscriptions.store';\n\nexport type CustomerStatus = 'idle' | 'loading' | 'success' | 'error';\n\nexport type StripePaymentIntentsPublic = Omit<StripePaymentIntent, 'attrs'> & {\n status: string;\n invoiceId: string;\n liveMode: boolean;\n confirmationMethod: string;\n paymentMethodId: string;\n paymentMethod?: PaymentMethodEntity;\n};\n\nexport type StripeCustomerPublic = Omit<StripeCustomer, 'attrs'>;\n\nexport type PaymentMethodEntity = StripeTypes.PaymentMethod;\n\nexport interface CustomerState {\n customer: {\n data: StripeCustomerPublic | null;\n status: CustomerStatus;\n error: string | null;\n };\n paymentIntents: {\n data: StripePaymentIntentsPublic[];\n status: CustomerStatus;\n error: string | null;\n };\n subscriptions: {\n data: StripeSubscriptionPublic[];\n status: CustomerStatus;\n error: string | null;\n };\n paymentMethodsStatus: CustomerStatus;\n paymentMethodsError: string | null;\n}\n\nconst initialCustomerState: CustomerState = {\n customer: { \n status: 'idle', \n data: null,\n error: null \n },\n paymentIntents: {\n data: [],\n status: 'idle',\n error: null,\n },\n subscriptions: {\n data: [], \n status: 'idle',\n error: null,\n },\n paymentMethodsStatus: 'idle',\n paymentMethodsError: null,\n};\n\n\nexport const CustomerStore = signalStore(\n { providedIn: 'root' },\n withState(initialCustomerState),\n withEntities<PaymentMethodEntity>(),\n withComputed((state) => ({\n isPaymentIntentsStatusLoading: computed(() => state.paymentIntents.status() === 'loading'),\n isPaymentIntentsStatusSuccess: computed(() => state.paymentIntents.status() === 'success'),\n isPaymentIntentsStatusError: computed(() => state.paymentIntents.status() === 'error'),\n isSubscriptionsStatusLoading: computed(() => state.subscriptions.status() === 'loading'),\n isSubscriptionsStatusSuccess: computed(() => state.subscriptions.status() === 'success'),\n isSubscriptionsStatusError: computed(() => state.subscriptions.status() === 'error'),\n hasSubscriptions: computed(() => state.subscriptions.data() !== null && state.subscriptions.data()!.length > 0),\n hasPaymentIntents: computed(() => state.paymentIntents.data() !== null && state.paymentIntents.data()!.length > 0),\n firstSubscription: computed(() => state.subscriptions.data()?.[0]),\n restSubscriptions: computed(() => state.subscriptions.data()?.slice(1)),\n isError: computed(() => state.paymentIntents.error()),\n isPaymentMethodsStatusLoading: computed(() => state.paymentMethodsStatus() === 'loading'),\n isPaymentMethodsStatusSuccess: computed(() => state.paymentMethodsStatus() === 'success'),\n isPaymentMethodsStatusError: computed(() => state.paymentMethodsStatus() === 'error'),\n hasPaymentMethods: computed(() => state.entities().length > 0),\n paymentMethods: computed(() => state.entities()),\n })),\n withMethods((state, supabaseService = inject(SupabaseClientService), stripeService = inject(StripeClientService), productsStore = inject(ProductsStore)) => ({\n /**\n * Load customer\n * @param customerEmail The customer email\n */\n async loadCustomer(customerEmail: string) {\n patchState(state, { customer: { status: 'loading', data: null, error: null } });\n\n const { data, error } = await supabaseService.getCustomerByEmail(customerEmail);\n const [customer] = data as StripeCustomerPublic[];\n\n if (error) {\n patchState(state, { customer: { error: error.message, status: 'error', data: null } });\n } else {\n \n if (customer) {\n this.loadPaymentIntents(customer.id as string);\n this.loadSubscriptions(customer.id as string);\n this.loadPaymentMethods(customer.id as string);\n\n patchState(state, { customer: { data: customer, status: 'success', error: null } });\n } else {\n this.createCustomer(customerEmail);\n }\n\n }\n },\n\n /**\n * Create a customer\n * @param customerEmail The customer email\n */\n async createCustomer(customerEmail: string) {\n const { customer, error } = await stripeService.createCustomer(customerEmail);\n\n if (error) {\n patchState(state, { customer: { error: error.message, status: 'error', data: null } });\n } else {\n patchState(state, { customer: { data: customer as StripeCustomerPublic, status: 'success', error: null } });\n }\n },\n\n /**\n * Load payment intents\n * @param customerId The customer ID\n */\n async loadPaymentIntents(customerId: string) {\n patchState(state, { paymentIntents: { status: 'loading', data: [], error: null } });\n\n const { data, error } = await supabaseService.getCustomerPaymentIntents(customerId);\n const paymentIntents = data?.map((paymentIntent) => parsePaymentIntent(paymentIntent, state.entityMap()));\n\n if (error) {\n patchState(state, { paymentIntents: { error: error.message, status: 'error', data: [] } });\n } else {\n patchState(state, { paymentIntents: { data: paymentIntents ?? [], status: 'success', error: null } });\n }\n }, \n\n /**\n * Load subscriptions\n * @param customerId The customer ID\n */\n async loadSubscriptions(customerId: string) {\n patchState(state, { subscriptions: { data: [], status: 'loading', error: null } });\n\n const { data, error } = await supabaseService.getCustomerSubscriptions(customerId);\n \n if (error) {\n patchState(state, { subscriptions: { error: error.message, status: 'error', data: [] } });\n } else {\n const subscriptions = data.map((subscription) => {\n const parsedSubscription = parseSubscription(subscription);\n \n // Get the product associated with this subscription\n const productId = parsedSubscription.plan.productId;\n if (productId && productsStore.products()) {\n const product = productsStore.products()?.find(p => p.id === productId);\n if (product) {\n parsedSubscription.product = product;\n }\n }\n \n return parsedSubscription;\n });\n\n console.log('🔍 [CustomerStore] subscriptions: ', subscriptions);\n \n patchState(state, { subscriptions: { data: subscriptions ?? [], status: 'success', error: null } });\n }\n },\n\n /**\n * Load payment methods for a customer\n * @param customerId The customer ID\n */\n async loadPaymentMethods(customerId: string) {\n patchState(state, { \n paymentMethodsStatus: 'loading', \n paymentMethodsError: null \n });\n\n const { paymentMethods, error } = await stripeService.getCustomerPaymentMethods(customerId);\n\n if (error) {\n patchState(state, { \n paymentMethodsStatus: 'error', \n paymentMethodsError: error.message \n });\n } else {\n patchState(state, \n setAllEntities(paymentMethods ?? []),\n { \n paymentMethodsStatus: 'success', \n paymentMethodsError: null \n }\n );\n }\n },\n\n /**\n * Load a single payment method and add/update it in the entity collection\n * @param customerId The customer ID\n * @param paymentMethodId The payment method ID\n */\n async loadPaymentMethod(customerId: string, paymentMethodId: string) {\n patchState(state, { \n paymentMethodsStatus: 'loading', \n paymentMethodsError: null \n });\n\n const { paymentMethod, error } = await stripeService.getCustomerPaymentMethod(customerId, paymentMethodId);\n\n if (error) {\n patchState(state, { \n paymentMethodsStatus: 'error', \n paymentMethodsError: error.message \n });\n }\n\n if (paymentMethod) {\n patchState(state, \n upsertEntity(paymentMethod),\n { \n paymentMethodsStatus: 'success', \n paymentMethodsError: null \n }\n );\n } else {\n patchState(state, { \n paymentMethodsStatus: 'error', \n paymentMethodsError: $localize`:@@stripe.errors.payment_method_not_found:Payment method not found` \n });\n }\n },\n })),\n withHooks(() => {\n return {\n onInit() {\n const productsStore = inject(ProductsStore);\n\n if (!productsStore.hasProducts()) {\n console.log('🔍 [CustomerStore] loading products...');\n productsStore.loadProducts();\n }\n console.log('🔍 [CustomerStore] initialized');\n },\n onDestroy() {\n console.log('🧹 [CustomerStore] destroyed');\n }\n }\n })\n);\n\nexport function parsePaymentIntent(\n paymentIntent: StripePaymentIntent, \n paymentMethodsMap: Record<string, PaymentMethodEntity> = {}\n): StripePaymentIntentsPublic {\n console.log('🔍 [CustomerStore] paymentIntent: ', paymentIntent);\n\n const paymentIntentAttrs = paymentIntent.attrs as any;\n const paymentMethodId = paymentIntentAttrs.payment_method;\n \n return {\n ...paymentIntent,\n status: paymentIntentAttrs.status,\n invoiceId: paymentIntentAttrs.invoice as string,\n liveMode: paymentIntentAttrs.livemode as boolean,\n confirmationMethod: paymentIntentAttrs.confirmation_method,\n paymentMethodId,\n paymentMethod: paymentMethodId ? paymentMethodsMap[paymentMethodId] : undefined,\n };\n}","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';\nimport { StripeClientService } from '../services/stripe-client.service';\nimport { CustomerStore, StripeCustomerPublic } from './customer.store';\nimport type { Stripe as StripeTypes } from 'stripe';\n\nexport type ICheckoutSessionStatus = StripeTypes.Checkout.Session;\n\nexport type CheckoutStatus = 'idle' | 'loading' | 'success' | 'error';\n\ntype CheckoutState = {\n status: CheckoutStatus;\n sessionId: string | null;\n returnPagePath: string;\n error: string | null;\n sessionStatus: ICheckoutSessionStatus | null;\n}\n\nconst initialCheckoutState: CheckoutState = {\n status: 'idle',\n sessionId: null,\n returnPagePath: '/return',\n error: null,\n sessionStatus: null\n};\n\nexport const CheckoutStore = signalStore(\n { providedIn: 'root' },\n withState(initialCheckoutState),\n withComputed((state) => ({\n isStatusLoading: computed(() => state.status() === 'loading'),\n isStatusSuccess: computed(() => state.status() === 'success'),\n isStatusError: computed(() => state.status() === 'error'),\n paymentStatus: computed(() => state.sessionStatus()?.status),\n isPaymentComplete: computed(() => state.sessionStatus()?.status === 'complete'),\n isPaymentProcessing: computed(() => state.sessionStatus()?.status === 'open'),\n isError: computed(() => state.error())\n })),\n withMethods((store, stripeService = inject(StripeClientService), customerStore = inject(CustomerStore)) => ({\n /**\n * Create a checkout session\n * @param priceId The price ID to checkout\n * @param returnPagePath The return page path after checkout\n */\n async createCheckoutSession({priceId, returnPagePath, customerEmail}: {priceId: string, returnPagePath: string, customerEmail: string | null}) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n let customer: StripeCustomerPublic | null = null;\n \n if (customerEmail) {\n customer = customerStore.customer().data;\n }\n\n const { clientSecret, error } = await stripeService.createCheckoutSession(priceId, returnPagePath, customer);\n\n if (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n } else {\n const stripe = await stripeService.getStripe();\n\n if (!stripe) {\n patchState(store, {\n status: 'error',\n error: $localize`:@@stripe.errors.no_stripe_instance:No Stripe instance returned`,\n });\n } else {\n await stripeService.initEmbeddedCheckout(clientSecret as string);\n stripeService.mountEmbeddedCheckout();\n\n patchState(store, {\n status: 'success',\n });\n }\n }\n\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n /**\n * Get the status of a checkout session\n * @param sessionId The ID of the checkout session\n */\n async getSessionStatus({sessionId}: {sessionId: string}) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { sessionStatus, error } = await stripeService.getCheckoutSessionStatus(sessionId);\n \n if (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n } else {\n patchState(store, { status: 'success', sessionStatus });\n }\n\n } catch (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n }\n },\n\n\n /**\n * Destroy the embedded checkout\n */\n destroyEmbeddedCheckout() {\n stripeService.destroyEmbeddedCheckout();\n },\n \n /**\n * Reset the store to initial state\n */\n reset() {\n patchState(store, initialCheckoutState);\n }\n })),\n withHooks({\n onInit() {\n console.log('🔍 [CheckoutStore] initialized');\n },\n onDestroy() {\n console.log('🧹 [CheckoutStore] destroyed');\n }\n })\n) ","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withMethods, withState } from '@ngrx/signals';\nimport { StripeClientService } from '../services/stripe-client.service';\n\nexport interface PortalSessionResponse {\n url: string;\n}\n\nexport type PortalStatus = 'idle' | 'loading' | 'success' | 'error';\n\nexport interface PortalState {\n status: PortalStatus;\n error: string | null;\n portalUrl: string | null;\n}\n\nconst initialPortalState: PortalState = {\n status: 'idle',\n error: null,\n portalUrl: null\n};\n\nexport const PortalAccountStore = signalStore(\n { providedIn: 'root' },\n withState(initialPortalState),\n withComputed((state) => ({\n isStatusIdle: computed(() => state.status() === 'idle'),\n isStatusLoading: computed(() => state.status() === 'loading'),\n isStatusSuccess: computed(() => state.status() === 'success'),\n isStatusError: computed(() => state.status() === 'error'),\n })),\n withMethods((store, stripeService = inject(StripeClientService)) => ({\n /**\n * Creates a customer portal session and redirects to the URL\n * @param customerId Stripe customer ID\n * @param returnUrl URL to redirect to after the portal session\n */\n async createPortalSession(customerId: string, returnUrl: string): Promise<void> {\n patchState(store, { status: 'loading', error: null, portalUrl: null });\n\n try {\n const { url, error } = await stripeService.createPortalSession(customerId, returnUrl);\n\n if (error) {\n throw new Error(error.message);\n }\n\n if (!url) {\n throw new Error($localize`:@@stripe.errors.portal_session_failed:Could not create portal session`);\n }\n\n patchState(store, {\n status: 'success',\n portalUrl: url\n });\n\n window.location.href = url;\n } catch (error) {\n console.error('🚨 [PortalAccountStore]', error);\n \n const errorMessage = error instanceof Error ? error.message : $localize`:@@stripe.errors.unknown:Unknown error`;\n \n patchState(store, {\n status: 'error',\n error: errorMessage\n });\n }\n },\n\n /**\n * Resets the store to initial state\n */\n reset(): void {\n patchState(store, initialPortalState);\n }\n }))\n); ","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-embedded-skeleton',\n templateUrl: './embedded-skeleton.component.html',\n standalone: true\n})\nexport class EmbeddedSkeletonComponent {} ","<div class=\"w-full max-w-md mx-auto p-4\">\n <!-- Header skeleton -->\n <div class=\"flex items-center gap-4 mb-6\">\n <div class=\"skeleton w-16 h-16 rounded-lg\"></div>\n <div class=\"skeleton h-6 w-48\"></div>\n </div>\n\n <!-- Price skeleton -->\n <div class=\"mb-8\">\n <div class=\"skeleton h-10 w-32 mb-2\"></div>\n <div class=\"skeleton h-4 w-24\"></div>\n </div>\n\n <!-- Payment form skeleton -->\n <div class=\"space-y-4\">\n <!-- Email field -->\n <div class=\"skeleton h-12 w-full\"></div>\n \n <!-- Card info field -->\n <div class=\"skeleton h-12 w-full\"></div>\n \n <!-- Name field -->\n <div class=\"skeleton h-12 w-full\"></div>\n \n <!-- Country selector -->\n <div class=\"skeleton h-12 w-full\"></div>\n \n <!-- Submit button -->\n <div class=\"skeleton h-12 w-full mt-6\"></div>\n </div>\n</div> ","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, OnInit } from '@angular/core';\nimport { STRIPE_CONFIG } from '../../config/stripe.config';\nimport { CheckoutStore } from '../../store/checkout.store';\nimport { CustomerStore } from '../../store/customer.store';\nimport { EmbeddedSkeletonComponent } from '../embedded-skeleton/embedded-skeleton.component';\n\n@Component({\n selector: 'lib-embedded-checkout',\n templateUrl: './embedded-checkout.component.html',\n standalone: true,\n imports: [CommonModule, EmbeddedSkeletonComponent],\n})\nexport class EmbeddedCheckoutComponent implements OnInit {\n public readonly checkoutStore = inject(CheckoutStore);\n public readonly customerStore = inject(CustomerStore);\n private readonly stripeConfig = inject(STRIPE_CONFIG);\n \n public readonly priceId = input.required<string>();\n public readonly returnPagePath = input<string>('/return');\n \n public readonly customer = computed(() => this.customerStore.customer().data);\n\n async ngOnInit() {\n this.createCheckoutSession();\n }\n\n private createCheckoutSession() {\n const base = (\n this.stripeConfig.embeddedCheckoutBaseUrl?.trim() ||\n (typeof window !== 'undefined' ? window.location.origin : '')\n ).replace(/\\/$/, '');\n const path = this.returnPagePath();\n const returnPath = path.startsWith('/') ? `${base}${path}` : `${base}/${path}`;\n\n // Create the checkout session\n this.checkoutStore.createCheckoutSession({\n priceId: this.priceId(),\n returnPagePath: returnPath,\n customerEmail: this.customer()?.email ?? ''\n });\n }\n\n ngOnDestroy() {\n this.checkoutStore.destroyEmbeddedCheckout();\n }\n} ","<div class=\"checkout-container\">\n @if (checkoutStore.isStatusLoading()) {\n <lib-embedded-skeleton />\n }\n \n @if (checkoutStore.isStatusError()) {\n <div class=\"error\">\n <p><span i18n=\"@@stripe.common.error_label\">Error:</span> {{ checkoutStore.error() }}</p>\n </div>\n }\n <div id=\"embedded-checkout\"></div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, OnInit, inject, input } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CheckoutStore } from '../../../store/checkout.store';\n\n@Component({\n selector: 'lib-checkout-return-page',\n templateUrl: './return-page.component.html',\n standalone: true,\n imports: [CommonModule],\n})\nexport class ReturnPageComponent implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n \n public readonly checkoutStore = inject(CheckoutStore);\n \n public readonly returnUrl = input<string>('/');\n \n async ngOnInit() {\n this.route.queryParams.subscribe(async params => {\n const sessionId = params['session_id'];\n this.getSessionStatus(sessionId);\n });\n }\n\n private async getSessionStatus(sessionId: string) {\n if (sessionId) {\n await this.checkoutStore.getSessionStatus({ sessionId });\n } else {\n console.error('Missing session_id parameter in URL');\n }\n }\n \n public navigate(): void {\n this.router.navigateByUrl(this.returnUrl());\n }\n} ","<div class=\"return-page-container\">\n @if (checkoutStore.isStatusLoading()) {\n <div class=\"loading-state\">\n <div class=\"spinner\"></div>\n <p i18n=\"@@stripe.checkout.verifying_status\">Verifying your payment status...</p>\n </div>\n }\n\n @if (checkoutStore.isStatusSuccess() && checkoutStore.isPaymentComplete()) {\n <div class=\"alert alert-success alert-soft flex flex-col items-center gap-4\">\n <div class=\"flex items-center gap-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-12 h-12\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <h2 class=\"status-title\" i18n=\"@@stripe.checkout.payment_complete\">Payment completed successfully!</h2>\n </div>\n </div>\n }\n\n @if (checkoutStore.isStatusSuccess() && checkoutStore.isPaymentProcessing()) {\n <div class=\"alert alert-info alert-soft flex flex-col items-center gap-4\">\n <div class=\"flex items-center gap-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-12 h-12\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <h2 class=\"status-title\" i18n=\"@@stripe.checkout.payment_processing\">Payment in processing</h2>\n </div>\n <p class=\"status-message\" i18n=\"@@stripe.checkout.processing_message\">Your payment is being processed. You will receive an email confirmation when it is complete.</p>\n </div>\n }\n\n @if (checkoutStore.isStatusError()) {\n <div class=\"alert alert-error alert-soft flex flex-col items-center gap-4\">\n <div class=\"flex items-center gap-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-12 h-12\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z\" />\n </svg>\n <h2 class=\"status-title\" i18n=\"@@stripe.checkout.error_title\">An error occurred</h2>\n </div>\n @if (checkoutStore.error()) {\n <p class=\"status-message\">{{ checkoutStore.error() }}</p>\n } @else {\n <p class=\"status-message\" i18n=\"@@stripe.checkout.error_message\">The payment could not be processed. Please try again or contact support.</p>\n }\n </div>\n }\n\n <div class=\"flex justify-end w-full pt-4\">\n <button class=\"btn btn-outline\" (click)=\"navigate()\" i18n=\"@@stripe.common.back\">Back</button>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-product-item-skeleton',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './product-item-skeleton.component.html'\n})\nexport class ProductItemSkeletonComponent {} ","<div class=\"card bg-base-100 shadow-xl w-[350px]\">\n <figure>\n <div class=\"skeleton h-48 w-full\"></div>\n </figure>\n <div class=\"card-body\">\n <div class=\"skeleton h-8 w-32\"></div>\n <div class=\"skeleton h-6 w-48\"></div>\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-3/4\"></div>\n <div class=\"card-actions justify-end mt-4\">\n <div class=\"skeleton h-10 w-24\"></div>\n </div>\n </div>\n</div> ","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UtilsService {\n\n public formatAmount(amount: number, currency = 'EUR'): string {\n if (!amount) return 'N/A';\n\n const formatter = new Intl.NumberFormat(currency.toLocaleUpperCase() === 'EUR' ? 'es-ES' : 'en-US', {\n style: 'currency',\n currency: currency || 'USD',\n });\n \n return formatter.format(amount / 100);\n }\n \n public formatDate(timestamp: number | string): string {\n if (!timestamp) return 'N/A';\n \n const date = typeof timestamp === 'number'\n ? new Date(timestamp * 1000)\n : new Date(timestamp);\n \n return date.toLocaleDateString('es-ES', {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n });\n }\n \n public getStatusBadgeClass(status: string): string {\n switch (status) {\n case 'active':\n case 'succeeded':\n case 'paid':\n return 'badge-success';\n case 'failed':\n case 'canceled':\n case 'unpaid':\n return 'badge-error';\n case 'pending':\n case 'processing':\n case 'trialing':\n return 'badge-warning';\n default:\n return 'badge-ghost';\n }\n }\n\n public translateStripeStatus(status: string): string {\n const labels: Record<string, string> = {\n active: $localize`:@@stripe.status.active:Active`,\n canceled: $localize`:@@stripe.status.canceled:Canceled`,\n cancelled: $localize`:@@stripe.status.canceled:Canceled`,\n incomplete: $localize`:@@stripe.status.incomplete:Incomplete`,\n incomplete_expired: $localize`:@@stripe.status.incomplete_expired:Incomplete expired`,\n past_due: $localize`:@@stripe.status.past_due:Past due`,\n trialing: $localize`:@@stripe.status.trialing:Trialing`,\n unpaid: $localize`:@@stripe.status.unpaid:Unpaid`,\n paused: $localize`:@@stripe.status.paused:Paused`,\n succeeded: $localize`:@@stripe.status.succeeded:Succeeded`,\n failed: $localize`:@@stripe.status.failed:Failed`,\n pending: $localize`:@@stripe.status.pending:Pending`,\n processing: $localize`:@@stripe.status.processing:Processing`,\n paid: $localize`:@@stripe.status.paid:Paid`,\n requires_payment_method: $localize`:@@stripe.status.requires_payment_method:Requires payment method`,\n requires_confirmation: $localize`:@@stripe.status.requires_confirmation:Requires confirmation`,\n requires_action: $localize`:@@stripe.status.requires_action:Requires action`,\n requires_capture: $localize`:@@stripe.status.requires_capture:Requires capture`,\n };\n return labels[status] ?? status;\n }\n\n public translateBillingInterval(interval: string): string {\n const labels: Record<string, string> = {\n day: $localize`:@@stripe.billing.daily:Daily`,\n week: $localize`:@@stripe.billing.weekly:Weekly`,\n month: $localize`:@@stripe.billing.monthly:Monthly`,\n year: $localize`:@@stripe.billing.yearly:Yearly`,\n };\n return labels[interval] ?? interval;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { UtilsService } from '../../../services/utils.service';\nimport { StripePricePublic, StripeProductPublic } from '../../../store/products.store';\nimport { Currency } from '../../../models/currency.model';\n\n@Component({\n selector: 'lib-product-item',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './product-item.component.html'\n})\nexport class ProductItemComponent {\n public readonly product = input.required<StripeProductPublic>();\n public readonly currency = input<Currency>(Currency.EUR);\n\n public readonly productSelected = output<StripeProductPublic>();\n public readonly priceSelected = output<StripePricePublic>();\n\n public readonly utils = inject(UtilsService);\n private readonly sanitizer = inject(DomSanitizer);\n\n protected readonly perMonthSuffix = $localize`:@@stripe.product.per_month:/mo`;\n protected readonly perYearSuffix = $localize`:@@stripe.product.per_year:/yr`;\n\n public price = computed(() => this.product().prices.find(price => price.details.currency === this.currency()));\n\n public sanitizedImage = computed(() => {\n const imageUrl = this.product().images?.[0];\n return imageUrl ? this.sanitizer.bypassSecurityTrustUrl(imageUrl) : null;\n });\n\n onSelect() {\n this.productSelected.emit(this.product());\n this.priceSelected.emit(this.price()?.details as StripePricePublic);\n }\n} ","<div class=\"card bg-base-100 shadow-xl max-w-sm mx-auto rounded-3xl w-[350px]\">\n <div class=\"relative\">\n @if (sanitizedImage()) {\n <figure class=\"bg-gradient-to-br from-base-200 to-base-300\">\n <img \n [src]=\"sanitizedImage()\" \n alt=\"{{ product().name }}\" \n class=\"h-64 w-full object-cover p-8 rounded-t-3xl\" />\n </figure>\n } @else {\n <div class=\"h-64 bg-gradient-to-br from-base-200 to-base-300 flex items-center justify-center\">\n <div class=\"text-base-content/50 text-6xl\">📦</div>\n </div>\n }\n </div>\n\n <div class=\"card-body p-6 flex flex-col h-full\">\n <h2 class=\"card-title text-xl font-bold text-base-content\">\n {{ product().name }}\n </h2>\n\n @if (product().description) {\n <p class=\"text-base-content/70 text-sm mb-4 line-clamp-3\">\n {{ product().description }}\n </p>\n }\n\n <div class=\"flex justify-between gap-2\">\n <span class=\"text-xl font-bold text-base-content\">\n @if (price()?.details?.type === 'recurring') {\n {{ utils.formatAmount(price()?.details?.unit_amount ?? 0, price()?.details?.currency ?? 'EUR') }}{{ price()?.recurringInterval === 'month' ? perMonthSuffix : perYearSuffix }}\n } @else {\n {{ utils.formatAmount(price()?.details?.unit_amount ?? 0, price()?.details?.currency ?? 'EUR') }}\n }\n </span>\n\n @if (!product().active) {\n <div class=\"mt-4\">\n <div class=\"badge badge-warning badge-sm\" i18n=\"@@stripe.product.inactive\">Inactive</div>\n </div>\n } @else {\n <button \n class=\"btn btn-primary\"\n (click)=\"onSelect()\"\n i18n=\"@@stripe.product.buy_now\">\n Buy now\n </button>\n }\n </div>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, inject, input, output } from '@angular/core';\nimport { ProductsStore, StripePricePublic, StripeProductPublic } from '../../store/products.store';\nimport { ProductItemSkeletonComponent } from './product-item-skeleton/product-item-skeleton.component';\nimport { ProductItemComponent } from './product-item/product-item.component';\nimport { Currency } from '../../models/currency.model';\n\n@Component({\n selector: 'stripe-product-list',\n standalone: true,\n imports: [CommonModule, ProductItemComponent, ProductItemSkeletonComponent],\n templateUrl: './product-list.component.html'\n})\nexport class ProductListComponent {\n public readonly productsStore = inject(ProductsStore);\n\n public readonly products = input<StripeProductPublic[]>([]);\n public readonly currency = input<Currency>(Currency.EUR);\n\n public readonly productSelected = output<StripeProductPublic>();\n public readonly priceSelected = output<StripePricePublic>();\n\n onProductSelect(product: StripeProductPublic) {\n this.productSelected.emit(product);\n }\n\n onPriceSelect(price: StripePricePublic) {\n this.priceSelected.emit(price);\n }\n} ","@if (productsStore.isStatusLoading()) {\n <div class=\"flex justify-start gap-8\">\n @for (item of [1,2,3]; track item) {\n <lib-product-item-skeleton></lib-product-item-skeleton>\n }\n </div>\n}\n\n@if (productsStore.isStatusError() && !productsStore.isStatusLoading()) {\n <div class=\"alert alert-error\">\n <span>{{ productsStore.error() }}</span>\n </div>\n}\n\n@if (!productsStore.hasProducts() && !productsStore.isStatusLoading()) {\n <div class=\"alert alert-info\">\n <span i18n=\"@@stripe.product.no_products\">No products available</span>\n </div>\n}\n\n@if (productsStore.hasProducts()) {\n <div class=\"flex justify-start gap-8\">\n @for (product of products(); track product.id) {\n <lib-product-item\n [product]=\"product\"\n [currency]=\"currency()\"\n (productSelected)=\"onProductSelect($event)\"\n (priceSelected)=\"onPriceSelect($event)\">\n </lib-product-item>\n }\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { UtilsService } from '../../services/utils.service';\nimport { StripePricePublic, StripeProductPublic } from '../../store/products.store';\nimport { Currency } from '../../models/currency.model';\n\n@Component({\n selector: 'lib-product-item-button',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './product-item-button.component.html'\n})\nexport class ProductItemButtonComponent {\n public readonly product = input.required<StripeProductPublic>();\n public readonly currency = input<Currency>(Currency.EUR);\n public readonly buttonText = input<string>($localize`:@@stripe.product.buy_now:Buy now`);\n public readonly buttonClass = input<string>('btn btn-primary');\n public readonly showPrice = input<boolean>(true);\n public readonly disabled = input<boolean>(false);\n\n public readonly productSelected = output<StripeProductPublic>();\n public readonly priceSelected = output<StripePricePublic>();\n\n public readonly utils = inject(UtilsService);\n\n public readonly price = computed(() => \n this.product().prices.find(price => price.details.currency === this.currency())\n );\n\n public readonly isDisabled = computed(() => \n this.disabled() || !this.product().active\n );\n\n public readonly displayText = computed(() => {\n if (!this.product().active) {\n return $localize`:@@stripe.product.inactive:Inactive`;\n }\n \n if (!this.showPrice()) {\n return this.buttonText();\n }\n\n const priceInfo = this.price();\n if (!priceInfo) {\n return this.buttonText();\n }\n\n const formattedPrice = this.utils.formatAmount(\n priceInfo.details?.unit_amount ?? 0, \n priceInfo.details?.currency ?? 'EUR'\n );\n\n const suffix = priceInfo.details?.type === 'recurring'\n ? priceInfo.recurringInterval === 'month'\n ? $localize`:@@stripe.product.per_month:/mo`\n : $localize`:@@stripe.product.per_year:/yr`\n : '';\n\n return `${this.buttonText()} - ${formattedPrice}${suffix}`;\n });\n\n public onSelect(): void {\n if (this.isDisabled()) {\n return;\n }\n\n this.productSelected.emit(this.product());\n this.priceSelected.emit(this.price()?.details as StripePricePublic);\n }\n}\n","<button \n [class]=\"buttonClass()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onSelect()\">\n {{ displayText() }}\n</button>\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, OnInit } from '@angular/core';\nimport { STRIPE_CONFIG } from '../../config/stripe.config';\nimport { CustomerStore } from '../../store/customer.store';\nimport { SubscriptionsStore } from '../../store/subscriptions.store';\nimport { EmbeddedSkeletonComponent } from '../embedded-skeleton/embedded-skeleton.component';\n\n@Component({\n selector: 'lib-embedded-subscription',\n templateUrl: './embedded-subscription.component.html',\n standalone: true,\n imports: [CommonModule, EmbeddedSkeletonComponent]\n})\nexport class EmbeddedSubscriptionComponent implements OnInit {\n public readonly subscriptionsStore = inject(SubscriptionsStore);\n public readonly customerStore = inject(CustomerStore);\n private readonly stripeConfig = inject(STRIPE_CONFIG);\n\n public readonly priceId = input.required<string>();\n public readonly returnPagePath = input<string>('/subscription-return');\n \n public readonly customer = computed(() => this.customerStore.customer().data);\n\n async ngOnInit() {\n this.createSubscription();\n }\n\n private createSubscription() {\n const base = (\n this.stripeConfig.embeddedCheckoutBaseUrl?.trim() ||\n (typeof window !== 'undefined' ? window.location.origin : '')\n ).replace(/\\/$/, '');\n const path = this.returnPagePath();\n const returnPath = path.startsWith('/') ? `${base}${path}` : `${base}/${path}`;\n this.subscriptionsStore.createSubscription(this.priceId(), returnPath, this.customer());\n }\n\n ngOnDestroy() {\n this.subscriptionsStore.destroyEmbeddedSubscription();\n }\n} ","<div class=\"checkout-container\">\n @if (subscriptionsStore.isStatusLoading()) {\n <lib-embedded-skeleton />\n }\n \n @if (subscriptionsStore.isStatusError()) {\n <div class=\"error\">\n <p><span i18n=\"@@stripe.common.error_label\">Error:</span> {{ subscriptionsStore.error() }}</p>\n </div>\n }\n <div id=\"embedded-checkout\"></div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, OnInit, computed, inject, input } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CheckoutStore } from '../../../store/checkout.store';\nimport { SubscriptionsStore } from '../../../store/subscriptions.store';\n\n@Component({\n selector: 'lib-subscription-return-page',\n templateUrl: './subscription-return-page.component.html',\n standalone: true,\n imports: [CommonModule],\n})\nexport class SubscriptionReturnPageComponent implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n\n public readonly checkoutStore = inject(CheckoutStore);\n public readonly subscriptionsStore = inject(SubscriptionsStore);\n\n public readonly sessionStatus = computed(() => this.checkoutStore.sessionStatus());\n \n public readonly returnUrl = input<string>('/');\n \n async ngOnInit() {\n this.route.queryParams.subscribe(async params => {\n const sessionId = params['session_id'];\n this.getSessionStatus(sessionId);\n });\n }\n\n private async getSessionStatus(sessionId: string) {\n if (sessionId) {\n await this.checkoutStore.getSessionStatus({ sessionId });\n } else {\n console.error('Missing session_id parameter in URL');\n }\n }\n \n public navigate(): void {\n this.router.navigateByUrl(this.returnUrl());\n }\n} ","<div class=\"flex justify-center min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 p-4\">\n <div class=\"hero-content text-center max-w-md\">\n <div class=\"card w-full bg-base-100 shadow-2xl\">\n <div class=\"card-body items-center text-center\">\n <div class=\"mb-6\">\n <div class=\"avatar\">\n <div class=\"w-24 h-24 rounded-full bg-success/10 flex items-center justify-center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-full w-full text-success\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n </div>\n </div>\n </div>\n\n @if (checkoutStore.isStatusLoading()) {\n <div class=\"flex flex-col items-center gap-4 mb-6\">\n <span class=\"loading loading-spinner loading-lg text-primary\"></span>\n <div class=\"alert alert-info\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" class=\"stroke-current shrink-0 w-6 h-6\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"></path>\n </svg>\n <span i18n=\"@@stripe.subscription.loading_details\">Loading subscription details...</span>\n </div>\n </div>\n } @else if (checkoutStore.isStatusError()) {\n <div class=\"alert alert-error mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span>{{ subscriptionsStore.error() }}</span>\n </div>\n } @else if (checkoutStore.isPaymentComplete()) {\n\n <h2 class=\"card-title text-3xl font-bold text-base-content mb-2\">{{ sessionStatus()?.amount_total }}</h2>\n\n <div class=\"alert alert-success mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span class=\"font-medium\" i18n=\"@@stripe.subscription.return.active\">Your subscription is active and ready to use.</span>\n </div>\n\n <div class=\"bg-base-200 rounded-lg p-4 mb-6 w-full\">\n <h3 class=\"font-semibold text-sm text-base-content/80 mb-3\" i18n=\"@@stripe.subscription.return.benefits_title\">Included benefits:</h3>\n <ul class=\"space-y-2\">\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n <span i18n=\"@@stripe.subscription.return.benefit_full_access\">Full access to all features</span>\n </li>\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n <span i18n=\"@@stripe.subscription.return.benefit_support\">24/7 priority support</span>\n </li>\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n <span i18n=\"@@stripe.subscription.return.benefit_updates\">Automatic updates</span>\n </li>\n </ul>\n </div>\n }\n\n <div class=\"card-actions justify-center w-full\">\n <button class=\"btn btn-primary btn-wide\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-5 w-5 mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6\"\n />\n </svg>\n <span i18n=\"@@stripe.subscription.return.go_dashboard\">Go to dashboard</span>\n </button>\n </div>\n\n <div class=\"text-center mt-4\">\n <p class=\"text-xs text-base-content/50\">\n <span i18n=\"@@stripe.subscription.return.need_help\">Need help?</span>\n <a href=\"#\" class=\"link link-primary\" i18n=\"@@stripe.subscription.return.contact_support\">Contact support</a>\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>\n","import { Directive, ElementRef, input, effect } from '@angular/core';\nimport type { Stripe as StripeTypes } from 'stripe';\n\n@Directive({\n selector: '[ngxBrandIcon]',\n standalone: true\n})\nexport class BrandIconDirective {\n public readonly paymentMethod = input.required<StripeTypes.PaymentMethod>({ alias: 'ngxBrandIcon' });\n\n constructor(private readonly el: ElementRef<HTMLElement>) {\n\n effect(() => {\n const icon = this.getBrandIcon();\n this.el.nativeElement.textContent = icon;\n });\n }\n\n private getBrandIcon(): string {\n const brand = this.paymentMethod().card?.brand;\n const brandIcons: Record<string, string> = {\n 'visa': '💳',\n 'mastercard': '💳', \n 'amex': '💳',\n 'discover': '💳',\n 'diners': '💳',\n 'jcb': '💳',\n 'unionpay': '💳',\n 'unknown': '💳'\n };\n return brandIcons[brand || 'unknown'] || '💳';\n }\n}\n","import { Directive, ElementRef, input, effect } from '@angular/core';\nimport type { Stripe as StripeTypes } from 'stripe';\n\n@Directive({\n selector: '[ngxBrandName]',\n standalone: true\n})\nexport class BrandNameDirective {\n public readonly paymentMethod = input.required<StripeTypes.PaymentMethod>({ alias: 'ngxBrandName' });\n\n constructor(private readonly el: ElementRef<HTMLElement>) {\n\n effect(() => {\n const name = this.getBrandName();\n this.el.nativeElement.textContent = name;\n });\n }\n\n private getBrandName(): string {\n const brand = this.paymentMethod().card?.brand;\n const brandNames: Record<string, string> = {\n 'visa': 'Visa',\n 'mastercard': 'Mastercard',\n 'amex': 'American Express',\n 'discover': 'Discover',\n 'diners': 'Diners Club',\n 'jcb': 'JCB',\n 'unionpay': 'UnionPay',\n 'unknown': 'Tarjeta'\n };\n return brandNames[brand || 'unknown'] || 'Tarjeta';\n }\n}\n","import { Directive, ElementRef, input, effect } from '@angular/core';\nimport type { Stripe as StripeTypes } from 'stripe';\n\n@Directive({\n selector: '[ngxPaymentMethodType]',\n standalone: true\n})\nexport class PaymentMethodTypeDirective {\n public readonly paymentMethod = input.required<StripeTypes.PaymentMethod>({ alias: 'ngxPaymentMethodType' });\n\n constructor(private readonly el: ElementRef<HTMLElement>) {\n\n effect(() => {\n const type = this.getPaymentMethodType();\n this.el.nativeElement.textContent = type;\n });\n }\n\n private getPaymentMethodType(): string {\n const typeNames: Record<string, string> = {\n 'card': 'Tarjeta',\n 'paypal': 'PayPal',\n 'klarna': 'Klarna',\n 'afterpay_clearpay': 'Afterpay',\n 'alipay': 'Alipay',\n 'bancontact': 'Bancontact',\n 'eps': 'EPS',\n 'giropay': 'Giropay',\n 'ideal': 'iDEAL',\n 'p24': 'Przelewy24',\n 'sepa_debit': 'SEPA Direct Debit',\n 'sofort': 'Sofort',\n 'wechat_pay': 'WeChat Pay'\n };\n return typeNames[this.paymentMethod().type] || 'Método de pago';\n }\n}\n","import { Component, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport type { Stripe as StripeTypes } from 'stripe';\nimport { BrandIconDirective } from '../../../directives/brand-icon.directive';\nimport { BrandNameDirective } from '../../../directives/brand-name.directive';\nimport { PaymentMethodTypeDirective } from '../../../directives/payment-method-type.directive';\n\nexport type PaymentMethodDisplayMode = 'detailed' | 'compact';\n\n@Component({\n selector: 'ngx-payment-method',\n standalone: true,\n imports: [CommonModule, BrandIconDirective, BrandNameDirective, PaymentMethodTypeDirective],\n templateUrl: './payment-method.component.html'\n})\nexport class PaymentMethodComponent {\n public readonly paymentMethod = input.required<StripeTypes.PaymentMethod>();\n public readonly mode = input<PaymentMethodDisplayMode>('detailed');\n\n public get last4(): string {\n return this.paymentMethod().card?.last4 || '****';\n }\n\n public get expirationDate(): string {\n const card = this.paymentMethod().card;\n if (!card?.exp_month || !card?.exp_year) return '';\n return `${card.exp_month.toString().padStart(2, '0')}/${card.exp_year.toString().slice(-2)}`;\n }\n\n public get holderName(): string {\n return this.paymentMethod().billing_details?.name || 'N/A';\n }\n\n public get isExpired(): boolean {\n const card = this.paymentMethod().card;\n if (!card?.exp_month || !card?.exp_year) return false;\n \n const now = new Date();\n const expDate = new Date(card.exp_year, card.exp_month - 1);\n return expDate < now;\n }\n\n public get cardFunding(): string | undefined {\n return this.paymentMethod().card?.funding;\n }\n\n public get cardCountry(): string | undefined {\n return this.paymentMethod().card?.country || undefined;\n }\n\n public get billingEmail(): string | undefined {\n return this.paymentMethod().billing_details?.email || undefined;\n }\n\n public get billingPhone(): string | undefined {\n return this.paymentMethod().billing_details?.phone || undefined;\n }\n\n public get billingAddress() {\n return this.paymentMethod().billing_details?.address;\n }\n}\n","<!-- Detailed Version -->\n@if (mode() === 'detailed') {\n <div class=\"w-full max-w-md mx-auto\">\n <!-- Stack of Credit Cards -->\n <div class=\"stack w-full h-56\">\n <div class=\"bg-gradient-to-br from-primary to-accent text-neutral-content relative place-content-center rounded-box\">\n <div class=\"card-body p-6 relative z-10\">\n <!-- Card Header -->\n <div class=\"flex justify-between items-start mb-6\">\n <div class=\"flex items-center gap-2\">\n <div class=\"font-bold text-lg text-primary-content\" [ngxBrandName]=\"paymentMethod()\"></div>\n @if (cardCountry) {\n <div class=\"text-xs text-primary-content/60 uppercase\">{{ cardCountry }}</div>\n }\n @if (isExpired) {\n <div class=\"badge badge-error badge-sm animate-pulse\" i18n=\"@@stripe.payment_method.expired\">Expired</div>\n }\n </div>\n </div>\n\n <!-- Card Number -->\n <div class=\"mb-6\">\n <div class=\"font-mono text-xl tracking-wider text-primary-content\">\n **** **** **** {{ last4 }}\n </div>\n </div>\n\n <!-- Card Bottom Info -->\n <div class=\"flex justify-start items-end\">\n <div class=\"flex-1\">\n <div class=\"text-xs text-primary-content/60 mb-1\" i18n=\"@@stripe.payment_method.cardholder\">CARDHOLDER</div>\n <div class=\"font-medium text-sm text-primary-content truncate max-w-32\">{{ holderName }}</div>\n </div>\n \n @if (expirationDate) {\n <div class=\"flex-1\">\n <div class=\"text-xs text-primary-content/60 mb-1\" i18n=\"@@stripe.payment_method.valid_thru\">VALID THRU</div>\n <div class=\"font-mono text-sm text-primary-content\">{{ expirationDate }}</div>\n </div>\n }\n </div>\n </div>\n\n <!-- Card Background Pattern -->\n <div class=\"absolute inset-0 opacity-20\">\n <div class=\"absolute top-4 right-4 w-20 h-20 rounded-full bg-primary-content/30\"></div>\n <div class=\"absolute bottom-4 left-4 w-16 h-16 rounded-full bg-primary-content/20\"></div>\n <div class=\"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-32 h-32 rounded-full bg-primary-content/10\"></div>\n </div>\n </div>\n <div class=\"bg-secondary grid place-content-center rounded-box\"></div>\n <div class=\"bg-accent grid place-content-center rounded-box\"></div>\n </div>\n\n <!-- Additional Information Below Cards -->\n <div class=\"mt-6 space-y-4\">\n <!-- Billing Information -->\n @if (billingEmail || billingPhone) {\n <div class=\"card bg-base-100 shadow-sm border border-base-200\">\n <div class=\"card-body p-4\">\n <h4 class=\"card-title text-sm mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z\" />\n </svg>\n <span i18n=\"@@stripe.payment_method.contact_info\">Contact information</span>\n </h4>\n \n <div class=\"space-y-2\">\n @if (billingEmail) {\n <div class=\"flex items-center gap-2 text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-base-content/60\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207\" />\n </svg>\n <span class=\"text-base-content/70\">{{ billingEmail }}</span>\n </div>\n }\n \n @if (billingPhone) {\n <div class=\"flex items-center gap-2 text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-base-content/60\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z\" />\n </svg>\n <span class=\"text-base-content/70\">{{ billingPhone }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Billing Address -->\n @if (billingAddress && (billingAddress.line1 || billingAddress.city)) {\n <div class=\"card bg-base-100 shadow-sm border border-base-200\">\n <div class=\"card-body p-4\">\n <h4 class=\"card-title text-sm mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 11a3 3 0 11-6 0 3 3 0 016 0z\" />\n </svg>\n <span i18n=\"@@stripe.payment_method.billing_address\">Billing address</span>\n </h4>\n \n <div class=\"text-sm text-base-content/70 space-y-1\">\n @if (billingAddress.line1) {\n <div>{{ billingAddress.line1 }}</div>\n @if (billingAddress.line2) {\n <div>{{ billingAddress.line2 }}</div>\n }\n }\n \n <div class=\"flex gap-2 flex-wrap\">\n @if (billingAddress.city) {\n <span>{{ billingAddress.city }}</span>\n }\n @if (billingAddress.postal_code) {\n <span>{{ billingAddress.postal_code }}</span>\n }\n @if (billingAddress.country) {\n <span class=\"uppercase\">{{ billingAddress.country }}</span>\n }\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Card Creation Date -->\n <div class=\"flex items-center justify-between text-sm text-base-content/60 px-2\">\n <span i18n=\"@@stripe.payment_method.added_on\">Payment method added:</span>\n <span>{{ paymentMethod().created * 1000 | date:'short' }}</span>\n </div>\n </div>\n </div>\n}\n\n<!-- Compact Version -->\n@if (mode() === 'compact') {\n <div class=\"flex items-center gap-2\">\n <div class=\"flex-1 min-w-0\">\n <div class=\"flex items-center gap-2\">\n <span class=\"font-medium\" [ngxBrandName]=\"paymentMethod()\"></span>\n <span class=\"text-base-content/70\">•••• {{ last4 }}</span>\n @if (paymentMethod().type === 'card' && expirationDate) {\n <span class=\"text-base-content/70 text-sm\">{{ expirationDate }}</span>\n }\n </div>\n </div>\n\n @if (isExpired) {\n <div class=\"badge badge-error badge-sm animate-pulse\" i18n=\"@@stripe.payment_method.expired\">Expired</div>\n } @else {\n <div class=\"badge badge-success badge-sm\" i18n=\"@@stripe.payment_method.active\">Active</div>\n }\n </div>\n}\n","import { Component, inject, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { StripePaymentIntentsPublic } from '../../../../store/customer.store';\nimport { UtilsService } from '../../../../services/utils.service';\nimport { PaymentMethodComponent } from '../../payment-method/payment-method.component';\n\n@Component({\n selector: 'lib-payment-intents-dialog',\n standalone: true,\n imports: [CommonModule, PaymentMethodComponent],\n templateUrl: './payment-intents-dialog.component.html'\n})\nexport class PaymentIntentsDialogComponent {\n public readonly paymentIntent = input.required<StripePaymentIntentsPublic>();\n public readonly dialogId = input.required<string>();\n \n public readonly utils = inject(UtilsService);\n\n protected readonly liveModeLabel = $localize`:@@stripe.payment_intents.mode.live:Live`;\n protected readonly testModeLabel = $localize`:@@stripe.payment_intents.mode.test:Test`;\n protected readonly notAvailableLabel = $localize`:@@stripe.common.not_available:N/A`;\n}\n","<dialog [id]=\"dialogId()\" class=\"modal\">\n <div class=\"modal-box max-w-2xl\">\n <h3 class=\"font-bold text-lg mb-4\" i18n=\"@@stripe.payment_intents.dialog_title\">Payment intent details</h3>\n \n <div class=\"flex items-center gap-3 mb-6 p-4 bg-base-200 rounded-lg\">\n <div class=\"flex-1\">\n <div class=\"text-3xl font-bold text-primary\">\n {{ utils.formatAmount(paymentIntent().amount ?? 0, paymentIntent().currency ?? 'EUR') }}\n </div>\n <div class=\"text-sm text-base-content/70\">\n {{ (paymentIntent().currency ?? 'EUR').toUpperCase() }}\n </div>\n </div>\n <div class=\"flex gap-2\">\n <div class=\"badge {{ utils.getStatusBadgeClass(paymentIntent().status) }}\">\n {{ utils.translateStripeStatus(paymentIntent().status) }}\n </div>\n @if (!paymentIntent().liveMode) {\n <div class=\"badge badge-warning\" i18n=\"@@stripe.payment_intents.mode.test\">TEST</div>\n }\n </div>\n </div>\n\n <div class=\"space-y-6\">\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.transaction_details\">Transaction details</span>\n </h4>\n \n <div class=\"grid grid-cols-1 sm:grid-cols-2 gap-3\">\n <div class=\"stat bg-base-200 rounded-lg p-3\">\n <div class=\"stat-title text-xs\" i18n=\"@@stripe.payment_intents.table.status\">Status</div>\n <div class=\"stat-value text-sm capitalize\">{{ utils.translateStripeStatus(paymentIntent().status) }}</div>\n <div class=\"stat-desc\">{{ paymentIntent().liveMode ? liveModeLabel : testModeLabel }}</div>\n </div>\n \n <div class=\"stat bg-base-200 rounded-lg p-3\">\n <div class=\"stat-title text-xs\" i18n=\"@@stripe.payment_intents.table.amount\">Amount</div>\n <div class=\"stat-value text-sm\">{{ utils.formatAmount(paymentIntent().amount ?? 0, paymentIntent().currency ?? 'EUR') }}</div>\n <div class=\"stat-desc\">{{ (paymentIntent().currency ?? 'EUR').toUpperCase() }}</div>\n </div>\n </div>\n\n <div class=\"mt-3 flex items-center gap-2 text-sm p-2 bg-base-200 rounded\">\n <div class=\"w-2 h-2 bg-success rounded-full\"></div>\n <span class=\"text-base-content/70\" i18n=\"@@stripe.payment_intents.confirmation\">Confirmation:</span>\n <span class=\"capitalize font-medium\">{{ paymentIntent().confirmationMethod.replace('_', ' ') }}</span>\n </div>\n </div>\n\n @if (paymentIntent().paymentMethod) {\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.payment_info\">Payment information</span>\n </h4>\n \n <ngx-payment-method \n [paymentMethod]=\"paymentIntent().paymentMethod!\" \n mode=\"detailed\">\n </ngx-payment-method>\n </div>\n }\n\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.additional_info\">Additional information</span>\n </h4>\n \n <div class=\"space-y-2\">\n @if (paymentIntent().invoiceId) {\n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.invoice\">Invoice</span>\n <span class=\"text-sm font-mono\">{{ paymentIntent().invoiceId.slice(-8) }}</span>\n </div>\n }\n \n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.environment\">Environment</span>\n <span class=\"text-sm\">\n @if (paymentIntent().liveMode) {\n <span class=\"text-success\" i18n=\"@@stripe.payment_intents.mode.live\">Live</span>\n } @else {\n <span class=\"text-warning\" i18n=\"@@stripe.payment_intents.mode.test\">Test</span>\n }\n </span>\n </div>\n \n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.reference\">Reference</span>\n <span class=\"text-sm font-mono\">•••{{ paymentIntent().id?.slice(-6) || notAvailableLabel }}</span>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"modal-action\">\n <form method=\"dialog\">\n <button class=\"btn btn-primary\" i18n=\"@@stripe.common.close\">Close</button>\n </form>\n </div>\n </div>\n</dialog>\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { UtilsService } from '../../../../services/utils.service';\nimport { StripePaymentIntentsPublic } from '../../../../store/customer.store';\nimport { PaymentMethodComponent } from '../../payment-method/payment-method.component';\nimport { PaymentIntentsDialogComponent } from '../payment-intents-dialog/payment-intents-dialog.component';\n\n@Component({\n selector: 'lib-payment-intents-table',\n templateUrl: './payment-intents-table.component.html',\n standalone: true,\n imports: [\n CommonModule,\n PaymentMethodComponent,\n PaymentIntentsDialogComponent\n ]\n})\nexport class PaymentIntentsTableComponent {\n public readonly paymentIntents = input.required<StripePaymentIntentsPublic[]>();\n\n public paymentIntentsTable = computed(() => {\n return this.paymentIntents().map(paymentIntent => ({\n ...paymentIntent,\n selected: false\n }));\n });\n\n public readonly loading = input<boolean>(false);\n public readonly error = input<string | null>(null);\n public readonly withControls = input<boolean>(true);\n \n public readonly exportSelected = output<StripePaymentIntentsPublic[]>();\n public readonly onRefresh = output<void>();\n \n public readonly utils = inject(UtilsService);\n\n protected readonly liveModeLabel = $localize`:@@stripe.payment_intents.mode.live:Live`;\n protected readonly testModeLabel = $localize`:@@stripe.payment_intents.mode.test:Test`;\n \n public readonly hasPaymentIntents = computed(() => \n this.paymentIntents() && this.paymentIntents().length > 0\n );\n \n protected readonly trackByPaymentIntentId = (index: number, item: StripePaymentIntentsPublic) => item.id;\n \n public refreshPaymentIntents(): void {\n this.onRefresh.emit();\n }\n\n public allPaymentIntentsSelected(): boolean {\n return this.paymentIntentsTable().every(paymentIntent => paymentIntent.selected);\n }\n\n public somePaymentIntentsSelected(): boolean {\n return this.paymentIntentsTable().some(paymentIntent => paymentIntent.selected);\n }\n\n public toggleAllPaymentIntents(event: Event): void {\n const checkbox = event.target as HTMLInputElement;\n const isChecked = checkbox.checked;\n this.paymentIntentsTable().forEach(paymentIntent => {\n paymentIntent.selected = isChecked;\n });\n }\n\n public togglePaymentIntent(event: Event, id: string): void {\n const checkbox = event.target as HTMLInputElement;\n const isChecked = checkbox.checked;\n const paymentIntent = this.paymentIntentsTable().find(paymentIntent => paymentIntent.id === id);\n if (paymentIntent) {\n paymentIntent.selected = isChecked;\n }\n }\n\n public showDetails(id: string): void {\n const modalElement = document.getElementById(`modal-${id}`) as HTMLDialogElement;\n if (modalElement) {\n modalElement.showModal();\n }\n } \n\n public exportSelectedPaymentIntents(): void {\n this.exportSelected.emit(this.paymentIntentsTable().filter(paymentIntent => paymentIntent.selected));\n }\n} ","<div class=\"payment-intents-container\">\n @if (withControls()) {\n <div class=\"controls mb-4 flex justify-between items-center\">\n <div class=\"stats\">\n @if (hasPaymentIntents()) {\n <span class=\"badge badge-soft badge-info\">{{ paymentIntentsTable().length }} <span i18n=\"@@stripe.payment_intents.count_label\">payment intents</span></span>\n }\n </div>\n <div class=\"flex justify-end items-center gap-2\">\n <button class=\"btn btn-sm btn-outline\" (click)=\"refreshPaymentIntents()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 mr-1\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\" />\n </svg>\n <span i18n=\"@@stripe.common.refresh\">Refresh</span>\n </button>\n <button class=\"btn btn-sm btn-primary\" [disabled]=\"!somePaymentIntentsSelected()\" (click)=\"exportSelectedPaymentIntents()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M8.71 7.71L11 5.41V15a1 1 0 0 0 2 0V5.41l2.29 2.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42l-4-4a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-4 4a1 1 0 1 0 1.42 1.42M21 14a1 1 0 0 0-1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4a1 1 0 0 0-2 0v4a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-4a1 1 0 0 0-1-1\"/></svg>\n <span i18n=\"@@stripe.payment_intents.export_selected\">Export selected</span>\n </button>\n </div>\n </div>\n }\n\n @if (loading()) {\n <div class=\"overflow-x-auto\">\n <div class=\"skeleton h-32 w-full\"></div>\n </div>\n } @else if (error()) {\n <div class=\"error-container\">\n <div class=\"alert alert-error\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" /></svg>\n <span>{{ error() }}</span>\n </div>\n </div>\n } @else if (hasPaymentIntents()) {\n <div class=\"overflow-x-auto rounded-box bg-base-100\">\n <table class=\"table table-zebra\">\n <thead>\n <tr>\n <th>\n <label>\n <input type=\"checkbox\" class=\"checkbox\" (change)=\"toggleAllPaymentIntents($event)\" [checked]=\"allPaymentIntentsSelected()\" />\n </label>\n </th>\n <th i18n=\"@@stripe.payment_intents.table.amount\">Amount</th>\n <th i18n=\"@@stripe.payment_intents.table.payment_method\">Payment method</th>\n <th i18n=\"@@stripe.payment_intents.table.status\">Status</th>\n <th i18n=\"@@stripe.payment_intents.table.mode\">Mode</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (paymentIntent of paymentIntentsTable(); track trackByPaymentIntentId(0, paymentIntent)) {\n <tr>\n <th>\n <label>\n <input type=\"checkbox\" class=\"checkbox\" (change)=\"togglePaymentIntent($event, paymentIntent.id ?? '')\" [checked]=\"paymentIntent.selected\" />\n </label>\n </th>\n <td>{{ utils.formatAmount(paymentIntent.amount ?? 0, paymentIntent.currency ?? 'EUR') }}</td>\n <td>\n @if (paymentIntent.paymentMethod) {\n <ngx-payment-method \n [paymentMethod]=\"paymentIntent.paymentMethod!\" \n mode=\"compact\">\n </ngx-payment-method>\n } @else {\n <span class=\"badge badge-outline\">\n {{ paymentIntent.paymentMethodId }}\n </span>\n }\n </td>\n <td>\n <span class=\"badge badge-soft {{ utils.getStatusBadgeClass(paymentIntent.status) }}\">\n {{ utils.translateStripeStatus(paymentIntent.status) }}\n </span>\n </td>\n <td>{{ paymentIntent.liveMode ? liveModeLabel : testModeLabel }}</td>\n <td>\n <button class=\"btn btn-xs btn-ghost\" (click)=\"showDetails(paymentIntent.id ?? '')\" i18n=\"@@stripe.payment_intents.details\">Details</button>\n <lib-payment-intents-dialog \n [paymentIntent]=\"paymentIntent\" \n [dialogId]=\"'modal-' + paymentIntent.id\">\n </lib-payment-intents-dialog>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n } @else {\n <div class=\"empty-state\">\n <div class=\"card bg-base-100 shadow-sm\">\n <div class=\"card-body items-center text-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-12 w-12 text-gray-400 mb-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n <h2 class=\"card-title text-xl\" i18n=\"@@stripe.payment_intents.empty_title\">No recent payment intents</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.payment_intents.empty_description\">No payment intents found in your history.</p>\n </div>\n </div>\n </div>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-subscription-item-skeleton',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './subscription-item-skeleton.component.html',\n})\nexport class SubscriptionItemSkeletonComponent {}","<div class=\"card bg-gradient-to-br from-base-100/10 to-base-200/10 shadow-lg hover:shadow-xl transition-all duration-300 h-[180px]\">\n <div class=\"card-body p-4\">\n <div class=\"flex justify-between\">\n <div>\n <div class=\"flex items-center gap-2\">\n <div class=\"skeleton h-6 w-32\"></div>\n <div class=\"skeleton h-5 w-20\"></div>\n </div>\n <div class=\"skeleton h-4 w-48 mt-2\"></div>\n </div>\n \n <div class=\"flex gap-2\">\n <div class=\"skeleton h-8 w-20\"></div>\n </div>\n </div>\n\n <div class=\"mt-2\">\n <div class=\"flex justify-between text-sm\">\n <div class=\"skeleton h-4 w-32\"></div>\n <div class=\"skeleton h-4 w-32\"></div>\n </div>\n </div>\n\n <!--<div class=\"mt-4 border-t pt-4\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <div>\n <div class=\"skeleton h-5 w-24 mb-2\"></div>\n <div class=\"space-y-1\">\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-3/4\"></div>\n </div>\n </div>\n \n <div>\n <div class=\"skeleton h-5 w-24 mb-2\"></div>\n <div class=\"space-y-1\">\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-3/4\"></div>\n </div>\n </div>\n </div>\n \n <div class=\"card-actions mt-4 justify-end\">\n <div class=\"skeleton h-8 w-32\"></div>\n </div>\n </div>-->\n </div>\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { UtilsService } from '../../../../../services/utils.service';\nimport { PortalAccountStore } from '../../../../../store/portal-account.store';\nimport { StripeSubscriptionPublic, SubscriptionsStore } from '../../../../../store/subscriptions.store';\n\n@Component({\n selector: 'lib-subscription-item',\n templateUrl: './subscription-item.component.html',\n standalone: true,\n imports: [CommonModule],\n})\nexport class SubscriptionItemComponent {\n public readonly subscriptionsStore = inject(SubscriptionsStore);\n public readonly portalAccountStore = inject(PortalAccountStore);\n public readonly utils = inject(UtilsService);\n private readonly sanitizer = inject(DomSanitizer);\n \n public readonly subscription = input.required<StripeSubscriptionPublic>();\n public readonly onManageSubscription = output<string>();\n\n public readonly isStatusLoading = computed(() => this.portalAccountStore.isStatusLoading());\n\n protected readonly subscriptionProductAlt = $localize`:@@stripe.subscription.product_alt:Subscription product`;\n protected readonly subscriptionPlanFallback = $localize`:@@stripe.subscription.plan_fallback:Subscription plan`;\n\n public readonly productImage = computed(() => {\n return this.subscription().product?.images?.[0] || 'https://img.daisyui.com/images/profile/demo/yellingcat@192.webp';\n });\n \n public isExpanded = false;\n \n public toggleExpand(): void {\n this.isExpanded = !this.isExpanded;\n }\n \n public manageSubscription(): void {\n this.onManageSubscription.emit(this.subscription().customer ?? '');\n }\n\n public sanitizeImageUrl(imageUrl: string): SafeUrl {\n return this.sanitizer.bypassSecurityTrustUrl(imageUrl);\n }\n} ","<div class=\"card bg-gradient-to-br from-base-100/10 to-base-200/10 shadow-lg hover:shadow-xl transition-all duration-300\">\n <div class=\"card-body p-4\">\n <!-- Header with title and price -->\n <div class=\"flex justify-between items-start\">\n <div class=\"flex flex-row justify-start items-start gap-3\">\n <!-- Subscription image -->\n <div class=\"avatar\">\n <div class=\"w-24 rounded\">\n <img [src]=\"sanitizeImageUrl(productImage())\" \n [alt]=\"subscription().product?.name || subscriptionProductAlt\"\n class=\"w-full h-full object-cover rounded-lg\" />\n </div>\n </div> \n \n <div class=\"flex flex-col justify-start items-start gap-2\">\n <div class=\"flex flex-row justify-start items-start gap-2\">\n <h3 class=\"text-2xl font-bold text-base-content\">\n {{ subscription().product?.name || subscriptionPlanFallback }}\n </h3>\n <div class=\"flex items-center gap-2 mt-1\">\n <span class=\"badge {{ utils.getStatusBadgeClass(subscription().status) }} badge-xs\">\n {{ utils.translateStripeStatus(subscription().status) }}\n </span>\n @if (subscription().cancel.cancel_at_period_end) {\n <span class=\"badge badge-warning badge-xs\" i18n=\"@@stripe.subscription.canceled_badge\">Canceled</span>\n }\n </div>\n </div>\n <div class=\"flex flex-row justify-start items-start gap-4\">\n <div class=\"flex flex-row justify-start items-center gap-1\">\n <div class=\"text-base-content/70 text-sm font-medium\" i18n=\"@@stripe.subscription.active_until\">Subscription active until:</div>\n <div class=\"text-base-content font-semibold\">\n {{ utils.formatDate(subscription().current_period_end ?? '') }}\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <!-- Main price -->\n <div class=\"text-right\">\n <div class=\"text-2xl font-bold text-primary\">\n {{ utils.formatAmount(subscription().plan.amount, subscription().currency ?? 'EUR') }}\n </div>\n <div class=\"text-base-content/70 text-md capitalize\">\n {{ utils.translateBillingInterval(subscription().plan.interval) }}\n </div>\n </div>\n </div>\n\n <div class=\"flex justify-end w-full\">\n <button class=\"btn btn-primary btn-sm\" [disabled]=\"isStatusLoading()\" (click)=\"manageSubscription()\">\n @if (isStatusLoading()) {\n <span class=\"loading loading-spinner loading-sm\"></span>\n <span i18n=\"@@stripe.common.loading\">Loading...</span>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-5 w-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 12a3 3 0 11-6 0 3 3 0 016 0z\" />\n </svg>\n <span i18n=\"@@stripe.subscription.manage\">Manage subscription</span>\n }\n </button>\n </div>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, input, output } from '@angular/core';\nimport { StripeSubscriptionPublic } from '../../../../store/subscriptions.store';\nimport { SubscriptionItemSkeletonComponent } from './subscription-item-skeleton/subscription-item-skeleton.component';\nimport { SubscriptionItemComponent } from './subscription-item/subscription-item.component';\n\n@Component({\n selector: 'lib-subscriptions-list',\n templateUrl: './subscriptions-list.component.html',\n standalone: true,\n imports: [CommonModule, SubscriptionItemComponent, SubscriptionItemSkeletonComponent],\n})\nexport class SubscriptionsListComponent {\n public readonly subscriptions = input.required<StripeSubscriptionPublic[]>();\n public readonly loading = input<boolean>(false);\n public readonly error = input<string | null>(null);\n public readonly withEmptyState = input<boolean>(true);\n\n public readonly onManageSubscription = output<string>();\n\n public manageSubscription(customerId: string): void {\n this.onManageSubscription.emit(customerId);\n }\n} ","<div class=\"subscriptions-container\">\n @if (loading()) {\n <div class=\"flex flex-col gap-4\">\n @for (item of [1,2,3]; track item) {\n <lib-subscription-item-skeleton></lib-subscription-item-skeleton>\n }\n </div>\n } @else if (error()) {\n <div class=\"error-container\">\n <div class=\"alert alert-error\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" /></svg>\n <span>{{ error() }}</span>\n </div>\n </div>\n } @else if (subscriptions().length > 0) {\n <div class=\"subscriptions-list flex flex-col gap-4\">\n @for (subscription of subscriptions(); track subscription.id) {\n <lib-subscription-item \n [subscription]=\"subscription\"\n (onManageSubscription)=\"manageSubscription($event)\">\n </lib-subscription-item>\n }\n </div>\n } @else if (withEmptyState() && subscriptions().length === 0 && !loading()) {\n <div class=\"empty-state\">\n <div class=\"card bg-base-100 shadow-sm\">\n <div class=\"card-body items-center text-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-12 w-12 text-gray-400 mb-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <h2 class=\"card-title text-xl\" i18n=\"@@stripe.subscription.empty_title\">You have no active subscriptions</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.subscription.empty_description\">Browse our plans to start a subscription.</p>\n </div>\n </div>\n </div>\n }\n</div>\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-subscription-card-skeleton',\n templateUrl: './subscription-card-skeleton.component.html',\n standalone: true\n})\nexport class SubscriptionCardSkeletonComponent {}\n","<div class=\"card bg-base-100 w-96 shadow-sm\">\n <figure class=\"flex items-center justify-center\">\n <div class=\"skeleton h-48 w-full\"></div>\n </figure>\n <div class=\"card-body\">\n <div class=\"flex justify-between items-center\">\n <div class=\"skeleton h-8 w-2/3\"></div>\n <div class=\"skeleton h-6 w-24 rounded-full\"></div>\n </div>\n \n <div class=\"mt-3\">\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-5/6 mt-2\"></div>\n </div>\n \n <div class=\"card-actions justify-end mt-4\">\n <div class=\"skeleton h-10 w-40 rounded-lg\"></div>\n </div>\n </div>\n</div> ","import { CommonModule } from '@angular/common';\nimport { Component, inject, input, output } from '@angular/core';\nimport { StripeSubscriptionPublic } from '../../../../store/subscriptions.store';\nimport { SubscriptionCardSkeletonComponent } from './subscription-card-skeleton/subscription-card-skeleton.component';\nimport { UtilsService } from '../../../../services/utils.service';\n\n@Component({\n selector: 'lib-subscription-card',\n templateUrl: './subscription-card.component.html',\n standalone: true,\n imports: [CommonModule, SubscriptionCardSkeletonComponent],\n})\nexport class SubscriptionCardComponent {\n public readonly subscription = input.required<StripeSubscriptionPublic>();\n public readonly loading = input<boolean>(false);\n public readonly error = input<string | null>(null);\n\n public readonly utils = inject(UtilsService);\n \n public readonly onManageSubscription = output<string>();\n \n public hasValidProductImages(): boolean {\n const subscription = this.subscription();\n return !!subscription?.product && Array.isArray(subscription.product.images) && subscription.product.images.length > 0;\n }\n\n public getProductImage(): string {\n return this.subscription()?.product?.images?.[0] || '';\n }\n\n public getProductName(): string {\n return this.subscription()?.product?.name || '';\n }\n \n /**\n * Emit the customer ID to manage subscription\n */\n public manageSubscription(): void {\n this.onManageSubscription.emit(this.subscription().customer as string);\n }\n} ","@if (loading()) {\n <lib-subscription-card-skeleton></lib-subscription-card-skeleton>\n} @else if (error()) {\n <div class=\"alert alert-error\">{{ error() }}</div>\n} @else if (subscription()) {\n <div class=\"card bg-base-100 w-96 shadow-sm \">\n @if (hasValidProductImages()) {\n <figure class=\"flex items-center justify-center\">\n <img [src]=\"getProductImage()\" [alt]=\"getProductName()\" class=\"h-48 w-full object-cover\" />\n </figure>\n }\n <div class=\"card-body\">\n <div class=\"flex justify-between items-center\">\n <h2 class=\"card-title\">{{ getProductName() }}</h2>\n <span class=\"badge badge-soft {{ utils.getStatusBadgeClass(subscription().status) }} subscription-status\">\n {{ utils.translateStripeStatus(subscription().status) }}\n </span>\n </div>\n \n <div class=\"mt-3\">\n <p class=\"opacity-75\">{{ subscription().product?.description }}</p>\n </div>\n \n <div class=\"card-actions justify-end\">\n <button class=\"btn btn-primary\" (click)=\"manageSubscription()\" i18n=\"@@stripe.subscription.manage\">Manage subscription</button>\n </div>\n </div>\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-payment-intent-item-skeleton',\n templateUrl: './payment-intent-item-skeleton.component.html',\n standalone: true,\n imports: [CommonModule]\n})\nexport class PaymentIntentItemSkeletonComponent {} ","<div class=\"card bg-base-100 shadow-sm card-skeleton\">\n <div class=\"card-body p-4\">\n <!-- Header with status and expand button -->\n <div class=\"flex justify-between\">\n <div class=\"w-full\">\n <div class=\"flex items-center\">\n <!-- Title/Status placeholder -->\n <div class=\"skeleton w-32 h-6 rounded-md\"></div>\n <!-- Badge placeholder -->\n <div class=\"skeleton w-24 h-6 ml-2 rounded-full\"></div>\n </div>\n <!-- Customer ID placeholder -->\n <div class=\"skeleton w-48 h-4 mt-2 rounded-md\"></div>\n </div>\n \n <!-- Details button placeholder -->\n <div class=\"skeleton w-20 h-8 rounded-md\"></div>\n </div>\n\n <!-- Payment details summary -->\n <div class=\"flex justify-between mt-3\">\n <div>\n <!-- Amount placeholder -->\n <div class=\"skeleton w-32 h-8 rounded-md\"></div>\n </div>\n <div>\n <!-- Date placeholder -->\n <div class=\"skeleton w-28 h-6 rounded-md\"></div>\n </div>\n </div>\n \n <!-- Optional expanded details placeholder -->\n <div class=\"mt-4 border-t pt-4\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <div>\n <!-- Details heading placeholder -->\n <div class=\"skeleton w-36 h-5 mb-3 rounded-md\"></div>\n \n <!-- List items placeholders -->\n <div class=\"space-y-2\">\n <div class=\"skeleton w-full h-4 rounded-md\"></div>\n <div class=\"skeleton w-full h-4 rounded-md\"></div>\n <div class=\"skeleton w-3/4 h-4 rounded-md\"></div>\n </div>\n </div>\n \n <div>\n <!-- Second column heading placeholder -->\n <div class=\"skeleton w-36 h-5 mb-3 rounded-md\"></div>\n \n <!-- List items placeholders -->\n <div class=\"space-y-2\">\n <div class=\"skeleton w-full h-4 rounded-md\"></div>\n <div class=\"skeleton w-2/3 h-4 rounded-md\"></div>\n </div>\n </div>\n </div>\n \n <!-- Action button placeholder -->\n <div class=\"flex justify-end mt-4\">\n <div class=\"skeleton w-36 h-10 rounded-md\"></div>\n </div>\n </div>\n </div>\n</div> ","import { CommonModule } from '@angular/common';\nimport { Component, inject, input, signal } from '@angular/core';\nimport { StripePaymentIntentsPublic } from '../../../../../store/customer.store';\nimport { UtilsService } from '../../../../../services/utils.service';\nimport { PaymentMethodComponent } from '../../../payment-method/payment-method.component';\n\n@Component({\n selector: 'lib-payment-intent-item',\n templateUrl: './payment-intent-item.component.html',\n standalone: true,\n imports: [CommonModule, PaymentMethodComponent]\n})\nexport class PaymentIntentItemComponent {\n public readonly paymentIntent = input.required<StripePaymentIntentsPublic>();\n \n public readonly utils = inject(UtilsService);\n\n protected readonly liveModeLabel = $localize`:@@stripe.payment_intents.mode.live:Live`;\n protected readonly testModeLabel = $localize`:@@stripe.payment_intents.mode.test:Test`;\n protected readonly notAvailableLabel = $localize`:@@stripe.common.not_available:N/A`;\n \n public readonly isExpanded = signal(false);\n \n public toggleExpand(): void {\n this.isExpanded.update(value => !value);\n }\n} ","<div class=\"card bg-base-100 shadow-sm hover:shadow-md transition-all duration-200 border border-base-200\">\n <div class=\"card-body p-4\">\n \n <!-- Header Section -->\n <div class=\"flex justify-between items-start mb-3\">\n <div class=\"flex-1\">\n <div class=\"flex items-center gap-2 mb-1\">\n <div class=\"text-2xl font-bold text-primary\">\n {{ utils.formatAmount(paymentIntent().amount ?? 0, paymentIntent().currency ?? 'EUR') }}\n </div>\n <div class=\"badge {{ utils.getStatusBadgeClass(paymentIntent().status) }} badge-sm\">\n {{ utils.translateStripeStatus(paymentIntent().status) }}\n </div>\n @if (!paymentIntent().liveMode) {\n <div class=\"badge badge-warning badge-sm\" i18n=\"@@stripe.payment_intents.mode.test\">TEST</div>\n }\n </div>\n </div>\n \n <button \n class=\"btn btn-sm btn-ghost btn-circle\" \n (click)=\"toggleExpand()\"\n [class.rotate-180]=\"isExpanded()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 transition-transform duration-200\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M19 9l-7 7-7-7\" />\n </svg>\n </button>\n </div>\n\n <!-- Main Info Section -->\n <div class=\"space-y-2\">\n @if (paymentIntent().paymentMethod) {\n <ngx-payment-method \n [paymentMethod]=\"paymentIntent().paymentMethod!\" \n mode=\"compact\">\n </ngx-payment-method>\n } @else {\n <div class=\"flex items-center gap-2 p-2 bg-base-200 rounded-lg\">\n <div class=\"w-8 h-8 bg-base-300 rounded-full flex items-center justify-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n </div>\n <div>\n <div class=\"font-medium text-sm\" i18n=\"@@stripe.payment_intents.payment_method\">Payment method</div>\n <div class=\"text-xs text-base-content/70\">•••• {{ paymentIntent().paymentMethodId.slice(-4) }}</div>\n </div>\n </div>\n }\n\n <div class=\"flex items-center gap-2 text-sm\">\n <div class=\"w-2 h-2 bg-success rounded-full\"></div>\n <span class=\"text-base-content/70\" i18n=\"@@stripe.payment_intents.confirmation\">Confirmation:</span>\n <span class=\"capitalize font-medium\">{{ paymentIntent().confirmationMethod.replace('_', ' ') }}</span>\n </div>\n </div>\n\n @if (isExpanded()) {\n <div class=\"divider my-4\"></div>\n \n <div class=\"space-y-4\">\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.transaction_details\">Transaction details</span>\n </h4>\n \n <div class=\"grid grid-cols-1 sm:grid-cols-2 gap-3\">\n <div class=\"stat bg-base-200 rounded-lg p-3\">\n <div class=\"stat-title text-xs\" i18n=\"@@stripe.payment_intents.table.status\">Status</div>\n <div class=\"stat-value text-sm capitalize\">{{ utils.translateStripeStatus(paymentIntent().status) }}</div>\n <div class=\"stat-desc\">{{ paymentIntent().liveMode ? liveModeLabel : testModeLabel }}</div>\n </div>\n \n <div class=\"stat bg-base-200 rounded-lg p-3\">\n <div class=\"stat-title text-xs\" i18n=\"@@stripe.payment_intents.table.amount\">Amount</div>\n <div class=\"stat-value text-sm\">{{ utils.formatAmount(paymentIntent().amount ?? 0, paymentIntent().currency ?? 'EUR') }}</div>\n <div class=\"stat-desc\">{{ (paymentIntent().currency ?? 'EUR').toUpperCase() }}</div>\n </div>\n </div>\n </div>\n\n @if (paymentIntent().paymentMethod) {\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.payment_info\">Payment information</span>\n </h4>\n \n <ngx-payment-method \n [paymentMethod]=\"paymentIntent().paymentMethod!\" \n mode=\"detailed\">\n </ngx-payment-method>\n </div>\n }\n\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.additional_info\">Additional information</span>\n </h4>\n \n <div class=\"space-y-2\">\n @if (paymentIntent().invoiceId) {\n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.invoice\">Invoice</span>\n <span class=\"text-sm font-mono\">{{ paymentIntent().invoiceId.slice(-8) }}</span>\n </div>\n }\n \n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.environment\">Environment</span>\n <span class=\"text-sm\">\n @if (paymentIntent().liveMode) {\n <span class=\"text-success\" i18n=\"@@stripe.payment_intents.mode.live\">Live</span>\n } @else {\n <span class=\"text-warning\" i18n=\"@@stripe.payment_intents.mode.test\">Test</span>\n }\n </span>\n </div>\n \n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.reference\">Reference</span>\n <span class=\"text-sm font-mono\">•••{{ paymentIntent().id?.slice(-6) || notAvailableLabel }}</span>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, input, output } from '@angular/core';\nimport { StripePaymentIntentsPublic } from '../../../../store/customer.store';\nimport { PaymentIntentItemSkeletonComponent } from './payment-intents-item-skeleton/payment-intent-item-skeleton.component';\nimport { PaymentIntentItemComponent } from './payment-intents-item/payment-intent-item.component';\n\n@Component({\n selector: 'lib-payment-intents-list',\n templateUrl: './payment-intents-list.component.html',\n standalone: true,\n imports: [\n CommonModule,\n PaymentIntentItemSkeletonComponent,\n PaymentIntentItemComponent\n ]\n})\nexport class PaymentIntentsListComponent {\n public readonly paymentIntents = input.required<StripePaymentIntentsPublic[]>();\n public readonly loading = input<boolean>(false);\n public readonly error = input<string | null>(null);\n public readonly withControls = input<boolean>(true);\n \n public readonly onRefresh = output<void>();\n \n protected readonly trackByPaymentIntentId = (index: number, item: StripePaymentIntentsPublic) => item.id;\n \n public refreshPaymentIntents(): void {\n this.onRefresh.emit();\n }\n} ","<div class=\"payment-intents-container\">\n @if (withControls()) {\n <div class=\"controls mb-4 flex justify-between items-center\">\n <div class=\"stats\">\n @if (paymentIntents().length > 0) {\n <span class=\"badge badge-soft badge-info\">{{ paymentIntents().length }} <span i18n=\"@@stripe.payment_intents.count_label\">payment intents</span></span>\n }\n </div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"refreshPaymentIntents()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 mr-1\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\" />\n </svg>\n <span i18n=\"@@stripe.common.refresh\">Refresh</span>\n </button>\n </div>\n }\n\n @if (loading()) {\n <div class=\"flex flex-col gap-4\">\n @for (item of [1,2,3]; track item) {\n <lib-payment-intent-item-skeleton></lib-payment-intent-item-skeleton>\n }\n </div>\n } @else if (error()) {\n <div class=\"error-container\">\n <div class=\"alert alert-error\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" /></svg>\n <span>{{ error() }}</span>\n </div>\n </div>\n } @else if (paymentIntents().length > 0) {\n <div class=\"flex flex-col gap-4\">\n @for (paymentIntent of paymentIntents(); track paymentIntent.id) {\n <lib-payment-intent-item [paymentIntent]=\"paymentIntent\"></lib-payment-intent-item>\n }\n </div>\n } @else {\n <div class=\"empty-state\">\n <div class=\"card bg-base-100 shadow-sm\">\n <div class=\"card-body items-center text-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-12 w-12 text-gray-400 mb-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n <h2 class=\"card-title text-xl\" i18n=\"@@stripe.payment_intents.empty_title\">No recent payment intents</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.payment_intents.empty_description\">No payment intents found in your history.</p>\n </div>\n </div>\n </div>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, inject, input } from '@angular/core';\nimport { CustomerStore } from '../../../store/customer.store';\nimport { PortalAccountStore } from '../../../store/portal-account.store';\nimport { SubscriptionCardComponent } from './subscription-card/subscription-card.component';\nimport { SubscriptionsListComponent } from './subscriptions-list/subscriptions-list.component';\n\n@Component({\n selector: 'lib-subscriptions',\n templateUrl: './subscriptions.component.html',\n standalone: true,\n imports: [CommonModule, SubscriptionCardComponent, SubscriptionsListComponent],\n})\nexport class SubscriptionsComponent {\n public readonly customerStore = inject(CustomerStore);\n public readonly portalAccountStore = inject(PortalAccountStore);\n\n public readonly returnUrl = input<string>(window.location.origin + '/account');\n\n public manageSubscription(customerId: string): void {\n this.portalAccountStore.createPortalSession(customerId, this.returnUrl());\n }\n\n public refreshSubscriptions(): void {\n if (this.customerStore.customer().data?.id) {\n this.customerStore.loadSubscriptions(this.customerStore.customer().data?.id as string);\n }\n }\n}\n\n","<div class=\"mb-4 flex flex-col justify-between items-center\">\n <div class=\"mb-6 w-full\">\n <h2 class=\"text-2xl font-bold text-gray-800\" i18n=\"@@stripe.subscription.title\">Subscriptions</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.subscription.description\">Manage your subscriptions and payments in one place</p>\n </div>\n <div class=\"controls mb-4 flex justify-between items-center w-full\">\n <div class=\"stats\">\n @if (customerStore.subscriptions.data().length > 0) {\n <span class=\"badge badge-soft badge-info\">{{ customerStore.subscriptions.data().length }} <span i18n=\"@@stripe.subscription.count_label\">subscriptions</span></span>\n }\n </div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"refreshSubscriptions()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 mr-1\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\" />\n </svg>\n <span i18n=\"@@stripe.common.refresh\">Refresh</span>\n </button>\n </div>\n</div>\n\n<div class=\"flex flex-col gap-4\">\n <lib-subscription-card\n [subscription]=\"customerStore.firstSubscription()\"\n [loading]=\"customerStore.isSubscriptionsStatusLoading()\"\n [error]=\"customerStore.subscriptions.error()\"\n (onManageSubscription)=\"manageSubscription($event)\">\n </lib-subscription-card>\n <lib-subscriptions-list\n [subscriptions]=\"customerStore.restSubscriptions()\"\n [loading]=\"customerStore.isSubscriptionsStatusLoading()\"\n [error]=\"customerStore.subscriptions.error()\"\n [withEmptyState]=\"false\"\n (onManageSubscription)=\"manageSubscription($event)\">\n </lib-subscriptions-list>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, signal } from '@angular/core';\nimport { PaymentIntentsListComponent } from '../../components/customer/payment-intents/payment-intents-list/payment-intents-list.component';\nimport { PaymentIntentsTableComponent } from '../../components/customer/payment-intents/payment-intents-table/payment-intents-table.component';\nimport { SubscriptionsComponent } from '../../components/customer/subscriptions/subscriptions.component';\nimport { CustomerStore, StripePaymentIntentsPublic } from '../../store/customer.store';\n\n@Component({\n selector: 'lib-customer-dashboard',\n templateUrl: './customer.component.html',\n standalone: true,\n imports: [\n CommonModule,\n PaymentIntentsListComponent,\n PaymentIntentsTableComponent,\n SubscriptionsComponent\n ]\n}) \nexport class CustomerDashboardComponent {\n public readonly customerStore = inject(CustomerStore);\n\n public readonly returnUrl = input<string>(window.location.origin + '/account');\n \n public readonly customer = computed(() => this.customerStore.customer().data);\n \n public readonly activeTab = signal<'list' | 'table'>('list');\n\n public refreshPaymentIntents(): void {\n this.customerStore.loadPaymentIntents(this.customerStore.customer().data?.id as string);\n }\n \n public setActiveTab(tab: 'list' | 'table'): void {\n this.activeTab.set(tab);\n }\n\n public exportSelectedPaymentIntents(paymentIntents: StripePaymentIntentsPublic[]): void {\n console.log('[💰 CustomerDashboardComponent] exportSelectedPaymentIntents: ', paymentIntents);\n }\n}\n","<div class=\"container flex flex-col gap-6 mx-auto\">\n <!-- Subscriptions Section -->\n <section class=\"flex flex-col\">\n <lib-subscriptions [returnUrl]=\"returnUrl()\"></lib-subscriptions>\n </section>\n\n <!-- Payment Intents Section with Tabs -->\n <section class=\"flex flex-col\">\n <header class=\"mb-4\">\n <h2 class=\"text-2xl font-bold text-gray-800\" i18n=\"@@stripe.customer.payment_intents_title\">Payment Intents</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.customer.payment_intents_description\">Payment intents history. Select a tab to see the list or table view.</p>\n </header>\n\n <div role=\"tablist\" class=\"tabs tabs-box w-fit mb-4\">\n <a role=\"tab\" class=\"tab\" [class.tab-active]=\"activeTab() === 'list'\" (click)=\"setActiveTab('list')\" i18n=\"@@stripe.customer.tab_list\">List</a>\n <a role=\"tab\" class=\"tab\" [class.tab-active]=\"activeTab() === 'table'\" (click)=\"setActiveTab('table')\" i18n=\"@@stripe.customer.tab_table\">Table</a>\n </div>\n\n @if (activeTab() === 'list') {\n <lib-payment-intents-list\n [paymentIntents]=\"customerStore.paymentIntents.data()\"\n [loading]=\"customerStore.isPaymentIntentsStatusLoading()\"\n [error]=\"customerStore.paymentIntents.error()\"\n (onRefresh)=\"refreshPaymentIntents()\">\n </lib-payment-intents-list>\n } @else {\n <lib-payment-intents-table\n [paymentIntents]=\"customerStore.paymentIntents.data()\"\n [loading]=\"customerStore.isPaymentIntentsStatusLoading()\"\n [error]=\"customerStore.paymentIntents.error()\"\n (exportSelected)=\"exportSelectedPaymentIntents($event)\"\n (onRefresh)=\"refreshPaymentIntents()\">\n </lib-payment-intents-table>\n }\n </section>\n</div>\n","// Export configurations\nexport * from './lib/config/ngx-supabase-stripe.config';\nexport * from './lib/config/stripe.config';\nexport * from './lib/config/supabase.config';\n\n// Export store\nexport * from './lib/store/checkout.store';\nexport * from './lib/store/products.store';\nexport * from './lib/store/subscriptions.store';\nexport * from './lib/store/customer.store';\nexport * from './lib/store/portal-account.store';\n\n// Export services\nexport * from './lib/services/stripe-client.service';\nexport * from './lib/services/supabase-client.service';\nexport * from './lib/services/products.service';\n\n// Export components\nexport * from './lib/components/embedded-checkout/embedded-checkout.component';\nexport * from './lib/components/embedded-checkout/return-page/return-page.component';\nexport * from './lib/components/product-list/product-list.component';\nexport * from './lib/components/product-item-button/product-item-button.component';\nexport * from './lib/components/embedded-subscription/embedded-subscription.component';\nexport * from './lib/components/embedded-subscription/return-page/subscription-return-page.component';\nexport * from './lib/components/customer/payment-intents/payment-intents-table/payment-intents-table.component';\nexport * from './lib/components/customer/subscriptions/subscriptions-list/subscriptions-list.component';\nexport * from './lib/components/customer/subscriptions/subscription-card/subscription-card.component';\nexport * from './lib/components/customer/subscriptions/subscriptions-list/subscriptions-list.component';\nexport * from './lib/components/customer/payment-intents/payment-intents-list/payment-intents-list.component';\nexport * from './lib/pages/customer/customer.component';\n\n// Export models\nexport * from './lib/models/currency.model';\n\n// Export types\nexport * from './database.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MA0Ba,aAAa,GAAG,IAAI,cAAc,CAAe,eAAe;AAE7E;;;;AAIG;AACG,SAAU,mBAAmB,CAAC,MAAoB,EAAA;IACtD,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,QAAQ,EAAE;AACX;KACF;AACH;;ACpCA;;;AAGG;MACU,uBAAuB,GAAG,IAAI,cAAc,CACvD,yBAAyB;MAuBd,eAAe,GAAG,IAAI,cAAc,CAAiB,iBAAiB;AAEnF;;;;AAIG;AACG,SAAU,qBAAqB,CAAC,MAAsB,EAAA;IAC1D,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,QAAQ,EAAE;AACX;KACF;AACH;;ACrCA;;;;AAIG;AACG,SAAU,8BAA8B,CAC5C,MAA+B,EAAA;AAE/B,IAAA,MAAM,SAAS,GAAwC;AACrD,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,MAAM,CAAC;AAClB,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,aAAa;YACtB,QAAQ,EAAE,MAAM,CAAC;AAClB;KACF;AAED,IAAA,OAAO,SAAS;AAClB;;MCpBa,qBAAqB,CAAA;AACf,IAAA,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;IAChC,aAAa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EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAGb,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAXtC,SAAS;+BACE,wBAAwB,EAAA,UAAA,EAEtB,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,2BAA2B;wBAC3B,4BAA4B;wBAC5B;AACD,qBAAA,EAAA,QAAA,EAAA,8wDAAA,EAAA;;;AEhBH;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"dotted-labs-ngx-supabase-stripe.mjs","sources":["../../../projects/ngx-supabase-stripe/src/lib/config/stripe.config.ts","../../../projects/ngx-supabase-stripe/src/lib/config/supabase.config.ts","../../../projects/ngx-supabase-stripe/src/lib/config/ngx-supabase-stripe.config.ts","../../../projects/ngx-supabase-stripe/src/lib/services/supabase-client.service.ts","../../../projects/ngx-supabase-stripe/src/lib/services/stripe-client.service.ts","../../../projects/ngx-supabase-stripe/src/lib/models/currency.model.ts","../../../projects/ngx-supabase-stripe/src/lib/services/products.service.ts","../../../projects/ngx-supabase-stripe/src/lib/store/products.store.ts","../../../projects/ngx-supabase-stripe/src/lib/store/subscriptions.store.ts","../../../projects/ngx-supabase-stripe/src/lib/store/customer.store.ts","../../../projects/ngx-supabase-stripe/src/lib/store/checkout.store.ts","../../../projects/ngx-supabase-stripe/src/lib/store/portal-account.store.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-skeleton/embedded-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-skeleton/embedded-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-checkout/embedded-checkout.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-checkout/embedded-checkout.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-checkout/return-page/return-page.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-checkout/return-page/return-page.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-item-skeleton/product-item-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-item-skeleton/product-item-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/services/utils.service.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-item/product-item.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-item/product-item.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-list.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-list/product-list.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/product-item-button/product-item-button.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/product-item-button/product-item-button.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-subscription/embedded-subscription.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-subscription/embedded-subscription.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-subscription/return-page/subscription-return-page.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/embedded-subscription/return-page/subscription-return-page.component.html","../../../projects/ngx-supabase-stripe/src/lib/directives/brand-icon.directive.ts","../../../projects/ngx-supabase-stripe/src/lib/directives/brand-name.directive.ts","../../../projects/ngx-supabase-stripe/src/lib/directives/payment-method-type.directive.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-method/payment-method.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-method/payment-method.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-dialog/payment-intents-dialog.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-dialog/payment-intents-dialog.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-table/payment-intents-table.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-table/payment-intents-table.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscription-item-skeleton/subscription-item-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscription-item-skeleton/subscription-item-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscription-item/subscription-item.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscription-item/subscription-item.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscriptions-list.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions-list/subscriptions-list.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscription-card/subscription-card-skeleton/subscription-card-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscription-card/subscription-card-skeleton/subscription-card-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscription-card/subscription-card.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscription-card/subscription-card.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-item-skeleton/payment-intent-item-skeleton.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-item-skeleton/payment-intent-item-skeleton.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-item/payment-intent-item.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-item/payment-intent-item.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-list.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/payment-intents/payment-intents-list/payment-intents-list.component.html","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions.component.ts","../../../projects/ngx-supabase-stripe/src/lib/components/customer/subscriptions/subscriptions.component.html","../../../projects/ngx-supabase-stripe/src/lib/pages/customer/customer.component.ts","../../../projects/ngx-supabase-stripe/src/lib/pages/customer/customer.component.html","../../../projects/ngx-supabase-stripe/src/public-api.ts","../../../projects/ngx-supabase-stripe/src/dotted-labs-ngx-supabase-stripe.ts"],"sourcesContent":["import { InjectionToken, Provider } from '@angular/core';\nimport type { StripeConstructorOptions } from '@stripe/stripe-js';\n\n/**\n * Stripe configuration interface\n */\nexport interface StripeConfig {\n /**\n * Stripe client secret\n */\n publishableKey: string;\n\n /**\n * Public origin for embedded Checkout return URLs (e.g. https://app.example.com).\n * Use this when the app does not run on http(s), e.g. Electron with file:// — Stripe rejects non-http(s) return_url.\n * When omitted, components use `window.location.origin`.\n */\n embeddedCheckoutBaseUrl?: string;\n\n /**\n * BCP 47 locale for Stripe.js (e.g. 'en', 'es'). Localizes Embedded Checkout UI only.\n * Should match the locale passed to loadStripeMessages() in the consuming app.\n */\n locale?: StripeConstructorOptions['locale'];\n}\n\nexport const STRIPE_CONFIG = new InjectionToken<StripeConfig>('STRIPE_CONFIG');\n\n/**\n * Provides the Stripe configuration\n * @param config The Stripe configuration\n * @returns An array of providers\n */\nexport function provideStripeConfig(config: StripeConfig): Provider[] {\n return [\n {\n provide: STRIPE_CONFIG,\n useValue: config\n }\n ];\n}","import { InjectionToken, Provider } from '@angular/core';\nimport type { SupabaseClient } from '@supabase/supabase-js';\nimport type { Database } from '../../database.types';\n\n/**\n * Optional shared browser `SupabaseClient` (e.g. the same instance passed to ngx-supabase-auth).\n * When provided, {@link SupabaseClientService} uses it instead of creating a new client.\n */\nexport const SUPABASE_BROWSER_CLIENT = new InjectionToken<SupabaseClient<Database>>(\n 'SUPABASE_BROWSER_CLIENT',\n);\n\n/**\n * Supabase configuration interface\n */\nexport interface SupabaseConfig {\n /**\n * Supabase project URL\n */\n supabaseUrl: string;\n\n /**\n * Supabase API key\n */\n supabaseKey: string;\n\n /**\n * Supabase schema\n */\n supabaseSchema: 'public' | 'stripe';\n}\n\nexport const SUPABASE_CONFIG = new InjectionToken<SupabaseConfig>('SUPABASE_CONFIG');\n\n/**\n * Provides the Supabase configuration\n * @param config The Supabase configuration\n * @returns An array of providers\n */\nexport function provideSupabaseConfig(config: SupabaseConfig): Provider[] {\n return [\n {\n provide: SUPABASE_CONFIG,\n useValue: config\n }\n ];\n}\n\n","import { EnvironmentProviders, Provider } from '@angular/core';\nimport { STRIPE_CONFIG, StripeConfig } from './stripe.config';\nimport { SUPABASE_CONFIG, SupabaseConfig } from './supabase.config';\n\nexport interface NgxSupabaseStripeConfig {\n supabaseConfig: SupabaseConfig;\n stripeConfig: StripeConfig;\n}\n\n/**\n * Provides the NgxSupabaseStripeConfig object\n * @param config The NgxSupabaseStripeConfig object\n * @returns The NgxSupabaseStripeConfig object\n */\nexport function provideNgxSupabaseStripeConfig(\n config: NgxSupabaseStripeConfig\n): (Provider | EnvironmentProviders)[] {\n const providers: (Provider | EnvironmentProviders)[] = [\n {\n provide: SUPABASE_CONFIG,\n useValue: config.supabaseConfig\n },\n {\n provide: STRIPE_CONFIG,\n useValue: config.stripeConfig\n }\n ];\n\n return providers;\n}\n\n","import { inject, Injectable } from '@angular/core';\nimport { createClient, SupabaseClient } from '@supabase/supabase-js';\nimport { Database } from '../../database.types';\nimport { SUPABASE_BROWSER_CLIENT, SUPABASE_CONFIG } from '../config/supabase.config';\nimport { StripeCheckoutSession, StripePaymentIntent, StripeProduct, StripeTables, StripeUpdateType } from '../models/database.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SupabaseClientService {\n private readonly config = inject(SUPABASE_CONFIG);\n private readonly browserClient = inject(SUPABASE_BROWSER_CLIENT, { optional: true });\n private readonly client: SupabaseClient<Database>;\n\n constructor() {\n this.client =\n this.browserClient ??\n createClient<Database>(this.config.supabaseUrl, this.config.supabaseKey);\n\n console.log('🚀 [SupabaseClientService]: this.client', this.client);\n } \n\n /**\n * Get the Supabase client instance\n */\n public getClient(): SupabaseClient<Database> {\n return this.client;\n }\n\n /**\n * Select payment intents\n * @param query Optional query parameters\n */\n public async selectPaymentIntents(\n query?: {\n columns?: string;\n eq?: Partial<Record<keyof StripePaymentIntent, unknown>>;\n order?: { column: keyof StripePaymentIntent | string; ascending?: boolean };\n limit?: number;\n }\n ): Promise<{ data: StripePaymentIntent[] | null; error: Error | null }> {\n return this.select<StripePaymentIntent>('payment_intents', query);\n }\n\n /**\n * STRIPE CHECKOUT SESSIONS\n */\n\n /**\n * Select checkout sessions\n * @param sessionId The checkout session ID\n */\n public async selectCheckoutSession(\n sessionId: string\n ): Promise<{ data: StripeCheckoutSession | null; error: Error | null }> {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_checkout_session', { session_id: sessionId })\n .select('*')\n .single();\n }\n\n /**\n * STRIPE SUBSCRIPTIONS\n */\n\n /**\n * Get all Stripe subscriptions\n */\n public getStripeSubscriptions() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_subscriptions')\n .select('*');\n }\n\n /**\n * Stripe subscriptions for the JWT-authenticated Supabase user (empty if anonymous)\n */\n public getStripeSubscriptionsForAuthenticatedUser() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_subscriptions_for_authenticated_user')\n .select('*');\n }\n\n /**\n * Select a Stripe subscription\n * @param subscriptionId The subscription ID\n */\n public selectStripeSubscription(subscriptionId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_subscription', { subscription_id: subscriptionId })\n .select('*');\n }\n\n /**\n * STRIPE PRICES\n */\n\n /**\n * Select Stripe prices\n * @param query Optional query parameters\n */\n public async selectStripePrices() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_prices')\n .select('*');\n }\n\n /**\n * STRIPE PRODUCTS\n */\n\n /**\n * Select Stripe products\n * @param query Optional query parameters\n */\n public async selectStripeProducts() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_products')\n .select('*');\n }\n\n public async selectStripeProductsByIds(ids: string[]) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_products_by_ids', { product_ids: ids })\n .select('*');\n }\n\n /**\n * Select a Stripe product\n * @param productId The product ID\n */\n public async selectStripeProduct(productId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_product', { product_id: productId })\n .select('*');\n }\n\n /**\n * Stripe products tied to the authenticated user's subscriptions\n */\n public async selectStripeProductsForAuthenticatedUser() {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_products_for_authenticated_user')\n .select('*');\n }\n\n /**\n * Single Stripe product only if it belongs to the authenticated user's subscriptions\n */\n public async selectStripeProductForAuthenticatedUser(productId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_product_for_authenticated_user', { product_id: productId })\n .select('*');\n }\n\n /**\n * Update a product\n * @param id The product ID\n * @param data The product data to update\n */\n public async updateProduct(\n id: string,\n data: StripeUpdateType<'products'>\n ): Promise<{ data: StripeProduct | null; error: Error | null }> {\n return this.update<StripeProduct>(\n 'products',\n data,\n { id }\n );\n }\n\n /**\n * Delete a product\n * @param id The product ID\n */\n public async deleteProduct(\n id: string\n ): Promise<{ data: StripeProduct | null; error: Error | null }> {\n return this.delete<StripeProduct>('products', { id });\n }\n\n /**\n * CUSTOMER FUNCTIONS\n */\n\n /**\n * Get customer by email\n * @param email The customer email\n */\n public async getCustomerByEmail(email: string) {\n return this.client.schema(this.config.supabaseSchema).rpc('get_stripe_customer', { customer_email: email });\n }\n\n /**\n * Get customer payment intents\n * @param customerId The customer ID\n */\n public async getCustomerPaymentIntents(customerId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_customer_payment_intents', { customer_id: customerId })\n .select('*');\n }\n\n /**\n * Get customer subscriptions\n * @param customerId The customer ID\n */\n public async getCustomerSubscriptions(customerId: string) {\n return this.client\n .schema(this.config.supabaseSchema)\n .rpc('get_stripe_customer_subscriptions', { customer_id: customerId })\n .select('*');\n }\n\n\n /**\n * CLIENT GENERIC FUNCTIONS\n */\n\n /**\n * Select data from a table\n * @param table The table name\n * @param query Optional query parameters\n */\n public async select<T>(\n table: StripeTables,\n query?: {\n columns?: string;\n eq?: Record<string, any>;\n order?: { column: string; ascending?: boolean };\n limit?: number;\n }\n ): Promise<{ data: T[] | null; error: Error | null }> {\n try {\n let queryBuilder = this.client\n .schema('stripe')\n .from(table)\n .select(query?.columns ?? '*');\n\n if (query?.eq) {\n Object.entries(query.eq).forEach(([key, value]) => {\n queryBuilder = queryBuilder.eq(key, value);\n });\n }\n\n if (query?.order) {\n queryBuilder = queryBuilder.order(\n query.order.column,\n { ascending: query.order.ascending ?? true }\n );\n }\n\n if (query?.limit) {\n queryBuilder = queryBuilder.limit(query.limit);\n }\n\n const { data, error } = await queryBuilder;\n\n if (error) {\n throw error;\n }\n\n return { data: data as T[], error: null };\n } catch (error) {\n return { data: null, error: error as Error };\n }\n }\n\n /**\n * Insert data into a table\n * @param table The table name\n * @param data The data to insert\n */\n public async insert<T>(\n table: StripeTables,\n data: Partial<T>\n ): Promise<{ data: T | null; error: Error | null }> {\n try {\n const { data: result, error } = await (this.client\n .schema('stripe')\n .from(table)\n .insert(data)\n .select()\n .single());\n\n if (error) {\n throw error;\n }\n\n return { data: result as T, error: null };\n } catch (error) {\n return { data: null, error: error as Error };\n }\n }\n\n /**\n * Update data in a table\n * @param table The table name\n * @param data The data to update\n * @param eq The equality conditions\n */\n public async update<T>(\n table: StripeTables,\n data: Partial<T>,\n eq: Record<string, any>\n ): Promise<{ data: T | null; error: Error | null }> {\n try {\n let queryBuilder = this.client\n .schema('stripe')\n .from(table)\n .update(data);\n\n Object.entries(eq).forEach(([key, value]) => {\n queryBuilder = queryBuilder.eq(key, value);\n });\n\n const { data: result, error } = await queryBuilder\n .select()\n .single();\n\n if (error) {\n throw error;\n }\n\n return { data: result as T, error: null };\n } catch (error) {\n return { data: null, error: error as Error };\n }\n }\n\n\n /**\n * Delete data from a table\n * @param table The table name\n * @param eq The equality conditions\n */\n public async delete<T>(\n table: StripeTables,\n eq: Record<string, any>\n ): Promise<{ data: T | null; error: Error | null }> {\n try {\n let queryBuilder = this.client\n .schema('stripe')\n .from(table)\n .delete();\n\n Object.entries(eq).forEach(([key, value]) => {\n queryBuilder = queryBuilder.eq(key, value);\n });\n\n const { data: result, error } = await queryBuilder\n .select()\n .single();\n\n if (error) {\n throw error;\n }\n\n return { data: result as T, error: null };\n } catch (error) {\n return { data: null, error: error as Error };\n }\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { loadStripe, Stripe, StripeEmbeddedCheckout, StripeConstructorOptions } from '@stripe/stripe-js';\nimport type { Stripe as StripeTypes } from 'stripe';\nimport type { FunctionInvokeOptions } from '@supabase/supabase-js';\nimport { STRIPE_CONFIG } from '../config/stripe.config';\nimport { StripeCustomerPublic } from '../store/customer.store';\nimport { SupabaseClientService } from './supabase-client.service';\n\ntype FunctionsAuthResult =\n | { ok: true; headers: { Authorization: string } }\n | { ok: false; error: Error };\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StripeClientService {\n private readonly config = inject(STRIPE_CONFIG);\n private readonly supabase = inject(SupabaseClientService);\n stripe: Promise<Stripe | null>;\n embeddedCheckout: StripeEmbeddedCheckout | null = null;\n\n constructor() {\n const options: StripeConstructorOptions | undefined = this.config.locale\n ? { locale: this.config.locale }\n : undefined;\n this.stripe = loadStripe(this.config.publishableKey, options);\n console.log('🔌 [StripeClientService]: Loaded Stripe Client from @stripe/stripe-js');\n }\n\n /**\n * Edge functions use JWT verification (e.g. getClaims). Requires a logged-in Supabase Auth user.\n */\n private async resolveFunctionsAuth(): Promise<FunctionsAuthResult> {\n const client = this.supabase.getClient();\n const { data: sessionData, error: sessionError } = await client.auth.getSession();\n if (sessionError) {\n return { ok: false, error: new Error(sessionError.message) };\n }\n\n let accessToken = sessionData.session?.access_token;\n if (!accessToken) {\n const { data: refreshed, error: refreshError } = await client.auth.refreshSession();\n if (refreshError) {\n return { ok: false, error: new Error(refreshError.message) };\n }\n accessToken = refreshed.session?.access_token;\n }\n\n if (!accessToken) {\n return {\n ok: false,\n error: new Error(\n $localize`:@@stripe.errors.no_auth_session:No Supabase Auth session. Sign in before checkout (e.g. signInWithPassword, signInWithOAuth, or magic link).`,\n ),\n };\n }\n\n return { ok: true, headers: { Authorization: `Bearer ${accessToken}` } };\n }\n\n private async invokeWithAuth<T>(\n name: string,\n options: FunctionInvokeOptions = {},\n ): Promise<{ data: T | null; error: Error | null }> {\n const auth = await this.resolveFunctionsAuth();\n if (!auth.ok) {\n return { data: null, error: auth.error };\n }\n\n const { data, error } = await this.supabase.getClient().functions.invoke<T>(name, {\n ...options,\n headers: {\n ...options.headers,\n ...auth.headers,\n },\n });\n\n if (error) {\n return { data: null, error: error as Error };\n }\n\n return { data, error: null };\n }\n\n /**\n * Get the Stripe instance\n */\n public async getStripe(): Promise<Stripe | null> {\n return this.stripe;\n }\n\n /**\n * Initialize the embedded checkout\n * @param clientSecret The client secret for the checkout session\n * @see https://docs.stripe.com/js/embedded_checkout/init - v8 supports optional appearance, defaultValues, etc.\n */\n public async initEmbeddedCheckout(clientSecret: string) {\n const stripe = await this.getStripe();\n this.embeddedCheckout = await stripe?.initEmbeddedCheckout({ \n clientSecret\n }) ?? null;\n }\n\n /**\n * Mount the embedded checkout\n * @param elementId The ID of the element to mount the checkout on\n */\n public mountEmbeddedCheckout(elementId: string = '#embedded-checkout') {\n this.embeddedCheckout?.mount(elementId);\n }\n\n /**\n * Destroy the embedded checkout\n * Wrapped in try/catch to handle multiple destroy() calls (stripe-js throws IntegrationError when instance already destroyed)\n */\n public destroyEmbeddedCheckout() {\n if (!this.embeddedCheckout) return;\n try {\n this.embeddedCheckout.destroy();\n } catch {\n // Already destroyed or error - ignore silently\n } finally {\n this.embeddedCheckout = null;\n }\n }\n\n /**\n * Create a checkout session. The edge function sets `metadata.supabase_user_id` and\n * `client_reference_id` from the authenticated user (JWT); do not send user id in the body.\n */\n public async createCheckoutSession(\n priceId: string,\n resultPagePath: string,\n customer: StripeCustomerPublic | null\n ): Promise<{ clientSecret: string | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Checkout.Session>('checkout_session', {\n body: {\n priceId,\n resultPagePath,\n customer,\n locale: this.config.locale,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return {\n clientSecret: data?.client_secret ?? null,\n error: null,\n };\n } catch (error) {\n return { clientSecret: null, error: error as Error };\n }\n }\n\n /**\n * Create a subscription checkout session. Supabase user id is attached on the server from the JWT.\n */\n public async createSubscription(priceId: string, returnPath: string, customer: StripeCustomerPublic | null): Promise<{ clientSecret: string | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Checkout.Session>('create_subscription', {\n body: {\n priceId,\n resultPagePath: returnPath,\n customer,\n locale: this.config.locale,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { clientSecret: data?.client_secret ?? null, error: null };\n } catch (error) {\n return { clientSecret: null, error: error as Error };\n }\n }\n\n /**\n * Update a subscription\n * @param subscriptionId The subscription ID \n * @param params The parameters to update\n */\n public async updateSubscription(\n subscriptionId: string, \n params: any\n ): Promise<{ subscription: StripeTypes.Subscription | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription>('update_subscription', {\n body: {\n subscriptionId,\n params,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { subscription: data, error: null };\n } catch (error) {\n return { subscription: null, error: error as Error };\n }\n }\n\n /**\n * Get a subscription\n * @param subscriptionId The subscription ID\n */\n public async getSubscription(\n subscriptionId: string\n ): Promise<{ subscription: StripeTypes.Subscription | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription>('get_subscription', {\n body: {\n subscriptionId,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { subscription: data, error: null };\n } catch (error) {\n return { subscription: null, error: error as Error };\n }\n }\n\n /**\n * List customer subscriptions\n */\n public async listSubscriptions(): Promise<{ subscriptions: StripeTypes.Subscription[] | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription[]>('list_subscriptions');\n\n if (error) {\n throw error;\n }\n\n return { subscriptions: data, error: null };\n } catch (error) {\n return { subscriptions: null, error: error as Error };\n }\n }\n\n /**\n * Cancel a subscription\n * @param subscriptionId The subscription ID\n */\n public async cancelSubscription(\n subscriptionId: string\n ): Promise<{ subscription: StripeTypes.Subscription | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription>('cancel_subscription', {\n body: {\n subscriptionId,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { subscription: data, error: null };\n } catch (error) {\n return { subscription: null, error: error as Error };\n }\n }\n\n /**\n * Resume a paused subscription\n * @param subscriptionId The subscription ID\n * @param params Optional parameters for resumption\n */\n public async resumeSubscription(\n subscriptionId: string,\n params?: any\n ): Promise<{ subscription: StripeTypes.Subscription | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Subscription>('resume_subscription', {\n body: {\n subscriptionId,\n params,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { subscription: data, error: null };\n } catch (error) {\n return { subscription: null, error: error as Error };\n }\n }\n\n /**\n * Retrieve the payment intent status\n * @param sessionId The session ID of the checkout session\n */\n public async getCheckoutSessionStatus(sessionId: string): Promise<{ \n sessionStatus: StripeTypes.Checkout.Session | null; \n error: Error | null \n }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Checkout.Session>('session_status', {\n body: {\n sessionId,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { sessionStatus: data, error: null };\n } catch (error) {\n console.error('❌ [StripeClientService]: Error retrieving payment intent:', error);\n return { sessionStatus: null, error: error as Error };\n }\n }\n\n /**\n * Create a portal session\n * @param customerId The customer ID\n * @param returnUrl The URL to redirect to after the portal session\n */\n public async createPortalSession(customerId: string, returnUrl: string): Promise<{ url: string | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.BillingPortal.Session>('create_portal_session', {\n body: {\n customerId,\n returnUrl,\n locale: this.config.locale,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { url: data?.url ?? null, error: null };\n } catch (error) {\n return { url: null, error: error as Error };\n }\n }\n\n /**\n * Create a customer\n * @param customerEmail The email of the customer\n */\n public async createCustomer(customerEmail: string): Promise<{ customer: StripeTypes.Customer | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.Customer>('create_customer', {\n body: {\n customerEmail,\n },\n });\n\n if (error) {\n throw error;\n }\n\n return { customer: data, error: null };\n } catch (error) {\n return { customer: null, error: error as Error };\n }\n }\n\n public async getCustomerPaymentMethods(customerId: string): Promise<{ paymentMethods: StripeTypes.PaymentMethod[] | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.PaymentMethod[]>('customer_payment_methods', {\n body: { customerId },\n });\n\n if (error) {\n throw error;\n }\n\n return { paymentMethods: data, error: null };\n } catch (error) {\n return { paymentMethods: null, error: error as Error };\n }\n }\n\n public async getCustomerPaymentMethod(customerId: string, paymentMethodId: string): Promise<{ paymentMethod: StripeTypes.PaymentMethod | null; error: Error | null }> {\n try {\n const { data, error } = await this.invokeWithAuth<StripeTypes.PaymentMethod>('customer_payment_method', {\n body: { customerId, paymentMethodId },\n });\n\n if (error) {\n throw error;\n }\n\n return { paymentMethod: data, error: null };\n } catch (error) {\n return { paymentMethod: null, error: error as Error };\n }\n }\n}\n","export enum Currency {\n EUR = 'eur',\n USD = 'usd',\n GBP = 'gbp',\n JPY = 'jpy',\n KRW = 'krw',\n CNY = 'cny',\n INR = 'inr',\n}","import { inject, Injectable } from '@angular/core';\nimport { SupabaseClientService } from './supabase-client.service';\nimport { StripePrice, StripeProduct } from '../models/database.model';\nimport { StripeProductPublic } from '../models/product-public.model';\n\nexport type FetchCatalogResult = {\n prices: StripePrice[];\n products: StripeProductPublic[];\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ProductsService {\n private readonly supabaseService = inject(SupabaseClientService);\n\n /**\n * Map a Stripe product row plus price rows to the public shape used by the UI.\n */\n toStripeProductPublic(product: StripeProduct, prices: StripePrice[] = []): StripeProductPublic {\n return this.parseProduct(product, prices);\n }\n\n /**\n * Load all Stripe prices and products, returning parsed public products.\n */\n async fetchFullCatalog(): Promise<{ data: FetchCatalogResult | null; error: Error | null }> {\n const [pricesResult, productsResult] = await Promise.all([\n this.supabaseService.selectStripePrices(),\n this.supabaseService.selectStripeProducts(),\n ]);\n\n const pricesError = pricesResult.error as Error | null;\n const productsError = productsResult.error as Error | null;\n\n if (pricesError) {\n return { data: null, error: pricesError };\n }\n if (productsError) {\n return { data: null, error: productsError };\n }\n\n const prices = (pricesResult.data ?? []) as StripePrice[];\n const stripeProducts = (productsResult.data ?? []) as StripeProduct[];\n\n const products = stripeProducts.map((product) => this.parseProduct(product, prices));\n\n return { data: { prices, products }, error: null };\n }\n\n /**\n * Load prices and a single product by id, returning parsed public product(s).\n */\n async fetchProductById(\n id: string,\n ): Promise<{ data: StripeProductPublic[]; error: Error | null }> {\n const [pricesResult, productResult] = await Promise.all([\n this.supabaseService.selectStripePrices(),\n this.supabaseService.selectStripeProduct(id),\n ]);\n\n const pricesError = pricesResult.error as Error | null;\n const productError = productResult.error as Error | null;\n\n if (pricesError) {\n return { data: [], error: pricesError };\n }\n if (productError) {\n return { data: [], error: productError };\n }\n\n const prices = (pricesResult.data ?? []) as StripePrice[];\n const rows = productResult.data as StripeProduct[] | null;\n if (!rows?.length) {\n return { data: [], error: null };\n }\n\n return { data: [this.parseProduct(rows[0], prices)], error: null };\n }\n\n /**\n * Load prices and products for the given Stripe product ids.\n */\n async fetchProductsByIds(\n ids: string[],\n ): Promise<{ data: StripeProductPublic[]; error: Error | null }> {\n const [pricesResult, productsResult] = await Promise.all([\n this.supabaseService.selectStripePrices(),\n this.supabaseService.selectStripeProductsByIds(ids),\n ]);\n\n const pricesError = pricesResult.error as Error | null;\n const productsError = productsResult.error as Error | null;\n\n if (pricesError) {\n return { data: [], error: pricesError };\n }\n if (productsError) {\n return { data: [], error: productsError };\n }\n\n const prices = (pricesResult.data ?? []) as StripePrice[];\n const stripeProducts = (productsResult.data ?? []) as StripeProduct[];\n\n const products = stripeProducts.map((product) => this.parseProduct(product, prices));\n\n return { data: products, error: null };\n }\n\n private parseProduct(product: StripeProduct, prices: StripePrice[] = []): StripeProductPublic {\n const { attrs, ...mainProperties } = product;\n return {\n ...mainProperties,\n images: (attrs as { images?: string[] })?.images ?? [],\n prices: prices\n .filter((price) => price.product === product.id)\n .map((price) => ({\n details: price,\n recurringInterval: (price?.attrs as { recurring?: { interval?: string } })?.recurring?.interval ?? 'no-recurring',\n })),\n };\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';\nimport { Currency } from '../models/currency.model';\nimport { StripePricePublic, StripeProductPublic } from '../models/product-public.model';\nimport { ProductsService } from '../services/products.service';\n\nexport type { StripePricePublic, StripeProductPublic } from '../models/product-public.model';\n\nexport type ProductsStatus = 'idle' | 'loading' | 'success' | 'error';\n\ntype ProductsState = {\n products: StripeProductPublic[] | null;\n prices: StripePricePublic[] | null;\n status: ProductsStatus;\n error: string | null;\n currency: Currency;\n};\n\nconst initialProductsState: ProductsState = {\n products: null,\n prices: null,\n status: 'idle',\n error: null,\n currency: Currency.EUR,\n};\n\nexport const ProductsStore = signalStore(\n { providedIn: 'root' },\n withState(initialProductsState),\n withComputed((state) => ({\n isStatusLoading: computed(() => state.status() === 'loading'),\n isStatusSuccess: computed(() => state.status() === 'success'),\n isStatusError: computed(() => state.status() === 'error'),\n oneTimeproductsByCurrency: computed(\n () =>\n state\n .products()\n ?.filter((product) =>\n product.prices.some(\n (price) => price.details.type === 'one_time' && price.details.currency === state.currency(),\n ),\n ) || [],\n ),\n recurringProductsByCurrency: computed(\n () =>\n state\n .products()\n ?.filter((product) =>\n product.prices.some(\n (price) => price.details.type === 'recurring' && price.details.currency === state.currency(),\n ),\n ) || [],\n ),\n productsByCurrency: computed(\n () =>\n state\n .products()\n ?.filter((product) => product.prices.some((price) => price.details.currency === state.currency())) || [],\n ),\n hasProducts: computed(() => state.products() !== null && state.products()!.length > 0),\n isError: computed(() => state.error()),\n })),\n withMethods((store, productsService = inject(ProductsService)) => ({\n /**\n * Get products by IDs from the current loaded products\n */\n getProductsByIds(ids: string[]): StripeProductPublic[] {\n return store.products()?.filter((product) => product.id && ids.includes(product.id)) || [];\n },\n\n /**\n * Set the currency filter for products\n */\n setCurrency(currency: Currency): void {\n patchState(store, { currency });\n },\n\n /**\n * Load product by id\n */\n async loadProductById(id: string) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { data: products, error: productError } = await productsService.fetchProductById(id);\n\n if (productError) {\n console.error('🎮 [ProductsStore]: Error loading product', productError);\n patchState(store, { status: 'error', error: (productError as Error).message });\n return;\n }\n\n patchState(store, { status: 'success', products });\n } catch (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n }\n },\n\n /**\n * Load products from Stripe\n */\n async loadProducts() {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { data, error } = await productsService.fetchFullCatalog();\n\n if (error) {\n console.error('🎮 [ProductsStore]: Error loading catalog', error);\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n return;\n }\n\n if (!data) {\n patchState(store, { status: 'success', prices: [], products: [] });\n return;\n }\n\n console.log('🎮 [ProductsStore] products: ', data.products);\n\n patchState(store, {\n status: 'success',\n prices: data.prices,\n products: data.products,\n });\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n async loadProductsByIds(ids: string[]) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { data: products, error: productsError } = await productsService.fetchProductsByIds(ids);\n\n if (productsError) {\n console.error('🎮 [ProductsStore]: Error loading products', productsError);\n patchState(store, { status: 'error', error: (productsError as Error).message });\n return;\n }\n\n console.log('🎮 [ProductsStore] products: ', products);\n\n patchState(store, {\n status: 'success',\n products,\n });\n } catch (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n }\n },\n\n /**\n * Reset the store to initial state\n */\n reset() {\n patchState(store, initialProductsState);\n },\n })),\n withHooks((store) => ({\n async onInit() {\n console.log('🎮 [ProductsStore] onInit');\n\n const products = store.products();\n console.log('🎮 [ProductsStore] products: ', products);\n\n if (!products) {\n console.log('🎮 [ProductsStore] loading products...');\n await store.loadProducts();\n }\n },\n })),\n);\n","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';\nimport { StripePrice, StripeProduct, StripeSubscription } from '../models/database.model';\nimport { StripeClientService } from '../services/stripe-client.service';\nimport { ProductsService } from '../services/products.service';\nimport { SupabaseClientService } from '../services/supabase-client.service';\nimport { ProductsStore, StripeProductPublic } from './products.store';\nimport { CustomerStore, StripeCustomerPublic } from './customer.store';\n\nexport type StripeSubscriptionCancellationDetails = {\n cancel_at_period_end: boolean;\n cancel_at: number;\n canceled_at: number;\n cancellation_details: {\n comment: string;\n feedback: string;\n reason: string;\n }\n}\n\nexport type StripeSubscriptionPlan = {\n amount: number;\n active: boolean;\n interval: string;\n productId: string;\n}\n\nexport type StripeSubscriptionPublic = Omit<StripeSubscription, 'attrs'> & {\n status: string;\n plan: StripeSubscriptionPlan;\n cancel: StripeSubscriptionCancellationDetails;\n product?: StripeProductPublic | null;\n};\n\nexport type SubscriptionStatus = 'idle' | 'loading' | 'success' | 'error';\n\nexport interface SubscriptionState {\n subscriptions: StripeSubscriptionPublic[] | null;\n currentSubscription: StripeSubscriptionPublic | null;\n status: SubscriptionStatus;\n error: string | null;\n sessionStatus: any | null;\n}\n\nconst initialSubscriptionState: SubscriptionState = {\n subscriptions: null,\n currentSubscription: null,\n status: 'idle',\n error: null,\n sessionStatus: null,\n};\n\nexport const SubscriptionsStore = signalStore(\n { providedIn: 'root' },\n withState(initialSubscriptionState),\n withComputed((state) => ({\n isStatusLoading: computed(() => state.status() === 'loading'),\n isStatusSuccess: computed(() => state.status() === 'success'),\n isStatusError: computed(() => state.status() === 'error'),\n hasSubscriptions: computed(() => state.subscriptions() !== null && state.subscriptions()!.length > 0),\n isError: computed(() => state.error()),\n })),\n withMethods((store, stripeService = inject(StripeClientService),\n supabaseService = inject(SupabaseClientService),\n productsStore = inject(ProductsStore),\n productsService = inject(ProductsService),\n customerStore = inject(CustomerStore)) => ({\n /**\n * Create a subscription\n * @param priceId The price ID for the subscription\n */\n async createSubscription(priceId: string, returnPath: string, customer: StripeCustomerPublic | null) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { clientSecret, error } = await stripeService.createSubscription(priceId, returnPath, customer);\n console.log('🔍 [SubscriptionsStore] created subscription', clientSecret, error);\n \n if (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n } else {\n const stripe = await stripeService.getStripe();\n\n if (!stripe) {\n patchState(store, {\n status: 'error',\n error: $localize`:@@stripe.errors.no_stripe_instance:No Stripe instance returned`,\n });\n } else {\n await stripeService.initEmbeddedCheckout(clientSecret as string);\n stripeService.mountEmbeddedCheckout();\n\n patchState(store, {\n status: 'success',\n });\n }\n }\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n /**\n * Load subscriptions for the authenticated Supabase session (Stripe metadata.supabase_user_id)\n */\n async loadSubscriptions() {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const [subsResult, userProductsResult] = await Promise.all([\n supabaseService.getStripeSubscriptionsForAuthenticatedUser(),\n supabaseService.selectStripeProductsForAuthenticatedUser(),\n ]);\n const { data: subscriptions, error } = subsResult;\n const { data: userStripeProducts, error: userProductsError } = userProductsResult;\n\n if (userProductsError) {\n console.warn('🔍 [SubscriptionsStore] user-scoped products RPC', userProductsError);\n }\n\n const prices = (productsStore.prices() ?? []) as StripePrice[];\n const userProductsById = new Map<string, StripeProductPublic>(\n (userStripeProducts ?? []).map((p) => [\n p.id as string,\n productsService.toStripeProductPublic(p as StripeProduct, prices),\n ]),\n );\n\n console.log('🔍 [SubscriptionsStore] loaded subscriptions', subscriptions);\n\n const parsedSubscriptions = subscriptions?.map((subscription) => {\n const parsedSubscription = parseSubscription(subscription as StripeSubscription);\n const productId = parsedSubscription.plan.productId;\n if (productId) {\n const fromSession = userProductsById.get(productId);\n if (fromSession) {\n parsedSubscription.product = fromSession;\n } else {\n const product = productsStore.products()?.find((p) => p.id === productId);\n if (product) {\n parsedSubscription.product = product;\n }\n }\n }\n return parsedSubscription;\n });\n\n if (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n } else {\n patchState(store, {\n status: 'success',\n subscriptions: parsedSubscriptions\n });\n }\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n /**\n * Get a specific subscription\n * @param subscriptionId The subscription ID\n */\n async getSubscription(subscriptionId: string) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { data, error } = await supabaseService.selectStripeSubscription(subscriptionId);\n const [subscription] = data || [];\n console.log('🔍 [SubscriptionsStore] got subscription', subscription, error);\n\n const parsedSubscription = parseSubscription(subscription as StripeSubscription);\n\n // Get the product associated with this subscription\n const productId = parsedSubscription.plan.productId;\n if (productId && productsStore.products()) {\n const product = productsStore.products()?.find(p => p.id === productId);\n if (product) {\n parsedSubscription.product = product;\n }\n }\n\n if (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n } else {\n patchState(store, {\n status: 'success',\n currentSubscription: parsedSubscription\n });\n }\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n /**\n * Get the status of a checkout subcription session\n * @param sessionId The ID of the checkout subcription session\n */\n async getSessionStatus({sessionId}: {sessionId: string}) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { sessionStatus, error } = await stripeService.getCheckoutSessionStatus(sessionId);\n \n if (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n } else {\n patchState(store, { status: 'success', sessionStatus });\n }\n\n } catch (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n }\n },\n\n /**\n * Destroy the embedded subscription\n */\n destroyEmbeddedSubscription() {\n stripeService.destroyEmbeddedCheckout();\n },\n\n /**\n * Reset the store to initial state\n */\n reset() {\n patchState(store, initialSubscriptionState);\n }\n })),\n withHooks(() => {\n const productsStore = inject(ProductsStore);\n\n if (!productsStore.hasProducts()) {\n productsStore.loadProducts();\n console.log('🔍 [SubscriptionsStore] loading products');\n }\n\n return {\n onInit() {\n console.log('🔍 [SubscriptionsStore] initialized');\n },\n onDestroy() {\n console.log('🧹 [SubscriptionsStore] destroyed');\n }\n }\n })\n);\n\nexport function parseSubscription(subscription: StripeSubscription): StripeSubscriptionPublic {\n const subscriptionAttrs = subscription.attrs as any;\n \n return {\n ...subscription,\n status: subscriptionAttrs.status,\n plan: {\n amount: subscriptionAttrs.plan.amount,\n active: subscriptionAttrs.plan.active,\n interval: subscriptionAttrs.plan.interval,\n productId: subscriptionAttrs.plan.product,\n },\n cancel: {\n cancel_at_period_end: subscriptionAttrs.cancel_at_period_end ?? false,\n cancel_at: subscriptionAttrs.cancel_at ?? null,\n canceled_at: subscriptionAttrs.canceled_at ?? null,\n cancellation_details: subscriptionAttrs.cancellation_details ?? {\n comment: null,\n feedback: null,\n reason: null\n }\n },\n product: subscriptionAttrs.product ? subscriptionAttrs.product as StripeProductPublic : undefined\n };\n}","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';\nimport { setAllEntities, upsertEntity, withEntities } from '@ngrx/signals/entities';\nimport type { Stripe as StripeTypes } from 'stripe';\nimport { StripeCustomer, StripePaymentIntent } from '../models/database.model';\nimport { StripeClientService } from '../services/stripe-client.service';\nimport { SupabaseClientService } from '../services/supabase-client.service';\nimport { ProductsStore } from './products.store';\nimport { parseSubscription, StripeSubscriptionPublic } from './subscriptions.store';\n\nexport type CustomerStatus = 'idle' | 'loading' | 'success' | 'error';\n\nexport type StripePaymentIntentsPublic = Omit<StripePaymentIntent, 'attrs'> & {\n status: string;\n invoiceId: string;\n liveMode: boolean;\n confirmationMethod: string;\n paymentMethodId: string;\n paymentMethod?: PaymentMethodEntity;\n};\n\nexport type StripeCustomerPublic = Omit<StripeCustomer, 'attrs'>;\n\nexport type PaymentMethodEntity = StripeTypes.PaymentMethod;\n\nexport interface CustomerState {\n customer: {\n data: StripeCustomerPublic | null;\n status: CustomerStatus;\n error: string | null;\n };\n paymentIntents: {\n data: StripePaymentIntentsPublic[];\n status: CustomerStatus;\n error: string | null;\n };\n subscriptions: {\n data: StripeSubscriptionPublic[];\n status: CustomerStatus;\n error: string | null;\n };\n paymentMethodsStatus: CustomerStatus;\n paymentMethodsError: string | null;\n}\n\nconst initialCustomerState: CustomerState = {\n customer: { \n status: 'idle', \n data: null,\n error: null \n },\n paymentIntents: {\n data: [],\n status: 'idle',\n error: null,\n },\n subscriptions: {\n data: [], \n status: 'idle',\n error: null,\n },\n paymentMethodsStatus: 'idle',\n paymentMethodsError: null,\n};\n\n\nexport const CustomerStore = signalStore(\n { providedIn: 'root' },\n withState(initialCustomerState),\n withEntities<PaymentMethodEntity>(),\n withComputed((state) => ({\n isPaymentIntentsStatusLoading: computed(() => state.paymentIntents.status() === 'loading'),\n isPaymentIntentsStatusSuccess: computed(() => state.paymentIntents.status() === 'success'),\n isPaymentIntentsStatusError: computed(() => state.paymentIntents.status() === 'error'),\n isSubscriptionsStatusLoading: computed(() => state.subscriptions.status() === 'loading'),\n isSubscriptionsStatusSuccess: computed(() => state.subscriptions.status() === 'success'),\n isSubscriptionsStatusError: computed(() => state.subscriptions.status() === 'error'),\n hasSubscriptions: computed(() => state.subscriptions.data() !== null && state.subscriptions.data()!.length > 0),\n hasPaymentIntents: computed(() => state.paymentIntents.data() !== null && state.paymentIntents.data()!.length > 0),\n firstSubscription: computed(() => state.subscriptions.data()?.[0]),\n restSubscriptions: computed(() => state.subscriptions.data()?.slice(1)),\n isError: computed(() => state.paymentIntents.error()),\n isPaymentMethodsStatusLoading: computed(() => state.paymentMethodsStatus() === 'loading'),\n isPaymentMethodsStatusSuccess: computed(() => state.paymentMethodsStatus() === 'success'),\n isPaymentMethodsStatusError: computed(() => state.paymentMethodsStatus() === 'error'),\n hasPaymentMethods: computed(() => state.entities().length > 0),\n paymentMethods: computed(() => state.entities()),\n })),\n withMethods((state, supabaseService = inject(SupabaseClientService), stripeService = inject(StripeClientService), productsStore = inject(ProductsStore)) => ({\n /**\n * Load customer\n * @param customerEmail The customer email\n */\n async loadCustomer(customerEmail: string) {\n patchState(state, { customer: { status: 'loading', data: null, error: null } });\n\n const { data, error } = await supabaseService.getCustomerByEmail(customerEmail);\n const [customer] = data as StripeCustomerPublic[];\n\n if (error) {\n patchState(state, { customer: { error: error.message, status: 'error', data: null } });\n } else {\n \n if (customer) {\n this.loadPaymentIntents(customer.id as string);\n this.loadSubscriptions(customer.id as string);\n this.loadPaymentMethods(customer.id as string);\n\n patchState(state, { customer: { data: customer, status: 'success', error: null } });\n } else {\n this.createCustomer(customerEmail);\n }\n\n }\n },\n\n /**\n * Create a customer\n * @param customerEmail The customer email\n */\n async createCustomer(customerEmail: string) {\n const { customer, error } = await stripeService.createCustomer(customerEmail);\n\n if (error) {\n patchState(state, { customer: { error: error.message, status: 'error', data: null } });\n } else {\n patchState(state, { customer: { data: customer as StripeCustomerPublic, status: 'success', error: null } });\n }\n },\n\n /**\n * Load payment intents\n * @param customerId The customer ID\n */\n async loadPaymentIntents(customerId: string) {\n patchState(state, { paymentIntents: { status: 'loading', data: [], error: null } });\n\n const { data, error } = await supabaseService.getCustomerPaymentIntents(customerId);\n const paymentIntents = data?.map((paymentIntent) => parsePaymentIntent(paymentIntent, state.entityMap()));\n\n if (error) {\n patchState(state, { paymentIntents: { error: error.message, status: 'error', data: [] } });\n } else {\n patchState(state, { paymentIntents: { data: paymentIntents ?? [], status: 'success', error: null } });\n }\n }, \n\n /**\n * Load subscriptions\n * @param customerId The customer ID\n */\n async loadSubscriptions(customerId: string) {\n patchState(state, { subscriptions: { data: [], status: 'loading', error: null } });\n\n const { data, error } = await supabaseService.getCustomerSubscriptions(customerId);\n \n if (error) {\n patchState(state, { subscriptions: { error: error.message, status: 'error', data: [] } });\n } else {\n const subscriptions = data.map((subscription) => {\n const parsedSubscription = parseSubscription(subscription);\n \n // Get the product associated with this subscription\n const productId = parsedSubscription.plan.productId;\n if (productId && productsStore.products()) {\n const product = productsStore.products()?.find(p => p.id === productId);\n if (product) {\n parsedSubscription.product = product;\n }\n }\n \n return parsedSubscription;\n });\n\n console.log('🔍 [CustomerStore] subscriptions: ', subscriptions);\n \n patchState(state, { subscriptions: { data: subscriptions ?? [], status: 'success', error: null } });\n }\n },\n\n /**\n * Load payment methods for a customer\n * @param customerId The customer ID\n */\n async loadPaymentMethods(customerId: string) {\n patchState(state, { \n paymentMethodsStatus: 'loading', \n paymentMethodsError: null \n });\n\n const { paymentMethods, error } = await stripeService.getCustomerPaymentMethods(customerId);\n\n if (error) {\n patchState(state, { \n paymentMethodsStatus: 'error', \n paymentMethodsError: error.message \n });\n } else {\n patchState(state, \n setAllEntities(paymentMethods ?? []),\n { \n paymentMethodsStatus: 'success', \n paymentMethodsError: null \n }\n );\n }\n },\n\n /**\n * Load a single payment method and add/update it in the entity collection\n * @param customerId The customer ID\n * @param paymentMethodId The payment method ID\n */\n async loadPaymentMethod(customerId: string, paymentMethodId: string) {\n patchState(state, { \n paymentMethodsStatus: 'loading', \n paymentMethodsError: null \n });\n\n const { paymentMethod, error } = await stripeService.getCustomerPaymentMethod(customerId, paymentMethodId);\n\n if (error) {\n patchState(state, { \n paymentMethodsStatus: 'error', \n paymentMethodsError: error.message \n });\n }\n\n if (paymentMethod) {\n patchState(state, \n upsertEntity(paymentMethod),\n { \n paymentMethodsStatus: 'success', \n paymentMethodsError: null \n }\n );\n } else {\n patchState(state, { \n paymentMethodsStatus: 'error', \n paymentMethodsError: $localize`:@@stripe.errors.payment_method_not_found:Payment method not found` \n });\n }\n },\n })),\n withHooks(() => {\n return {\n onInit() {\n const productsStore = inject(ProductsStore);\n\n if (!productsStore.hasProducts()) {\n console.log('🔍 [CustomerStore] loading products...');\n productsStore.loadProducts();\n }\n console.log('🔍 [CustomerStore] initialized');\n },\n onDestroy() {\n console.log('🧹 [CustomerStore] destroyed');\n }\n }\n })\n);\n\nexport function parsePaymentIntent(\n paymentIntent: StripePaymentIntent, \n paymentMethodsMap: Record<string, PaymentMethodEntity> = {}\n): StripePaymentIntentsPublic {\n console.log('🔍 [CustomerStore] paymentIntent: ', paymentIntent);\n\n const paymentIntentAttrs = paymentIntent.attrs as any;\n const paymentMethodId = paymentIntentAttrs.payment_method;\n \n return {\n ...paymentIntent,\n status: paymentIntentAttrs.status,\n invoiceId: paymentIntentAttrs.invoice as string,\n liveMode: paymentIntentAttrs.livemode as boolean,\n confirmationMethod: paymentIntentAttrs.confirmation_method,\n paymentMethodId,\n paymentMethod: paymentMethodId ? paymentMethodsMap[paymentMethodId] : undefined,\n };\n}","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';\nimport { StripeClientService } from '../services/stripe-client.service';\nimport { CustomerStore, StripeCustomerPublic } from './customer.store';\nimport type { Stripe as StripeTypes } from 'stripe';\n\nexport type ICheckoutSessionStatus = StripeTypes.Checkout.Session;\n\nexport type CheckoutStatus = 'idle' | 'loading' | 'success' | 'error';\n\ntype CheckoutState = {\n status: CheckoutStatus;\n sessionId: string | null;\n returnPagePath: string;\n error: string | null;\n sessionStatus: ICheckoutSessionStatus | null;\n}\n\nconst initialCheckoutState: CheckoutState = {\n status: 'idle',\n sessionId: null,\n returnPagePath: '/return',\n error: null,\n sessionStatus: null\n};\n\nexport const CheckoutStore = signalStore(\n { providedIn: 'root' },\n withState(initialCheckoutState),\n withComputed((state) => ({\n isStatusLoading: computed(() => state.status() === 'loading'),\n isStatusSuccess: computed(() => state.status() === 'success'),\n isStatusError: computed(() => state.status() === 'error'),\n paymentStatus: computed(() => state.sessionStatus()?.status),\n isPaymentComplete: computed(() => state.sessionStatus()?.status === 'complete'),\n isPaymentProcessing: computed(() => state.sessionStatus()?.status === 'open'),\n isError: computed(() => state.error())\n })),\n withMethods((store, stripeService = inject(StripeClientService), customerStore = inject(CustomerStore)) => ({\n /**\n * Create a checkout session\n * @param priceId The price ID to checkout\n * @param returnPagePath The return page path after checkout\n */\n async createCheckoutSession({priceId, returnPagePath, customerEmail}: {priceId: string, returnPagePath: string, customerEmail: string | null}) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n let customer: StripeCustomerPublic | null = null;\n \n if (customerEmail) {\n customer = customerStore.customer().data;\n }\n\n const { clientSecret, error } = await stripeService.createCheckoutSession(priceId, returnPagePath, customer);\n\n if (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n } else {\n const stripe = await stripeService.getStripe();\n\n if (!stripe) {\n patchState(store, {\n status: 'error',\n error: $localize`:@@stripe.errors.no_stripe_instance:No Stripe instance returned`,\n });\n } else {\n await stripeService.initEmbeddedCheckout(clientSecret as string);\n stripeService.mountEmbeddedCheckout();\n\n patchState(store, {\n status: 'success',\n });\n }\n }\n\n } catch (error) {\n patchState(store, {\n status: 'error',\n error: (error as Error).message,\n });\n }\n },\n\n /**\n * Get the status of a checkout session\n * @param sessionId The ID of the checkout session\n */\n async getSessionStatus({sessionId}: {sessionId: string}) {\n patchState(store, { status: 'loading', error: null });\n\n try {\n const { sessionStatus, error } = await stripeService.getCheckoutSessionStatus(sessionId);\n \n if (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n } else {\n patchState(store, { status: 'success', sessionStatus });\n }\n\n } catch (error) {\n patchState(store, { status: 'error', error: (error as Error).message });\n }\n },\n\n\n /**\n * Destroy the embedded checkout\n */\n destroyEmbeddedCheckout() {\n stripeService.destroyEmbeddedCheckout();\n },\n \n /**\n * Reset the store to initial state\n */\n reset() {\n patchState(store, initialCheckoutState);\n }\n })),\n withHooks({\n onInit() {\n console.log('🔍 [CheckoutStore] initialized');\n },\n onDestroy() {\n console.log('🧹 [CheckoutStore] destroyed');\n }\n })\n) ","import { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withMethods, withState } from '@ngrx/signals';\nimport { StripeClientService } from '../services/stripe-client.service';\n\nexport interface PortalSessionResponse {\n url: string;\n}\n\nexport type PortalStatus = 'idle' | 'loading' | 'success' | 'error';\n\nexport interface PortalState {\n status: PortalStatus;\n error: string | null;\n portalUrl: string | null;\n}\n\nconst initialPortalState: PortalState = {\n status: 'idle',\n error: null,\n portalUrl: null\n};\n\nexport const PortalAccountStore = signalStore(\n { providedIn: 'root' },\n withState(initialPortalState),\n withComputed((state) => ({\n isStatusIdle: computed(() => state.status() === 'idle'),\n isStatusLoading: computed(() => state.status() === 'loading'),\n isStatusSuccess: computed(() => state.status() === 'success'),\n isStatusError: computed(() => state.status() === 'error'),\n })),\n withMethods((store, stripeService = inject(StripeClientService)) => ({\n /**\n * Creates a customer portal session and redirects to the URL\n * @param customerId Stripe customer ID\n * @param returnUrl URL to redirect to after the portal session\n */\n async createPortalSession(customerId: string, returnUrl: string): Promise<void> {\n patchState(store, { status: 'loading', error: null, portalUrl: null });\n\n try {\n const { url, error } = await stripeService.createPortalSession(customerId, returnUrl);\n\n if (error) {\n throw new Error(error.message);\n }\n\n if (!url) {\n throw new Error($localize`:@@stripe.errors.portal_session_failed:Could not create portal session`);\n }\n\n patchState(store, {\n status: 'success',\n portalUrl: url\n });\n\n window.location.href = url;\n } catch (error) {\n console.error('🚨 [PortalAccountStore]', error);\n \n const errorMessage = error instanceof Error ? error.message : $localize`:@@stripe.errors.unknown:Unknown error`;\n \n patchState(store, {\n status: 'error',\n error: errorMessage\n });\n }\n },\n\n /**\n * Resets the store to initial state\n */\n reset(): void {\n patchState(store, initialPortalState);\n }\n }))\n); ","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-embedded-skeleton',\n templateUrl: './embedded-skeleton.component.html',\n standalone: true\n})\nexport class EmbeddedSkeletonComponent {} ","<div class=\"w-full max-w-md mx-auto p-4\">\n <!-- Header skeleton -->\n <div class=\"flex items-center gap-4 mb-6\">\n <div class=\"skeleton w-16 h-16 rounded-lg\"></div>\n <div class=\"skeleton h-6 w-48\"></div>\n </div>\n\n <!-- Price skeleton -->\n <div class=\"mb-8\">\n <div class=\"skeleton h-10 w-32 mb-2\"></div>\n <div class=\"skeleton h-4 w-24\"></div>\n </div>\n\n <!-- Payment form skeleton -->\n <div class=\"space-y-4\">\n <!-- Email field -->\n <div class=\"skeleton h-12 w-full\"></div>\n \n <!-- Card info field -->\n <div class=\"skeleton h-12 w-full\"></div>\n \n <!-- Name field -->\n <div class=\"skeleton h-12 w-full\"></div>\n \n <!-- Country selector -->\n <div class=\"skeleton h-12 w-full\"></div>\n \n <!-- Submit button -->\n <div class=\"skeleton h-12 w-full mt-6\"></div>\n </div>\n</div> ","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, OnInit } from '@angular/core';\nimport { STRIPE_CONFIG } from '../../config/stripe.config';\nimport { CheckoutStore } from '../../store/checkout.store';\nimport { CustomerStore } from '../../store/customer.store';\nimport { EmbeddedSkeletonComponent } from '../embedded-skeleton/embedded-skeleton.component';\n\n@Component({\n selector: 'lib-embedded-checkout',\n templateUrl: './embedded-checkout.component.html',\n standalone: true,\n imports: [CommonModule, EmbeddedSkeletonComponent],\n})\nexport class EmbeddedCheckoutComponent implements OnInit {\n public readonly checkoutStore = inject(CheckoutStore);\n public readonly customerStore = inject(CustomerStore);\n private readonly stripeConfig = inject(STRIPE_CONFIG);\n \n public readonly priceId = input.required<string>();\n public readonly returnPagePath = input<string>('/return');\n \n public readonly customer = computed(() => this.customerStore.customer().data);\n\n async ngOnInit() {\n this.createCheckoutSession();\n }\n\n private createCheckoutSession() {\n const base = (\n this.stripeConfig.embeddedCheckoutBaseUrl?.trim() ||\n (typeof window !== 'undefined' ? window.location.origin : '')\n ).replace(/\\/$/, '');\n const path = this.returnPagePath();\n const returnPath = path.startsWith('/') ? `${base}${path}` : `${base}/${path}`;\n\n // Create the checkout session\n this.checkoutStore.createCheckoutSession({\n priceId: this.priceId(),\n returnPagePath: returnPath,\n customerEmail: this.customer()?.email ?? ''\n });\n }\n\n ngOnDestroy() {\n this.checkoutStore.destroyEmbeddedCheckout();\n }\n} ","<div class=\"checkout-container\">\n @if (checkoutStore.isStatusLoading()) {\n <lib-embedded-skeleton />\n }\n \n @if (checkoutStore.isStatusError()) {\n <div class=\"error\">\n <p><span i18n=\"@@stripe.common.error_label\">Error:</span> {{ checkoutStore.error() }}</p>\n </div>\n }\n <div id=\"embedded-checkout\"></div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, OnInit, inject, input } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CheckoutStore } from '../../../store/checkout.store';\n\n@Component({\n selector: 'lib-checkout-return-page',\n templateUrl: './return-page.component.html',\n standalone: true,\n imports: [CommonModule],\n})\nexport class ReturnPageComponent implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n \n public readonly checkoutStore = inject(CheckoutStore);\n \n public readonly returnUrl = input<string>('/');\n \n async ngOnInit() {\n this.route.queryParams.subscribe(async params => {\n const sessionId = params['session_id'];\n this.getSessionStatus(sessionId);\n });\n }\n\n private async getSessionStatus(sessionId: string) {\n if (sessionId) {\n await this.checkoutStore.getSessionStatus({ sessionId });\n } else {\n console.error('Missing session_id parameter in URL');\n }\n }\n \n public navigate(): void {\n this.router.navigateByUrl(this.returnUrl());\n }\n} ","<div class=\"return-page-container\">\n @if (checkoutStore.isStatusLoading()) {\n <div class=\"loading-state\">\n <div class=\"spinner\"></div>\n <p i18n=\"@@stripe.checkout.verifying_status\">Verifying your payment status...</p>\n </div>\n }\n\n @if (checkoutStore.isStatusSuccess() && checkoutStore.isPaymentComplete()) {\n <div class=\"alert alert-success alert-soft flex flex-col items-center gap-4\">\n <div class=\"flex items-center gap-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-12 h-12\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <h2 class=\"status-title\" i18n=\"@@stripe.checkout.payment_complete\">Payment completed successfully!</h2>\n </div>\n </div>\n }\n\n @if (checkoutStore.isStatusSuccess() && checkoutStore.isPaymentProcessing()) {\n <div class=\"alert alert-info alert-soft flex flex-col items-center gap-4\">\n <div class=\"flex items-center gap-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-12 h-12\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <h2 class=\"status-title\" i18n=\"@@stripe.checkout.payment_processing\">Payment in processing</h2>\n </div>\n <p class=\"status-message\" i18n=\"@@stripe.checkout.processing_message\">Your payment is being processed. You will receive an email confirmation when it is complete.</p>\n </div>\n }\n\n @if (checkoutStore.isStatusError()) {\n <div class=\"alert alert-error alert-soft flex flex-col items-center gap-4\">\n <div class=\"flex items-center gap-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-12 h-12\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z\" />\n </svg>\n <h2 class=\"status-title\" i18n=\"@@stripe.checkout.error_title\">An error occurred</h2>\n </div>\n @if (checkoutStore.error()) {\n <p class=\"status-message\">{{ checkoutStore.error() }}</p>\n } @else {\n <p class=\"status-message\" i18n=\"@@stripe.checkout.error_message\">The payment could not be processed. Please try again or contact support.</p>\n }\n </div>\n }\n\n <div class=\"flex justify-end w-full pt-4\">\n <button class=\"btn btn-outline\" (click)=\"navigate()\" i18n=\"@@stripe.common.back\">Back</button>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-product-item-skeleton',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './product-item-skeleton.component.html'\n})\nexport class ProductItemSkeletonComponent {} ","<div class=\"card bg-base-100 shadow-xl w-[350px]\">\n <figure>\n <div class=\"skeleton h-48 w-full\"></div>\n </figure>\n <div class=\"card-body\">\n <div class=\"skeleton h-8 w-32\"></div>\n <div class=\"skeleton h-6 w-48\"></div>\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-3/4\"></div>\n <div class=\"card-actions justify-end mt-4\">\n <div class=\"skeleton h-10 w-24\"></div>\n </div>\n </div>\n</div> ","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UtilsService {\n\n public formatAmount(amount: number, currency = 'EUR'): string {\n if (!amount) return 'N/A';\n\n const formatter = new Intl.NumberFormat(currency.toLocaleUpperCase() === 'EUR' ? 'es-ES' : 'en-US', {\n style: 'currency',\n currency: currency || 'USD',\n });\n \n return formatter.format(amount / 100);\n }\n \n public formatDate(timestamp: number | string): string {\n if (!timestamp) return 'N/A';\n \n const date = typeof timestamp === 'number'\n ? new Date(timestamp * 1000)\n : new Date(timestamp);\n \n return date.toLocaleDateString('es-ES', {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n });\n }\n \n public getStatusBadgeClass(status: string): string {\n switch (status) {\n case 'active':\n case 'succeeded':\n case 'paid':\n return 'badge-success';\n case 'failed':\n case 'canceled':\n case 'unpaid':\n return 'badge-error';\n case 'pending':\n case 'processing':\n case 'trialing':\n return 'badge-warning';\n default:\n return 'badge-ghost';\n }\n }\n\n public translateStripeStatus(status: string): string {\n const labels: Record<string, string> = {\n active: $localize`:@@stripe.status.active:Active`,\n canceled: $localize`:@@stripe.status.canceled:Canceled`,\n cancelled: $localize`:@@stripe.status.canceled:Canceled`,\n incomplete: $localize`:@@stripe.status.incomplete:Incomplete`,\n incomplete_expired: $localize`:@@stripe.status.incomplete_expired:Incomplete expired`,\n past_due: $localize`:@@stripe.status.past_due:Past due`,\n trialing: $localize`:@@stripe.status.trialing:Trialing`,\n unpaid: $localize`:@@stripe.status.unpaid:Unpaid`,\n paused: $localize`:@@stripe.status.paused:Paused`,\n succeeded: $localize`:@@stripe.status.succeeded:Succeeded`,\n failed: $localize`:@@stripe.status.failed:Failed`,\n pending: $localize`:@@stripe.status.pending:Pending`,\n processing: $localize`:@@stripe.status.processing:Processing`,\n paid: $localize`:@@stripe.status.paid:Paid`,\n requires_payment_method: $localize`:@@stripe.status.requires_payment_method:Requires payment method`,\n requires_confirmation: $localize`:@@stripe.status.requires_confirmation:Requires confirmation`,\n requires_action: $localize`:@@stripe.status.requires_action:Requires action`,\n requires_capture: $localize`:@@stripe.status.requires_capture:Requires capture`,\n };\n return labels[status] ?? status;\n }\n\n public translateBillingInterval(interval: string): string {\n const labels: Record<string, string> = {\n day: $localize`:@@stripe.billing.daily:Daily`,\n week: $localize`:@@stripe.billing.weekly:Weekly`,\n month: $localize`:@@stripe.billing.monthly:Monthly`,\n year: $localize`:@@stripe.billing.yearly:Yearly`,\n };\n return labels[interval] ?? interval;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { UtilsService } from '../../../services/utils.service';\nimport { StripePricePublic, StripeProductPublic } from '../../../store/products.store';\nimport { Currency } from '../../../models/currency.model';\n\n@Component({\n selector: 'lib-product-item',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './product-item.component.html'\n})\nexport class ProductItemComponent {\n public readonly product = input.required<StripeProductPublic>();\n public readonly currency = input<Currency>(Currency.EUR);\n\n public readonly productSelected = output<StripeProductPublic>();\n public readonly priceSelected = output<StripePricePublic>();\n\n public readonly utils = inject(UtilsService);\n private readonly sanitizer = inject(DomSanitizer);\n\n protected readonly perMonthSuffix = $localize`:@@stripe.product.per_month:/mo`;\n protected readonly perYearSuffix = $localize`:@@stripe.product.per_year:/yr`;\n\n public price = computed(() => this.product().prices.find(price => price.details.currency === this.currency()));\n\n public sanitizedImage = computed(() => {\n const imageUrl = this.product().images?.[0];\n return imageUrl ? this.sanitizer.bypassSecurityTrustUrl(imageUrl) : null;\n });\n\n onSelect() {\n this.productSelected.emit(this.product());\n this.priceSelected.emit(this.price()?.details as StripePricePublic);\n }\n} ","<div class=\"card bg-base-100 shadow-xl max-w-sm mx-auto rounded-3xl w-[350px]\">\n <div class=\"relative\">\n @if (sanitizedImage()) {\n <figure class=\"bg-gradient-to-br from-base-200 to-base-300\">\n <img \n [src]=\"sanitizedImage()\" \n alt=\"{{ product().name }}\" \n class=\"h-64 w-full object-cover p-8 rounded-t-3xl\" />\n </figure>\n } @else {\n <div class=\"h-64 bg-gradient-to-br from-base-200 to-base-300 flex items-center justify-center\">\n <div class=\"text-base-content/50 text-6xl\">📦</div>\n </div>\n }\n </div>\n\n <div class=\"card-body p-6 flex flex-col h-full\">\n <h2 class=\"card-title text-xl font-bold text-base-content\">\n {{ product().name }}\n </h2>\n\n @if (product().description) {\n <p class=\"text-base-content/70 text-sm mb-4 line-clamp-3\">\n {{ product().description }}\n </p>\n }\n\n <div class=\"flex justify-between gap-2\">\n <span class=\"text-xl font-bold text-base-content\">\n @if (price()?.details?.type === 'recurring') {\n {{ utils.formatAmount(price()?.details?.unit_amount ?? 0, price()?.details?.currency ?? 'EUR') }}{{ price()?.recurringInterval === 'month' ? perMonthSuffix : perYearSuffix }}\n } @else {\n {{ utils.formatAmount(price()?.details?.unit_amount ?? 0, price()?.details?.currency ?? 'EUR') }}\n }\n </span>\n\n @if (!product().active) {\n <div class=\"mt-4\">\n <div class=\"badge badge-warning badge-sm\" i18n=\"@@stripe.product.inactive\">Inactive</div>\n </div>\n } @else {\n <button \n class=\"btn btn-primary\"\n (click)=\"onSelect()\"\n i18n=\"@@stripe.product.buy_now\">\n Buy now\n </button>\n }\n </div>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, inject, input, output } from '@angular/core';\nimport { ProductsStore, StripePricePublic, StripeProductPublic } from '../../store/products.store';\nimport { ProductItemSkeletonComponent } from './product-item-skeleton/product-item-skeleton.component';\nimport { ProductItemComponent } from './product-item/product-item.component';\nimport { Currency } from '../../models/currency.model';\n\n@Component({\n selector: 'stripe-product-list',\n standalone: true,\n imports: [CommonModule, ProductItemComponent, ProductItemSkeletonComponent],\n templateUrl: './product-list.component.html'\n})\nexport class ProductListComponent {\n public readonly productsStore = inject(ProductsStore);\n\n public readonly products = input<StripeProductPublic[]>([]);\n public readonly currency = input<Currency>(Currency.EUR);\n\n public readonly productSelected = output<StripeProductPublic>();\n public readonly priceSelected = output<StripePricePublic>();\n\n onProductSelect(product: StripeProductPublic) {\n this.productSelected.emit(product);\n }\n\n onPriceSelect(price: StripePricePublic) {\n this.priceSelected.emit(price);\n }\n} ","@if (productsStore.isStatusLoading()) {\n <div class=\"flex justify-start gap-8\">\n @for (item of [1,2,3]; track item) {\n <lib-product-item-skeleton></lib-product-item-skeleton>\n }\n </div>\n}\n\n@if (productsStore.isStatusError() && !productsStore.isStatusLoading()) {\n <div class=\"alert alert-error\">\n <span>{{ productsStore.error() }}</span>\n </div>\n}\n\n@if (!productsStore.hasProducts() && !productsStore.isStatusLoading()) {\n <div class=\"alert alert-info\">\n <span i18n=\"@@stripe.product.no_products\">No products available</span>\n </div>\n}\n\n@if (productsStore.hasProducts()) {\n <div class=\"flex justify-start gap-8\">\n @for (product of products(); track product.id) {\n <lib-product-item\n [product]=\"product\"\n [currency]=\"currency()\"\n (productSelected)=\"onProductSelect($event)\"\n (priceSelected)=\"onPriceSelect($event)\">\n </lib-product-item>\n }\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { UtilsService } from '../../services/utils.service';\nimport { StripePricePublic, StripeProductPublic } from '../../store/products.store';\nimport { Currency } from '../../models/currency.model';\n\n@Component({\n selector: 'lib-product-item-button',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './product-item-button.component.html'\n})\nexport class ProductItemButtonComponent {\n public readonly product = input.required<StripeProductPublic>();\n public readonly currency = input<Currency>(Currency.EUR);\n public readonly buttonText = input<string>($localize`:@@stripe.product.buy_now:Buy now`);\n public readonly buttonClass = input<string>('btn btn-primary');\n public readonly showPrice = input<boolean>(true);\n public readonly disabled = input<boolean>(false);\n\n public readonly productSelected = output<StripeProductPublic>();\n public readonly priceSelected = output<StripePricePublic>();\n\n public readonly utils = inject(UtilsService);\n\n public readonly price = computed(() => \n this.product().prices.find(price => price.details.currency === this.currency())\n );\n\n public readonly isDisabled = computed(() => \n this.disabled() || !this.product().active\n );\n\n public readonly displayText = computed(() => {\n if (!this.product().active) {\n return $localize`:@@stripe.product.inactive:Inactive`;\n }\n \n if (!this.showPrice()) {\n return this.buttonText();\n }\n\n const priceInfo = this.price();\n if (!priceInfo) {\n return this.buttonText();\n }\n\n const formattedPrice = this.utils.formatAmount(\n priceInfo.details?.unit_amount ?? 0, \n priceInfo.details?.currency ?? 'EUR'\n );\n\n const suffix = priceInfo.details?.type === 'recurring'\n ? priceInfo.recurringInterval === 'month'\n ? $localize`:@@stripe.product.per_month:/mo`\n : $localize`:@@stripe.product.per_year:/yr`\n : '';\n\n return `${this.buttonText()} - ${formattedPrice}${suffix}`;\n });\n\n public onSelect(): void {\n if (this.isDisabled()) {\n return;\n }\n\n this.productSelected.emit(this.product());\n this.priceSelected.emit(this.price()?.details as StripePricePublic);\n }\n}\n","<button \n [class]=\"buttonClass()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onSelect()\">\n {{ displayText() }}\n</button>\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, OnInit } from '@angular/core';\nimport { STRIPE_CONFIG } from '../../config/stripe.config';\nimport { CustomerStore } from '../../store/customer.store';\nimport { SubscriptionsStore } from '../../store/subscriptions.store';\nimport { EmbeddedSkeletonComponent } from '../embedded-skeleton/embedded-skeleton.component';\n\n@Component({\n selector: 'lib-embedded-subscription',\n templateUrl: './embedded-subscription.component.html',\n standalone: true,\n imports: [CommonModule, EmbeddedSkeletonComponent]\n})\nexport class EmbeddedSubscriptionComponent implements OnInit {\n public readonly subscriptionsStore = inject(SubscriptionsStore);\n public readonly customerStore = inject(CustomerStore);\n private readonly stripeConfig = inject(STRIPE_CONFIG);\n\n public readonly priceId = input.required<string>();\n public readonly returnPagePath = input<string>('/subscription-return');\n \n public readonly customer = computed(() => this.customerStore.customer().data);\n\n async ngOnInit() {\n this.createSubscription();\n }\n\n private createSubscription() {\n const base = (\n this.stripeConfig.embeddedCheckoutBaseUrl?.trim() ||\n (typeof window !== 'undefined' ? window.location.origin : '')\n ).replace(/\\/$/, '');\n const path = this.returnPagePath();\n const returnPath = path.startsWith('/') ? `${base}${path}` : `${base}/${path}`;\n this.subscriptionsStore.createSubscription(this.priceId(), returnPath, this.customer());\n }\n\n ngOnDestroy() {\n this.subscriptionsStore.destroyEmbeddedSubscription();\n }\n} ","<div class=\"checkout-container\">\n @if (subscriptionsStore.isStatusLoading()) {\n <lib-embedded-skeleton />\n }\n \n @if (subscriptionsStore.isStatusError()) {\n <div class=\"error\">\n <p><span i18n=\"@@stripe.common.error_label\">Error:</span> {{ subscriptionsStore.error() }}</p>\n </div>\n }\n <div id=\"embedded-checkout\"></div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, OnInit, computed, inject, input } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CheckoutStore } from '../../../store/checkout.store';\nimport { SubscriptionsStore } from '../../../store/subscriptions.store';\n\n@Component({\n selector: 'lib-subscription-return-page',\n templateUrl: './subscription-return-page.component.html',\n standalone: true,\n imports: [CommonModule],\n})\nexport class SubscriptionReturnPageComponent implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n\n public readonly checkoutStore = inject(CheckoutStore);\n public readonly subscriptionsStore = inject(SubscriptionsStore);\n\n public readonly sessionStatus = computed(() => this.checkoutStore.sessionStatus());\n \n public readonly returnUrl = input<string>('/');\n \n async ngOnInit() {\n this.route.queryParams.subscribe(async params => {\n const sessionId = params['session_id'];\n this.getSessionStatus(sessionId);\n });\n }\n\n private async getSessionStatus(sessionId: string) {\n if (sessionId) {\n await this.checkoutStore.getSessionStatus({ sessionId });\n } else {\n console.error('Missing session_id parameter in URL');\n }\n }\n \n public navigate(): void {\n this.router.navigateByUrl(this.returnUrl());\n }\n} ","<div class=\"flex justify-center min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 p-4\">\n <div class=\"hero-content text-center max-w-md\">\n <div class=\"card w-full bg-base-100 shadow-2xl\">\n <div class=\"card-body items-center text-center\">\n <div class=\"mb-6\">\n <div class=\"avatar\">\n <div class=\"w-24 h-24 rounded-full bg-success/10 flex items-center justify-center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-full w-full text-success\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n </div>\n </div>\n </div>\n\n @if (checkoutStore.isStatusLoading()) {\n <div class=\"flex flex-col items-center gap-4 mb-6\">\n <span class=\"loading loading-spinner loading-lg text-primary\"></span>\n <div class=\"alert alert-info\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" class=\"stroke-current shrink-0 w-6 h-6\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"></path>\n </svg>\n <span i18n=\"@@stripe.subscription.loading_details\">Loading subscription details...</span>\n </div>\n </div>\n } @else if (checkoutStore.isStatusError()) {\n <div class=\"alert alert-error mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span>{{ subscriptionsStore.error() }}</span>\n </div>\n } @else if (checkoutStore.isPaymentComplete()) {\n\n <h2 class=\"card-title text-3xl font-bold text-base-content mb-2\">{{ sessionStatus()?.amount_total }}</h2>\n\n <div class=\"alert alert-success mb-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span class=\"font-medium\" i18n=\"@@stripe.subscription.return.active\">Your subscription is active and ready to use.</span>\n </div>\n\n <div class=\"bg-base-200 rounded-lg p-4 mb-6 w-full\">\n <h3 class=\"font-semibold text-sm text-base-content/80 mb-3\" i18n=\"@@stripe.subscription.return.benefits_title\">Included benefits:</h3>\n <ul class=\"space-y-2\">\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n <span i18n=\"@@stripe.subscription.return.benefit_full_access\">Full access to all features</span>\n </li>\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n <span i18n=\"@@stripe.subscription.return.benefit_support\">24/7 priority support</span>\n </li>\n <li class=\"flex items-center text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-success mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n </svg>\n <span i18n=\"@@stripe.subscription.return.benefit_updates\">Automatic updates</span>\n </li>\n </ul>\n </div>\n }\n\n <div class=\"card-actions justify-center w-full\">\n <button class=\"btn btn-primary btn-wide\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-5 w-5 mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6\"\n />\n </svg>\n <span i18n=\"@@stripe.subscription.return.go_dashboard\">Go to dashboard</span>\n </button>\n </div>\n\n <div class=\"text-center mt-4\">\n <p class=\"text-xs text-base-content/50\">\n <span i18n=\"@@stripe.subscription.return.need_help\">Need help?</span>\n <a href=\"#\" class=\"link link-primary\" i18n=\"@@stripe.subscription.return.contact_support\">Contact support</a>\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>\n","import { Directive, ElementRef, input, effect } from '@angular/core';\nimport type { Stripe as StripeTypes } from 'stripe';\n\n@Directive({\n selector: '[ngxBrandIcon]',\n standalone: true\n})\nexport class BrandIconDirective {\n public readonly paymentMethod = input.required<StripeTypes.PaymentMethod>({ alias: 'ngxBrandIcon' });\n\n constructor(private readonly el: ElementRef<HTMLElement>) {\n\n effect(() => {\n const icon = this.getBrandIcon();\n this.el.nativeElement.textContent = icon;\n });\n }\n\n private getBrandIcon(): string {\n const brand = this.paymentMethod().card?.brand;\n const brandIcons: Record<string, string> = {\n 'visa': '💳',\n 'mastercard': '💳', \n 'amex': '💳',\n 'discover': '💳',\n 'diners': '💳',\n 'jcb': '💳',\n 'unionpay': '💳',\n 'unknown': '💳'\n };\n return brandIcons[brand || 'unknown'] || '💳';\n }\n}\n","import { Directive, ElementRef, input, effect } from '@angular/core';\nimport type { Stripe as StripeTypes } from 'stripe';\n\n@Directive({\n selector: '[ngxBrandName]',\n standalone: true\n})\nexport class BrandNameDirective {\n public readonly paymentMethod = input.required<StripeTypes.PaymentMethod>({ alias: 'ngxBrandName' });\n\n constructor(private readonly el: ElementRef<HTMLElement>) {\n\n effect(() => {\n const name = this.getBrandName();\n this.el.nativeElement.textContent = name;\n });\n }\n\n private getBrandName(): string {\n const brand = this.paymentMethod().card?.brand;\n const brandNames: Record<string, string> = {\n 'visa': 'Visa',\n 'mastercard': 'Mastercard',\n 'amex': 'American Express',\n 'discover': 'Discover',\n 'diners': 'Diners Club',\n 'jcb': 'JCB',\n 'unionpay': 'UnionPay',\n 'unknown': 'Tarjeta'\n };\n return brandNames[brand || 'unknown'] || 'Tarjeta';\n }\n}\n","import { Directive, ElementRef, input, effect } from '@angular/core';\nimport type { Stripe as StripeTypes } from 'stripe';\n\n@Directive({\n selector: '[ngxPaymentMethodType]',\n standalone: true\n})\nexport class PaymentMethodTypeDirective {\n public readonly paymentMethod = input.required<StripeTypes.PaymentMethod>({ alias: 'ngxPaymentMethodType' });\n\n constructor(private readonly el: ElementRef<HTMLElement>) {\n\n effect(() => {\n const type = this.getPaymentMethodType();\n this.el.nativeElement.textContent = type;\n });\n }\n\n private getPaymentMethodType(): string {\n const typeNames: Record<string, string> = {\n 'card': 'Tarjeta',\n 'paypal': 'PayPal',\n 'klarna': 'Klarna',\n 'afterpay_clearpay': 'Afterpay',\n 'alipay': 'Alipay',\n 'bancontact': 'Bancontact',\n 'eps': 'EPS',\n 'giropay': 'Giropay',\n 'ideal': 'iDEAL',\n 'p24': 'Przelewy24',\n 'sepa_debit': 'SEPA Direct Debit',\n 'sofort': 'Sofort',\n 'wechat_pay': 'WeChat Pay'\n };\n return typeNames[this.paymentMethod().type] || 'Método de pago';\n }\n}\n","import { Component, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport type { Stripe as StripeTypes } from 'stripe';\nimport { BrandIconDirective } from '../../../directives/brand-icon.directive';\nimport { BrandNameDirective } from '../../../directives/brand-name.directive';\nimport { PaymentMethodTypeDirective } from '../../../directives/payment-method-type.directive';\n\nexport type PaymentMethodDisplayMode = 'detailed' | 'compact';\n\n@Component({\n selector: 'ngx-payment-method',\n standalone: true,\n imports: [CommonModule, BrandIconDirective, BrandNameDirective, PaymentMethodTypeDirective],\n templateUrl: './payment-method.component.html'\n})\nexport class PaymentMethodComponent {\n public readonly paymentMethod = input.required<StripeTypes.PaymentMethod>();\n public readonly mode = input<PaymentMethodDisplayMode>('detailed');\n\n public get last4(): string {\n return this.paymentMethod().card?.last4 || '****';\n }\n\n public get expirationDate(): string {\n const card = this.paymentMethod().card;\n if (!card?.exp_month || !card?.exp_year) return '';\n return `${card.exp_month.toString().padStart(2, '0')}/${card.exp_year.toString().slice(-2)}`;\n }\n\n public get holderName(): string {\n return this.paymentMethod().billing_details?.name || 'N/A';\n }\n\n public get isExpired(): boolean {\n const card = this.paymentMethod().card;\n if (!card?.exp_month || !card?.exp_year) return false;\n \n const now = new Date();\n const expDate = new Date(card.exp_year, card.exp_month - 1);\n return expDate < now;\n }\n\n public get cardFunding(): string | undefined {\n return this.paymentMethod().card?.funding;\n }\n\n public get cardCountry(): string | undefined {\n return this.paymentMethod().card?.country || undefined;\n }\n\n public get billingEmail(): string | undefined {\n return this.paymentMethod().billing_details?.email || undefined;\n }\n\n public get billingPhone(): string | undefined {\n return this.paymentMethod().billing_details?.phone || undefined;\n }\n\n public get billingAddress() {\n return this.paymentMethod().billing_details?.address;\n }\n}\n","<!-- Detailed Version -->\n@if (mode() === 'detailed') {\n <div class=\"w-full max-w-md mx-auto\">\n <!-- Stack of Credit Cards -->\n <div class=\"stack w-full h-56\">\n <div class=\"bg-gradient-to-br from-primary to-accent text-neutral-content relative place-content-center rounded-box\">\n <div class=\"card-body p-6 relative z-10\">\n <!-- Card Header -->\n <div class=\"flex justify-between items-start mb-6\">\n <div class=\"flex items-center gap-2\">\n <div class=\"font-bold text-lg text-primary-content\" [ngxBrandName]=\"paymentMethod()\"></div>\n @if (cardCountry) {\n <div class=\"text-xs text-primary-content/60 uppercase\">{{ cardCountry }}</div>\n }\n @if (isExpired) {\n <div class=\"badge badge-error badge-sm animate-pulse\" i18n=\"@@stripe.payment_method.expired\">Expired</div>\n }\n </div>\n </div>\n\n <!-- Card Number -->\n <div class=\"mb-6\">\n <div class=\"font-mono text-xl tracking-wider text-primary-content\">\n **** **** **** {{ last4 }}\n </div>\n </div>\n\n <!-- Card Bottom Info -->\n <div class=\"flex justify-start items-end\">\n <div class=\"flex-1\">\n <div class=\"text-xs text-primary-content/60 mb-1\" i18n=\"@@stripe.payment_method.cardholder\">CARDHOLDER</div>\n <div class=\"font-medium text-sm text-primary-content truncate max-w-32\">{{ holderName }}</div>\n </div>\n \n @if (expirationDate) {\n <div class=\"flex-1\">\n <div class=\"text-xs text-primary-content/60 mb-1\" i18n=\"@@stripe.payment_method.valid_thru\">VALID THRU</div>\n <div class=\"font-mono text-sm text-primary-content\">{{ expirationDate }}</div>\n </div>\n }\n </div>\n </div>\n\n <!-- Card Background Pattern -->\n <div class=\"absolute inset-0 opacity-20\">\n <div class=\"absolute top-4 right-4 w-20 h-20 rounded-full bg-primary-content/30\"></div>\n <div class=\"absolute bottom-4 left-4 w-16 h-16 rounded-full bg-primary-content/20\"></div>\n <div class=\"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-32 h-32 rounded-full bg-primary-content/10\"></div>\n </div>\n </div>\n <div class=\"bg-secondary grid place-content-center rounded-box\"></div>\n <div class=\"bg-accent grid place-content-center rounded-box\"></div>\n </div>\n\n <!-- Additional Information Below Cards -->\n <div class=\"mt-6 space-y-4\">\n <!-- Billing Information -->\n @if (billingEmail || billingPhone) {\n <div class=\"card bg-base-100 shadow-sm border border-base-200\">\n <div class=\"card-body p-4\">\n <h4 class=\"card-title text-sm mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z\" />\n </svg>\n <span i18n=\"@@stripe.payment_method.contact_info\">Contact information</span>\n </h4>\n \n <div class=\"space-y-2\">\n @if (billingEmail) {\n <div class=\"flex items-center gap-2 text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-base-content/60\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207\" />\n </svg>\n <span class=\"text-base-content/70\">{{ billingEmail }}</span>\n </div>\n }\n \n @if (billingPhone) {\n <div class=\"flex items-center gap-2 text-sm\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 text-base-content/60\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z\" />\n </svg>\n <span class=\"text-base-content/70\">{{ billingPhone }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Billing Address -->\n @if (billingAddress && (billingAddress.line1 || billingAddress.city)) {\n <div class=\"card bg-base-100 shadow-sm border border-base-200\">\n <div class=\"card-body p-4\">\n <h4 class=\"card-title text-sm mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 11a3 3 0 11-6 0 3 3 0 016 0z\" />\n </svg>\n <span i18n=\"@@stripe.payment_method.billing_address\">Billing address</span>\n </h4>\n \n <div class=\"text-sm text-base-content/70 space-y-1\">\n @if (billingAddress.line1) {\n <div>{{ billingAddress.line1 }}</div>\n @if (billingAddress.line2) {\n <div>{{ billingAddress.line2 }}</div>\n }\n }\n \n <div class=\"flex gap-2 flex-wrap\">\n @if (billingAddress.city) {\n <span>{{ billingAddress.city }}</span>\n }\n @if (billingAddress.postal_code) {\n <span>{{ billingAddress.postal_code }}</span>\n }\n @if (billingAddress.country) {\n <span class=\"uppercase\">{{ billingAddress.country }}</span>\n }\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Card Creation Date -->\n <div class=\"flex items-center justify-between text-sm text-base-content/60 px-2\">\n <span i18n=\"@@stripe.payment_method.added_on\">Payment method added:</span>\n <span>{{ paymentMethod().created * 1000 | date:'short' }}</span>\n </div>\n </div>\n </div>\n}\n\n<!-- Compact Version -->\n@if (mode() === 'compact') {\n <div class=\"flex items-center gap-2\">\n <div class=\"flex-1 min-w-0\">\n <div class=\"flex items-center gap-2\">\n <span class=\"font-medium\" [ngxBrandName]=\"paymentMethod()\"></span>\n <span class=\"text-base-content/70\">•••• {{ last4 }}</span>\n @if (paymentMethod().type === 'card' && expirationDate) {\n <span class=\"text-base-content/70 text-sm\">{{ expirationDate }}</span>\n }\n </div>\n </div>\n\n @if (isExpired) {\n <div class=\"badge badge-error badge-sm animate-pulse\" i18n=\"@@stripe.payment_method.expired\">Expired</div>\n } @else {\n <div class=\"badge badge-success badge-sm\" i18n=\"@@stripe.payment_method.active\">Active</div>\n }\n </div>\n}\n","import { Component, inject, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { StripePaymentIntentsPublic } from '../../../../store/customer.store';\nimport { UtilsService } from '../../../../services/utils.service';\nimport { PaymentMethodComponent } from '../../payment-method/payment-method.component';\n\n@Component({\n selector: 'lib-payment-intents-dialog',\n standalone: true,\n imports: [CommonModule, PaymentMethodComponent],\n templateUrl: './payment-intents-dialog.component.html'\n})\nexport class PaymentIntentsDialogComponent {\n public readonly paymentIntent = input.required<StripePaymentIntentsPublic>();\n public readonly dialogId = input.required<string>();\n \n public readonly utils = inject(UtilsService);\n\n protected readonly liveModeLabel = $localize`:@@stripe.payment_intents.mode.live:Live`;\n protected readonly testModeLabel = $localize`:@@stripe.payment_intents.mode.test:Test`;\n protected readonly notAvailableLabel = $localize`:@@stripe.common.not_available:N/A`;\n}\n","<dialog [id]=\"dialogId()\" class=\"modal\">\n <div class=\"modal-box max-w-2xl\">\n <h3 class=\"font-bold text-lg mb-4\" i18n=\"@@stripe.payment_intents.dialog_title\">Payment intent details</h3>\n \n <div class=\"flex items-center gap-3 mb-6 p-4 bg-base-200 rounded-lg\">\n <div class=\"flex-1\">\n <div class=\"text-3xl font-bold text-primary\">\n {{ utils.formatAmount(paymentIntent().amount ?? 0, paymentIntent().currency ?? 'EUR') }}\n </div>\n <div class=\"text-sm text-base-content/70\">\n {{ (paymentIntent().currency ?? 'EUR').toUpperCase() }}\n </div>\n </div>\n <div class=\"flex gap-2\">\n <div class=\"badge {{ utils.getStatusBadgeClass(paymentIntent().status) }}\">\n {{ utils.translateStripeStatus(paymentIntent().status) }}\n </div>\n @if (!paymentIntent().liveMode) {\n <div class=\"badge badge-warning\" i18n=\"@@stripe.payment_intents.mode.test\">TEST</div>\n }\n </div>\n </div>\n\n <div class=\"space-y-6\">\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.transaction_details\">Transaction details</span>\n </h4>\n \n <div class=\"grid grid-cols-1 sm:grid-cols-2 gap-3\">\n <div class=\"stat bg-base-200 rounded-lg p-3\">\n <div class=\"stat-title text-xs\" i18n=\"@@stripe.payment_intents.table.status\">Status</div>\n <div class=\"stat-value text-sm capitalize\">{{ utils.translateStripeStatus(paymentIntent().status) }}</div>\n <div class=\"stat-desc\">{{ paymentIntent().liveMode ? liveModeLabel : testModeLabel }}</div>\n </div>\n \n <div class=\"stat bg-base-200 rounded-lg p-3\">\n <div class=\"stat-title text-xs\" i18n=\"@@stripe.payment_intents.table.amount\">Amount</div>\n <div class=\"stat-value text-sm\">{{ utils.formatAmount(paymentIntent().amount ?? 0, paymentIntent().currency ?? 'EUR') }}</div>\n <div class=\"stat-desc\">{{ (paymentIntent().currency ?? 'EUR').toUpperCase() }}</div>\n </div>\n </div>\n\n <div class=\"mt-3 flex items-center gap-2 text-sm p-2 bg-base-200 rounded\">\n <div class=\"w-2 h-2 bg-success rounded-full\"></div>\n <span class=\"text-base-content/70\" i18n=\"@@stripe.payment_intents.confirmation\">Confirmation:</span>\n <span class=\"capitalize font-medium\">{{ paymentIntent().confirmationMethod.replace('_', ' ') }}</span>\n </div>\n </div>\n\n @if (paymentIntent().paymentMethod) {\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.payment_info\">Payment information</span>\n </h4>\n \n <ngx-payment-method \n [paymentMethod]=\"paymentIntent().paymentMethod!\" \n mode=\"detailed\">\n </ngx-payment-method>\n </div>\n }\n\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.additional_info\">Additional information</span>\n </h4>\n \n <div class=\"space-y-2\">\n @if (paymentIntent().invoiceId) {\n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.invoice\">Invoice</span>\n <span class=\"text-sm font-mono\">{{ paymentIntent().invoiceId.slice(-8) }}</span>\n </div>\n }\n \n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.environment\">Environment</span>\n <span class=\"text-sm\">\n @if (paymentIntent().liveMode) {\n <span class=\"text-success\" i18n=\"@@stripe.payment_intents.mode.live\">Live</span>\n } @else {\n <span class=\"text-warning\" i18n=\"@@stripe.payment_intents.mode.test\">Test</span>\n }\n </span>\n </div>\n \n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.reference\">Reference</span>\n <span class=\"text-sm font-mono\">•••{{ paymentIntent().id?.slice(-6) || notAvailableLabel }}</span>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"modal-action\">\n <form method=\"dialog\">\n <button class=\"btn btn-primary\" i18n=\"@@stripe.common.close\">Close</button>\n </form>\n </div>\n </div>\n</dialog>\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { UtilsService } from '../../../../services/utils.service';\nimport { StripePaymentIntentsPublic } from '../../../../store/customer.store';\nimport { PaymentMethodComponent } from '../../payment-method/payment-method.component';\nimport { PaymentIntentsDialogComponent } from '../payment-intents-dialog/payment-intents-dialog.component';\n\n@Component({\n selector: 'lib-payment-intents-table',\n templateUrl: './payment-intents-table.component.html',\n standalone: true,\n imports: [\n CommonModule,\n PaymentMethodComponent,\n PaymentIntentsDialogComponent\n ]\n})\nexport class PaymentIntentsTableComponent {\n public readonly paymentIntents = input.required<StripePaymentIntentsPublic[]>();\n\n public paymentIntentsTable = computed(() => {\n return this.paymentIntents().map(paymentIntent => ({\n ...paymentIntent,\n selected: false\n }));\n });\n\n public readonly loading = input<boolean>(false);\n public readonly error = input<string | null>(null);\n public readonly withControls = input<boolean>(true);\n \n public readonly exportSelected = output<StripePaymentIntentsPublic[]>();\n public readonly onRefresh = output<void>();\n \n public readonly utils = inject(UtilsService);\n\n protected readonly liveModeLabel = $localize`:@@stripe.payment_intents.mode.live:Live`;\n protected readonly testModeLabel = $localize`:@@stripe.payment_intents.mode.test:Test`;\n \n public readonly hasPaymentIntents = computed(() => \n this.paymentIntents() && this.paymentIntents().length > 0\n );\n \n protected readonly trackByPaymentIntentId = (index: number, item: StripePaymentIntentsPublic) => item.id;\n \n public refreshPaymentIntents(): void {\n this.onRefresh.emit();\n }\n\n public allPaymentIntentsSelected(): boolean {\n return this.paymentIntentsTable().every(paymentIntent => paymentIntent.selected);\n }\n\n public somePaymentIntentsSelected(): boolean {\n return this.paymentIntentsTable().some(paymentIntent => paymentIntent.selected);\n }\n\n public toggleAllPaymentIntents(event: Event): void {\n const checkbox = event.target as HTMLInputElement;\n const isChecked = checkbox.checked;\n this.paymentIntentsTable().forEach(paymentIntent => {\n paymentIntent.selected = isChecked;\n });\n }\n\n public togglePaymentIntent(event: Event, id: string): void {\n const checkbox = event.target as HTMLInputElement;\n const isChecked = checkbox.checked;\n const paymentIntent = this.paymentIntentsTable().find(paymentIntent => paymentIntent.id === id);\n if (paymentIntent) {\n paymentIntent.selected = isChecked;\n }\n }\n\n public showDetails(id: string): void {\n const modalElement = document.getElementById(`modal-${id}`) as HTMLDialogElement;\n if (modalElement) {\n modalElement.showModal();\n }\n } \n\n public exportSelectedPaymentIntents(): void {\n this.exportSelected.emit(this.paymentIntentsTable().filter(paymentIntent => paymentIntent.selected));\n }\n} ","<div class=\"payment-intents-container\">\n @if (withControls()) {\n <div class=\"controls mb-4 flex justify-between items-center\">\n <div class=\"stats\">\n @if (hasPaymentIntents()) {\n <span class=\"badge badge-soft badge-info\">{{ paymentIntentsTable().length }} <span i18n=\"@@stripe.payment_intents.count_label\">payment intents</span></span>\n }\n </div>\n <div class=\"flex justify-end items-center gap-2\">\n <button class=\"btn btn-sm btn-outline\" (click)=\"refreshPaymentIntents()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 mr-1\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\" />\n </svg>\n <span i18n=\"@@stripe.common.refresh\">Refresh</span>\n </button>\n <button class=\"btn btn-sm btn-primary\" [disabled]=\"!somePaymentIntentsSelected()\" (click)=\"exportSelectedPaymentIntents()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M8.71 7.71L11 5.41V15a1 1 0 0 0 2 0V5.41l2.29 2.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42l-4-4a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-4 4a1 1 0 1 0 1.42 1.42M21 14a1 1 0 0 0-1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4a1 1 0 0 0-2 0v4a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-4a1 1 0 0 0-1-1\"/></svg>\n <span i18n=\"@@stripe.payment_intents.export_selected\">Export selected</span>\n </button>\n </div>\n </div>\n }\n\n @if (loading()) {\n <div class=\"overflow-x-auto\">\n <div class=\"skeleton h-32 w-full\"></div>\n </div>\n } @else if (error()) {\n <div class=\"error-container\">\n <div class=\"alert alert-error\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" /></svg>\n <span>{{ error() }}</span>\n </div>\n </div>\n } @else if (hasPaymentIntents()) {\n <div class=\"overflow-x-auto rounded-box bg-base-100\">\n <table class=\"table table-zebra\">\n <thead>\n <tr>\n <th>\n <label>\n <input type=\"checkbox\" class=\"checkbox\" (change)=\"toggleAllPaymentIntents($event)\" [checked]=\"allPaymentIntentsSelected()\" />\n </label>\n </th>\n <th i18n=\"@@stripe.payment_intents.table.amount\">Amount</th>\n <th i18n=\"@@stripe.payment_intents.table.payment_method\">Payment method</th>\n <th i18n=\"@@stripe.payment_intents.table.status\">Status</th>\n <th i18n=\"@@stripe.payment_intents.table.mode\">Mode</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (paymentIntent of paymentIntentsTable(); track trackByPaymentIntentId(0, paymentIntent)) {\n <tr>\n <th>\n <label>\n <input type=\"checkbox\" class=\"checkbox\" (change)=\"togglePaymentIntent($event, paymentIntent.id ?? '')\" [checked]=\"paymentIntent.selected\" />\n </label>\n </th>\n <td>{{ utils.formatAmount(paymentIntent.amount ?? 0, paymentIntent.currency ?? 'EUR') }}</td>\n <td>\n @if (paymentIntent.paymentMethod) {\n <ngx-payment-method \n [paymentMethod]=\"paymentIntent.paymentMethod!\" \n mode=\"compact\">\n </ngx-payment-method>\n } @else {\n <span class=\"badge badge-outline\">\n {{ paymentIntent.paymentMethodId }}\n </span>\n }\n </td>\n <td>\n <span class=\"badge badge-soft {{ utils.getStatusBadgeClass(paymentIntent.status) }}\">\n {{ utils.translateStripeStatus(paymentIntent.status) }}\n </span>\n </td>\n <td>{{ paymentIntent.liveMode ? liveModeLabel : testModeLabel }}</td>\n <td>\n <button class=\"btn btn-xs btn-ghost\" (click)=\"showDetails(paymentIntent.id ?? '')\" i18n=\"@@stripe.payment_intents.details\">Details</button>\n <lib-payment-intents-dialog \n [paymentIntent]=\"paymentIntent\" \n [dialogId]=\"'modal-' + paymentIntent.id\">\n </lib-payment-intents-dialog>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n } @else {\n <div class=\"empty-state\">\n <div class=\"card bg-base-100 shadow-sm\">\n <div class=\"card-body items-center text-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-12 w-12 text-gray-400 mb-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n <h2 class=\"card-title text-xl\" i18n=\"@@stripe.payment_intents.empty_title\">No recent payment intents</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.payment_intents.empty_description\">No payment intents found in your history.</p>\n </div>\n </div>\n </div>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-subscription-item-skeleton',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './subscription-item-skeleton.component.html',\n})\nexport class SubscriptionItemSkeletonComponent {}","<div class=\"card bg-gradient-to-br from-base-100/10 to-base-200/10 shadow-lg hover:shadow-xl transition-all duration-300 h-[180px]\">\n <div class=\"card-body p-4\">\n <div class=\"flex justify-between\">\n <div>\n <div class=\"flex items-center gap-2\">\n <div class=\"skeleton h-6 w-32\"></div>\n <div class=\"skeleton h-5 w-20\"></div>\n </div>\n <div class=\"skeleton h-4 w-48 mt-2\"></div>\n </div>\n \n <div class=\"flex gap-2\">\n <div class=\"skeleton h-8 w-20\"></div>\n </div>\n </div>\n\n <div class=\"mt-2\">\n <div class=\"flex justify-between text-sm\">\n <div class=\"skeleton h-4 w-32\"></div>\n <div class=\"skeleton h-4 w-32\"></div>\n </div>\n </div>\n\n <!--<div class=\"mt-4 border-t pt-4\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <div>\n <div class=\"skeleton h-5 w-24 mb-2\"></div>\n <div class=\"space-y-1\">\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-3/4\"></div>\n </div>\n </div>\n \n <div>\n <div class=\"skeleton h-5 w-24 mb-2\"></div>\n <div class=\"space-y-1\">\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-3/4\"></div>\n </div>\n </div>\n </div>\n \n <div class=\"card-actions mt-4 justify-end\">\n <div class=\"skeleton h-8 w-32\"></div>\n </div>\n </div>-->\n </div>\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { UtilsService } from '../../../../../services/utils.service';\nimport { PortalAccountStore } from '../../../../../store/portal-account.store';\nimport { StripeSubscriptionPublic, SubscriptionsStore } from '../../../../../store/subscriptions.store';\n\n@Component({\n selector: 'lib-subscription-item',\n templateUrl: './subscription-item.component.html',\n standalone: true,\n imports: [CommonModule],\n})\nexport class SubscriptionItemComponent {\n public readonly subscriptionsStore = inject(SubscriptionsStore);\n public readonly portalAccountStore = inject(PortalAccountStore);\n public readonly utils = inject(UtilsService);\n private readonly sanitizer = inject(DomSanitizer);\n \n public readonly subscription = input.required<StripeSubscriptionPublic>();\n public readonly onManageSubscription = output<string>();\n\n public readonly isStatusLoading = computed(() => this.portalAccountStore.isStatusLoading());\n\n protected readonly subscriptionProductAlt = $localize`:@@stripe.subscription.product_alt:Subscription product`;\n protected readonly subscriptionPlanFallback = $localize`:@@stripe.subscription.plan_fallback:Subscription plan`;\n\n public readonly productImage = computed(() => {\n return this.subscription().product?.images?.[0] || 'https://img.daisyui.com/images/profile/demo/yellingcat@192.webp';\n });\n \n public isExpanded = false;\n \n public toggleExpand(): void {\n this.isExpanded = !this.isExpanded;\n }\n \n public manageSubscription(): void {\n this.onManageSubscription.emit(this.subscription().customer ?? '');\n }\n\n public sanitizeImageUrl(imageUrl: string): SafeUrl {\n return this.sanitizer.bypassSecurityTrustUrl(imageUrl);\n }\n} ","<div class=\"card bg-gradient-to-br from-base-100/10 to-base-200/10 shadow-lg hover:shadow-xl transition-all duration-300\">\n <div class=\"card-body p-4\">\n <!-- Header with title and price -->\n <div class=\"flex justify-between items-start\">\n <div class=\"flex flex-row justify-start items-start gap-3\">\n <!-- Subscription image -->\n <div class=\"avatar\">\n <div class=\"w-24 rounded\">\n <img [src]=\"sanitizeImageUrl(productImage())\" \n [alt]=\"subscription().product?.name || subscriptionProductAlt\"\n class=\"w-full h-full object-cover rounded-lg\" />\n </div>\n </div> \n \n <div class=\"flex flex-col justify-start items-start gap-2\">\n <div class=\"flex flex-row justify-start items-start gap-2\">\n <h3 class=\"text-2xl font-bold text-base-content\">\n {{ subscription().product?.name || subscriptionPlanFallback }}\n </h3>\n <div class=\"flex items-center gap-2 mt-1\">\n <span class=\"badge {{ utils.getStatusBadgeClass(subscription().status) }} badge-xs\">\n {{ utils.translateStripeStatus(subscription().status) }}\n </span>\n @if (subscription().cancel.cancel_at_period_end) {\n <span class=\"badge badge-warning badge-xs\" i18n=\"@@stripe.subscription.canceled_badge\">Canceled</span>\n }\n </div>\n </div>\n <div class=\"flex flex-row justify-start items-start gap-4\">\n <div class=\"flex flex-row justify-start items-center gap-1\">\n <div class=\"text-base-content/70 text-sm font-medium\" i18n=\"@@stripe.subscription.active_until\">Subscription active until:</div>\n <div class=\"text-base-content font-semibold\">\n {{ utils.formatDate(subscription().current_period_end ?? '') }}\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <!-- Main price -->\n <div class=\"text-right\">\n <div class=\"text-2xl font-bold text-primary\">\n {{ utils.formatAmount(subscription().plan.amount, subscription().currency ?? 'EUR') }}\n </div>\n <div class=\"text-base-content/70 text-md capitalize\">\n {{ utils.translateBillingInterval(subscription().plan.interval) }}\n </div>\n </div>\n </div>\n\n <div class=\"flex justify-end w-full\">\n <button class=\"btn btn-primary btn-sm\" [disabled]=\"isStatusLoading()\" (click)=\"manageSubscription()\">\n @if (isStatusLoading()) {\n <span class=\"loading loading-spinner loading-sm\"></span>\n <span i18n=\"@@stripe.common.loading\">Loading...</span>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-5 w-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 12a3 3 0 11-6 0 3 3 0 016 0z\" />\n </svg>\n <span i18n=\"@@stripe.subscription.manage\">Manage subscription</span>\n }\n </button>\n </div>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, input, output } from '@angular/core';\nimport { StripeSubscriptionPublic } from '../../../../store/subscriptions.store';\nimport { SubscriptionItemSkeletonComponent } from './subscription-item-skeleton/subscription-item-skeleton.component';\nimport { SubscriptionItemComponent } from './subscription-item/subscription-item.component';\n\n@Component({\n selector: 'lib-subscriptions-list',\n templateUrl: './subscriptions-list.component.html',\n standalone: true,\n imports: [CommonModule, SubscriptionItemComponent, SubscriptionItemSkeletonComponent],\n})\nexport class SubscriptionsListComponent {\n public readonly subscriptions = input.required<StripeSubscriptionPublic[]>();\n public readonly loading = input<boolean>(false);\n public readonly error = input<string | null>(null);\n public readonly withEmptyState = input<boolean>(true);\n\n public readonly onManageSubscription = output<string>();\n\n public manageSubscription(customerId: string): void {\n this.onManageSubscription.emit(customerId);\n }\n} ","<div class=\"subscriptions-container\">\n @if (loading()) {\n <div class=\"flex flex-col gap-4\">\n @for (item of [1,2,3]; track item) {\n <lib-subscription-item-skeleton></lib-subscription-item-skeleton>\n }\n </div>\n } @else if (error()) {\n <div class=\"error-container\">\n <div class=\"alert alert-error\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" /></svg>\n <span>{{ error() }}</span>\n </div>\n </div>\n } @else if (subscriptions().length > 0) {\n <div class=\"subscriptions-list flex flex-col gap-4\">\n @for (subscription of subscriptions(); track subscription.id) {\n <lib-subscription-item \n [subscription]=\"subscription\"\n (onManageSubscription)=\"manageSubscription($event)\">\n </lib-subscription-item>\n }\n </div>\n } @else if (withEmptyState() && subscriptions().length === 0 && !loading()) {\n <div class=\"empty-state\">\n <div class=\"card bg-base-100 shadow-sm\">\n <div class=\"card-body items-center text-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-12 w-12 text-gray-400 mb-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <h2 class=\"card-title text-xl\" i18n=\"@@stripe.subscription.empty_title\">You have no active subscriptions</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.subscription.empty_description\">Browse our plans to start a subscription.</p>\n </div>\n </div>\n </div>\n }\n</div>\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-subscription-card-skeleton',\n templateUrl: './subscription-card-skeleton.component.html',\n standalone: true\n})\nexport class SubscriptionCardSkeletonComponent {}\n","<div class=\"card bg-base-100 w-96 shadow-sm\">\n <figure class=\"flex items-center justify-center\">\n <div class=\"skeleton h-48 w-full\"></div>\n </figure>\n <div class=\"card-body\">\n <div class=\"flex justify-between items-center\">\n <div class=\"skeleton h-8 w-2/3\"></div>\n <div class=\"skeleton h-6 w-24 rounded-full\"></div>\n </div>\n \n <div class=\"mt-3\">\n <div class=\"skeleton h-4 w-full\"></div>\n <div class=\"skeleton h-4 w-5/6 mt-2\"></div>\n </div>\n \n <div class=\"card-actions justify-end mt-4\">\n <div class=\"skeleton h-10 w-40 rounded-lg\"></div>\n </div>\n </div>\n</div> ","import { CommonModule } from '@angular/common';\nimport { Component, inject, input, output } from '@angular/core';\nimport { StripeSubscriptionPublic } from '../../../../store/subscriptions.store';\nimport { SubscriptionCardSkeletonComponent } from './subscription-card-skeleton/subscription-card-skeleton.component';\nimport { UtilsService } from '../../../../services/utils.service';\n\n@Component({\n selector: 'lib-subscription-card',\n templateUrl: './subscription-card.component.html',\n standalone: true,\n imports: [CommonModule, SubscriptionCardSkeletonComponent],\n})\nexport class SubscriptionCardComponent {\n public readonly subscription = input.required<StripeSubscriptionPublic>();\n public readonly loading = input<boolean>(false);\n public readonly error = input<string | null>(null);\n\n public readonly utils = inject(UtilsService);\n \n public readonly onManageSubscription = output<string>();\n \n public hasValidProductImages(): boolean {\n const subscription = this.subscription();\n return !!subscription?.product && Array.isArray(subscription.product.images) && subscription.product.images.length > 0;\n }\n\n public getProductImage(): string {\n return this.subscription()?.product?.images?.[0] || '';\n }\n\n public getProductName(): string {\n return this.subscription()?.product?.name || '';\n }\n \n /**\n * Emit the customer ID to manage subscription\n */\n public manageSubscription(): void {\n this.onManageSubscription.emit(this.subscription().customer as string);\n }\n} ","@if (loading()) {\n <lib-subscription-card-skeleton></lib-subscription-card-skeleton>\n} @else if (error()) {\n <div class=\"alert alert-error\">{{ error() }}</div>\n} @else if (subscription()) {\n <div class=\"card bg-base-100 w-96 shadow-sm \">\n @if (hasValidProductImages()) {\n <figure class=\"flex items-center justify-center\">\n <img [src]=\"getProductImage()\" [alt]=\"getProductName()\" class=\"h-48 w-full object-cover\" />\n </figure>\n }\n <div class=\"card-body\">\n <div class=\"flex justify-between items-center\">\n <h2 class=\"card-title\">{{ getProductName() }}</h2>\n <span class=\"badge badge-soft {{ utils.getStatusBadgeClass(subscription().status) }} subscription-status\">\n {{ utils.translateStripeStatus(subscription().status) }}\n </span>\n </div>\n \n <div class=\"mt-3\">\n <p class=\"opacity-75\">{{ subscription().product?.description }}</p>\n </div>\n \n <div class=\"card-actions justify-end\">\n <button class=\"btn btn-primary\" (click)=\"manageSubscription()\" i18n=\"@@stripe.subscription.manage\">Manage subscription</button>\n </div>\n </div>\n </div>\n}\n","import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-payment-intent-item-skeleton',\n templateUrl: './payment-intent-item-skeleton.component.html',\n standalone: true,\n imports: [CommonModule]\n})\nexport class PaymentIntentItemSkeletonComponent {} ","<div class=\"card bg-base-100 shadow-sm card-skeleton\">\n <div class=\"card-body p-4\">\n <!-- Header with status and expand button -->\n <div class=\"flex justify-between\">\n <div class=\"w-full\">\n <div class=\"flex items-center\">\n <!-- Title/Status placeholder -->\n <div class=\"skeleton w-32 h-6 rounded-md\"></div>\n <!-- Badge placeholder -->\n <div class=\"skeleton w-24 h-6 ml-2 rounded-full\"></div>\n </div>\n <!-- Customer ID placeholder -->\n <div class=\"skeleton w-48 h-4 mt-2 rounded-md\"></div>\n </div>\n \n <!-- Details button placeholder -->\n <div class=\"skeleton w-20 h-8 rounded-md\"></div>\n </div>\n\n <!-- Payment details summary -->\n <div class=\"flex justify-between mt-3\">\n <div>\n <!-- Amount placeholder -->\n <div class=\"skeleton w-32 h-8 rounded-md\"></div>\n </div>\n <div>\n <!-- Date placeholder -->\n <div class=\"skeleton w-28 h-6 rounded-md\"></div>\n </div>\n </div>\n \n <!-- Optional expanded details placeholder -->\n <div class=\"mt-4 border-t pt-4\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <div>\n <!-- Details heading placeholder -->\n <div class=\"skeleton w-36 h-5 mb-3 rounded-md\"></div>\n \n <!-- List items placeholders -->\n <div class=\"space-y-2\">\n <div class=\"skeleton w-full h-4 rounded-md\"></div>\n <div class=\"skeleton w-full h-4 rounded-md\"></div>\n <div class=\"skeleton w-3/4 h-4 rounded-md\"></div>\n </div>\n </div>\n \n <div>\n <!-- Second column heading placeholder -->\n <div class=\"skeleton w-36 h-5 mb-3 rounded-md\"></div>\n \n <!-- List items placeholders -->\n <div class=\"space-y-2\">\n <div class=\"skeleton w-full h-4 rounded-md\"></div>\n <div class=\"skeleton w-2/3 h-4 rounded-md\"></div>\n </div>\n </div>\n </div>\n \n <!-- Action button placeholder -->\n <div class=\"flex justify-end mt-4\">\n <div class=\"skeleton w-36 h-10 rounded-md\"></div>\n </div>\n </div>\n </div>\n</div> ","import { CommonModule } from '@angular/common';\nimport { Component, inject, input, signal } from '@angular/core';\nimport { StripePaymentIntentsPublic } from '../../../../../store/customer.store';\nimport { UtilsService } from '../../../../../services/utils.service';\nimport { PaymentMethodComponent } from '../../../payment-method/payment-method.component';\n\n@Component({\n selector: 'lib-payment-intent-item',\n templateUrl: './payment-intent-item.component.html',\n standalone: true,\n imports: [CommonModule, PaymentMethodComponent]\n})\nexport class PaymentIntentItemComponent {\n public readonly paymentIntent = input.required<StripePaymentIntentsPublic>();\n \n public readonly utils = inject(UtilsService);\n\n protected readonly liveModeLabel = $localize`:@@stripe.payment_intents.mode.live:Live`;\n protected readonly testModeLabel = $localize`:@@stripe.payment_intents.mode.test:Test`;\n protected readonly notAvailableLabel = $localize`:@@stripe.common.not_available:N/A`;\n \n public readonly isExpanded = signal(false);\n \n public toggleExpand(): void {\n this.isExpanded.update(value => !value);\n }\n} ","<div class=\"card bg-base-100 shadow-sm hover:shadow-md transition-all duration-200 border border-base-200\">\n <div class=\"card-body p-4\">\n \n <!-- Header Section -->\n <div class=\"flex justify-between items-start mb-3\">\n <div class=\"flex-1\">\n <div class=\"flex items-center gap-2 mb-1\">\n <div class=\"text-2xl font-bold text-primary\">\n {{ utils.formatAmount(paymentIntent().amount ?? 0, paymentIntent().currency ?? 'EUR') }}\n </div>\n <div class=\"badge {{ utils.getStatusBadgeClass(paymentIntent().status) }} badge-sm\">\n {{ utils.translateStripeStatus(paymentIntent().status) }}\n </div>\n @if (!paymentIntent().liveMode) {\n <div class=\"badge badge-warning badge-sm\" i18n=\"@@stripe.payment_intents.mode.test\">TEST</div>\n }\n </div>\n </div>\n \n <button \n class=\"btn btn-sm btn-ghost btn-circle\" \n (click)=\"toggleExpand()\"\n [class.rotate-180]=\"isExpanded()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 transition-transform duration-200\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M19 9l-7 7-7-7\" />\n </svg>\n </button>\n </div>\n\n <!-- Main Info Section -->\n <div class=\"space-y-2\">\n @if (paymentIntent().paymentMethod) {\n <ngx-payment-method \n [paymentMethod]=\"paymentIntent().paymentMethod!\" \n mode=\"compact\">\n </ngx-payment-method>\n } @else {\n <div class=\"flex items-center gap-2 p-2 bg-base-200 rounded-lg\">\n <div class=\"w-8 h-8 bg-base-300 rounded-full flex items-center justify-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n </div>\n <div>\n <div class=\"font-medium text-sm\" i18n=\"@@stripe.payment_intents.payment_method\">Payment method</div>\n <div class=\"text-xs text-base-content/70\">•••• {{ paymentIntent().paymentMethodId.slice(-4) }}</div>\n </div>\n </div>\n }\n\n <div class=\"flex items-center gap-2 text-sm\">\n <div class=\"w-2 h-2 bg-success rounded-full\"></div>\n <span class=\"text-base-content/70\" i18n=\"@@stripe.payment_intents.confirmation\">Confirmation:</span>\n <span class=\"capitalize font-medium\">{{ paymentIntent().confirmationMethod.replace('_', ' ') }}</span>\n </div>\n </div>\n\n @if (isExpanded()) {\n <div class=\"divider my-4\"></div>\n \n <div class=\"space-y-4\">\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.transaction_details\">Transaction details</span>\n </h4>\n \n <div class=\"grid grid-cols-1 sm:grid-cols-2 gap-3\">\n <div class=\"stat bg-base-200 rounded-lg p-3\">\n <div class=\"stat-title text-xs\" i18n=\"@@stripe.payment_intents.table.status\">Status</div>\n <div class=\"stat-value text-sm capitalize\">{{ utils.translateStripeStatus(paymentIntent().status) }}</div>\n <div class=\"stat-desc\">{{ paymentIntent().liveMode ? liveModeLabel : testModeLabel }}</div>\n </div>\n \n <div class=\"stat bg-base-200 rounded-lg p-3\">\n <div class=\"stat-title text-xs\" i18n=\"@@stripe.payment_intents.table.amount\">Amount</div>\n <div class=\"stat-value text-sm\">{{ utils.formatAmount(paymentIntent().amount ?? 0, paymentIntent().currency ?? 'EUR') }}</div>\n <div class=\"stat-desc\">{{ (paymentIntent().currency ?? 'EUR').toUpperCase() }}</div>\n </div>\n </div>\n </div>\n\n @if (paymentIntent().paymentMethod) {\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.payment_info\">Payment information</span>\n </h4>\n \n <ngx-payment-method \n [paymentMethod]=\"paymentIntent().paymentMethod!\" \n mode=\"detailed\">\n </ngx-payment-method>\n </div>\n }\n\n <div>\n <h4 class=\"text-sm font-semibold text-base-content/80 mb-3 flex items-center gap-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z\" />\n </svg>\n <span i18n=\"@@stripe.payment_intents.additional_info\">Additional information</span>\n </h4>\n \n <div class=\"space-y-2\">\n @if (paymentIntent().invoiceId) {\n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.invoice\">Invoice</span>\n <span class=\"text-sm font-mono\">{{ paymentIntent().invoiceId.slice(-8) }}</span>\n </div>\n }\n \n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.environment\">Environment</span>\n <span class=\"text-sm\">\n @if (paymentIntent().liveMode) {\n <span class=\"text-success\" i18n=\"@@stripe.payment_intents.mode.live\">Live</span>\n } @else {\n <span class=\"text-warning\" i18n=\"@@stripe.payment_intents.mode.test\">Test</span>\n }\n </span>\n </div>\n \n <div class=\"flex items-center justify-between p-2 bg-base-200 rounded\">\n <span class=\"text-sm text-base-content/70\" i18n=\"@@stripe.payment_intents.reference\">Reference</span>\n <span class=\"text-sm font-mono\">•••{{ paymentIntent().id?.slice(-6) || notAvailableLabel }}</span>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, input, output } from '@angular/core';\nimport { StripePaymentIntentsPublic } from '../../../../store/customer.store';\nimport { PaymentIntentItemSkeletonComponent } from './payment-intents-item-skeleton/payment-intent-item-skeleton.component';\nimport { PaymentIntentItemComponent } from './payment-intents-item/payment-intent-item.component';\n\n@Component({\n selector: 'lib-payment-intents-list',\n templateUrl: './payment-intents-list.component.html',\n standalone: true,\n imports: [\n CommonModule,\n PaymentIntentItemSkeletonComponent,\n PaymentIntentItemComponent\n ]\n})\nexport class PaymentIntentsListComponent {\n public readonly paymentIntents = input.required<StripePaymentIntentsPublic[]>();\n public readonly loading = input<boolean>(false);\n public readonly error = input<string | null>(null);\n public readonly withControls = input<boolean>(true);\n \n public readonly onRefresh = output<void>();\n \n protected readonly trackByPaymentIntentId = (index: number, item: StripePaymentIntentsPublic) => item.id;\n \n public refreshPaymentIntents(): void {\n this.onRefresh.emit();\n }\n} ","<div class=\"payment-intents-container\">\n @if (withControls()) {\n <div class=\"controls mb-4 flex justify-between items-center\">\n <div class=\"stats\">\n @if (paymentIntents().length > 0) {\n <span class=\"badge badge-soft badge-info\">{{ paymentIntents().length }} <span i18n=\"@@stripe.payment_intents.count_label\">payment intents</span></span>\n }\n </div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"refreshPaymentIntents()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 mr-1\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\" />\n </svg>\n <span i18n=\"@@stripe.common.refresh\">Refresh</span>\n </button>\n </div>\n }\n\n @if (loading()) {\n <div class=\"flex flex-col gap-4\">\n @for (item of [1,2,3]; track item) {\n <lib-payment-intent-item-skeleton></lib-payment-intent-item-skeleton>\n }\n </div>\n } @else if (error()) {\n <div class=\"error-container\">\n <div class=\"alert alert-error\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"stroke-current shrink-0 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" /></svg>\n <span>{{ error() }}</span>\n </div>\n </div>\n } @else if (paymentIntents().length > 0) {\n <div class=\"flex flex-col gap-4\">\n @for (paymentIntent of paymentIntents(); track paymentIntent.id) {\n <lib-payment-intent-item [paymentIntent]=\"paymentIntent\"></lib-payment-intent-item>\n }\n </div>\n } @else {\n <div class=\"empty-state\">\n <div class=\"card bg-base-100 shadow-sm\">\n <div class=\"card-body items-center text-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-12 w-12 text-gray-400 mb-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n <h2 class=\"card-title text-xl\" i18n=\"@@stripe.payment_intents.empty_title\">No recent payment intents</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.payment_intents.empty_description\">No payment intents found in your history.</p>\n </div>\n </div>\n </div>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, inject, input } from '@angular/core';\nimport { CustomerStore } from '../../../store/customer.store';\nimport { PortalAccountStore } from '../../../store/portal-account.store';\nimport { SubscriptionCardComponent } from './subscription-card/subscription-card.component';\nimport { SubscriptionsListComponent } from './subscriptions-list/subscriptions-list.component';\n\n@Component({\n selector: 'lib-subscriptions',\n templateUrl: './subscriptions.component.html',\n standalone: true,\n imports: [CommonModule, SubscriptionCardComponent, SubscriptionsListComponent],\n})\nexport class SubscriptionsComponent {\n public readonly customerStore = inject(CustomerStore);\n public readonly portalAccountStore = inject(PortalAccountStore);\n\n public readonly returnUrl = input<string>(window.location.origin + '/account');\n\n public manageSubscription(customerId: string): void {\n this.portalAccountStore.createPortalSession(customerId, this.returnUrl());\n }\n\n public refreshSubscriptions(): void {\n if (this.customerStore.customer().data?.id) {\n this.customerStore.loadSubscriptions(this.customerStore.customer().data?.id as string);\n }\n }\n}\n\n","<div class=\"mb-4 flex flex-col justify-between items-center\">\n <div class=\"mb-6 w-full\">\n <h2 class=\"text-2xl font-bold text-gray-800\" i18n=\"@@stripe.subscription.title\">Subscriptions</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.subscription.description\">Manage your subscriptions and payments in one place</p>\n </div>\n <div class=\"controls mb-4 flex justify-between items-center w-full\">\n <div class=\"stats\">\n @if (customerStore.subscriptions.data().length > 0) {\n <span class=\"badge badge-soft badge-info\">{{ customerStore.subscriptions.data().length }} <span i18n=\"@@stripe.subscription.count_label\">subscriptions</span></span>\n }\n </div>\n <button class=\"btn btn-sm btn-outline\" (click)=\"refreshSubscriptions()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-4 w-4 mr-1\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\" />\n </svg>\n <span i18n=\"@@stripe.common.refresh\">Refresh</span>\n </button>\n </div>\n</div>\n\n<div class=\"flex flex-col gap-4\">\n <lib-subscription-card\n [subscription]=\"customerStore.firstSubscription()\"\n [loading]=\"customerStore.isSubscriptionsStatusLoading()\"\n [error]=\"customerStore.subscriptions.error()\"\n (onManageSubscription)=\"manageSubscription($event)\">\n </lib-subscription-card>\n <lib-subscriptions-list\n [subscriptions]=\"customerStore.restSubscriptions()\"\n [loading]=\"customerStore.isSubscriptionsStatusLoading()\"\n [error]=\"customerStore.subscriptions.error()\"\n [withEmptyState]=\"false\"\n (onManageSubscription)=\"manageSubscription($event)\">\n </lib-subscriptions-list>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, inject, input, signal } from '@angular/core';\nimport { PaymentIntentsListComponent } from '../../components/customer/payment-intents/payment-intents-list/payment-intents-list.component';\nimport { PaymentIntentsTableComponent } from '../../components/customer/payment-intents/payment-intents-table/payment-intents-table.component';\nimport { SubscriptionsComponent } from '../../components/customer/subscriptions/subscriptions.component';\nimport { CustomerStore, StripePaymentIntentsPublic } from '../../store/customer.store';\n\n@Component({\n selector: 'lib-customer-dashboard',\n templateUrl: './customer.component.html',\n standalone: true,\n imports: [\n CommonModule,\n PaymentIntentsListComponent,\n PaymentIntentsTableComponent,\n SubscriptionsComponent\n ]\n}) \nexport class CustomerDashboardComponent {\n public readonly customerStore = inject(CustomerStore);\n\n public readonly returnUrl = input<string>(window.location.origin + '/account');\n \n public readonly customer = computed(() => this.customerStore.customer().data);\n \n public readonly activeTab = signal<'list' | 'table'>('list');\n\n public refreshPaymentIntents(): void {\n this.customerStore.loadPaymentIntents(this.customerStore.customer().data?.id as string);\n }\n \n public setActiveTab(tab: 'list' | 'table'): void {\n this.activeTab.set(tab);\n }\n\n public exportSelectedPaymentIntents(paymentIntents: StripePaymentIntentsPublic[]): void {\n console.log('[💰 CustomerDashboardComponent] exportSelectedPaymentIntents: ', paymentIntents);\n }\n}\n","<div class=\"container flex flex-col gap-6 mx-auto\">\n <!-- Subscriptions Section -->\n <section class=\"flex flex-col\">\n <lib-subscriptions [returnUrl]=\"returnUrl()\"></lib-subscriptions>\n </section>\n\n <!-- Payment Intents Section with Tabs -->\n <section class=\"flex flex-col\">\n <header class=\"mb-4\">\n <h2 class=\"text-2xl font-bold text-gray-800\" i18n=\"@@stripe.customer.payment_intents_title\">Payment Intents</h2>\n <p class=\"text-gray-600\" i18n=\"@@stripe.customer.payment_intents_description\">Payment intents history. Select a tab to see the list or table view.</p>\n </header>\n\n <div role=\"tablist\" class=\"tabs tabs-box w-fit mb-4\">\n <a role=\"tab\" class=\"tab\" [class.tab-active]=\"activeTab() === 'list'\" (click)=\"setActiveTab('list')\" i18n=\"@@stripe.customer.tab_list\">List</a>\n <a role=\"tab\" class=\"tab\" [class.tab-active]=\"activeTab() === 'table'\" (click)=\"setActiveTab('table')\" i18n=\"@@stripe.customer.tab_table\">Table</a>\n </div>\n\n @if (activeTab() === 'list') {\n <lib-payment-intents-list\n [paymentIntents]=\"customerStore.paymentIntents.data()\"\n [loading]=\"customerStore.isPaymentIntentsStatusLoading()\"\n [error]=\"customerStore.paymentIntents.error()\"\n (onRefresh)=\"refreshPaymentIntents()\">\n </lib-payment-intents-list>\n } @else {\n <lib-payment-intents-table\n [paymentIntents]=\"customerStore.paymentIntents.data()\"\n [loading]=\"customerStore.isPaymentIntentsStatusLoading()\"\n [error]=\"customerStore.paymentIntents.error()\"\n (exportSelected)=\"exportSelectedPaymentIntents($event)\"\n (onRefresh)=\"refreshPaymentIntents()\">\n </lib-payment-intents-table>\n }\n </section>\n</div>\n","// Export configurations\nexport * from './lib/config/ngx-supabase-stripe.config';\nexport * from './lib/config/stripe.config';\nexport * from './lib/config/supabase.config';\n\n// Export store\nexport * from './lib/store/checkout.store';\nexport * from './lib/store/products.store';\nexport * from './lib/store/subscriptions.store';\nexport * from './lib/store/customer.store';\nexport * from './lib/store/portal-account.store';\n\n// Export services\nexport * from './lib/services/stripe-client.service';\nexport * from './lib/services/supabase-client.service';\nexport * from './lib/services/products.service';\n\n// Export components\nexport * from './lib/components/embedded-checkout/embedded-checkout.component';\nexport * from './lib/components/embedded-checkout/return-page/return-page.component';\nexport * from './lib/components/product-list/product-list.component';\nexport * from './lib/components/product-item-button/product-item-button.component';\nexport * from './lib/components/embedded-subscription/embedded-subscription.component';\nexport * from './lib/components/embedded-subscription/return-page/subscription-return-page.component';\nexport * from './lib/components/customer/payment-intents/payment-intents-table/payment-intents-table.component';\nexport * from './lib/components/customer/subscriptions/subscriptions-list/subscriptions-list.component';\nexport * from './lib/components/customer/subscriptions/subscription-card/subscription-card.component';\nexport * from './lib/components/customer/subscriptions/subscriptions-list/subscriptions-list.component';\nexport * from './lib/components/customer/payment-intents/payment-intents-list/payment-intents-list.component';\nexport * from './lib/pages/customer/customer.component';\n\n// Export models\nexport * from './lib/models/currency.model';\n\n// Export types\nexport * from './database.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MA0Ba,aAAa,GAAG,IAAI,cAAc,CAAe,eAAe;AAE7E;;;;AAIG;AACG,SAAU,mBAAmB,CAAC,MAAoB,EAAA;IACtD,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,QAAQ,EAAE;AACX;KACF;AACH;;ACpCA;;;AAGG;MACU,uBAAuB,GAAG,IAAI,cAAc,CACvD,yBAAyB;MAuBd,eAAe,GAAG,IAAI,cAAc,CAAiB,iBAAiB;AAEnF;;;;AAIG;AACG,SAAU,qBAAqB,CAAC,MAAsB,EAAA;IAC1D,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,QAAQ,EAAE;AACX;KACF;AACH;;ACrCA;;;;AAIG;AACG,SAAU,8BAA8B,CAC5C,MAA+B,EAAA;AAE/B,IAAA,MAAM,SAAS,GAAwC;AACrD,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,MAAM,CAAC;AA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