@foxy.io/elements 1.38.0-beta.4 → 1.38.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/cdn/foxy-address-form.js +1 -1
  2. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  3. package/dist/cdn/foxy-api-browser.js +1 -1
  4. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  5. package/dist/cdn/foxy-attribute-form.js +1 -1
  6. package/dist/cdn/foxy-cart-form.js +1 -1
  7. package/dist/cdn/foxy-client-form.js +1 -1
  8. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  9. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  10. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  11. package/dist/cdn/foxy-coupon-form.js +1 -1
  12. package/dist/cdn/foxy-custom-field-form.js +1 -1
  13. package/dist/cdn/foxy-customer-form.js +1 -1
  14. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  15. package/dist/cdn/foxy-customer-portal.js +1 -1
  16. package/dist/cdn/foxy-customer.js +1 -1
  17. package/dist/cdn/foxy-downloadable-form.js +1 -1
  18. package/dist/cdn/foxy-email-template-form.js +1 -1
  19. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  20. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  21. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  22. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  23. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  24. package/dist/cdn/foxy-gift-card-form.js +1 -1
  25. package/dist/cdn/foxy-integration-form.js +1 -1
  26. package/dist/cdn/foxy-item-category-form.js +1 -1
  27. package/dist/cdn/foxy-item-form.js +1 -1
  28. package/dist/cdn/foxy-item-option-form.js +1 -1
  29. package/dist/cdn/foxy-native-integration-form.js +1 -1
  30. package/dist/cdn/foxy-passkey-form.js +1 -1
  31. package/dist/cdn/foxy-payment-method-card.js +1 -1
  32. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  33. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  34. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  35. package/dist/cdn/foxy-store-form.js +1 -1
  36. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  37. package/dist/cdn/foxy-subscription-form.js +1 -1
  38. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  39. package/dist/cdn/foxy-tax-form.js +1 -1
  40. package/dist/cdn/foxy-template-config-form.js +1 -1
  41. package/dist/cdn/foxy-template-form.js +1 -1
  42. package/dist/cdn/foxy-template-set-form.js +1 -1
  43. package/dist/cdn/foxy-transaction.js +1 -1
  44. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  45. package/dist/cdn/foxy-user-form.js +1 -1
  46. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  47. package/dist/cdn/foxy-users-table.js +1 -1
  48. package/dist/cdn/foxy-webhook-form.js +1 -1
  49. package/dist/cdn/{shared-96998138.js → shared-03b25d59.js} +1 -1
  50. package/dist/cdn/{shared-e5e98873.js → shared-1c6723c7.js} +1 -1
  51. package/dist/cdn/{shared-52943926.js → shared-365b4602.js} +1 -1
  52. package/dist/cdn/{shared-69b4b6a7.js → shared-4db22700.js} +1 -1
  53. package/dist/cdn/{shared-75cf59dc.js → shared-59ca3734.js} +1 -1
  54. package/dist/cdn/{shared-16aa673a.js → shared-640d6140.js} +1 -1
  55. package/dist/cdn/{shared-a6776a1d.js → shared-67d0a27e.js} +1 -1
  56. package/dist/cdn/{shared-e9682623.js → shared-892616e5.js} +1 -1
  57. package/dist/cdn/{shared-fb0c426a.js → shared-8c2a270c.js} +1 -1
  58. package/dist/cdn/{shared-ce12007b.js → shared-8e0c7d8f.js} +1 -1
  59. package/dist/cdn/{shared-4854f37a.js → shared-9ea2ef1c.js} +1 -1
  60. package/dist/cdn/{shared-559ce27e.js → shared-a5f44051.js} +1 -1
  61. package/dist/cdn/{shared-f6c479b8.js → shared-b2a7c506.js} +1 -1
  62. package/dist/cdn/{shared-d40308b2.js → shared-c99d6523.js} +1 -1
  63. package/dist/cdn/{shared-7cac2ea3.js → shared-da58e9ca.js} +1 -1
  64. package/dist/cdn/{shared-cfce3012.js → shared-e958e667.js} +1 -1
  65. package/dist/cdn/{shared-196b992c.js → shared-fa06b3b3.js} +1 -1
  66. package/dist/cdn/{shared-b0c5a062.js → shared-fb648cd7.js} +1 -1
  67. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js +5 -13
  68. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js.map +1 -1
  69. package/dist/elements/public/CopyToClipboard/CopyToClipboard.d.ts +1 -1
  70. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js +13 -4
  71. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js.map +1 -1
  72. package/dist/elements/public/StoreForm/StoreForm.js +7 -9
  73. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  74. package/package.json +1 -1
  75. /package/dist/cdn/{shared-377dea9e.js → shared-fef09d02.js} +0 -0
