@mj-biz-apps/orders-ng 5.38.0 → 5.40.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/dist/checkout-element/main.js +26 -7
- package/dist/lib/checkout-widget/checkout-public-host.component.d.ts +12 -1
- package/dist/lib/checkout-widget/checkout-public-host.component.d.ts.map +1 -1
- package/dist/lib/checkout-widget/checkout-public-host.component.js +25 -5
- package/dist/lib/checkout-widget/checkout-public-host.component.js.map +1 -1
- package/dist/lib/checkout-widget/checkout-widget.component.js +2 -2
- package/dist/lib/custom/EventOrderLine/event-order-line-form.component.js +2 -2
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts +55 -1
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-header-form.component.js +593 -265
- package/dist/lib/custom/OrderHeader/order-header-form.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-line-details-panel.component.js +82 -72
- package/dist/lib/custom/OrderHeader/order-line-details-panel.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts +68 -0
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js +411 -173
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-payment-schedule.d.ts +29 -0
- package/dist/lib/custom/OrderHeader/order-payment-schedule.d.ts.map +1 -0
- package/dist/lib/custom/OrderHeader/order-payment-schedule.js +37 -0
- package/dist/lib/custom/OrderHeader/order-payment-schedule.js.map +1 -0
- package/dist/lib/custom/OrderHeader/party-address-picker.component.js +2 -2
- package/dist/lib/custom/PaymentHeader/payment-header-form.component.d.ts +33 -0
- package/dist/lib/custom/PaymentHeader/payment-header-form.component.d.ts.map +1 -1
- package/dist/lib/custom/PaymentHeader/payment-header-form.component.js +538 -346
- package/dist/lib/custom/PaymentHeader/payment-header-form.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.d.ts.map +1 -1
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.js +90 -95
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.js.map +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts +7 -6
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +8 -1
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/data/credit-statuses.d.ts +13 -0
- package/dist/lib/data/credit-statuses.d.ts.map +1 -0
- package/dist/lib/data/credit-statuses.js +13 -0
- package/dist/lib/data/credit-statuses.js.map +1 -0
- package/dist/lib/data/entity-names.d.ts +1 -0
- package/dist/lib/data/entity-names.d.ts.map +1 -1
- package/dist/lib/data/entity-names.js +1 -0
- package/dist/lib/data/entity-names.js.map +1 -1
- package/dist/lib/data/orders-queries.d.ts +24 -5
- package/dist/lib/data/orders-queries.d.ts.map +1 -1
- package/dist/lib/data/orders-queries.js +44 -7
- package/dist/lib/data/orders-queries.js.map +1 -1
- package/dist/lib/data/preset-view.d.ts +51 -0
- package/dist/lib/data/preset-view.d.ts.map +1 -0
- package/dist/lib/data/preset-view.js +56 -0
- package/dist/lib/data/preset-view.js.map +1 -0
- package/dist/lib/form-panels/catalog-overviews.panels.js +6 -6
- package/dist/lib/form-panels/charge-exception-order.panel.js +2 -2
- package/dist/lib/form-panels/commercial-overviews.panels.js +5 -5
- package/dist/lib/form-panels/document-forms.module.d.ts +1 -1
- package/dist/lib/form-panels/document-forms.module.d.ts.map +1 -1
- package/dist/lib/form-panels/document-forms.module.js +4 -1
- package/dist/lib/form-panels/document-forms.module.js.map +1 -1
- package/dist/lib/form-panels/document-hero.component.js +2 -2
- package/dist/lib/form-panels/document-overviews.panels.d.ts +8 -0
- package/dist/lib/form-panels/document-overviews.panels.d.ts.map +1 -1
- package/dist/lib/form-panels/document-overviews.panels.js +58 -23
- package/dist/lib/form-panels/document-overviews.panels.js.map +1 -1
- package/dist/lib/form-panels/external-invoices.panel.d.ts +42 -2
- package/dist/lib/form-panels/external-invoices.panel.d.ts.map +1 -1
- package/dist/lib/form-panels/external-invoices.panel.js +151 -77
- package/dist/lib/form-panels/external-invoices.panel.js.map +1 -1
- package/dist/lib/form-panels/lookup-headers.panels.js +10 -10
- package/dist/lib/form-panels/order-access-overrides.panel.js +36 -38
- package/dist/lib/form-panels/order-access-overrides.panel.js.map +1 -1
- package/dist/lib/form-panels/overview-cards.component.js +10 -13
- package/dist/lib/form-panels/overview-cards.component.js.map +1 -1
- package/dist/lib/form-panels/overview-load.d.ts +5 -1
- package/dist/lib/form-panels/overview-load.d.ts.map +1 -1
- package/dist/lib/form-panels/overview-load.js +6 -1
- package/dist/lib/form-panels/overview-load.js.map +1 -1
- package/dist/lib/form-panels/payment-header.panel.js +2 -2
- package/dist/lib/form-panels/payment-journals.panel.js +2 -2
- package/dist/lib/form-panels/price-list-header.panel.js +2 -2
- package/dist/lib/form-panels/product-header.panel.js +2 -2
- package/dist/lib/form-panels/promotion-header.panel.js +2 -2
- package/dist/lib/form-panels/subscription-cancel.component.d.ts +18 -3
- package/dist/lib/form-panels/subscription-cancel.component.d.ts.map +1 -1
- package/dist/lib/form-panels/subscription-cancel.component.js +148 -70
- package/dist/lib/form-panels/subscription-cancel.component.js.map +1 -1
- package/dist/lib/form-panels/subscription-header.panel.d.ts +3 -2
- package/dist/lib/form-panels/subscription-header.panel.d.ts.map +1 -1
- package/dist/lib/form-panels/subscription-header.panel.js +8 -9
- package/dist/lib/form-panels/subscription-header.panel.js.map +1 -1
- package/dist/lib/form-panels/subscription-revrec.panel.js +2 -2
- package/dist/lib/form-panels/subscription-term-header.panel.js +2 -2
- package/dist/lib/form-panels/subscription-term-revrec.panel.js +2 -2
- package/dist/lib/form-panels/subscription-terms.panel.js +15 -19
- package/dist/lib/form-panels/subscription-terms.panel.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProvider/mjbizappsorderspaymentprovider.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProvider/mjbizappsorderspaymentprovider.form.component.js +7 -9
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProvider/mjbizappsorderspaymentprovider.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProviderPrice/mjbizappsorderspaymentproviderprice.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProviderPrice/mjbizappsorderspaymentproviderprice.form.component.js +9 -10
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProviderPrice/mjbizappsorderspaymentproviderprice.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProviderType/mjbizappsorderspaymentprovidertype.form.component.js +15 -13
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProviderType/mjbizappsorderspaymentprovidertype.form.component.js.map +1 -1
- package/dist/lib/pages/catalog/pricing.page.js +3 -3
- package/dist/lib/pages/catalog/pricing.page.js.map +1 -1
- package/dist/lib/pages/catalog/products.page.js +6 -6
- package/dist/lib/pages/catalog/products.page.js.map +1 -1
- package/dist/lib/pages/orders/fulfillment.page.d.ts +1 -0
- package/dist/lib/pages/orders/fulfillment.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/fulfillment.page.js +5 -3
- package/dist/lib/pages/orders/fulfillment.page.js.map +1 -1
- package/dist/lib/pages/orders/order-document.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/order-document.page.js +12 -20
- package/dist/lib/pages/orders/order-document.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.js +8 -7
- package/dist/lib/pages/orders/orders-dashboard.page.js.map +1 -1
- package/dist/lib/pages/orders/return.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/return.page.js +23 -30
- package/dist/lib/pages/orders/return.page.js.map +1 -1
- package/dist/lib/pages/payments/account-credit.page.d.ts +1 -0
- package/dist/lib/pages/payments/account-credit.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/account-credit.page.js +13 -14
- package/dist/lib/pages/payments/account-credit.page.js.map +1 -1
- package/dist/lib/pages/payments/credit-targets.d.ts +25 -0
- package/dist/lib/pages/payments/credit-targets.d.ts.map +1 -0
- package/dist/lib/pages/payments/credit-targets.js +43 -0
- package/dist/lib/pages/payments/credit-targets.js.map +1 -0
- package/dist/lib/pages/receivables/billing.page.js +1 -1
- package/dist/lib/pages/receivables/billing.page.js.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.d.ts +1 -0
- package/dist/lib/pages/receivables/customer-ar.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.js +24 -29
- package/dist/lib/pages/receivables/customer-ar.page.js.map +1 -1
- package/dist/lib/pages/receivables/external-invoicing-queue.page.js +3 -3
- package/dist/lib/pages/receivables/external-invoicing-queue.page.js.map +1 -1
- package/dist/lib/pages/receivables/overdue.page.d.ts +1 -0
- package/dist/lib/pages/receivables/overdue.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/overdue.page.js +6 -3
- package/dist/lib/pages/receivables/overdue.page.js.map +1 -1
- package/dist/lib/pages/receivables/progress.page.js +3 -3
- package/dist/lib/pages/receivables/progress.page.js.map +1 -1
- package/dist/lib/pages/receivables/subscriptions.page.js +10 -10
- package/dist/lib/pages/receivables/subscriptions.page.js.map +1 -1
- package/dist/lib/panels/allocation-grid.component.d.ts.map +1 -1
- package/dist/lib/panels/allocation-grid.component.js +16 -23
- package/dist/lib/panels/allocation-grid.component.js.map +1 -1
- package/dist/lib/panels/decomposition-ladder.component.d.ts.map +1 -1
- package/dist/lib/panels/decomposition-ladder.component.js +28 -30
- package/dist/lib/panels/decomposition-ladder.component.js.map +1 -1
- package/dist/lib/panels/external-invoice-view.d.ts +29 -0
- package/dist/lib/panels/external-invoice-view.d.ts.map +1 -1
- package/dist/lib/panels/external-invoice-view.js +35 -8
- package/dist/lib/panels/external-invoice-view.js.map +1 -1
- package/dist/lib/panels/journal-entry-preview.component.js +7 -7
- package/dist/lib/panels/journal-entry-preview.component.js.map +1 -1
- package/dist/lib/panels/line-price-picker.component.d.ts +5 -0
- package/dist/lib/panels/line-price-picker.component.d.ts.map +1 -1
- package/dist/lib/panels/line-price-picker.component.js +54 -41
- package/dist/lib/panels/line-price-picker.component.js.map +1 -1
- package/dist/lib/panels/money-strip.component.js +6 -6
- package/dist/lib/panels/money-strip.component.js.map +1 -1
- package/dist/lib/panels/party-orders-overview.component.d.ts.map +1 -1
- package/dist/lib/panels/party-orders-overview.component.js +59 -75
- package/dist/lib/panels/party-orders-overview.component.js.map +1 -1
- package/dist/lib/panels/status-stepper.component.d.ts +1 -1
- package/dist/lib/panels/worklist-table.component.d.ts +2 -2
- package/dist/lib/panels/worklist-table.component.d.ts.map +1 -1
- package/dist/lib/panels/worklist-table.component.js +65 -105
- package/dist/lib/panels/worklist-table.component.js.map +1 -1
- package/dist/lib/sections/orders-sections.component.js +8 -8
- package/dist/lib/sections/orders-sections.component.js.map +1 -1
- package/dist/lib/sections/section-shell.component.js +2 -2
- package/dist/lib/styles/orders-kit.css +34 -204
- package/package.json +4 -2
|
@@ -38787,7 +38787,7 @@ var MJCheckoutWidgetComponent = class _MJCheckoutWidgetComponent {
|
|
|
38787
38787
|
\u0275\u0275advance(3);
|
|
38788
38788
|
\u0275\u0275property("disabled", ctx.isProcessing);
|
|
38789
38789
|
}
|
|
38790
|
-
}, dependencies: [CommonModule, FormsModule, NgSelectOption, \u0275NgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, NgControlStatus, RequiredValidator, MaxLengthValidator, MinValidator, MaxValidator, NgModel], styles: ['[_nghost-%COMP%] {\n display: block;\n font-family: var(--mj-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);\n color: var(--mj-text-color, #1e293b);\n}\n\n.mj-checkout-widget-container[_ngcontent-%COMP%] {\n max-width: 560px;\n margin: 0 auto;\n background: var(--mj-bg-color, #ffffff);\n border: 1px solid #e2e8f0;\n border-radius: var(--mj-border-radius, 8px);\n padding: 24px;\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);\n}\n\n.mj-widget-header[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.mj-widget-title[_ngcontent-%COMP%] {\n margin: 0 0 6px 0;\n font-size: 1.35rem;\n font-weight: 700;\n color: var(--mj-text-color, #0f172a);\n}\n\n.mj-widget-description[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 0.9rem;\n color: #64748b;\n line-height: 1.4;\n}\n\n.mj-widget-error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n margin-bottom: 18px;\n font-size: 0.875rem;\n}\n\n.mj-error-icon[_ngcontent-%COMP%] {\n font-size: 1rem;\n}\n\n.mj-widget-summary-card[_ngcontent-%COMP%] {\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 14px 16px;\n margin-bottom: 20px;\n}\n\n.mj-summary-row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.mj-summary-price[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n}\n\n.mj-widget-form-section[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.mj-summary-item-info[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mj-product-name[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 1rem;\n color: #1e293b;\n}\n\n.mj-badge-free[_ngcontent-%COMP%] {\n background: #dcfce7;\n color: #166534;\n font-size: 0.75rem;\n font-weight: 700;\n padding: 2px 6px;\n border-radius: 4px;\n}\n\n.mj-price-free[_ngcontent-%COMP%] {\n font-weight: 700;\n color: #166534;\n font-size: 1.1rem;\n}\n\n.mj-price-amount[_ngcontent-%COMP%] {\n font-weight: 700;\n color: #0f172a;\n font-size: 1.1rem;\n}\n\n.mj-quantity-selector-row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\n padding-top: 12px;\n border-top: 1px dashed #cbd5e1;\n}\n\n.mj-qty-controls[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-qty-btn[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n background: #ffffff;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n cursor: pointer;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-qty-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.mj-qty-input[_ngcontent-%COMP%] {\n width: 44px;\n height: 28px;\n text-align: center;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n font-weight: 600;\n}\n\n.mj-section-title[_ngcontent-%COMP%] {\n font-size: 1rem;\n font-weight: 600;\n margin: 0 0 12px 0;\n color: #334155;\n}\n\n.mj-form-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 12px;\n margin-bottom: 18px;\n}\n\n.mj-form-group[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.mj-form-group.full-width[_ngcontent-%COMP%] {\n grid-column: 1 / -1;\n}\n\n.mj-label[_ngcontent-%COMP%] {\n font-size: 0.8rem;\n font-weight: 500;\n color: #475569;\n}\n\n.mj-required[_ngcontent-%COMP%] {\n color: #ef4444;\n}\n\n.mj-input[_ngcontent-%COMP%], .mj-select[_ngcontent-%COMP%] {\n padding: 8px 12px;\n font-size: 0.9rem;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n background: #ffffff;\n color: #1e293b;\n outline: none;\n transition: border-color 0.15s ease;\n width: 100%;\n box-sizing: border-box;\n}\n\n.mj-textarea[_ngcontent-%COMP%] {\n min-height: 70px;\n resize: vertical;\n font-family: inherit;\n}\n\n.mj-select[_ngcontent-%COMP%] {\n min-height: 38px;\n}\n\n.mj-checkbox-label[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 400;\n color: #334155;\n margin-top: 4px;\n}\n\n\n\n.mj-question-other[_ngcontent-%COMP%] {\n margin-top: 8px;\n}\n\n\n\n.mj-choice-group[_ngcontent-%COMP%] {\n border: 0;\n margin: 0;\n padding: 0;\n}\n\n.mj-choice-count[_ngcontent-%COMP%] {\n font-weight: normal;\n color: #64748b;\n}\n\n.mj-choice-options[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.mj-checkbox-label.is-disabled[_ngcontent-%COMP%] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.mj-input[_ngcontent-%COMP%]:focus, .mj-select[_ngcontent-%COMP%]:focus {\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n\n\n.mj-input[readonly][_ngcontent-%COMP%] {\n background: #f1f5f9;\n color: #475569;\n cursor: default;\n}\n\n.mj-field-hint[_ngcontent-%COMP%] {\n font-size: 0.8rem;\n color: #64748b;\n margin: 0.25rem 0 0;\n}\n\n.mj-multi-attendee-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 12px;\n}\n\n.mj-btn-link[_ngcontent-%COMP%] {\n background: none;\n border: none;\n color: var(--mj-primary-color, #2563eb);\n font-size: 0.8rem;\n cursor: pointer;\n text-decoration: underline;\n padding: 0;\n}\n\n.mj-attendee-matrix[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 14px;\n margin-bottom: 20px;\n}\n\n.mj-attendee-card[_ngcontent-%COMP%] {\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 12px 14px;\n}\n\n.mj-attendee-card-title[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #475569;\n margin-bottom: 10px;\n}\n\n\n\n.mj-widget-payment-section[_ngcontent-%COMP%] {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid #e2e8f0;\n}\n\n.mj-stripe-container[_ngcontent-%COMP%] {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 14px;\n margin-bottom: 16px;\n}\n\n.mj-stripe-mount-point[_ngcontent-%COMP%] {\n min-height: 40px;\n}\n\n.mj-stripe-badge[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 10px;\n font-size: 0.75rem;\n color: #64748b;\n}\n\n.mj-stripe-lock-icon[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n}\n\n.mj-checkout-total-row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 0;\n border-top: 1px solid #e2e8f0;\n margin-top: 10px;\n margin-bottom: 18px;\n}\n\n.mj-total-label[_ngcontent-%COMP%] {\n font-weight: 700;\n font-size: 1.05rem;\n color: #0f172a;\n}\n\n.mj-total-amount[_ngcontent-%COMP%] {\n font-weight: 800;\n font-size: 1.25rem;\n color: var(--mj-primary-color, #2563eb);\n}\n\n.mj-widget-actions[_ngcontent-%COMP%] {\n margin-top: 12px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.mj-btn-submit[_ngcontent-%COMP%] {\n width: 100%;\n padding: 12px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 600;\n border: none;\n border-radius: var(--mj-border-radius, 8px);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n transition: opacity 0.15s ease;\n}\n\n.mj-btn-submit[_ngcontent-%COMP%]:hover:not(:disabled) {\n opacity: 0.92;\n}\n\n.mj-btn-submit[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mj-btn-cancel[_ngcontent-%COMP%] {\n width: 100%;\n padding: 8px 12px;\n background: transparent;\n color: #64748b;\n font-size: 0.875rem;\n font-weight: 500;\n border: none;\n cursor: pointer;\n text-align: center;\n}\n\n.mj-btn-cancel[_ngcontent-%COMP%]:hover:not(:disabled) {\n color: #334155;\n text-decoration: underline;\n}\n\n.mj-spinner[_ngcontent-%COMP%] {\n width: 16px;\n height: 16px;\n border: 2px solid #ffffff;\n border-top-color: transparent;\n border-radius: 50%;\n animation: _ngcontent-%COMP%_mj-spin 0.8s linear infinite;\n}\n\n@keyframes _ngcontent-%COMP%_mj-spin {\n to { transform: rotate(360deg); }\n}\n\n.mj-checkout-consent[_ngcontent-%COMP%] {\n display: flex;\n gap: 0.5rem;\n align-items: flex-start;\n margin: 0.75rem 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.4;\n}\n.mj-checkout-consent[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n margin-top: 0.2rem;\n}\n\n\n\n\n\n.mj-checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], \n.mj-checkout-consent[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%] {\n width: auto;\n height: auto;\n padding: 0;\n border: 0;\n flex: 0 0 auto;\n}\n\n.mj-checkout-promo[_ngcontent-%COMP%] {\n margin: 0.75rem 0;\n}\n.mj-checkout-promo__label[_ngcontent-%COMP%] {\n display: block;\n font-size: 0.875rem;\n margin-bottom: 0.25rem;\n}\n.mj-checkout-promo__row[_ngcontent-%COMP%] {\n display: flex;\n gap: 0.5rem;\n}\n.mj-checkout-promo__input[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n}\n.mj-checkout-promo__error[_ngcontent-%COMP%] {\n color: var(--mj-error-color, #b91c1c);\n font-size: 0.875rem;\n margin: 0.35rem 0 0;\n}\n.mj-checkout-promo__applied[_ngcontent-%COMP%] {\n color: var(--mj-success-color, #15803d);\n font-size: 0.875rem;\n margin: 0.35rem 0 0;\n}\n.mj-checkout-member-discount[_ngcontent-%COMP%] {\n margin: 0.75rem 0;\n}\n.mj-checkout-promo__apply[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n padding: 8px 14px;\n background: transparent;\n color: var(--mj-primary-color, #2563eb);\n border: 1px solid var(--mj-border-color, #cbd5e1);\n border-radius: var(--mj-border-radius, 8px);\n font-size: 0.875rem;\n font-weight: 600;\n cursor: pointer;\n}\n.mj-checkout-promo__apply[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}'], changeDetection: 0 });
|
|
38790
|
+
}, dependencies: [CommonModule, FormsModule, NgSelectOption, \u0275NgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, NgControlStatus, RequiredValidator, MaxLengthValidator, MinValidator, MaxValidator, NgModel], styles: ['[_nghost-%COMP%] {\n display: block;\n font-family: var(--mj-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);\n color: var(--mj-text-color, #1e293b);\n}\n\n.mj-checkout-widget-container[_ngcontent-%COMP%] {\n \n\n\n --mjo-co-border: #cbd5e1;\n --mjo-co-error: #b91c1c;\n --mjo-co-success: #15803d;\n max-width: 560px;\n margin: 0 auto;\n background: var(--mj-bg-color, #ffffff);\n border: 1px solid #e2e8f0;\n border-radius: var(--mj-border-radius, 8px);\n padding: 24px;\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);\n}\n\n.mj-widget-header[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.mj-widget-title[_ngcontent-%COMP%] {\n margin: 0 0 6px 0;\n font-size: 1.35rem;\n font-weight: 700;\n color: var(--mj-text-color, #0f172a);\n}\n\n.mj-widget-description[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 0.9rem;\n color: #64748b;\n line-height: 1.4;\n}\n\n.mj-widget-error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n margin-bottom: 18px;\n font-size: 0.875rem;\n}\n\n.mj-error-icon[_ngcontent-%COMP%] {\n font-size: 1rem;\n}\n\n.mj-widget-summary-card[_ngcontent-%COMP%] {\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 14px 16px;\n margin-bottom: 20px;\n}\n\n.mj-summary-row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.mj-summary-price[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n}\n\n.mj-widget-form-section[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.mj-summary-item-info[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mj-product-name[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 1rem;\n color: #1e293b;\n}\n\n.mj-badge-free[_ngcontent-%COMP%] {\n background: #dcfce7;\n color: #166534;\n font-size: 0.75rem;\n font-weight: 700;\n padding: 2px 6px;\n border-radius: 4px;\n}\n\n.mj-price-free[_ngcontent-%COMP%] {\n font-weight: 700;\n color: #166534;\n font-size: 1.1rem;\n}\n\n.mj-price-amount[_ngcontent-%COMP%] {\n font-weight: 700;\n color: #0f172a;\n font-size: 1.1rem;\n}\n\n.mj-quantity-selector-row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\n padding-top: 12px;\n border-top: 1px dashed #cbd5e1;\n}\n\n.mj-qty-controls[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-qty-btn[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n background: #ffffff;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n cursor: pointer;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-qty-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.mj-qty-input[_ngcontent-%COMP%] {\n width: 44px;\n height: 28px;\n text-align: center;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n font-weight: 600;\n}\n\n.mj-section-title[_ngcontent-%COMP%] {\n font-size: 1rem;\n font-weight: 600;\n margin: 0 0 12px 0;\n color: #334155;\n}\n\n.mj-form-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 12px;\n margin-bottom: 18px;\n}\n\n.mj-form-group[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.mj-form-group.full-width[_ngcontent-%COMP%] {\n grid-column: 1 / -1;\n}\n\n.mj-label[_ngcontent-%COMP%] {\n font-size: 0.8rem;\n font-weight: 500;\n color: #475569;\n}\n\n.mj-required[_ngcontent-%COMP%] {\n color: #ef4444;\n}\n\n.mj-input[_ngcontent-%COMP%], .mj-select[_ngcontent-%COMP%] {\n padding: 8px 12px;\n font-size: 0.9rem;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n background: #ffffff;\n color: #1e293b;\n outline: none;\n transition: border-color 0.15s ease;\n width: 100%;\n box-sizing: border-box;\n}\n\n.mj-textarea[_ngcontent-%COMP%] {\n min-height: 70px;\n resize: vertical;\n font-family: inherit;\n}\n\n.mj-select[_ngcontent-%COMP%] {\n min-height: 38px;\n}\n\n.mj-checkbox-label[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 400;\n color: #334155;\n margin-top: 4px;\n}\n\n\n\n.mj-question-other[_ngcontent-%COMP%] {\n margin-top: 8px;\n}\n\n\n\n.mj-choice-group[_ngcontent-%COMP%] {\n border: 0;\n margin: 0;\n padding: 0;\n}\n\n.mj-choice-count[_ngcontent-%COMP%] {\n font-weight: normal;\n color: #64748b;\n}\n\n.mj-choice-options[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.mj-checkbox-label.is-disabled[_ngcontent-%COMP%] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.mj-input[_ngcontent-%COMP%]:focus, .mj-select[_ngcontent-%COMP%]:focus {\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n\n\n.mj-input[readonly][_ngcontent-%COMP%] {\n background: #f1f5f9;\n color: #475569;\n cursor: default;\n}\n\n.mj-field-hint[_ngcontent-%COMP%] {\n font-size: 0.8rem;\n color: #64748b;\n margin: 0.25rem 0 0;\n}\n\n.mj-multi-attendee-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 12px;\n}\n\n.mj-btn-link[_ngcontent-%COMP%] {\n background: none;\n border: none;\n color: var(--mj-primary-color, #2563eb);\n font-size: 0.8rem;\n cursor: pointer;\n text-decoration: underline;\n padding: 0;\n}\n\n.mj-attendee-matrix[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 14px;\n margin-bottom: 20px;\n}\n\n.mj-attendee-card[_ngcontent-%COMP%] {\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 12px 14px;\n}\n\n.mj-attendee-card-title[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #475569;\n margin-bottom: 10px;\n}\n\n\n\n.mj-widget-payment-section[_ngcontent-%COMP%] {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid #e2e8f0;\n}\n\n.mj-stripe-container[_ngcontent-%COMP%] {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 14px;\n margin-bottom: 16px;\n}\n\n.mj-stripe-mount-point[_ngcontent-%COMP%] {\n min-height: 40px;\n}\n\n.mj-stripe-badge[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 10px;\n font-size: 0.75rem;\n color: #64748b;\n}\n\n.mj-stripe-lock-icon[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n}\n\n.mj-checkout-total-row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 0;\n border-top: 1px solid #e2e8f0;\n margin-top: 10px;\n margin-bottom: 18px;\n}\n\n.mj-total-label[_ngcontent-%COMP%] {\n font-weight: 700;\n font-size: 1.05rem;\n color: #0f172a;\n}\n\n.mj-total-amount[_ngcontent-%COMP%] {\n font-weight: 800;\n font-size: 1.25rem;\n color: var(--mj-primary-color, #2563eb);\n}\n\n.mj-widget-actions[_ngcontent-%COMP%] {\n margin-top: 12px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.mj-btn-submit[_ngcontent-%COMP%] {\n width: 100%;\n padding: 12px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 600;\n border: none;\n border-radius: var(--mj-border-radius, 8px);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n transition: opacity 0.15s ease;\n}\n\n.mj-btn-submit[_ngcontent-%COMP%]:hover:not(:disabled) {\n opacity: 0.92;\n}\n\n.mj-btn-submit[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mj-btn-cancel[_ngcontent-%COMP%] {\n width: 100%;\n padding: 8px 12px;\n background: transparent;\n color: #64748b;\n font-size: 0.875rem;\n font-weight: 500;\n border: none;\n cursor: pointer;\n text-align: center;\n}\n\n.mj-btn-cancel[_ngcontent-%COMP%]:hover:not(:disabled) {\n color: #334155;\n text-decoration: underline;\n}\n\n.mj-spinner[_ngcontent-%COMP%] {\n width: 16px;\n height: 16px;\n border: 2px solid #ffffff;\n border-top-color: transparent;\n border-radius: 50%;\n animation: _ngcontent-%COMP%_mj-spin 0.8s linear infinite;\n}\n\n@keyframes _ngcontent-%COMP%_mj-spin {\n to { transform: rotate(360deg); }\n}\n\n.mj-checkout-consent[_ngcontent-%COMP%] {\n display: flex;\n gap: 0.5rem;\n align-items: flex-start;\n margin: 0.75rem 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.4;\n}\n.mj-checkout-consent[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n margin-top: 0.2rem;\n}\n\n\n\n\n\n.mj-checkbox-label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], \n.mj-checkout-consent[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%] {\n width: auto;\n height: auto;\n padding: 0;\n border: 0;\n flex: 0 0 auto;\n}\n\n.mj-checkout-promo[_ngcontent-%COMP%] {\n margin: 0.75rem 0;\n}\n.mj-checkout-promo__label[_ngcontent-%COMP%] {\n display: block;\n font-size: 0.875rem;\n margin-bottom: 0.25rem;\n}\n.mj-checkout-promo__row[_ngcontent-%COMP%] {\n display: flex;\n gap: 0.5rem;\n}\n.mj-checkout-promo__input[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n}\n.mj-checkout-promo__error[_ngcontent-%COMP%] {\n color: var(--mjo-co-error);\n font-size: 0.875rem;\n margin: 0.35rem 0 0;\n}\n.mj-checkout-promo__applied[_ngcontent-%COMP%] {\n color: var(--mjo-co-success);\n font-size: 0.875rem;\n margin: 0.35rem 0 0;\n}\n.mj-checkout-member-discount[_ngcontent-%COMP%] {\n margin: 0.75rem 0;\n}\n.mj-checkout-promo__apply[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n padding: 8px 14px;\n background: transparent;\n color: var(--mj-primary-color, #2563eb);\n border: 1px solid var(--mjo-co-border);\n border-radius: var(--mj-border-radius, 8px);\n font-size: 0.875rem;\n font-weight: 600;\n cursor: pointer;\n}\n.mj-checkout-promo__apply[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}'], changeDetection: 0 });
|
|
38791
38791
|
};
|
|
38792
38792
|
(() => {
|
|
38793
38793
|
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(MJCheckoutWidgetComponent, [{
|
|
@@ -39243,7 +39243,7 @@ var MJCheckoutWidgetComponent = class _MJCheckoutWidgetComponent {
|
|
|
39243
39243
|
</button>
|
|
39244
39244
|
</div>
|
|
39245
39245
|
</div>
|
|
39246
|
-
`, styles: [':host {\n display: block;\n font-family: var(--mj-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);\n color: var(--mj-text-color, #1e293b);\n}\n\n.mj-checkout-widget-container {\n max-width: 560px;\n margin: 0 auto;\n background: var(--mj-bg-color, #ffffff);\n border: 1px solid #e2e8f0;\n border-radius: var(--mj-border-radius, 8px);\n padding: 24px;\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);\n}\n\n.mj-widget-header {\n margin-bottom: 20px;\n}\n\n.mj-widget-title {\n margin: 0 0 6px 0;\n font-size: 1.35rem;\n font-weight: 700;\n color: var(--mj-text-color, #0f172a);\n}\n\n.mj-widget-description {\n margin: 0;\n font-size: 0.9rem;\n color: #64748b;\n line-height: 1.4;\n}\n\n.mj-widget-error-banner {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n margin-bottom: 18px;\n font-size: 0.875rem;\n}\n\n.mj-error-icon {\n font-size: 1rem;\n}\n\n.mj-widget-summary-card {\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 14px 16px;\n margin-bottom: 20px;\n}\n\n.mj-summary-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.mj-summary-price {\n display: flex;\n align-items: center;\n}\n\n.mj-widget-form-section {\n margin-bottom: 20px;\n}\n\n.mj-summary-item-info {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mj-product-name {\n font-weight: 600;\n font-size: 1rem;\n color: #1e293b;\n}\n\n.mj-badge-free {\n background: #dcfce7;\n color: #166534;\n font-size: 0.75rem;\n font-weight: 700;\n padding: 2px 6px;\n border-radius: 4px;\n}\n\n.mj-price-free {\n font-weight: 700;\n color: #166534;\n font-size: 1.1rem;\n}\n\n.mj-price-amount {\n font-weight: 700;\n color: #0f172a;\n font-size: 1.1rem;\n}\n\n.mj-quantity-selector-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\n padding-top: 12px;\n border-top: 1px dashed #cbd5e1;\n}\n\n.mj-qty-controls {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-qty-btn {\n width: 28px;\n height: 28px;\n background: #ffffff;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n cursor: pointer;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-qty-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.mj-qty-input {\n width: 44px;\n height: 28px;\n text-align: center;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n font-weight: 600;\n}\n\n.mj-section-title {\n font-size: 1rem;\n font-weight: 600;\n margin: 0 0 12px 0;\n color: #334155;\n}\n\n.mj-form-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 12px;\n margin-bottom: 18px;\n}\n\n.mj-form-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.mj-form-group.full-width {\n grid-column: 1 / -1;\n}\n\n.mj-label {\n font-size: 0.8rem;\n font-weight: 500;\n color: #475569;\n}\n\n.mj-required {\n color: #ef4444;\n}\n\n.mj-input, .mj-select {\n padding: 8px 12px;\n font-size: 0.9rem;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n background: #ffffff;\n color: #1e293b;\n outline: none;\n transition: border-color 0.15s ease;\n width: 100%;\n box-sizing: border-box;\n}\n\n.mj-textarea {\n min-height: 70px;\n resize: vertical;\n font-family: inherit;\n}\n\n.mj-select {\n min-height: 38px;\n}\n\n.mj-checkbox-label {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 400;\n color: #334155;\n margin-top: 4px;\n}\n\n/* The free-text answer that appears under a question\'s "Other" choice. */\n.mj-question-other {\n margin-top: 8px;\n}\n\n/* A choice group: its options stacked, with how many to pick beside the heading. */\n.mj-choice-group {\n border: 0;\n margin: 0;\n padding: 0;\n}\n\n.mj-choice-count {\n font-weight: normal;\n color: #64748b;\n}\n\n.mj-choice-options {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.mj-checkbox-label.is-disabled {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.mj-input:focus, .mj-select:focus {\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n/* The e-mail a member token was signed for (#919): shown, not editable. */\n.mj-input[readonly] {\n background: #f1f5f9;\n color: #475569;\n cursor: default;\n}\n\n.mj-field-hint {\n font-size: 0.8rem;\n color: #64748b;\n margin: 0.25rem 0 0;\n}\n\n.mj-multi-attendee-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 12px;\n}\n\n.mj-btn-link {\n background: none;\n border: none;\n color: var(--mj-primary-color, #2563eb);\n font-size: 0.8rem;\n cursor: pointer;\n text-decoration: underline;\n padding: 0;\n}\n\n.mj-attendee-matrix {\n display: flex;\n flex-direction: column;\n gap: 14px;\n margin-bottom: 20px;\n}\n\n.mj-attendee-card {\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 12px 14px;\n}\n\n.mj-attendee-card-title {\n font-size: 0.85rem;\n font-weight: 600;\n color: #475569;\n margin-bottom: 10px;\n}\n\n/* Stripe Payment Container */\n.mj-widget-payment-section {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid #e2e8f0;\n}\n\n.mj-stripe-container {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 14px;\n margin-bottom: 16px;\n}\n\n.mj-stripe-mount-point {\n min-height: 40px;\n}\n\n.mj-stripe-badge {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 10px;\n font-size: 0.75rem;\n color: #64748b;\n}\n\n.mj-stripe-lock-icon {\n font-size: 0.85rem;\n}\n\n.mj-checkout-total-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 0;\n border-top: 1px solid #e2e8f0;\n margin-top: 10px;\n margin-bottom: 18px;\n}\n\n.mj-total-label {\n font-weight: 700;\n font-size: 1.05rem;\n color: #0f172a;\n}\n\n.mj-total-amount {\n font-weight: 800;\n font-size: 1.25rem;\n color: var(--mj-primary-color, #2563eb);\n}\n\n.mj-widget-actions {\n margin-top: 12px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.mj-btn-submit {\n width: 100%;\n padding: 12px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 600;\n border: none;\n border-radius: var(--mj-border-radius, 8px);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n transition: opacity 0.15s ease;\n}\n\n.mj-btn-submit:hover:not(:disabled) {\n opacity: 0.92;\n}\n\n.mj-btn-submit:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mj-btn-cancel {\n width: 100%;\n padding: 8px 12px;\n background: transparent;\n color: #64748b;\n font-size: 0.875rem;\n font-weight: 500;\n border: none;\n cursor: pointer;\n text-align: center;\n}\n\n.mj-btn-cancel:hover:not(:disabled) {\n color: #334155;\n text-decoration: underline;\n}\n\n.mj-spinner {\n width: 16px;\n height: 16px;\n border: 2px solid #ffffff;\n border-top-color: transparent;\n border-radius: 50%;\n animation: mj-spin 0.8s linear infinite;\n}\n\n@keyframes mj-spin {\n to { transform: rotate(360deg); }\n}\n\n.mj-checkout-consent {\n display: flex;\n gap: 0.5rem;\n align-items: flex-start;\n margin: 0.75rem 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.4;\n}\n.mj-checkout-consent input {\n margin-top: 0.2rem;\n}\n\n/* Checkboxes keep their native size even when the host page styles every input\n (e.g. `input { width: 100% }`): this rule is scoped to the widget, so it outranks\n a plain element or class selector on the host page. */\n.mj-checkbox-label input[type=checkbox],\n.mj-checkout-consent input[type=checkbox] {\n width: auto;\n height: auto;\n padding: 0;\n border: 0;\n flex: 0 0 auto;\n}\n\n.mj-checkout-promo {\n margin: 0.75rem 0;\n}\n.mj-checkout-promo__label {\n display: block;\n font-size: 0.875rem;\n margin-bottom: 0.25rem;\n}\n.mj-checkout-promo__row {\n display: flex;\n gap: 0.5rem;\n}\n.mj-checkout-promo__input {\n flex: 1 1 auto;\n}\n.mj-checkout-promo__error {\n color: var(--
|
|
39246
|
+
`, styles: [':host {\n display: block;\n font-family: var(--mj-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);\n color: var(--mj-text-color, #1e293b);\n}\n\n.mj-checkout-widget-container {\n /* Widget-local colours with no public theme hook. The widget embeds in host pages that\n do not load MJ\'s tokens, so these stay literal. */\n --mjo-co-border: #cbd5e1;\n --mjo-co-error: #b91c1c;\n --mjo-co-success: #15803d;\n max-width: 560px;\n margin: 0 auto;\n background: var(--mj-bg-color, #ffffff);\n border: 1px solid #e2e8f0;\n border-radius: var(--mj-border-radius, 8px);\n padding: 24px;\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);\n}\n\n.mj-widget-header {\n margin-bottom: 20px;\n}\n\n.mj-widget-title {\n margin: 0 0 6px 0;\n font-size: 1.35rem;\n font-weight: 700;\n color: var(--mj-text-color, #0f172a);\n}\n\n.mj-widget-description {\n margin: 0;\n font-size: 0.9rem;\n color: #64748b;\n line-height: 1.4;\n}\n\n.mj-widget-error-banner {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n margin-bottom: 18px;\n font-size: 0.875rem;\n}\n\n.mj-error-icon {\n font-size: 1rem;\n}\n\n.mj-widget-summary-card {\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 14px 16px;\n margin-bottom: 20px;\n}\n\n.mj-summary-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.mj-summary-price {\n display: flex;\n align-items: center;\n}\n\n.mj-widget-form-section {\n margin-bottom: 20px;\n}\n\n.mj-summary-item-info {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mj-product-name {\n font-weight: 600;\n font-size: 1rem;\n color: #1e293b;\n}\n\n.mj-badge-free {\n background: #dcfce7;\n color: #166534;\n font-size: 0.75rem;\n font-weight: 700;\n padding: 2px 6px;\n border-radius: 4px;\n}\n\n.mj-price-free {\n font-weight: 700;\n color: #166534;\n font-size: 1.1rem;\n}\n\n.mj-price-amount {\n font-weight: 700;\n color: #0f172a;\n font-size: 1.1rem;\n}\n\n.mj-quantity-selector-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\n padding-top: 12px;\n border-top: 1px dashed #cbd5e1;\n}\n\n.mj-qty-controls {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-qty-btn {\n width: 28px;\n height: 28px;\n background: #ffffff;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n cursor: pointer;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-qty-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.mj-qty-input {\n width: 44px;\n height: 28px;\n text-align: center;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n font-weight: 600;\n}\n\n.mj-section-title {\n font-size: 1rem;\n font-weight: 600;\n margin: 0 0 12px 0;\n color: #334155;\n}\n\n.mj-form-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 12px;\n margin-bottom: 18px;\n}\n\n.mj-form-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.mj-form-group.full-width {\n grid-column: 1 / -1;\n}\n\n.mj-label {\n font-size: 0.8rem;\n font-weight: 500;\n color: #475569;\n}\n\n.mj-required {\n color: #ef4444;\n}\n\n.mj-input, .mj-select {\n padding: 8px 12px;\n font-size: 0.9rem;\n border: 1px solid #cbd5e1;\n border-radius: 4px;\n background: #ffffff;\n color: #1e293b;\n outline: none;\n transition: border-color 0.15s ease;\n width: 100%;\n box-sizing: border-box;\n}\n\n.mj-textarea {\n min-height: 70px;\n resize: vertical;\n font-family: inherit;\n}\n\n.mj-select {\n min-height: 38px;\n}\n\n.mj-checkbox-label {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 400;\n color: #334155;\n margin-top: 4px;\n}\n\n/* The free-text answer that appears under a question\'s "Other" choice. */\n.mj-question-other {\n margin-top: 8px;\n}\n\n/* A choice group: its options stacked, with how many to pick beside the heading. */\n.mj-choice-group {\n border: 0;\n margin: 0;\n padding: 0;\n}\n\n.mj-choice-count {\n font-weight: normal;\n color: #64748b;\n}\n\n.mj-choice-options {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.mj-checkbox-label.is-disabled {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.mj-input:focus, .mj-select:focus {\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n/* The e-mail a member token was signed for (#919): shown, not editable. */\n.mj-input[readonly] {\n background: #f1f5f9;\n color: #475569;\n cursor: default;\n}\n\n.mj-field-hint {\n font-size: 0.8rem;\n color: #64748b;\n margin: 0.25rem 0 0;\n}\n\n.mj-multi-attendee-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 12px;\n}\n\n.mj-btn-link {\n background: none;\n border: none;\n color: var(--mj-primary-color, #2563eb);\n font-size: 0.8rem;\n cursor: pointer;\n text-decoration: underline;\n padding: 0;\n}\n\n.mj-attendee-matrix {\n display: flex;\n flex-direction: column;\n gap: 14px;\n margin-bottom: 20px;\n}\n\n.mj-attendee-card {\n background: #f8fafc;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 12px 14px;\n}\n\n.mj-attendee-card-title {\n font-size: 0.85rem;\n font-weight: 600;\n color: #475569;\n margin-bottom: 10px;\n}\n\n/* Stripe Payment Container */\n.mj-widget-payment-section {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid #e2e8f0;\n}\n\n.mj-stripe-container {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n padding: 14px;\n margin-bottom: 16px;\n}\n\n.mj-stripe-mount-point {\n min-height: 40px;\n}\n\n.mj-stripe-badge {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 10px;\n font-size: 0.75rem;\n color: #64748b;\n}\n\n.mj-stripe-lock-icon {\n font-size: 0.85rem;\n}\n\n.mj-checkout-total-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 0;\n border-top: 1px solid #e2e8f0;\n margin-top: 10px;\n margin-bottom: 18px;\n}\n\n.mj-total-label {\n font-weight: 700;\n font-size: 1.05rem;\n color: #0f172a;\n}\n\n.mj-total-amount {\n font-weight: 800;\n font-size: 1.25rem;\n color: var(--mj-primary-color, #2563eb);\n}\n\n.mj-widget-actions {\n margin-top: 12px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.mj-btn-submit {\n width: 100%;\n padding: 12px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 600;\n border: none;\n border-radius: var(--mj-border-radius, 8px);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n transition: opacity 0.15s ease;\n}\n\n.mj-btn-submit:hover:not(:disabled) {\n opacity: 0.92;\n}\n\n.mj-btn-submit:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mj-btn-cancel {\n width: 100%;\n padding: 8px 12px;\n background: transparent;\n color: #64748b;\n font-size: 0.875rem;\n font-weight: 500;\n border: none;\n cursor: pointer;\n text-align: center;\n}\n\n.mj-btn-cancel:hover:not(:disabled) {\n color: #334155;\n text-decoration: underline;\n}\n\n.mj-spinner {\n width: 16px;\n height: 16px;\n border: 2px solid #ffffff;\n border-top-color: transparent;\n border-radius: 50%;\n animation: mj-spin 0.8s linear infinite;\n}\n\n@keyframes mj-spin {\n to { transform: rotate(360deg); }\n}\n\n.mj-checkout-consent {\n display: flex;\n gap: 0.5rem;\n align-items: flex-start;\n margin: 0.75rem 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.4;\n}\n.mj-checkout-consent input {\n margin-top: 0.2rem;\n}\n\n/* Checkboxes keep their native size even when the host page styles every input\n (e.g. `input { width: 100% }`): this rule is scoped to the widget, so it outranks\n a plain element or class selector on the host page. */\n.mj-checkbox-label input[type=checkbox],\n.mj-checkout-consent input[type=checkbox] {\n width: auto;\n height: auto;\n padding: 0;\n border: 0;\n flex: 0 0 auto;\n}\n\n.mj-checkout-promo {\n margin: 0.75rem 0;\n}\n.mj-checkout-promo__label {\n display: block;\n font-size: 0.875rem;\n margin-bottom: 0.25rem;\n}\n.mj-checkout-promo__row {\n display: flex;\n gap: 0.5rem;\n}\n.mj-checkout-promo__input {\n flex: 1 1 auto;\n}\n.mj-checkout-promo__error {\n color: var(--mjo-co-error);\n font-size: 0.875rem;\n margin: 0.35rem 0 0;\n}\n.mj-checkout-promo__applied {\n color: var(--mjo-co-success);\n font-size: 0.875rem;\n margin: 0.35rem 0 0;\n}\n.mj-checkout-member-discount {\n margin: 0.75rem 0;\n}\n.mj-checkout-promo__apply {\n flex: 0 0 auto;\n padding: 8px 14px;\n background: transparent;\n color: var(--mj-primary-color, #2563eb);\n border: 1px solid var(--mjo-co-border);\n border-radius: var(--mj-border-radius, 8px);\n font-size: 0.875rem;\n font-weight: 600;\n cursor: pointer;\n}\n.mj-checkout-promo__apply:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n'] }]
|
|
39247
39247
|
}], () => [{ type: ElementRef }, { type: Renderer2 }], { config: [{
|
|
39248
39248
|
type: Input
|
|
39249
39249
|
}], distributionSlug: [{
|
|
@@ -39947,7 +39947,12 @@ function CheckoutPublicHostComponent_Conditional_6_Template(rf, ctx) {
|
|
|
39947
39947
|
}
|
|
39948
39948
|
var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
|
|
39949
39949
|
hostEl = inject2(ElementRef, { optional: true });
|
|
39950
|
-
|
|
39950
|
+
changeDetector = inject2(ChangeDetectorRef);
|
|
39951
|
+
/**
|
|
39952
|
+
* Every redraw goes through here, so none runs once the host has removed the element: the async
|
|
39953
|
+
* paths (a payment, `/complete`, the access poll) resume after it and would draw a dead view.
|
|
39954
|
+
*/
|
|
39955
|
+
cdr = { detectChanges: () => this.destroyed ? void 0 : this.changeDetector.detectChanges() };
|
|
39951
39956
|
slug = "";
|
|
39952
39957
|
apiRoot = "/checkout";
|
|
39953
39958
|
/** A host-signed membership token, verified server-side on /draft and never stored (#324). */
|
|
@@ -40128,6 +40133,12 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
|
|
|
40128
40133
|
void this.mountStripe(mount);
|
|
40129
40134
|
}
|
|
40130
40135
|
}
|
|
40136
|
+
/**
|
|
40137
|
+
* The host removed the element. A payment or `/complete` already in flight is left to finish, so a
|
|
40138
|
+
* charged card still completes on the server, and the session-storage marker that lets a reload
|
|
40139
|
+
* resume the account step is still kept. Everything that speaks to the page stops: no events, no
|
|
40140
|
+
* state, no redraws, no access polling, no account step and no redirect.
|
|
40141
|
+
*/
|
|
40131
40142
|
ngOnDestroy() {
|
|
40132
40143
|
this.destroyed = true;
|
|
40133
40144
|
this.cancelBackgroundQuote();
|
|
@@ -40565,6 +40576,8 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
|
|
|
40565
40576
|
try {
|
|
40566
40577
|
const deadline = Date.now() + this.accessPollTimeoutMs;
|
|
40567
40578
|
for (; ; ) {
|
|
40579
|
+
if (this.destroyed)
|
|
40580
|
+
return;
|
|
40568
40581
|
let state = null;
|
|
40569
40582
|
try {
|
|
40570
40583
|
state = ReadAccessState(await this.post("/access-status", { sessionId: this.sessionId, clientSessionKey: this.sessionKey }));
|
|
@@ -40589,6 +40602,8 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
|
|
|
40589
40602
|
}
|
|
40590
40603
|
/** Asks for the account step of the completed checkout. The host is asked again only after a failure. */
|
|
40591
40604
|
async loadAccount() {
|
|
40605
|
+
if (this.destroyed)
|
|
40606
|
+
return;
|
|
40592
40607
|
this.accountLoading = true;
|
|
40593
40608
|
this.cdr.detectChanges();
|
|
40594
40609
|
try {
|
|
@@ -40703,13 +40718,15 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
|
|
|
40703
40718
|
}
|
|
40704
40719
|
/** Follows the widget's redirect once nothing is left for the buyer to do here. */
|
|
40705
40720
|
leaveIfDone() {
|
|
40721
|
+
if (this.destroyed)
|
|
40722
|
+
return;
|
|
40706
40723
|
if (this.config?.redirectUrl && !this.accountLoading && !this.accessTracking && MayRedirect(this.account, this.accountDismissed)) {
|
|
40707
40724
|
window.location.href = WithOrderReference(this.config.redirectUrl, this.orderNumber, window.location.href);
|
|
40708
40725
|
}
|
|
40709
40726
|
}
|
|
40710
40727
|
/** Reports a state the host page can track; repeats of the same state are not re-sent. */
|
|
40711
40728
|
setState(state) {
|
|
40712
|
-
if (this.state === state)
|
|
40729
|
+
if (this.destroyed || this.state === state)
|
|
40713
40730
|
return;
|
|
40714
40731
|
this.state = state;
|
|
40715
40732
|
this.dispatch(CHECKOUT_STATE_CHANGE_EVENT, { state });
|
|
@@ -40718,8 +40735,10 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
|
|
|
40718
40735
|
this.setState("ERROR");
|
|
40719
40736
|
this.dispatch(CHECKOUT_ERROR_EVENT, { message });
|
|
40720
40737
|
}
|
|
40721
|
-
/** Dispatches on the `<mj-orders-checkout>` element; bubbling and composed, so `document` hears it too. */
|
|
40738
|
+
/** Dispatches on the `<mj-orders-checkout>` element; bubbling and composed, so `document` hears it too. Nothing once it is removed. */
|
|
40722
40739
|
dispatch(name, detail) {
|
|
40740
|
+
if (this.destroyed)
|
|
40741
|
+
return;
|
|
40723
40742
|
const el = this.hostEl?.nativeElement;
|
|
40724
40743
|
el?.dispatchEvent(CheckoutElementEvent(name, detail));
|
|
40725
40744
|
}
|
|
@@ -40931,7 +40950,7 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
|
|
|
40931
40950
|
\u0275\u0275advance();
|
|
40932
40951
|
\u0275\u0275conditional(ctx.loadError ? 1 : ctx.successMessage ? 2 : ctx.finishingMessage ? 3 : !ctx.config ? 4 : ctx.renewal ? 5 : 6);
|
|
40933
40952
|
}
|
|
40934
|
-
}, dependencies: [CommonModule, MJCheckoutWidgetComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n}\n\n.mj-checkout-public[_ngcontent-%COMP%] {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status[_ngcontent-%COMP%] {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success[_ngcontent-%COMP%] {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon[_ngcontent-%COMP%] {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg[_ngcontent-%COMP%], \n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n\n\n.mj-checkout-success__access[_ngcontent-%COMP%] {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed[_ngcontent-%COMP%] {\n color: #991b1b;\n}\n\n\n\n.mj-checkout-account[_ngcontent-%COMP%] {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%] {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error[_ngcontent-%COMP%] {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%] {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip[_ngcontent-%COMP%] {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%]:disabled, \n.mj-checkout-account__skip[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg[_ngcontent-%COMP%] {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n}\n\n\n\n.mj-checkout-public__turnstile[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n\n\n\n.mj-checkout-renewal[_ngcontent-%COMP%] {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead[_ngcontent-%COMP%], \n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary[_ngcontent-%COMP%] {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dt[_ngcontent-%COMP%] {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], \n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card[_ngcontent-%COMP%] {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay[_ngcontent-%COMP%] {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--
|
|
40953
|
+
}, dependencies: [CommonModule, MJCheckoutWidgetComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n \n\n --mjo-co-primary: var(--mj-primary-color, #2563eb);\n}\n\n.mj-checkout-public[_ngcontent-%COMP%] {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status[_ngcontent-%COMP%] {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success[_ngcontent-%COMP%] {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon[_ngcontent-%COMP%] {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg[_ngcontent-%COMP%], \n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n\n\n.mj-checkout-success__access[_ngcontent-%COMP%] {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed[_ngcontent-%COMP%] {\n color: #991b1b;\n}\n\n\n\n.mj-checkout-account[_ngcontent-%COMP%] {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%] {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error[_ngcontent-%COMP%] {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%] {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip[_ngcontent-%COMP%] {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%]:disabled, \n.mj-checkout-account__skip[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg[_ngcontent-%COMP%] {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n}\n\n\n\n.mj-checkout-public__turnstile[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n\n\n\n.mj-checkout-renewal[_ngcontent-%COMP%] {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead[_ngcontent-%COMP%], \n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary[_ngcontent-%COMP%] {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dt[_ngcontent-%COMP%] {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], \n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card[_ngcontent-%COMP%] {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay[_ngcontent-%COMP%] {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--mjo-co-primary);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 700;\n cursor: pointer;\n}\n\n.mj-checkout-renewal__pay[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}"] });
|
|
40935
40954
|
};
|
|
40936
40955
|
(() => {
|
|
40937
40956
|
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(CheckoutPublicHostComponent, [{
|
|
@@ -41074,7 +41093,7 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
|
|
|
41074
41093
|
}
|
|
41075
41094
|
<div class="mj-checkout-public__turnstile"></div>
|
|
41076
41095
|
</div>
|
|
41077
|
-
`, styles: [":host {\n display: block;\n}\n\n.mj-checkout-public {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg,\n.mj-checkout-success__order {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n/* Whether the buyer's access is ready yet (#325). */\n.mj-checkout-success__access {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed {\n color: #991b1b;\n}\n\n/* Post-payment account step: set a password for the account the host created (#292). */\n.mj-checkout-account {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit:disabled,\n.mj-checkout-account__skip:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions {\n margin-top: 0.75rem;\n}\n\n/* Cloudflare Turnstile renders here only when it needs the buyer to interact (#592). */\n.mj-checkout-public__turnstile {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n/* \u2500\u2500\u2500 Pay-renewal mode (#289) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-checkout-renewal {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead,\n.mj-checkout-renewal__note {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row dt {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row dd {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total dt,\n.mj-checkout-renewal__row--total dd {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--
|
|
41096
|
+
`, styles: [":host {\n display: block;\n /* Pay-button colour; follows the public --mj-primary-color theme hook when the embedding page sets it. */\n --mjo-co-primary: var(--mj-primary-color, #2563eb);\n}\n\n.mj-checkout-public {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg,\n.mj-checkout-success__order {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n/* Whether the buyer's access is ready yet (#325). */\n.mj-checkout-success__access {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed {\n color: #991b1b;\n}\n\n/* Post-payment account step: set a password for the account the host created (#292). */\n.mj-checkout-account {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit:disabled,\n.mj-checkout-account__skip:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions {\n margin-top: 0.75rem;\n}\n\n/* Cloudflare Turnstile renders here only when it needs the buyer to interact (#592). */\n.mj-checkout-public__turnstile {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n/* \u2500\u2500\u2500 Pay-renewal mode (#289) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-checkout-renewal {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead,\n.mj-checkout-renewal__note {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row dt {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row dd {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total dt,\n.mj-checkout-renewal__row--total dd {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--mjo-co-primary);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 700;\n cursor: pointer;\n}\n\n.mj-checkout-renewal__pay:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n"] }]
|
|
41078
41097
|
}], null, { slug: [{
|
|
41079
41098
|
type: Input
|
|
41080
41099
|
}], apiRoot: [{
|
|
@@ -54,6 +54,11 @@ declare global {
|
|
|
54
54
|
}
|
|
55
55
|
export declare class CheckoutPublicHostComponent implements OnInit, AfterViewChecked, OnDestroy {
|
|
56
56
|
private readonly hostEl;
|
|
57
|
+
private readonly changeDetector;
|
|
58
|
+
/**
|
|
59
|
+
* Every redraw goes through here, so none runs once the host has removed the element: the async
|
|
60
|
+
* paths (a payment, `/complete`, the access poll) resume after it and would draw a dead view.
|
|
61
|
+
*/
|
|
57
62
|
private readonly cdr;
|
|
58
63
|
slug: string;
|
|
59
64
|
apiRoot: string;
|
|
@@ -158,6 +163,12 @@ export declare class CheckoutPublicHostComponent implements OnInit, AfterViewChe
|
|
|
158
163
|
get isFree(): boolean;
|
|
159
164
|
ngOnInit(): Promise<void>;
|
|
160
165
|
ngAfterViewChecked(): void;
|
|
166
|
+
/**
|
|
167
|
+
* The host removed the element. A payment or `/complete` already in flight is left to finish, so a
|
|
168
|
+
* charged card still completes on the server, and the session-storage marker that lets a reload
|
|
169
|
+
* resume the account step is still kept. Everything that speaks to the page stops: no events, no
|
|
170
|
+
* state, no redraws, no access polling, no account step and no redirect.
|
|
171
|
+
*/
|
|
161
172
|
ngOnDestroy(): void;
|
|
162
173
|
/** The buyer pressed Apply: price the form with the code and show what it does. */
|
|
163
174
|
onPromotionCodeApplied(event: CheckoutSubmissionEvent): Promise<void>;
|
|
@@ -264,7 +275,7 @@ export declare class CheckoutPublicHostComponent implements OnInit, AfterViewChe
|
|
|
264
275
|
/** Reports a state the host page can track; repeats of the same state are not re-sent. */
|
|
265
276
|
private setState;
|
|
266
277
|
private reportError;
|
|
267
|
-
/** Dispatches on the `<mj-orders-checkout>` element; bubbling and composed, so `document` hears it too. */
|
|
278
|
+
/** Dispatches on the `<mj-orders-checkout>` element; bubbling and composed, so `document` hears it too. Nothing once it is removed. */
|
|
268
279
|
private dispatch;
|
|
269
280
|
private mountStripe;
|
|
270
281
|
private loadStripe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-public-host.component.d.ts","sourceRoot":"","sources":["../../../src/lib/checkout-widget/checkout-public-host.component.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACH,gBAAgB,EAIhB,YAAY,EAEZ,SAAS,EACT,MAAM,EAGT,MAAM,eAAe,CAAC;AAGvB,OAAO,EAQH,KAAK,mBAAmB,EAC3B,MAAM,oBAAoB,CAAC;AAa5B,OAAO,EAOH,KAAK,mBAAmB,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEH,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAIH,KAAK,+BAA+B,EAKvC,MAAM,uBAAuB,CAAC;AAY/B,OAAO,EAA+D,KAAK,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;;AAElI,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,UAAU,UAAU;IAChB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;IAC1C,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,GAAG,IAAI,CAAC;IACvE,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB,OAAO,CAAC,IAAI,IAAI,CAAC;CACpB;AAED,UAAU,cAAc;IACpB,QAAQ,IAAI;QAAE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;IACjD,kBAAkB,CACd,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE;QACF,cAAc,EAAE;YACZ,IAAI,EAAE,UAAU,CAAC;YACjB,eAAe,CAAC,EAAE;gBACd,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,OAAO,CAAC,EAAE;oBAAE,OAAO,CAAC,EAAE,MAAM,CAAC;oBAAC,KAAK,CAAC,EAAE,MAAM,CAAC;oBAAC,WAAW,CAAC,EAAE,MAAM,CAAA;iBAAE,CAAC;aACxE,CAAC;SACL,CAAC;KACL,GACF,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE;YAAE,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,aAAa,CAAC,EAAE;YAAE,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;CACrF;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,MAAM,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,cAAc,CAAC;KACvD;CACJ;AAED,qBAOa,2BAA4B,YAAW,MAAM,EAAE,gBAAgB,EAAE,SAAS;IACnF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0C;IACjE,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"checkout-public-host.component.d.ts","sourceRoot":"","sources":["../../../src/lib/checkout-widget/checkout-public-host.component.ts"],"names":[],"mappings":"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"}
|
|
@@ -310,7 +310,12 @@ function CheckoutPublicHostComponent_Conditional_6_Template(rf, ctx) { if (rf &
|
|
|
310
310
|
export { buildCheckoutDraftLine } from './checkout-draft-line.js';
|
|
311
311
|
export class CheckoutPublicHostComponent {
|
|
312
312
|
hostEl = inject(ElementRef, { optional: true });
|
|
313
|
-
|
|
313
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
314
|
+
/**
|
|
315
|
+
* Every redraw goes through here, so none runs once the host has removed the element: the async
|
|
316
|
+
* paths (a payment, `/complete`, the access poll) resume after it and would draw a dead view.
|
|
317
|
+
*/
|
|
318
|
+
cdr = { detectChanges: () => (this.destroyed ? undefined : this.changeDetector.detectChanges()) };
|
|
314
319
|
slug = '';
|
|
315
320
|
apiRoot = '/checkout';
|
|
316
321
|
/** A host-signed membership token, verified server-side on /draft and never stored (#324). */
|
|
@@ -495,6 +500,12 @@ export class CheckoutPublicHostComponent {
|
|
|
495
500
|
void this.mountStripe(mount);
|
|
496
501
|
}
|
|
497
502
|
}
|
|
503
|
+
/**
|
|
504
|
+
* The host removed the element. A payment or `/complete` already in flight is left to finish, so a
|
|
505
|
+
* charged card still completes on the server, and the session-storage marker that lets a reload
|
|
506
|
+
* resume the account step is still kept. Everything that speaks to the page stops: no events, no
|
|
507
|
+
* state, no redraws, no access polling, no account step and no redirect.
|
|
508
|
+
*/
|
|
498
509
|
ngOnDestroy() {
|
|
499
510
|
this.destroyed = true;
|
|
500
511
|
this.cancelBackgroundQuote();
|
|
@@ -966,6 +977,9 @@ export class CheckoutPublicHostComponent {
|
|
|
966
977
|
try {
|
|
967
978
|
const deadline = Date.now() + this.accessPollTimeoutMs;
|
|
968
979
|
for (;;) {
|
|
980
|
+
// Before each poll, which is also after each wait.
|
|
981
|
+
if (this.destroyed)
|
|
982
|
+
return;
|
|
969
983
|
let state = null;
|
|
970
984
|
try {
|
|
971
985
|
state = ReadAccessState(await this.post('/access-status', { sessionId: this.sessionId, clientSessionKey: this.sessionKey }));
|
|
@@ -992,6 +1006,8 @@ export class CheckoutPublicHostComponent {
|
|
|
992
1006
|
}
|
|
993
1007
|
/** Asks for the account step of the completed checkout. The host is asked again only after a failure. */
|
|
994
1008
|
async loadAccount() {
|
|
1009
|
+
if (this.destroyed)
|
|
1010
|
+
return;
|
|
995
1011
|
this.accountLoading = true;
|
|
996
1012
|
this.cdr.detectChanges();
|
|
997
1013
|
try {
|
|
@@ -1114,6 +1130,8 @@ export class CheckoutPublicHostComponent {
|
|
|
1114
1130
|
}
|
|
1115
1131
|
/** Follows the widget's redirect once nothing is left for the buyer to do here. */
|
|
1116
1132
|
leaveIfDone() {
|
|
1133
|
+
if (this.destroyed)
|
|
1134
|
+
return;
|
|
1117
1135
|
if (this.config?.redirectUrl && !this.accountLoading && !this.accessTracking && MayRedirect(this.account, this.accountDismissed)) {
|
|
1118
1136
|
// The landing page learns which order completed from `?order=` (#295).
|
|
1119
1137
|
window.location.href = WithOrderReference(this.config.redirectUrl, this.orderNumber, window.location.href);
|
|
@@ -1121,7 +1139,7 @@ export class CheckoutPublicHostComponent {
|
|
|
1121
1139
|
}
|
|
1122
1140
|
/** Reports a state the host page can track; repeats of the same state are not re-sent. */
|
|
1123
1141
|
setState(state) {
|
|
1124
|
-
if (this.state === state)
|
|
1142
|
+
if (this.destroyed || this.state === state)
|
|
1125
1143
|
return;
|
|
1126
1144
|
this.state = state;
|
|
1127
1145
|
this.dispatch(CHECKOUT_STATE_CHANGE_EVENT, { state });
|
|
@@ -1130,8 +1148,10 @@ export class CheckoutPublicHostComponent {
|
|
|
1130
1148
|
this.setState('ERROR');
|
|
1131
1149
|
this.dispatch(CHECKOUT_ERROR_EVENT, { message });
|
|
1132
1150
|
}
|
|
1133
|
-
/** Dispatches on the `<mj-orders-checkout>` element; bubbling and composed, so `document` hears it too. */
|
|
1151
|
+
/** Dispatches on the `<mj-orders-checkout>` element; bubbling and composed, so `document` hears it too. Nothing once it is removed. */
|
|
1134
1152
|
dispatch(name, detail) {
|
|
1153
|
+
if (this.destroyed)
|
|
1154
|
+
return;
|
|
1135
1155
|
const el = this.hostEl?.nativeElement;
|
|
1136
1156
|
el?.dispatchEvent(CheckoutElementEvent(name, detail));
|
|
1137
1157
|
}
|
|
@@ -1352,11 +1372,11 @@ export class CheckoutPublicHostComponent {
|
|
|
1352
1372
|
} if (rf & 2) {
|
|
1353
1373
|
i0.ɵɵadvance();
|
|
1354
1374
|
i0.ɵɵconditional(ctx.loadError ? 1 : ctx.successMessage ? 2 : ctx.finishingMessage ? 3 : !ctx.config ? 4 : ctx.renewal ? 5 : 6);
|
|
1355
|
-
} }, dependencies: [CommonModule, MJCheckoutWidgetComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n}\n\n.mj-checkout-public[_ngcontent-%COMP%] {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status[_ngcontent-%COMP%] {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success[_ngcontent-%COMP%] {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon[_ngcontent-%COMP%] {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg[_ngcontent-%COMP%], \n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n\n\n.mj-checkout-success__access[_ngcontent-%COMP%] {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed[_ngcontent-%COMP%] {\n color: #991b1b;\n}\n\n\n\n.mj-checkout-account[_ngcontent-%COMP%] {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%] {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error[_ngcontent-%COMP%] {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%] {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip[_ngcontent-%COMP%] {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%]:disabled, \n.mj-checkout-account__skip[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg[_ngcontent-%COMP%] {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n}\n\n\n\n.mj-checkout-public__turnstile[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n\n\n\n.mj-checkout-renewal[_ngcontent-%COMP%] {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead[_ngcontent-%COMP%], \n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary[_ngcontent-%COMP%] {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dt[_ngcontent-%COMP%] {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], \n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card[_ngcontent-%COMP%] {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay[_ngcontent-%COMP%] {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--
|
|
1375
|
+
} }, dependencies: [CommonModule, MJCheckoutWidgetComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n \n\n --mjo-co-primary: var(--mj-primary-color, #2563eb);\n}\n\n.mj-checkout-public[_ngcontent-%COMP%] {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status[_ngcontent-%COMP%] {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success[_ngcontent-%COMP%] {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon[_ngcontent-%COMP%] {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg[_ngcontent-%COMP%], \n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n\n\n.mj-checkout-success__access[_ngcontent-%COMP%] {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed[_ngcontent-%COMP%] {\n color: #991b1b;\n}\n\n\n\n.mj-checkout-account[_ngcontent-%COMP%] {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%] {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error[_ngcontent-%COMP%] {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%] {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip[_ngcontent-%COMP%] {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%]:disabled, \n.mj-checkout-account__skip[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg[_ngcontent-%COMP%] {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n}\n\n\n\n.mj-checkout-public__turnstile[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n\n\n\n.mj-checkout-renewal[_ngcontent-%COMP%] {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead[_ngcontent-%COMP%], \n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary[_ngcontent-%COMP%] {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dt[_ngcontent-%COMP%] {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], \n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card[_ngcontent-%COMP%] {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay[_ngcontent-%COMP%] {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--mjo-co-primary);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 700;\n cursor: pointer;\n}\n\n.mj-checkout-renewal__pay[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}"] });
|
|
1356
1376
|
}
|
|
1357
1377
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckoutPublicHostComponent, [{
|
|
1358
1378
|
type: Component,
|
|
1359
|
-
args: [{ selector: 'mj-orders-checkout', standalone: true, imports: [CommonModule, MJCheckoutWidgetComponent], template: "<div class=\"mj-checkout-public\">\n @if (loadError) {\n <div class=\"mj-widget-error-banner\" role=\"alert\">{{ loadError }}</div>\n } @else if (successMessage) {\n <div class=\"mj-checkout-success\" role=\"status\">\n <div class=\"mj-checkout-success__icon\" aria-hidden=\"true\">\u2713</div>\n <h1 class=\"mj-checkout-success__title\">You're all set</h1>\n <p class=\"mj-checkout-success__msg\">{{ successMessage }}</p>\n @if (orderNumber) {\n <p class=\"mj-checkout-success__order\">Order {{ orderNumber }}</p>\n }\n @if (accessMessage) {\n <p class=\"mj-checkout-success__access\" [class.is-failed]=\"accessState === 'Failed'\" role=\"status\">{{ accessMessage }}</p>\n }\n @if (accountLoading) {\n <p class=\"mj-checkout-account__msg\" role=\"status\">Setting up your account\u2026</p>\n } @else if (account?.CanSetPassword) {\n <form class=\"mj-checkout-account\" (submit)=\"$event.preventDefault(); submitPassword()\">\n <h2 class=\"mj-checkout-account__title\">Set a password for your account</h2>\n @if (verificationNote) {\n <p class=\"mj-checkout-account__note\">{{ verificationNote }}</p>\n }\n <label class=\"mj-checkout-account__label\" for=\"mj-checkout-password\">Password</label>\n <input\n id=\"mj-checkout-password\"\n class=\"mj-checkout-account__input\"\n type=\"password\"\n autocomplete=\"new-password\"\n [value]=\"password\"\n (input)=\"password = $any($event.target).value\" />\n <label class=\"mj-checkout-account__label\" for=\"mj-checkout-password-confirm\">Confirm password</label>\n <input\n id=\"mj-checkout-password-confirm\"\n class=\"mj-checkout-account__input\"\n type=\"password\"\n autocomplete=\"new-password\"\n [value]=\"passwordConfirmation\"\n (input)=\"passwordConfirmation = $any($event.target).value\" />\n @if (passwordError) {\n <p class=\"mj-checkout-account__error\" role=\"alert\">{{ passwordError }}</p>\n }\n <button class=\"mj-checkout-account__submit\" type=\"submit\" [disabled]=\"passwordBusy\">\n {{ passwordBusy ? 'Saving\u2026' : 'Set password' }}\n </button>\n <button class=\"mj-checkout-account__skip\" type=\"button\" (click)=\"skipPassword()\" [disabled]=\"passwordBusy\">\n Not now\n </button>\n </form>\n } @else if (accountMessage) {\n <p class=\"mj-checkout-account__msg\" role=\"status\">{{ accountMessage }}</p>\n @if (account?.Outcome === 'Failed') {\n <div class=\"mj-checkout-account mj-checkout-account--actions\">\n <button class=\"mj-checkout-account__submit\" type=\"button\" (click)=\"retryAccount()\">Try again</button>\n @if (config?.redirectUrl) {\n <button class=\"mj-checkout-account__skip\" type=\"button\" (click)=\"dismissAccount()\">Not now</button>\n }\n </div>\n }\n }\n </div>\n } @else if (finishingMessage) {\n <div class=\"mj-checkout-success\" role=\"status\" aria-live=\"polite\">\n <p class=\"mj-checkout-success__msg\">{{ finishingMessage }}</p>\n </div>\n } @else if (!config) {\n <p class=\"mj-checkout-public__status\" role=\"status\">Loading checkout\u2026</p>\n } @else if (renewal) {\n <form class=\"mj-checkout-renewal\" (submit)=\"$event.preventDefault(); payRenewal()\">\n <h1 class=\"mj-checkout-renewal__title\">Renew your subscription</h1>\n <p class=\"mj-checkout-renewal__lead\">Your saved card could not be charged. Pay with a new card to keep your subscription active.</p>\n <dl class=\"mj-checkout-renewal__summary\">\n @if (renewal.Description) {\n <div class=\"mj-checkout-renewal__row\">\n <dt>Renewal of</dt>\n <dd>{{ renewal.Description }}</dd>\n </div>\n }\n @if (renewal.SubscriptionNumber) {\n <div class=\"mj-checkout-renewal__row\">\n <dt>Subscription</dt>\n <dd>{{ renewal.SubscriptionNumber }}</dd>\n </div>\n }\n <div class=\"mj-checkout-renewal__row\">\n <dt>Renewal order</dt>\n <dd>{{ renewal.OrderNumber }}</dd>\n </div>\n @if (renewal.DueDate) {\n <div class=\"mj-checkout-renewal__row\">\n <dt>Due</dt>\n <dd>{{ renewal.DueDate }}</dd>\n </div>\n }\n <div class=\"mj-checkout-renewal__row mj-checkout-renewal__row--total\">\n <dt>Amount due</dt>\n <dd>{{ renewalAmount }}</dd>\n </div>\n </dl>\n @if (config.stripePublishableKey) {\n <label class=\"mj-checkout-renewal__label\" for=\"stripe-card-element\">Card</label>\n <div id=\"stripe-card-element\" class=\"mj-checkout-renewal__card\"></div>\n }\n <p class=\"mj-checkout-renewal__note\">The card you pay with will be charged for future renewals.</p>\n @if (errorMessage) {\n <div class=\"mj-widget-error-banner\" role=\"alert\">{{ errorMessage }}</div>\n }\n <button class=\"mj-checkout-renewal__pay\" type=\"submit\" [disabled]=\"processing || !isPaymentReady\">\n {{ processing ? 'Processing\u2026' : 'Pay ' + renewalAmount }}\n </button>\n </form>\n } @else {\n @for (generation of [formGeneration]; track generation) {\n <mj-checkout-widget\n [config]=\"config\"\n [distributionSlug]=\"slug\"\n [sessionKey]=\"sessionKey\"\n [isProcessing]=\"processing\"\n [isPaymentReady]=\"isPaymentReady\"\n [stripePaymentMethodId]=\"stripePaymentMethodId\"\n [prefillEmail]=\"prefillEmail\"\n [errorMessage]=\"errorMessage\"\n [appliedPromotion]=\"appliedPromotion\"\n [serverPricedTotal]=\"serverPricedTotal\"\n [memberDiscount]=\"memberDiscount\"\n [lockEmail]=\"emailLocked\"\n [promotionError]=\"promotionError\"\n (promotionCodeApplied)=\"onPromotionCodeApplied($event)\"\n [quotedTotal]=\"quotedTotal\"\n [quotedTax]=\"quotedTax\"\n (submitted)=\"onSubmitted($event)\"\n (cancelled)=\"onCancelled()\"\n (quoteInvalidated)=\"onQuoteInvalidated()\"\n (quoteRequested)=\"onQuoteRequested($event)\">\n </mj-checkout-widget>\n }\n }\n <div class=\"mj-checkout-public__turnstile\"></div>\n</div>\n", styles: [":host {\n display: block;\n}\n\n.mj-checkout-public {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg,\n.mj-checkout-success__order {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n/* Whether the buyer's access is ready yet (#325). */\n.mj-checkout-success__access {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed {\n color: #991b1b;\n}\n\n/* Post-payment account step: set a password for the account the host created (#292). */\n.mj-checkout-account {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit:disabled,\n.mj-checkout-account__skip:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions {\n margin-top: 0.75rem;\n}\n\n/* Cloudflare Turnstile renders here only when it needs the buyer to interact (#592). */\n.mj-checkout-public__turnstile {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n/* \u2500\u2500\u2500 Pay-renewal mode (#289) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-checkout-renewal {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead,\n.mj-checkout-renewal__note {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row dt {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row dd {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total dt,\n.mj-checkout-renewal__row--total dd {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--mj-checkout-primary, #2563eb);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 700;\n cursor: pointer;\n}\n\n.mj-checkout-renewal__pay:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n"] }]
|
|
1379
|
+
args: [{ selector: 'mj-orders-checkout', standalone: true, imports: [CommonModule, MJCheckoutWidgetComponent], template: "<div class=\"mj-checkout-public\">\n @if (loadError) {\n <div class=\"mj-widget-error-banner\" role=\"alert\">{{ loadError }}</div>\n } @else if (successMessage) {\n <div class=\"mj-checkout-success\" role=\"status\">\n <div class=\"mj-checkout-success__icon\" aria-hidden=\"true\">\u2713</div>\n <h1 class=\"mj-checkout-success__title\">You're all set</h1>\n <p class=\"mj-checkout-success__msg\">{{ successMessage }}</p>\n @if (orderNumber) {\n <p class=\"mj-checkout-success__order\">Order {{ orderNumber }}</p>\n }\n @if (accessMessage) {\n <p class=\"mj-checkout-success__access\" [class.is-failed]=\"accessState === 'Failed'\" role=\"status\">{{ accessMessage }}</p>\n }\n @if (accountLoading) {\n <p class=\"mj-checkout-account__msg\" role=\"status\">Setting up your account\u2026</p>\n } @else if (account?.CanSetPassword) {\n <form class=\"mj-checkout-account\" (submit)=\"$event.preventDefault(); submitPassword()\">\n <h2 class=\"mj-checkout-account__title\">Set a password for your account</h2>\n @if (verificationNote) {\n <p class=\"mj-checkout-account__note\">{{ verificationNote }}</p>\n }\n <label class=\"mj-checkout-account__label\" for=\"mj-checkout-password\">Password</label>\n <input\n id=\"mj-checkout-password\"\n class=\"mj-checkout-account__input\"\n type=\"password\"\n autocomplete=\"new-password\"\n [value]=\"password\"\n (input)=\"password = $any($event.target).value\" />\n <label class=\"mj-checkout-account__label\" for=\"mj-checkout-password-confirm\">Confirm password</label>\n <input\n id=\"mj-checkout-password-confirm\"\n class=\"mj-checkout-account__input\"\n type=\"password\"\n autocomplete=\"new-password\"\n [value]=\"passwordConfirmation\"\n (input)=\"passwordConfirmation = $any($event.target).value\" />\n @if (passwordError) {\n <p class=\"mj-checkout-account__error\" role=\"alert\">{{ passwordError }}</p>\n }\n <button class=\"mj-checkout-account__submit\" type=\"submit\" [disabled]=\"passwordBusy\">\n {{ passwordBusy ? 'Saving\u2026' : 'Set password' }}\n </button>\n <button class=\"mj-checkout-account__skip\" type=\"button\" (click)=\"skipPassword()\" [disabled]=\"passwordBusy\">\n Not now\n </button>\n </form>\n } @else if (accountMessage) {\n <p class=\"mj-checkout-account__msg\" role=\"status\">{{ accountMessage }}</p>\n @if (account?.Outcome === 'Failed') {\n <div class=\"mj-checkout-account mj-checkout-account--actions\">\n <button class=\"mj-checkout-account__submit\" type=\"button\" (click)=\"retryAccount()\">Try again</button>\n @if (config?.redirectUrl) {\n <button class=\"mj-checkout-account__skip\" type=\"button\" (click)=\"dismissAccount()\">Not now</button>\n }\n </div>\n }\n }\n </div>\n } @else if (finishingMessage) {\n <div class=\"mj-checkout-success\" role=\"status\" aria-live=\"polite\">\n <p class=\"mj-checkout-success__msg\">{{ finishingMessage }}</p>\n </div>\n } @else if (!config) {\n <p class=\"mj-checkout-public__status\" role=\"status\">Loading checkout\u2026</p>\n } @else if (renewal) {\n <form class=\"mj-checkout-renewal\" (submit)=\"$event.preventDefault(); payRenewal()\">\n <h1 class=\"mj-checkout-renewal__title\">Renew your subscription</h1>\n <p class=\"mj-checkout-renewal__lead\">Your saved card could not be charged. Pay with a new card to keep your subscription active.</p>\n <dl class=\"mj-checkout-renewal__summary\">\n @if (renewal.Description) {\n <div class=\"mj-checkout-renewal__row\">\n <dt>Renewal of</dt>\n <dd>{{ renewal.Description }}</dd>\n </div>\n }\n @if (renewal.SubscriptionNumber) {\n <div class=\"mj-checkout-renewal__row\">\n <dt>Subscription</dt>\n <dd>{{ renewal.SubscriptionNumber }}</dd>\n </div>\n }\n <div class=\"mj-checkout-renewal__row\">\n <dt>Renewal order</dt>\n <dd>{{ renewal.OrderNumber }}</dd>\n </div>\n @if (renewal.DueDate) {\n <div class=\"mj-checkout-renewal__row\">\n <dt>Due</dt>\n <dd>{{ renewal.DueDate }}</dd>\n </div>\n }\n <div class=\"mj-checkout-renewal__row mj-checkout-renewal__row--total\">\n <dt>Amount due</dt>\n <dd>{{ renewalAmount }}</dd>\n </div>\n </dl>\n @if (config.stripePublishableKey) {\n <label class=\"mj-checkout-renewal__label\" for=\"stripe-card-element\">Card</label>\n <div id=\"stripe-card-element\" class=\"mj-checkout-renewal__card\"></div>\n }\n <p class=\"mj-checkout-renewal__note\">The card you pay with will be charged for future renewals.</p>\n @if (errorMessage) {\n <div class=\"mj-widget-error-banner\" role=\"alert\">{{ errorMessage }}</div>\n }\n <button class=\"mj-checkout-renewal__pay\" type=\"submit\" [disabled]=\"processing || !isPaymentReady\">\n {{ processing ? 'Processing\u2026' : 'Pay ' + renewalAmount }}\n </button>\n </form>\n } @else {\n @for (generation of [formGeneration]; track generation) {\n <mj-checkout-widget\n [config]=\"config\"\n [distributionSlug]=\"slug\"\n [sessionKey]=\"sessionKey\"\n [isProcessing]=\"processing\"\n [isPaymentReady]=\"isPaymentReady\"\n [stripePaymentMethodId]=\"stripePaymentMethodId\"\n [prefillEmail]=\"prefillEmail\"\n [errorMessage]=\"errorMessage\"\n [appliedPromotion]=\"appliedPromotion\"\n [serverPricedTotal]=\"serverPricedTotal\"\n [memberDiscount]=\"memberDiscount\"\n [lockEmail]=\"emailLocked\"\n [promotionError]=\"promotionError\"\n (promotionCodeApplied)=\"onPromotionCodeApplied($event)\"\n [quotedTotal]=\"quotedTotal\"\n [quotedTax]=\"quotedTax\"\n (submitted)=\"onSubmitted($event)\"\n (cancelled)=\"onCancelled()\"\n (quoteInvalidated)=\"onQuoteInvalidated()\"\n (quoteRequested)=\"onQuoteRequested($event)\">\n </mj-checkout-widget>\n }\n }\n <div class=\"mj-checkout-public__turnstile\"></div>\n</div>\n", styles: [":host {\n display: block;\n /* Pay-button colour; follows the public --mj-primary-color theme hook when the embedding page sets it. */\n --mjo-co-primary: var(--mj-primary-color, #2563eb);\n}\n\n.mj-checkout-public {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg,\n.mj-checkout-success__order {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n/* Whether the buyer's access is ready yet (#325). */\n.mj-checkout-success__access {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed {\n color: #991b1b;\n}\n\n/* Post-payment account step: set a password for the account the host created (#292). */\n.mj-checkout-account {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit:disabled,\n.mj-checkout-account__skip:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions {\n margin-top: 0.75rem;\n}\n\n/* Cloudflare Turnstile renders here only when it needs the buyer to interact (#592). */\n.mj-checkout-public__turnstile {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n/* \u2500\u2500\u2500 Pay-renewal mode (#289) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-checkout-renewal {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead,\n.mj-checkout-renewal__note {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row dt {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row dd {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total dt,\n.mj-checkout-renewal__row--total dd {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--mjo-co-primary);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 700;\n cursor: pointer;\n}\n\n.mj-checkout-renewal__pay:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n"] }]
|
|
1360
1380
|
}], null, { slug: [{
|
|
1361
1381
|
type: Input
|
|
1362
1382
|
}], apiRoot: [{
|