@foxy.io/elements 1.25.0-beta.3 → 1.25.0-beta.5
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/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-billing-address-card.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +1 -1
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +3 -3
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -2
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +4 -4
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-native-integration-card.js +1 -1
- package/dist/cdn/foxy-native-integration-form.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +5 -5
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +2 -96
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +95 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +7 -7
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-b113467e.js → shared-00c2793e.js} +1 -1
- package/dist/cdn/{shared-15dfa16d.js → shared-029816d7.js} +1 -1
- package/dist/cdn/{shared-61b1fd60.js → shared-02bc0368.js} +1 -1
- package/dist/cdn/{shared-87f55237.js → shared-174f37e9.js} +1 -1
- package/dist/cdn/{shared-3f3903d4.js → shared-20ba4cdc.js} +1 -1
- package/dist/cdn/{shared-06916671.js → shared-268571df.js} +1 -1
- package/dist/cdn/{shared-8d99b885.js → shared-2b27e2e7.js} +1 -1
- package/dist/cdn/{shared-979e24ec.js → shared-2bdc99f4.js} +1 -1
- package/dist/cdn/{shared-3d95605f.js → shared-2c8c4b43.js} +3 -3
- package/dist/cdn/shared-2cf08dd4.js +1 -0
- package/dist/cdn/{shared-f8d1abc9.js → shared-2f09d4df.js} +4 -4
- package/dist/cdn/{shared-54cbd346.js → shared-30d00b64.js} +1 -1
- package/dist/cdn/{shared-d9f4138b.js → shared-32e736eb.js} +1 -1
- package/dist/cdn/{shared-a1d39ddd.js → shared-43f449bb.js} +1 -1
- package/dist/cdn/{shared-87824001.js → shared-4462dc70.js} +2 -2
- package/dist/cdn/{shared-02f8245a.js → shared-4aa4d980.js} +1 -1
- package/dist/cdn/{shared-63d11888.js → shared-4c124efc.js} +7 -7
- package/dist/cdn/shared-4c650e5c.js +1 -0
- package/dist/cdn/{shared-b984ab7c.js → shared-4e59fd48.js} +16 -16
- package/dist/cdn/{shared-69c3549d.js → shared-54b0e48f.js} +1 -1
- package/dist/cdn/{shared-ecd5eb1b.js → shared-5fa697c4.js} +1 -1
- package/dist/cdn/shared-61ade33e.js +6 -0
- package/dist/cdn/{shared-3bd99d11.js → shared-6a9ae42e.js} +1 -1
- package/dist/cdn/{shared-a95067d6.js → shared-76400719.js} +1 -1
- package/dist/cdn/{shared-ceec93fa.js → shared-7dd17943.js} +1 -1
- package/dist/cdn/{shared-ea1ab750.js → shared-7deff07c.js} +1 -1
- package/dist/cdn/{shared-fad099e6.js → shared-7e1953f5.js} +1 -1
- package/dist/cdn/shared-8201d0b5.js +1 -0
- package/dist/cdn/{shared-29e74661.js → shared-8952aeac.js} +1 -1
- package/dist/cdn/{shared-320fadbf.js → shared-896982f9.js} +1 -1
- package/dist/cdn/{shared-a5a03f4f.js → shared-8d8bed82.js} +1 -1
- package/dist/cdn/{shared-92dd9964.js → shared-99c0ae04.js} +1 -1
- package/dist/cdn/{shared-6ffa9f84.js → shared-9c08cfab.js} +1 -1
- package/dist/cdn/{shared-0ffe26d8.js → shared-9df8f842.js} +2 -2
- package/dist/cdn/{shared-0961f769.js → shared-a8dc23f1.js} +1 -1
- package/dist/cdn/{shared-3fee360a.js → shared-ac7c5a5e.js} +14 -14
- package/dist/cdn/{shared-5db2fec0.js → shared-ad34b6db.js} +1 -1
- package/dist/cdn/{shared-a1be9c27.js → shared-b1b8ea67.js} +1 -1
- package/dist/cdn/{shared-85712eed.js → shared-b509bc2c.js} +1 -1
- package/dist/cdn/{shared-de8bf756.js → shared-bc0d8d01.js} +2 -2
- package/dist/cdn/{shared-4105aacf.js → shared-be7bfbb0.js} +1 -1
- package/dist/cdn/{shared-745a575c.js → shared-bed7aae1.js} +1 -1
- package/dist/cdn/{shared-5291bdca.js → shared-c7b3d22b.js} +3 -3
- package/dist/cdn/{shared-264c82b8.js → shared-c9ba1b64.js} +3 -3
- package/dist/cdn/{shared-c43cd1fa.js → shared-ca4c5f0f.js} +1 -1
- package/dist/cdn/{shared-efbd62cb.js → shared-cdd2358f.js} +4 -4
- package/dist/cdn/{shared-d8ca5c87.js → shared-d21fa1a6.js} +1 -1
- package/dist/cdn/{shared-835cf735.js → shared-d57fac94.js} +1 -1
- package/dist/cdn/{shared-d600815d.js → shared-dbadd9cf.js} +1 -1
- package/dist/cdn/{shared-452e38da.js → shared-e39807f8.js} +1 -1
- package/dist/cdn/{shared-25edf241.js → shared-e83f2983.js} +1 -1
- package/dist/cdn/{shared-d1265ca0.js → shared-e91453df.js} +1 -1
- package/dist/cdn/{shared-5f1f0d8f.js → shared-ea527e98.js} +1 -1
- package/dist/cdn/shared-f9a3d1ff.js +6 -0
- package/dist/cdn/{shared-324665fd.js → shared-fa4f6cd3.js} +1 -1
- package/dist/cdn/shared-fc15a882.js +1 -0
- package/dist/cdn/{shared-2c92c192.js → shared-ff8ca16b.js} +1 -1
- package/dist/cdn/{shared-6d0be1e4.js → shared-ff9791cf.js} +1 -1
- package/dist/cdn/translations/cart-form/en.json +7 -6
- package/dist/cdn/translations/customer/en.json +23 -14
- package/dist/cdn/translations/customer-portal/en.json +22 -13
- package/dist/cdn/translations/item-card/en.json +1 -0
- package/dist/cdn/translations/item-form/en.json +2 -2
- package/dist/cdn/translations/payments-api-payment-preset-form/en.json +2 -2
- package/dist/cdn/translations/shipment-card/en.json +1 -0
- package/dist/cdn/translations/subscription-form/en.json +23 -14
- package/dist/cdn/translations/transaction/en.json +27 -26
- package/dist/cdn/translations/transaction-card/en.json +22 -22
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +28 -23
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
- package/dist/elements/internal/InternalControl/InternalControl.js +2 -1
- package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -1
- package/dist/elements/private/Dialog/Dialog.js +7 -1
- package/dist/elements/private/Dialog/Dialog.js.map +1 -1
- package/dist/elements/public/BillingAddressCard/BillingAddressCard.d.ts +2 -1
- package/dist/elements/public/BillingAddressCard/BillingAddressCard.js.map +1 -1
- package/dist/elements/public/CouponForm/types.d.ts +3 -7
- package/dist/elements/public/CouponForm/types.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +2 -2
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
- package/dist/elements/public/ItemCard/ItemCard.js +4 -2
- package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
- package/dist/elements/public/ItemsForm/private/Item.js +1 -0
- package/dist/elements/public/ItemsForm/private/Item.js.map +1 -1
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js.map +1 -1
- package/dist/elements/public/PaymentCard/PaymentCard.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/types.d.ts +2 -0
- package/dist/elements/public/PaymentsApi/api/types.js.map +1 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.js +5 -2
- package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.js +2 -2
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.js.map +1 -1
- package/dist/elements/public/SubscriptionCard/types.d.ts +2 -2
- package/dist/elements/public/SubscriptionCard/types.js.map +1 -1
- package/dist/elements/public/Transaction/Transaction.d.ts +2 -3
- package/dist/elements/public/Transaction/Transaction.js +129 -127
- package/dist/elements/public/Transaction/Transaction.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +6 -4
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
- package/dist/elements/public/Transaction/types.d.ts +4 -17
- package/dist/elements/public/Transaction/types.js.map +1 -1
- package/dist/elements/public/TransactionCard/TransactionCard.d.ts +8 -10
- package/dist/elements/public/TransactionCard/TransactionCard.js +71 -51
- package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
- package/dist/elements/public/TransactionCard/index.d.ts +2 -1
- package/dist/elements/public/TransactionCard/index.js +2 -1
- package/dist/elements/public/TransactionCard/index.js.map +1 -1
- package/dist/elements/public/TransactionCard/types.d.ts +8 -2
- package/dist/elements/public/TransactionCard/types.js.map +1 -1
- package/dist/mixins/themeable.js +4 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-4761cbda.js +0 -1
- package/dist/cdn/shared-87142858.js +0 -1
- package/dist/cdn/shared-e9276306.js +0 -1
- package/dist/cdn/shared-eacc4539.js +0 -1
- package/dist/cdn/shared-ec59505f.js +0 -12
- package/dist/cdn/shared-f3cd4d07.js +0 -1
|
@@ -1 +1,95 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import{h as t,P as e}from"./shared-43f449bb.js";import{E as i,T as s}from"./shared-f9a3d1ff.js";import"./shared-ff9791cf.js";import"./shared-9c08cfab.js";import{y as o,a as n}from"./shared-5fa697c4.js";import{c as r,h as a}from"./shared-7f33a83a.js";import"./shared-f9180815.js";import"./shared-2cf08dd4.js";import"./shared-029816d7.js";import"./shared-1522d76f.js";import{g as d}from"./shared-bab2ea2c.js";import{C as l}from"./shared-b23c903e.js";import{I as c}from"./shared-e91453df.js";import{c as h}from"./shared-4e709717.js";import"./foxy-spinner.js";import"./shared-30d00b64.js";import"./shared-30cbf0a6.js";import"./shared-343d1fd7.js";import"./shared-d3bf9ac0.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";o("vcf-tooltip",r`
|
|
2
|
+
:host {
|
|
3
|
+
/* Sizing */
|
|
4
|
+
--lumo-tooltip-size: var(--lumo-size-m);
|
|
5
|
+
/* Style */
|
|
6
|
+
font-family: var(--lumo-font-family);
|
|
7
|
+
font-size: var(--lumo-font-size-s, 0.875rem);
|
|
8
|
+
line-height: var(--lumo-line-height-s, 1.375);
|
|
9
|
+
cursor: default;
|
|
10
|
+
-webkit-tap-highlight-color: transparent;
|
|
11
|
+
-webkit-font-smoothing: antialiased;
|
|
12
|
+
-moz-osx-font-smoothing: grayscale;
|
|
13
|
+
}
|
|
14
|
+
`,{include:["lumo-color","lumo-typography"]});class u extends(i(s(e))){static get template(){return t`
|
|
15
|
+
<style>
|
|
16
|
+
:host {
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
padding: 0;
|
|
19
|
+
display: block;
|
|
20
|
+
position: absolute;
|
|
21
|
+
outline: none;
|
|
22
|
+
z-index: 1000;
|
|
23
|
+
-moz-user-select: none;
|
|
24
|
+
-ms-user-select: none;
|
|
25
|
+
-webkit-user-select: none;
|
|
26
|
+
user-select: none;
|
|
27
|
+
|
|
28
|
+
--tooltip-animation-duration: 250ms;
|
|
29
|
+
--tooltip-delay: 500ms;
|
|
30
|
+
animation: tooltipFadeIn var(--tooltip-animation-duration);
|
|
31
|
+
animation-delay: var(--tooltip-delay);
|
|
32
|
+
animation-fill-mode: both;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host([manual]) {
|
|
36
|
+
--tooltip-delay: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([close-button]) [part='close-button'] {
|
|
40
|
+
display: inline-block;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host([close-button]) [part='container'] {
|
|
44
|
+
padding-right: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[part='close-button'] {
|
|
48
|
+
display: none;
|
|
49
|
+
margin: 0;
|
|
50
|
+
padding: 0;
|
|
51
|
+
margin-top: calc(-1 * var(--lumo-tooltip-size) / 6);
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[part='content'] {
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
width: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[part='container'] {
|
|
61
|
+
display: flex;
|
|
62
|
+
padding: calc(var(--lumo-tooltip-size) / 6) calc(var(--lumo-tooltip-size) / 4);
|
|
63
|
+
color: var(--lumo-body-text-color);
|
|
64
|
+
background-color: var(--lumo-base-color);
|
|
65
|
+
border-radius: var(--lumo-border-radius);
|
|
66
|
+
box-shadow: var(--lumo-box-shadow-xs);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host([hidden]) [part='content'] {
|
|
70
|
+
display: none !important;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host ::slotted(*) {
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@keyframes tooltipFadeIn {
|
|
78
|
+
0% {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
}
|
|
81
|
+
100% {
|
|
82
|
+
opacity: 1;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
86
|
+
|
|
87
|
+
<div part="container" theme$="[[theme]]">
|
|
88
|
+
<div part="content">
|
|
89
|
+
<slot></slot>
|
|
90
|
+
</div>
|
|
91
|
+
<vaadin-button part="close-button" theme="icon tertiary small" on-click="hide" title="Close tooltip">
|
|
92
|
+
<iron-icon icon="lumo:cross"></iron-icon>
|
|
93
|
+
</vaadin-button>
|
|
94
|
+
</div>
|
|
95
|
+
`}static get is(){return"vcf-tooltip"}static get version(){return"1.3.15"}static get properties(){return{for:{type:String},position:{type:String,value:"top"},align:{type:String,value:"center"},hidden:{type:Boolean,value:!0,notify:!0,reflectToAttribute:!0,observer:"_hiddenChanged"},manual:{type:Boolean,value:!1,reflectToAttribute:!0},targetElement:{type:Object,observer:"_attachToTarget"},closeButton:{type:Boolean,value:!1,reflectToAttribute:!0},theme:{type:String,reflectToAttribute:!0}}}static get observers(){return["_setPosition(targetElement, hidden, position, align)","_updateTarget(for)","_manualObserver(manual)"]}constructor(){super(),this._boundShow=this.show.bind(this),this._boundHide=this.hide.bind(this),this._boundOnKeyup=this._onKeyup.bind(this)}connectedCallback(){super.connectedCallback(),this._attachToTarget(),this._setDefaultId()}ready(){super.ready(),window.addEventListener("resize",(()=>{clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout((()=>{const{targetElement:t,hidden:e,position:i}=this;this.hidden||this._setPosition(t,e,i)}),100)})),this.getAttribute("theme")||this.setAttribute("theme","dark")}disconnectedCallback(){super.disconnectedCallback(),this._detachFromTarget()}_manualObserver(){this.manual?this._removeEvents():this._addEvents()}_attachToTarget(t,e){e&&(this._removeTargetEvents(e),e.describedby&&(e.removeAttribute("aria-describedby"),delete e.describedby)),t&&(this._addEvents(),t.getAttribute("aria-describedby")||(t.setAttribute("aria-describedby",this.id),t.describedby=!0))}_addEvents(){this.targetElement&&!this.manual&&(this.targetElement.addEventListener("mouseenter",this._boundShow),this.targetElement.addEventListener("focus",this._boundShow),this.targetElement.addEventListener("mouseleave",this._boundHide),this.targetElement.addEventListener("blur",this._boundHide),this.targetElement.addEventListener("tap",this._boundHide)),this.manual||(this.addEventListener("mouseenter",this._boundShow),this.addEventListener("mouseleave",this._boundHide))}_detachFromTarget(){this.manual||this._removeEvents(),this.targetElement&&this.targetElement.describedby&&(this.targetElement.removeAttribute("aria-describedby"),delete this.targetElement.describedby)}_removeEvents(){this.targetElement&&this._removeTargetEvents(this.targetElement),this.removeEventListener("mouseenter",this._boundShow),this.removeEventListener("mouseleave",this._boundHide)}_removeTargetEvents(t){t.removeEventListener("mouseenter",this._boundShow),t.removeEventListener("focus",this._boundShow),t.removeEventListener("mouseleave",this._boundHide),t.removeEventListener("blur",this._boundHide),t.removeEventListener("tap",this._boundHide)}_updateTarget(){this.targetElement=this.parentNode.querySelector(`#${this.for}`)}_setPosition(t,e,i){if(t&&!e){let t=window.innerHeight,e=window.innerWidth;this.offsetParent&&(t=this.offsetParent.scrollHeight,e=this.offsetParent.scrollWidth);const s=this.targetElement.getBoundingClientRect(),o=this.getBoundingClientRect(),n=(s.width-o.width)/2,r=(s.height-o.height)/2;let a,d,l=s.left,c=s.top,h=window.pageYOffset;switch(this._parentPostioned&&(c=this.targetElement.offsetTop,l=this.targetElement.offsetLeft,h=0),i){case"top":d=c-o.height+h,a=this._calculateLeft(l,s,o,n);break;case"bottom":d=c+s.height+h,a=this._calculateLeft(l,s,o,n);break;case"left":a=l-o.width,d=this._calculateTop(c,s,o,r,h);break;case"right":a=l+s.width,d=this._calculateTop(c,s,o,r,h)}this._setPositionInVisibleBounds(t,e,a,d,o)}}get _parentPostioned(){return"static"!==window.getComputedStyle(this.offsetParent).position}_setPositionInVisibleBounds(t,e,i,s,o){i+o.width>e?(this.style.right="0px",this.style.left="auto"):(this.style.left=Math.max(0,i)+"px",this.style.right="auto"),s+o.height>t?(this.style.bottom=t+"px",this.style.top="auto"):(this.style.top=Math.max(0,s)+"px",this.style.bottom="auto")}_calculateLeft(t,e,i,s){switch(this.align){case"left":return t;case"right":return e.left+e.width-i.width;default:return t+s}}_calculateTop(t,e,i,s,o){switch(this.align){case"top":return t+o;case"bottom":return t+e.height-i.height+o;default:return t+s+o}}show(){this.hidden=!1}hide(){this.hidden=!0}_hiddenChanged(t){t?(this.setAttribute("aria-hidden",!0),window.removeEventListener("keyup",this._boundOnKeyup)):(this.setAttribute("aria-hidden",!1),window.addEventListener("keyup",this._boundOnKeyup))}_onKeyup(t){27===t.keyCode&&this.hide()}_setDefaultId(){this.id||(Vaadin.tooltipIndex||(Vaadin.tooltipIndex=0),this.id="vcf-tooltip"+ ++Vaadin.tooltipIndex)}}customElements.define(u.is,u),window.Vaadin.VcfTooltip=u;let m,p,f,v,b,y,_,g,x,E,w,$,T,S,j=t=>t;const k=l(n(c,"transaction-card"));class L extends k{constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}renderBody(){var t,e;const i=this.hiddenSelector,s=!i.matches("total",!0),o=!i.matches("status",!0);return a(m||(m=j` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),h({"transition-opacity":!0,"opacity-0":!this.data}),s||o?a(p||(p=j` <div class="flex items-center justify-between gap-s"> ${0} ${0} </div> `),s?this.__renderIdAndTotal():"",o?this.__renderStatus():""):"",i.matches("description",!0)?"":this.__renderSummary(),i.matches("customer",!0)?"":this.__renderCustomer(),h({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(e=null===(t=customElements.get("foxy-spinner"))||void 0===t?void 0:t.defaultNS)&&void 0!==e?e:"")}async _sendGet(){var t;const e=await super._sendGet(),i=null===(t=e._links["fx:store"])||void 0===t?void 0:t.href;if("string"==typeof i){const t=await super._fetch(i);this.__currencyDisplay=t.use_international_currency_symbol?"code":"symbol"}else this.__currencyDisplay="symbol";return e}__renderIdAndTotal(){const t=this.data;let e;if(t){const i={amount:`${t.total_order} ${t.currency_code}`,currencyDisplay:this.__currencyDisplay};e=a(f||(f=j` <span class="truncate">ID ${0}</span> ${0} `),t.display_id||d(t._links.self.href),"updateinfo"!==t.type&&"subscription_cancellation"!==t.type?a(v||(v=j` <span>•</span> <foxy-i18n .options="${0}" infer="" key="price"></foxy-i18n> `),i):"")}else e=a(b||(b=j`​`));return a(y||(y=j` <div class="min-w-0" data-testid="total"> ${0} <div class="font-medium flex items-center gap-xs">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),e,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var t,e,i,s,o,n;const r=(null===(t=this.data)||void 0===t?void 0:t.status)||"completed",d=null===(i=null===(e=this.data)||void 0===e?void 0:e.source)||void 0===i?void 0:i.substring(0,3).toUpperCase();return a(_||(_=j` <div class="flex-shrink-0" data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-xs"> ${0} <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline cursor-default text-l ${0}" id="status" icon="${0}"> </iron-icon> <vcf-tooltip for="status" theme="light" position="top"> <foxy-i18n infer="" key="status_${0}"></foxy-i18n> </vcf-tooltip> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),d?a(g||(g=j` <vcf-tooltip for="source" theme="light" position="top"> <foxy-i18n infer="" key="source_${0}"></foxy-i18n> </vcf-tooltip> <span class="cursor-default" id="source">${0}</span> `),d,d):"",JSON.stringify({value:null===(s=this.data)||void 0===s?void 0:s.transaction_date}),this.lang,this.ns,null!==(o={authorized:"text-success",completed:"text-success",capturing:"text-success",captured:"text-success",approved:"text-success",pending:"text-success",pending_fraud_review:"text-error",declined:"text-error",rejected:"text-error",problem:"text-error"}[r])&&void 0!==o?o:"text-tertiary",null!==(n={authorized:"icons:done",capturing:"icons:done",captured:"icons:done",approved:"icons:done",pending:"icons:done",completed:"icons:done-all",pending_fraud_review:"icons:info-outline",declined:"icons:highlight-off",rejected:"icons:highlight-off",problem:"icons:info-outline",refunded:"icons:restore",voided:"icons:remove-circle-outline"}[r])&&void 0!==n?n:"icons:schedule",r,this.renderTemplateOrSlot("status:after"))}__renderSummary(){var t,e,i;const s=null===(e=null===(t=this.data)||void 0===t?void 0:t._embedded)||void 0===e?void 0:e["fx:items"],o=null===(i=this.data)||void 0===i?void 0:i.type;let n,r;if(r="updateinfo"===o?"summary_payment_method_change":"subscription_modification"===o?"summary_subscription_modification":"subscription_cancellation"===o?"summary_subscription_cancellation":"summary",s){const t={most_expensive_item:[...s].sort(((t,e)=>t.price-e.price))[0],count_minus_one:s.length-1,count:s.length};n=a(x||(x=j`<foxy-i18n .options="${0}" infer="" key="${0}"></foxy-i18n>`),t,r)}else n=a(E||(E=j`​`));return a(w||(w=j` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),n,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const t=this.data,e=t?a($||($=j`${0} ${0} (${0})`),t.customer_first_name,t.customer_last_name,t.customer_email):a(T||(T=j`​`));return a(S||(S=j` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),e,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",L);export{L as TransactionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-billing-address-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-15dfa16d.js";import"./shared-f3cd4d07.js";import{I as t}from"./shared-2c92c192.js";import{I as e}from"./shared-eacc4539.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import"./foxy-spinner.js";import{_ as i,B as o}from"./shared-1522d76f.js";import{g as r}from"./shared-bab2ea2c.js";import{i as s}from"./shared-d3bf9ac0.js";import{h as n,s as a}from"./shared-7f33a83a.js";import{c as d}from"./shared-4e709717.js";import"./shared-5291bdca.js";import"./shared-d8ca5c87.js";import{N as l}from"./shared-6a7f96c4.js";import"./foxy-nucleon-element.js";import{R as c,a as u}from"./shared-ecd5eb1b.js";import{u as p}from"./shared-4761cbda.js";import"./shared-87142858.js";import"./shared-d1265ca0.js";import"./shared-6d0be1e4.js";import"./shared-a1d39ddd.js";import"./shared-54cbd346.js";import"./shared-30cbf0a6.js";import"./shared-343d1fd7.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-f9180815.js";import"./shared-b23c903e.js";import"./shared-0ffe26d8.js";import"./shared-ec59505f.js";import"./shared-264c82b8.js";import"./shared-85712eed.js";import"./shared-6ffa9f84.js";import"./shared-452e38da.js";import"./shared-5f1f0d8f.js";import"./shared-92dd9964.js";import"./shared-5db2fec0.js";import"./shared-b984ab7c.js";import"./shared-3d95605f.js";import"./shared-11c2efc8.js";import"./shared-06916671.js";import"./shared-63d11888.js";import"./shared-8d99b885.js";import"./shared-0961f769.js";import"./shared-979e24ec.js";import"./shared-87824001.js";import"./shared-25edf241.js";import"./shared-d7be11de.js";import"./shared-e9276306.js";import"./shared-ceec93fa.js";import"./shared-745a575c.js";import"./shared-29e74661.js";import"./shared-69c3549d.js";import"./shared-fad099e6.js";import"./shared-3bd99d11.js";import"./shared-3f3903d4.js";import"./shared-3fee360a.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-discount-builder.js";import"./shared-d519a301.js";import"./shared-bb05cfed.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";let m,f,h,_,y=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends e{constructor(){super(...arguments),this.__copyEmailState="idle",this.__copyIdState="idle"}static get properties(){return i(i({},super.properties),{},{__copyEmailState:{attribute:!1},__copyIdState:{attribute:!1}})}renderControl(){var t,e,i,o;const l=this.nucleon,c=null===(t=null==l?void 0:l.data)||void 0===t?void 0:t._links["fx:customer"].href,u=c?null===(e=null==l?void 0:l.getCustomerPageHref)||void 0===e?void 0:e.call(l,c):void 0;return n(m||(m=y` <foxy-i18n infer="" class="block text-s font-medium leading-xs mb-xs" key="label"> </foxy-i18n> <foxy-swipe-actions> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="" href="${0}"></foxy-customer-card> </a> <div class="h-full grid grid-cols-2 gap-s ml-s" slot="action"> ${0} ${0} </div> </foxy-swipe-actions> `),d({"block ring-inset rounded transition-colors":!0,"ring-1 ring-contrast-10":!u,"cursor-pointer bg-contrast-5 hover-bg-contrast-10":!!u,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!u}),s(u),s(c),this.__renderCopyAction(a(f||(f=y`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M9.493 2.852a.75.75 0 0 0-1.486-.204L7.545 6H4.198a.75.75 0 0 0 0 1.5h3.14l-.69 5H3.302a.75.75 0 0 0 0 1.5h3.14l-.435 3.148a.75.75 0 0 0 1.486.204L7.955 14h2.986l-.434 3.148a.75.75 0 0 0 1.486.204L12.456 14h3.346a.75.75 0 0 0 0-1.5h-3.14l.69-5h3.346a.75.75 0 0 0 0-1.5h-3.14l.435-3.148a.75.75 0 0 0-1.486-.204L12.045 6H9.059l.434-3.148ZM8.852 7.5l-.69 5h2.986l.69-5H8.852Z" clip-rule="evenodd" /></svg>`)),"copy_id_caption","__copyIdState",c?String(r(c)):""),this.__renderCopyAction(a(h||(h=y`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M5.404 14.596A6.5 6.5 0 1 1 16.5 10a1.25 1.25 0 0 1-2.5 0 4 4 0 1 0-.571 2.06A2.75 2.75 0 0 0 18 10a8 8 0 1 0-2.343 5.657.75.75 0 0 0-1.06-1.06 6.5 6.5 0 0 1-9.193 0ZM10 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z" clip-rule="evenodd" /></svg>`)),"copy_email_caption","__copyEmailState",null!==(o=null===(i=null==l?void 0:l.data)||void 0===i?void 0:i.customer_email)&&void 0!==o?o:""))}__renderCopyAction(t,e,i,o){const r=this[i],s="fail"===r?"error":"done"===r?"end":"busy";return n(_||(_=y` <button class="relative transition-colors bg-contrast-5 text-body hover-bg-contrast-10 rounded h-full py-0 px-m focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50" ?disabled="${0}" @click="${0}" @focusout="${0}" @mouseout="${0}"> <div class="${0}"> ${0} <foxy-i18n class="mt-xs text-s font-medium leading-none" infer="" key="${0}"> </foxy-i18n> </div> <div class="${0}"> <foxy-spinner layout="no-label" state="${0}" infer="spinner"> </foxy-spinner> </div> </button> `),"idle"!==r,(()=>"idle"===r&&this.__copy(o,i)),(t=>"idle"!==r&&t.stopPropagation()),(t=>"idle"!==r&&t.stopPropagation()),d({"relative flex flex-col items-center justify-center transition-opacity":!0,"opacity-0":"idle"!==r}),t,e,d({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===r}),s)}async __copy(t,e){this[e]="busy";try{await navigator.clipboard.writeText(t),this[e]="done"}catch(t){this[e]="fail"}setTimeout((()=>this[e]="idle"),3e3)}});let v,x=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends e{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return i(i({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"idle"===t?this.theme:"";return n(v||(v=x` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),e,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const e=new l.API(this),i=await e.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=i.ok?"idle":"fail",i.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let b,g,j,$,w,k,S=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends e{renderControl(){var t,e,i,o,r,s,a,d,l,c;return n(b||(b=S` <div class="flex flex-wrap gap-x-m gap-y-xs"> ${0} ${0} ${0} ${0} ${0} </div> `),(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"])?this.__renderCaptureAction():"",(null===(o=null===(i=this.nucleon)||void 0===i?void 0:i.data)||void 0===o?void 0:o._links["fx:void"])?this.__renderVoidAction():"",(null===(s=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===s?void 0:s._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"",(null===(c=null===(l=this.nucleon)||void 0===l?void 0:l.data)||void 0===c?void 0:c._links["fx:subscription"])?this.__renderSubscriptionAction():"")}__renderSendEmailsAction(){var t,e;return n(g||(g=S` <foxy-internal-transaction-post-action-control infer="send-emails" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),s(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,e;return n(j||(j=S` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),s(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,e,i;return n($||($=S` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),s(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:void"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,e,i;return n(w||(w=S` <foxy-internal-transaction-post-action-control infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),s(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:refund"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderSubscriptionAction(){var t,e,i;const o=this.nucleon,r=null===(e=null===(t=null==o?void 0:o.data)||void 0===t?void 0:t._links["fx:subscription"])||void 0===e?void 0:e.href,a=r?null===(i=null==o?void 0:o.getSubscriptionPageHref)||void 0===i?void 0:i.call(o,r):void 0;return n(k||(k=S` <a class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="subscription" key="caption"></foxy-i18n> </a> `),s(a))}});let P,H,A,C,E,L,I,R,G,B,Z=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends e{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var t,e,i,o,r,a,d,l,c;const u=null===(t=this.nucleon)||void 0===t?void 0:t.data;if(!u)return n(P||(P=Z``));const p=null!==(i=null===(e=null==u?void 0:u._embedded)||void 0===e?void 0:e["fx:applied_taxes"])&&void 0!==i?i:[],m=null!==(r=null===(o=u._embedded)||void 0===o?void 0:o["fx:shipments"])&&void 0!==r?r:[];return n(H||(H=Z` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>:</span> <span>${0}</span> ${0} ${0} ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> ${0} <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>: ${0} </span> </span> </p> `),s(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(u.total_item_price),0===m.length||0===u.total_shipping?n(A||(A=Z` <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>:</span> <span>${0} </span> `),this.__renderPrice(u.total_shipping,!0)):m.map((t=>n(C||(C=Z` <span>${0}:</span> <span>${0}</span> `),t.shipping_service_description,this.__renderPrice(t.total_shipping,!0)))),0===p.length||0===u.total_tax?n(E||(E=Z` <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>:</span> <span>${0}</span> `),this.__renderPrice(u.total_tax,!0)):p.map((t=>n(L||(L=Z` <span>${0}:</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),null===(d=null===(a=null==u?void 0:u._embedded)||void 0===a?void 0:a["fx:applied_gift_card_codes"])||void 0===d?void 0:d.map((t=>{var e;return n(I||(I=Z` <span>${0}:</span> <span>${0}</span> `),t._embedded["fx:gift_card"].name,this.__renderPrice(null!==(e=t.balance_adjustment)&&void 0!==e?e:0,!0))})),null===(c=null===(l=null==u?void 0:u._embedded)||void 0===l?void 0:l["fx:discounts"])||void 0===c?void 0:c.map((t=>n(R||(R=Z` <span data-testclass="discount">${0}:</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),this.__renderStatus(),this.__renderPrice(u.total_order))}get __storeHref(){var t,e,i;return null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:store"])||void 0===i?void 0:i.href}get __store(){var t,e;const i=`#${this.__storeLoaderId}`;return null!==(e=null===(t=this.renderRoot.querySelector(i))||void 0===t?void 0:t.data)&&void 0!==e?e:null}__renderPrice(t,e=!1){var i,o,r;const s=(null===(i=this.__store)||void 0===i?void 0:i.use_international_currency_symbol)?"code":"symbol",a=null===(r=null===(o=this.nucleon)||void 0===o?void 0:o.data)||void 0===r?void 0:r.currency_code;return n(G||(G=Z` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),e&&0!==t?t>0?"text-success":"text-error":"",{currencyDisplay:s,signDisplay:e?"exceptZero":"auto",amount:`${t} ${a}`})}__renderStatus(){var t,e;const i=(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e.status)||"completed";let o="";return o=["capturing","captured","approved","authorized","pending"].includes(i)?"text-success bg-success-10":i&&"completed"!==i?["problem","pending_fraud_review","rejected","declined"].includes(i)?"text-error-contrast bg-error":"bg-contrast-5 text-body":"text-success-contrast bg-success",n(B||(B=Z` <foxy-i18n infer="" class="${0} rounded-s py-xs px-s font-medium text-s leading-xs" key="status_${0}"></foxy-i18n> `),o,i)}});let z,M,T,W=t=>t;class q extends(c(u(t,"transaction"))){constructor(){super(...arguments),this.hostedPaymentGatewaysHelper=null,this.paymentGatewaysHelper=null,this.getSubscriptionPageHref=null,this.getCustomerPageHref=null,this.__renderHeader=()=>{var t,e,i,o,r,s,a,d,l,c,u;const m=null===(t=this.data)||void 0===t?void 0:t.source,f=null===(e=this.data)||void 0===e?void 0:e.type;let h="subtitle";return"updateinfo"===f?h=""===m||(null==m?void 0:m.startsWith("cit_"))?"subtitle_customer_changed_payment_method":"mit_uoe"===m?"subtitle_admin_changed_payment_method_with_uoe":"mit_api"===m?"subtitle_integration_changed_payment_method":"subtitle_admin_changed_payment_method":"subscription_modification"===f?h=""===m||(null==m?void 0:m.startsWith("cit_"))?"subtitle_customer_changed_subscription":"mit_uoe"===m?"subtitle_admin_changed_subscription_with_uoe":"mit_api"===m?"subtitle_integration_changed_subscription":"subtitle_admin_changed_subscription":"subscription_renewal"===f?"mit_recurring"===m?h="subtitle_subscription_renewal_attempt":"mit_recurring_reattempt_automated"===m?h="subtitle_subscription_renewal_automated_reattempt":"mit_recurring_reattempt_manual"===m&&(h="subtitle_subscription_renewal_manual_reattempt"):"subscription_cancellation"===f?"cit_recurring_cancellation"===m?h="subtitle_customer_canceled_subscription":"mit_recurring_cancellation"===m&&(h="subtitle_admin_canceled_subscription"):(null===(i=this.data)||void 0===i?void 0:i._links["fx:subscription"])?(null==m?void 0:m.startsWith("cit_"))?h="subtitle_customer_subscribed":"mit_uoe"===m?h="subtitle_admin_subscribed_with_uoe":"mit_api"===m&&(h="subtitle_integration_subscribed"):(null==m?void 0:m.startsWith("cit_"))?h="subtitle_customer_placed_order":"mit_uoe"===m?h="subtitle_admin_placed_order_with_uoe":"mit_api"===m&&(h="subtitle_integration_placed_order"),n(z||(z=W` <h1> <div class="flex items-center gap-s leading-xs text-xxl font-medium break-all"> <foxy-i18n infer="header" key="title" .options="${0}"></foxy-i18n> <foxy-copy-to-clipboard infer="header" class="inline-block text-m" text="${0}"> </foxy-copy-to-clipboard> </div> <foxy-i18n class="block leading-xs text-l text-secondary" infer="header" key="${0}" .options="${0}"> </foxy-i18n> <foxy-internal-transaction-actions-control class="mt-xs" infer="actions"> </foxy-internal-transaction-actions-control> </h1> ${0} `),this.data,null===(o=this.data)||void 0===o?void 0:o.display_id,h,{transaction_date:null===(r=this.data)||void 0===r?void 0:r.transaction_date,user_agent:p.analyze(null!==(a=null===(s=this.data)||void 0===s?void 0:s.user_agent)&&void 0!==a?a:"").toString(),ip_country:null===(d=this.data)||void 0===d?void 0:d.ip_country},["problem","pending_fraud_review","rejected","declined"].includes(null!==(c=null===(l=this.data)||void 0===l?void 0:l.status)&&void 0!==c?c:"")?n(M||(M=W` <p class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n infer="header" key="alert_status_${0}"></foxy-i18n> </p> `),null===(u=this.data)||void 0===u?void 0:u.status):"")}}static get properties(){return i(i({},super.properties),{},{hostedPaymentGatewaysHelper:{attribute:"hosted-payment-gateways-helper"},paymentGatewaysHelper:{attribute:"payment-gateways-helper"},getSubscriptionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1}})}get readonlySelector(){var t,e,i;const r=Boolean(null!==(e=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==e?e:null===(i=this.data)||void 0===i?void 0:i._links["fx:refund"]);return new o(r?`${super.readonlySelector} billing-addresses`:`${super.readonlySelector} billing-addresses items attributes custom-fields`)}get hiddenSelector(){var t,e;const i=["billing-addresses:dialog:delete billing-addresses:dialog:timestamps"],r=null===(t=this.data)||void 0===t?void 0:t.type;return(null===(e=this.data)||void 0===e?void 0:e._links["fx:subscription"])||i.push("subscription"),"subscription_modification"===r&&i.push("actions"),"updateinfo"===r&&i.push("not=customer,subscription,payments,custom-fields,attributes"),"subscription_cancellation"===r&&i.push("not=customer,subscription,custom-fields,attributes"),new o(`${super.hiddenSelector} ${i.join(" ")}`.trim())}renderBody(){var t,e,i,o;let r,a;if(this.data)try{const t=new URL(this.data._links["fx:shipments"].href),e=new URL(this.data._links["fx:items"].href);t.searchParams.set("zoom","items:item_category"),e.searchParams.set("zoom","item_options"),r=t.toString(),a=e.toString()}catch(t){}return n(T||(T=W` ${0} <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <div class="grid gap-s"> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" limit="10" item="foxy-item-card" form="foxy-item-form" alert .related="${0}"> </foxy-internal-async-list-control> <foxy-internal-transaction-summary-control infer="summary" class="min-w-0"> </foxy-internal-transaction-summary-control> </div> <foxy-internal-async-list-control infer="billing-addresses" first="${0}" item="foxy-billing-address-card" form="foxy-address-form" hide-create-button hide-delete-button alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="payments" first="${0}" item="foxy-payment-card" .itemProps="${0}"> </foxy-internal-async-list-control> <div class="grid gap-m sm-grid-cols-2"> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" alert> </foxy-internal-async-list-control> </div> <foxy-internal-async-list-control infer="shipments" first="${0}" item="foxy-shipment-card"> </foxy-internal-async-list-control> `),this.__renderHeader(),s(a),[this.href],s(null===(t=this.data)||void 0===t?void 0:t._links["fx:billing_addresses"].href),s(null===(e=this.data)||void 0===e?void 0:e._links["fx:payments"].href),{"hosted-payment-gateways-helper":this.hostedPaymentGatewaysHelper,"payment-gateways-helper":this.paymentGatewaysHelper},s(null===(i=this.data)||void 0===i?void 0:i._links["fx:custom_fields"].href),s(null===(o=this.data)||void 0===o?void 0:o._links["fx:attributes"].href),s(r))}}customElements.define("foxy-transaction",q);export{q as Transaction};
|
|
1
|
+
import"./foxy-billing-address-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-029816d7.js";import"./shared-8201d0b5.js";import{I as t}from"./shared-ff8ca16b.js";import{I as e}from"./shared-fc15a882.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import"./foxy-spinner.js";import{_ as i,B as o}from"./shared-1522d76f.js";import{g as s}from"./shared-bab2ea2c.js";import{i as r}from"./shared-d3bf9ac0.js";import{h as n,s as a}from"./shared-7f33a83a.js";import{c as d}from"./shared-4e709717.js";import"./shared-c7b3d22b.js";import"./shared-d21fa1a6.js";import{N as l}from"./shared-6a7f96c4.js";import"./foxy-nucleon-element.js";import{R as c,a as u}from"./shared-5fa697c4.js";import"./shared-2cf08dd4.js";import"./shared-e91453df.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-30cbf0a6.js";import"./shared-343d1fd7.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-f9180815.js";import"./shared-b23c903e.js";import"./shared-9df8f842.js";import"./shared-f9a3d1ff.js";import"./shared-c9ba1b64.js";import"./shared-b509bc2c.js";import"./shared-61ade33e.js";import"./shared-9c08cfab.js";import"./shared-e39807f8.js";import"./shared-ea527e98.js";import"./shared-99c0ae04.js";import"./shared-ad34b6db.js";import"./shared-4e59fd48.js";import"./shared-2c8c4b43.js";import"./shared-11c2efc8.js";import"./shared-268571df.js";import"./shared-4c124efc.js";import"./shared-2b27e2e7.js";import"./shared-a8dc23f1.js";import"./shared-2bdc99f4.js";import"./shared-4462dc70.js";import"./shared-e83f2983.js";import"./shared-293771ba.js";import"./shared-d7be11de.js";import"./shared-4c650e5c.js";import"./shared-7dd17943.js";import"./shared-bed7aae1.js";import"./shared-8952aeac.js";import"./shared-54b0e48f.js";import"./shared-7e1953f5.js";import"./shared-6a9ae42e.js";import"./shared-20ba4cdc.js";import"./shared-ac7c5a5e.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-discount-builder.js";import"./shared-d519a301.js";import"./shared-bb05cfed.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";let p,m,f,h,_=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends e{constructor(){super(...arguments),this.__copyEmailState="idle",this.__copyIdState="idle"}static get properties(){return i(i({},super.properties),{},{__copyEmailState:{attribute:!1},__copyIdState:{attribute:!1}})}renderControl(){var t,e,i,o;const l=this.nucleon,c=null===(t=null==l?void 0:l.data)||void 0===t?void 0:t._links["fx:customer"].href,u=c?null===(e=null==l?void 0:l.getCustomerPageHref)||void 0===e?void 0:e.call(l,c):void 0;return n(p||(p=_` <foxy-i18n infer="" class="block text-s font-medium leading-xs mb-xs" key="label"> </foxy-i18n> <foxy-swipe-actions> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="" href="${0}"></foxy-customer-card> </a> <div class="h-full grid grid-cols-2 gap-s ml-s" slot="action"> ${0} ${0} </div> </foxy-swipe-actions> `),d({"block ring-inset rounded transition-colors":!0,"ring-1 ring-contrast-10":!u,"cursor-pointer bg-contrast-5 hover-bg-contrast-10":!!u,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!u}),r(u),r(c),this.__renderCopyAction(a(m||(m=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M9.493 2.852a.75.75 0 0 0-1.486-.204L7.545 6H4.198a.75.75 0 0 0 0 1.5h3.14l-.69 5H3.302a.75.75 0 0 0 0 1.5h3.14l-.435 3.148a.75.75 0 0 0 1.486.204L7.955 14h2.986l-.434 3.148a.75.75 0 0 0 1.486.204L12.456 14h3.346a.75.75 0 0 0 0-1.5h-3.14l.69-5h3.346a.75.75 0 0 0 0-1.5h-3.14l.435-3.148a.75.75 0 0 0-1.486-.204L12.045 6H9.059l.434-3.148ZM8.852 7.5l-.69 5h2.986l.69-5H8.852Z" clip-rule="evenodd" /></svg>`)),"copy_id_caption","__copyIdState",c?String(s(c)):""),this.__renderCopyAction(a(f||(f=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M5.404 14.596A6.5 6.5 0 1 1 16.5 10a1.25 1.25 0 0 1-2.5 0 4 4 0 1 0-.571 2.06A2.75 2.75 0 0 0 18 10a8 8 0 1 0-2.343 5.657.75.75 0 0 0-1.06-1.06 6.5 6.5 0 0 1-9.193 0ZM10 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z" clip-rule="evenodd" /></svg>`)),"copy_email_caption","__copyEmailState",null!==(o=null===(i=null==l?void 0:l.data)||void 0===i?void 0:i.customer_email)&&void 0!==o?o:""))}__renderCopyAction(t,e,i,o){const s=this[i],r="fail"===s?"error":"done"===s?"end":"busy";return n(h||(h=_` <button class="relative transition-colors bg-contrast-5 text-body hover-bg-contrast-10 rounded h-full py-0 px-m focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50" ?disabled="${0}" @click="${0}" @focusout="${0}" @mouseout="${0}"> <div class="${0}"> ${0} <foxy-i18n class="mt-xs text-s font-medium leading-none" infer="" key="${0}"> </foxy-i18n> </div> <div class="${0}"> <foxy-spinner layout="no-label" state="${0}" infer="spinner"> </foxy-spinner> </div> </button> `),"idle"!==s,(()=>"idle"===s&&this.__copy(o,i)),(t=>"idle"!==s&&t.stopPropagation()),(t=>"idle"!==s&&t.stopPropagation()),d({"relative flex flex-col items-center justify-center transition-opacity":!0,"opacity-0":"idle"!==s}),t,e,d({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===s}),r)}async __copy(t,e){this[e]="busy";try{await navigator.clipboard.writeText(t),this[e]="done"}catch(t){this[e]="fail"}setTimeout((()=>this[e]="idle"),3e3)}});let y,v=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends e{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return i(i({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"idle"===t?this.theme:"";return n(y||(y=v` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),e,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const e=new l.API(this),i=await e.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=i.ok?"idle":"fail",i.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let x,b,g,j,$,w,k=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends e{renderControl(){var t,e,i,o,s,r,a,d,l,c;return n(x||(x=k` <div class="flex flex-wrap gap-x-m gap-y-xs"> ${0} ${0} ${0} ${0} ${0} </div> `),(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"])?this.__renderCaptureAction():"",(null===(o=null===(i=this.nucleon)||void 0===i?void 0:i.data)||void 0===o?void 0:o._links["fx:void"])?this.__renderVoidAction():"",(null===(r=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===r?void 0:r._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"",(null===(c=null===(l=this.nucleon)||void 0===l?void 0:l.data)||void 0===c?void 0:c._links["fx:subscription"])?this.__renderSubscriptionAction():"")}__renderSendEmailsAction(){var t,e;return n(b||(b=k` <foxy-internal-transaction-post-action-control infer="send-emails" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,e;return n(g||(g=k` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,e,i;return n(j||(j=k` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:void"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,e,i;return n($||($=k` <foxy-internal-transaction-post-action-control infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:refund"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderSubscriptionAction(){var t,e,i;const o=this.nucleon,s=null===(e=null===(t=null==o?void 0:o.data)||void 0===t?void 0:t._links["fx:subscription"])||void 0===e?void 0:e.href,a=s?null===(i=null==o?void 0:o.getSubscriptionPageHref)||void 0===i?void 0:i.call(o,s):void 0;return n(w||(w=k` <a class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="subscription" key="caption"></foxy-i18n> </a> `),r(a))}});let S,P,H,A,C,E,L,I,R,G,B=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends e{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var t,e,i,o,s,a,d,l,c;const u=null===(t=this.nucleon)||void 0===t?void 0:t.data;if(!u)return n(S||(S=B``));const p=null!==(i=null===(e=null==u?void 0:u._embedded)||void 0===e?void 0:e["fx:applied_taxes"])&&void 0!==i?i:[],m=null!==(s=null===(o=u._embedded)||void 0===o?void 0:o["fx:shipments"])&&void 0!==s?s:[];return n(P||(P=B` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>:</span> <span>${0}</span> ${0} ${0} ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> ${0} <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>: ${0} </span> </span> </p> `),r(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(u.total_item_price),0===m.length||0===u.total_shipping?n(H||(H=B` <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>:</span> <span>${0} </span> `),this.__renderPrice(u.total_shipping,!0)):m.map((t=>n(A||(A=B` <span>${0}:</span> <span>${0}</span> `),t.shipping_service_description,this.__renderPrice(t.total_shipping,!0)))),0===p.length||0===u.total_tax?n(C||(C=B` <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>:</span> <span>${0}</span> `),this.__renderPrice(u.total_tax,!0)):p.map((t=>n(E||(E=B` <span>${0}:</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),null===(d=null===(a=null==u?void 0:u._embedded)||void 0===a?void 0:a["fx:applied_gift_card_codes"])||void 0===d?void 0:d.map((t=>{var e;return n(L||(L=B` <span>${0}:</span> <span>${0}</span> `),t._embedded["fx:gift_card"].name,this.__renderPrice(null!==(e=t.balance_adjustment)&&void 0!==e?e:0,!0))})),null===(c=null===(l=null==u?void 0:u._embedded)||void 0===l?void 0:l["fx:discounts"])||void 0===c?void 0:c.map((t=>n(I||(I=B` <span data-testclass="discount">${0}:</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),this.__renderStatus(),this.__renderPrice(u.total_order))}get __storeHref(){var t,e,i;return null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:store"])||void 0===i?void 0:i.href}get __store(){var t,e;const i=`#${this.__storeLoaderId}`;return null!==(e=null===(t=this.renderRoot.querySelector(i))||void 0===t?void 0:t.data)&&void 0!==e?e:null}__renderPrice(t,e=!1){var i,o,s;const r=(null===(i=this.__store)||void 0===i?void 0:i.use_international_currency_symbol)?"code":"symbol",a=null===(s=null===(o=this.nucleon)||void 0===o?void 0:o.data)||void 0===s?void 0:s.currency_code;return n(R||(R=B` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),e&&0!==t?t>0?"text-success":"text-error":"",{currencyDisplay:r,signDisplay:e?"exceptZero":"auto",amount:`${t} ${a}`})}__renderStatus(){var t,e;const i=(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e.status)||"completed";let o="";return o=["capturing","captured","approved","authorized","pending"].includes(i)?"text-success bg-success-10":i&&"completed"!==i?["problem","pending_fraud_review","rejected","declined"].includes(i)?"text-error-contrast bg-error":"bg-contrast-5 text-body":"text-success-contrast bg-success",n(G||(G=B` <foxy-i18n infer="" class="${0} rounded-s py-xs px-s font-medium text-s leading-xs" key="status_${0}"></foxy-i18n> `),o,i)}});let Z,M,T=t=>t;const W=c(u(t,"transaction"));class q extends W{constructor(){super(...arguments),this.hostedPaymentGatewaysHelper=null,this.paymentGatewaysHelper=null,this.getSubscriptionPageHref=null,this.getCustomerPageHref=null}static get properties(){return i(i({},super.properties),{},{hostedPaymentGatewaysHelper:{attribute:"hosted-payment-gateways-helper"},paymentGatewaysHelper:{attribute:"payment-gateways-helper"},getSubscriptionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1}})}get readonlySelector(){var t,e,i;const s=Boolean(null!==(e=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==e?e:null===(i=this.data)||void 0===i?void 0:i._links["fx:refund"]);return new o(s?`${super.readonlySelector} billing-addresses`:`${super.readonlySelector} billing-addresses items attributes custom-fields`)}get hiddenSelector(){var t,e;const i=["billing-addresses:dialog:delete billing-addresses:dialog:timestamps"],s=null===(t=this.data)||void 0===t?void 0:t.type;return(null===(e=this.data)||void 0===e?void 0:e._links["fx:subscription"])||i.push("subscription"),"subscription_modification"===s&&i.push("actions"),"updateinfo"===s&&i.push("not=customer,subscription,payments,custom-fields,attributes"),"subscription_cancellation"===s&&i.push("not=customer,subscription,custom-fields,attributes"),new o(`${super.hiddenSelector} ${i.join(" ")}`.trim())}renderBody(){var t,e,i,o,s,a,d,l,c,u,p,m,f;let h,_,y="subtitle";const v=this.hiddenSelector,x=null===(t=this.data)||void 0===t?void 0:t.source,b=null===(e=this.data)||void 0===e?void 0:e.type;if("updateinfo"===b?y=!x||(null==x?void 0:x.startsWith("cit_"))?"subtitle_customer_changed_payment_method":"mit_uoe"===x?"subtitle_admin_changed_payment_method_with_uoe":"mit_api"===x?"subtitle_integration_changed_payment_method":"subtitle_admin_changed_payment_method":"subscription_modification"===b?y=!x||(null==x?void 0:x.startsWith("cit_"))?"subtitle_customer_changed_subscription":"mit_uoe"===x?"subtitle_admin_changed_subscription_with_uoe":"mit_api"===x?"subtitle_integration_changed_subscription":"subtitle_admin_changed_subscription":"subscription_renewal"===b?"mit_recurring"===x?y="subtitle_subscription_renewal_attempt":"mit_recurring_reattempt_automated"===x?y="subtitle_subscription_renewal_automated_reattempt":"mit_recurring_reattempt_manual"===x&&(y="subtitle_subscription_renewal_manual_reattempt"):"subscription_cancellation"===b?"cit_recurring_cancellation"===x?y="subtitle_customer_canceled_subscription":"mit_recurring_cancellation"===x&&(y="subtitle_admin_canceled_subscription"):(null===(i=this.data)||void 0===i?void 0:i._links["fx:subscription"])?(null==x?void 0:x.startsWith("cit_"))?y="subtitle_customer_subscribed":"mit_uoe"===x?y="subtitle_admin_subscribed_with_uoe":"mit_api"===x&&(y="subtitle_integration_subscribed"):(null==x?void 0:x.startsWith("cit_"))?y="subtitle_customer_placed_order":"mit_uoe"===x?y="subtitle_admin_placed_order_with_uoe":"mit_api"===x&&(y="subtitle_integration_placed_order"),this.data)try{const t=new URL(this.data._links["fx:shipments"].href),e=new URL(this.data._links["fx:items"].href);t.searchParams.set("zoom","items:item_category"),e.searchParams.set("zoom","item_options"),h=t.toString(),_=e.toString()}catch(t){}return n(Z||(Z=T` <h2> <div class="flex items-center gap-s leading-xs text-xxl font-medium break-all"> <foxy-i18n infer="header" key="title" .options="${0}"></foxy-i18n> <foxy-copy-to-clipboard infer="header" class="inline-block text-m" text="${0}"> </foxy-copy-to-clipboard> </div> <foxy-i18n class="block leading-xs text-l text-secondary" infer="header" key="${0}" .options="${0}"> </foxy-i18n> <foxy-internal-transaction-actions-control class="mt-xs" infer="actions"> </foxy-internal-transaction-actions-control> </h2> ${0} <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <div class="grid gap-s" ?hidden="${0}"> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" limit="10" item="foxy-item-card" form="foxy-item-form" alert .related="${0}"> </foxy-internal-async-list-control> <foxy-internal-transaction-summary-control infer="summary" class="min-w-0"> </foxy-internal-transaction-summary-control> </div> <foxy-internal-async-list-control infer="billing-addresses" first="${0}" item="foxy-billing-address-card" form="foxy-address-form" hide-create-button hide-delete-button alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="payments" first="${0}" item="foxy-payment-card" .itemProps="${0}"> </foxy-internal-async-list-control> <div class="grid gap-m sm-grid-cols-2" ?hidden="${0}"> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" alert> </foxy-internal-async-list-control> </div> <foxy-internal-async-list-control infer="shipments" first="${0}" item="foxy-shipment-card"> </foxy-internal-async-list-control> `),this.data,null===(o=this.data)||void 0===o?void 0:o.display_id,y,{transaction_date:null===(s=this.data)||void 0===s?void 0:s.transaction_date,ip_country:null===(a=this.data)||void 0===a?void 0:a.ip_country},["problem","pending_fraud_review","rejected","declined"].includes(null!==(l=null===(d=this.data)||void 0===d?void 0:d.status)&&void 0!==l?l:"")?n(M||(M=T` <p class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n infer="header" key="alert_status_${0}"></foxy-i18n> </p> `),null===(c=this.data)||void 0===c?void 0:c.status):"",v.matches("items",!0)&&v.matches("summary",!0),r(_),[this.href],r(null===(u=this.data)||void 0===u?void 0:u._links["fx:billing_addresses"].href),r(null===(p=this.data)||void 0===p?void 0:p._links["fx:payments"].href),{"hosted-payment-gateways-helper":this.hostedPaymentGatewaysHelper,"payment-gateways-helper":this.paymentGatewaysHelper},v.matches("custom-fields",!0)&&v.matches("attributes",!0),r(null===(m=this.data)||void 0===m?void 0:m._links["fx:custom_fields"].href),r(null===(f=this.data)||void 0===f?void 0:f._links["fx:attributes"].href),r(h))}}customElements.define("foxy-transaction",q);export{q as Transaction};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-30d00b64.js";import"./shared-ff9791cf.js";import"./foxy-spinner.js";import"./shared-029816d7.js";import{T as t}from"./shared-00c2793e.js";import{a as s}from"./shared-5fa697c4.js";import"./shared-43f449bb.js";import"./shared-1522d76f.js";import"./shared-7f33a83a.js";import"./shared-30cbf0a6.js";import"./shared-343d1fd7.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./foxy-nucleon-element.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-4e709717.js";let e,n,a,o,r,i,l=t=>t;class m extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[m.priceColumn,m.summaryColumn,m.statusColumn,m.idColumn,m.dateColumn,m.receiptColumn]}}m.priceColumn={cell:t=>t.html(e||(e=l`
|
|
2
2
|
<foxy-i18n
|
|
3
3
|
data-testclass="i18n totals"
|
|
4
4
|
class="text-m font-medium font-tnum"
|
|
@@ -8,7 +8,7 @@ import"./shared-54cbd346.js";import"./shared-6d0be1e4.js";import"./foxy-spinner.
|
|
|
8
8
|
.options=${0}
|
|
9
9
|
>
|
|
10
10
|
</foxy-i18n>
|
|
11
|
-
`),t.lang,t.ns,{amount:`${t.data.total_order} ${t.data.currency_code}`})},
|
|
11
|
+
`),t.lang,t.ns,{amount:`${t.data.total_order} ${t.data.currency_code}`})},m.summaryColumn={cell:t=>{var s;const e=null===(s=t.data._embedded)||void 0===s?void 0:s["fx:items"];if(!e)return"";const a={most_expensive_item:[...e].sort(((t,s)=>t.price-s.price))[0],count_minus_one:e.length-1,count:e.length};return t.html(n||(n=l`
|
|
12
12
|
<foxy-i18n
|
|
13
13
|
data-testclass="i18n summaries"
|
|
14
14
|
class="text-m"
|
|
@@ -18,7 +18,7 @@ import"./shared-54cbd346.js";import"./shared-6d0be1e4.js";import"./foxy-spinner.
|
|
|
18
18
|
.options=${0}
|
|
19
19
|
>
|
|
20
20
|
</foxy-i18n>
|
|
21
|
-
`),t.lang,t.ns,a)}},
|
|
21
|
+
`),t.lang,t.ns,a)}},m.statusColumn={hideBelow:"sm",cell:t=>{const s={completed:"bg-success-10 text-success",declined:"bg-error-10 text-error",rejected:"bg-error-10 text-error"},e=t.data.status||"completed",n=e in s?s[e]:"bg-contrast-5 text-contrast";return t.html(a||(a=l`
|
|
22
22
|
<foxy-i18n
|
|
23
23
|
data-testclass="i18n statuses"
|
|
24
24
|
class="px-s py-xs text-m font-medium rounded ${0}"
|
|
@@ -27,11 +27,11 @@ import"./shared-54cbd346.js";import"./shared-6d0be1e4.js";import"./foxy-spinner.
|
|
|
27
27
|
ns=${0}
|
|
28
28
|
>
|
|
29
29
|
</foxy-i18n>
|
|
30
|
-
`),n,t.lang,`transaction_${e}`,t.ns)}},
|
|
30
|
+
`),n,t.lang,`transaction_${e}`,t.ns)}},m.idColumn={hideBelow:"sm",cell:t=>t.html(o||(o=l`
|
|
31
31
|
<span class="text-m text-secondary font-tnum" data-testclass="ids">
|
|
32
32
|
<span class="text-tertiary">ID</span> ${0}
|
|
33
33
|
</span>
|
|
34
|
-
`),t.data.id)},
|
|
34
|
+
`),t.data.id)},m.dateColumn={hideBelow:"sm",cell:t=>t.html(r||(r=l`
|
|
35
35
|
<foxy-i18n
|
|
36
36
|
data-testclass="i18n dates"
|
|
37
37
|
class="text-m text-secondary font-tnum"
|
|
@@ -41,7 +41,7 @@ import"./shared-54cbd346.js";import"./shared-6d0be1e4.js";import"./foxy-spinner.
|
|
|
41
41
|
.options=${0}
|
|
42
42
|
>
|
|
43
43
|
</foxy-i18n>
|
|
44
|
-
`),t.lang,t.ns,{value:t.data.transaction_date})},
|
|
44
|
+
`),t.lang,t.ns,{value:t.data.transaction_date})},m.receiptColumn={cell:t=>t.html(i||(i=l`
|
|
45
45
|
<a
|
|
46
46
|
data-testclass="links"
|
|
47
47
|
target="_blank"
|
|
@@ -57,4 +57,4 @@ import"./shared-54cbd346.js";import"./shared-6d0be1e4.js";import"./foxy-spinner.
|
|
|
57
57
|
</foxy-i18n>
|
|
58
58
|
<iron-icon icon="icons:open-in-new" class="icon-inline"></iron-icon>
|
|
59
59
|
</a>
|
|
60
|
-
`),t.data._links["fx:receipt"].href,t.ns,t.lang)},
|
|
60
|
+
`),t.data._links["fx:receipt"].href,t.ns,t.lang)},m.__ns="transactions-table",customElements.define("foxy-transactions-table",m);export{m as TransactionsTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-029816d7.js";import{a as r}from"./shared-5fa697c4.js";import{T as s}from"./shared-e83f2983.js";import{h as e}from"./shared-7f33a83a.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-1522d76f.js";import"./shared-30cbf0a6.js";import"./shared-343d1fd7.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./shared-e91453df.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-4e709717.js";let t,a,d=r=>r;const o=r(s,"user-card");class i extends o{renderBody(){return super.renderBody({title:r=>{const s=[r.first_name.trim(),r.last_name.trim()];return e(t||(t=d`${0}`),s.filter((r=>!!r)).join(" ")||this.t("no_name"))},subtitle:r=>e(a||(a=d`${0}`),r.email)})}}customElements.define("foxy-user-card",i);export{i as UserCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-c9ba1b64.js";import"./shared-c7b3d22b.js";import"./shared-d21fa1a6.js";import"./shared-ff8ca16b.js";import"./foxy-spinner.js";import"./shared-029816d7.js";export{U as UserForm}from"./shared-8d8bed82.js";import"./shared-f9a3d1ff.js";import"./shared-43f449bb.js";import"./shared-5fa697c4.js";import"./shared-1522d76f.js";import"./shared-7f33a83a.js";import"./shared-b509bc2c.js";import"./shared-61ade33e.js";import"./shared-268571df.js";import"./shared-07e9d1fb.js";import"./shared-343d1fd7.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./shared-30cbf0a6.js";import"./shared-4e709717.js";import"./shared-fc15a882.js";import"./shared-f9180815.js";import"./shared-6a7f96c4.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-ff9791cf.js";import"./shared-30d00b64.js";import"./shared-b738ee96.js";import"./shared-b1b8ea67.js";import"./shared-9c08cfab.js";import"./shared-a8dc23f1.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-c7b3d22b.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-8d8bed82.js";import"./foxy-spinner.js";import"./shared-029816d7.js";import{h as e}from"./shared-7f33a83a.js";import{T as a}from"./shared-00c2793e.js";import{a as t}from"./shared-5fa697c4.js";import"./shared-f9a3d1ff.js";import"./shared-43f449bb.js";import"./shared-61ade33e.js";import"./shared-d21fa1a6.js";import"./shared-1522d76f.js";import"./shared-268571df.js";import"./shared-07e9d1fb.js";import"./shared-343d1fd7.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./shared-30cbf0a6.js";import"./shared-4e709717.js";import"./shared-3ab0306f.js";import"./shared-11c2efc8.js";import"./shared-c9ba1b64.js";import"./shared-b509bc2c.js";import"./shared-ff8ca16b.js";import"./shared-fc15a882.js";import"./shared-f9180815.js";import"./shared-6a7f96c4.js";import"./shared-eb116b3e.js";import"./shared-b738ee96.js";import"./shared-b1b8ea67.js";import"./shared-ff9791cf.js";import"./shared-9c08cfab.js";import"./shared-a8dc23f1.js";import"./shared-30d00b64.js";import"./foxy-nucleon-element.js";let r,o,d,i,m,n,l,f=s=>s;class p extends(t(a,"users-table")){constructor(){super(...arguments),this.columns=[p.nameColumn,p.emailColumn,p.rolesColumn,p.lastUpdatedColumn,p.actionsColumn]}render(){return e(r||(r=f` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}p.nameColumn={cell:s=>e(o||(o=f` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),s.data.first_name,s.data.last_name)},p.emailColumn={hideBelow:"md",cell:s=>e(d||(d=f` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),s.data.email)},p.rolesColumn={cell:a=>e(i||(i=f` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((t=>e(m||(m=f` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),a.data[t]?"":"text-disabled",s.find((s=>s.property===t)).icon))))},p.lastUpdatedColumn={hideBelow:"lg",cell:s=>e(n||(n=f` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:s.data.date_modified}),s.lang,s.ns,JSON.stringify({value:s.data.date_modified}),s.lang,s.ns)},p.actionsColumn={cell:s=>e(l||(l=f` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(e=>{const a=e.target,t=a.getRootNode().querySelector("#form");t.href=s.data._links.self.href,t.show(a)}),s.lang,s.ns)},customElements.define("foxy-users-table",p);export{p as UsersTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-2cf08dd4.js";import{I as s}from"./shared-e91453df.js";import{h as r}from"./shared-7f33a83a.js";import{a as e}from"./shared-5fa697c4.js";import"./foxy-spinner.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-029816d7.js";import"./shared-1522d76f.js";import"./shared-343d1fd7.js";import"./shared-30cbf0a6.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-4e709717.js";let t,d=s=>s;class a extends(e(s,"webhook-card")){renderBody(){var s,e,a,o;return r(t||(t=d` <div class="grid grid-cols-1 leading-s -my-xs"> <p class="text-m truncate text-body font-medium">${0}​</p> <p class="text-s truncate text-secondary">${0}​</p> <p class="text-s truncate text-tertiary"> ${0} • ${0}​ </p> </div> `),null===(s=this.data)||void 0===s?void 0:s.name,null===(e=this.data)||void 0===e?void 0:e.url,null===(a=this.data)||void 0===a?void 0:a.format,null===(o=this.data)||void 0===o?void 0:o.event_resource)}}customElements.define("foxy-webhook-card",a);export{a as WebhookCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-dbadd9cf.js";import"./shared-2f09d4df.js";import"./shared-20ba4cdc.js";import{I as r}from"./shared-ff8ca16b.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as e}from"./shared-5fa697c4.js";import{B as o}from"./shared-1522d76f.js";import{h as t}from"./shared-7f33a83a.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-029816d7.js";import"./shared-343d1fd7.js";import"./shared-30cbf0a6.js";import"./shared-b23c903e.js";import"./shared-d3bf9ac0.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-d519a301.js";import"./shared-11c2efc8.js";import"./foxy-form-dialog.js";import"./shared-d21fa1a6.js";import"./shared-c7b3d22b.js";import"./shared-f9a3d1ff.js";import"./shared-61ade33e.js";import"./shared-268571df.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-fc15a882.js";import"./shared-f9180815.js";import"./shared-c9ba1b64.js";import"./shared-b509bc2c.js";import"./shared-bed7aae1.js";import"./shared-2cf08dd4.js";import"./shared-e91453df.js";let s,a,n=r=>r;class i extends(e(r,"webhook-form")){constructor(){super(...arguments),this.__formats=[{value:"json",label:"JSON"},{value:"webflow",label:"Webflow"},{value:"zapier",label:"Zapier"}],this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get v8n(){return[({name:r})=>!!r||"name:v8n_required",({name:r})=>!!r&&r.length<=255||"name:v8n_too_long",({version:r})=>!!r||"version:v8n_required",({format:r})=>!!r||"format:v8n_required",({url:r})=>!r||r.length<=1e3||"url:v8n_too_long",({query:r})=>!r||r.length<=1e3||"query:v8n_too_long",({encryption_key:r})=>!r||r.length<=1e3||"encryption-key:v8n_too_long"]}get readonlySelector(){const r=[];return this.data&&r.push("event-resource"),new o(`${super.readonlySelector} ${r.join(" ")}`.trim())}renderBody(){return t(s||(s=n` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="event-resource" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="query"></foxy-internal-text-control> <foxy-internal-text-control infer="url"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="format" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="encryption-key"></foxy-internal-text-control> <foxy-internal-text-control infer="version"></foxy-internal-text-control> ${0} ${0} `),this.__eventResources,this.__formats,this.data?t(a||(a=n` <foxy-internal-async-details-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-async-details-control> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",i);export{i as WebhookForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-029816d7.js";import"./shared-2cf08dd4.js";import{a as e}from"./shared-5fa697c4.js";import{I as s}from"./shared-e91453df.js";import{h as r}from"./shared-7f33a83a.js";import"./shared-1522d76f.js";import"./shared-343d1fd7.js";import"./shared-30cbf0a6.js";import"./foxy-spinner.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";import"./shared-4e709717.js";let a,o=e=>e;class d extends(e(s,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:d,response_body:t}=null!==(e=this.data)&&void 0!==e?e:{};return r(a||(a=o` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-medium"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}​ </span> </p> <p class="text-tertiary">${0}​</p> </div> `),{value:s},d,t)}}customElements.define("foxy-webhook-log-card",d);export{d as WebhookLogCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-029816d7.js";import"./shared-2cf08dd4.js";import{a as s}from"./shared-5fa697c4.js";import{I as e}from"./shared-e91453df.js";import{h as r}from"./shared-7f33a83a.js";import{c as t}from"./shared-4e709717.js";import"./shared-1522d76f.js";import"./shared-343d1fd7.js";import"./shared-30cbf0a6.js";import"./foxy-spinner.js";import"./shared-ff9791cf.js";import"./shared-43f449bb.js";import"./shared-30d00b64.js";import"./shared-6a7f96c4.js";import"./shared-07e9d1fb.js";import"./shared-3ab0306f.js";import"./shared-eb116b3e.js";let a,o=s=>s;const d=s(e,"webhook-status-card");class i extends d{renderBody(){var s,e;const d=null===(s=this.data)||void 0===s?void 0:s.status;return r(a||(a=o` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-medium" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},t({"text-error":"failed"===d,"text-tertiary":"pending"===d,"text-success":"successful"===d}),d)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-1522d76f.js";import{h as t}from"./shared-7f33a83a.js";import{C as l}from"./shared-b23c903e.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-1522d76f.js";import{h as t}from"./shared-7f33a83a.js";import{C as l}from"./shared-b23c903e.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-5fa697c4.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-6a7f96c4.js";let n,o,h,c,m,u=e=>e;const p=l(s(a(i(d))));class b extends p{constructor(){super(...arguments),this.templates={},this.columns=[]}static get properties(){return e(e({},super.properties),{},{columns:{attribute:!1}})}render(){var e,l;const s=this.columns.some((e=>!!e.header));return t(n||(n=u` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="relative font-lumo text-m"> <table class="table-fixed w-full" data-testid="table"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary text-m text-left font-medium":!0,"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===e.hideBelow,"hidden md-table-cell":"md"===e.hideBelow,"hidden lg-table-cell":"lg"===e.hideBelow,"hidden xl-table-cell":"xl"===e.hideBelow}),null===(s=e.header)||void 0===s?void 0:s.call(e,{html:t,lang:this.lang,data:this.data,ns:this.ns}))})),this.__rows.map((e=>{var l;return t(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(c||(c=u` <td class="${0}"> ${0} </td> `),r({"text-right":s===this.columns.length-1,"hidden sm-table-cell":"sm"===l.hideBelow,"hidden md-table-cell":"md"===l.hideBelow,"hidden lg-table-cell":"lg"===l.hideBelow,"hidden xl-table-cell":"xl"===l.hideBelow,"truncate h-l text-body":!0}),e?null===(a=l.cell)||void 0===a?void 0:a.call(l,{html:t,lang:this.lang,data:e,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":t(m||(m=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" class="p-m bg-base shadow-xs rounded-t-l rounded-b-l" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),this.in("busy")?"busy":this.in("idle")?"empty":"error",this.lang,this.ns,null!==(l=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==l?l:""),this.renderTemplateOrSlot())}get __rows(){var e,t,l;const s=Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{}).reduce(((e,t)=>[...e,...t]),[]);let a;if(0===s.length)try{const e=new URL(null!==(l=this.href)&&void 0!==l?l:"").searchParams.get("limit"),t=parseInt(null!=e?e:"");a=isNaN(t)?20:t}catch(e){a=20}else a=s.length;return new Array(a).fill(null).map(((e,t)=>{var l;return null!==(l=s[t])&&void 0!==l?l:e}))}}export{b as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,_ as t}from"./shared-1522d76f.js";import{h as n,L as r}from"./shared-7f33a83a.js";import{i as s,a}from"./shared-
|
|
1
|
+
import{A as e,_ as t}from"./shared-1522d76f.js";import{h as n,L as r}from"./shared-7f33a83a.js";import{i as s,a}from"./shared-5fa697c4.js";import{F as i}from"./shared-343d1fd7.js";import{I as o}from"./shared-30cbf0a6.js";const l={type:"backend",init:()=>{},read:(t,n,r)=>{const s=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},a=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},o=new i("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new e.WHATWGRequest(`foxy://i18n/${n}/${t}`),resolve:s,reject:a});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(s).catch(a)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const a=t.endsWith("_percentage")?.01:1,i=n.split("|"),o=`${["allunits","incremental","repeat","single"].includes(i[0])?i.shift():"single"}_${t}_discount_summary`;return i.map((t=>{var n,r;const s=null!==(r=null===(n=/[-+]/.exec(t))||void 0===n?void 0:n.index)&&void 0!==r?r:-1,i=parseFloat(t.substring(s))*a,l=parseFloat(t.substring(0,s));return`$t(${o}, ${JSON.stringify({maximumFractionDigits:10,adjustment:i,from:l,ns:e})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:a}=c(e,!0);return.5===s&&"month"===a&&(s=2,a="week"),r.format(s,a)},percent:(e,n,r,s)=>{let a=null;try{"number"==typeof e&&(a=e.toLocaleString(r,t(t({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return a||String(e)},ordinal:(e,t,n)=>`${e}$t(ordinal_${new Intl.PluralRules(n,{type:"ordinal"}).select(e)})`,price:(e,t,n,r)=>{var s;try{const[t,a]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:a})}catch(t){return e}},date:(e,t,n,r)=>{var s,a,i;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=(null!==(a=null==r?void 0:r.year)&&void 0!==a?a:(new Date).getFullYear()===o.getFullYear())?void 0:"numeric",u=null!==(i=null==r?void 0:r.day)&&void 0!==i?i:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(a(o(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof i&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=i,m.i18next=s.createInstance().use(l),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,a;return null!==(a=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==a?a:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,c as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e}from"./shared-1522d76f.js";import{T as t}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-1522d76f.js";import{T as t}from"./shared-00c2793e.js";import{a as s}from"./shared-5fa697c4.js";import{p as n}from"./shared-4c650e5c.js";let a,o,i,r,l=e=>e;class c extends(s(t,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:t=>{const s=t.data._embedded["fx:transaction_template"],o=`${s.total_order} ${s.currency_code}`;return t.html(a||(a=l`
|
|
2
2
|
<foxy-i18n
|
|
3
3
|
data-testclass="i18n frequencies"
|
|
4
4
|
class="font-medium text-m font-tnum"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as t}from"./shared-
|
|
1
|
+
import{h as t}from"./shared-43f449bb.js";import{T as e}from"./shared-c9ba1b64.js";import{D as l}from"./shared-5fa697c4.js";const r=t`<dom-module id="lumo-email-field" theme-for="vaadin-email-field">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:not(*):placeholder-shown, /* to prevent broken styles on IE */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-c9ba1b64.js";import{I as e}from"./shared-bed7aae1.js";import{_ as s}from"./shared-1522d76f.js";import{i as t}from"./shared-d3bf9ac0.js";import{h as r}from"./shared-7f33a83a.js";let i,l,a,o=e=>e;customElements.define("foxy-internal-text-control",class extends e{constructor(){super(...arguments),this.prefix=null,this.suffix=null}static get properties(){return s(s({},super.properties),{},{prefix:{},suffix:{}})}renderControl(){return r(i||(i=o` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),t(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var s;return"Enter"===e.key&&(null===(s=this.nucleon)||void 0===s?void 0:s.submit())}),(e=>{const s=e.currentTarget;this._value=s.value}),this.prefix?r(l||(l=o`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?r(a||(a=o`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-1522d76f.js";import{c as t,L as s,h as i}from"./shared-7f33a83a.js";import{A as a}from"./shared-07e9d1fb.js";import{C as o}from"./shared-b23c903e.js";import{T as n,R as l,a as d}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-1522d76f.js";import{c as t,L as s,h as i}from"./shared-7f33a83a.js";import{A as a}from"./shared-07e9d1fb.js";import{C as o}from"./shared-b23c903e.js";import{T as n,R as l,a as d}from"./shared-5fa697c4.js";import{I as r}from"./shared-30cbf0a6.js";import{F as h}from"./shared-343d1fd7.js";import{c}from"./shared-4e709717.js";class u extends CustomEvent{constructor(e=!1){super("hide",{detail:{cancelled:e}})}}class p extends CustomEvent{constructor(){super("show")}}let m,v=e=>e;class b extends(o(n(l(d(r(s)))))){constructor(){super(...arguments),this.group=""}static get properties(){return e(e({},super.properties),{},{group:{}})}static get styles(){return[super.styles,t(m||(m=v`:host{position:relative;z-index:200}`))]}}let _,g,y,f,w,x,$,C=e=>e;const D=d(o(n(r(s))));class k extends D{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.header="",this.group="",this.alert=!1,this.wide=!1,this.__handleKeyDown=e=>{"Escape"===e.key&&k.openDialogs[0]===this&&this.closable&&this.hide(this.editable)},this.__connected=!1,this.__visible=!1}static get properties(){return e(e({},super.properties),{},{__connected:{attribute:!1},__visible:{attribute:!1},centered:{type:Boolean},closable:{type:Boolean},editable:{type:Boolean},header:{type:String},group:{},alert:{type:Boolean},wide:{type:Boolean},open:{type:Boolean,noAccessor:!0}})}static get styles(){return[super.styles,t(_||(_=C`.grid-cols-header{grid-template-columns:1fr auto 1fr}.scale-85{--tw-scale-x:0.85;--tw-scale-y:0.85}.max-h-alert{max-height:calc(100vh - var(--lumo-size-l) - var(--lumo-space-m) * 2)}`))]}get open(){return this.__visible&&this.__connected}set open(e){e===this.open||(e?this.show():this.hide(this.editable))}connectedCallback(){super.connectedCallback(),addEventListener("keydown",this.__handleKeyDown)}disconnectedCallback(){var e;super.disconnectedCallback(),removeEventListener("keydown",this.__handleKeyDown),null===(e=k.dialogWindows.get(this))||void 0===e||e.remove(),k.dialogWindows.delete(this)}createRenderRoot(){const e=new b,t=document.querySelectorAll(k.dialogWindowsHost),s=Array.from(t).pop();return e.addEventListener("fetch",(e=>{e instanceof h&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new a(this).fetch(e.request)))})),null==s||s.appendChild(e),k.dialogWindows.set(this,e),e.shadowRoot}render(e){if(!this.__connected)return i(g||(g=C``));const t=k.openDialogs[0]===this,s=k.openDialogs[1]===this,a=k.openDialogs[2]===this,o=!t&&!s&&!a;return i(y||(y=C` <div class="${0}"> <div id="backdrop" class="${0}" tabindex="-1" @click="${0}"></div> <div tabindex="0" role="dialog" aria-labelledby="dialog-title" class="${0}"> <div class="${0}"> <div class="h-l grid grid-cols-header text-m font-lumo font-medium border-b border-contrast-10"> ${0} <h1 id="dialog-title" class="truncate self-center text-center"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </h1> ${0} </div> <div class="${0}"> <div class="p-m relative">${0}</div> </div> </div> </div> </div> `),c({"z-50 fixed inset-0":!0,"pointer-events-none":!this.__visible}),c({"select-none ease-in-out transition duration-500 absolute inset-0 bg-shade-50 focus-outline-none":!0,"opacity-100":this.__visible,"opacity-0":!this.__visible}),(()=>this.closable&&this.hide(this.editable)),c({"transform ease-in-out transition duration-500 relative h-full ml-auto":!0,"origin-bottom sm-origin-center":!0,"focus-outline-none":!0,"sm-max-w-modal":!this.wide,"sm-max-w-modal-wide":this.wide,"flex justify-center items-end sm-items-center mr-auto":this.alert,"translate-y-full sm-translate-y-0":!this.__visible,"sm-translate-x-full":!this.alert&&!this.__visible,"sm-opacity-0 sm-scale-110":this.alert&&!this.__visible,"translate-y-0 translate-x-0":t&&this.__visible,"scale-95 -translate-y-s sm-translate-y-0":s&&this.__visible,"scale-90 -translate-y-m sm-translate-y-0":a&&this.__visible,"opacity-0 scale-85 -translate-y-l sm-translate-y-0":o&&this.__visible}),c({"overflow-hidden flex flex-col bg-base rounded-t-l sm-rounded-b-l":!0,"absolute inset-0 mt-xl sm-m-xl":!this.alert,"shadow-xxl":this.__visible,"flex-1":this.alert}),this.closable&&!this.hiddenSelector.matches("close-button",!0)?i(f||(f=C` <vaadin-button id="close-button" theme="tertiary-inline" class="mr-auto m-s px-s" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("close-button",!0),(()=>this.hide(this.editable)),this.lang,this.editable?"cancel":"close",this.ns):i(w||(w=C`<div></div>`)),this.ns,this.lang,this.header,this.editable&&!this.hiddenSelector.matches("save-button",!0)?i(x||(x=C` <vaadin-button data-testid="save-button" ?disabled="${0}" theme="primary" class="ml-auto h-auto min-h-0 min-w-0 m-xs px-m" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="save"></foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("save-button",!0),this.save,this.ns,this.lang):i($||($=C`<div></div>`)),c({"flex-1 overflow-y-auto overflow-x-hidden overscroll-contain":!0,"max-h-alert":this.alert}),null==e?void 0:e())}updated(e){super.updated(e);const t=k.dialogWindows.get(this);t&&(t.disabledControls=this.disabledControls,t.disabled=this.disabled,t.readonlyControls=this.readonlyControls,t.readonly=this.readonly,t.hiddenControls=this.hiddenControls,t.hidden=this.hidden,t.group=this.group,t.lang=this.lang,t.ns=this.ns)}async hide(e=!1){var t;null===(t=this.__returnFocusTo)||void 0===t||t.focus(),await this.__setOpenDialogs(k.openDialogs.filter((e=>e!==this))),await this.__setConnected(!1),this.dispatchEvent(new k.HideEvent(!!e))}async show(e){var t;this.__returnFocusTo=e,await this.__setConnected(!0),await this.__setOpenDialogs([this,...k.openDialogs]),null===(t=this.renderRoot.querySelector('[role="dialog"]'))||void 0===t||t.focus(),this.dispatchEvent(new k.ShowEvent)}async save(){await this.hide(!1)}async __setOpenDialogs(e){k.openDialogs.length=0,k.openDialogs.push(...e),await Promise.all([Promise.all(k.openDialogs.map((e=>e.requestUpdate()))),new Promise((e=>{const t=this.renderRoot.querySelector("#backdrop");t?(t.addEventListener("transitionend",(()=>e()),{once:!0}),setTimeout((()=>e()),2e3)):e(),this.__visible=k.openDialogs.includes(this)}))])}async __setConnected(e){this.__connected=e,await this.updateComplete.then((()=>this.getBoundingClientRect()))}}k.dialogWindowsHost="#foxy-dialog-windows-host, body",k.dialogWindows=new WeakMap,k.openDialogs=[],k.ShowEvent=p,k.HideEvent=u,customElements.define("foxy-dialog-window",b);export{k as D};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as t}from"./shared-
|
|
1
|
+
import{F as t}from"./shared-ff9791cf.js";import{a as e}from"./shared-f9a3d1ff.js";import{D as s,t as i}from"./shared-43f449bb.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 Vaadin Ltd.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-1522d76f.js";import{w as s}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-1522d76f.js";import{w as s}from"./shared-5fa697c4.js";import{h as t}from"./shared-7f33a83a.js";let r,a,i,o=e=>e;class p extends s{constructor(){super(...arguments),this.disabled=!1,this.items=[]}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean,reflect:!0},items:{attribute:!1}})}render(){return t(r||(r=o` <p class="font-lumo text-xs leading-s text-secondary"> ${0} </p> `),this.items.map((({name:e,value:s},r)=>t(a||(a=o`${0}${0} ${0}`),0===r?"":t(i||(i=o`•`)),e,s))))}}export{p as M};
|