@@ -1 +1 @@
1
- import"./shared-bd2ebe88.js";import"./shared-2fe8f409.js";import{a as e}from"./shared-377dea9e.js";import{x as t}from"./shared-3e7f5663.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
+ import"./shared-bd2ebe88.js";import"./shared-2fe8f409.js";import{a as e}from"./shared-fef09d02.js";import{x as t}from"./shared-3e7f5663.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-3f0b1660.js";import{b as r}from"./shared-377dea9e.js";import"./foxy-form-dialog.js";import"./shared-94756d7c.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
+ import"./shared-3f0b1660.js";import{b as r}from"./shared-fef09d02.js";import"./foxy-form-dialog.js";import"./shared-94756d7c.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-b0c5a062.js";import"./shared-ce12007b.js";import"./shared-d40308b2.js";import{b as e,I as t}from"./shared-377dea9e.js";import"./shared-94756d7c.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-3e7f5663.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
+ import"./shared-a6b2bd14.js";import"./shared-fb648cd7.js";import"./shared-8e0c7d8f.js";import"./shared-c99d6523.js";import{b as e,I as t}from"./shared-fef09d02.js";import"./shared-94756d7c.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-3e7f5663.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 +1 @@
1
- import"./shared-ba38add2.js";import{a as e}from"./shared-377dea9e.js";import"./shared-94756d7c.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" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(a||(a=d`<p class="text-xs text-secondary">${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
+ import"./shared-ba38add2.js";import{a as e}from"./shared-fef09d02.js";import"./shared-94756d7c.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" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(a||(a=d`<p class="text-xs text-secondary">${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 +1 @@
1
- import"./shared-2fe8f409.js";import{a as e}from"./shared-377dea9e.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="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs" style="min-width:30%"> ${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> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,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({"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>`)))}});
1
+ import"./shared-2fe8f409.js";import{a as e}from"./shared-fef09d02.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="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs" style="min-width:30%"> ${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> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,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({"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>`)))}});
@@ -1,4 +1,4 @@
1
- import"./shared-8154088a.js";import{h as t,P as e}from"./shared-5c747b54.js";import{F as i,t as o}from"./shared-cfb804b4.js";import{T as n,a,E as s}from"./shared-8219cdf0.js";import"./shared-cc8237eb.js";import{O as r}from"./shared-058c340a.js";import"./shared-3f0b1660.js";import"./shared-cfce3012.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-94756d7c.js";import{a as l}from"./shared-377dea9e.js";import"./shared-5b1511bc.js";import{x as d}from"./shared-3e7f5663.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">
1
+ import"./shared-8154088a.js";import{h as t,P as e}from"./shared-5c747b54.js";import{F as i,t as o}from"./shared-cfb804b4.js";import{T as n,a,E as s}from"./shared-8219cdf0.js";import"./shared-cc8237eb.js";import{O as r}from"./shared-058c340a.js";import"./shared-3f0b1660.js";import"./shared-e958e667.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-94756d7c.js";import{a as l}from"./shared-fef09d02.js";import"./shared-5b1511bc.js";import{x as d}from"./shared-3e7f5663.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{a as e}from"./shared-377dea9e.js";import"./shared-94756d7c.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as s,h as r,s as o}from"./shared-ba5c42c7.js";let l,i,a,d,n=e=>e;customElements.define("foxy-internal-summary-control",class extends e{constructor(){super(...arguments),this.layout=null,this.count=null,this.open=!1}static get properties(){return t(t({},super.properties),{},{layout:{},count:{type:Number},open:{type:Boolean}})}static get styles(){return[...super.styles,s(l||(l=n`::slotted(*){min-width:100%}:host(:not([layout=section])) slot::slotted(*){background-color:var(--lumo-contrast-5pct);padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)}details summary>div{border-radius:var(--lumo-border-radius)}details[open] summary>div{border-radius:var(--lumo-border-radius) var(--lumo-border-radius) 0 0}`))]}renderLightDom(){}renderControl(){return"details"===this.layout?r(i||(i=n` <details class="rounded overflow-hidden" ?open="${0}" @toggle="${0}"> <summary class="select-none cursor-pointer focus-outline-none group"> <div class="leading-s bg-contrast-5 group-focus-ring-2 group-focus-ring-inset group-focus-ring-primary-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?hidden="${0}"> <p class="font-medium uppercase text-s tracking-wider flex items-center justify-between gap-s" ?hidden="${0}"> <span> ${0}${0} </span> <span class="flex items-center justify-center transition-colors text-tertiary group-hover-text-body" style="transform:scale(1.35)"> ${0} </span> </p> <p class="text-s text-secondary" ?hidden="${0}">${0}</p> </div> </summary> <div class="overflow-hidden grid" style="gap:1px"> <slot></slot> </div> </details> `),this.open,(e=>{const t=e.currentTarget;this.open=t.open,e.composed||e.bubbles||this.dispatchEvent(new CustomEvent("toggle"))}),!this.label&&!this.helperText,!this.label,this.label,"number"==typeof this.count?` (${this.count})`:"",o(a||(a=n`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2em; height: 1.2em"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" /></svg>`)),!this.helperText,this.helperText):r(d||(d=n` <div class="leading-s mb-s" ?hidden="${0}"> <p class="font-medium text-body text-l" ?hidden="${0}">${0}</p> <p class="text-s text-secondary" ?hidden="${0}">${0}</p> </div> <div class="rounded overflow-hidden grid" style="gap:1px"> <slot></slot> </div> `),!this.label&&!this.helperText,!this.label,this.label,!this.helperText,this.helperText)}});
1
+ import{a as e}from"./shared-fef09d02.js";import"./shared-94756d7c.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as s,h as r,s as o}from"./shared-ba5c42c7.js";let l,i,a,d,n=e=>e;customElements.define("foxy-internal-summary-control",class extends e{constructor(){super(...arguments),this.layout=null,this.count=null,this.open=!1}static get properties(){return t(t({},super.properties),{},{layout:{},count:{type:Number},open:{type:Boolean}})}static get styles(){return[...super.styles,s(l||(l=n`::slotted(*){min-width:100%}:host(:not([layout=section])) slot::slotted(*){background-color:var(--lumo-contrast-5pct);padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)}details summary>div{border-radius:var(--lumo-border-radius)}details[open] summary>div{border-radius:var(--lumo-border-radius) var(--lumo-border-radius) 0 0}`))]}renderLightDom(){}renderControl(){return"details"===this.layout?r(i||(i=n` <details class="rounded overflow-hidden" ?open="${0}" @toggle="${0}"> <summary class="select-none cursor-pointer focus-outline-none group"> <div class="leading-s bg-contrast-5 group-focus-ring-2 group-focus-ring-inset group-focus-ring-primary-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?hidden="${0}"> <p class="font-medium uppercase text-s tracking-wider flex items-center justify-between gap-s" ?hidden="${0}"> <span> ${0}${0} </span> <span class="flex items-center justify-center transition-colors text-tertiary group-hover-text-body" style="transform:scale(1.35)"> ${0} </span> </p> <p class="text-s text-secondary" ?hidden="${0}">${0}</p> </div> </summary> <div class="overflow-hidden grid" style="gap:1px"> <slot></slot> </div> </details> `),this.open,(e=>{const t=e.currentTarget;this.open=t.open,e.composed||e.bubbles||this.dispatchEvent(new CustomEvent("toggle"))}),!this.label&&!this.helperText,!this.label,this.label,"number"==typeof this.count?` (${this.count})`:"",o(a||(a=n`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2em; height: 1.2em"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" /></svg>`)),!this.helperText,this.helperText):r(d||(d=n` <div class="leading-s mb-s" ?hidden="${0}"> <p class="font-medium text-body text-l" ?hidden="${0}">${0}</p> <p class="text-s text-secondary" ?hidden="${0}">${0}</p> </div> <div class="rounded overflow-hidden grid" style="gap:1px"> <slot></slot> </div> `),!this.label&&!this.helperText,!this.label,this.label,!this.helperText,this.helperText)}});
@@ -1,2 +1,2 @@
1
- import{a as e}from"./shared-377dea9e.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}">
1
+ import{a as e}from"./shared-fef09d02.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,4 +1,4 @@
1
- import"./shared-8154088a.js";import{h as e,G as t,P as r}from"./shared-5c747b54.js";import{E as o,T as i,D as s}from"./shared-8219cdf0.js";import{C as a}from"./shared-3f0b1660.js";import"./shared-f69bc3a6.js";import{F as l}from"./shared-cfb804b4.js";import{a as n}from"./shared-377dea9e.js";import"./shared-94756d7c.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-3e7f5663.js";const m=e`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
1
+ import"./shared-8154088a.js";import{h as e,G as t,P as r}from"./shared-5c747b54.js";import{E as o,T as i,D as s}from"./shared-8219cdf0.js";import{C as a}from"./shared-3f0b1660.js";import"./shared-f69bc3a6.js";import{F as l}from"./shared-cfb804b4.js";import{a as n}from"./shared-fef09d02.js";import"./shared-94756d7c.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-3e7f5663.js";const m=e`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -29,20 +29,12 @@ export class InternalAdminSubscriptionFormLinkControl extends ResponsiveMixin(In
29
29
  href = undefined;
30
30
  }
31
31
  return html `
