@dotted-labs/ngx-supabase-stripe 0.6.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/dotted-labs-ngx-supabase-stripe-i18n.mjs +222 -0
- package/fesm2022/dotted-labs-ngx-supabase-stripe-i18n.mjs.map +1 -0
- package/fesm2022/dotted-labs-ngx-supabase-stripe.mjs +352 -224
- package/fesm2022/dotted-labs-ngx-supabase-stripe.mjs.map +1 -1
- package/i18n/messages.en.json +98 -0
- package/i18n/messages.es.json +98 -0
- package/package.json +8 -2
- package/types/dotted-labs-ngx-supabase-stripe-i18n.d.ts +15 -0
- package/types/dotted-labs-ngx-supabase-stripe.d.ts +63 -18
|
@@ -346,10 +346,10 @@ class SupabaseClientService {
|
|
|
346
346
|
return { data: null, error: error };
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
350
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
349
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SupabaseClientService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
350
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SupabaseClientService, providedIn: 'root' });
|
|
351
351
|
}
|
|
352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SupabaseClientService, decorators: [{
|
|
353
353
|
type: Injectable,
|
|
354
354
|
args: [{
|
|
355
355
|
providedIn: 'root'
|
|
@@ -362,7 +362,10 @@ class StripeClientService {
|
|
|
362
362
|
stripe;
|
|
363
363
|
embeddedCheckout = null;
|
|
364
364
|
constructor() {
|
|
365
|
-
|
|
365
|
+
const options = this.config.locale
|
|
366
|
+
? { locale: this.config.locale }
|
|
367
|
+
: undefined;
|
|
368
|
+
this.stripe = loadStripe(this.config.publishableKey, options);
|
|
366
369
|
console.log('🔌 [StripeClientService]: Loaded Stripe Client from @stripe/stripe-js');
|
|
367
370
|
}
|
|
368
371
|
/**
|
|
@@ -385,7 +388,7 @@ class StripeClientService {
|
|
|
385
388
|
if (!accessToken) {
|
|
386
389
|
return {
|
|
387
390
|
ok: false,
|
|
388
|
-
error: new Error(
|
|
391
|
+
error: new Error($localize `:@@stripe.errors.no_auth_session:No Supabase Auth session. Sign in before checkout (e.g. signInWithPassword, signInWithOAuth, or magic link).`),
|
|
389
392
|
};
|
|
390
393
|
}
|
|
391
394
|
return { ok: true, headers: { Authorization: `Bearer ${accessToken}` } };
|
|
@@ -684,10 +687,10 @@ class StripeClientService {
|
|
|
684
687
|
return { paymentMethod: null, error: error };
|
|
685
688
|
}
|
|
686
689
|
}
|
|
687
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
688
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
690
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: StripeClientService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
691
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: StripeClientService, providedIn: 'root' });
|
|
689
692
|
}
|
|
690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: StripeClientService, decorators: [{
|
|
691
694
|
type: Injectable,
|
|
692
695
|
args: [{
|
|
693
696
|
providedIn: 'root',
|
|
@@ -705,6 +708,102 @@ var Currency;
|
|
|
705
708
|
Currency["INR"] = "inr";
|
|
706
709
|
})(Currency || (Currency = {}));
|
|
707
710
|
|
|
711
|
+
class ProductsService {
|
|
712
|
+
supabaseService = inject(SupabaseClientService);
|
|
713
|
+
/**
|
|
714
|
+
* Map a Stripe product row plus price rows to the public shape used by the UI.
|
|
715
|
+
*/
|
|
716
|
+
toStripeProductPublic(product, prices = []) {
|
|
717
|
+
return this.parseProduct(product, prices);
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Load all Stripe prices and products, returning parsed public products.
|
|
721
|
+
*/
|
|
722
|
+
async fetchFullCatalog() {
|
|
723
|
+
const [pricesResult, productsResult] = await Promise.all([
|
|
724
|
+
this.supabaseService.selectStripePrices(),
|
|
725
|
+
this.supabaseService.selectStripeProducts(),
|
|
726
|
+
]);
|
|
727
|
+
const pricesError = pricesResult.error;
|
|
728
|
+
const productsError = productsResult.error;
|
|
729
|
+
if (pricesError) {
|
|
730
|
+
return { data: null, error: pricesError };
|
|
731
|
+
}
|
|
732
|
+
if (productsError) {
|
|
733
|
+
return { data: null, error: productsError };
|
|
734
|
+
}
|
|
735
|
+
const prices = (pricesResult.data ?? []);
|
|
736
|
+
const stripeProducts = (productsResult.data ?? []);
|
|
737
|
+
const products = stripeProducts.map((product) => this.parseProduct(product, prices));
|
|
738
|
+
return { data: { prices, products }, error: null };
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* Load prices and a single product by id, returning parsed public product(s).
|
|
742
|
+
*/
|
|
743
|
+
async fetchProductById(id) {
|
|
744
|
+
const [pricesResult, productResult] = await Promise.all([
|
|
745
|
+
this.supabaseService.selectStripePrices(),
|
|
746
|
+
this.supabaseService.selectStripeProduct(id),
|
|
747
|
+
]);
|
|
748
|
+
const pricesError = pricesResult.error;
|
|
749
|
+
const productError = productResult.error;
|
|
750
|
+
if (pricesError) {
|
|
751
|
+
return { data: [], error: pricesError };
|
|
752
|
+
}
|
|
753
|
+
if (productError) {
|
|
754
|
+
return { data: [], error: productError };
|
|
755
|
+
}
|
|
756
|
+
const prices = (pricesResult.data ?? []);
|
|
757
|
+
const rows = productResult.data;
|
|
758
|
+
if (!rows?.length) {
|
|
759
|
+
return { data: [], error: null };
|
|
760
|
+
}
|
|
761
|
+
return { data: [this.parseProduct(rows[0], prices)], error: null };
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Load prices and products for the given Stripe product ids.
|
|
765
|
+
*/
|
|
766
|
+
async fetchProductsByIds(ids) {
|
|
767
|
+
const [pricesResult, productsResult] = await Promise.all([
|
|
768
|
+
this.supabaseService.selectStripePrices(),
|
|
769
|
+
this.supabaseService.selectStripeProductsByIds(ids),
|
|
770
|
+
]);
|
|
771
|
+
const pricesError = pricesResult.error;
|
|
772
|
+
const productsError = productsResult.error;
|
|
773
|
+
if (pricesError) {
|
|
774
|
+
return { data: [], error: pricesError };
|
|
775
|
+
}
|
|
776
|
+
if (productsError) {
|
|
777
|
+
return { data: [], error: productsError };
|
|
778
|
+
}
|
|
779
|
+
const prices = (pricesResult.data ?? []);
|
|
780
|
+
const stripeProducts = (productsResult.data ?? []);
|
|
781
|
+
const products = stripeProducts.map((product) => this.parseProduct(product, prices));
|
|
782
|
+
return { data: products, error: null };
|
|
783
|
+
}
|
|
784
|
+
parseProduct(product, prices = []) {
|
|
785
|
+
const { attrs, ...mainProperties } = product;
|
|
786
|
+
return {
|
|
787
|
+
...mainProperties,
|
|
788
|
+
images: attrs?.images ?? [],
|
|
789
|
+
prices: prices
|
|
790
|
+
.filter((price) => price.product === product.id)
|
|
791
|
+
.map((price) => ({
|
|
792
|
+
details: price,
|
|
793
|
+
recurringInterval: price?.attrs?.recurring?.interval ?? 'no-recurring',
|
|
794
|
+
})),
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
798
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductsService, providedIn: 'root' });
|
|
799
|
+
}
|
|
800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductsService, decorators: [{
|
|
801
|
+
type: Injectable,
|
|
802
|
+
args: [{
|
|
803
|
+
providedIn: 'root',
|
|
804
|
+
}]
|
|
805
|
+
}] });
|
|
806
|
+
|
|
708
807
|
const initialProductsState = {
|
|
709
808
|
products: null,
|
|
710
809
|
prices: null,
|
|
@@ -716,17 +815,23 @@ const ProductsStore = signalStore({ providedIn: 'root' }, withState(initialProdu
|
|
|
716
815
|
isStatusLoading: computed(() => state.status() === 'loading'),
|
|
717
816
|
isStatusSuccess: computed(() => state.status() === 'success'),
|
|
718
817
|
isStatusError: computed(() => state.status() === 'error'),
|
|
719
|
-
oneTimeproductsByCurrency: computed(() => state
|
|
720
|
-
|
|
721
|
-
|
|
818
|
+
oneTimeproductsByCurrency: computed(() => state
|
|
819
|
+
.products()
|
|
820
|
+
?.filter((product) => product.prices.some((price) => price.details.type === 'one_time' && price.details.currency === state.currency())) || []),
|
|
821
|
+
recurringProductsByCurrency: computed(() => state
|
|
822
|
+
.products()
|
|
823
|
+
?.filter((product) => product.prices.some((price) => price.details.type === 'recurring' && price.details.currency === state.currency())) || []),
|
|
824
|
+
productsByCurrency: computed(() => state
|
|
825
|
+
.products()
|
|
826
|
+
?.filter((product) => product.prices.some((price) => price.details.currency === state.currency())) || []),
|
|
722
827
|
hasProducts: computed(() => state.products() !== null && state.products().length > 0),
|
|
723
|
-
isError: computed(() => state.error())
|
|
724
|
-
})), withMethods((store,
|
|
828
|
+
isError: computed(() => state.error()),
|
|
829
|
+
})), withMethods((store, productsService = inject(ProductsService)) => ({
|
|
725
830
|
/**
|
|
726
831
|
* Get products by IDs from the current loaded products
|
|
727
832
|
*/
|
|
728
833
|
getProductsByIds(ids) {
|
|
729
|
-
return store.products()?.filter(product => product.id && ids.includes(product.id)) || [];
|
|
834
|
+
return store.products()?.filter((product) => product.id && ids.includes(product.id)) || [];
|
|
730
835
|
},
|
|
731
836
|
/**
|
|
732
837
|
* Set the currency filter for products
|
|
@@ -740,15 +845,11 @@ const ProductsStore = signalStore({ providedIn: 'root' }, withState(initialProdu
|
|
|
740
845
|
async loadProductById(id) {
|
|
741
846
|
patchState(store, { status: 'loading', error: null });
|
|
742
847
|
try {
|
|
743
|
-
const { data:
|
|
848
|
+
const { data: products, error: productError } = await productsService.fetchProductById(id);
|
|
744
849
|
if (productError) {
|
|
745
850
|
console.error('🎮 [ProductsStore]: Error loading product', productError);
|
|
746
851
|
patchState(store, { status: 'error', error: productError.message });
|
|
747
|
-
|
|
748
|
-
const products = [];
|
|
749
|
-
if (product && product.length > 0) {
|
|
750
|
-
const productParsed = parseProduct(product[0], store.prices());
|
|
751
|
-
products.push(productParsed);
|
|
852
|
+
return;
|
|
752
853
|
}
|
|
753
854
|
patchState(store, { status: 'success', products });
|
|
754
855
|
}
|
|
@@ -762,33 +863,25 @@ const ProductsStore = signalStore({ providedIn: 'root' }, withState(initialProdu
|
|
|
762
863
|
async loadProducts() {
|
|
763
864
|
patchState(store, { status: 'loading', error: null });
|
|
764
865
|
try {
|
|
765
|
-
const { data
|
|
766
|
-
if (
|
|
767
|
-
console.error('🎮 [ProductsStore]: Error loading
|
|
768
|
-
patchState(store, { status: 'error', error: pricesError.message });
|
|
769
|
-
}
|
|
770
|
-
patchState(store, { prices: prices || [] });
|
|
771
|
-
const { data: stripeProducts, error: productsError } = await supabaseService.selectStripeProducts();
|
|
772
|
-
if (productsError) {
|
|
773
|
-
console.error('🎮 [ProductsStore]: Error loading products', productsError);
|
|
866
|
+
const { data, error } = await productsService.fetchFullCatalog();
|
|
867
|
+
if (error) {
|
|
868
|
+
console.error('🎮 [ProductsStore]: Error loading catalog', error);
|
|
774
869
|
patchState(store, {
|
|
775
870
|
status: 'error',
|
|
776
|
-
error:
|
|
871
|
+
error: error.message,
|
|
777
872
|
});
|
|
873
|
+
return;
|
|
778
874
|
}
|
|
779
|
-
if (
|
|
780
|
-
{
|
|
781
|
-
|
|
782
|
-
stripeProducts.forEach(product => {
|
|
783
|
-
products.push(parseProduct(product, store.prices()));
|
|
784
|
-
});
|
|
785
|
-
console.log('🎮 [ProductsStore] products: ', products);
|
|
786
|
-
patchState(store, {
|
|
787
|
-
status: 'success',
|
|
788
|
-
products: products
|
|
789
|
-
});
|
|
790
|
-
}
|
|
875
|
+
if (!data) {
|
|
876
|
+
patchState(store, { status: 'success', prices: [], products: [] });
|
|
877
|
+
return;
|
|
791
878
|
}
|
|
879
|
+
console.log('🎮 [ProductsStore] products: ', data.products);
|
|
880
|
+
patchState(store, {
|
|
881
|
+
status: 'success',
|
|
882
|
+
prices: data.prices,
|
|
883
|
+
products: data.products,
|
|
884
|
+
});
|
|
792
885
|
}
|
|
793
886
|
catch (error) {
|
|
794
887
|
patchState(store, {
|
|
@@ -800,14 +893,17 @@ const ProductsStore = signalStore({ providedIn: 'root' }, withState(initialProdu
|
|
|
800
893
|
async loadProductsByIds(ids) {
|
|
801
894
|
patchState(store, { status: 'loading', error: null });
|
|
802
895
|
try {
|
|
803
|
-
const { data: products, error: productsError } = await
|
|
896
|
+
const { data: products, error: productsError } = await productsService.fetchProductsByIds(ids);
|
|
804
897
|
if (productsError) {
|
|
805
898
|
console.error('🎮 [ProductsStore]: Error loading products', productsError);
|
|
806
899
|
patchState(store, { status: 'error', error: productsError.message });
|
|
900
|
+
return;
|
|
807
901
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
902
|
+
console.log('🎮 [ProductsStore] products: ', products);
|
|
903
|
+
patchState(store, {
|
|
904
|
+
status: 'success',
|
|
905
|
+
products,
|
|
906
|
+
});
|
|
811
907
|
}
|
|
812
908
|
catch (error) {
|
|
813
909
|
patchState(store, { status: 'error', error: error.message });
|
|
@@ -818,7 +914,7 @@ const ProductsStore = signalStore({ providedIn: 'root' }, withState(initialProdu
|
|
|
818
914
|
*/
|
|
819
915
|
reset() {
|
|
820
916
|
patchState(store, initialProductsState);
|
|
821
|
-
}
|
|
917
|
+
},
|
|
822
918
|
})), withHooks((store) => ({
|
|
823
919
|
async onInit() {
|
|
824
920
|
console.log('🎮 [ProductsStore] onInit');
|
|
@@ -828,19 +924,8 @@ const ProductsStore = signalStore({ providedIn: 'root' }, withState(initialProdu
|
|
|
828
924
|
console.log('🎮 [ProductsStore] loading products...');
|
|
829
925
|
await store.loadProducts();
|
|
830
926
|
}
|
|
831
|
-
}
|
|
927
|
+
},
|
|
832
928
|
})));
|
|
833
|
-
function parseProduct(product, prices = []) {
|
|
834
|
-
const { attrs, ...mainProperties } = product;
|
|
835
|
-
return {
|
|
836
|
-
...mainProperties,
|
|
837
|
-
images: attrs?.images || [],
|
|
838
|
-
prices: prices.filter(price => price.product === product.id).map(price => ({
|
|
839
|
-
details: price,
|
|
840
|
-
recurringInterval: price?.attrs?.recurring?.interval || 'no-recurring'
|
|
841
|
-
}))
|
|
842
|
-
};
|
|
843
|
-
}
|
|
844
929
|
|
|
845
930
|
const initialSubscriptionState = {
|
|
846
931
|
subscriptions: null,
|
|
@@ -855,7 +940,7 @@ const SubscriptionsStore = signalStore({ providedIn: 'root' }, withState(initial
|
|
|
855
940
|
isStatusError: computed(() => state.status() === 'error'),
|
|
856
941
|
hasSubscriptions: computed(() => state.subscriptions() !== null && state.subscriptions().length > 0),
|
|
857
942
|
isError: computed(() => state.error()),
|
|
858
|
-
})), withMethods((store, stripeService = inject(StripeClientService), supabaseService = inject(SupabaseClientService), productsStore = inject(ProductsStore), customerStore = inject(CustomerStore)) => ({
|
|
943
|
+
})), withMethods((store, stripeService = inject(StripeClientService), supabaseService = inject(SupabaseClientService), productsStore = inject(ProductsStore), productsService = inject(ProductsService), customerStore = inject(CustomerStore)) => ({
|
|
859
944
|
/**
|
|
860
945
|
* Create a subscription
|
|
861
946
|
* @param priceId The price ID for the subscription
|
|
@@ -876,7 +961,7 @@ const SubscriptionsStore = signalStore({ providedIn: 'root' }, withState(initial
|
|
|
876
961
|
if (!stripe) {
|
|
877
962
|
patchState(store, {
|
|
878
963
|
status: 'error',
|
|
879
|
-
error:
|
|
964
|
+
error: $localize `:@@stripe.errors.no_stripe_instance:No Stripe instance returned`,
|
|
880
965
|
});
|
|
881
966
|
}
|
|
882
967
|
else {
|
|
@@ -913,7 +998,7 @@ const SubscriptionsStore = signalStore({ providedIn: 'root' }, withState(initial
|
|
|
913
998
|
const prices = (productsStore.prices() ?? []);
|
|
914
999
|
const userProductsById = new Map((userStripeProducts ?? []).map((p) => [
|
|
915
1000
|
p.id,
|
|
916
|
-
|
|
1001
|
+
productsService.toStripeProductPublic(p, prices),
|
|
917
1002
|
]));
|
|
918
1003
|
console.log('🔍 [SubscriptionsStore] loaded subscriptions', subscriptions);
|
|
919
1004
|
const parsedSubscriptions = subscriptions?.map((subscription) => {
|
|
@@ -1227,7 +1312,7 @@ const CustomerStore = signalStore({ providedIn: 'root' }, withState(initialCusto
|
|
|
1227
1312
|
else {
|
|
1228
1313
|
patchState(state, {
|
|
1229
1314
|
paymentMethodsStatus: 'error',
|
|
1230
|
-
paymentMethodsError:
|
|
1315
|
+
paymentMethodsError: $localize `:@@stripe.errors.payment_method_not_found:Payment method not found`
|
|
1231
1316
|
});
|
|
1232
1317
|
}
|
|
1233
1318
|
},
|
|
@@ -1301,7 +1386,7 @@ const CheckoutStore = signalStore({ providedIn: 'root' }, withState(initialCheck
|
|
|
1301
1386
|
if (!stripe) {
|
|
1302
1387
|
patchState(store, {
|
|
1303
1388
|
status: 'error',
|
|
1304
|
-
error:
|
|
1389
|
+
error: $localize `:@@stripe.errors.no_stripe_instance:No Stripe instance returned`,
|
|
1305
1390
|
});
|
|
1306
1391
|
}
|
|
1307
1392
|
else {
|
|
@@ -1384,7 +1469,7 @@ const PortalAccountStore = signalStore({ providedIn: 'root' }, withState(initial
|
|
|
1384
1469
|
throw new Error(error.message);
|
|
1385
1470
|
}
|
|
1386
1471
|
if (!url) {
|
|
1387
|
-
throw new Error(
|
|
1472
|
+
throw new Error($localize `:@@stripe.errors.portal_session_failed:Could not create portal session`);
|
|
1388
1473
|
}
|
|
1389
1474
|
patchState(store, {
|
|
1390
1475
|
status: 'success',
|
|
@@ -1394,7 +1479,7 @@ const PortalAccountStore = signalStore({ providedIn: 'root' }, withState(initial
|
|
|
1394
1479
|
}
|
|
1395
1480
|
catch (error) {
|
|
1396
1481
|
console.error('🚨 [PortalAccountStore]', error);
|
|
1397
|
-
const errorMessage = error instanceof Error ? error.message :
|
|
1482
|
+
const errorMessage = error instanceof Error ? error.message : $localize `:@@stripe.errors.unknown:Unknown error`;
|
|
1398
1483
|
patchState(store, {
|
|
1399
1484
|
status: 'error',
|
|
1400
1485
|
error: errorMessage
|
|
@@ -1410,10 +1495,10 @@ const PortalAccountStore = signalStore({ providedIn: 'root' }, withState(initial
|
|
|
1410
1495
|
})));
|
|
1411
1496
|
|
|
1412
1497
|
class EmbeddedSkeletonComponent {
|
|
1413
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1414
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1498
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EmbeddedSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1499
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: EmbeddedSkeletonComponent, isStandalone: true, selector: "lib-embedded-skeleton", ngImport: i0, template: "<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> " });
|
|
1415
1500
|
}
|
|
1416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EmbeddedSkeletonComponent, decorators: [{
|
|
1417
1502
|
type: Component,
|
|
1418
1503
|
args: [{ selector: 'lib-embedded-skeleton', standalone: true, template: "<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> " }]
|
|
1419
1504
|
}] });
|
|
@@ -1422,9 +1507,9 @@ class EmbeddedCheckoutComponent {
|
|
|
1422
1507
|
checkoutStore = inject(CheckoutStore);
|
|
1423
1508
|
customerStore = inject(CustomerStore);
|
|
1424
1509
|
stripeConfig = inject(STRIPE_CONFIG);
|
|
1425
|
-
priceId = input.required(...(ngDevMode ? [{ debugName: "priceId" }] : []));
|
|
1426
|
-
returnPagePath = input('/return', ...(ngDevMode ? [{ debugName: "returnPagePath" }] : []));
|
|
1427
|
-
customer = computed(() => this.customerStore.customer().data, ...(ngDevMode ? [{ debugName: "customer" }] : []));
|
|
1510
|
+
priceId = input.required(...(ngDevMode ? [{ debugName: "priceId" }] : /* istanbul ignore next */ []));
|
|
1511
|
+
returnPagePath = input('/return', ...(ngDevMode ? [{ debugName: "returnPagePath" }] : /* istanbul ignore next */ []));
|
|
1512
|
+
customer = computed(() => this.customerStore.customer().data, ...(ngDevMode ? [{ debugName: "customer" }] : /* istanbul ignore next */ []));
|
|
1428
1513
|
async ngOnInit() {
|
|
1429
1514
|
this.createCheckoutSession();
|
|
1430
1515
|
}
|
|
@@ -1443,19 +1528,19 @@ class EmbeddedCheckoutComponent {
|
|
|
1443
1528
|
ngOnDestroy() {
|
|
1444
1529
|
this.checkoutStore.destroyEmbeddedCheckout();
|
|
1445
1530
|
}
|
|
1446
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1447
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1531
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EmbeddedCheckoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1532
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: EmbeddedCheckoutComponent, isStandalone: true, selector: "lib-embedded-checkout", inputs: { priceId: { classPropertyName: "priceId", publicName: "priceId", isSignal: true, isRequired: true, transformFunction: null }, returnPagePath: { classPropertyName: "returnPagePath", publicName: "returnPagePath", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: EmbeddedSkeletonComponent, selector: "lib-embedded-skeleton" }] });
|
|
1448
1533
|
}
|
|
1449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EmbeddedCheckoutComponent, decorators: [{
|
|
1450
1535
|
type: Component,
|
|
1451
|
-
args: [{ selector: 'lib-embedded-checkout', standalone: true, imports: [CommonModule, EmbeddedSkeletonComponent], template: "<div class=\"checkout-container\">\n @if (checkoutStore.isStatusLoading()) {\n <lib-embedded-skeleton />\n }\n \n @if (checkoutStore.isStatusError()) {\n <div class=\"error\">\n <p>Error
|
|
1536
|
+
args: [{ selector: 'lib-embedded-checkout', standalone: true, imports: [CommonModule, EmbeddedSkeletonComponent], template: "<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" }]
|
|
1452
1537
|
}], propDecorators: { priceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "priceId", required: true }] }], returnPagePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnPagePath", required: false }] }] } });
|
|
1453
1538
|
|
|
1454
1539
|
class ReturnPageComponent {
|
|
1455
1540
|
route = inject(ActivatedRoute);
|
|
1456
1541
|
router = inject(Router);
|
|
1457
1542
|
checkoutStore = inject(CheckoutStore);
|
|
1458
|
-
returnUrl = input('/', ...(ngDevMode ? [{ debugName: "returnUrl" }] : []));
|
|
1543
|
+
returnUrl = input('/', ...(ngDevMode ? [{ debugName: "returnUrl" }] : /* istanbul ignore next */ []));
|
|
1459
1544
|
async ngOnInit() {
|
|
1460
1545
|
this.route.queryParams.subscribe(async (params) => {
|
|
1461
1546
|
const sessionId = params['session_id'];
|
|
@@ -1473,19 +1558,19 @@ class ReturnPageComponent {
|
|
|
1473
1558
|
navigate() {
|
|
1474
1559
|
this.router.navigateByUrl(this.returnUrl());
|
|
1475
1560
|
}
|
|
1476
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1477
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1561
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ReturnPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1562
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ReturnPageComponent, isStandalone: true, selector: "lib-checkout-return-page", inputs: { returnUrl: { classPropertyName: "returnUrl", publicName: "returnUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1478
1563
|
}
|
|
1479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ReturnPageComponent, decorators: [{
|
|
1480
1565
|
type: Component,
|
|
1481
|
-
args: [{ selector: 'lib-checkout-return-page', standalone: true, imports: [CommonModule], template: "<div class=\"return-page-container\">\n @if (checkoutStore.isStatusLoading()) {\n <div class=\"loading-state\">\n <div class=\"spinner\"></div>\n <p>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\"
|
|
1566
|
+
args: [{ selector: 'lib-checkout-return-page', standalone: true, imports: [CommonModule], template: "<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" }]
|
|
1482
1567
|
}], propDecorators: { returnUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnUrl", required: false }] }] } });
|
|
1483
1568
|
|
|
1484
1569
|
class ProductItemSkeletonComponent {
|
|
1485
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1486
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1570
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductItemSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1571
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: ProductItemSkeletonComponent, isStandalone: true, selector: "lib-product-item-skeleton", ngImport: i0, template: "<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> ", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1487
1572
|
}
|
|
1488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductItemSkeletonComponent, decorators: [{
|
|
1489
1574
|
type: Component,
|
|
1490
1575
|
args: [{ selector: 'lib-product-item-skeleton', standalone: true, imports: [CommonModule], template: "<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> " }]
|
|
1491
1576
|
}] });
|
|
@@ -1530,10 +1615,42 @@ class UtilsService {
|
|
|
1530
1615
|
return 'badge-ghost';
|
|
1531
1616
|
}
|
|
1532
1617
|
}
|
|
1533
|
-
|
|
1534
|
-
|
|
1618
|
+
translateStripeStatus(status) {
|
|
1619
|
+
const labels = {
|
|
1620
|
+
active: $localize `:@@stripe.status.active:Active`,
|
|
1621
|
+
canceled: $localize `:@@stripe.status.canceled:Canceled`,
|
|
1622
|
+
cancelled: $localize `:@@stripe.status.canceled:Canceled`,
|
|
1623
|
+
incomplete: $localize `:@@stripe.status.incomplete:Incomplete`,
|
|
1624
|
+
incomplete_expired: $localize `:@@stripe.status.incomplete_expired:Incomplete expired`,
|
|
1625
|
+
past_due: $localize `:@@stripe.status.past_due:Past due`,
|
|
1626
|
+
trialing: $localize `:@@stripe.status.trialing:Trialing`,
|
|
1627
|
+
unpaid: $localize `:@@stripe.status.unpaid:Unpaid`,
|
|
1628
|
+
paused: $localize `:@@stripe.status.paused:Paused`,
|
|
1629
|
+
succeeded: $localize `:@@stripe.status.succeeded:Succeeded`,
|
|
1630
|
+
failed: $localize `:@@stripe.status.failed:Failed`,
|
|
1631
|
+
pending: $localize `:@@stripe.status.pending:Pending`,
|
|
1632
|
+
processing: $localize `:@@stripe.status.processing:Processing`,
|
|
1633
|
+
paid: $localize `:@@stripe.status.paid:Paid`,
|
|
1634
|
+
requires_payment_method: $localize `:@@stripe.status.requires_payment_method:Requires payment method`,
|
|
1635
|
+
requires_confirmation: $localize `:@@stripe.status.requires_confirmation:Requires confirmation`,
|
|
1636
|
+
requires_action: $localize `:@@stripe.status.requires_action:Requires action`,
|
|
1637
|
+
requires_capture: $localize `:@@stripe.status.requires_capture:Requires capture`,
|
|
1638
|
+
};
|
|
1639
|
+
return labels[status] ?? status;
|
|
1640
|
+
}
|
|
1641
|
+
translateBillingInterval(interval) {
|
|
1642
|
+
const labels = {
|
|
1643
|
+
day: $localize `:@@stripe.billing.daily:Daily`,
|
|
1644
|
+
week: $localize `:@@stripe.billing.weekly:Weekly`,
|
|
1645
|
+
month: $localize `:@@stripe.billing.monthly:Monthly`,
|
|
1646
|
+
year: $localize `:@@stripe.billing.yearly:Yearly`,
|
|
1647
|
+
};
|
|
1648
|
+
return labels[interval] ?? interval;
|
|
1649
|
+
}
|
|
1650
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1651
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: UtilsService, providedIn: 'root' });
|
|
1535
1652
|
}
|
|
1536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1653
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: UtilsService, decorators: [{
|
|
1537
1654
|
type: Injectable,
|
|
1538
1655
|
args: [{
|
|
1539
1656
|
providedIn: 'root',
|
|
@@ -1541,33 +1658,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1541
1658
|
}] });
|
|
1542
1659
|
|
|
1543
1660
|
class ProductItemComponent {
|
|
1544
|
-
product = input.required(...(ngDevMode ? [{ debugName: "product" }] : []));
|
|
1545
|
-
currency = input(Currency.EUR, ...(ngDevMode ? [{ debugName: "currency" }] : []));
|
|
1661
|
+
product = input.required(...(ngDevMode ? [{ debugName: "product" }] : /* istanbul ignore next */ []));
|
|
1662
|
+
currency = input(Currency.EUR, ...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
1546
1663
|
productSelected = output();
|
|
1547
1664
|
priceSelected = output();
|
|
1548
1665
|
utils = inject(UtilsService);
|
|
1549
1666
|
sanitizer = inject(DomSanitizer);
|
|
1550
|
-
|
|
1667
|
+
perMonthSuffix = $localize `:@@stripe.product.per_month:/mo`;
|
|
1668
|
+
perYearSuffix = $localize `:@@stripe.product.per_year:/yr`;
|
|
1669
|
+
price = computed(() => this.product().prices.find(price => price.details.currency === this.currency()), ...(ngDevMode ? [{ debugName: "price" }] : /* istanbul ignore next */ []));
|
|
1551
1670
|
sanitizedImage = computed(() => {
|
|
1552
1671
|
const imageUrl = this.product().images?.[0];
|
|
1553
1672
|
return imageUrl ? this.sanitizer.bypassSecurityTrustUrl(imageUrl) : null;
|
|
1554
|
-
}, ...(ngDevMode ? [{ debugName: "sanitizedImage" }] : []));
|
|
1673
|
+
}, ...(ngDevMode ? [{ debugName: "sanitizedImage" }] : /* istanbul ignore next */ []));
|
|
1555
1674
|
onSelect() {
|
|
1556
1675
|
this.productSelected.emit(this.product());
|
|
1557
1676
|
this.priceSelected.emit(this.price()?.details);
|
|
1558
1677
|
}
|
|
1559
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1560
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1678
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ProductItemComponent, isStandalone: true, selector: "lib-product-item", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: true, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { productSelected: "productSelected", priceSelected: "priceSelected" }, ngImport: i0, template: "<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\">\uD83D\uDCE6</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", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1561
1680
|
}
|
|
1562
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductItemComponent, decorators: [{
|
|
1563
1682
|
type: Component,
|
|
1564
|
-
args: [{ selector: 'lib-product-item', standalone: true, imports: [CommonModule], template: "<div class=\"card bg-base-100 shadow-xl max-w-sm mx-auto rounded-3xl w-[350px]\">\n
|
|
1683
|
+
args: [{ selector: 'lib-product-item', standalone: true, imports: [CommonModule], template: "<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\">\uD83D\uDCE6</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" }]
|
|
1565
1684
|
}], propDecorators: { product: [{ type: i0.Input, args: [{ isSignal: true, alias: "product", required: true }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], productSelected: [{ type: i0.Output, args: ["productSelected"] }], priceSelected: [{ type: i0.Output, args: ["priceSelected"] }] } });
|
|
1566
1685
|
|
|
1567
1686
|
class ProductListComponent {
|
|
1568
1687
|
productsStore = inject(ProductsStore);
|
|
1569
|
-
products = input([], ...(ngDevMode ? [{ debugName: "products" }] : []));
|
|
1570
|
-
currency = input(Currency.EUR, ...(ngDevMode ? [{ debugName: "currency" }] : []));
|
|
1688
|
+
products = input([], ...(ngDevMode ? [{ debugName: "products" }] : /* istanbul ignore next */ []));
|
|
1689
|
+
currency = input(Currency.EUR, ...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
1571
1690
|
productSelected = output();
|
|
1572
1691
|
priceSelected = output();
|
|
1573
1692
|
onProductSelect(product) {
|
|
@@ -1576,29 +1695,29 @@ class ProductListComponent {
|
|
|
1576
1695
|
onPriceSelect(price) {
|
|
1577
1696
|
this.priceSelected.emit(price);
|
|
1578
1697
|
}
|
|
1579
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1580
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1698
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1699
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ProductListComponent, isStandalone: true, selector: "stripe-product-list", inputs: { products: { classPropertyName: "products", publicName: "products", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { productSelected: "productSelected", priceSelected: "priceSelected" }, ngImport: i0, template: "@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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ProductItemComponent, selector: "lib-product-item", inputs: ["product", "currency"], outputs: ["productSelected", "priceSelected"] }, { kind: "component", type: ProductItemSkeletonComponent, selector: "lib-product-item-skeleton" }] });
|
|
1581
1700
|
}
|
|
1582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductListComponent, decorators: [{
|
|
1583
1702
|
type: Component,
|
|
1584
|
-
args: [{ selector: 'stripe-product-list', standalone: true, imports: [CommonModule, ProductItemComponent, ProductItemSkeletonComponent], template: "@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>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}
|
|
1703
|
+
args: [{ selector: 'stripe-product-list', standalone: true, imports: [CommonModule, ProductItemComponent, ProductItemSkeletonComponent], template: "@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" }]
|
|
1585
1704
|
}], propDecorators: { products: [{ type: i0.Input, args: [{ isSignal: true, alias: "products", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], productSelected: [{ type: i0.Output, args: ["productSelected"] }], priceSelected: [{ type: i0.Output, args: ["priceSelected"] }] } });
|
|
1586
1705
|
|
|
1587
1706
|
class ProductItemButtonComponent {
|
|
1588
|
-
product = input.required(...(ngDevMode ? [{ debugName: "product" }] : []));
|
|
1589
|
-
currency = input(Currency.EUR, ...(ngDevMode ? [{ debugName: "currency" }] : []));
|
|
1590
|
-
buttonText = input(
|
|
1591
|
-
buttonClass = input('btn btn-primary', ...(ngDevMode ? [{ debugName: "buttonClass" }] : []));
|
|
1592
|
-
showPrice = input(true, ...(ngDevMode ? [{ debugName: "showPrice" }] : []));
|
|
1593
|
-
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1707
|
+
product = input.required(...(ngDevMode ? [{ debugName: "product" }] : /* istanbul ignore next */ []));
|
|
1708
|
+
currency = input(Currency.EUR, ...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
1709
|
+
buttonText = input($localize `:@@stripe.product.buy_now:Buy now`, ...(ngDevMode ? [{ debugName: "buttonText" }] : /* istanbul ignore next */ []));
|
|
1710
|
+
buttonClass = input('btn btn-primary', ...(ngDevMode ? [{ debugName: "buttonClass" }] : /* istanbul ignore next */ []));
|
|
1711
|
+
showPrice = input(true, ...(ngDevMode ? [{ debugName: "showPrice" }] : /* istanbul ignore next */ []));
|
|
1712
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1594
1713
|
productSelected = output();
|
|
1595
1714
|
priceSelected = output();
|
|
1596
1715
|
utils = inject(UtilsService);
|
|
1597
|
-
price = computed(() => this.product().prices.find(price => price.details.currency === this.currency()), ...(ngDevMode ? [{ debugName: "price" }] : []));
|
|
1598
|
-
isDisabled = computed(() => this.disabled() || !this.product().active, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
1716
|
+
price = computed(() => this.product().prices.find(price => price.details.currency === this.currency()), ...(ngDevMode ? [{ debugName: "price" }] : /* istanbul ignore next */ []));
|
|
1717
|
+
isDisabled = computed(() => this.disabled() || !this.product().active, ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1599
1718
|
displayText = computed(() => {
|
|
1600
1719
|
if (!this.product().active) {
|
|
1601
|
-
return
|
|
1720
|
+
return $localize `:@@stripe.product.inactive:Inactive`;
|
|
1602
1721
|
}
|
|
1603
1722
|
if (!this.showPrice()) {
|
|
1604
1723
|
return this.buttonText();
|
|
@@ -1609,10 +1728,12 @@ class ProductItemButtonComponent {
|
|
|
1609
1728
|
}
|
|
1610
1729
|
const formattedPrice = this.utils.formatAmount(priceInfo.details?.unit_amount ?? 0, priceInfo.details?.currency ?? 'EUR');
|
|
1611
1730
|
const suffix = priceInfo.details?.type === 'recurring'
|
|
1612
|
-
?
|
|
1731
|
+
? priceInfo.recurringInterval === 'month'
|
|
1732
|
+
? $localize `:@@stripe.product.per_month:/mo`
|
|
1733
|
+
: $localize `:@@stripe.product.per_year:/yr`
|
|
1613
1734
|
: '';
|
|
1614
1735
|
return `${this.buttonText()} - ${formattedPrice}${suffix}`;
|
|
1615
|
-
}, ...(ngDevMode ? [{ debugName: "displayText" }] : []));
|
|
1736
|
+
}, ...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
|
|
1616
1737
|
onSelect() {
|
|
1617
1738
|
if (this.isDisabled()) {
|
|
1618
1739
|
return;
|
|
@@ -1620,10 +1741,10 @@ class ProductItemButtonComponent {
|
|
|
1620
1741
|
this.productSelected.emit(this.product());
|
|
1621
1742
|
this.priceSelected.emit(this.price()?.details);
|
|
1622
1743
|
}
|
|
1623
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1624
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
1744
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductItemButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1745
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: ProductItemButtonComponent, isStandalone: true, selector: "lib-product-item-button", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: true, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, buttonText: { classPropertyName: "buttonText", publicName: "buttonText", isSignal: true, isRequired: false, transformFunction: null }, buttonClass: { classPropertyName: "buttonClass", publicName: "buttonClass", isSignal: true, isRequired: false, transformFunction: null }, showPrice: { classPropertyName: "showPrice", publicName: "showPrice", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { productSelected: "productSelected", priceSelected: "priceSelected" }, ngImport: i0, template: "<button \n [class]=\"buttonClass()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onSelect()\">\n {{ displayText() }}\n</button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1625
1746
|
}
|
|
1626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProductItemButtonComponent, decorators: [{
|
|
1627
1748
|
type: Component,
|
|
1628
1749
|
args: [{ selector: 'lib-product-item-button', standalone: true, imports: [CommonModule], template: "<button \n [class]=\"buttonClass()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onSelect()\">\n {{ displayText() }}\n</button>\n" }]
|
|
1629
1750
|
}], propDecorators: { product: [{ type: i0.Input, args: [{ isSignal: true, alias: "product", required: true }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], buttonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonText", required: false }] }], buttonClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonClass", required: false }] }], showPrice: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPrice", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], productSelected: [{ type: i0.Output, args: ["productSelected"] }], priceSelected: [{ type: i0.Output, args: ["priceSelected"] }] } });
|
|
@@ -1632,9 +1753,9 @@ class EmbeddedSubscriptionComponent {
|
|
|
1632
1753
|
subscriptionsStore = inject(SubscriptionsStore);
|
|
1633
1754
|
customerStore = inject(CustomerStore);
|
|
1634
1755
|
stripeConfig = inject(STRIPE_CONFIG);
|
|
1635
|
-
priceId = input.required(...(ngDevMode ? [{ debugName: "priceId" }] : []));
|
|
1636
|
-
returnPagePath = input('/subscription-return', ...(ngDevMode ? [{ debugName: "returnPagePath" }] : []));
|
|
1637
|
-
customer = computed(() => this.customerStore.customer().data, ...(ngDevMode ? [{ debugName: "customer" }] : []));
|
|
1756
|
+
priceId = input.required(...(ngDevMode ? [{ debugName: "priceId" }] : /* istanbul ignore next */ []));
|
|
1757
|
+
returnPagePath = input('/subscription-return', ...(ngDevMode ? [{ debugName: "returnPagePath" }] : /* istanbul ignore next */ []));
|
|
1758
|
+
customer = computed(() => this.customerStore.customer().data, ...(ngDevMode ? [{ debugName: "customer" }] : /* istanbul ignore next */ []));
|
|
1638
1759
|
async ngOnInit() {
|
|
1639
1760
|
this.createSubscription();
|
|
1640
1761
|
}
|
|
@@ -1648,12 +1769,12 @@ class EmbeddedSubscriptionComponent {
|
|
|
1648
1769
|
ngOnDestroy() {
|
|
1649
1770
|
this.subscriptionsStore.destroyEmbeddedSubscription();
|
|
1650
1771
|
}
|
|
1651
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1652
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1772
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EmbeddedSubscriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1773
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: EmbeddedSubscriptionComponent, isStandalone: true, selector: "lib-embedded-subscription", inputs: { priceId: { classPropertyName: "priceId", publicName: "priceId", isSignal: true, isRequired: true, transformFunction: null }, returnPagePath: { classPropertyName: "returnPagePath", publicName: "returnPagePath", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: EmbeddedSkeletonComponent, selector: "lib-embedded-skeleton" }] });
|
|
1653
1774
|
}
|
|
1654
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EmbeddedSubscriptionComponent, decorators: [{
|
|
1655
1776
|
type: Component,
|
|
1656
|
-
args: [{ selector: 'lib-embedded-subscription', standalone: true, imports: [CommonModule, EmbeddedSkeletonComponent], template: "<div class=\"
|
|
1777
|
+
args: [{ selector: 'lib-embedded-subscription', standalone: true, imports: [CommonModule, EmbeddedSkeletonComponent], template: "<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" }]
|
|
1657
1778
|
}], propDecorators: { priceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "priceId", required: true }] }], returnPagePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnPagePath", required: false }] }] } });
|
|
1658
1779
|
|
|
1659
1780
|
class SubscriptionReturnPageComponent {
|
|
@@ -1661,8 +1782,8 @@ class SubscriptionReturnPageComponent {
|
|
|
1661
1782
|
router = inject(Router);
|
|
1662
1783
|
checkoutStore = inject(CheckoutStore);
|
|
1663
1784
|
subscriptionsStore = inject(SubscriptionsStore);
|
|
1664
|
-
sessionStatus = computed(() => this.checkoutStore.sessionStatus(), ...(ngDevMode ? [{ debugName: "sessionStatus" }] : []));
|
|
1665
|
-
returnUrl = input('/', ...(ngDevMode ? [{ debugName: "returnUrl" }] : []));
|
|
1785
|
+
sessionStatus = computed(() => this.checkoutStore.sessionStatus(), ...(ngDevMode ? [{ debugName: "sessionStatus" }] : /* istanbul ignore next */ []));
|
|
1786
|
+
returnUrl = input('/', ...(ngDevMode ? [{ debugName: "returnUrl" }] : /* istanbul ignore next */ []));
|
|
1666
1787
|
async ngOnInit() {
|
|
1667
1788
|
this.route.queryParams.subscribe(async (params) => {
|
|
1668
1789
|
const sessionId = params['session_id'];
|
|
@@ -1680,17 +1801,17 @@ class SubscriptionReturnPageComponent {
|
|
|
1680
1801
|
navigate() {
|
|
1681
1802
|
this.router.navigateByUrl(this.returnUrl());
|
|
1682
1803
|
}
|
|
1683
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1684
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1804
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionReturnPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1805
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SubscriptionReturnPageComponent, isStandalone: true, selector: "lib-subscription-return-page", inputs: { returnUrl: { classPropertyName: "returnUrl", publicName: "returnUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1685
1806
|
}
|
|
1686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionReturnPageComponent, decorators: [{
|
|
1687
1808
|
type: Component,
|
|
1688
|
-
args: [{ selector: 'lib-subscription-return-page', standalone: true, imports: [CommonModule], template: "<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
|
|
1809
|
+
args: [{ selector: 'lib-subscription-return-page', standalone: true, imports: [CommonModule], template: "<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" }]
|
|
1689
1810
|
}], propDecorators: { returnUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnUrl", required: false }] }] } });
|
|
1690
1811
|
|
|
1691
1812
|
class BrandIconDirective {
|
|
1692
1813
|
el;
|
|
1693
|
-
paymentMethod = input.required({ ...(ngDevMode ? { debugName: "paymentMethod" } : {}), alias: 'ngxBrandIcon' });
|
|
1814
|
+
paymentMethod = input.required({ ...(ngDevMode ? { debugName: "paymentMethod" } : /* istanbul ignore next */ {}), alias: 'ngxBrandIcon' });
|
|
1694
1815
|
constructor(el) {
|
|
1695
1816
|
this.el = el;
|
|
1696
1817
|
effect(() => {
|
|
@@ -1712,10 +1833,10 @@ class BrandIconDirective {
|
|
|
1712
1833
|
};
|
|
1713
1834
|
return brandIcons[brand || 'unknown'] || '💳';
|
|
1714
1835
|
}
|
|
1715
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1716
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
1836
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BrandIconDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1837
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: BrandIconDirective, isStandalone: true, selector: "[ngxBrandIcon]", inputs: { paymentMethod: { classPropertyName: "paymentMethod", publicName: "ngxBrandIcon", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
1717
1838
|
}
|
|
1718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1839
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BrandIconDirective, decorators: [{
|
|
1719
1840
|
type: Directive,
|
|
1720
1841
|
args: [{
|
|
1721
1842
|
selector: '[ngxBrandIcon]',
|
|
@@ -1725,7 +1846,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1725
1846
|
|
|
1726
1847
|
class BrandNameDirective {
|
|
1727
1848
|
el;
|
|
1728
|
-
paymentMethod = input.required({ ...(ngDevMode ? { debugName: "paymentMethod" } : {}), alias: 'ngxBrandName' });
|
|
1849
|
+
paymentMethod = input.required({ ...(ngDevMode ? { debugName: "paymentMethod" } : /* istanbul ignore next */ {}), alias: 'ngxBrandName' });
|
|
1729
1850
|
constructor(el) {
|
|
1730
1851
|
this.el = el;
|
|
1731
1852
|
effect(() => {
|
|
@@ -1747,10 +1868,10 @@ class BrandNameDirective {
|
|
|
1747
1868
|
};
|
|
1748
1869
|
return brandNames[brand || 'unknown'] || 'Tarjeta';
|
|
1749
1870
|
}
|
|
1750
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1751
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
1871
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BrandNameDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1872
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: BrandNameDirective, isStandalone: true, selector: "[ngxBrandName]", inputs: { paymentMethod: { classPropertyName: "paymentMethod", publicName: "ngxBrandName", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
1752
1873
|
}
|
|
1753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1874
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BrandNameDirective, decorators: [{
|
|
1754
1875
|
type: Directive,
|
|
1755
1876
|
args: [{
|
|
1756
1877
|
selector: '[ngxBrandName]',
|
|
@@ -1760,7 +1881,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1760
1881
|
|
|
1761
1882
|
class PaymentMethodTypeDirective {
|
|
1762
1883
|
el;
|
|
1763
|
-
paymentMethod = input.required({ ...(ngDevMode ? { debugName: "paymentMethod" } : {}), alias: 'ngxPaymentMethodType' });
|
|
1884
|
+
paymentMethod = input.required({ ...(ngDevMode ? { debugName: "paymentMethod" } : /* istanbul ignore next */ {}), alias: 'ngxPaymentMethodType' });
|
|
1764
1885
|
constructor(el) {
|
|
1765
1886
|
this.el = el;
|
|
1766
1887
|
effect(() => {
|
|
@@ -1786,10 +1907,10 @@ class PaymentMethodTypeDirective {
|
|
|
1786
1907
|
};
|
|
1787
1908
|
return typeNames[this.paymentMethod().type] || 'Método de pago';
|
|
1788
1909
|
}
|
|
1789
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1790
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
1910
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentMethodTypeDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1911
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: PaymentMethodTypeDirective, isStandalone: true, selector: "[ngxPaymentMethodType]", inputs: { paymentMethod: { classPropertyName: "paymentMethod", publicName: "ngxPaymentMethodType", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
1791
1912
|
}
|
|
1792
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentMethodTypeDirective, decorators: [{
|
|
1793
1914
|
type: Directive,
|
|
1794
1915
|
args: [{
|
|
1795
1916
|
selector: '[ngxPaymentMethodType]',
|
|
@@ -1798,8 +1919,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1798
1919
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { paymentMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngxPaymentMethodType", required: true }] }] } });
|
|
1799
1920
|
|
|
1800
1921
|
class PaymentMethodComponent {
|
|
1801
|
-
paymentMethod = input.required(...(ngDevMode ? [{ debugName: "paymentMethod" }] : []));
|
|
1802
|
-
mode = input('detailed', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
1922
|
+
paymentMethod = input.required(...(ngDevMode ? [{ debugName: "paymentMethod" }] : /* istanbul ignore next */ []));
|
|
1923
|
+
mode = input('detailed', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
1803
1924
|
get last4() {
|
|
1804
1925
|
return this.paymentMethod().card?.last4 || '****';
|
|
1805
1926
|
}
|
|
@@ -1835,41 +1956,46 @@ class PaymentMethodComponent {
|
|
|
1835
1956
|
get billingAddress() {
|
|
1836
1957
|
return this.paymentMethod().billing_details?.address;
|
|
1837
1958
|
}
|
|
1838
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1839
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1959
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentMethodComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1960
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaymentMethodComponent, isStandalone: true, selector: "ngx-payment-method", inputs: { paymentMethod: { classPropertyName: "paymentMethod", publicName: "paymentMethod", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- 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\">\u2022\u2022\u2022\u2022 {{ 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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: BrandNameDirective, selector: "[ngxBrandName]", inputs: ["ngxBrandName"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
|
|
1840
1961
|
}
|
|
1841
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1962
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentMethodComponent, decorators: [{
|
|
1842
1963
|
type: Component,
|
|
1843
|
-
args: [{ selector: 'ngx-payment-method', standalone: true, imports: [CommonModule, BrandIconDirective, BrandNameDirective, PaymentMethodTypeDirective], template: "<!-- 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
|
|
1964
|
+
args: [{ selector: 'ngx-payment-method', standalone: true, imports: [CommonModule, BrandIconDirective, BrandNameDirective, PaymentMethodTypeDirective], template: "<!-- 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\">\u2022\u2022\u2022\u2022 {{ 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" }]
|
|
1844
1965
|
}], propDecorators: { paymentMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "paymentMethod", required: true }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }] } });
|
|
1845
1966
|
|
|
1846
1967
|
class PaymentIntentsDialogComponent {
|
|
1847
|
-
paymentIntent = input.required(...(ngDevMode ? [{ debugName: "paymentIntent" }] : []));
|
|
1848
|
-
dialogId = input.required(...(ngDevMode ? [{ debugName: "dialogId" }] : []));
|
|
1849
|
-
utils =
|
|
1850
|
-
|
|
1851
|
-
|
|
1968
|
+
paymentIntent = input.required(...(ngDevMode ? [{ debugName: "paymentIntent" }] : /* istanbul ignore next */ []));
|
|
1969
|
+
dialogId = input.required(...(ngDevMode ? [{ debugName: "dialogId" }] : /* istanbul ignore next */ []));
|
|
1970
|
+
utils = inject(UtilsService);
|
|
1971
|
+
liveModeLabel = $localize `:@@stripe.payment_intents.mode.live:Live`;
|
|
1972
|
+
testModeLabel = $localize `:@@stripe.payment_intents.mode.test:Test`;
|
|
1973
|
+
notAvailableLabel = $localize `:@@stripe.common.not_available:N/A`;
|
|
1974
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1975
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaymentIntentsDialogComponent, isStandalone: true, selector: "lib-payment-intents-dialog", inputs: { paymentIntent: { classPropertyName: "paymentIntent", publicName: "paymentIntent", isSignal: true, isRequired: true, transformFunction: null }, dialogId: { classPropertyName: "dialogId", publicName: "dialogId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<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\">\u2022\u2022\u2022{{ 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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PaymentMethodComponent, selector: "ngx-payment-method", inputs: ["paymentMethod", "mode"] }] });
|
|
1852
1976
|
}
|
|
1853
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentsDialogComponent, decorators: [{
|
|
1854
1978
|
type: Component,
|
|
1855
|
-
args: [{ selector: 'lib-payment-intents-dialog', standalone: true, imports: [CommonModule, PaymentMethodComponent], template: "<dialog [id]=\"dialogId()\" class=\"modal\">\n <div class=\"modal-box max-w-2xl\">\n <h3 class=\"font-bold text-lg mb-4\">
|
|
1979
|
+
args: [{ selector: 'lib-payment-intents-dialog', standalone: true, imports: [CommonModule, PaymentMethodComponent], template: "<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\">\u2022\u2022\u2022{{ 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" }]
|
|
1856
1980
|
}], propDecorators: { paymentIntent: [{ type: i0.Input, args: [{ isSignal: true, alias: "paymentIntent", required: true }] }], dialogId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogId", required: true }] }] } });
|
|
1857
1981
|
|
|
1858
1982
|
class PaymentIntentsTableComponent {
|
|
1859
|
-
paymentIntents = input.required(...(ngDevMode ? [{ debugName: "paymentIntents" }] : []));
|
|
1983
|
+
paymentIntents = input.required(...(ngDevMode ? [{ debugName: "paymentIntents" }] : /* istanbul ignore next */ []));
|
|
1860
1984
|
paymentIntentsTable = computed(() => {
|
|
1861
1985
|
return this.paymentIntents().map(paymentIntent => ({
|
|
1862
1986
|
...paymentIntent,
|
|
1863
1987
|
selected: false
|
|
1864
1988
|
}));
|
|
1865
|
-
}, ...(ngDevMode ? [{ debugName: "paymentIntentsTable" }] : []));
|
|
1866
|
-
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
1867
|
-
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
1868
|
-
withControls = input(true, ...(ngDevMode ? [{ debugName: "withControls" }] : []));
|
|
1989
|
+
}, ...(ngDevMode ? [{ debugName: "paymentIntentsTable" }] : /* istanbul ignore next */ []));
|
|
1990
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
1991
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
1992
|
+
withControls = input(true, ...(ngDevMode ? [{ debugName: "withControls" }] : /* istanbul ignore next */ []));
|
|
1869
1993
|
exportSelected = output();
|
|
1870
1994
|
onRefresh = output();
|
|
1871
1995
|
utils = inject(UtilsService);
|
|
1872
|
-
|
|
1996
|
+
liveModeLabel = $localize `:@@stripe.payment_intents.mode.live:Live`;
|
|
1997
|
+
testModeLabel = $localize `:@@stripe.payment_intents.mode.test:Test`;
|
|
1998
|
+
hasPaymentIntents = computed(() => this.paymentIntents() && this.paymentIntents().length > 0, ...(ngDevMode ? [{ debugName: "hasPaymentIntents" }] : /* istanbul ignore next */ []));
|
|
1873
1999
|
trackByPaymentIntentId = (index, item) => item.id;
|
|
1874
2000
|
refreshPaymentIntents() {
|
|
1875
2001
|
this.onRefresh.emit();
|
|
@@ -1904,23 +2030,23 @@ class PaymentIntentsTableComponent {
|
|
|
1904
2030
|
exportSelectedPaymentIntents() {
|
|
1905
2031
|
this.exportSelected.emit(this.paymentIntentsTable().filter(paymentIntent => paymentIntent.selected));
|
|
1906
2032
|
}
|
|
1907
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1908
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2033
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentsTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2034
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaymentIntentsTableComponent, isStandalone: true, selector: "lib-payment-intents-table", inputs: { paymentIntents: { classPropertyName: "paymentIntents", publicName: "paymentIntents", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, withControls: { classPropertyName: "withControls", publicName: "withControls", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { exportSelected: "exportSelected", onRefresh: "onRefresh" }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PaymentMethodComponent, selector: "ngx-payment-method", inputs: ["paymentMethod", "mode"] }, { kind: "component", type: PaymentIntentsDialogComponent, selector: "lib-payment-intents-dialog", inputs: ["paymentIntent", "dialogId"] }] });
|
|
1909
2035
|
}
|
|
1910
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentsTableComponent, decorators: [{
|
|
1911
2037
|
type: Component,
|
|
1912
2038
|
args: [{ selector: 'lib-payment-intents-table', standalone: true, imports: [
|
|
1913
2039
|
CommonModule,
|
|
1914
2040
|
PaymentMethodComponent,
|
|
1915
2041
|
PaymentIntentsDialogComponent
|
|
1916
|
-
], template: "<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 }} payment intents</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
|
|
2042
|
+
], template: "<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" }]
|
|
1917
2043
|
}], propDecorators: { paymentIntents: [{ type: i0.Input, args: [{ isSignal: true, alias: "paymentIntents", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], withControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "withControls", required: false }] }], exportSelected: [{ type: i0.Output, args: ["exportSelected"] }], onRefresh: [{ type: i0.Output, args: ["onRefresh"] }] } });
|
|
1918
2044
|
|
|
1919
2045
|
class SubscriptionItemSkeletonComponent {
|
|
1920
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1921
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
2046
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionItemSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2047
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: SubscriptionItemSkeletonComponent, isStandalone: true, selector: "lib-subscription-item-skeleton", ngImport: i0, template: "<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>", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1922
2048
|
}
|
|
1923
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionItemSkeletonComponent, decorators: [{
|
|
1924
2050
|
type: Component,
|
|
1925
2051
|
args: [{ selector: 'lib-subscription-item-skeleton', standalone: true, imports: [CommonModule], template: "<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>" }]
|
|
1926
2052
|
}] });
|
|
@@ -1930,12 +2056,14 @@ class SubscriptionItemComponent {
|
|
|
1930
2056
|
portalAccountStore = inject(PortalAccountStore);
|
|
1931
2057
|
utils = inject(UtilsService);
|
|
1932
2058
|
sanitizer = inject(DomSanitizer);
|
|
1933
|
-
subscription = input.required(...(ngDevMode ? [{ debugName: "subscription" }] : []));
|
|
2059
|
+
subscription = input.required(...(ngDevMode ? [{ debugName: "subscription" }] : /* istanbul ignore next */ []));
|
|
1934
2060
|
onManageSubscription = output();
|
|
1935
|
-
isStatusLoading = computed(() => this.portalAccountStore.isStatusLoading(), ...(ngDevMode ? [{ debugName: "isStatusLoading" }] : []));
|
|
2061
|
+
isStatusLoading = computed(() => this.portalAccountStore.isStatusLoading(), ...(ngDevMode ? [{ debugName: "isStatusLoading" }] : /* istanbul ignore next */ []));
|
|
2062
|
+
subscriptionProductAlt = $localize `:@@stripe.subscription.product_alt:Subscription product`;
|
|
2063
|
+
subscriptionPlanFallback = $localize `:@@stripe.subscription.plan_fallback:Subscription plan`;
|
|
1936
2064
|
productImage = computed(() => {
|
|
1937
2065
|
return this.subscription().product?.images?.[0] || 'https://img.daisyui.com/images/profile/demo/yellingcat@192.webp';
|
|
1938
|
-
}, ...(ngDevMode ? [{ debugName: "productImage" }] : []));
|
|
2066
|
+
}, ...(ngDevMode ? [{ debugName: "productImage" }] : /* istanbul ignore next */ []));
|
|
1939
2067
|
isExpanded = false;
|
|
1940
2068
|
toggleExpand() {
|
|
1941
2069
|
this.isExpanded = !this.isExpanded;
|
|
@@ -1946,44 +2074,44 @@ class SubscriptionItemComponent {
|
|
|
1946
2074
|
sanitizeImageUrl(imageUrl) {
|
|
1947
2075
|
return this.sanitizer.bypassSecurityTrustUrl(imageUrl);
|
|
1948
2076
|
}
|
|
1949
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1950
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2077
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2078
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SubscriptionItemComponent, isStandalone: true, selector: "lib-subscription-item", inputs: { subscription: { classPropertyName: "subscription", publicName: "subscription", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onManageSubscription: "onManageSubscription" }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1951
2079
|
}
|
|
1952
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2080
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionItemComponent, decorators: [{
|
|
1953
2081
|
type: Component,
|
|
1954
|
-
args: [{ selector: 'lib-subscription-item', standalone: true, imports: [CommonModule], template: "<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
|
|
2082
|
+
args: [{ selector: 'lib-subscription-item', standalone: true, imports: [CommonModule], template: "<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" }]
|
|
1955
2083
|
}], propDecorators: { subscription: [{ type: i0.Input, args: [{ isSignal: true, alias: "subscription", required: true }] }], onManageSubscription: [{ type: i0.Output, args: ["onManageSubscription"] }] } });
|
|
1956
2084
|
|
|
1957
2085
|
class SubscriptionsListComponent {
|
|
1958
|
-
subscriptions = input.required(...(ngDevMode ? [{ debugName: "subscriptions" }] : []));
|
|
1959
|
-
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
1960
|
-
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
1961
|
-
withEmptyState = input(true, ...(ngDevMode ? [{ debugName: "withEmptyState" }] : []));
|
|
2086
|
+
subscriptions = input.required(...(ngDevMode ? [{ debugName: "subscriptions" }] : /* istanbul ignore next */ []));
|
|
2087
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
2088
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
2089
|
+
withEmptyState = input(true, ...(ngDevMode ? [{ debugName: "withEmptyState" }] : /* istanbul ignore next */ []));
|
|
1962
2090
|
onManageSubscription = output();
|
|
1963
2091
|
manageSubscription(customerId) {
|
|
1964
2092
|
this.onManageSubscription.emit(customerId);
|
|
1965
2093
|
}
|
|
1966
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1967
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2094
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2095
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SubscriptionsListComponent, isStandalone: true, selector: "lib-subscriptions-list", inputs: { subscriptions: { classPropertyName: "subscriptions", publicName: "subscriptions", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, withEmptyState: { classPropertyName: "withEmptyState", publicName: "withEmptyState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onManageSubscription: "onManageSubscription" }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SubscriptionItemComponent, selector: "lib-subscription-item", inputs: ["subscription"], outputs: ["onManageSubscription"] }, { kind: "component", type: SubscriptionItemSkeletonComponent, selector: "lib-subscription-item-skeleton" }] });
|
|
1968
2096
|
}
|
|
1969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionsListComponent, decorators: [{
|
|
1970
2098
|
type: Component,
|
|
1971
|
-
args: [{ selector: 'lib-subscriptions-list', standalone: true, imports: [CommonModule, SubscriptionItemComponent, SubscriptionItemSkeletonComponent], template: "<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\">
|
|
2099
|
+
args: [{ selector: 'lib-subscriptions-list', standalone: true, imports: [CommonModule, SubscriptionItemComponent, SubscriptionItemSkeletonComponent], template: "<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" }]
|
|
1972
2100
|
}], propDecorators: { subscriptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "subscriptions", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], withEmptyState: [{ type: i0.Input, args: [{ isSignal: true, alias: "withEmptyState", required: false }] }], onManageSubscription: [{ type: i0.Output, args: ["onManageSubscription"] }] } });
|
|
1973
2101
|
|
|
1974
2102
|
class SubscriptionCardSkeletonComponent {
|
|
1975
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1976
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
2103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionCardSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: SubscriptionCardSkeletonComponent, isStandalone: true, selector: "lib-subscription-card-skeleton", ngImport: i0, template: "<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> " });
|
|
1977
2105
|
}
|
|
1978
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionCardSkeletonComponent, decorators: [{
|
|
1979
2107
|
type: Component,
|
|
1980
2108
|
args: [{ selector: 'lib-subscription-card-skeleton', standalone: true, template: "<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> " }]
|
|
1981
2109
|
}] });
|
|
1982
2110
|
|
|
1983
2111
|
class SubscriptionCardComponent {
|
|
1984
|
-
subscription = input.required(...(ngDevMode ? [{ debugName: "subscription" }] : []));
|
|
1985
|
-
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
1986
|
-
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
2112
|
+
subscription = input.required(...(ngDevMode ? [{ debugName: "subscription" }] : /* istanbul ignore next */ []));
|
|
2113
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
2114
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
1987
2115
|
utils = inject(UtilsService);
|
|
1988
2116
|
onManageSubscription = output();
|
|
1989
2117
|
hasValidProductImages() {
|
|
@@ -2002,64 +2130,67 @@ class SubscriptionCardComponent {
|
|
|
2002
2130
|
manageSubscription() {
|
|
2003
2131
|
this.onManageSubscription.emit(this.subscription().customer);
|
|
2004
2132
|
}
|
|
2005
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2006
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2133
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2134
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SubscriptionCardComponent, isStandalone: true, selector: "lib-subscription-card", inputs: { subscription: { classPropertyName: "subscription", publicName: "subscription", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onManageSubscription: "onManageSubscription" }, ngImport: i0, template: "@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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SubscriptionCardSkeletonComponent, selector: "lib-subscription-card-skeleton" }] });
|
|
2007
2135
|
}
|
|
2008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionCardComponent, decorators: [{
|
|
2009
2137
|
type: Component,
|
|
2010
|
-
args: [{ selector: 'lib-subscription-card', standalone: true, imports: [CommonModule, SubscriptionCardSkeletonComponent], template: "@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 {{ 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()\"
|
|
2138
|
+
args: [{ selector: 'lib-subscription-card', standalone: true, imports: [CommonModule, SubscriptionCardSkeletonComponent], template: "@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" }]
|
|
2011
2139
|
}], propDecorators: { subscription: [{ type: i0.Input, args: [{ isSignal: true, alias: "subscription", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], onManageSubscription: [{ type: i0.Output, args: ["onManageSubscription"] }] } });
|
|
2012
2140
|
|
|
2013
2141
|
class PaymentIntentItemSkeletonComponent {
|
|
2014
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2015
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
2142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentItemSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: PaymentIntentItemSkeletonComponent, isStandalone: true, selector: "lib-payment-intent-item-skeleton", ngImport: i0, template: "<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> ", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
2016
2144
|
}
|
|
2017
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentItemSkeletonComponent, decorators: [{
|
|
2018
2146
|
type: Component,
|
|
2019
2147
|
args: [{ selector: 'lib-payment-intent-item-skeleton', standalone: true, imports: [CommonModule], template: "<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> " }]
|
|
2020
2148
|
}] });
|
|
2021
2149
|
|
|
2022
2150
|
class PaymentIntentItemComponent {
|
|
2023
|
-
paymentIntent = input.required(...(ngDevMode ? [{ debugName: "paymentIntent" }] : []));
|
|
2151
|
+
paymentIntent = input.required(...(ngDevMode ? [{ debugName: "paymentIntent" }] : /* istanbul ignore next */ []));
|
|
2024
2152
|
utils = inject(UtilsService);
|
|
2025
|
-
|
|
2153
|
+
liveModeLabel = $localize `:@@stripe.payment_intents.mode.live:Live`;
|
|
2154
|
+
testModeLabel = $localize `:@@stripe.payment_intents.mode.test:Test`;
|
|
2155
|
+
notAvailableLabel = $localize `:@@stripe.common.not_available:N/A`;
|
|
2156
|
+
isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
|
|
2026
2157
|
toggleExpand() {
|
|
2027
2158
|
this.isExpanded.update(value => !value);
|
|
2028
2159
|
}
|
|
2029
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2030
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2161
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaymentIntentItemComponent, isStandalone: true, selector: "lib-payment-intent-item", inputs: { paymentIntent: { classPropertyName: "paymentIntent", publicName: "paymentIntent", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<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\">\u2022\u2022\u2022\u2022 {{ 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\">\u2022\u2022\u2022{{ paymentIntent().id?.slice(-6) || notAvailableLabel }}</span>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PaymentMethodComponent, selector: "ngx-payment-method", inputs: ["paymentMethod", "mode"] }] });
|
|
2031
2162
|
}
|
|
2032
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentItemComponent, decorators: [{
|
|
2033
2164
|
type: Component,
|
|
2034
|
-
args: [{ selector: 'lib-payment-intent-item', standalone: true, imports: [CommonModule, PaymentMethodComponent], template: "<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 {{ paymentIntent().status }}\n </div>\n @if (!paymentIntent().liveMode) {\n <div class=\"badge badge-warning badge-sm\">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
|
|
2165
|
+
args: [{ selector: 'lib-payment-intent-item', standalone: true, imports: [CommonModule, PaymentMethodComponent], template: "<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\">\u2022\u2022\u2022\u2022 {{ 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\">\u2022\u2022\u2022{{ paymentIntent().id?.slice(-6) || notAvailableLabel }}</span>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n" }]
|
|
2035
2166
|
}], propDecorators: { paymentIntent: [{ type: i0.Input, args: [{ isSignal: true, alias: "paymentIntent", required: true }] }] } });
|
|
2036
2167
|
|
|
2037
2168
|
class PaymentIntentsListComponent {
|
|
2038
|
-
paymentIntents = input.required(...(ngDevMode ? [{ debugName: "paymentIntents" }] : []));
|
|
2039
|
-
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
2040
|
-
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
2041
|
-
withControls = input(true, ...(ngDevMode ? [{ debugName: "withControls" }] : []));
|
|
2169
|
+
paymentIntents = input.required(...(ngDevMode ? [{ debugName: "paymentIntents" }] : /* istanbul ignore next */ []));
|
|
2170
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
2171
|
+
error = input(null, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
2172
|
+
withControls = input(true, ...(ngDevMode ? [{ debugName: "withControls" }] : /* istanbul ignore next */ []));
|
|
2042
2173
|
onRefresh = output();
|
|
2043
2174
|
trackByPaymentIntentId = (index, item) => item.id;
|
|
2044
2175
|
refreshPaymentIntents() {
|
|
2045
2176
|
this.onRefresh.emit();
|
|
2046
2177
|
}
|
|
2047
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2048
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2179
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaymentIntentsListComponent, isStandalone: true, selector: "lib-payment-intents-list", inputs: { paymentIntents: { classPropertyName: "paymentIntents", publicName: "paymentIntents", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, withControls: { classPropertyName: "withControls", publicName: "withControls", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onRefresh: "onRefresh" }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PaymentIntentItemSkeletonComponent, selector: "lib-payment-intent-item-skeleton" }, { kind: "component", type: PaymentIntentItemComponent, selector: "lib-payment-intent-item", inputs: ["paymentIntent"] }] });
|
|
2049
2180
|
}
|
|
2050
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaymentIntentsListComponent, decorators: [{
|
|
2051
2182
|
type: Component,
|
|
2052
2183
|
args: [{ selector: 'lib-payment-intents-list', standalone: true, imports: [
|
|
2053
2184
|
CommonModule,
|
|
2054
2185
|
PaymentIntentItemSkeletonComponent,
|
|
2055
2186
|
PaymentIntentItemComponent
|
|
2056
|
-
], template: "<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 }} payment intents</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
|
|
2187
|
+
], template: "<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" }]
|
|
2057
2188
|
}], propDecorators: { paymentIntents: [{ type: i0.Input, args: [{ isSignal: true, alias: "paymentIntents", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], withControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "withControls", required: false }] }], onRefresh: [{ type: i0.Output, args: ["onRefresh"] }] } });
|
|
2058
2189
|
|
|
2059
2190
|
class SubscriptionsComponent {
|
|
2060
2191
|
customerStore = inject(CustomerStore);
|
|
2061
2192
|
portalAccountStore = inject(PortalAccountStore);
|
|
2062
|
-
returnUrl = input(window.location.origin + '/account', ...(ngDevMode ? [{ debugName: "returnUrl" }] : []));
|
|
2193
|
+
returnUrl = input(window.location.origin + '/account', ...(ngDevMode ? [{ debugName: "returnUrl" }] : /* istanbul ignore next */ []));
|
|
2063
2194
|
manageSubscription(customerId) {
|
|
2064
2195
|
this.portalAccountStore.createPortalSession(customerId, this.returnUrl());
|
|
2065
2196
|
}
|
|
@@ -2068,19 +2199,19 @@ class SubscriptionsComponent {
|
|
|
2068
2199
|
this.customerStore.loadSubscriptions(this.customerStore.customer().data?.id);
|
|
2069
2200
|
}
|
|
2070
2201
|
}
|
|
2071
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2072
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2202
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2203
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SubscriptionsComponent, isStandalone: true, selector: "lib-subscriptions", inputs: { returnUrl: { classPropertyName: "returnUrl", publicName: "returnUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SubscriptionCardComponent, selector: "lib-subscription-card", inputs: ["subscription", "loading", "error"], outputs: ["onManageSubscription"] }, { kind: "component", type: SubscriptionsListComponent, selector: "lib-subscriptions-list", inputs: ["subscriptions", "loading", "error", "withEmptyState"], outputs: ["onManageSubscription"] }] });
|
|
2073
2204
|
}
|
|
2074
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SubscriptionsComponent, decorators: [{
|
|
2075
2206
|
type: Component,
|
|
2076
|
-
args: [{ selector: 'lib-subscriptions', standalone: true, imports: [CommonModule, SubscriptionCardComponent, SubscriptionsListComponent], template: "<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\">Subscriptions</h2>\n <p class=\"text-gray-600\">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}} subscriptions</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
|
|
2207
|
+
args: [{ selector: 'lib-subscriptions', standalone: true, imports: [CommonModule, SubscriptionCardComponent, SubscriptionsListComponent], template: "<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" }]
|
|
2077
2208
|
}], propDecorators: { returnUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnUrl", required: false }] }] } });
|
|
2078
2209
|
|
|
2079
2210
|
class CustomerDashboardComponent {
|
|
2080
2211
|
customerStore = inject(CustomerStore);
|
|
2081
|
-
returnUrl = input(window.location.origin + '/account', ...(ngDevMode ? [{ debugName: "returnUrl" }] : []));
|
|
2082
|
-
customer = computed(() => this.customerStore.customer().data, ...(ngDevMode ? [{ debugName: "customer" }] : []));
|
|
2083
|
-
activeTab = signal('list', ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
|
|
2212
|
+
returnUrl = input(window.location.origin + '/account', ...(ngDevMode ? [{ debugName: "returnUrl" }] : /* istanbul ignore next */ []));
|
|
2213
|
+
customer = computed(() => this.customerStore.customer().data, ...(ngDevMode ? [{ debugName: "customer" }] : /* istanbul ignore next */ []));
|
|
2214
|
+
activeTab = signal('list', ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
|
|
2084
2215
|
refreshPaymentIntents() {
|
|
2085
2216
|
this.customerStore.loadPaymentIntents(this.customerStore.customer().data?.id);
|
|
2086
2217
|
}
|
|
@@ -2090,27 +2221,24 @@ class CustomerDashboardComponent {
|
|
|
2090
2221
|
exportSelectedPaymentIntents(paymentIntents) {
|
|
2091
2222
|
console.log('[💰 CustomerDashboardComponent] exportSelectedPaymentIntents: ', paymentIntents);
|
|
2092
2223
|
}
|
|
2093
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2094
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: CustomerDashboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2225
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: CustomerDashboardComponent, isStandalone: true, selector: "lib-customer-dashboard", inputs: { returnUrl: { classPropertyName: "returnUrl", publicName: "returnUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PaymentIntentsListComponent, selector: "lib-payment-intents-list", inputs: ["paymentIntents", "loading", "error", "withControls"], outputs: ["onRefresh"] }, { kind: "component", type: PaymentIntentsTableComponent, selector: "lib-payment-intents-table", inputs: ["paymentIntents", "loading", "error", "withControls"], outputs: ["exportSelected", "onRefresh"] }, { kind: "component", type: SubscriptionsComponent, selector: "lib-subscriptions", inputs: ["returnUrl"] }] });
|
|
2095
2226
|
}
|
|
2096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: CustomerDashboardComponent, decorators: [{
|
|
2097
2228
|
type: Component,
|
|
2098
2229
|
args: [{ selector: 'lib-customer-dashboard', standalone: true, imports: [
|
|
2099
2230
|
CommonModule,
|
|
2100
2231
|
PaymentIntentsListComponent,
|
|
2101
2232
|
PaymentIntentsTableComponent,
|
|
2102
2233
|
SubscriptionsComponent
|
|
2103
|
-
], template: "<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\">Payment Intents</h2>\n <p class=\"text-gray-600\">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')\">
|
|
2234
|
+
], template: "<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" }]
|
|
2104
2235
|
}], propDecorators: { returnUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnUrl", required: false }] }] } });
|
|
2105
2236
|
|
|
2106
|
-
/*
|
|
2107
|
-
* Public API Surface of ngx-supabase-stripe
|
|
2108
|
-
*/
|
|
2109
2237
|
// Export configurations
|
|
2110
2238
|
|
|
2111
2239
|
/**
|
|
2112
2240
|
* Generated bundle index. Do not edit.
|
|
2113
2241
|
*/
|
|
2114
2242
|
|
|
2115
|
-
export { CheckoutStore, Currency, CustomerDashboardComponent, CustomerStore, EmbeddedCheckoutComponent, EmbeddedSubscriptionComponent, PaymentIntentsListComponent, PaymentIntentsTableComponent, PortalAccountStore, ProductItemButtonComponent, ProductListComponent, ProductsStore, ReturnPageComponent, STRIPE_CONFIG, SUPABASE_BROWSER_CLIENT, SUPABASE_CONFIG, StripeClientService, SubscriptionCardComponent, SubscriptionReturnPageComponent, SubscriptionsListComponent, SubscriptionsStore, SupabaseClientService, parsePaymentIntent,
|
|
2243
|
+
export { CheckoutStore, Currency, CustomerDashboardComponent, CustomerStore, EmbeddedCheckoutComponent, EmbeddedSubscriptionComponent, PaymentIntentsListComponent, PaymentIntentsTableComponent, PortalAccountStore, ProductItemButtonComponent, ProductListComponent, ProductsService, ProductsStore, ReturnPageComponent, STRIPE_CONFIG, SUPABASE_BROWSER_CLIENT, SUPABASE_CONFIG, StripeClientService, SubscriptionCardComponent, SubscriptionReturnPageComponent, SubscriptionsListComponent, SubscriptionsStore, SupabaseClientService, parsePaymentIntent, parseSubscription, provideNgxSupabaseStripeConfig, provideStripeConfig, provideSupabaseConfig };
|
|
2116
2244
|
//# sourceMappingURL=dotted-labs-ngx-supabase-stripe.mjs.map
|