@foxy.io/elements 1.32.0-beta.4 → 1.32.0-beta.6
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 +2 -2
- 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-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-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-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +1 -1
- 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 +1 -1
- 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 -1
- package/dist/cdn/foxy-user-invitation-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-394d6660.js → shared-0037d294.js} +1 -1
- package/dist/cdn/{shared-0ec6badf.js → shared-007d5b96.js} +1 -1
- package/dist/cdn/{shared-2ae2767e.js → shared-01cf9d37.js} +1 -1
- package/dist/cdn/{shared-fa5e0813.js → shared-030dd9a9.js} +1 -1
- package/dist/cdn/{shared-ad9eae20.js → shared-096b5cb0.js} +1 -1
- package/dist/cdn/{shared-51415f88.js → shared-0c9e6467.js} +1 -1
- package/dist/cdn/{shared-d6bf2433.js → shared-146ec178.js} +1 -1
- package/dist/cdn/{shared-b9af1789.js → shared-14dff823.js} +1 -1
- package/dist/cdn/{shared-0e80f20c.js → shared-175a31f9.js} +1 -1
- package/dist/cdn/{shared-f7474be7.js → shared-17770c6b.js} +1 -1
- package/dist/cdn/{shared-6745d2ec.js → shared-1b7449f8.js} +1 -1
- package/dist/cdn/{shared-68470d06.js → shared-1e14e4ce.js} +1 -1
- package/dist/cdn/{shared-09350008.js → shared-1eb5be1b.js} +1 -1
- package/dist/cdn/{shared-33c54c6e.js → shared-1f2fee09.js} +1 -1
- package/dist/cdn/{shared-20b733ff.js → shared-22d9d709.js} +1 -1
- package/dist/cdn/{shared-8f8c3902.js → shared-2674fb94.js} +1 -1
- package/dist/cdn/{shared-fc176bc4.js → shared-2d304645.js} +1 -1
- package/dist/cdn/{shared-1183a365.js → shared-30dc4148.js} +1 -1
- package/dist/cdn/{shared-32af1656.js → shared-31849175.js} +1 -1
- package/dist/cdn/{shared-1e827d8b.js → shared-361d84ab.js} +1 -1
- package/dist/cdn/{shared-b7ee8271.js → shared-3ba2b804.js} +1 -1
- package/dist/cdn/{shared-12c2e2c7.js → shared-3c4ceb0a.js} +1 -1
- package/dist/cdn/{shared-e24f4d30.js → shared-4552d25b.js} +1 -1
- package/dist/cdn/{shared-772745f5.js → shared-528bd90f.js} +1 -1
- package/dist/cdn/shared-55006e10.js +1 -0
- package/dist/cdn/{shared-0e58c95c.js → shared-5d5c784f.js} +1 -1
- package/dist/cdn/shared-68a615fa.js +1 -0
- package/dist/cdn/{shared-f0c7a963.js → shared-71dc8e26.js} +1 -1
- package/dist/cdn/{shared-65c53765.js → shared-7739b962.js} +1 -1
- package/dist/cdn/{shared-e95ac70b.js → shared-7788b1f9.js} +1 -1
- package/dist/cdn/{shared-abc64854.js → shared-7a6b68f2.js} +1 -1
- package/dist/cdn/{shared-de2dfe65.js → shared-7ce50e85.js} +5 -5
- package/dist/cdn/{shared-08e7b7e5.js → shared-880c4463.js} +1 -1
- package/dist/cdn/{shared-94965d32.js → shared-8b855a8b.js} +1 -1
- package/dist/cdn/{shared-2d2e210c.js → shared-8bd31970.js} +1 -1
- package/dist/cdn/{shared-02d4f592.js → shared-8c1ea9bc.js} +1 -1
- package/dist/cdn/{shared-ca0700a7.js → shared-9d57783e.js} +1 -1
- package/dist/cdn/{shared-297ee58c.js → shared-a28e0b27.js} +1 -1
- package/dist/cdn/{shared-11902e83.js → shared-a294328f.js} +1 -1
- package/dist/cdn/{shared-b6c5ab3b.js → shared-a2d242ac.js} +1 -1
- package/dist/cdn/{shared-b4b7767a.js → shared-a5bfa671.js} +1 -1
- package/dist/cdn/{shared-3e302c9e.js → shared-a676e474.js} +1 -1
- package/dist/cdn/shared-a6b2bd14.js +1 -0
- package/dist/cdn/{shared-bd59ddc4.js → shared-a6debf9c.js} +1 -1
- package/dist/cdn/{shared-5f00bc80.js → shared-a747cbc1.js} +1 -1
- package/dist/cdn/{shared-b79fd251.js → shared-ae1528b6.js} +1 -1
- package/dist/cdn/{shared-513e54c9.js → shared-aed33031.js} +1 -1
- package/dist/cdn/{shared-c1c481c3.js → shared-b147e6ed.js} +1 -1
- package/dist/cdn/{shared-acba6fbd.js → shared-b4cbb9b3.js} +2 -2
- package/dist/cdn/{shared-b8bdf3ae.js → shared-b6ce3673.js} +1 -1
- package/dist/cdn/{shared-676a6445.js → shared-bdc287af.js} +1 -1
- package/dist/cdn/{shared-555c2785.js → shared-c221c015.js} +1 -1
- package/dist/cdn/{shared-10674b72.js → shared-c50af5c9.js} +1 -1
- package/dist/cdn/{shared-ea378d0a.js → shared-c51ef0d1.js} +1 -1
- package/dist/cdn/{shared-89db9c39.js → shared-c654d8d7.js} +1 -1
- package/dist/cdn/{shared-532dd9aa.js → shared-c8a3f983.js} +1 -1
- package/dist/cdn/{shared-c1c20484.js → shared-cafda07e.js} +1 -1
- package/dist/cdn/{shared-35093aea.js → shared-d74032c0.js} +1 -1
- package/dist/cdn/{shared-001dfdb6.js → shared-d9383fb0.js} +1 -1
- package/dist/cdn/{shared-a811962b.js → shared-de7d4f69.js} +1 -1
- package/dist/cdn/{shared-af70646d.js → shared-e26244f2.js} +1 -1
- package/dist/cdn/{shared-e86b8958.js → shared-e4403e14.js} +1 -1
- package/dist/cdn/{shared-f23cde6c.js → shared-e90ebfee.js} +1 -1
- package/dist/cdn/{shared-68ae5d92.js → shared-f1134145.js} +1 -1
- package/dist/cdn/{shared-395b2f4c.js → shared-f21f2fec.js} +1 -1
- package/dist/cdn/{shared-a62af87b.js → shared-f35c09f5.js} +1 -1
- package/dist/cdn/{shared-58e2c070.js → shared-f75e4557.js} +1 -1
- package/dist/cdn/{shared-8405bdfa.js → shared-f7736718.js} +1 -1
- package/dist/cdn/{shared-960eac62.js → shared-fad00e47.js} +1 -1
- package/dist/cdn/translations/store-form/en.json +6 -1
- package/dist/cdn/translations/user-invitation-card/en.json +2 -0
- package/dist/cdn/translations/user-invitation-form/en.json +26 -22
- package/dist/elements/public/StoreForm/StoreForm.d.ts +6 -0
- package/dist/elements/public/StoreForm/StoreForm.js +59 -0
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/StoreForm/index.d.ts +1 -0
- package/dist/elements/public/StoreForm/index.js +1 -0
- package/dist/elements/public/StoreForm/index.js.map +1 -1
- package/dist/elements/public/UserInvitationForm/UserInvitationForm.d.ts +2 -0
- package/dist/elements/public/UserInvitationForm/UserInvitationForm.js +63 -47
- package/dist/elements/public/UserInvitationForm/UserInvitationForm.js.map +1 -1
- package/dist/elements/public/UserInvitationForm/index.d.ts +1 -1
- package/dist/elements/public/UserInvitationForm/index.js +1 -1
- package/dist/elements/public/UserInvitationForm/index.js.map +1 -1
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js +3 -3
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js.map +1 -1
- package/dist/elements/public/UserInvitationForm/types.d.ts +10 -1
- package/dist/elements/public/UserInvitationForm/types.js.map +1 -1
- package/dist/mixins/themeable.js +4 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-03427c91.js +0 -1
- package/dist/cdn/shared-7c1d9bf8.js +0 -1
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.d.ts +0 -9
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.js +0 -32
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.js.map +0 -1
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.d.ts +0 -5
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.js +0 -7
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,_ as t}from"./shared-d1195c27.js";import{h as n,L as r}from"./shared-dc73b9a5.js";import{i as s,a as i}from"./shared-
|
|
1
|
+
import{A as e,_ as t}from"./shared-d1195c27.js";import{h as n,L as r}from"./shared-dc73b9a5.js";import{i as s,a as i}from"./shared-d9383fb0.js";import{F as a}from"./shared-343d1fd7.js";import{I as o}from"./shared-17a61265.js";const l={type:"backend",init:()=>{},read:(t,n,r)=>{const s=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},i=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},o=new a("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new e.WHATWGRequest(`foxy://i18n/${n}/${t}`),resolve:s,reject:i});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(s).catch(i)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const i=t.endsWith("_percentage")?.01:1,a=n.split("|"),o=["allunits","incremental","repeat","single"].includes(a[0])?a.shift():"single",l=e.split(" "),c=l.shift(),u=[...l,`${o}_${t}_discount_summary`].join(".");return a.map((e=>{var t,n;const r=null!==(n=null===(t=/[-+]/.exec(e))||void 0===t?void 0:t.index)&&void 0!==n?n:-1,s=parseFloat(e.substring(r))*i,a=parseFloat(e.substring(0,r));return`$t(${u}, ${JSON.stringify({maximumFractionDigits:10,adjustment:s,from:a,ns:c})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:i}=c(e,!0);return.5===s&&"month"===i&&(s=2,i="week"),r.format(s,i)},percent:(e,n,r,s)=>{let i=null;try{"number"==typeof e&&(i=e.toLocaleString(r,t(t({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return i||String(e)},ordinal:(e,t,n,r)=>{var s,i;const a=new Intl.PluralRules(n,{type:"ordinal"}),o=null!==(i=null===(s=null==r?void 0:r.ns)||void 0===s?void 0:s.split(" "))&&void 0!==i?i:[];null==o||o.shift();return`${e}$t(${[...o,`ordinal_${a.select(e)}`].join(".")})`},price:(e,t,n,r)=>{var s;try{const[t,i]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:i})}catch(t){return e}},date:(e,t,n,r)=>{var s,i,a;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=(null!==(i=null==r?void 0:r.year)&&void 0!==i?i:(new Date).getFullYear()===o.getFullYear())?void 0:"numeric",u=null!==(a=null==r?void 0:r.day)&&void 0!==a?a:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(i(o(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof a&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=a,m.i18next=s.createInstance().use(l),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,i;return null!==(i=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==i?i:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,c as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-3c4ceb0a.js";import{a as r}from"./shared-361d84ab.js";import"./foxy-form-dialog.js";import"./shared-e26244f2.js";import{_ as e}from"./shared-d1195c27.js";import{i as t}from"./shared-9803aa7c.js";import{h as o}from"./shared-dc73b9a5.js";let a,i=r=>r;customElements.define("foxy-internal-bulk-add-action-control",class extends r{constructor(){super(...arguments),this.related=[],this.parent=null,this.form=null}static get properties(){return e(e({},super.properties),{},{related:{type:Array},parent:{},form:{}})}renderControl(){var r,e;return o(a||(a=i` <foxy-form-dialog header="header" parent="${0}" infer="dialog" form="${0}" alert .related="${0}"> </foxy-form-dialog> <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_text"></foxy-i18n> </vaadin-button> `),t(null!==(r=this.parent)&&void 0!==r?r:void 0),t(null!==(e=this.form)&&void 0!==e?e:void 0),this.related,this.disabled,(r=>{const e=this.renderRoot.querySelector("foxy-form-dialog"),t=r.target;e&&(e.href="",e.show(t))}))}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as e,M as t,n as s,c as i,d as n,e as r,V as o,g as l,i as a,j as h,u as c,k as d,l as u,w as _,m as p,E as f,G as m,o as y,r as g,s as b,D as C,t as v,p as x,q as w,P as S,v as P,x as E,y as I,z as O,h as A}from"./shared-
|
|
1
|
+
import{f as e,M as t,n as s,c as i,d as n,e as r,V as o,g as l,i as a,j as h,u as c,k as d,l as u,w as _,m as p,E as f,G as m,o as y,r as g,s as b,D as C,t as v,p as x,q as w,P as S,v as P,x as E,y as I,z as O,h as A}from"./shared-a6debf9c.js";import{l as k,b as N,s as T,c as M,u as D,d as R,f as F}from"./shared-d9383fb0.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-c221c015.js";import"./shared-1e14e4ce.js";import{h as e,P as t}from"./shared-a6debf9c.js";import{E as s,T as r}from"./shared-fad00e47.js";import{F as l}from"./shared-e90ebfee.js";const i=e`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-required-field">
|
|
4
4
|
:host {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-c221c015.js";import"./shared-bdc287af.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-a6debf9c.js";import"./shared-3c4ceb0a.js";import"./shared-a5bfa671.js";import"./shared-2674fb94.js";import{T as n}from"./shared-175a31f9.js";import"./shared-7739b962.js";import{T as l,D as d,E as h}from"./shared-fad00e47.js";import{C as u}from"./shared-61ade33e.js";import{O as c}from"./shared-4552d25b.js";import{D as p,t as m,f as _,a as f}from"./shared-e90ebfee.js";import{I as v,a as g}from"./shared-b4cbb9b3.js";import{a as y}from"./shared-b6ce3673.js";import{I as b}from"./shared-1eb5be1b.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"] {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-31849175.js";import"./shared-175a31f9.js";import{I as e}from"./shared-361d84ab.js";import{w as t}from"./shared-d9383fb0.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{_ as e}from"./shared-d1195c27.js";import{y as s}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-d1195c27.js";import{y as s}from"./shared-d9383fb0.js";import{h as t}from"./shared-dc73b9a5.js";let r,a,i,o=e=>e;class d extends s{constructor(){super(...arguments),this.disabled=!1,this.items=[]}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean,reflect:!0},items:{attribute:!1}})}render(){return t(r||(r=o` <p class="font-lumo text-xs leading-s text-secondary"> ${0} </p> `),this.items.map((({name:e,value:s},r)=>t(a||(a=o`${0}${0} ${0}`),0===r?"":t(i||(i=o`•`)),e,s))))}}export{d as M};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as t}from"./shared-
|
|
1
|
+
import{F as t}from"./shared-e90ebfee.js";import{b as e}from"./shared-fad00e47.js";import{D as s,t as i}from"./shared-a6debf9c.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 Vaadin Ltd.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as e}from"./shared-
|
|
1
|
+
import{D as e}from"./shared-d9383fb0.js";import{D as t,A as i,y as n}from"./shared-a6debf9c.js";const s=e=>class extends e{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"theme"===e&&this._setTheme(i)}},a=t=>class extends(s(t)){static finalize(){super.finalize();const e=this.prototype._template,t=this.template&&this.template.parentElement&&this.template.parentElement.id===this.is,i=Object.getPrototypeOf(this.prototype)._template;i&&!t&&Array.from(i.content.querySelectorAll("style[include]")).forEach((t=>{this._includeStyle(t.getAttribute("include"),e)})),this._includeMatchingThemes(e)}static _includeMatchingThemes(t){const i=e.prototype.modules;let n=!1;const s=this.is+"-default-theme";Object.keys(i).sort(((e,t)=>{const i=0===e.indexOf("vaadin-"),n=0===t.indexOf("vaadin-"),s=["lumo-","material-"],a=s.filter((t=>0===e.indexOf(t))).length>0,o=s.filter((e=>0===t.indexOf(e))).length>0;return i!==n?i?-1:1:a!==o?a?-1:1:0})).forEach((e=>{if(e!==s){const s=i[e].getAttribute("theme-for");s&&s.split(" ").forEach((i=>{new RegExp("^"+i.split("*").join(".*")+"$").test(this.is)&&(n=!0,this._includeStyle(e,t))}))}})),!n&&i[s]&&this._includeStyle(s,t)}static _includeStyle(e,t){if(t&&!t.content.querySelector(`style[include="${e}"]`)){const i=document.createElement("style");i.setAttribute("include",e),t.content.appendChild(i)}}}
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2020 Vaadin Ltd.
|
|
@@ -353,6 +353,11 @@
|
|
|
353
353
|
"helper_text": ""
|
|
354
354
|
}
|
|
355
355
|
},
|
|
356
|
+
"hcaptcha": {
|
|
357
|
+
"disclaimer": "We use hCaptcha to protect this page from spam and abuse.",
|
|
358
|
+
"privacy_policy": "Privacy Policy",
|
|
359
|
+
"terms_of_service": "Terms of Service"
|
|
360
|
+
},
|
|
356
361
|
"timestamps": {
|
|
357
362
|
"date_created": "Created on",
|
|
358
363
|
"date_modified": "Last updated on",
|
|
@@ -377,4 +382,4 @@
|
|
|
377
382
|
"create": {
|
|
378
383
|
"caption": "Create"
|
|
379
384
|
}
|
|
380
|
-
}
|
|
385
|
+
}
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
"status_admin_rejected": "{{ email }} • Invitation rejected",
|
|
4
4
|
"status_admin_revoked": "{{ email }} • Access revoked",
|
|
5
5
|
"status_admin_sent": "{{ email }} • Invited",
|
|
6
|
+
"status_admin_expired": "{{ email }} • Expired",
|
|
6
7
|
"status_user_accepted": "{{ domain }} • Accepted",
|
|
7
8
|
"status_user_rejected": "{{ domain }} • Rejected",
|
|
8
9
|
"status_user_revoked": "{{ domain }} • Revoked",
|
|
9
10
|
"status_user_sent": "{{ domain }} • Pending",
|
|
11
|
+
"status_user_expired": "{{ domain }} • Expired",
|
|
10
12
|
"full_name": "{{ first_name }} {{ last_name }}",
|
|
11
13
|
"full_name_empty": "Unknown user",
|
|
12
14
|
"spinner": {
|
|
@@ -6,39 +6,38 @@
|
|
|
6
6
|
"admin_status_title_sent": "Invitation sent",
|
|
7
7
|
"admin_status_title_rejected": "Invitation rejected",
|
|
8
8
|
"admin_status_title_accepted": "This user is a store admin",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"admin_status_title_expired": "Invitation expired",
|
|
10
|
+
"admin_status_text_revoked": "This user may have been an admin in the past but has no access to this store at the moment. We will keep this record for historical purposes. To restore this user's access, resend the invitation using the button below.",
|
|
11
|
+
"admin_status_text_sent": "We've sent an email to this user asking them to join this store. Once they accept, they will be granted full admin access. If they don't accept within 2 weeks, this invitation will expire.",
|
|
11
12
|
"admin_status_text_rejected": "If this was a mistake, ask the user to delete this invitation in profile settings. You will be able to invite them again after that.",
|
|
12
13
|
"admin_status_text_accepted": "They have full access to this store, including the ability to add and remove users.",
|
|
14
|
+
"admin_status_text_expired": "This invitation has expired. You can resend this invitation using the button below.",
|
|
15
|
+
"user_status_title_rejected": "You've rejected an invitation to join {{ store_name }} as administrator",
|
|
16
|
+
"user_status_title_accepted": "You're a store administrator at {{ store_name }}",
|
|
13
17
|
"user_status_title_revoked": "You no longer have access to {{ store_name }}",
|
|
14
|
-
"user_status_text_revoked": "If you'd like to join this store again, please ask the store owner to reactivate your access in settings.",
|
|
15
18
|
"user_status_title_sent": "You've been invited to join {{ store_name }} as administrator",
|
|
16
|
-
"
|
|
17
|
-
"user_status_title_rejected": "You've rejected an invitation to join {{ store_name }} as administrator",
|
|
19
|
+
"user_status_title_expired": "This invitation to join {{ store_name }} as administrator has expired",
|
|
18
20
|
"user_status_text_rejected": "This store won't be able to contact you again. If you changed your mind, delete this invitation and ask the store owner to invite you again.",
|
|
19
|
-
"user_status_title_accepted": "You're a store administrator at {{ store_name }}",
|
|
20
21
|
"user_status_text_accepted": "If you'd like to leave this store, you can do so by pressing the button below. Please note that if you'd like to join again, the store owner will need to invite you.",
|
|
22
|
+
"user_status_text_revoked": "If you'd like to join this store again, please ask the store owner to reactivate your access in settings.",
|
|
23
|
+
"user_status_text_sent": "Accepting this invitation will grant you full access to this store. Rejecting it will prevent this store from inviting you again.",
|
|
24
|
+
"user_status_text_expired": "To join this store, please ask the store owner to delete this invitation and invite you again.",
|
|
21
25
|
"full_name": "{{ first_name }} {{ last_name }}",
|
|
22
26
|
"full_name_empty": "Unknown User",
|
|
23
27
|
"leave": {
|
|
24
|
-
"
|
|
28
|
+
"idle": "Leave this store",
|
|
29
|
+
"busy": "Leaving...",
|
|
30
|
+
"fail": "Failed to leave"
|
|
25
31
|
},
|
|
26
32
|
"revoke": {
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"caption": "Invite again"
|
|
33
|
+
"idle": "Revoke access",
|
|
34
|
+
"busy": "Revoking...",
|
|
35
|
+
"fail": "Failed to revoke"
|
|
31
36
|
},
|
|
32
37
|
"resend": {
|
|
33
|
-
"idle": "Resend
|
|
38
|
+
"idle": "Resend invitation",
|
|
34
39
|
"busy": "Resending...",
|
|
35
|
-
"fail": "Failed to resend"
|
|
36
|
-
"confirm": {
|
|
37
|
-
"header": "Resend email",
|
|
38
|
-
"message": "Please confirm that you'd like to resend the invitation email to this user.",
|
|
39
|
-
"confirm": "Resend",
|
|
40
|
-
"cancel": "Cancel"
|
|
41
|
-
}
|
|
40
|
+
"fail": "Failed to resend"
|
|
42
41
|
},
|
|
43
42
|
"error": {
|
|
44
43
|
"invitation_exists": "This user has already been invited to this store.",
|
|
@@ -47,6 +46,7 @@
|
|
|
47
46
|
"store": {
|
|
48
47
|
"label": "",
|
|
49
48
|
"helper_text": "",
|
|
49
|
+
"store_link": "Open store dashboard",
|
|
50
50
|
"store-domain": {
|
|
51
51
|
"label": "Store domain",
|
|
52
52
|
"placeholder": "Unknown",
|
|
@@ -70,10 +70,14 @@
|
|
|
70
70
|
"v8n_required": "Please enter an email address."
|
|
71
71
|
},
|
|
72
72
|
"accept": {
|
|
73
|
-
"
|
|
73
|
+
"idle": "Accept",
|
|
74
|
+
"busy": "Accepting...",
|
|
75
|
+
"fail": "Failed to accept"
|
|
74
76
|
},
|
|
75
77
|
"reject": {
|
|
76
|
-
"
|
|
78
|
+
"idle": "Reject",
|
|
79
|
+
"busy": "Rejecting...",
|
|
80
|
+
"fail": "Failed to reject"
|
|
77
81
|
},
|
|
78
82
|
"create": {
|
|
79
83
|
"caption": "Send invitation"
|
|
@@ -81,7 +85,7 @@
|
|
|
81
85
|
"delete": {
|
|
82
86
|
"delete": "Delete",
|
|
83
87
|
"cancel": "Cancel",
|
|
84
|
-
"delete_prompt": "
|
|
88
|
+
"delete_prompt": "This invitation will be permanently deleted. Would you like to proceed?"
|
|
85
89
|
},
|
|
86
90
|
"unavailable": {
|
|
87
91
|
"loading_empty": "Creating an invitation is not available in this context."
|
|
@@ -19,6 +19,8 @@ export declare class StoreForm extends Base<Data> {
|
|
|
19
19
|
customerPasswordHashTypes: string | null;
|
|
20
20
|
/** URL of the `fx:shipping_address_types` property helper resource. */
|
|
21
21
|
shippingAddressTypes: string | null;
|
|
22
|
+
/** hCaptcha site key for signup verification. If provided, requires users to complete a captcha before creating a store. */
|
|
23
|
+
hCaptchaSiteKey: string | null;
|
|
22
24
|
/**
|
|
23
25
|
* URL of the `fx:store_versions` property helper resource.
|
|
24
26
|
* @deprecated All elements in this library are designed to work with store version 2.0.
|
|
@@ -76,10 +78,14 @@ export declare class StoreForm extends Base<Data> {
|
|
|
76
78
|
private readonly __webhookKeyXmlDatafeedSetValue;
|
|
77
79
|
private readonly __webhookKeySsoGetValue;
|
|
78
80
|
private readonly __webhookKeySsoSetValue;
|
|
81
|
+
private __hCaptchaToken;
|
|
79
82
|
get headerSubtitleOptions(): Record<string, unknown>;
|
|
80
83
|
renderBody(): TemplateResult;
|
|
84
|
+
submit(): void;
|
|
85
|
+
protected _fetch<TResult = Data>(...args: Parameters<Window['fetch']>): Promise<TResult>;
|
|
81
86
|
private get __displayIdExamples();
|
|
82
87
|
private get __journalIdExamples();
|
|
88
|
+
private get __hCaptcha();
|
|
83
89
|
private __getWebhookKey;
|
|
84
90
|
private __setWebhookKey;
|
|
85
91
|
private __getCustomDisplayIdConfig;
|
|
@@ -19,6 +19,8 @@ export class StoreForm extends Base {
|
|
|
19
19
|
this.customerPasswordHashTypes = null;
|
|
20
20
|
/** URL of the `fx:shipping_address_types` property helper resource. */
|
|
21
21
|
this.shippingAddressTypes = null;
|
|
22
|
+
/** hCaptcha site key for signup verification. If provided, requires users to complete a captcha before creating a store. */
|
|
23
|
+
this.hCaptchaSiteKey = null;
|
|
22
24
|
/**
|
|
23
25
|
* URL of the `fx:store_versions` property helper resource.
|
|
24
26
|
* @deprecated All elements in this library are designed to work with store version 2.0.
|
|
@@ -202,12 +204,14 @@ export class StoreForm extends Base {
|
|
|
202
204
|
this.__webhookKeySsoSetValue = (newValue) => {
|
|
203
205
|
this.__setWebhookKey('sso', newValue);
|
|
204
206
|
};
|
|
207
|
+
this.__hCaptchaToken = null;
|
|
205
208
|
}
|
|
206
209
|
static get properties() {
|
|
207
210
|
return {
|
|
208
211
|
...super.properties,
|
|
209
212
|
customerPasswordHashTypes: { attribute: 'customer-password-hash-types' },
|
|
210
213
|
shippingAddressTypes: { attribute: 'shipping-address-types' },
|
|
214
|
+
hCaptchaSiteKey: { attribute: 'h-captcha-site-key' },
|
|
211
215
|
storeVersions: { attribute: 'store-versions' },
|
|
212
216
|
checkoutTypes: { attribute: 'checkout-types' },
|
|
213
217
|
localeCodes: { attribute: 'locale-codes' },
|
|
@@ -770,6 +774,42 @@ export class StoreForm extends Base {
|
|
|
770
774
|
: ''}
|
|
771
775
|
</foxy-internal-summary-control>
|
|
772
776
|
|
|
777
|
+
${this.href || !this.hCaptchaSiteKey
|
|
778
|
+
? ''
|
|
779
|
+
: html `
|
|
780
|
+
<div class="text-xs text-tertiary">
|
|
781
|
+
<foxy-i18n infer="hcaptcha" key="disclaimer"></foxy-i18n>
|
|
782
|
+
<br />
|
|
783
|
+
<a
|
|
784
|
+
target="_blank"
|
|
785
|
+
class="transition-colors hover-text-body rounded-s focus-outline-none focus-ring-2 focus-ring-primary-50"
|
|
786
|
+
href="https://www.hcaptcha.com/privacy"
|
|
787
|
+
rel="noopener noreferrer"
|
|
788
|
+
>
|
|
789
|
+
<foxy-i18n class="underline" infer="hcaptcha" key="privacy_policy"></foxy-i18n>
|
|
790
|
+
</a>
|
|
791
|
+
<span>•</span>
|
|
792
|
+
<a
|
|
793
|
+
target="_blank"
|
|
794
|
+
class="transition-colors hover-text-body rounded-s focus-outline-none focus-ring-2 focus-ring-primary-50"
|
|
795
|
+
href="https://www.hcaptcha.com/terms"
|
|
796
|
+
rel="noopener noreferrer"
|
|
797
|
+
>
|
|
798
|
+
<foxy-i18n class="underline" infer="hcaptcha" key="terms_of_service"></foxy-i18n>
|
|
799
|
+
</a>
|
|
800
|
+
<h-captcha
|
|
801
|
+
site-key=${this.hCaptchaSiteKey}
|
|
802
|
+
class="hidden"
|
|
803
|
+
size="invisible"
|
|
804
|
+
hl=${this.lang}
|
|
805
|
+
@verified=${({ token }) => {
|
|
806
|
+
this.__hCaptchaToken = token;
|
|
807
|
+
super.submit();
|
|
808
|
+
}}
|
|
809
|
+
>
|
|
810
|
+
</h-captcha>
|
|
811
|
+
</div>
|
|
812
|
+
`}
|
|
773
813
|
${super.renderBody()}
|
|
774
814
|
${customerPasswordHashTypesLoader.render(this.customerPasswordHashTypes)}
|
|
775
815
|
${shippingAddressTypesLoader.render(this.shippingAddressTypes)}
|
|
@@ -777,6 +817,22 @@ export class StoreForm extends Base {
|
|
|
777
817
|
${regionsLoader.render(regionsUrl)}
|
|
778
818
|
`;
|
|
779
819
|
}
|
|
820
|
+
submit() {
|
|
821
|
+
var _a, _b;
|
|
822
|
+
if (!this.href && this.hCaptchaSiteKey) {
|
|
823
|
+
(_a = this.__hCaptcha) === null || _a === void 0 ? void 0 : _a.reset();
|
|
824
|
+
(_b = this.__hCaptcha) === null || _b === void 0 ? void 0 : _b.execute();
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
super.submit();
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
async _fetch(...args) {
|
|
831
|
+
const request = new StoreForm.API.WHATWGRequest(...args);
|
|
832
|
+
if (this.__hCaptchaToken)
|
|
833
|
+
request.headers.set('h-captcha-code', this.__hCaptchaToken);
|
|
834
|
+
return super._fetch(request);
|
|
835
|
+
}
|
|
780
836
|
get __displayIdExamples() {
|
|
781
837
|
const config = this.__getCustomDisplayIdConfig();
|
|
782
838
|
const startAsInt = parseInt(config.start || '0');
|
|
@@ -813,6 +869,9 @@ export class StoreForm extends Base {
|
|
|
813
869
|
};
|
|
814
870
|
}
|
|
815
871
|
}
|
|
872
|
+
get __hCaptcha() {
|
|
873
|
+
return this.renderRoot.querySelector('h-captcha');
|
|
874
|
+
}
|
|
816
875
|
__getWebhookKey() {
|
|
817
876
|
var _a, _b;
|
|
818
877
|
let parsedKey;
|