@foxy.io/elements 1.31.1-beta.1 → 1.32.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-admin-subscription-form.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-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-api.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-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- 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-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 +1 -1
- 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 +1 -1
- 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-nucleon-element.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-embed.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-payments-api.js +1 -1
- package/dist/cdn/foxy-query-builder.js +2 -2
- package/dist/cdn/foxy-report-form.js +2 -2
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-container-card.js +1 -1
- package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-shipping-service-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 +1 -1
- 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 +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +7 -7
- package/dist/cdn/foxy-update-payment-method-form.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-user-invitation-card.js +1 -0
- package/dist/cdn/foxy-user-invitation-form.js +1 -0
- 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-12a7a15d.js → shared-019348d7.js} +1 -1
- package/dist/cdn/{shared-01b2cad8.js → shared-0e156ee7.js} +1 -1
- package/dist/cdn/{shared-9b2d6d62.js → shared-11694c05.js} +1 -1
- package/dist/cdn/{shared-21bc5d5e.js → shared-15100be0.js} +1 -1
- package/dist/cdn/{shared-f7a1193f.js → shared-17a61265.js} +1 -1
- package/dist/cdn/{shared-55e95bd2.js → shared-185dffc3.js} +1 -1
- package/dist/cdn/{shared-7c411b0a.js → shared-193bb806.js} +1 -1
- package/dist/cdn/{shared-f3773d62.js → shared-19df2a73.js} +1 -1
- package/dist/cdn/{shared-0700fd80.js → shared-1a30f25e.js} +1 -1
- package/dist/cdn/shared-1aff7995.js +1 -0
- package/dist/cdn/{shared-6e859df6.js → shared-239062b0.js} +1 -1
- package/dist/cdn/{shared-6918312e.js → shared-28ebee50.js} +1 -1
- package/dist/cdn/{shared-24d71d01.js → shared-2ad18636.js} +1 -1
- package/dist/cdn/{shared-3c3497d6.js → shared-2bc0d0cd.js} +1 -1
- package/dist/cdn/{shared-ac0368ec.js → shared-2e090291.js} +1 -1
- package/dist/cdn/{shared-8cd578ee.js → shared-374e6faa.js} +1 -1
- package/dist/cdn/{shared-280f868d.js → shared-40af05b3.js} +1 -1
- package/dist/cdn/{shared-c8a6496c.js → shared-482ba043.js} +5 -5
- package/dist/cdn/{shared-56bf05ef.js → shared-4903b2e3.js} +1 -1
- package/dist/cdn/shared-492da078.js +1 -0
- package/dist/cdn/{shared-90a47948.js → shared-5513e830.js} +1 -1
- package/dist/cdn/{shared-8f3398dc.js → shared-562d466d.js} +1 -1
- package/dist/cdn/shared-56ba2d28.js +1 -0
- package/dist/cdn/{shared-08e0a194.js → shared-5c35d93a.js} +1 -1
- package/dist/cdn/{shared-56a559fd.js → shared-5c846a3b.js} +1 -1
- package/dist/cdn/shared-5e09e162.js +1 -0
- package/dist/cdn/{shared-453d8f75.js → shared-60209b2d.js} +1 -1
- package/dist/cdn/{shared-6ac0d05e.js → shared-641786b2.js} +1 -1
- package/dist/cdn/{shared-09b4185a.js → shared-65479601.js} +1 -1
- package/dist/cdn/{shared-0f67d020.js → shared-6b8c2a83.js} +1 -1
- package/dist/cdn/{shared-a49a2300.js → shared-6e1b5baf.js} +1 -1
- package/dist/cdn/{shared-61b6ef6e.js → shared-6f0504e2.js} +1 -1
- package/dist/cdn/{shared-e778071b.js → shared-7275324b.js} +1 -1
- package/dist/cdn/{shared-937b497c.js → shared-745f340a.js} +1 -1
- package/dist/cdn/{shared-1f0b8b7e.js → shared-74eedbe6.js} +1 -1
- package/dist/cdn/{shared-d1c10d58.js → shared-7c15c149.js} +1 -1
- package/dist/cdn/{shared-a207423c.js → shared-7ceceb4c.js} +1 -1
- package/dist/cdn/{shared-ce75e928.js → shared-86a9b27a.js} +1 -1
- package/dist/cdn/{shared-91f5e0b3.js → shared-87b5a6aa.js} +1 -1
- package/dist/cdn/{shared-5be5874d.js → shared-8a3fd383.js} +1 -1
- package/dist/cdn/{shared-c388e926.js → shared-8a73d1aa.js} +1 -1
- package/dist/cdn/{shared-b8198665.js → shared-8b5e05df.js} +1 -1
- package/dist/cdn/{shared-e24da82e.js → shared-8da3186f.js} +2 -2
- package/dist/cdn/{shared-4b346553.js → shared-8fc527b7.js} +1 -1
- package/dist/cdn/{shared-ef78d7d9.js → shared-9092b5db.js} +1 -1
- package/dist/cdn/{shared-0a6a28ce.js → shared-913e1955.js} +1 -1
- package/dist/cdn/{shared-c2776a33.js → shared-91d8985f.js} +1 -1
- package/dist/cdn/{shared-5a2f398c.js → shared-92192fe1.js} +1 -1
- package/dist/cdn/{shared-d8c3067b.js → shared-97cfdcdb.js} +1 -1
- package/dist/cdn/{shared-19884cf4.js → shared-9a59aab2.js} +1 -1
- package/dist/cdn/{shared-522a172d.js → shared-9cf15285.js} +1 -1
- package/dist/cdn/{shared-28f74114.js → shared-9d309e97.js} +1 -1
- package/dist/cdn/{shared-2a5c89a4.js → shared-9e360643.js} +1 -1
- package/dist/cdn/{shared-388e9240.js → shared-aaf72aad.js} +1 -1
- package/dist/cdn/{shared-37efab30.js → shared-acd33590.js} +1 -1
- package/dist/cdn/{shared-44ce656d.js → shared-adcfd50a.js} +1 -1
- package/dist/cdn/{shared-f11b2116.js → shared-addddf0e.js} +1 -1
- package/dist/cdn/{shared-fb34e84c.js → shared-b726120d.js} +2 -2
- package/dist/cdn/{shared-0e055562.js → shared-bc023a29.js} +1 -1
- package/dist/cdn/{shared-6d645dc5.js → shared-c2efc54e.js} +1 -1
- package/dist/cdn/{shared-029d623b.js → shared-c4f15ea3.js} +1 -1
- package/dist/cdn/{shared-ce172224.js → shared-c508d5dc.js} +1 -1
- package/dist/cdn/{shared-c286c5ad.js → shared-c518ece2.js} +1 -1
- package/dist/cdn/{shared-16c17e32.js → shared-c538157f.js} +1 -1
- package/dist/cdn/{shared-f407c2cb.js → shared-c5647b62.js} +1 -1
- package/dist/cdn/{shared-60d586ba.js → shared-c9346893.js} +1 -1
- package/dist/cdn/{shared-d132bd37.js → shared-c98881c7.js} +1 -1
- package/dist/cdn/{shared-da9e048f.js → shared-ca0847b0.js} +1 -1
- package/dist/cdn/shared-d1195c27.js +15 -0
- package/dist/cdn/{shared-0b01f721.js → shared-d1cb97c6.js} +1 -1
- package/dist/cdn/{shared-fb0ca5e2.js → shared-d3044c4c.js} +1 -1
- package/dist/cdn/{shared-245f8836.js → shared-d4a1658e.js} +1 -1
- package/dist/cdn/shared-d8bffb38.js +14 -0
- package/dist/cdn/{shared-fc1dfa64.js → shared-df51ee50.js} +1 -1
- package/dist/cdn/{shared-edbf7378.js → shared-dfe41029.js} +1 -1
- package/dist/cdn/{shared-536a2d53.js → shared-e709057b.js} +1 -1
- package/dist/cdn/{shared-199e3870.js → shared-f5547471.js} +1 -1
- package/dist/cdn/{shared-0cc5420d.js → shared-f67f6fc5.js} +1 -1
- package/dist/cdn/{shared-7d38cb8a.js → shared-f8368b97.js} +1 -1
- package/dist/cdn/{shared-f2968508.js → shared-f893763a.js} +2 -2
- package/dist/cdn/{shared-b08ca8d0.js → shared-f998f9c8.js} +1 -1
- package/dist/cdn/{shared-ee36b83f.js → shared-fcdb896f.js} +1 -1
- package/dist/cdn/translations/user-invitation-card/en.json +17 -0
- package/dist/cdn/translations/user-invitation-form/en.json +94 -0
- package/dist/elements/public/UserCard/UserCard.d.ts +7 -0
- package/dist/elements/public/UserCard/UserCard.js +81 -2
- package/dist/elements/public/UserCard/UserCard.js.map +1 -1
- package/dist/elements/public/UserCard/index.d.ts +1 -0
- package/dist/elements/public/UserCard/index.js +1 -0
- package/dist/elements/public/UserCard/index.js.map +1 -1
- package/dist/elements/public/UserInvitationCard/UserInvitationCard.d.ts +16 -0
- package/dist/elements/public/UserInvitationCard/UserInvitationCard.js +110 -0
- package/dist/elements/public/UserInvitationCard/UserInvitationCard.js.map +1 -0
- package/dist/elements/public/UserInvitationCard/index.d.ts +4 -0
- package/dist/elements/public/UserInvitationCard/index.js +6 -0
- package/dist/elements/public/UserInvitationCard/index.js.map +1 -0
- package/dist/elements/public/UserInvitationCard/types.d.ts +1 -0
- package/dist/elements/public/UserInvitationCard/types.js +2 -0
- package/dist/elements/public/UserInvitationCard/types.js.map +1 -0
- package/dist/elements/public/UserInvitationForm/UserInvitationForm.d.ts +29 -0
- package/dist/elements/public/UserInvitationForm/UserInvitationForm.js +313 -0
- package/dist/elements/public/UserInvitationForm/UserInvitationForm.js.map +1 -0
- package/dist/elements/public/UserInvitationForm/index.d.ts +7 -0
- package/dist/elements/public/UserInvitationForm/index.js +9 -0
- package/dist/elements/public/UserInvitationForm/index.js.map +1 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.d.ts +10 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js +51 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js.map +1 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.d.ts +5 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.js +7 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.js.map +1 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.d.ts +9 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.js +32 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.js.map +1 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.d.ts +5 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.js +7 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.js.map +1 -0
- package/dist/elements/public/UserInvitationForm/types.d.ts +33 -0
- package/dist/elements/public/UserInvitationForm/types.js +2 -0
- package/dist/elements/public/UserInvitationForm/types.js.map +1 -0
- package/dist/elements/public/index.d.ts +2 -0
- package/dist/elements/public/index.defined.d.ts +2 -0
- package/dist/elements/public/index.defined.js +2 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +2 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +4 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/dist/utils/get-gravatar-url.d.ts +1 -0
- package/dist/utils/get-gravatar-url.js +8 -0
- package/dist/utils/get-gravatar-url.js.map +1 -0
- package/package.json +1 -1
- package/dist/cdn/shared-0f6e4584.js +0 -15
- package/dist/cdn/shared-3ee151ce.js +0 -1
- package/dist/cdn/shared-6474675f.js +0 -1
- package/dist/cdn/shared-9db46672.js +0 -1
- package/dist/cdn/shared-f34aeb6c.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-4903b2e3.js";import"./shared-5513e830.js";import"./foxy-spinner.js";import"./shared-acd33590.js";import{T as t}from"./shared-f5547471.js";import{a as s}from"./shared-b726120d.js";import"./shared-adcfd50a.js";import"./shared-d1195c27.js";import"./shared-dc73b9a5.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./foxy-nucleon-element.js";import"./shared-2ad18636.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let e,a,n,o,r,i,d=t=>t;class l extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[l.priceColumn,l.summaryColumn,l.statusColumn,l.idColumn,l.dateColumn,l.receiptColumn]}}l.priceColumn={cell:t=>t.html(e||(e=d`
|
|
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-56bf05ef.js";import"./shared-90a47948.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}`})},l.summaryColumn={cell:t=>{var s;const e=null===(s=t.data._embedded)||void 0===s?void 0:s["fx:items"];if(!e)return"";const n={most_expensive_item:[...e].sort(((t,s)=>t.price-s.price))[0],count_minus_one:e.length-1,count:e.length};return t.html(a||(a=d`
|
|
12
12
|
<foxy-i18n
|
|
13
13
|
data-testclass="i18n summaries"
|
|
14
14
|
class="text-m"
|
|
@@ -18,7 +18,7 @@ import"./shared-56bf05ef.js";import"./shared-90a47948.js";import"./foxy-spinner.
|
|
|
18
18
|
.options=${0}
|
|
19
19
|
>
|
|
20
20
|
</foxy-i18n>
|
|
21
|
-
`),t.lang,t.ns,n)}},
|
|
21
|
+
`),t.lang,t.ns,n)}},l.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",a=e in s?s[e]:"bg-contrast-5 text-contrast";return t.html(n||(n=d`
|
|
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-56bf05ef.js";import"./shared-90a47948.js";import"./foxy-spinner.
|
|
|
27
27
|
ns=${0}
|
|
28
28
|
>
|
|
29
29
|
</foxy-i18n>
|
|
30
|
-
`),a,t.lang,`transaction_${e}`,t.ns)}},
|
|
30
|
+
`),a,t.lang,`transaction_${e}`,t.ns)}},l.idColumn={hideBelow:"sm",cell:t=>t.html(o||(o=d`
|
|
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)},l.dateColumn={hideBelow:"sm",cell:t=>t.html(r||(r=d`
|
|
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-56bf05ef.js";import"./shared-90a47948.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})},l.receiptColumn={cell:t=>t.html(i||(i=d`
|
|
45
45
|
<a
|
|
46
46
|
data-testclass="links"
|
|
47
47
|
target="_blank"
|
|
@@ -57,4 +57,4 @@ import"./shared-56bf05ef.js";import"./shared-90a47948.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)},l.__ns="transactions-table",customElements.define("foxy-transactions-table",l);export{l as TransactionsTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-7275324b.js";import{I as e}from"./shared-bc023a29.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import{a as t}from"./shared-f8368b97.js";import"./foxy-payment-card-embed.js";import"./shared-acd33590.js";import"./shared-239062b0.js";import{_ as r,B as s}from"./shared-d1195c27.js";import{i as o}from"./shared-9803aa7c.js";import{h as a}from"./shared-dc73b9a5.js";import{g as i}from"./shared-bab2ea2c.js";import{a as d}from"./shared-b726120d.js";import"./shared-aaf72aad.js";import"./shared-f998f9c8.js";import"./shared-adcfd50a.js";import"./shared-5513e830.js";import"./shared-65479601.js";import"./shared-6f0504e2.js";import"./shared-61ade33e.js";import"./shared-40af05b3.js";import"./shared-91d8985f.js";import"./shared-8da3186f.js";import"./foxy-collection-page.js";import"./shared-d1cb97c6.js";import"./shared-343d1fd7.js";import"./shared-2ad18636.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./shared-4903b2e3.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-28ebee50.js";import"./shared-df51ee50.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./foxy-copy-to-clipboard.js";import"./shared-11694c05.js";import"./shared-c4f15ea3.js";import"./shared-51c4a6dd.js";import"./shared-d3044c4c.js";import"./shared-19df2a73.js";import"./shared-562d466d.js";import"./shared-8fc527b7.js";import"./shared-9a59aab2.js";import"./shared-7ceceb4c.js";import"./shared-60209b2d.js";import"./shared-0e156ee7.js";import"./shared-c2efc54e.js";let n,m=e=>e;customElements.define("foxy-internal-update-payment-method-form-cc-token-control",class extends t{constructor(){super(...arguments),this.embedUrl=null}static get properties(){return r(r({},super.properties),{},{embedUrl:{attribute:"embed-url"}})}renderControl(){return a(n||(n=m` <foxy-payment-card-embed infer="payment-card-embed" url="${0}" @submit="${0}"> </foxy-payment-card-embed> <vaadin-button theme="primary" class="w-full mt-l" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="tokenize"></foxy-i18n> </vaadin-button> `),o(this.embedUrl),this.__tokenize,this.disabled,(()=>this.__tokenize()))}async __tokenize(){var e,t,r;const s=this.renderRoot.querySelector("[infer=payment-card-embed]");try{null===(e=this.nucleon)||void 0===e||e.edit({cc_token:await s.tokenize()}),null===(t=this.nucleon)||void 0===t||t.submit()}catch(e){null===(r=this.nucleon)||void 0===r||r.undo()}}});let p,l,c=e=>e;const h=d(e,"update-payment-method-form");class f extends h{constructor(){super(...arguments),this.embedUrl=null,this.__templateSetGetValue=()=>this.__templateSetOverride,this.__templateSetSetValue=e=>this.__templateSetOverride=e,this.__templateSetOverride=null}static get properties(){return r(r({},super.properties),{},{__templateSetOverride:{attribute:!1},embedUrl:{attribute:"embed-url"}})}get hiddenSelector(){var e;const t=null===(e=this.__formEmbedUrl)||void 0===e?void 0:e.searchParams,r=["header:copy-id","header:copy-json",super.hiddenSelector.toString()],o=null==t?void 0:t.has("demo");return(this.__isPreConfigured||o)&&r.unshift("template-set"),(null==t?void 0:t.has("template_set_id"))||o||r.unshift("cc-token"),new s(r.join(" ").trim())}renderBody(){var e;if(!this.href)return a(p||(p=c` <div class="flex items-center justify-center p-xl"> <foxy-spinner layout="vertical" infer="spinner" state="empty"></foxy-spinner> </div> `));const t=this.__formEmbedUrl,r=this.renderRoot.querySelector("#store-loader");return a(l||(l=c` ${0} <foxy-internal-resource-picker-control first="${0}" infer="template-set" item="foxy-template-set-card" .getValue="${0}" .setValue="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-update-payment-method-form-cc-token-control embed-url="${0}" infer="cc-token"> </foxy-internal-update-payment-method-form-cc-token-control> <foxy-nucleon infer="" class="hidden" href="${0}" id="store-loader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),o(null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._links["fx:template_sets"].href),this.__templateSetGetValue,this.__templateSetSetValue,o(null==t?void 0:t.toString()),o(this.__storeLoaderHref),(()=>this.requestUpdate()))}updated(e){super.updated(e),(e.has("embedUrl")||e.has("href"))&&(this.__templateSetOverride=null)}async _fetch(...e){try{const t=await super._fetch(...e);return"PATCH"===new f.API.WHATWGRequest(...e).method&&(this.status={key:"cc_token_success"}),t}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw t.includes("cc_token you provided is invalid")?["error:cc_token_invalid"]:e}}get __storeLoaderHref(){const e=this.data;return e&&"fx:store"in e._links?e._links["fx:store"].href:void 0}get __isPreConfigured(){var e;try{return new URL(null!==(e=this.embedUrl)&&void 0!==e?e:"").searchParams.has("template_set_id")}catch(e){return!1}}get __formEmbedUrl(){var e;try{const t=new URL(null!==(e=this.embedUrl)&&void 0!==e?e:"");if(this.__templateSetOverride){const e=i(this.__templateSetOverride);null!==e&&t.searchParams.set("template_set_id",String(e))}return t}catch(e){}}}customElements.define("foxy-update-payment-method-form",f);export{f as UpdatePaymentMethodForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-51c4a6dd.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-acd33590.js";import{_ as s,aP as t,aQ as r}from"./shared-d1195c27.js";import{a as e}from"./shared-b726120d.js";import{a as i,g as a}from"./shared-d8bffb38.js";import{T as o}from"./shared-d3044c4c.js";import{i as d}from"./shared-9803aa7c.js";import{c as n}from"./shared-4e709717.js";import{h as m}from"./shared-dc73b9a5.js";import"./shared-2ad18636.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-5513e830.js";import"./shared-adcfd50a.js";import"./shared-4903b2e3.js";import"./shared-d1cb97c6.js";import"./shared-19df2a73.js";let l,c,h,f,p,u=s=>s;const v=e(o,"user-card");class j extends v{constructor(){super(...arguments),this.showInvitations=!1}static get properties(){return s(s({},super.properties),{},{showInvitations:{type:Boolean,attribute:"show-invitations"}})}renderBody(){var s,t,r,e;const a=null!==(r=null===(t=null===(s=this.__invitationsLoader)||void 0===s?void 0:s.data)||void 0===t?void 0:t.total_items)&&void 0!==r?r:0;return m(l||(l=u` <div class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <div class="relative flex-shrink-0"> ${0} <span data-testid="invitations-count" style="min-height:1.5em;min-width:1.5em;border-radius:1.5em;left:calc(100% - 1em);top:-.5em" class="${0}"> ${0} </span> </div> <div class="min-w-0 flex-1"> ${0} </div> </div> <foxy-nucleon infer="" href="${0}" id="invitationsLoader" @update="${0}"> </foxy-nucleon> `),i(this.__getGravatar(null===(e=this.data)||void 0===e?void 0:e.email)),n({"flex items-center justify-center bg-error text-error-contrast":!0,"font-medium px-xs leading-none text-xs absolute transform":!0,"scale-0":!this.showInvitations||0===a}),a,super.renderBody({title:s=>{const t=[s.first_name.trim(),s.last_name.trim()];return m(c||(c=u`${0}`),t.filter((s=>!!s)).join(" ")||this.t("no_name"))},subtitle:s=>m(h||(h=u`${0}`),s.email)}),d(this.__invitationsHref),this.requestUpdate)}get __invitationsLoader(){return this.renderRoot.querySelector("#invitationsLoader")}get __invitationsHref(){var s,t;try{if(!this.showInvitations)return;const r=new URL(null!==(t=null===(s=this.data)||void 0===s?void 0:s._links["fx:user_invitations"].href)&&void 0!==t?t:"");return r.searchParams.set("status","sent"),r.searchParams.set("limit","1"),r.toString()}catch(s){return}}__getGravatar(s){return t((function*(){yield m(f||(f=u`<div class="rounded-full w-s h-s bg-contrast-5"></div>`)),s&&(yield m(p||(p=u` <img class="rounded-full w-s h-s bg-contrast-5 shadow-xs" src="${0}" alt=""> `),yield r(a(s))))}))()}}customElements.define("foxy-user-card",j);export{j as UserCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-f67f6fc5.js";import"./shared-5c35d93a.js";import{I as e}from"./shared-bc023a29.js";import{_ as r}from"./shared-d1195c27.js";import{v as t}from"./shared-b738ee96.js";import{a as o}from"./shared-b726120d.js";import{h as s}from"./shared-dc73b9a5.js";import"./shared-6f0504e2.js";import"./shared-f998f9c8.js";import"./shared-adcfd50a.js";import"./shared-65479601.js";import"./shared-61ade33e.js";import"./shared-7ceceb4c.js";import"./shared-5513e830.js";import"./shared-f8368b97.js";import"./shared-51c4a6dd.js";import"./shared-acd33590.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-2ad18636.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-8b5e05df.js";import"./shared-8fc527b7.js";import"./shared-562d466d.js";import"./shared-4e709717.js";import"./shared-22ba9566.js";import"./shared-239062b0.js";import"./shared-28ebee50.js";import"./shared-df51ee50.js";import"./foxy-copy-to-clipboard.js";import"./shared-11694c05.js";import"./shared-c4f15ea3.js";import"./shared-4903b2e3.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,i=e=>e;const n=o(e,"user-form");class d extends n{constructor(){super(...arguments),this.__roleGetValue=()=>{const e=[];return this.form.is_merchant&&e.push("merchant"),this.form.is_programmer&&e.push("backend_developer"),this.form.is_front_end_developer&&e.push("frontend_developer"),this.form.is_designer&&e.push("designer"),e},this.__roleSetValue=e=>{this.edit({is_merchant:e.includes("merchant"),is_programmer:e.includes("backend_developer"),is_front_end_developer:e.includes("frontend_developer"),is_designer:e.includes("designer")})},this.__roleOptions=[{label:"option_merchant",value:"merchant"},{label:"option_backend_developer",value:"backend_developer"},{label:"option_frontend_developer",value:"frontend_developer"},{label:"option_designer",value:"designer"}]}static get v8n(){return[({first_name:e})=>e&&e.length>0||"first-name:v8n_required",({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>e&&e.length>0||"last-name:v8n_required",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({email:e})=>e&&e.length>0||"email:v8n_required",({email:e})=>!e||e.length<=100||"email:v8n_too_long",({email:e})=>!e||t(e)||"email:v8n_invalid_email",({phone:e})=>!e||e.length<=50||"phone:v8n_too_long"]}get headerSubtitleOptions(){var e;return r(r({},super.headerSubtitleOptions),{},{context:(null===(e=this.data)||void 0===e?void 0:e.affiliate_id)?"affiliate":""})}renderBody(){return s(a||(a=i` ${0} <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> <foxy-internal-text-control infer="email"></foxy-internal-text-control> <foxy-internal-text-control infer="phone"></foxy-internal-text-control> <foxy-internal-checkbox-group-control infer="role" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),this.renderHeader(),this.__roleGetValue,this.__roleSetValue,this.__roleOptions,super.renderBody())}}customElements.define("foxy-user-form",d);export{d as UserForm};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-5e09e162.js";import"./shared-acd33590.js";import{_ as s,aP as t,aQ as a}from"./shared-d1195c27.js";import{a as e}from"./shared-b726120d.js";import{a as i,g as r}from"./shared-d8bffb38.js";import{g as d}from"./shared-bab2ea2c.js";import{I as o}from"./shared-19df2a73.js";import{h as n}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-5513e830.js";import"./shared-adcfd50a.js";import"./shared-4903b2e3.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-2ad18636.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let l,m,u,c,f,p,h=s=>s;const v=e(o,"user-invitation-card");class x extends v{constructor(){super(...arguments),this.defaultDomain=null,this.layout=null}static get properties(){return s(s({},super.properties),{},{defaultDomain:{attribute:"default-domain"},layout:{}})}renderBody(){var s,t,a,e,r,o,f,p,v;if("admin"===(null!==(s=this.layout)&&void 0!==s?s:"user")){const{first_name:s,last_name:o,status:u,email:c}=null!==(t=this.data)&&void 0!==t?t:{},f=(null==s?void 0:s.trim())||(null==o?void 0:o.trim()),p={first_name:s,last_name:o,context:f?"":"empty"},v={context:`admin_${u}`,email:c},x=null===(e=null===(a=this.data)||void 0===a?void 0:a._links["fx:user"])||void 0===e?void 0:e.href;return n(l||(l=h` <div class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <div class="min-w-0 flex-1 leading-xs"> <div class="flex items-center"> <foxy-i18n class="font-medium truncate mr-auto" infer="" key="full_name" .options="${0}"> </foxy-i18n> ${0} </div> <foxy-i18n .options="${0}" class="block truncate text-s text-secondary" infer="" key="status"> </foxy-i18n> </div> </div> `),i(this.__getGravatar(null===(r=this.data)||void 0===r?void 0:r.email)),p,x?n(m||(m=h` <span class="text-tertiary uppercase text-s flex-shrink-0"> ID ${0} </span> `),d(x)):"",v)}const x=null===(o=this.data)||void 0===o?void 0:o._links["fx:store"].href,y=this.defaultDomain,j=null===(f=this.data)||void 0===f?void 0:f.store_domain,_=(null==j?void 0:j.includes("."))||!y?j:`${j}.${y}`,b={context:`user_${null===(p=this.data)||void 0===p?void 0:p.status}`,domain:_};return n(u||(u=h` <div class="min-w-0 flex-1 leading-xs"> <div class="flex items-center"> <span class="font-medium truncate mr-auto"> ${0}​ </span> ${0} </div> <foxy-i18n .options="${0}" class="block truncate text-s text-secondary" infer="" key="status"> </foxy-i18n> </div> `),null===(v=this.data)||void 0===v?void 0:v.store_name,x?n(c||(c=h` <span class="text-tertiary uppercase text-s flex-shrink-0"> ID ${0} </span> `),d(x)):"",b)}__getGravatar(s){return t((function*(){yield n(f||(f=h`<div class="flex-shrink-0 rounded-full w-s h-s bg-contrast-5"></div>`)),s&&(yield n(p||(p=h` <img class="flex-shrink-0 rounded-full w-s h-s bg-contrast-5 shadow-xs" src="${0}" alt=""> `),yield a(r(s))))}))()}}customElements.define("foxy-user-invitation-card",x);export{x as UserInvitationCard};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-374e6faa.js";import"./shared-5c35d93a.js";import{I as e}from"./shared-bc023a29.js";import"./shared-239062b0.js";import{a as t}from"./shared-f8368b97.js";import"./shared-acd33590.js";import{_ as a,B as r,aP as s,aQ as i}from"./shared-d1195c27.js";import{N as o}from"./shared-2ad18636.js";import{i as n}from"./shared-9803aa7c.js";import{h as l,c as d,s as c}from"./shared-dc73b9a5.js";import{a as m}from"./shared-b726120d.js";import{a as u,g as v}from"./shared-d8bffb38.js";import{c as h}from"./shared-4e709717.js";import"./shared-8b5e05df.js";import"./shared-f998f9c8.js";import"./shared-adcfd50a.js";import"./shared-7ceceb4c.js";import"./shared-8fc527b7.js";import"./shared-562d466d.js";import"./shared-61ade33e.js";import"./shared-65479601.js";import"./shared-22ba9566.js";import"./shared-28ebee50.js";import"./shared-df51ee50.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-17a61265.js";import"./foxy-copy-to-clipboard.js";import"./shared-11694c05.js";import"./shared-5513e830.js";import"./shared-c4f15ea3.js";import"./shared-4903b2e3.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-51c4a6dd.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let f,p=e=>e;customElements.define("foxy-internal-user-invitation-form-async-action",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return a(a({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const e=this.__state,t="fail"===e?"error":"idle"===e?this.theme:"";return l(f||(f=p` <vaadin-button theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),n(null!=t?t:void 0),"busy"===e||this.disabled,this.__submit,e)}async __submit(){var e;if("busy"!==this.__state)try{this.__state="busy";const t=new o.API(this),a=await t.fetch(null!==(e=this.href)&&void 0!==e?e:"",{method:"POST"});this.__state=a.ok?"idle":"fail",a.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(e){this.__state="fail"}}});let y,x=e=>e;customElements.define("foxy-internal-user-invitation-form-sync-action",class extends t{constructor(){super(...arguments),this.status=null,this.theme=null}static get properties(){return a(a({},super.properties),{},{status:{},theme:{}})}renderControl(){var e;return l(y||(y=x` <vaadin-button theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),n(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled,(()=>{const e=this.nucleon,t=this.status;t&&(null==e||e.edit({status:t}),null==e||e.submit())}))}});let g,_,b,j,Z,w,S,$,k,M,C,B,L=e=>e;const V=m(e,"user-invitation-form");class A extends V{constructor(){super(...arguments),this.defaultDomain=null,this.layout=null,this.__storeDomainGetValue=()=>{var e;const t=this.defaultDomain,a=null===(e=this.data)||void 0===e?void 0:e.store_domain;return(null==a?void 0:a.includes("."))||!t?a:`${a}.${t}`}}static get properties(){return a(a({},super.properties),{},{defaultDomain:{attribute:"default-domain"},layout:{}})}static get styles(){return[...super.styles,d(g||(g=L`.inner-curve{--r:var(--lumo-border-radius-l);--s:3rem;--a:12deg;--m:0/calc(2 * var(--r)) var(--r) no-repeat radial-gradient(50% 100% at bottom, #000 calc(100% - 1px), #0000);--d:(var(--s) + var(--r)) * cos(var(--a));border-radius:var(--r);width:100%;mask:calc(50% + var(--d)) var(--m),calc(50% - var(--d)) var(--m),radial-gradient(var(--s) at 50% calc(-1 * sin(var(--a)) * var(--s)),#0000 100%,#000 calc(100% + 1px)) 0 calc(var(--r) * (1 - sin(var(--a)))) no-repeat,linear-gradient(90deg,#000 calc(50% - var(--d)),#0000 0 calc(50% + var(--d)),#000 0)}`))]}static get v8n(){return[({email:e})=>!!e||"email:v8n_required"]}get readonlySelector(){const e=["store",super.readonlySelector.toString()];return new r(e.join(" ").trim())}get hiddenSelector(){var e;const t=["timestamps","submit","undo",super.hiddenSelector.toString()],a=null===(e=this.data)||void 0===e?void 0:e.status;return"accepted"!==a&&"sent"!==a&&t.unshift("revoke"),"rejected"!==a&&t.unshift("delete"),"accepted"!==a&&t.unshift("leave"),"revoked"!==a&&t.unshift("invite-again"),"sent"!==a&&t.unshift("resend","accept","reject"),new r(t.join(" ").trim())}renderBody(){const{layout:e,data:t}=this;return"admin"===e?t?this.__renderAdminSnapshotState(t):this.__renderAdminTemplateState():t?this.__renderUserSnapshotState(t):this.__renderUserTemplateState()}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw t.includes("already been created for this email and store")?["error:invitation_exists"]:t.includes("already has access to this store")?["error:already_has_access"]:e}}__getGravatar(e){return s((function*(){yield l(_||(_=L` <div style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5"></div> `)),e&&(yield l(b||(b=L` <img data-testid="gravatar" style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5 shadow-xs" src="${0}" alt=""> `),yield i(v(e))))}))()}__renderAdminTemplateState(){return l(j||(j=L` ${0} <foxy-internal-text-control infer="email"></foxy-internal-text-control> ${0} `),this.renderHeader(),super.renderBody())}__renderUserTemplateState(){return l(Z||(Z=L` <div class="p-xl flex items-center justify-center"> <foxy-spinner layout="vertical" infer="unavailable" state="empty"></foxy-spinner> </div> `))}__renderAdminSnapshotState({first_name:e,last_name:t}){var a,r,s,i,o,d,m,v,f,p,y,x,g;const _=(null==e?void 0:e.trim())||(null==t?void 0:t.trim()),b={first_name:e,last_name:t,context:_?"":"empty"},j=this.hiddenSelector;return l(w||(w=L` <div style="padding-top:3.5rem"> <div class="relative"> <div class="inner-curve bg-contrast-5 absolute inset-0"></div> ${0} <div class="relative pb-m px-m leading-xs grid gap-m" style="padding-top:calc(2.5rem + var(--lumo-space-m))"> <div> <foxy-i18n class="block text-xl font-medium text-center" infer="" key="full_name" .options="${0}"> </foxy-i18n> <div class="text-m text-center text-secondary">${0}</div> </div> <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" class="${0}"> <p class="font-medium flex items-center gap-s"> ${0} <foxy-i18n infer="" key="admin_status_title" .options="${0}"> </foxy-i18n> </p> <p class="text-body" style="padding-left:calc((1.25 * var(--lumo-font-size-m)) + var(--lumo-space-s))"> <foxy-i18n infer="" key="admin_status_text" .options="${0}"> </foxy-i18n> </p> </div> <foxy-internal-user-invitation-form-sync-action status="sent" infer="invite-again"> </foxy-internal-user-invitation-form-sync-action> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-sync-action status="revoked" class="flex-1" theme="error" infer="revoke"> </foxy-internal-user-invitation-form-sync-action> <foxy-internal-user-invitation-form-async-action infer="resend" class="flex-1" href="${0}"> </foxy-internal-user-invitation-form-async-action> </div> </div> </div> </div> `),u(this.__getGravatar(null===(a=this.data)||void 0===a?void 0:a.email)),b,null===(r=this.data)||void 0===r?void 0:r.email,h({"border rounded":!0,"border-contrast text-contrast":"revoked"===(null===(s=this.data)||void 0===s?void 0:s.status),"border-success text-success":"accepted"===(null===(i=this.data)||void 0===i?void 0:i.status),"border-primary text-primary":"sent"===(null===(o=this.data)||void 0===o?void 0:o.status),"border-error text-error":"rejected"===(null===(d=this.data)||void 0===d?void 0:d.status)}),"revoked"===(null===(m=this.data)||void 0===m?void 0:m.status)?c(S||(S=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm3 10.5a.75.75 0 0 0 0-1.5H9a.75.75 0 0 0 0 1.5h6Z" clip-rule="evenodd" /></svg>`)):"sent"===(null===(v=this.data)||void 0===v?void 0:v.status)?c($||($=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-3.75V6Z" clip-rule="evenodd" /></svg>`)):"rejected"===(null===(f=this.data)||void 0===f?void 0:f.status)?c(k||(k=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z" clip-rule="evenodd" /></svg>`)):"accepted"===(null===(p=this.data)||void 0===p?void 0:p.status)?c(M||(M=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z" clip-rule="evenodd" /></svg>`)):"",{context:null===(y=this.data)||void 0===y?void 0:y.status},{context:null===(x=this.data)||void 0===x?void 0:x.status},j.matches("revoke",!0)&&j.matches("resend",!0),n(null===(g=this.data)||void 0===g?void 0:g._links["fx:resend"].href))}__renderUserSnapshotState({status:e,store_name:t}){const r=this.hiddenSelector,s={"text-primary":"sent"===e,"text-success":"accepted"===e,"text-error":"rejected"===e,"text-body":"revoked"===e};return l(C||(C=L` <div class="${0}"> <div class="border-t flex-1"></div> ${0} <div class="border-t flex-1"></div> </div> <foxy-i18n infer="" class="${0}" key="user_status_title" .options="${0}"> </foxy-i18n> <foxy-internal-summary-control infer="store"> <foxy-internal-text-control layout="summary-item" infer="store-domain" .getValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-url"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-email"> </foxy-internal-text-control> </foxy-internal-summary-control> <foxy-i18n class="block text-secondary text-center" infer="" key="user_status_text" .options="${0}"> </foxy-i18n> <foxy-internal-user-invitation-form-sync-action status="revoked" theme="error" class="flex-1" infer="leave"> </foxy-internal-user-invitation-form-sync-action> <div class="grid grid-cols-2 gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-sync-action status="rejected" theme="error primary" infer="reject"> </foxy-internal-user-invitation-form-sync-action> <foxy-internal-user-invitation-form-sync-action status="accepted" theme="success primary" infer="accept"> </foxy-internal-user-invitation-form-sync-action> </div> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),h(a({"flex items-center gap-m":!0},s)),c(B||(B=L`<svg style="height: 5rem; width: 5rem" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 256 256"><path fill="currentColor" fill-rule="evenodd" d="M128 250c67.38 0 122-54.62 122-122S195.38 6 128 6 6 60.62 6 128s54.62 122 122 122Zm0 6c70.7 0 128-57.3 128-128S198.7 0 128 0 0 57.3 0 128s57.3 128 128 128Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M128.5 218a89.5 89.5 0 1 0 0-179 89.5 89.5 0 0 0 0 179Zm23.8-46.25-5.13-3.08-54.48-32.91a3.6 3.6 0 0 1-1.69-3.12V78l5.07 3.02c1.06.6 1.78 1.8 1.78 3.15v46.4l52.75 31.87a3.63 3.63 0 0 1 1.72 3.17l-.01 6.14ZM166 180l-5.17-3.11a3.62 3.62 0 0 1-1.7-3.1v-46.47l-47.64-28.8v25.92l-.02 6.14-5.09-3.09a3.5 3.5 0 0 1-1.71-3.05V92.38a3.6 3.6 0 0 1 1.71-3.09 3.3 3.3 0 0 1 3.44.01l54.47 32.9a3.62 3.62 0 0 1 1.7 3.11v48.47L166 180Zm-46.1-44.34c.53.34 5.2 3.17 5.2 3.17s.04-4.24.04-6.22v-15.57c0-1.32-.68-2.48-1.7-3.1-.5-.31-5.14-3.06-5.14-3.06v21.73c0 1.29.64 2.41 1.6 3.05Zm18.86 11.42-5.17-3.14a3.62 3.62 0 0 1-1.66-3.08v-21.77l5.1 3.07a3.62 3.62 0 0 1 1.75 3.13v15.57l-.02 6.22Zm8.46 5.1 5.15 3.12v-21.78a3.6 3.6 0 0 0-1.8-3.16c-.48-.28-5.06-3.08-5.06-3.08v21.8c0 1.33.7 2.48 1.71 3.1Z" clip-rule="evenodd"/><path fill="currentColor" d="M132.57 222a2.96 2.96 0 0 1 2.96 2.96v15.86a3 3 0 0 1-3 3h-9.95a2.39 2.39 0 1 1 0-4.78h5.15a1.88 1.88 0 0 0 0-3.75h-4.22a2.39 2.39 0 1 1 0-4.77h3.1a3 3 0 0 0 3-3v-2.56a2.96 2.96 0 0 1 2.96-2.96Zm-37.07 6.3c.5-2.37 1.39-4.28 2.66-5.71a9.51 9.51 0 0 1 4.52-2.9c1.75-.5 3.59-.55 5.52-.14a11.1 11.1 0 0 1 5 2.38 9.6 9.6 0 0 1 2.95 4.5c.57 1.83.6 3.93.1 6.29a12.33 12.33 0 0 1-2.65 5.7 9.44 9.44 0 0 1-4.52 2.91c-1.75.51-3.6.56-5.54.14a11.2 11.2 0 0 1-4.98-2.37 9.42 9.42 0 0 1-2.96-4.5 12.25 12.25 0 0 1-.1-6.3Zm5.95 1.27a9.13 9.13 0 0 0-.17 3.34c.14.95.5 1.73 1.06 2.32.56.6 1.31 1 2.27 1.2.96.2 1.82.15 2.58-.17a4.27 4.27 0 0 0 1.91-1.69 9.2 9.2 0 0 0 1.19-3.12c.27-1.28.33-2.4.19-3.35a4.33 4.33 0 0 0-1.07-2.31 4.28 4.28 0 0 0-2.28-1.2 4.24 4.24 0 0 0-2.56.17c-.76.31-1.4.88-1.92 1.68a9.23 9.23 0 0 0-1.2 3.13Zm-15.5 6.41a2.84 2.84 0 0 1-1.67-2.33l-.52-5.52c0-.05-.04-.1-.09-.12a.14.14 0 0 0-.15.02l-4.5 3.3a2.82 2.82 0 1 1-3.29-4.57l4.84-3.4a3 3 0 0 0 1.24-2.87l-.8-5.83a2.85 2.85 0 1 1 5.65-.68l.58 5.7c0 .05.04.1.09.12.05.02.1.01.14-.02l4.63-3.38a2.85 2.85 0 1 1 3.29 4.64l-4.87 3.34a3 3 0 0 0-1.28 2.83l.69 5.84a2.84 2.84 0 0 1-3.98 2.93Zm-16.33-12.59a2.87 2.87 0 1 1-5.67-.91l1.42-7.81a.14.14 0 0 0-.2-.15l-6.99 3.77a2.87 2.87 0 1 1-2.61-5.11l10.27-4.98a3 3 0 0 0 1.12-.94l1.86-2.56a2.94 2.94 0 1 1 4.76 3.46l-1.86 2.56a3 3 0 0 0-.55 1.36l-1.55 11.3Zm-11.39-33.1a2.93 2.93 0 0 1-.22 4.21c-.6.55-1.3.8-2.12.75a2.93 2.93 0 0 1-2.06-1 2.89 2.89 0 0 1-.74-2.11 2.8 2.8 0 0 1 2.35-2.76 3.2 3.2 0 0 1 1.52.09c.5.16.92.43 1.27.82ZM34.2 187.3a2.39 2.39 0 1 1-4.14 2.39l-4.37-7.57a2.39 2.39 0 1 1 4.13-2.38l4.37 7.56Zm14.75-8.52a2.39 2.39 0 0 1-4.13 2.38l-4.37-7.56a2.39 2.39 0 1 1 4.13-2.39l4.37 7.57Zm-21.08 7.13a2.96 2.96 0 0 1 1.09-4.05l13.76-7.95a2.96 2.96 0 0 1 2.96 5.13L31.92 187a2.96 2.96 0 0 1-4.05-1.09Zm-2.9-36.06c2.3-.75 4.4-.94 6.28-.56a9.51 9.51 0 0 1 4.78 2.47 11.27 11.27 0 0 1 2.88 4.71c.61 1.9.76 3.74.44 5.53a9.6 9.6 0 0 1-2.43 4.8c-1.3 1.4-3.1 2.48-5.4 3.23-2.3.75-4.4.94-6.26.56a9.44 9.44 0 0 1-4.78-2.46 11.24 11.24 0 0 1-2.9-4.73 11.2 11.2 0 0 1-.43-5.5 9.42 9.42 0 0 1 2.42-4.81 12.26 12.26 0 0 1 5.4-3.24Zm1.88 5.8c-1.24.4-2.23.9-2.98 1.5a4.2 4.2 0 0 0-1.47 2.09 4.2 4.2 0 0 0 .1 2.57c.3.93.77 1.64 1.43 2.14.64.5 1.45.77 2.41.82.96.05 2.06-.13 3.3-.54 1.25-.4 2.24-.9 3-1.5a4.34 4.34 0 0 0 1.47-2.09 4.3 4.3 0 0 0-.1-2.57 4.24 4.24 0 0 0-1.43-2.14 4.24 4.24 0 0 0-2.42-.82 9.24 9.24 0 0 0-3.3.53Zm3.91-38.41a4.55 4.55 0 0 1-.87 2.28 4.9 4.9 0 0 1-1.87 1.52c-.75.34-1.55.46-2.4.37a4.52 4.52 0 0 1-2.28-.87 4.81 4.81 0 0 1-1.9-4.28 4.72 4.72 0 0 1 5.15-4.17 4.8 4.8 0 0 1 3.8 2.74c.34.75.46 1.55.37 2.41ZM44.58 84.8a2.96 2.96 0 0 1-4.05 1.09L26.8 77.96a3 3 0 0 1-1.1-4.1l4.98-8.62a2.39 2.39 0 1 1 4.13 2.39l-2.58 4.46a1.88 1.88 0 0 0 3.25 1.88l2.1-3.66a2.39 2.39 0 1 1 4.14 2.39l-1.54 2.68a3 3 0 0 0 1.1 4.1l2.21 1.28a2.96 2.96 0 0 1 1.09 4.04Zm13.07-35.26a12.31 12.31 0 0 1 3.62 5.17c.6 1.81.69 3.6.25 5.37a11.27 11.27 0 0 1-2.64 4.85 11.24 11.24 0 0 1-4.56 3.14c-1.72.6-3.5.7-5.37.3a12.34 12.34 0 0 1-5.5-3.06 12.33 12.33 0 0 1-3.62-5.15 9.46 9.46 0 0 1-.25-5.36c.43-1.77 1.31-3.4 2.64-4.87a11.2 11.2 0 0 1 4.56-3.13 9.4 9.4 0 0 1 5.37-.31c1.86.4 3.7 1.43 5.5 3.05Zm-4.07 4.53a9.15 9.15 0 0 0-2.8-1.82 4.18 4.18 0 0 0-2.55-.24 4.2 4.2 0 0 0-2.17 1.37 4.24 4.24 0 0 0-1.14 2.31c-.1.8.06 1.64.5 2.5a9.33 9.33 0 0 0 2.11 2.6c.97.87 1.9 1.48 2.8 1.83.9.34 1.75.42 2.54.24a4.3 4.3 0 0 0 2.18-1.38 4.24 4.24 0 0 0 1.14-2.3c.1-.82-.06-1.65-.5-2.5a9.24 9.24 0 0 0-2.11-2.61Zm2.2-16.63c.83-.6 1.92-.7 2.85-.28l5.04 2.3a.15.15 0 0 0 .2-.15l-.6-5.55a2.82 2.82 0 1 1 5.6-.56l.53 5.89a3 3 0 0 0 1.86 2.5l5.45 2.23a2.85 2.85 0 1 1-2.24 5.24l-5.22-2.35a.15.15 0 0 0-.2.15l.61 5.7a2.85 2.85 0 1 1-5.66.52l-.46-5.88a3 3 0 0 0-1.8-2.52l-5.42-2.33a2.84 2.84 0 0 1-.54-4.9Zm19.07-7.84a2.87 2.87 0 1 1 3.62-4.47l6.06 5.14a.14.14 0 0 0 .22-.1l.23-7.93a2.87 2.87 0 1 1 5.74.29l-.83 11.38a3 3 0 0 0 .25 1.44l1.29 2.9a2.94 2.94 0 1 1-5.37 2.39l-1.3-2.9a3 3 0 0 0-.9-1.14l-9.01-7Zm34.35 6.68a2.93 2.93 0 0 1-3.53-2.3 2.78 2.78 0 0 1 .41-2.2 2.93 2.93 0 0 1 1.9-1.3 2.9 2.9 0 0 1 2.2.42 2.8 2.8 0 0 1 1.21 3.41c-.18.5-.46.93-.84 1.28-.38.35-.83.58-1.34.7Zm14.61-19.33a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm0 17.05a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm4.37-21.82a2.96 2.96 0 0 1 2.97 2.96v15.9a2.96 2.96 0 0 1-5.93 0v-15.9a2.96 2.96 0 0 1 2.96-2.96Zm32.68 15.52a12.24 12.24 0 0 1-2.66 5.71 9.5 9.5 0 0 1-4.53 2.9c-1.74.5-3.58.55-5.52.14a11.24 11.24 0 0 1-5-2.38 9.6 9.6 0 0 1-2.94-4.5 12.4 12.4 0 0 1-.1-6.29c.5-2.37 1.38-4.28 2.65-5.7a9.44 9.44 0 0 1 4.51-2.91c1.75-.51 3.6-.56 5.54-.14 1.94.4 3.6 1.2 4.99 2.37a9.42 9.42 0 0 1 2.95 4.5c.58 1.82.62 3.92.11 6.3Zm-5.96-1.27c.27-1.28.33-2.4.18-3.34a4.18 4.18 0 0 0-1.07-2.32 4.2 4.2 0 0 0-2.27-1.2 4.24 4.24 0 0 0-2.57.17c-.75.31-1.39.88-1.92 1.69a9.2 9.2 0 0 0-1.18 3.12 9.4 9.4 0 0 0-.2 3.35 4.4 4.4 0 0 0 1.07 2.31c.57.6 1.33 1 2.29 1.2.96.2 1.8.15 2.56-.17.75-.31 1.4-.88 1.91-1.68.53-.81.93-1.85 1.2-3.13Zm31.3 22.59a4.54 4.54 0 0 1-1.53-1.9 4.9 4.9 0 0 1-.38-2.38 4.5 4.5 0 0 1 .88-2.27c.5-.7 1.14-1.21 1.89-1.54a4.81 4.81 0 0 1 4.65.5 4.72 4.72 0 0 1 1.04 6.55 4.8 4.8 0 0 1-4.27 1.91 4.51 4.51 0 0 1-2.28-.87Zm21.19 28.18a2.96 2.96 0 0 1 1.08-4.05l13.73-7.93a3 3 0 0 1 4.1 1.1l4.98 8.62a2.39 2.39 0 0 1-4.13 2.39l-2.58-4.47a1.87 1.87 0 1 0-3.25 1.88l2.11 3.65a2.39 2.39 0 1 1-4.13 2.39l-1.55-2.68a3 3 0 0 0-4.1-1.1l-2.22 1.28a2.96 2.96 0 0 1-4.04-1.08Zm24 28.95c-2.31.75-4.4.94-6.29.56a9.5 9.5 0 0 1-4.78-2.47 11.26 11.26 0 0 1-2.87-4.71c-.61-1.9-.76-3.74-.44-5.53a9.6 9.6 0 0 1 2.43-4.8 12.5 12.5 0 0 1 5.39-3.23c2.31-.75 4.4-.94 6.27-.56a9.44 9.44 0 0 1 4.78 2.46 11.23 11.23 0 0 1 2.89 4.73c.6 1.88.75 3.71.43 5.5a9.43 9.43 0 0 1-2.41 4.81 12.26 12.26 0 0 1-5.4 3.24Zm-1.89-5.8c1.25-.4 2.24-.9 2.98-1.5a4.17 4.17 0 0 0 1.48-2.09 4.2 4.2 0 0 0-.1-2.57 4.25 4.25 0 0 0-1.43-2.14 4.27 4.27 0 0 0-2.42-.82 9.32 9.32 0 0 0-3.3.54c-1.24.4-2.24.9-2.99 1.5a4.34 4.34 0 0 0-1.47 2.09 4.3 4.3 0 0 0 .1 2.57c.3.93.78 1.65 1.43 2.14.65.5 1.46.77 2.41.82.97.05 2.07-.13 3.31-.53Zm13.3 10.23a2.84 2.84 0 0 1-1.18 2.61l-4.52 3.21a.15.15 0 0 0-.06.14c.01.05.04.1.1.12l5.1 2.24a2.82 2.82 0 1 1-2.31 5.14l-5.37-2.48a3 3 0 0 0-3.1.35l-4.65 3.61a2.85 2.85 0 1 1-3.41-4.56l4.64-3.35a.15.15 0 0 0 .06-.13c0-.06-.04-.1-.08-.12l-5.25-2.31a2.84 2.84 0 1 1 2.38-5.17l5.32 2.54a3 3 0 0 0 3.1-.3l4.71-3.52a2.84 2.84 0 0 1 4.52 1.98Zm-2.74 20.44a2.87 2.87 0 1 1 2.06 5.36l-7.48 2.68a.13.13 0 0 0-.1.11c0 .06.03.1.07.13l6.76 4.17a2.87 2.87 0 1 1-3.12 4.83l-9.45-6.42a3 3 0 0 0-1.37-.5l-3.15-.33a2.94 2.94 0 0 1 .62-5.85l3.14.33a3 3 0 0 0 1.45-.2l10.57-4.31Zm-22.96 26.41a2.93 2.93 0 0 1 3.75-1.92 2.8 2.8 0 0 1 1.71 1.47c.37.74.42 1.5.17 2.28-.24.74-.73 1.3-1.46 1.7a2.8 2.8 0 0 1-3.56-.66c-.34-.4-.57-.85-.7-1.36-.1-.5-.08-1.01.09-1.51Zm9.43 22.32a2.39 2.39 0 1 1 4.13 2.38l-4.37 7.57a2.39 2.39 0 1 1-4.13-2.39l4.37-7.56Zm-14.77-8.53a2.39 2.39 0 1 1 4.14 2.39l-4.37 7.56a2.39 2.39 0 0 1-4.13-2.38l4.36-7.57Zm16.72 14.7a2.96 2.96 0 0 1-4.05 1.08l-13.76-7.95a2.96 2.96 0 1 1 2.96-5.13l13.76 7.95a2.96 2.96 0 0 1 1.09 4.04Zm-29.78 20.54a12.3 12.3 0 0 1-3.62-5.17 9.5 9.5 0 0 1-.25-5.37 11.27 11.27 0 0 1 2.64-4.85 11.25 11.25 0 0 1 4.57-3.14 9.6 9.6 0 0 1 5.37-.3c1.87.43 3.7 1.44 5.5 3.06a12.33 12.33 0 0 1 3.61 5.15c.61 1.82.7 3.6.26 5.36a11.24 11.24 0 0 1-2.65 4.87 11.2 11.2 0 0 1-4.55 3.13 9.4 9.4 0 0 1-5.37.31 12.26 12.26 0 0 1-5.5-3.05Zm4.08-4.53c.97.88 1.9 1.48 2.8 1.82.9.35 1.75.43 2.54.24a4.2 4.2 0 0 0 2.18-1.37 4.24 4.24 0 0 0 1.14-2.31c.1-.8-.07-1.64-.5-2.5a9.33 9.33 0 0 0-2.12-2.6 9.4 9.4 0 0 0-2.8-1.83 4.34 4.34 0 0 0-2.54-.24c-.8.2-1.52.66-2.17 1.39a4.24 4.24 0 0 0-1.14 2.3c-.1.81.06 1.64.5 2.5a9.21 9.21 0 0 0 2.11 2.6Zm-35.21 15.81a4.54 4.54 0 0 1 2.4-.38c.83.1 1.58.39 2.25.86a4.55 4.55 0 0 1 1.54 1.9c.35.79.48 1.6.38 2.4a4.81 4.81 0 0 1-2.76 3.79 4.73 4.73 0 0 1-6.19-2.38 4.81 4.81 0 0 1 .48-4.66 4.51 4.51 0 0 1 1.9-1.53Z"/></svg>`)),h(a({"block text-center text-xl font-medium":!0},s)),{context:e,store_name:t},this.__storeDomainGetValue,{context:e,store_name:t},r.matches("reject",!0)&&r.matches("accept",!0))}}customElements.define("foxy-user-invitation-form",A);export{A as UserInvitationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-239062b0.js";import"./foxy-form-dialog.js";import"./foxy-user-form.js";import"./foxy-spinner.js";import"./shared-acd33590.js";import{s as e,h as s}from"./shared-dc73b9a5.js";import{T as r}from"./shared-f5547471.js";import{a}from"./shared-b726120d.js";import"./shared-f998f9c8.js";import"./shared-adcfd50a.js";import"./shared-65479601.js";import"./shared-61ade33e.js";import"./shared-28ebee50.js";import"./shared-d1195c27.js";import"./shared-df51ee50.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-17a61265.js";import"./shared-4e709717.js";import"./shared-cd96ff03.js";import"./shared-99940888.js";import"./shared-f67f6fc5.js";import"./shared-6f0504e2.js";import"./shared-7ceceb4c.js";import"./shared-5513e830.js";import"./shared-f8368b97.js";import"./shared-51c4a6dd.js";import"./shared-2ad18636.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-5c35d93a.js";import"./shared-8b5e05df.js";import"./shared-8fc527b7.js";import"./shared-562d466d.js";import"./shared-22ba9566.js";import"./shared-bc023a29.js";import"./foxy-copy-to-clipboard.js";import"./shared-11694c05.js";import"./shared-c4f15ea3.js";import"./shared-4903b2e3.js";import"./shared-bab2ea2c.js";import"./shared-b738ee96.js";import"./foxy-nucleon-element.js";let t,o,d,i,l=e=>e;const n=[{property:"is_merchant",icon:e(t||(t=l`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:e(o||(o=l`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:e(d||(d=l`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:e(i||(i=l`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let m,C,p,f,c,h,j,u=e=>e;class g extends(a(r,"users-table")){constructor(){super(...arguments),this.columns=[g.nameColumn,g.emailColumn,g.rolesColumn,g.lastUpdatedColumn,g.actionsColumn]}render(){return s(m||(m=u` <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())}}g.nameColumn={cell:e=>s(C||(C=u` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),e.data.first_name,e.data.last_name)},g.emailColumn={hideBelow:"md",cell:e=>s(p||(p=u` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),e.data.email)},g.rolesColumn={cell:e=>s(f||(f=u` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((r=>s(c||(c=u` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),e.data[r]?"":"text-disabled",n.find((e=>e.property===r)).icon))))},g.lastUpdatedColumn={hideBelow:"lg",cell:e=>s(h||(h=u` <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:e.data.date_modified}),e.lang,e.ns,JSON.stringify({value:e.data.date_modified}),e.lang,e.ns)},g.actionsColumn={cell:e=>s(j||(j=u` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(s=>{const r=s.target,a=r.getRootNode().querySelector("#form");a.href=e.data._links.self.href,a.show(r)}),e.lang,e.ns)},customElements.define("foxy-users-table",g);export{g as UsersTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-5e09e162.js";import"./foxy-nucleon-element.js";import"./shared-acd33590.js";import{_ as e}from"./shared-d1195c27.js";import{a as s}from"./shared-b726120d.js";import{g as t}from"./shared-bab2ea2c.js";import{I as r}from"./shared-19df2a73.js";import{i as a}from"./shared-9803aa7c.js";import{c as o}from"./shared-4e709717.js";import{h as d}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-5513e830.js";import"./shared-adcfd50a.js";import"./shared-4903b2e3.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-2ad18636.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let i,n,l=e=>e;class u extends(s(r,"webhook-card")){constructor(){super(...arguments),this.resourceUri=null}static get properties(){return e(e({},super.properties),{},{resourceUri:{attribute:"resource-uri"}})}renderBody(){var e,s,r,u,c,h,p,m,f;let j;try{const a=t(null!==(e=this.resourceUri)&&void 0!==e?e:""),o=new URL(null!==(r=null===(s=this.data)||void 0===s?void 0:s._links["fx:statuses"].href)&&void 0!==r?r:"");null!==a&&(o.searchParams.set("resource_id",String(a)),o.searchParams.set("order","date_created desc"),o.searchParams.set("limit","1"),j=o.toString())}catch(e){}const v=this.__statusesLoader,x=null===(u=null==v?void 0:v.data)||void 0===u?void 0:u._embedded["fx:webhook_statuses"][0];return d(i||(i=l` <div class="grid grid-cols-1 leading-s -my-xs"> <p class="flex items-center gap-s justify-between"> <span class="text-m truncate text-body font-medium"> ${0}​ </span> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> <p class="text-s truncate text-secondary">${0}​</p> ${0} </div> <foxy-nucleon class="hidden" infer="" href="${0}" id="statusesLoader" @update="${0}"> </foxy-nucleon> `),null===(c=this.data)||void 0===c?void 0:c.name,o({"text-tertiary":!x||"pending"===x.status,"text-success":"successful"===(null==x?void 0:x.status),"text-error":"failed"===(null==x?void 0:x.status),hidden:!(null==v?void 0:v.data),"text-s":!0}),null!==(h=null==x?void 0:x.status)&&void 0!==h?h:"none",null===(p=this.data)||void 0===p?void 0:p.url,null===this.resourceUri?d(n||(n=l` <p class="text-s truncate text-tertiary"> ${0} • ${0}​ </p> `),null===(m=this.data)||void 0===m?void 0:m.format,null===(f=this.data)||void 0===f?void 0:f.event_resource):"",a(j),(()=>this.requestUpdate()))}get __statusesLoader(){return this.renderRoot.querySelector("#statusesLoader")}}customElements.define("foxy-webhook-card",u);export{u as WebhookCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-c5647b62.js";import"./shared-aaf72aad.js";import"./shared-193bb806.js";import"./shared-5c35d93a.js";import{I as r}from"./shared-bc023a29.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{_ as e,B as t}from"./shared-d1195c27.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-b726120d.js";import{i as a}from"./shared-9803aa7c.js";import{h as i}from"./shared-dc73b9a5.js";import"./shared-f998f9c8.js";import"./shared-adcfd50a.js";import"./shared-65479601.js";import"./shared-61ade33e.js";import"./shared-7ceceb4c.js";import"./shared-5513e830.js";import"./shared-f8368b97.js";import"./shared-51c4a6dd.js";import"./shared-acd33590.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-2ad18636.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";import"./shared-6f0504e2.js";import"./shared-40af05b3.js";import"./shared-91d8985f.js";import"./shared-8da3186f.js";import"./shared-239062b0.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-4903b2e3.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-28ebee50.js";import"./shared-df51ee50.js";import"./foxy-pagination.js";import"./shared-9e360643.js";import"./shared-8fc527b7.js";import"./shared-8b5e05df.js";import"./shared-562d466d.js";import"./shared-22ba9566.js";import"./foxy-copy-to-clipboard.js";import"./shared-11694c05.js";import"./shared-c4f15ea3.js";import"./shared-5e09e162.js";import"./shared-19df2a73.js";let n,d,c=r=>r;class p extends(s(r,"webhook-form")){constructor(){super(...arguments),this.resourceUri=null,this.__encryptionKeyGeneratorOptions={separator:"",length:512},this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get properties(){return e(e({},super.properties),{},{resourceUri:{attribute:"resource-uri"}})}static get v8n(){return[({name:r})=>!!r||"name:v8n_required",({name:r})=>!!r&&r.length<=255||"name:v8n_too_long",({url:r})=>!r||r.length<=1e3||"url:v8n_too_long",({query:r})=>!r||r.length<=1e3||"query:v8n_too_long",({encryption_key:r})=>!!r||"encryption-key:v8n_required",({encryption_key:r})=>!r||r.length<=1e3||"encryption-key:v8n_too_long"]}get hiddenSelector(){const r=[super.hiddenSelector.toString()];return this.data&&r.unshift("event-resource"),new t(r.join(" ").trim())}get headerSubtitleOptions(){var r,e;const t=null===(r=this.data)||void 0===r?void 0:r.format;return{context:"json"===t?null===(e=this.data)||void 0===e?void 0:e.event_resource:t}}edit(r){super.edit(r),this.form.format||super.edit({format:"json"}),this.form.version||super.edit({version:2})}renderBody(){var r,e,t,s;const p=this.resourceUri?o(this.resourceUri):null;let l,h;try{const t=new URL(null!==(e=null===(r=this.data)||void 0===r?void 0:r._links["fx:statuses"].href)&&void 0!==e?e:"");null!==p&&t.searchParams.set("resource_id",String(p)),t.searchParams.set("order","date_created desc"),l=t.toString()}catch(r){l=void 0}try{const r=new URL(null!==(s=null===(t=this.data)||void 0===t?void 0:t._links["fx:logs"].href)&&void 0!==s?s:"");null!==p&&r.searchParams.set("resource_id",String(p)),r.searchParams.set("order","date_created desc"),h=r.toString()}catch(r){h=void 0}return i(n||(n=c` ${0} <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-password-control infer="encryption-key" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> ${0} ${0} `),this.renderHeader(),this.__eventResources,this.__encryptionKeyGeneratorOptions,this.data?i(d||(d=c` <foxy-internal-async-list-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control first="${0}" infer="logs" limit="10" item="foxy-webhook-log-card"> </foxy-internal-async-list-control> `),a(l),a(h)):"",super.renderBody())}}customElements.define("foxy-webhook-form",p);export{p as WebhookForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-acd33590.js";import"./shared-5e09e162.js";import{a as s}from"./shared-b726120d.js";import{I as e}from"./shared-19df2a73.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-d1195c27.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./foxy-spinner.js";import"./shared-5513e830.js";import"./shared-adcfd50a.js";import"./shared-4903b2e3.js";import"./shared-2ad18636.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let a,d=s=>s;class t extends(s(e,"webhook-log-card")){renderBody(){var s;const{date_created:e,response_code:t,response_body:o}=null!==(s=this.data)&&void 0!==s?s:{};return r(a||(a=d` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center"> <foxy-i18n .options="${0}" class="font-medium" infer="" key="date"> </foxy-i18n> <span class="text-xs text-tertiary">${0}​</span> </p> <p class="text-secondary text-s">${0}​</p> </div> `),{value:e},t,o)}}customElements.define("foxy-webhook-log-card",t);export{t as WebhookLogCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-acd33590.js";import"./shared-5e09e162.js";import{a as s}from"./shared-b726120d.js";import{I as e}from"./shared-19df2a73.js";import{h as r}from"./shared-dc73b9a5.js";import{c as a}from"./shared-4e709717.js";import"./shared-d1195c27.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./foxy-spinner.js";import"./shared-5513e830.js";import"./shared-adcfd50a.js";import"./shared-4903b2e3.js";import"./shared-2ad18636.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let t,d=s=>s;const o=s(e,"webhook-status-card");class i extends o{renderBody(){var s,e;const o=null===(s=this.data)||void 0===s?void 0:s.status;return r(t||(t=d` <p class="flex flex-col leading-xs"> <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},a({"text-secondary":"pending"===o,"text-success":"successful"===o,"text-error":"failed"===o,"text-s":!0}),o)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{an as a,ao as r}from"./shared-
|
|
1
|
+
import{an as a,ao as r}from"./shared-d1195c27.js";var e=function(){try{var r=a(Object,"defineProperty");return r({},"",{}),r}catch(a){}}();function t(a,r,t){"__proto__"==r&&e?e(a,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):a[r]=t}var o=Object.prototype.hasOwnProperty;function n(a,e,n){var c=a[e];o.call(a,e)&&r(c,n)&&(void 0!==n||e in a)||t(a,e,n)}export{n as a,t as b,e as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,aF as t,aG as s}from"./shared-
|
|
1
|
+
import{A as e,aF as t,aG as s}from"./shared-d1195c27.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,r){function a(e){try{h(n.next(e))}catch(e){r(e)}}function o(e){try{h(n.throw(e))}catch(e){r(e)}}function h(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}h((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}signUp(t){return n(this,void 0,void 0,(function*(){i.v8n.signUpParams.check(t);const s=new URL("./sign_up",this.base),n=yield this.fetch(s.toString(),{method:"POST",body:JSON.stringify(t)});if(!n.ok){if(400===n.status)throw new e.AuthError({code:"INVALID_FORM"});if(401===n.status)throw new e.AuthError({code:"UNAUTHORIZED"});if(403===n.status)throw new e.AuthError({code:"UNAVAILABLE"});throw new e.AuthError({code:"UNKNOWN"})}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var r;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(r=this.storage.getItem(i.SESSION))&&void 0!==r?r:"null");const a=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):a.headers.set("Authorization",`Bearer ${n.session_token}`)}a.headers.set("Content-Type","application/json"),a.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${a.method} ${a.url}`);const o=yield s.fetch(a);if(n&&o.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return o}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{signUpParams:t().schema({verification:t().schema({token:t().string(),type:t().passesAnyOf(t().exact("hcaptcha"))}),first_name:t().optional(t().string().maxLength(50)),last_name:t().optional(t().string().maxLength(50)),password:t().string().maxLength(50),email:t().string().maxLength(100)}),credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let r=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function a(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(r,(function(e,t,n){(n=a[n]||a[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/a[t]}a.nanosecond=a.ns=1e-6,a["µs"]=a["μs"]=a.us=a.microsecond=.001,a.millisecond=a.ms=1,a.second=a.sec=a.s=1e3*a.ms,a.minute=a.min=a.m=60*a.s,a.hour=a.hr=a.h=60*a.m,a.day=a.d=24*a.h,a.week=a.wk=a.w=7*a.d,a.month=a.b=30.4375*a.d,a.year=a.yr=a.y=365.25*a.d;var o=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(s[n[i]]=e[n[i]])}return s};class h{constructor(e){var{url:t}=e,s=o(e,["url"]);this.onsubmit=null,this.__tokenizationRequests=[],this.__iframeMessageHandler=e=>{var t,s;const n=JSON.parse(e.data);switch(n.type){case"tokenization_response":{const e=this.__tokenizationRequests.find((e=>e.id===n.id));n.token?null==e||e.resolve(n.token):null==e||e.reject(),this.__tokenizationRequests=this.__tokenizationRequests.filter((e=>e.id!==n.id));break}case"submit":null===(t=this.onsubmit)||void 0===t||t.call(this);break;case"resize":this.__iframe&&(this.__iframe.style.height=n.height);break;case"ready":this.configure(this.__config),null===(s=this.__mountingTask)||void 0===s||s.resolve()}},this.__iframeLoadHandler=e=>{if(this.__channel){const t=e.currentTarget.contentWindow;if(!t)throw new Error("Content window is not available.");t.postMessage("connect","*",[this.__channel.port2])}},this.__mountingTask=null,this.__channel=null,this.__iframe=null,this.__config=s,this.__url=t}configure(e){var t;this.__config=e;const s=Object.assign({type:"config"},e);null===(t=this.__channel)||void 0===t||t.port1.postMessage(JSON.stringify(s))}tokenize(){return new Promise(((e,t)=>{if(this.__channel){const s=this._createId();this.__tokenizationRequests.push({id:s,reject:t,resolve:e}),this.__channel.port1.postMessage(JSON.stringify({id:s,type:"tokenization_request"}))}else t()}))}unmount(){var e,t,s,n,i,r;null===(e=this.__channel)||void 0===e||e.port1.removeEventListener("message",this.__iframeMessageHandler),null===(t=this.__channel)||void 0===t||t.port1.close(),null===(s=this.__channel)||void 0===s||s.port2.close(),this.__channel=null,null===(n=this.__iframe)||void 0===n||n.removeEventListener("load",this.__iframeLoadHandler),null===(i=this.__iframe)||void 0===i||i.remove(),this.__iframe=null,null===(r=this.__mountingTask)||void 0===r||r.reject(),this.__mountingTask=null}mount(e){return this.unmount(),this.__channel=this._createMessageChannel(),this.__channel.port1.addEventListener("message",this.__iframeMessageHandler),this.__channel.port1.start(),this.__iframe=this._createIframe(e),this.__iframe.addEventListener("load",this.__iframeLoadHandler),this.__iframe.style.transition="height 0.15s ease",this.__iframe.style.margin="-2px",this.__iframe.style.height="100px",this.__iframe.style.width="calc(100% + 4px)",this.__iframe.src=this.__url,e.append(this.__iframe),new Promise(((e,t)=>{this.__mountingTask={reject:t,resolve:e}}))}clear(){var e;null===(e=this.__channel)||void 0===e||e.port1.postMessage(JSON.stringify({type:"clear"}))}_createMessageChannel(){return new MessageChannel}_createIframe(e){return e.ownerDocument.createElement("iframe")}_createId(){return`${Date.now()}${Math.random().toFixed(6).slice(2)}`}}export{i as A,h as P,a as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as t,P as e}from"./shared-
|
|
1
|
+
import{h as t,P as e}from"./shared-adcfd50a.js";import{E as i,T as o}from"./shared-65479601.js";import"./shared-f998f9c8.js";import"./shared-5513e830.js";import"./shared-c4f15ea3.js";import{w as s}from"./shared-b726120d.js";import{c as n}from"./shared-dc73b9a5.js";s("vcf-tooltip",n`
|
|
2
2
|
:host {
|
|
3
3
|
/* Sizing */
|
|
4
4
|
--lumo-tooltip-size: var(--lumo-size-m);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as e}from"./shared-
|
|
1
|
+
import{I as e}from"./shared-f8368b97.js";import{_ as t}from"./shared-d1195c27.js";import{c as r,h as s}from"./shared-dc73b9a5.js";import{r as a}from"./shared-a0c6a159.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return t(t({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,r(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let t,r,o,h,b;return this.disabled?(t="bg-contrast-5 text-disabled",r="text-disabled",h="text-disabled",b="text-disabled",this.readonly?(t+=" border-dashed border-contrast-20",o="border-dashed border-contrast-30"):(t+=" border-transparent",o="border-contrast-10")):this.readonly?(t="border-dashed border-contrast-30 bg-transparent text-secondary",r="text-secondary",o="border-dashed border-contrast-30",h="text-secondary",b="text-secondary",this.__focused&&(o+=" ring-2 ring-primary-50")):this.__focused?(t="border-transparent bg-contrast-10 text-tertiary",r="text-secondary",o="border-primary-50 ring-1 ring-primary-50",h="text-body",b="text-primary"):this.__hovered?(t="border-transparent bg-contrast-20 text-tertiary",r="text-body",o="border-contrast-20",h="text-body",b="text-body"):(t="border-transparent bg-contrast-10 text-tertiary",r="text-secondary",o="border-contrast-10",h="text-body",b="text-secondary"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-xs transition-colors leading-none text-s font-medium ${0}" part="label"> ${0} </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
|
|
2
2
|
</textarea> </div> <div class="mt-xs transition-colors leading-xs text-xs ${0}" part="helper-text" ?hidden="${0}"> ${0} </div> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </label> `),(()=>this.__hovered=!0),(()=>this.__hovered=!1),b,this.label,o,t,a(null!==(e=this._value.split("\n"))&&void 0!==e?e:[],((e,t)=>String(t)),((e,t)=>s(d||(d=c`<div>${0}${0}<span>${0}<span></span></span></div>`),t<9?s(l||(l=c`<span class="opacity-0">0</span>`)):"",t<99?s(n||(n=c`<span class="opacity-0">0</span>`)):"",t+1))),this.placeholder,h,this._value,this.disabled,this.readonly,(()=>this.__focused=!0),(()=>{this.__focused=!1,this.__isErrorVisible=!0}),(e=>{const t=e.currentTarget;this._value=t.value}),r,!this.helperText,this.helperText,!this.__isErrorVisible||!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}updated(e){super.updated(e),this.renderRoot.querySelectorAll("textarea").forEach((e=>{e.style.height="auto",e.style.height=`${e.scrollHeight}px`,e.style.overflowY="hidden"}))}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-
|
|
1
|
+
import{_ as e}from"./shared-d1195c27.js";const r=r=>class extends r{constructor(){super(...arguments),this.infer=null}static get inferredProperties(){return[]}static get properties(){return e(e({},super.properties),{},{infer:{type:String,reflect:!0}})}inferFromElement(e,r){if(e in r)return r[e]}inferProperties(){this.updateComplete.then((()=>{var e;const r=new Map,t=this.constructor,n=new Set(t.inferredProperties),s=e=>{e&&(e instanceof ShadowRoot?s(e.host):e instanceof HTMLElement&&(n.forEach((t=>{const s=this.inferFromElement(t,e);void 0!==s&&(r.set(t,s),n.delete(t))})),n.size>0&&s(e.parentNode)))};s(this.parentNode),null===(e=this.applyInferredProperties)||void 0===e||e.call(this,r)}))}inferPropertiesInDescendants(){(this.renderRoot===this?[this.renderRoot]:[this.renderRoot,this]).forEach((e=>e.querySelectorAll("[infer]").forEach((e=>{try{e.inferProperties()}catch(r){console.warn(`Failed to infer properties for ${e.tagName}`,e,r)}}))))}applyInferredProperties(e){}connectedCallback(){super.connectedCallback(),this.inferPropertiesInDescendants()}updated(e){super.updated(e),this.inferPropertiesInDescendants()}};export{r as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-d4a1658e.js";import"./shared-8b5e05df.js";import{I as e}from"./shared-f8368b97.js";import{i as a}from"./shared-9803aa7c.js";import{h as r}from"./shared-dc73b9a5.js";let t,s=e=>e;customElements.define("foxy-internal-text-area-control",class extends e{renderControl(){return r(t||(t=s` <vaadin-text-area error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-area> `),a(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var a;return"Enter"===e.key&&(null===(a=this.nucleon)||void 0===a?void 0:a.submit())}),(e=>{const a=e.currentTarget;this._value=a.value}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-9e360643.js";import"./shared-8b5e05df.js";import{I as e}from"./shared-f8368b97.js";import{w as t}from"./shared-b726120d.js";import{c as r,h as a,s as o}from"./shared-dc73b9a5.js";import{_ as l}from"./shared-d1195c27.js";import{i as s}from"./shared-9803aa7c.js";import{c as i}from"./shared-4e709717.js";let n;function m(e){var t,r,a;const o=null!==(t=null==e?void 0:e.separator)&&void 0!==t?t:"-",l=null!==(r=null==e?void 0:e.charset)&&void 0!==r?r:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=null!==(a=null==e?void 0:e.length)&&void 0!==a?a:18;let i="";for(let e=0;e<s;e++)o&&e>0&&e%6==0&&(i+=o),i+=l[Math.floor(Math.random()*l.length)];return i}t("vaadin-password-field",r(n||(n=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}`)));let d,h,u,p=e=>e;customElements.define("foxy-internal-password-control",class extends e{constructor(){super(...arguments),this.generatorOptions=null,this.showGenerator=!1,this.layout=null}static get properties(){return l(l({},super.properties),{},{generatorOptions:{type:Object,attribute:"generator-options"},showGenerator:{type:Boolean,attribute:"show-generator"},layout:{}})}renderControl(){var e;return a(d||(d=p` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" theme="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} </vaadin-password-field> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.layout)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.showGenerator?this.__renderGenerator():"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderGenerator(){return a(h||(h=p` <div data-testid="generator" class="${0}" slot="suffix" @click="${0}"> ${0} </div> `),i({"w-s h-s flex items-center justify-center cursor-default transition-colors":!0,"text-contrast-60 hover-text-contrast-80":!this.disabled&&!this.readonly,"text-contrast-20":this.disabled||this.readonly}),(()=>{var e,t,r,a;let o,l=!1,s=0;do{o=m(null!==(e=this.generatorOptions)&&void 0!==e?e:void 0),l=null===(a=null===(r=null===(t=this.generatorOptions)||void 0===t?void 0:t.checkStrength)||void 0===r?void 0:r.call(t,o))||void 0===a||a,s++}while(!l&&s<100);if(!l)throw new Error("Failed to generate a strong password.");this._value=o;const i=this.renderRoot.querySelector("vaadin-password-field");null==i||i._setPasswordVisible(!0)}),o(u||(u=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.15em; height: 1.15em"><path d="M15.98 1.804a1 1 0 00-1.96 0l-.24 1.192a1 1 0 01-.784.785l-1.192.238a1 1 0 000 1.962l1.192.238a1 1 0 01.785.785l.238 1.192a1 1 0 001.962 0l.238-1.192a1 1 0 01.785-.785l1.192-.238a1 1 0 000-1.962l-1.192-.238a1 1 0 01-.785-.785l-.238-1.192zM6.949 5.684a1 1 0 00-1.898 0l-.683 2.051a1 1 0 01-.633.633l-2.051.683a1 1 0 000 1.898l2.051.684a1 1 0 01.633.632l.683 2.051a1 1 0 001.898 0l.683-2.051a1 1 0 01.633-.633l2.051-.683a1 1 0 000-1.898l-2.051-.683a1 1 0 01-.633-.633L6.95 5.684zM13.949 13.684a1 1 0 00-1.898 0l-.184.551a1 1 0 01-.632.633l-.551.183a1 1 0 000 1.898l.551.183a1 1 0 01.633.633l.183.551a1 1 0 001.898 0l.184-.551a1 1 0 01.632-.633l.551-.183a1 1 0 000-1.898l-.551-.184a1 1 0 01-.633-.632l-.183-.551z" /></svg>`)))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e}from"./shared-
|
|
1
|
+
import{T as e}from"./shared-b726120d.js";import{N as t}from"./shared-2ad18636.js";import{c as i}from"./shared-4e709717.js";import{h as s}from"./shared-dc73b9a5.js";let r,a,n=e=>e;class o extends(e(t)){renderBody(){return s(r||(r=n``))}render(){const e=this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy";return s(a||(a=n` <div aria-busy="${0}" aria-live="polite" class="relative leading-m text-body text-m font-lumo"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),i({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.isBodyReady}),this.renderBody(),i({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"items-center justify-center":!0,"opacity-0 pointer-events-none":this.isBodyReady}),"busy"===e?"no-label":"horizontal",e)}get isBodyReady(){return!!this.data}}export{o as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-f998f9c8.js";import"./shared-9a59aab2.js";import{h as e,G as t,P as a,D as i,t as s,b as o,s as r}from"./shared-adcfd50a.js";import"./shared-239062b0.js";import"./shared-8fc527b7.js";import"./shared-562d466d.js";import{T as n}from"./shared-8b5e05df.js";import"./shared-5c846a3b.js";import{T as l,D as d,E as h}from"./shared-65479601.js";import{C as u}from"./shared-61ade33e.js";import{O as c}from"./shared-40af05b3.js";import{D as p,t as m,f as _,a as f}from"./shared-5513e830.js";import{I as v,a as g}from"./shared-f893763a.js";import{a as y}from"./shared-8da3186f.js";import{I as b}from"./shared-97cfdcdb.js";const D=e`<dom-module id="lumo-date-picker-overlay" theme-for="vaadin-date-picker-overlay">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-menu-overlay">
|
|
4
4
|
[part="overlay"] {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./shared-019348d7.js";import{a as o,f as t,t as a,am as n}from"./shared-d1195c27.js";function s(s,e,f){return null==s?s:function(s,e,f,i){if(!o(s))return s;for(var u=-1,d=(e=t(e,s)).length,p=d-1,c=s;null!=c&&++u<d;){var l=a(e[u]),m=f;if("__proto__"===l||"constructor"===l||"prototype"===l)return s;if(u!=p){var v=c[l];void 0===(m=i?i(v,l,c):void 0)&&(m=o(v)?v:n(e[u+1])?[]:{})}r(c,l,m),c=c[l]}return s}(s,e,f)}export{s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-f998f9c8.js";import{h as t,G as e,P as o,b as r}from"./shared-adcfd50a.js";import{E as i,T as a}from"./shared-65479601.js";import{C as s}from"./shared-61ade33e.js";const n=t`<dom-module id="lumo-button" theme-for="vaadin-button">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-239062b0.js";import"./shared-acd33590.js";import{_ as t}from"./shared-d1195c27.js";import{h as e}from"./shared-dc73b9a5.js";import{D as s}from"./shared-df51ee50.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e,f as t,t as r,g as s,h as i,j as n,k as o,l as a,_ as u,m as l,n as h,o as d,R as c}from"./shared-0f6e4584.js";import{h as f,L as _}from"./shared-dc73b9a5.js";import{A as v}from"./shared-c286c5ad.js";import{F as m}from"./shared-343d1fd7.js";import{U as p,a as g}from"./shared-cd96ff03.js";import{I as y}from"./shared-f7a1193f.js";import{i as R,c as E,a as S}from"./shared-522a172d.js";import{d as w}from"./shared-12a7a15d.js";import{s as b}from"./shared-6474675f.js";import{i as P}from"./shared-ee36b83f.js";var k=Date.now;var T,U,x,L=w?function(e,t){return w(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:R,A=(T=L,U=0,x=0,function(){var e=k(),t=16-(e-x);if(x=e,t>0){if(++U>=800)return arguments[0]}else U=0;return T.apply(void 0,arguments)});function j(e){return e!=e}function F(e,t,r){return t==t?function(e,t,r){for(var s=r-1,i=e.length;++s<i;)if(e[s]===t)return s;return-1}(e,t,r):function(e,t,r,s){for(var i=e.length,n=r+(s?1:-1);s?n--:++n<i;)if(t(e[n],n,e))return n;return-1}(e,j,r)}var H=Math.max;function N(t,r){return r.length<2?t:e(t,function(e,t,r){var s=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var n=Array(i);++s<i;)n[s]=e[s+t];return n}(r,0,-1))}function C(e,t,r,s){for(var i=r-1,n=e.length;++i<n;)if(s(e[i],t))return i;return-1}var D=Array.prototype.splice;var I=function(e,t){return A(function(e,t,r){return t=H(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,n=H(s.length-t,0),o=Array(n);++i<n;)o[i]=s[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=s[i];return a[t]=r(o),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,R),e+"")}((function(e,t){return e&&e.length&&t&&t.length?function(e,t,r,n){var o=n?C:F,a=-1,u=t.length,l=e;for(e===t&&(t=E(t)),r&&(l=s(e,i(r)));++a<u;)for(var h=0,d=t[a],c=r?r(d):d;(h=o(l,c,h,n))>-1;)l!==e&&D.call(l,h,1),D.call(e,h,1);return e}(e,t):e})),Q=I,O=0;function W(e){var t=++O;return n(e)+t}function $(e,s){return null==e||function(e,s){return null==(e=N(e,s=t(s,e)))||delete e[r((i=s,n=null==i?0:i.length,n?i[n-1]:void 0))];var i,n}(e,s)}function G(e,t){let r=null;return o(t).forEach((function(){var t,s,i,n,o,a,u,l,h,d,c;if(null===(i=null===(s=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===s?void 0:s.self)||void 0===i?void 0:i.href){const t=null===(a=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===a?void 0:a.href,s=new URL(null===(h=null===(l=null===(u=this.node)||void 0===u?void 0:u._links)||void 0===l?void 0:l.self)||void 0===h?void 0:h.href);if(s.searchParams.delete("zoom"),e===t||e===s.toString())return r=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(d=this.node)||void 0===d?void 0:d._links)&&void 0!==c?c:{}).some((([t,s])=>{var i,n;if(s.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const a=o.length<20?o.length:21,u=new URL(e),l=new URL(e);return u.searchParams.set("offset",o.length.toString()),l.searchParams.set("offset",a.toString()),r=JSON.stringify({returned_items:o.length,total_items:a,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:l.toString()},prev:{href:e},next:{href:u.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(r,{status:r?200:404})}async function M(e,t){var r,s;if(t.in("busy"))return Promise.resolve(new Response(null,{status:500}));const i=new URL(e.url);i.search="",i.hash="";const n=i.toString().replace(`foxy://${t.virtualHost}/form/`,"").split("/").map(decodeURIComponent),o=a(t.form,n);let l,h=405;if("GET"===e.method)if(Array.isArray(o)){const i=parseInt(null!==(r=new URL(e.url).searchParams.get("offset"))&&void 0!==r?r:""),a=parseInt(null!==(s=new URL(e.url).searchParams.get("limit"))&&void 0!==s?s:""),d=isNaN(i)||i<0?0:i,c=isNaN(a)||a<0?20:a,f=o.slice(d,d+c).map(((e,r)=>{const s=["form",...n,String(r)],i=`foxy://${t.virtualHost}/${s.map(encodeURIComponent).join("/")}`;return u({_links:{self:{href:i}}},e)})),_=new URL(e.url);_.searchParams.set("offset","0"),_.searchParams.set("limit",String(c));const v=new URL(e.url);v.searchParams.set("offset",String(Math.max(0,d-c))),v.searchParams.set("limit",String(c));const m=new URL(e.url);m.searchParams.set("offset",String(Math.min(o.length,d+c))),m.searchParams.set("limit",String(c));const p=new URL(e.url);p.searchParams.set("offset",String(Math.max(0,o.length-c))),p.searchParams.set("limit",String(c)),h=200,l={returned_items:f.length,total_items:o.length,offset:d,limit:c,_embedded:{"fx:slice":f},_links:{first:{href:_.toString()},last:{href:p.toString()},prev:{href:v.toString()},next:{href:m.toString()},self:{href:e.url}}}}else h=200,l=u({_links:{self:{href:e.url}}},o);if("POST"===e.method){const r=await e.json(),s=S(t.form),i=a(s,n).push(r)-1;t.edit(s);const o=["form",...n,String(i)].map(encodeURIComponent).join("/");h=200,l={_links:{self:{href:`foxy://${t.virtualHost}/${o}`}},message:"Resource created successfully."}}if("PATCH"===e.method){const r=S(t.form),s=u(u({},a(r,n)),await e.json());t.edit(b(r,n,s)),h=200,l=u({_links:{self:{href:e.url}}},s)}if("DELETE"===e.method){const r=S(t.form),s=a(r,n.slice(0,-1));Array.isArray(s)?Q(s,a(r,n)):$(r,n),t.edit(r),h=200,l={_links:{self:{href:e.url}},message:"Resource deleted successfully."}}return Promise.resolve(new Response(JSON.stringify(l),{status:h}))}let q,J=e=>e;class V extends(y(_)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.virtualHost=W("nucleon-"),this.__hrefToLoad=null,this.__group="",this.__unsubscribeFromRumour=null,this.__fetchEventQueue=[],this.__service=P(h.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:d({errors:e=>{const t=this.constructor.v8n,r=u(u({},e.data),e.edits);return t.map((e=>e(r,this))).filter((e=>"string"==typeof e)).filter(((e,t,r)=>r.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},virtualHost:{attribute:"virtual-host"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.failure)&&void 0!==t?t:null}get errors(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.errors)&&void 0!==t?t:[]}get form(){var e,t;const{data:r,edits:s}=null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context)&&void 0!==t?t:{};return u(u({},r),s)}get data(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.data)&&void 0!==t?t:null}set data(e){this.__destroyRumour(),this.__hrefToLoad=null,this.__service.send({type:"SET_DATA",data:e}),e&&this.__createRumour()}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){var e,t,r;return null!==(r=null!==(t=null===(e=this.form._links)||void 0===e?void 0:e.self.href)&&void 0!==t?t:this.__hrefToLoad)&&void 0!==r?r:""}set href(e){this.__hrefToLoad=e,e?this.__service.send({type:"FETCH"}):this.data=null}in(e){var t;return!!(null===(t=this.__service.state)||void 0===t?void 0:t.matches(e))}undo(){this.__service.send({type:"UNDO"})}edit(e){var t;"string"==typeof(null===(t=e._links)||void 0===t?void 0:t.self.href)&&(this.__hrefToLoad=null),this.__service.send({type:"EDIT",data:e})}submit(){this.reportValidity(),this.__service.send({type:"SUBMIT"})}checkValidity(){const e=this.in({idle:{template:{dirty:"valid"}}}),t=this.in({idle:{snapshot:{dirty:"valid"}}}),r=this.in({idle:{template:{clean:"valid"}}}),s=this.in({idle:{snapshot:{clean:"valid"}}});return r||e||(s||t)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode());return this.checkValidity()}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}render(){return f(q||(q=J`<slot></slot>`))}connectedCallback(){super.connectedCallback(),this.href&&!this.data&&this.__service.send({type:"FETCH"}),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue(),this.dispatchEvent(new p)}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected"),this.dispatchEvent(new p)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(r=e.get("lang"))&&void 0!==r?r:"")}async _fetch(...e){const t=await new v(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){let t;this.__destroyRumour();try{const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});t=await this._fetch(s._links.self.href);const i=V.Rumour(this.group),n=[...this.related,this.parent];i.share({data:t,related:n,source:t._links.self.href})}finally{this.__createRumour()}return t}async _sendGet(){let e;this.__destroyRumour();try{e=await this._fetch(this.href),V.Rumour(this.group).share({data:e,source:this.href})}finally{this.__createRumour()}return e}async _sendPatch(e){let t;this.__destroyRumour();try{const r=JSON.stringify(e);t=await this._fetch(this.href,{body:r,method:"PATCH"});V.Rumour(this.group).share({data:t,source:this.href,related:this.related})}finally{this.__createRumour()}return t}async _sendDelete(){this.__destroyRumour();try{await this._fetch(this.href,{method:"DELETE"});const e=V.Rumour(this.group),t=[...this.related,this.parent];e.share({data:null,source:this.href,related:t})}finally{this.__createRumour()}return null}get __state(){const e=this.__service.state,t=null==e?void 0:e.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(null!=t?t:[])].join(" ")}__createService(){this.__service.onTransition((e=>{var t,r,s,i;if(!e.changed)return;let n;e.matches("idle")&&((null===(t=e.history)||void 0===t?void 0:t.matches({busy:"deleting"}))?n=g.ResourceDeleted:(null===(r=e.history)||void 0===r?void 0:r.matches({busy:"creating"}))?n=g.ResourceCreated:(null===(s=e.history)||void 0===s?void 0:s.matches({busy:"updating"}))?n=g.ResourceUpdated:(null===(i=e.history)||void 0===i?void 0:i.matches({busy:"fetching"}))&&(n=g.ResourceFetched)),this.requestUpdate(),this.dispatchEvent(new p("update",{detail:{result:n}})),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new p)})),this.__service.start()}__createRumour(){const e=V.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this),this.__unsubscribeFromRumour=null}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const r=null===(t=this.__service.state)||void 0===t?void 0:t.context.data,s=r?e(r):r;if(s!==r&&(this.data=s,!s)){const e=g.ResourceDeleted,t=new p("update",{detail:{result:e}});this.dispatchEvent(t)}}catch(e){if(!(e instanceof c.UpdateError))throw e;setTimeout((()=>this.refresh()))}}__processFetchEventQueue(){const e=new V.API(this);this.__fetchEventQueue.forEach((t=>{const r=t.request;if(this.virtualHost&&r.url.startsWith(`foxy://${this.virtualHost}/form/`))return t.respondWith(M(r,this));const s=G(r.url,this.data),i=s.ok?s:e.fetch(r);t.respondWith(Promise.resolve(i)),s.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${r.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){var t;if(!(e instanceof m))return;if(e.defaultPrevented)return;if(e.composedPath()[0]===this)return;const{url:r,method:s}=e.request;if(r.startsWith("foxy://")){if(!this.virtualHost||!r.startsWith(`foxy://${this.virtualHost}/form/`))return;if("GET"!==s)return e.respondWith(M(e.request,this))}"GET"===s&&(e.preventDefault(),this.__fetchEventQueue.push(e),(null===(t=this.__service.state)||void 0===t?void 0:t.matches("busy"))||this.__processFetchEventQueue())}}V.UpdateEvent=p,V.Rumour=l((()=>new c)),V.API=v;export{V as N,G as s,W as u};
|
|
1
|
+
import{e,f as t,t as r,g as s,h as i,j as n,k as o,l as a,_ as u,m as l,n as h,o as c,R as d}from"./shared-d1195c27.js";import{h as f,L as _}from"./shared-dc73b9a5.js";import{A as v}from"./shared-c518ece2.js";import{F as m}from"./shared-343d1fd7.js";import{U as p,a as g}from"./shared-cd96ff03.js";import{I as y}from"./shared-17a61265.js";import{i as R,c as E,a as S}from"./shared-9cf15285.js";import{d as w}from"./shared-019348d7.js";import{s as b}from"./shared-1aff7995.js";import{i as P}from"./shared-fcdb896f.js";var k=Date.now;var T,U,x,L=w?function(e,t){return w(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:R,A=(T=L,U=0,x=0,function(){var e=k(),t=16-(e-x);if(x=e,t>0){if(++U>=800)return arguments[0]}else U=0;return T.apply(void 0,arguments)});function j(e){return e!=e}function F(e,t,r){return t==t?function(e,t,r){for(var s=r-1,i=e.length;++s<i;)if(e[s]===t)return s;return-1}(e,t,r):function(e,t,r,s){for(var i=e.length,n=r+(s?1:-1);s?n--:++n<i;)if(t(e[n],n,e))return n;return-1}(e,j,r)}var H=Math.max;function N(t,r){return r.length<2?t:e(t,function(e,t,r){var s=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var n=Array(i);++s<i;)n[s]=e[s+t];return n}(r,0,-1))}function C(e,t,r,s){for(var i=r-1,n=e.length;++i<n;)if(s(e[i],t))return i;return-1}var D=Array.prototype.splice;var I=function(e,t){return A(function(e,t,r){return t=H(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,n=H(s.length-t,0),o=Array(n);++i<n;)o[i]=s[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=s[i];return a[t]=r(o),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,R),e+"")}((function(e,t){return e&&e.length&&t&&t.length?function(e,t,r,n){var o=n?C:F,a=-1,u=t.length,l=e;for(e===t&&(t=E(t)),r&&(l=s(e,i(r)));++a<u;)for(var h=0,c=t[a],d=r?r(c):c;(h=o(l,d,h,n))>-1;)l!==e&&D.call(l,h,1),D.call(e,h,1);return e}(e,t):e})),Q=I,O=0;function W(e){var t=++O;return n(e)+t}function $(e,s){return null==e||function(e,s){return null==(e=N(e,s=t(s,e)))||delete e[r((i=s,n=null==i?0:i.length,n?i[n-1]:void 0))];var i,n}(e,s)}function G(e,t){let r=null;return o(t).forEach((function(){var t,s,i,n,o,a,u,l,h,c,d;if(null===(i=null===(s=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===s?void 0:s.self)||void 0===i?void 0:i.href){const t=null===(a=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===a?void 0:a.href,s=new URL(null===(h=null===(l=null===(u=this.node)||void 0===u?void 0:u._links)||void 0===l?void 0:l.self)||void 0===h?void 0:h.href);if(s.searchParams.delete("zoom"),e===t||e===s.toString())return r=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(d=null===(c=this.node)||void 0===c?void 0:c._links)&&void 0!==d?d:{}).some((([t,s])=>{var i,n;if(s.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const a=o.length<20?o.length:21,u=new URL(e),l=new URL(e);return u.searchParams.set("offset",o.length.toString()),l.searchParams.set("offset",a.toString()),r=JSON.stringify({returned_items:o.length,total_items:a,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:l.toString()},prev:{href:e},next:{href:u.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(r,{status:r?200:404})}async function M(e,t){var r,s;if(t.in("busy"))return Promise.resolve(new Response(null,{status:500}));const i=new URL(e.url);i.search="",i.hash="";const n=i.toString().replace(`foxy://${t.virtualHost}/form/`,"").split("/").map(decodeURIComponent),o=a(t.form,n);let l,h=405;if("GET"===e.method)if(Array.isArray(o)){const i=parseInt(null!==(r=new URL(e.url).searchParams.get("offset"))&&void 0!==r?r:""),a=parseInt(null!==(s=new URL(e.url).searchParams.get("limit"))&&void 0!==s?s:""),c=isNaN(i)||i<0?0:i,d=isNaN(a)||a<0?20:a,f=o.slice(c,c+d).map(((e,r)=>{const s=["form",...n,String(r)],i=`foxy://${t.virtualHost}/${s.map(encodeURIComponent).join("/")}`;return u({_links:{self:{href:i}}},e)})),_=new URL(e.url);_.searchParams.set("offset","0"),_.searchParams.set("limit",String(d));const v=new URL(e.url);v.searchParams.set("offset",String(Math.max(0,c-d))),v.searchParams.set("limit",String(d));const m=new URL(e.url);m.searchParams.set("offset",String(Math.min(o.length,c+d))),m.searchParams.set("limit",String(d));const p=new URL(e.url);p.searchParams.set("offset",String(Math.max(0,o.length-d))),p.searchParams.set("limit",String(d)),h=200,l={returned_items:f.length,total_items:o.length,offset:c,limit:d,_embedded:{"fx:slice":f},_links:{first:{href:_.toString()},last:{href:p.toString()},prev:{href:v.toString()},next:{href:m.toString()},self:{href:e.url}}}}else h=200,l=u({_links:{self:{href:e.url}}},o);if("POST"===e.method){const r=await e.json(),s=S(t.form),i=a(s,n).push(r)-1;t.edit(s);const o=["form",...n,String(i)].map(encodeURIComponent).join("/");h=200,l={_links:{self:{href:`foxy://${t.virtualHost}/${o}`}},message:"Resource created successfully."}}if("PATCH"===e.method){const r=S(t.form),s=u(u({},a(r,n)),await e.json());t.edit(b(r,n,s)),h=200,l=u({_links:{self:{href:e.url}}},s)}if("DELETE"===e.method){const r=S(t.form),s=a(r,n.slice(0,-1));Array.isArray(s)?Q(s,a(r,n)):$(r,n),t.edit(r),h=200,l={_links:{self:{href:e.url}},message:"Resource deleted successfully."}}return Promise.resolve(new Response(JSON.stringify(l),{status:h}))}let q,J=e=>e;class V extends(y(_)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.virtualHost=W("nucleon-"),this.__hrefToLoad=null,this.__group="",this.__unsubscribeFromRumour=null,this.__fetchEventQueue=[],this.__service=P(h.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:c({errors:e=>{const t=this.constructor.v8n,r=u(u({},e.data),e.edits);return t.map((e=>e(r,this))).filter((e=>"string"==typeof e)).filter(((e,t,r)=>r.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},virtualHost:{attribute:"virtual-host"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.failure)&&void 0!==t?t:null}get errors(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.errors)&&void 0!==t?t:[]}get form(){var e,t;const{data:r,edits:s}=null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context)&&void 0!==t?t:{};return u(u({},r),s)}get data(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.data)&&void 0!==t?t:null}set data(e){this.__destroyRumour(),this.__hrefToLoad=null,this.__service.send({type:"SET_DATA",data:e}),e&&this.__createRumour()}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){var e,t,r;return null!==(r=null!==(t=null===(e=this.form._links)||void 0===e?void 0:e.self.href)&&void 0!==t?t:this.__hrefToLoad)&&void 0!==r?r:""}set href(e){this.__hrefToLoad=e,e?this.__service.send({type:"FETCH"}):this.data=null}in(e){var t;return!!(null===(t=this.__service.state)||void 0===t?void 0:t.matches(e))}undo(){this.__service.send({type:"UNDO"})}edit(e){var t;"string"==typeof(null===(t=e._links)||void 0===t?void 0:t.self.href)&&(this.__hrefToLoad=null),this.__service.send({type:"EDIT",data:e})}submit(){this.reportValidity(),this.__service.send({type:"SUBMIT"})}checkValidity(){const e=this.in({idle:{template:{dirty:"valid"}}}),t=this.in({idle:{snapshot:{dirty:"valid"}}}),r=this.in({idle:{template:{clean:"valid"}}}),s=this.in({idle:{snapshot:{clean:"valid"}}});return r||e||(s||t)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode());return this.checkValidity()}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}render(){return f(q||(q=J`<slot></slot>`))}connectedCallback(){super.connectedCallback(),this.href&&!this.data&&this.__service.send({type:"FETCH"}),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue(),this.dispatchEvent(new p)}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected"),this.dispatchEvent(new p)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(r=e.get("lang"))&&void 0!==r?r:"")}async _fetch(...e){const t=await new v(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){let t;this.__destroyRumour();try{const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});t=await this._fetch(s._links.self.href);const i=V.Rumour(this.group),n=[...this.related,this.parent];i.share({data:t,related:n,source:t._links.self.href})}finally{this.__createRumour()}return t}async _sendGet(){let e;this.__destroyRumour();try{e=await this._fetch(this.href),V.Rumour(this.group).share({data:e,source:this.href})}finally{this.__createRumour()}return e}async _sendPatch(e){let t;this.__destroyRumour();try{const r=JSON.stringify(e);t=await this._fetch(this.href,{body:r,method:"PATCH"});V.Rumour(this.group).share({data:t,source:this.href,related:this.related})}finally{this.__createRumour()}return t}async _sendDelete(){this.__destroyRumour();try{await this._fetch(this.href,{method:"DELETE"});const e=V.Rumour(this.group),t=[...this.related,this.parent];e.share({data:null,source:this.href,related:t})}finally{this.__createRumour()}return null}get __state(){const e=this.__service.state,t=null==e?void 0:e.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(null!=t?t:[])].join(" ")}__createService(){this.__service.onTransition((e=>{var t,r,s,i;if(!e.changed)return;let n;e.matches("idle")&&((null===(t=e.history)||void 0===t?void 0:t.matches({busy:"deleting"}))?n=g.ResourceDeleted:(null===(r=e.history)||void 0===r?void 0:r.matches({busy:"creating"}))?n=g.ResourceCreated:(null===(s=e.history)||void 0===s?void 0:s.matches({busy:"updating"}))?n=g.ResourceUpdated:(null===(i=e.history)||void 0===i?void 0:i.matches({busy:"fetching"}))&&(n=g.ResourceFetched)),this.requestUpdate(),this.dispatchEvent(new p("update",{detail:{result:n}})),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new p)})),this.__service.start()}__createRumour(){const e=V.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this),this.__unsubscribeFromRumour=null}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const r=null===(t=this.__service.state)||void 0===t?void 0:t.context.data,s=r?e(r):r;if(s!==r&&(this.data=s,!s)){const e=g.ResourceDeleted,t=new p("update",{detail:{result:e}});this.dispatchEvent(t)}}catch(e){if(!(e instanceof d.UpdateError))throw e;setTimeout((()=>this.refresh()))}}__processFetchEventQueue(){const e=new V.API(this);this.__fetchEventQueue.forEach((t=>{const r=t.request;if(this.virtualHost&&r.url.startsWith(`foxy://${this.virtualHost}/form/`))return t.respondWith(M(r,this));const s=G(r.url,this.data),i=s.ok?s:e.fetch(r);t.respondWith(Promise.resolve(i)),s.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${r.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){var t;if(!(e instanceof m))return;if(e.defaultPrevented)return;if(e.composedPath()[0]===this)return;const{url:r,method:s}=e.request;if(r.startsWith("foxy://")){if(!this.virtualHost||!r.startsWith(`foxy://${this.virtualHost}/form/`))return;if("GET"!==s)return e.respondWith(M(e.request,this))}"GET"===s&&(e.preventDefault(),this.__fetchEventQueue.push(e),(null===(t=this.__service.state)||void 0===t?void 0:t.matches("busy"))||this.__processFetchEventQueue())}}V.UpdateEvent=p,V.Rumour=l((()=>new d)),V.API=v;export{V as N,G as s,W as u};
|