32
- <div class="leading-xs flex items-center gap-s">
33
- <a
34
- target="_blank"
35
- class="truncate min-w-0 font-medium rounded cursor-pointer text-primary hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50"
36
- href=${href}
37
- >
38
- <foxy-i18n infer="" key="label"></foxy-i18n>
39
- </a>
40
-
41
- <span> &bull; </span>
42
-
32
+ <div class="leading-xs flex items-center gap-xs">
33
+ <foxy-i18n class="truncate min-w-0" infer="" key="label"></foxy-i18n>
34
+ <span class="text-tertiary"> &bull; </span>
43
35
  <foxy-copy-to-clipboard
44
- layout="text"
45
- theme="tertiary-inline contrast"
36
+ layout="complete"
37
+ theme="tertiary-inline"
46
38
  infer="copy-to-clipboard"
47
39
  text=${href}
48
40
  >
@@ -1 +1 @@
1
- {"version":3,"file":"InternalAdminSubscriptionFormLinkControl.js","sourceRoot":"","sources":["../../../../../../src/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,4CAAyC;AACnE,OAAO,EAAE,eAAe,EAAE,gEAA6D;AACvF,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,MAAM,OAAO,wCAAyC,SAAQ,eAAe,CAAC,eAAe,CAAC;IAA9F;;QAQE,WAAM,GAAkB,IAAI,CAAC;IA6C/B,CAAC;IApDC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,MAAM,EAAE,EAAE;SACX,CAAC;IACJ,CAAC;IAID,aAAa;;QACX,MAAM,IAAI,GAAG,IAAI,CAAC,OAAuC,CAAC;QAC1D,IAAI,IAAwB,CAAC;QAE7B,IAAI;YACF,MAAM,GAAG,GAAG,IAAI,GAAG,aAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM,CAAC,kBAAkB,EAAE,IAAI,mCAAI,EAAE,CAAC,CAAC;YAEvE,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,MAAM,cAAc,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACvD,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBACzB,cAAc,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;aAC1E;YAED,IAAI,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;SACvB;QAAC,WAAM;YACN,IAAI,GAAG,SAAS,CAAC;SAClB;QAED,OAAO,IAAI,CAAA;;;;;iBAKE,IAAI;;;;;;;;;;;iBAWJ,IAAI;;;;;;;KAOhB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { AdminSubscriptionForm } from '../../AdminSubscriptionForm';\nimport type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\n\nimport { ResponsiveMixin } from '../../../../../mixins/responsive';\nimport { InternalControl } from '../../../../internal/InternalControl/InternalControl';\nimport { html } from 'lit-html';\n\nexport class InternalAdminSubscriptionFormLinkControl extends ResponsiveMixin(InternalControl) {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n search: {},\n };\n }\n\n search: string | null = null;\n\n renderControl(): TemplateResult {\n const form = this.nucleon as AdminSubscriptionForm | null;\n let href: string | undefined;\n\n try {\n const url = new URL(form?.data?._links['fx:sub_token_url'].href ?? '');\n\n if (this.search) {\n const originalParams = new URLSearchParams(url.search);\n url.search = this.search;\n originalParams.forEach((value, key) => url.searchParams.set(key, value));\n }\n\n href = url.toString();\n } catch {\n href = undefined;\n }\n\n return html`\n <div class=\"leading-xs flex items-center gap-s\">\n <a\n target=\"_blank\"\n class=\"truncate min-w-0 font-medium rounded cursor-pointer text-primary hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=${href}\n >\n <foxy-i18n infer=\"\" key=\"label\"></foxy-i18n>\n </a>\n\n <span> &bull; </span>\n\n <foxy-copy-to-clipboard\n layout=\"text\"\n theme=\"tertiary-inline contrast\"\n infer=\"copy-to-clipboard\"\n text=${href}\n >\n </foxy-copy-to-clipboard>\n </div>\n\n <foxy-i18n class=\"leading-xs block text-xs text-secondary\" infer=\"\" key=\"helper_text\">\n </foxy-i18n>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"InternalAdminSubscriptionFormLinkControl.js","sourceRoot":"","sources":["../../../../../../src/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,4CAAyC;AACnE,OAAO,EAAE,eAAe,EAAE,gEAA6D;AACvF,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,MAAM,OAAO,wCAAyC,SAAQ,eAAe,CAAC,eAAe,CAAC;IAA9F;;QAQE,WAAM,GAAkB,IAAI,CAAC;IAqC/B,CAAC;IA5CC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,MAAM,EAAE,EAAE;SACX,CAAC;IACJ,CAAC;IAID,aAAa;;QACX,MAAM,IAAI,GAAG,IAAI,CAAC,OAAuC,CAAC;QAC1D,IAAI,IAAwB,CAAC;QAE7B,IAAI;YACF,MAAM,GAAG,GAAG,IAAI,GAAG,aAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM,CAAC,kBAAkB,EAAE,IAAI,mCAAI,EAAE,CAAC,CAAC;YAEvE,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,MAAM,cAAc,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACvD,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBACzB,cAAc,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;aAC1E;YAED,IAAI,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;SACvB;QAAC,WAAM;YACN,IAAI,GAAG,SAAS,CAAC;SAClB;QAED,OAAO,IAAI,CAAA;;;;;;;;iBAQE,IAAI;;;;;;;KAOhB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { AdminSubscriptionForm } from '../../AdminSubscriptionForm';\nimport type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\n\nimport { ResponsiveMixin } from '../../../../../mixins/responsive';\nimport { InternalControl } from '../../../../internal/InternalControl/InternalControl';\nimport { html } from 'lit-html';\n\nexport class InternalAdminSubscriptionFormLinkControl extends ResponsiveMixin(InternalControl) {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n search: {},\n };\n }\n\n search: string | null = null;\n\n renderControl(): TemplateResult {\n const form = this.nucleon as AdminSubscriptionForm | null;\n let href: string | undefined;\n\n try {\n const url = new URL(form?.data?._links['fx:sub_token_url'].href ?? '');\n\n if (this.search) {\n const originalParams = new URLSearchParams(url.search);\n url.search = this.search;\n originalParams.forEach((value, key) => url.searchParams.set(key, value));\n }\n\n href = url.toString();\n } catch {\n href = undefined;\n }\n\n return html`\n <div class=\"leading-xs flex items-center gap-xs\">\n <foxy-i18n class=\"truncate min-w-0\" infer=\"\" key=\"label\"></foxy-i18n>\n <span class=\"text-tertiary\"> &bull; </span>\n <foxy-copy-to-clipboard\n layout=\"complete\"\n theme=\"tertiary-inline\"\n infer=\"copy-to-clipboard\"\n text=${href}\n >\n </foxy-copy-to-clipboard>\n </div>\n\n <foxy-i18n class=\"leading-xs block text-xs text-secondary\" infer=\"\" key=\"helper_text\">\n </foxy-i18n>\n `;\n }\n}\n"]}
@@ -16,7 +16,7 @@ export declare class CopyToClipboard extends Base {
16
16
  static get properties(): PropertyDeclarations;
17
17
  static get styles(): CSSResult;
18
18
  /** Icon or text UI. Icon UI by default. */
19
- layout: 'text' | 'icon' | null;
19
+ layout: 'complete' | 'text' | 'icon' | null;
20
20
  /** VaadinButton theme for text layout. */
21
21
  theme: string | null;
22
22
  /** Default icon. */
@@ -90,8 +90,8 @@ iron-icon{
90
90
  `;
91
91
  }
92
92
  render() {
93
- var _a, _b;
94
- const layout = this.layout === 'text' ? 'text' : 'icon';
93
+ var _a, _b, _c;
94
+ const layout = (_a = this.layout) !== null && _a !== void 0 ? _a : 'icon';
95
95
  let label = '';
96
96
  let icon = '';
97
97
  if (this.__state === 'busy') {
@@ -108,7 +108,7 @@ iron-icon{
108
108
  }
109
109
  else {
110
110
  label = 'click_to_copy';
111
- icon = (_a = this.icon) !== null && _a !== void 0 ? _a : 'icons:content-copy';
111
+ icon = (_b = this.icon) !== null && _b !== void 0 ? _b : 'icons:content-copy';
112
112
  }
113
113
  return html `
114
114
  ${layout === 'icon'
@@ -134,11 +134,20 @@ iron-icon{
134
134
  `
135
135
  : html `
136
136
  <vaadin-button
137
- theme=${ifDefined((_b = this.theme) !== null && _b !== void 0 ? _b : void 0)}
137
+ theme=${ifDefined((_c = this.theme) !== null && _c !== void 0 ? _c : void 0)}
138
138
  ?disabled=${this.disabled}
139
139
  @click=${this.__copy}
140
140
  >
141
141
  <foxy-i18n infer="" key=${label}></foxy-i18n>
142
+ ${layout === 'complete'
143
+ ? html `
144
+ <iron-icon
145
+ style="--lumo-icon-size-m: 1em; transform: translateY(-0.1em)"
146
+ icon=${icon}
147
+ >
148
+ </iron-icon>
149
+ `
150
+ : ''}
142
151
  </vaadin-button>
143
152
  `}
144
153
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"CopyToClipboard.js","sourceRoot":"","sources":["../../../../src/elements/public/CopyToClipboard/CopyToClipboard.ts"],"names":[],"mappings":"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","sourcesContent":["import type { CSSResult, PropertyDeclarations, TemplateResult } from 'lit-element';\n\nimport { LitElement, css, html } from 'lit-element';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { InferrableMixin } from '../../../mixins/inferrable';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nconst NS = 'copy-to-clipboard';\nconst Base = ConfigurableMixin(TranslatableMixin(InferrableMixin(LitElement), NS));\n\n/**\n * A simple \"click to copy\" button that takes the size of the font\n * your text is written in (considering that the font styles are applied to container).\n *\n * @element foxy-copy-to-clipboard\n * @since 1.17.0\n */\nexport class CopyToClipboard extends Base {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n layout: {},\n theme: {},\n text: { type: String },\n icon: { type: String },\n __state: { attribute: false },\n };\n }\n\n static get styles(): CSSResult {\n return css`\n .icon-button {\n position: relative;\n appearance: none;\n background: none;\n border: none;\n border-radius: var(--lumo-border-radius-s);\n color: inherit;\n font-size: inherit;\n padding: 0;\n width: 1.5em;\n height: 1.5em;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .icon-button::before {\n position: absolute;\n inset: 0;\n content: ' ';\n display: block;\n background: currentColor;\n opacity: 0.08;\n transition: opacity 0.15s ease;\n border-radius: var(--lumo-border-radius-s);\n }\n\n .icon-button:focus {\n outline: none;\n box-shadow: 0 0 0 2px currentColor;\n }\n\n .icon-button:disabled {\n opacity: 0.5;\n cursor: default;\n }\n\n @media (hover: hover) {\n .icon-button:not(:disabled):hover {\n cursor: pointer;\n }\n\n .icon-button:not(:disabled):hover::before {\n opacity: 0.16;\n }\n }\n\n iron-icon {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n `;\n }\n\n /** Icon or text UI. Icon UI by default. */\n layout: 'text' | 'icon' | null = null;\n\n /** VaadinButton theme for text layout. */\n theme: string | null = null;\n\n /** Default icon. */\n icon: string | null = null;\n\n /** Text to copy. */\n text: string | null = null;\n\n private __state: 'idle' | 'busy' | 'fail' | 'done' = 'idle';\n\n render(): TemplateResult {\n const layout = this.layout === 'text' ? 'text' : 'icon';\n let label = '';\n let icon = '';\n\n if (this.__state === 'busy') {\n label = 'copying';\n icon = 'icons:hourglass-empty';\n } else if (this.__state === 'fail') {\n label = 'failed_to_copy';\n icon = 'icons:error-outline';\n } else if (this.__state === 'done') {\n label = 'done';\n icon = 'icons:done';\n } else {\n label = 'click_to_copy';\n icon = this.icon ?? 'icons:content-copy';\n }\n\n return html`\n ${layout === 'icon'\n ? html`\n <button\n id=\"trigger\"\n class=\"icon-button\"\n ?disabled=${this.disabled}\n @click=${this.__copy}\n >\n <iron-icon icon=${icon}></iron-icon>\n </button>\n <vcf-tooltip\n position=\"bottom\"\n style=\"--lumo-base-color: black\"\n theme=\"light\"\n for=\"trigger\"\n >\n <span class=\"text-s\" style=\"color: white\">\n <foxy-i18n infer=\"\" key=${label}></foxy-i18n>\n </span>\n </vcf-tooltip>\n `\n : html`\n <vaadin-button\n theme=${ifDefined(this.theme ?? void 0)}\n ?disabled=${this.disabled}\n @click=${this.__copy}\n >\n <foxy-i18n infer=\"\" key=${label}></foxy-i18n>\n </vaadin-button>\n `}\n `;\n }\n\n private __copy() {\n if (this.__state === 'idle') {\n this.__state = 'busy';\n\n navigator.clipboard\n .writeText(this.text ?? '')\n .then(() => (this.__state = 'done'))\n .catch(() => (this.__state = 'fail'))\n .then(() => setTimeout(() => (this.__state = 'idle'), 2000));\n }\n }\n}\n"]}
1
+ {"version":3,"file":"CopyToClipboard.js","sourceRoot":"","sources":["../../../../src/elements/public/CopyToClipboard/CopyToClipboard.ts"],"names":[],"mappings":"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","sourcesContent":["import type { CSSResult, PropertyDeclarations, TemplateResult } from 'lit-element';\n\nimport { LitElement, css, html } from 'lit-element';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { InferrableMixin } from '../../../mixins/inferrable';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nconst NS = 'copy-to-clipboard';\nconst Base = ConfigurableMixin(TranslatableMixin(InferrableMixin(LitElement), NS));\n\n/**\n * A simple \"click to copy\" button that takes the size of the font\n * your text is written in (considering that the font styles are applied to container).\n *\n * @element foxy-copy-to-clipboard\n * @since 1.17.0\n */\nexport class CopyToClipboard extends Base {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n layout: {},\n theme: {},\n text: { type: String },\n icon: { type: String },\n __state: { attribute: false },\n };\n }\n\n static get styles(): CSSResult {\n return css`\n .icon-button {\n position: relative;\n appearance: none;\n background: none;\n border: none;\n border-radius: var(--lumo-border-radius-s);\n color: inherit;\n font-size: inherit;\n padding: 0;\n width: 1.5em;\n height: 1.5em;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .icon-button::before {\n position: absolute;\n inset: 0;\n content: ' ';\n display: block;\n background: currentColor;\n opacity: 0.08;\n transition: opacity 0.15s ease;\n border-radius: var(--lumo-border-radius-s);\n }\n\n .icon-button:focus {\n outline: none;\n box-shadow: 0 0 0 2px currentColor;\n }\n\n .icon-button:disabled {\n opacity: 0.5;\n cursor: default;\n }\n\n @media (hover: hover) {\n .icon-button:not(:disabled):hover {\n cursor: pointer;\n }\n\n .icon-button:not(:disabled):hover::before {\n opacity: 0.16;\n }\n }\n\n iron-icon {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n `;\n }\n\n /** Icon or text UI. Icon UI by default. */\n layout: 'complete' | 'text' | 'icon' | null = null;\n\n /** VaadinButton theme for text layout. */\n theme: string | null = null;\n\n /** Default icon. */\n icon: string | null = null;\n\n /** Text to copy. */\n text: string | null = null;\n\n private __state: 'idle' | 'busy' | 'fail' | 'done' = 'idle';\n\n render(): TemplateResult {\n const layout = this.layout ?? 'icon';\n let label = '';\n let icon = '';\n\n if (this.__state === 'busy') {\n label = 'copying';\n icon = 'icons:hourglass-empty';\n } else if (this.__state === 'fail') {\n label = 'failed_to_copy';\n icon = 'icons:error-outline';\n } else if (this.__state === 'done') {\n label = 'done';\n icon = 'icons:done';\n } else {\n label = 'click_to_copy';\n icon = this.icon ?? 'icons:content-copy';\n }\n\n return html`\n ${layout === 'icon'\n ? html`\n <button\n id=\"trigger\"\n class=\"icon-button\"\n ?disabled=${this.disabled}\n @click=${this.__copy}\n >\n <iron-icon icon=${icon}></iron-icon>\n </button>\n <vcf-tooltip\n position=\"bottom\"\n style=\"--lumo-base-color: black\"\n theme=\"light\"\n for=\"trigger\"\n >\n <span class=\"text-s\" style=\"color: white\">\n <foxy-i18n infer=\"\" key=${label}></foxy-i18n>\n </span>\n </vcf-tooltip>\n `\n : html`\n <vaadin-button\n theme=${ifDefined(this.theme ?? void 0)}\n ?disabled=${this.disabled}\n @click=${this.__copy}\n >\n <foxy-i18n infer=\"\" key=${label}></foxy-i18n>\n ${layout === 'complete'\n ? html`\n <iron-icon\n style=\"--lumo-icon-size-m: 1em; transform: translateY(-0.1em)\"\n icon=${icon}\n >\n </iron-icon>\n `\n : ''}\n </vaadin-button>\n `}\n `;\n }\n\n private __copy() {\n if (this.__state === 'idle') {\n this.__state = 'busy';\n\n navigator.clipboard\n .writeText(this.text ?? '')\n .then(() => (this.__state = 'done'))\n .catch(() => (this.__state = 'fail'))\n .then(() => setTimeout(() => (this.__state = 'idle'), 2000));\n }\n }\n}\n"]}
@@ -912,12 +912,11 @@ export class StoreForm extends Base {
912
912
  const config = this.__getCustomDisplayIdConfig();
913
913
  const startAsInt = parseInt(config.start || '0');
914
914
  const lengthAsInt = parseInt(config.length || '0');
915
- const numericLength = lengthAsInt - config.prefix.length - config.suffix.length;
916
- const randomExampleNumericId = Math.min(startAsInt + Math.floor(Math.random() * Math.pow(10, numericLength)), Math.pow(10, numericLength) - 1);
917
- if (config.start && config.length && startAsInt / 10 <= numericLength) {
915
+ const randomExampleNumericId = Math.min(startAsInt + Math.floor(Math.random() * Math.pow(10, lengthAsInt)), Math.pow(10, lengthAsInt) - 1);
916
+ if (config.start && config.length && startAsInt / 10 <= lengthAsInt) {
918
917
  return {
919
- first: `${config.prefix}${startAsInt.toString().padStart(numericLength, '0')}${config.suffix}`,
920
- random: `${config.prefix}${randomExampleNumericId.toString().padStart(numericLength, '0')}${config.suffix}`,
918
+ first: `${config.prefix}${startAsInt.toString().padStart(lengthAsInt, '0')}${config.suffix}`,
919
+ random: `${config.prefix}${randomExampleNumericId.toString().padStart(lengthAsInt, '0')}${config.suffix}`,
921
920
  };
922
921
  }
923
922
  }
@@ -926,16 +925,15 @@ export class StoreForm extends Base {
926
925
  const transactionJournalEntriesConfig = customDisplayIdConfig.transaction_journal_entries;
927
926
  const startAsInt = parseInt(customDisplayIdConfig.start || '0');
928
927
  const lengthAsInt = parseInt(customDisplayIdConfig.length || '0');
929
- const numericLength = lengthAsInt - customDisplayIdConfig.prefix.length - customDisplayIdConfig.suffix.length;
930
- const randomExampleNumericId = Math.min(startAsInt + Math.floor(Math.random() * Math.pow(10, numericLength)), Math.pow(10, numericLength) - 1);
928
+ const randomExampleNumericId = Math.min(startAsInt + Math.floor(Math.random() * Math.pow(10, lengthAsInt)), Math.pow(10, lengthAsInt) - 1);
931
929
  const randomExampleId = `${customDisplayIdConfig.prefix}${randomExampleNumericId
932
930
  .toString()
933
- .padStart(numericLength, '0')}${customDisplayIdConfig.suffix}`;
931
+ .padStart(lengthAsInt, '0')}${customDisplayIdConfig.suffix}`;
934
932
  const randomNumericEntryId = Math.floor(Math.random() * 1000);
935
933
  const randomEntryId = String(randomNumericEntryId).padStart(3, '0');
936
934
  if (customDisplayIdConfig.start &&
937
935
  customDisplayIdConfig.length &&
938
- startAsInt / 10 <= numericLength) {
936
+ startAsInt / 10 <= lengthAsInt) {
939
937
  return {
940
938
  authcapture: `${randomExampleId}${transactionJournalEntriesConfig.transaction_separator}${transactionJournalEntriesConfig.log_detail_request_types.transaction_authcapture.prefix}${randomEntryId}`,
941
939
  capture: `${randomExampleId}${transactionJournalEntriesConfig.transaction_separator}${transactionJournalEntriesConfig.log_detail_request_types.transaction_capture.prefix}${randomEntryId}`,