@foxy.io/elements 1.40.0 → 1.41.0-beta.2
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-address-form.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-form.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cart-form.js +2 -2
- package/dist/cdn/foxy-client-form.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-form.js +1 -1
- package/dist/cdn/foxy-custom-field-form.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.js +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-experimental-add-to-cart-builder.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-code-form.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-integration-form.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-form.js +1 -1
- package/dist/cdn/foxy-native-integration-form.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-report-form.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-form.js +1 -1
- package/dist/cdn/foxy-subscription-settings-form.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-form.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-update-payment-method-form.js +1 -1
- package/dist/cdn/foxy-user-form.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-form.js +1 -1
- package/dist/cdn/{shared-5b4e2567.js → shared-109ec474.js} +1 -1
- package/dist/cdn/shared-1100bca8.js +1 -0
- package/dist/cdn/{shared-eef73355.js → shared-18e3b778.js} +1 -1
- package/dist/cdn/{shared-9e8ed3af.js → shared-35a49192.js} +1 -1
- package/dist/cdn/{shared-00e02b35.js → shared-43637d69.js} +1 -1
- package/dist/cdn/{shared-cc7e1dc6.js → shared-47d95cdd.js} +1 -1
- package/dist/cdn/{shared-17f2f27a.js → shared-57a179b3.js} +1 -1
- package/dist/cdn/{shared-3a952968.js → shared-6199cae2.js} +1 -1
- package/dist/cdn/{shared-5cd33249.js → shared-63eef674.js} +1 -1
- package/dist/cdn/{shared-e4119ddc.js → shared-67f73b81.js} +1 -1
- package/dist/cdn/{shared-c73c69bf.js → shared-697d44e6.js} +1 -1
- package/dist/cdn/{shared-0c2879b9.js → shared-6be00444.js} +1 -1
- package/dist/cdn/{shared-0098edce.js → shared-7097e2e1.js} +1 -1
- package/dist/cdn/{shared-e21ddeae.js → shared-77132fe8.js} +1 -1
- package/dist/cdn/{shared-653368ea.js → shared-864ff856.js} +1 -1
- package/dist/cdn/{shared-33ecc7ee.js → shared-86e9c57a.js} +1 -1
- package/dist/cdn/{shared-e0da7113.js → shared-88220d9e.js} +1 -1
- package/dist/cdn/{shared-4a4f6eb9.js → shared-888018de.js} +1 -1
- package/dist/cdn/{shared-4a32f76a.js → shared-9a64bf35.js} +1 -1
- package/dist/cdn/{shared-511fcf8e.js → shared-e41fced3.js} +1 -1
- package/dist/cdn/translations/admin-subscription-form/en.json +16 -0
- package/dist/cdn/translations/coupon-form/en.json +15 -0
- package/dist/cdn/translations/transaction/en.json +60 -35
- package/dist/elements/internal/InternalConfirmDialog/InternalConfirmDialog.d.ts +1 -0
- package/dist/elements/internal/InternalConfirmDialog/InternalConfirmDialog.js +3 -0
- package/dist/elements/internal/InternalConfirmDialog/InternalConfirmDialog.js.map +1 -1
- package/dist/elements/internal/InternalPostActionControl/InternalPostActionControl.d.ts +13 -0
- package/dist/elements/internal/InternalPostActionControl/InternalPostActionControl.js +98 -0
- package/dist/elements/internal/InternalPostActionControl/InternalPostActionControl.js.map +1 -0
- package/dist/elements/internal/InternalPostActionControl/index.d.ts +7 -0
- package/dist/elements/internal/InternalPostActionControl/index.js +9 -0
- package/dist/elements/internal/InternalPostActionControl/index.js.map +1 -0
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +21 -4
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
- package/dist/elements/public/AdminSubscriptionForm/index.d.ts +1 -0
- package/dist/elements/public/AdminSubscriptionForm/index.js +1 -0
- package/dist/elements/public/AdminSubscriptionForm/index.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.js +16 -1
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/Transaction/Transaction.js +5 -3
- package/dist/elements/public/Transaction/Transaction.js.map +1 -1
- package/dist/elements/public/Transaction/index.d.ts +1 -1
- package/dist/elements/public/Transaction/index.js +1 -1
- package/dist/elements/public/Transaction/index.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +16 -14
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-e5546d55.js +0 -1
- package/dist/cdn/translations/country/zh-cn.json +0 -248
- package/dist/cdn/translations/country/zh-hk.json +0 -245
- package/dist/cdn/translations/customer-portal/zh-hk.json +0 -1182
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.d.ts +0 -10
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js +0 -60
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.d.ts +0 -6
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js +0 -8
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e}from"./shared-6957b8e6.js";import"./shared-f9ac8763.js";import"./shared-f989c70e.js";import{h as t,P as r}from"./shared-21e68b72.js";import{F as o}from"./shared-37348820.js";import{T as a,D as s}from"./shared-315d7620.js";import{a as l}from"./shared-
|
|
1
|
+
import{C as e}from"./shared-6957b8e6.js";import"./shared-f9ac8763.js";import"./shared-f989c70e.js";import{h as t,P as r}from"./shared-21e68b72.js";import{F as o}from"./shared-37348820.js";import{T as a,D as s}from"./shared-315d7620.js";import{a as l}from"./shared-109ec474.js";import"./shared-4d32d19e.js";import{_ as i}from"./shared-cb58dfcd.js";import{i as h}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";const n=t`<dom-module id="lumo-checkbox-group" theme-for="vaadin-checkbox-group">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-required-field">
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-d807cb20.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-d807cb20.js";import{a as e}from"./shared-109ec474.js";import"./shared-4d32d19e.js";import{_ as t}from"./shared-cb58dfcd.js";import{h as s,s as i}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,a,o,h,c,n,d=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.helperTextAsToolip=!1,this.falseAlias=null,this.trueAlias=null,this.invert=!1}static get properties(){return t(t({},super.properties),{},{helperTextAsToolip:{type:Boolean,attribute:"helper-text-as-tooltip"},falseAlias:{attribute:"false-alias"},trueAlias:{attribute:"true-alias"},invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return s(r||(r=d` <div class="flex items-start gap-s leading-xs text-m"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> ${0} <p class="text-xs text-error" style="max-width:32rem" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(a||(a=d`<p class="text-xs text-secondary" style="max-width:32rem"> ${0} </p>`),this.helperText),this.disabled||this.readonly,this._errorMessage,this.readonly?s(o||(o=d`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):s(h||(h=d` <div style="height:calc(1em * var(--lumo-line-height-xs))" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((1em * var(--lumo-line-height-xs)) - 3px + var(--lumo-space-m))" class="${0}" @click="${0}"> <div style="margin:1.5px;width:calc((1em * var(--lumo-line-height-xs)) - 6px);height:calc((1em * var(--lumo-line-height-xs)) - 6px)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),l({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),l({"transition-all transform block rounded-full":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})),this.helperTextAsToolip&&this.helperText?s(c||(c=d` <div class="transition-colors text-tertiary flex-shrink-0 cursor-pointer hover-text-body" id="trigger"> ${0} </div> <vcf-tooltip for="trigger" style="--lumo-base-color:black;max-width:30rem" class="mt-s" theme="light" position="bottom"> <span class="text-s" style="color:#fff">${0}</span> </vcf-tooltip> `),i(n||(n=d`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: calc(1em * var(--lumo-line-height-xs)); height: calc(1em * var(--lumo-line-height-xs)); margin-right: -0.12em"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),this.helperText):"")}get _value(){const e=super._value;return!(!this.trueAlias||e!==this.trueAlias)||(!this.falseAlias||e!==this.falseAlias)&&!!e}set _value(e){this.trueAlias&&!0===e?super._value=this.trueAlias:this.falseAlias&&!1===e?super._value=this.falseAlias:super._value=e}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-f9ac8763.js";import{h as e,G as t,P as r}from"./shared-21e68b72.js";import{E as o,T as i,D as s}from"./shared-315d7620.js";import{C as a}from"./shared-8ef0ca65.js";import"./shared-f989c70e.js";import{F as l}from"./shared-37348820.js";import{a as n}from"./shared-
|
|
1
|
+
import"./shared-f9ac8763.js";import{h as e,G as t,P as r}from"./shared-21e68b72.js";import{E as o,T as i,D as s}from"./shared-315d7620.js";import{C as a}from"./shared-8ef0ca65.js";import"./shared-f989c70e.js";import{F as l}from"./shared-37348820.js";import{a as n}from"./shared-109ec474.js";import"./shared-4d32d19e.js";import{_ as d}from"./shared-cb58dfcd.js";import{i as h}from"./shared-53e42a77.js";import{c,h as u}from"./shared-ba5c42c7.js";import{c as p}from"./shared-4e709717.js";import{x as b}from"./shared-11351c00.js";const m=e`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-6957b8e6.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-4d32d19e.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-6957b8e6.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-4d32d19e.js";import{a as e}from"./shared-109ec474.js";import{m as i,_ as t}from"./shared-cb58dfcd.js";import{N as r}from"./shared-f83207fb.js";import{i as s}from"./shared-53e42a77.js";import{c as n}from"./shared-4e709717.js";import{h as o,c as a}from"./shared-ba5c42c7.js";let l,d,h,c,u,f=e=>e;customElements.define("foxy-internal-async-resource-link-list-control",class extends e{constructor(){super(...arguments),this.foreignKeyForUri=null,this.foreignKeyForId=null,this.ownKeyForUri=null,this.optionsHref=null,this.linksHref=null,this.embedKey=null,this.ownUri=null,this.limit=20,this.item=null,this.__getItemRenderer=i(((e,i)=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer=""\n ${i?".data=${ctx.data}":"href=${ctx.href}"}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)),((...e)=>e.join())),this.__renderItem=e=>{var i;const t=this.__getItemRenderer(this.item,!!e.data),r=e=>o(l||(l=f` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)">${0}</div> `),e);if(!e.href||e.href.startsWith("foxy://"))return r(t(e));if(this.readonly)return r(t(e));const s=this.foreignKeyForUri,n=s?null===(i=this.__allLinks)||void 0===i?void 0:i.find((i=>i[s]===e.href)):void 0,a=this.disabled||!this.__allLinks||this.__isFetching;return r(o(d||(d=f` <vaadin-checkbox class="block" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="transition-opacity ${0}"> ${0} </div> </vaadin-checkbox> `),a,!!n,(i=>{var t,r,s;i.currentTarget.checked?this.__insertLink(null!==(r=null===(t=e.data)||void 0===t?void 0:t._links.self.href)&&void 0!==r?r:""):this.__deleteLink(null!==(s=null==n?void 0:n._links.self.href)&&void 0!==s?s:"")}),a?"opacity-50":"opacity-100",t(e)))},this.__isFetching=!1}static get properties(){return t(t({},super.properties),{},{foreignKeyForUri:{attribute:"foreign-key-for-uri"},foreignKeyForId:{attribute:"foreign-key-for-id"},ownKeyForUri:{attribute:"own-key-for-uri"},optionsHref:{attribute:"options-href"},linksHref:{attribute:"links-href"},embedKey:{attribute:"embed-key"},ownUri:{attribute:"own-uri"},limit:{type:Number},item:{},__isFetching:{attribute:!1}})}static get styles(){return[super.styles,a(h||(h=f`vaadin-checkbox::part(label){margin:0 0 0 calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);align-self:center}`))]}renderControl(){var e;let i;try{const t=new URL(null!==(e=this.optionsHref)&&void 0!==e?e:"");t.searchParams.set("limit",this.limit.toString()),i=t.toString()}catch(e){i=void 0}const t=this.__isFetching||!this.__allLinks;return o(c||(c=f` <div class="group"> <div class="mb-s" ?hidden="${0}"> <div class="flex justify-between font-medium text-l" ?hidden="${0}"> <span>${0}</span> <foxy-i18n class="transition-opacity ${0}" infer="" key="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page infer="card" class="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> ${0} </div> `),!this.label&&!this.helperText,!this.label,this.label,t?"opacity-100":"opacity-0",this.__isFetching?"status_saving":"status_loading",!this.helperText,this.helperText,s(i),n({"block transition-colors divide-y rounded overflow-hidden":!0,"bg-contrast-5 divide-contrast-10":!0}),this.__renderItem,!this._errorMessage||this.disabled||this.readonly,this._errorMessage,this.__renderLinkResourceLoaders())}updated(e){var i,t;super.updated(e),e.has("item")&&(null===(t=(i=this.__getItemRenderer.cache).clear)||void 0===t||t.call(i))}async __insertLink(e){var i,t,s,n,o,a;this.__isFetching=!0;const l=new r.API(this),d=await l.fetch(null!==(i=this.linksHref)&&void 0!==i?i:"",{method:"POST",body:JSON.stringify({[null!==(t=this.foreignKeyForUri)&&void 0!==t?t:""]:e,[null!==(s=this.ownKeyForUri)&&void 0!==s?s:""]:this.ownUri})});if(d.ok){const e=await d.json(),i=await l.fetch(e._links.self.href);if(i.ok){const t=r.Rumour(null!==(o=null===(n=this.nucleon)||void 0===n?void 0:n.group)&&void 0!==o?o:""),s=await i.json();t.share({related:[null!==(a=this.linksHref)&&void 0!==a?a:""],source:e._links.self.href,data:s})}}this.__isFetching=!1}async __deleteLink(e){var i,t,s;this.__isFetching=!0;const n=new r.API(this);if((await n.fetch(e,{method:"DELETE"})).ok){r.Rumour(null!==(t=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==t?t:"").share({related:[null!==(s=this.linksHref)&&void 0!==s?s:""],source:e,data:null})}this.__isFetching=!1}__renderLinkResourceLoaders(){var e,i,t;const r=200,s=this.renderRoot.querySelector("[data-link-page]"),n=Number(null!==(i=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.total_items)&&void 0!==i?i:r),a=[];try{for(let e=0;e<Math.max(1,Math.ceil(n/r));e++){const i=new URL(null!==(t=this.linksHref)&&void 0!==t?t:"");i.searchParams.set("offset",String(e*r)),i.searchParams.set("limit",String(r)),a.push(i.toString())}}catch(e){}return a.map((e=>o(u||(u=f` <foxy-nucleon class="hidden" data-link-page infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e,(()=>this.requestUpdate()))))}get __allLinks(){var e,i;const t=this.embedKey;if(!t)return null;const r=this.renderRoot.querySelectorAll("[data-link-page]"),s=[];for(const n of r){const r=null===(i=null===(e=n.data)||void 0===e?void 0:e._embedded)||void 0===i?void 0:i[t];if(!r)return null;s.push(...r)}return s}});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./shared-
|
|
1
|
+
import{a as e}from"./shared-109ec474.js";import{_ as r}from"./shared-cb58dfcd.js";import{c as t,h as s}from"./shared-ba5c42c7.js";import{r as a}from"./shared-5fd5805c.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 r(r({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,t(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 r,t,o;return this.disabled?(r="bg-contrast-5 text-disabled",o="text-disabled",this.readonly?(r+=" border-dashed border-contrast-20",t="border-dashed border-contrast-30"):(r+=" border-transparent",t="border-contrast-10")):this.readonly?(r="border-dashed border-contrast-30 bg-transparent text-secondary",t="border-dashed border-contrast-30",o="text-secondary",this.__focused&&(t+=" ring-2 ring-primary-50")):this.__focused?(r="border-transparent bg-contrast-10 text-tertiary",t="border-primary-50 ring-1 ring-primary-50",o="text-body"):this.__hovered?(r="border-transparent bg-contrast-20 text-tertiary",t="border-contrast-20",o="text-body"):(r="border-transparent bg-contrast-10 text-tertiary",t="border-contrast-10",o="text-body"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-s leading-s" ?hidden="${0}"> <div class="transition-colors text-l font-medium" part="label">${0}</div> <div class="transition-colors text-s text-secondary" part="helper-text"> ${0} </div> </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-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> </label> `),(()=>this.__hovered=!0),(()=>this.__hovered=!1),!this.label&&!this.helperText,this.label,this.helperText,t,r,a(null!==(e=this._value.split("\n"))&&void 0!==e?e:[],((e,r)=>String(r)),((e,r)=>s(d||(d=c`<div>${0}${0}<span>${0}<span></span></span></div>`),r<9?s(l||(l=c`<span class="opacity-0">0</span>`)):"",r<99?s(n||(n=c`<span class="opacity-0">0</span>`)):"",r+1))),this.placeholder,o,this._value,this.disabled,this.readonly,(()=>this.__focused=!0),(()=>{this.__focused=!1,this.__isErrorVisible=!0}),(e=>{const r=e.currentTarget;this._value=r.value}),!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"./shared-243456aa.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-243456aa.js";import{a as e}from"./shared-109ec474.js";import"./shared-4d32d19e.js";import{_ as t}from"./shared-cb58dfcd.js";import{i as s}from"./shared-53e42a77.js";import{h as i,s as a}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,o,d,h,n=e=>e;customElements.define("foxy-internal-select-control",class extends e{constructor(){super(...arguments),this.options=[],this.layout=null,this.theme=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{options:{type:Array},layout:{},theme:{type:String},__isErrorVisible:{attribute:!1}})}renderControl(){var e;return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(r||(r=n` <vaadin-combo-box item-value-path="value" item-label-path="label" error-message="${0}" item-id-path="value" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .items="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this.options.map((e=>({label:"label"in e?this.t(e.label):e.rawLabel,value:e.value}))),this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,t.validate()}))}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}updated(e){super.updated(e);const t=this.renderRoot.querySelector("vaadin-combo-box");t&&t.value!==this._value&&(t.value=this._value)}__renderSummaryItemLayout(){const e=this.options.find((e=>e.value===this._value));return i(o||(o=n` <div class="leading-xs"> <div class="flex items-center gap-s"> <label class="text-m text-body flex-1 whitespace-nowrap" for="select"> ${0} </label> <div class="${0}"> <div class="flex items-center gap-xs min-w-0"> <div class="truncate min-w-0"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @blur="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} </select> </div> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,l({"relative rounded-s transition-colors transition-opacity min-w-0":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),e?"label"in e?this.t(e.label):e.rawLabel:this.placeholder,this.readonly?"":a(d||(d=n`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),l({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),!e,this.placeholder,this.options.map((t=>i(h||(h=n` <option value="${0}" ?selected="${0}"> ${0} </option> `),t.value,e&&t.value===this._value,"label"in t?this.t(t.label):t.rawLabel))),this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-29f60d2f.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-29f60d2f.js";import{a as e}from"./shared-109ec474.js";import{x as t}from"./shared-11351c00.js";import{c as a,h as r}from"./shared-ba5c42c7.js";import{_ as o}from"./shared-cb58dfcd.js";import{s as i}from"./shared-79d0699c.js";import{p as l}from"./shared-43e2c3f6.js";import{i as s}from"./shared-53e42a77.js";let n;function m(e){return new Array(7).fill(new Date).map(((t,a)=>{for(;t.getDay()!==a;)t.setDate(t.getDate()+1);return t.toLocaleDateString(e,{weekday:"short"})}))}function h(e){return new Array(7).fill(new Date).map(((t,a)=>{for(;t.getDay()!==a;)t.setDate(t.getDate()+1);return t.toLocaleDateString(e,{weekday:"long"})}))}t("vaadin-date-picker-text-field",a(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 1fr;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}:host([theme~=summary-item]) [part=clear-button]{transform:scale(1.5)}:host([has-value]) slot[name=suffix]{display:none}`)));let u,d=e=>e;customElements.define("foxy-internal-date-control",class extends e{constructor(){super(...arguments),this.format=null,this.layout=null}static get properties(){return o(o({},super.properties),{},{format:{},layout:{}})}renderControl(){var e,t,a;let o;return o="0000-00-00"!==this._value&&this._value?"unix"===this.format?i(new Date(1e3*(null!==(e=this._value)&&void 0!==e?e:0))):"iso-long"===this.format?i(new Date(this._value)):(null!==(t=this._value)&&void 0!==t?t:"").substring(0,10):"",r(u||(u=d` <vaadin-date-picker error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" .i18n="${0}" clear-button-visible @keydown="${0}" @change="${0}"> </vaadin-date-picker> `),s(this._errorMessage),this.placeholder,this.helperText,this.label,null!==(a=this.layout)&&void 0!==a?a:"standalone",this.disabled,this.readonly,this._checkValidity,o,this.__pickerI18n,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{var t,a,r,o;const i=e.currentTarget;"unix"===this.format?this._value=Math.floor((null!==(a=null===(t=l(i.value))||void 0===t?void 0:t.getTime())&&void 0!==a?a:0)/1e3):"iso-long"===this.format?this._value=null!==(o=null===(r=l(i.value))||void 0===r?void 0:r.toISOString())&&void 0!==o?o:null:this._value=i.value}))}get __pickerI18n(){return{monthNames:(e=this.lang||"en",new Array(12).fill(new Date).map(((t,a)=>(t.setMonth(a),t.toLocaleDateString(e,{month:"long"}))))),weekdays:h(this.lang||"en"),weekdaysShort:m(this.lang||"en"),firstDayOfWeek:0,week:this.t("week"),calendar:this.t("calendar"),clear:this.t("clear"),today:this.t("today"),cancel:this.t("cancel"),referenceDate:"",parseDate:null,formatTitle:(e,t)=>e+" "+t,formatDate:e=>this.t("display_value",{value:new Date(e.year,e.month,e.day)})};var e}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-8ef0ca65.js";import{b as r}from"./shared-
|
|
1
|
+
import"./shared-8ef0ca65.js";import{b as r}from"./shared-109ec474.js";import"./foxy-form-dialog.js";import"./shared-4d32d19e.js";import{_ as e}from"./shared-cb58dfcd.js";import{i as t}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.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 +1 @@
|
|
|
1
|
-
import"./shared-a6b2bd14.js";import"./shared-
|
|
1
|
+
import"./shared-a6b2bd14.js";import"./shared-47d95cdd.js";import"./shared-888018de.js";import"./shared-9a64bf35.js";import{b as e,I as t}from"./shared-109ec474.js";import"./shared-4d32d19e.js";import{i as s}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import{c as r,_ as n,B as i}from"./shared-cb58dfcd.js";import{S as a,a as l}from"./shared-11351c00.js";import{v as d}from"./shared-b738ee96.js";import{c}from"./shared-4e709717.js";let h,p=e=>e;customElements.define("foxy-internal-customer-form-legal-notice-control",class extends e{renderControl(){var e,t;const r=this.nucleon;return o(h||(h=p` <p class="leading-s text-xs text-secondary"> <foxy-i18n infer="" key="text"></foxy-i18n> <a class="font-medium text-body rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" target="_blank" href="${0}" rel="noopener noreferrer"> <foxy-i18n infer="" key="link"></foxy-i18n> </a> </p> `),s(null===(t=null===(e=null==r?void 0:r.settings)||void 0===e?void 0:e.tos_checkbox_settings)||void 0===t?void 0:t.url))}});var u=r((function(e){!function(){const t=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}],s=(e,s=t,o="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let r=e||"";s[0].minDiversity=0,s[0].minLength=0;const n=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];o&&n.push({regex:`[${o}]`,message:"symbol"});let i={};i.contains=n.filter((e=>new RegExp(`${e.regex}`).test(r))).map((e=>e.message)),i.length=r.length;let a=s.filter((e=>i.contains.length>=e.minDiversity)).filter((e=>i.length>=e.minLength)).sort(((e,t)=>t.id-e.id)).map((e=>({id:e.id,value:e.value})));return Object.assign(i,a[0]),i};e.exports={passwordStrength:s,defaultOptions:t}}()}));let m,f,_=e=>e;const g=a(l(t,"customer-form")),x=u.passwordStrength;class v extends g{constructor(){super(...arguments),this.passwordless=!1,this.settings=null,this.__passwordGeneratorOptions={checkStrength:e=>x(e).id>=2},this.__isAnonymousGetValue=()=>{var e;return!1===(null===(e=this.form)||void 0===e?void 0:e.is_anonymous)?"false":"true"},this.__isAnonymousSetValue=e=>{const t="true"===e;this.edit({is_anonymous:t}),t&&this.form.password&&this.edit({password:""}),t&&this.form.password_old&&this.edit({password_old:""}),t&&this.form.forgot_password&&this.edit({forgot_password:""})},this.__isAnonymousOptions=[{value:"true",label:"option_true"},{value:"false",label:"option_false"}],this.__refreshInterval=null}static get scopedElements(){return{"foxy-internal-customer-form-legal-notice-control":customElements.get("foxy-internal-customer-form-legal-notice-control"),"foxy-internal-radio-group-control":customElements.get("foxy-internal-radio-group-control"),"foxy-internal-timestamps-control":customElements.get("foxy-internal-timestamps-control"),"foxy-internal-password-control":customElements.get("foxy-internal-password-control"),"foxy-internal-submit-control":customElements.get("foxy-internal-submit-control"),"foxy-internal-delete-control":customElements.get("foxy-internal-delete-control"),"foxy-internal-text-control":customElements.get("foxy-internal-text-control"),"foxy-internal-undo-control":customElements.get("foxy-internal-undo-control"),"foxy-copy-to-clipboard":customElements.get("foxy-copy-to-clipboard"),"foxy-spinner":customElements.get("foxy-spinner"),"vcf-tooltip":customElements.get("vcf-tooltip"),"foxy-i18n":customElements.get("foxy-i18n"),"h-captcha":customElements.get("h-captcha"),"vaadin-button":customElements.get("vaadin-button")}}static get properties(){return n(n({},super.properties),{},{passwordless:{type:Boolean},settings:{type:Object}})}static get v8n(){return[({password:e,_links:t,is_anonymous:s=!0},o)=>!!o.passwordless||(!!(t||s||e)||"password:v8n_required"),({password_old:e,password:t,_links:s},o)=>{var r;return!s||(void 0===(null===(r=o.settings)||void 0===r?void 0:r.sign_up)||(!(t&&!e)||"password-old:v8n_required"))},({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({password:e})=>!e||x(e).id>=2||"password:v8n_too_weak",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({tax_id:e})=>!e||e.length<=50||"tax-id: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||d(e)||"email:v8n_invalid_email"]}get hiddenSelector(){const e=new Set(super.hiddenSelector.toString().split(" "));return this.settings?(e.add("forgot-password"),e.add("is-anonymous"),this.form.password||e.add("password-old"),"none"===this.settings.tos_checkbox_settings.usage&&e.add("legal-notice")):(!1!==this.form.is_anonymous&&(e.add("forgot-password"),e.add("password")),e.add("password-old"),e.add("legal-notice")),this.href&&(e.add("is-anonymous"),e.add("legal-notice")),new i(Array.from(e).join(" ").trim())}get headerTitleOptions(){var e,t;const s=this.data;return!s||(null===(e=s.first_name)||void 0===e?void 0:e.trim())||(null===(t=s.last_name)||void 0===t?void 0:t.trim())?super.headerTitleOptions:n(n({},super.headerTitleOptions),{},{context:"no_name"})}get headerSubtitleKey(){var e;return(null===(e=this.data)||void 0===e?void 0:e.is_anonymous)?"subtitle_anonymous":"subtitle_registered"}get headerSubtitleOptions(){return n(n({},super.headerSubtitleOptions),{},{id:this.headerCopyIdValue})}disconnectedCallback(){super.disconnectedCallback();const e=this.__refreshInterval;e&&clearInterval(e)}connectedCallback(){super.connectedCallback();const e=setInterval((()=>this.requestUpdate()),6e4);this.__refreshInterval=e}renderBody(){var e,t,s,r;const n=this.hiddenSelector.matches("first-name",!0),i=this.hiddenSelector.matches("last-name",!0);return o(m||(m=_` ${0} <div class="${0}"> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> </div> <foxy-internal-text-control helper-text="${0}" infer="email"> </foxy-internal-text-control> <foxy-internal-radio-group-control infer="is-anonymous" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-password-control placeholder="${0}" helper-text="${0}" infer="password" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <foxy-internal-password-control infer="password-old"></foxy-internal-password-control> <foxy-internal-password-control helper-text="${0}" infer="forgot-password" show-generator> </foxy-internal-password-control> <foxy-internal-text-control infer="tax-id"></foxy-internal-text-control> <foxy-internal-customer-form-legal-notice-control infer="legal-notice"> </foxy-internal-customer-form-legal-notice-control> ${0} ${0} `),this.renderHeader(),c({"grid-cols-2":!n&&!i,hidden:n&&i,"gap-m":!0,grid:!n||!i}),this.__emailHelperText,this.__isAnonymousGetValue,this.__isAnonymousSetValue,this.__isAnonymousOptions,this.__passwordPlaceholder,this.__passwordHelperText,this.__passwordGeneratorOptions,this.__forgotPasswordHelperText,!this.data&&(null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled)&&"hcaptcha"===(null===(r=null===(s=this.settings)||void 0===s?void 0:s.sign_up)||void 0===r?void 0:r.verification.type)?o(f||(f=_` <h-captcha site-key="${0}" class="hidden" size="invisible" hl="${0}" @verified="${0}"> </h-captcha> `),this.settings.sign_up.verification.site_key,this.lang,(({token:e})=>{this.edit({verification:{type:"hcaptcha",token:e}}),super.submit()})):"",super.renderBody())}submit(){var e,t,s,o,r;"hcaptcha"!==(null===(s=null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.verification)||void 0===s?void 0:s.type)||this.data?super.submit():(null===(o=this.__hcaptcha)||void 0===o||o.reset(),null===(r=this.__hcaptcha)||void 0===r||r.execute())}async _sendPatch(e){const t=await super._sendPatch(e);if(e.password){const e={key:"password_change_success",options:{email:t.email}};this.status=e}return t}async _sendGet(){return this.status=null,await super._sendGet()}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"Conflict"===t||t.startsWith("This email address is already in use")?["error:email_already_used"]:t.startsWith("Customer registration is disabled")?["error:registration_disabled"]:t.startsWith("Client verification failed")?["error:verification_failed"]:t.startsWith("Provided password is incorrect")?["error:old_password_incorrect"]:e}}get __forgotPasswordHelperText(){var e,t;const s=null===(e=this.data)||void 0===e?void 0:e.forgot_password_timestamp,o="forgot-password.helper_text";if((null===(t=this.data)||void 0===t?void 0:t.forgot_password)&&s){const e=new Date(new Date(s).getTime()+18e5),t=Math.floor((e.getTime()-Date.now())/1e3/60);return t<=0?this.t(`${o}_expired_on`,{expiresOn:e}):this.t(`${o}_expires_in`,{expiresInMin:`${t}minutes`})}return this.t(o)}get __passwordPlaceholder(){return this.data?this.t("password.placeholder_new"):this.t("password.placeholder")}get __passwordHelperText(){return this.data?this.t("password.helper_text_new"):this.t("password.helper_text")}get __emailHelperText(){var e;return(null===(e=this.data)||void 0===e?void 0:e.last_login_date)?this.t("email.helper_text_last_login_date",{date:this.data.last_login_date}):this.t("email.helper_text")}get __hcaptcha(){return this.renderRoot.querySelector("h-captcha")}}customElements.define("foxy-customer-form",v);export{v as C,u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-f9ac8763.js";import{h as t,P as e}from"./shared-21e68b72.js";import{F as i,t as o}from"./shared-37348820.js";import{T as n,a,E as s}from"./shared-315d7620.js";import"./shared-6957b8e6.js";import{O as r}from"./shared-3556f4b7.js";import"./shared-8ef0ca65.js";import"./shared-
|
|
1
|
+
import"./shared-f9ac8763.js";import{h as t,P as e}from"./shared-21e68b72.js";import{F as i,t as o}from"./shared-37348820.js";import{T as n,a,E as s}from"./shared-315d7620.js";import"./shared-6957b8e6.js";import{O as r}from"./shared-3556f4b7.js";import"./shared-8ef0ca65.js";import"./shared-e41fced3.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-4d32d19e.js";import{a as l}from"./shared-109ec474.js";import"./shared-1100bca8.js";import{x as d}from"./shared-11351c00.js";import{c,h,r as u}from"./shared-ba5c42c7.js";import{_ as m}from"./shared-cb58dfcd.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-b65d169b.js";import"./shared-edeeb089.js";import"./shared-83c5e004.js";import"./shared-6683daed.js";import"./shared-243456aa.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-b65d169b.js";import"./shared-edeeb089.js";import"./shared-83c5e004.js";import"./shared-6683daed.js";import"./shared-243456aa.js";import{a as e}from"./shared-109ec474.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as i,h as a,s}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget;this._value=this.__i18n.formatValue([t.value,r])}),o({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))),this.helperText,this.disabled||this.readonly,this._errorMessage)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-8ef0ca65.js";import"./shared-
|
|
1
|
+
import"./shared-8ef0ca65.js";import"./shared-7097e2e1.js";import{I as e,a as t}from"./shared-109ec474.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-form-dialog.js";import"./shared-4d32d19e.js";import{_ as s,m as i}from"./shared-cb58dfcd.js";import{h as r,s as o}from"./shared-ba5c42c7.js";import{s as l}from"./shared-53e476fd.js";import{g as a}from"./shared-bab2ea2c.js";import{F as n}from"./shared-343d1fd7.js";import{i as d}from"./shared-53e42a77.js";import{c as h}from"./shared-4e709717.js";import{u}from"./shared-f83207fb.js";let c,f=e=>e;let p,y,m,v,x,b,g,$,_=e=>e;customElements.define("foxy-internal-resource-picker-control-form",class extends e{constructor(){super(...arguments),this.selectionProps={}}static get properties(){return s(s({},super.properties),{},{selectionProps:{attribute:!1}})}renderBody(){return r(c||(c=f` <foxy-internal-async-list-control infer="selection" form="foxy-null" hide-delete-button hide-create-button @itemclick="${0}" ...="${0}"> </foxy-internal-async-list-control> `),(e=>{e.preventDefault(),this.edit({selection:e.detail}),this.submit()}),l(this.selectionProps))}}),customElements.define("foxy-internal-resource-picker-control",class extends t{constructor(){super(...arguments),this.getDisplayValueOptions=e=>({resource:e}),this.showCopyIdButton=!1,this.virtualHost=u("internal-resource-picker-control-"),this.getItemUrl=null,this.formProps={},this.filters=[],this.layout=null,this.first=null,this.item=null,this.form=null,this.__getItemRenderer=i((e=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer="card"\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)))}static get properties(){return s(s({},super.properties),{},{getDisplayValueOptions:{attribute:!1},showCopyIdButton:{type:Boolean,attribute:"show-copy-id-button"},virtualHost:{},getItemUrl:{attribute:!1},formProps:{type:Object},filters:{type:Array},layout:{},first:{},item:{},form:{}})}renderControl(){var e;const t=s(s({},this.formProps),{},{".selectionProps":{".filters":this.filters,".first":this.first,".item":this.item}});return r(p||(p=_` <foxy-form-dialog parent="foxy://${0}/select" header="header" infer="dialog" alert .props="${0}" .form="${0}" @fetch="${0}"> </foxy-form-dialog> ${0} `),this.virtualHost,t,null!==(e=this.form)&&void 0!==e?e:"foxy-internal-resource-picker-control-form",this.__handleFetchEvent,"summary-item"===this.layout?this.__renderSummaryItemLayout():this.__renderStandaloneLayout())}updated(e){var t,s;super.updated(e),e.has("item")&&(null===(s=(t=this.__getItemRenderer.cache).clear)||void 0===s||s.call(t))}__clear(){this._value="",this.dispatchEvent(new CustomEvent("clear"))}__renderSummaryItemLayout(){const e=this.renderRoot.querySelector("#value");return r(y||(y=_` <div class="leading-xs"> <div class="flex items-center gap-xs"> <div class="text-m text-body whitespace-nowrap flex-1">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div class="truncate min-w-0"> ${0} </div> </button> <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> <div style="max-width:32rem"> <div class="text-xs text-secondary">${0}</div> <div class="text-xs text-error" ?hidden="${0}"> ${0} </div> </div> </div> <foxy-nucleon infer="" href="${0}" id="value" @update="${0}"> </foxy-nucleon> `),this.label,this.t("select"),h({"text-right min-w-0 transition-colors transition-opacity":!0,"rounded-s focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"cursor-pointer text-body hover-opacity-80":!this.disabled&&!this.readonly,"font-medium":!this.readonly}),this.disabled||this.readonly,(e=>{if(this.disabled||this.readonly)return;const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),this._value?r(m||(m=_` <foxy-i18n infer="" key="value" .options="${0}"> </foxy-i18n> `),(null==e?void 0:e.data)?this.getDisplayValueOptions(e.data):{context:(null==e?void 0:e.in("fail"))?"fail":"busy"}):this.placeholder,this.t("clear"),h({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,this.__clear,o(v||(v=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)),this.helperText,this.disabled||this.readonly,this._errorMessage,d(this._value||void 0),(()=>this.requestUpdate()))}__renderStandaloneLayout(){var e,t,s,i,o;const n=this.__valueLoader,u="string"==typeof this._value?a(this._value):void 0,c="string"==typeof this._value?null===(e=this.getItemUrl)||void 0===e?void 0:e.call(this,this._value,null!==(t=null==n?void 0:n.data)&&void 0!==t?t:null):void 0;return r(x||(x=_` <div class="block group"> <div class="${0}"> <span class="mr-auto text-l">${0}</span> ${0} ${0} ${0} </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> <button class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?disabled="${0}" @click="${0}"> <div class="${0}"> <foxy-nucleon class="block" infer="" href="${0}" id="valueLoader" @update="${0}"> ${0} </foxy-nucleon> </div> </button> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </div> `),h({"flex items-center gap-s transition-colors font-medium":!0,"text-disabled":this.disabled}),this.label,c?r(b||(b=_` <a class="text-body rounded transition-opacity hover-opacity-90 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="view"></foxy-i18n> </a> `),c):"",this.showCopyIdButton&&null!==u?r(g||(g=_` <foxy-copy-to-clipboard layout="text" theme="contrast tertiary-inline" infer="copy-id" text="${0}"> </foxy-copy-to-clipboard> `),u):"",this.readonly||!this._value?"":r($||($=_` <vaadin-button theme="error tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="clear"></foxy-i18n> </vaadin-button> `),this.disabled,this.__clear),!this.helperText,this.helperText,h({"block w-full bg-contrast-5 rounded text-left transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer hover-bg-contrast-10":!this.disabled&&!this.readonly,"cursor-default":this.disabled||this.readonly,"mt-s":!!this.label||!!this.helperText}),this.disabled||this.readonly,(e=>{const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),h({"transition-opacity":!0,"opacity-50":this.disabled}),d(this._value||void 0),(()=>this.requestUpdate()),this.__getItemRenderer(this.item)({html:r,data:null!==(s=null==n?void 0:n.data)&&void 0!==s?s:null,href:this._value||"",related:[],parent:"",props:{},spread:l,simplifyNsLoading:this.simplifyNsLoading,disabled:this.disabled,disabledControls:this.disabledControls,readonly:this.readonly,readonlyControls:this.readonlyControls,hidden:this.hidden,hiddenControls:this.hiddenControls,templates:this.templates,previous:null,next:null,group:null!==(o=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==o?o:"",lang:this.lang,ns:this.ns}),!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}__handleFetchEvent(e){if(!(e instanceof n))return;if(e.defaultPrevented)return;const{url:t,method:s}=e.request;return t===`foxy://${this.virtualHost}/select`&&"POST"===s?e.respondWith(this.__handleSelect(e.request)):t===`foxy://${this.virtualHost}/empty`&&"GET"===s?e.respondWith(this.__handleEmpty()):void 0}async __handleSelect(e){const t=await e.clone().json();return this._value=t.selection,new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}async __handleEmpty(){return new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}get __valueLoader(){return this.renderRoot.querySelector("#valueLoader")}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-495860b4.js";import"./shared-edeeb089.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-495860b4.js";import"./shared-edeeb089.js";import{a as e}from"./shared-109ec474.js";import{i as a}from"./shared-53e42a77.js";import{h as r}from"./shared-ba5c42c7.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-b65d169b.js";import"./shared-edeeb089.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-b65d169b.js";import"./shared-edeeb089.js";import{a as e}from"./shared-109ec474.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as i,h as s,s as r}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as a}from"./shared-4e709717.js";let n,o,d,u,h,p,m,c,v=e=>e;customElements.define("foxy-internal-number-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.step=null,this.min=null,this.max=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},step:{type:Number},min:{type:Number},max:{type:Number},__isErrorVisible:{attribute:!1}})}static get styles(){return[...super.styles,i(n||(n=v`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){var e,t,i;return"summary-item"===this.layout?this.__renderSummaryItemLayout():s(o||(o=v` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" step="${0}" min="${0}" max="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-number-field> `),l(this._errorMessage),this.placeholder,this.helperText,this.label,l(null!==(e=this.step)&&void 0!==e?e:void 0),l(null!==(t=this.min)&&void 0!==t?t:void 0),l(null!==(i=this.max)&&void 0!==i?i: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=parseFloat(t.value)}),this.prefix?s(d||(d=v`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?s(u||(u=v`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}__renderSummaryItemLayout(){var e,t,i;return s(h||(h=v` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> ${0} <input placeholder="${0}" style="min-width:10ch" class="${0}" type="number" step="${0}" min="${0}" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,this.prefix?s(p||(p=v`<div>${0}</div>`),this.prefix):"",this.placeholder,a({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(e=this.step)&&void 0!==e?e:void 0),l(null!==(t=this.min)&&void 0!==t?t:void 0),l(null!==(i=this.max)&&void 0!==i?i:void 0),0===this._value?"":this._value,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation();const t=parseFloat(e.target.value);this._value=isNaN(t)?0:t}),this.suffix?s(m||(m=v`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.t("clear"),a({"flex-shrink-0 rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value=0,this.dispatchEvent(new CustomEvent("clear"))}),r(c||(c=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)),this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-8b25a098.js";import"./shared-edeeb089.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-8b25a098.js";import"./shared-edeeb089.js";import{a as e}from"./shared-109ec474.js";import{x as t}from"./shared-11351c00.js";import{c as r,h as a,s as o}from"./shared-ba5c42c7.js";import{_ as l}from"./shared-cb58dfcd.js";import{i as s}from"./shared-53e42a77.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"./shared-edeeb089.js";import{a as e}from"./shared-
|
|
1
|
+
import"./shared-edeeb089.js";import{a as e}from"./shared-109ec474.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as s,h as i,s as r}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as a}from"./shared-4e709717.js";import{l as o}from"./shared-d0aed1c1.js";let d,n,u,h,p,c,f,m,v=e=>e;customElements.define("foxy-internal-text-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},__isErrorVisible:{attribute:!1}})}static get styles(){return[super.styles,s(d||(d=v`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(n||(n=v` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),l(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,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.prefix?i(u||(u=v`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?i(h||(h=v`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderSummaryItemLayout(){return i(p||(p=v` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> ${0} <input placeholder="${0}" class="${0}" type="text" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,this.prefix?i(c||(c=v`<div>${0}</div>`),this.prefix):"",this.placeholder,a({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),o(this._value),this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),this.suffix?i(f||(f=v`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.t("clear"),a({"flex-shrink-0 rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value="",this.dispatchEvent(new CustomEvent("clear"))}),r(m||(m=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)),this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage)}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./shared-
|
|
1
|
+
import{a as e}from"./shared-109ec474.js";import"./shared-4d32d19e.js";import{_ as t}from"./shared-cb58dfcd.js";import{d as s,N as r,i as o,c as a,h as i,s as n}from"./shared-ba5c42c7.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -93,6 +93,22 @@
|
|
|
93
93
|
"helper_text": "Missing payments increase this amount. Depending on your store settings, we may charge it automatically on the next billing cycle.",
|
|
94
94
|
"placeholder": "0",
|
|
95
95
|
"clear": "Clear"
|
|
96
|
+
},
|
|
97
|
+
"charge-past-due": {
|
|
98
|
+
"button": {
|
|
99
|
+
"idle": "Charge past due amount",
|
|
100
|
+
"busy": "Processing..."
|
|
101
|
+
},
|
|
102
|
+
"notification": {
|
|
103
|
+
"success": "Past due amount successfully charged.",
|
|
104
|
+
"error": "Failed to charge past due amount."
|
|
105
|
+
},
|
|
106
|
+
"confirm-dialog": {
|
|
107
|
+
"message": "This will attempt to charge the past due amount of {{ amount, price }}. Would you like to proceed?",
|
|
108
|
+
"confirm": "Yes",
|
|
109
|
+
"cancel": "No",
|
|
110
|
+
"header": "Past due payment"
|
|
111
|
+
}
|
|
96
112
|
}
|
|
97
113
|
},
|
|
98
114
|
"self-service-links": {
|
|
@@ -171,6 +171,11 @@
|
|
|
171
171
|
"description": "Description",
|
|
172
172
|
"url_parameter": "URL parameter"
|
|
173
173
|
},
|
|
174
|
+
"coupon-codes-stub": {
|
|
175
|
+
"label": "Codes",
|
|
176
|
+
"helper_text": "",
|
|
177
|
+
"text": "Coupon codes can be added after creating the coupon."
|
|
178
|
+
},
|
|
174
179
|
"coupon-codes": {
|
|
175
180
|
"label": "Codes",
|
|
176
181
|
"delete_header": "Remove code?",
|
|
@@ -349,6 +354,11 @@
|
|
|
349
354
|
"value": "Value"
|
|
350
355
|
}
|
|
351
356
|
},
|
|
357
|
+
"attributes-stub": {
|
|
358
|
+
"label": "Attributes",
|
|
359
|
+
"helper_text": "",
|
|
360
|
+
"text": "Attributes can be added after creating the coupon."
|
|
361
|
+
},
|
|
352
362
|
"attributes": {
|
|
353
363
|
"label": "Attributes",
|
|
354
364
|
"delete_header": "Remove attribute?",
|
|
@@ -546,6 +556,11 @@
|
|
|
546
556
|
"option_name": "Option name",
|
|
547
557
|
"rule": "Rule"
|
|
548
558
|
},
|
|
559
|
+
"category-restrictions-stub": {
|
|
560
|
+
"label": "Item category restrictions",
|
|
561
|
+
"helper_text": "",
|
|
562
|
+
"text": "Item category restrictions can be added after creating the coupon."
|
|
563
|
+
},
|
|
549
564
|
"category-restrictions": {
|
|
550
565
|
"label": "Item category restrictions",
|
|
551
566
|
"status_saving": "Saving...",
|